Skip to content

Conversation

@luskafaria
Copy link
Contributor

@luskafaria luskafaria commented Apr 10, 2025

closes #17

Description

This PR extends the BillingKind type to include a new MULTIPLE_PAYMENTS option alongside the existing ONE_TIME option. This enhancement allows the SDK to support recurring or installment-based billing scenarios where a customer is charged multiple times for a service or product.

Changes

  • Added MULTIPLE_PAYMENTS as a valid option in the BillingKind type definition;
  • Made customer information optional when frequency is MULTIPLE_PAYMENTS;
  • Added ACTIVE status to BillingStatus type;
  • Updated IBilling type to include additional fields: allowCoupons, coupons, and couponsUsed;
  • Modified customer field in IBilling to support empty objects for MULTIPLE_PAYMENTS;
  • Created base types (BaseBillingData, BillingProduct) to reduce duplication;
  • Split CreateBillingData into discrete types (OneTimeWithCustomerId, OneTimeWithCustomer, MultiplePayments).

@ChristoPy
Copy link
Collaborator

I like it! Just a comment hahaha

Also, we have a new version of our SDK, so remember to sync your branch when you get back to it.

See ya

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MULTIPLE_PAYMENTS support

2 participants