chargebee 3.28.1 → 3.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +140 -0
- package/cjs/chargebee.cjs.js +1 -1
- package/cjs/environment.js +1 -1
- package/cjs/resources/api_endpoints.js +126 -0
- package/cjs/resources/webhook/eventType.js +5 -0
- package/cjs/schema/alert.schema.js +11 -5
- package/cjs/schema/coupon.schema.js +1 -1
- package/cjs/schema/credit_note.schema.js +13 -0
- package/cjs/schema/credit_unit.schema.js +38 -0
- package/cjs/schema/customer.schema.js +39 -0
- package/cjs/schema/entitlement.schema.js +4 -4
- package/cjs/schema/estimate.schema.js +18 -0
- package/cjs/schema/event.schema.js +20 -0
- package/cjs/schema/export.schema.js +33 -1
- package/cjs/schema/feature.schema.js +0 -1
- package/cjs/schema/gift.schema.js +14 -0
- package/cjs/schema/grant_block.schema.js +4 -0
- package/cjs/schema/index.js +1 -0
- package/cjs/schema/invoice.schema.js +63 -3
- package/cjs/schema/ledger_operation.schema.js +14 -4
- package/cjs/schema/meter.schema.js +10 -0
- package/cjs/schema/omnichannel_subscription.schema.js +2 -2
- package/cjs/schema/payment_intent.schema.js +14 -0
- package/cjs/schema/payment_source.schema.js +49 -0
- package/cjs/schema/purchase.schema.js +7 -0
- package/cjs/schema/ramp.schema.js +4 -2
- package/cjs/schema/recorded_purchase.schema.js +3 -0
- package/cjs/schema/subscription.schema.js +94 -0
- package/cjs/schema/transaction.schema.js +32 -0
- package/cjs/schema/webhook_endpoint.schema.js +10 -0
- package/cjs/telemetry/TelemetryAdapter.js +12 -7
- package/esm/environment.js +1 -1
- package/esm/resources/api_endpoints.js +126 -0
- package/esm/resources/webhook/eventType.js +5 -0
- package/esm/schema/alert.schema.js +11 -5
- package/esm/schema/coupon.schema.js +1 -1
- package/esm/schema/credit_note.schema.js +13 -0
- package/esm/schema/credit_unit.schema.js +35 -0
- package/esm/schema/customer.schema.js +39 -0
- package/esm/schema/entitlement.schema.js +4 -4
- package/esm/schema/estimate.schema.js +18 -0
- package/esm/schema/event.schema.js +20 -0
- package/esm/schema/export.schema.js +33 -1
- package/esm/schema/feature.schema.js +0 -1
- package/esm/schema/gift.schema.js +14 -0
- package/esm/schema/grant_block.schema.js +4 -0
- package/esm/schema/index.js +1 -0
- package/esm/schema/invoice.schema.js +63 -3
- package/esm/schema/ledger_operation.schema.js +13 -3
- package/esm/schema/meter.schema.js +10 -0
- package/esm/schema/omnichannel_subscription.schema.js +2 -2
- package/esm/schema/payment_intent.schema.js +14 -0
- package/esm/schema/payment_source.schema.js +49 -0
- package/esm/schema/purchase.schema.js +7 -0
- package/esm/schema/ramp.schema.js +4 -2
- package/esm/schema/recorded_purchase.schema.js +3 -0
- package/esm/schema/subscription.schema.js +94 -0
- package/esm/schema/transaction.schema.js +32 -0
- package/esm/schema/webhook_endpoint.schema.js +10 -0
- package/esm/telemetry/TelemetryAdapter.js +12 -7
- package/package.json +1 -1
- package/types/core.d.ts +65 -6
- package/types/index.d.ts +15 -8
- package/types/resources/Alert.d.ts +18 -3
- package/types/resources/AsyncResponse.d.ts +35 -0
- package/types/resources/AsyncResponseList.d.ts +8 -0
- package/types/resources/AttachedItem.d.ts +2 -2
- package/types/resources/ColumnDefinition.d.ts +9 -0
- package/types/resources/Content.d.ts +7 -0
- package/types/resources/CreditNote.d.ts +15 -0
- package/types/resources/CreditNoteEstimate.d.ts +5 -0
- package/types/resources/CreditUnit.d.ts +90 -0
- package/types/resources/Customer.d.ts +16 -2
- package/types/resources/Estimate.d.ts +20 -2
- package/types/resources/Event.d.ts +5 -0
- package/types/resources/Export.d.ts +1 -0
- package/types/resources/Feature.d.ts +2 -0
- package/types/resources/Gift.d.ts +16 -2
- package/types/resources/GrantBlock.d.ts +12 -6
- package/types/resources/Invoice.d.ts +41 -3
- package/types/resources/InvoiceEstimate.d.ts +5 -0
- package/types/resources/LedgerAccountBalance.d.ts +3 -1
- package/types/resources/LedgerEntry.d.ts +22 -0
- package/types/resources/LedgerOperation.d.ts +34 -9
- package/types/resources/Meter.d.ts +42 -0
- package/types/resources/MeteredFeature.d.ts +70 -0
- package/types/resources/PaymentIntent.d.ts +57 -5
- package/types/resources/PaymentSource.d.ts +8 -1
- package/types/resources/PromotionalGrant.d.ts +1 -1
- package/types/resources/Purchase.d.ts +8 -1
- package/types/resources/Quote.d.ts +5 -0
- package/types/resources/QuoteLineGroup.d.ts +5 -0
- package/types/resources/QuotedCharge.d.ts +3 -0
- package/types/resources/Ramp.d.ts +4 -1
- package/types/resources/RecordedPurchase.d.ts +3 -0
- package/types/resources/Subscription.d.ts +58 -7
- package/types/resources/WebhookEvent.d.ts +33 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,143 @@
|
|
|
1
|
+
### v3.30.0 (2026-07-30)
|
|
2
|
+
* * *
|
|
3
|
+
### New Resources:
|
|
4
|
+
- [`CreditUnit`](https://apidocs.chargebee.com/docs/api/credit_units) has been added.
|
|
5
|
+
- [`LedgerEntry`](https://apidocs.chargebee.com/docs/api/ledger_entries) has been added.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### New Actions:
|
|
9
|
+
- [`allocate`](https://apidocs.chargebee.com/docs/api/ledger_operations/allocate) has been added to [`LedgerOperation`](https://apidocs.chargebee.com/docs/api/ledger_operations).
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### New Attributes:
|
|
13
|
+
- [`unit_id`](https://apidocs.chargebee.com/docs/api/alerts/alert-object#unit_id) has been added to [`Alert`](https://apidocs.chargebee.com/docs/api/alerts).
|
|
14
|
+
- [`subscription_id`](https://apidocs.chargebee.com/docs/api/grant_blocks/grant-block-object#subscription_id) has been added to [`GrantBlock`](https://apidocs.chargebee.com/docs/api/grant_blocks).
|
|
15
|
+
- [`modified_at`](https://apidocs.chargebee.com/docs/api/grant_blocks/grant-block-object#modified_at) has been added to [`GrantBlock`](https://apidocs.chargebee.com/docs/api/grant_blocks).
|
|
16
|
+
- [`resource_version`](https://apidocs.chargebee.com/docs/api/grant_blocks/grant-block-object#resource_version) has been added to [`GrantBlock`](https://apidocs.chargebee.com/docs/api/grant_blocks).
|
|
17
|
+
- [`created_at`](https://apidocs.chargebee.com/docs/api/ledger_account_balances/ledger-account-balance-object#created_at) has been added to [`LedgerAccountBalance`](https://apidocs.chargebee.com/docs/api/ledger_account_balances).
|
|
18
|
+
- [`resource_version`](https://apidocs.chargebee.com/docs/api/ledger_account_balances/ledger-account-balance-object#resource_version) has been added to [`LedgerAccountBalance`](https://apidocs.chargebee.com/docs/api/ledger_account_balances).
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### New Parameters:
|
|
22
|
+
- [`account_type`](https://apidocs.chargebee.com/docs/api/grant_blocks/list-grant-blocks#account_type) has been added as query parameter to [`list_grant_blocks`](https://apidocs.chargebee.com/docs/api/grant_blocks/list-grant-blocks) in [`GrantBlock`](https://apidocs.chargebee.com/docs/api/grant_blocks).
|
|
23
|
+
- [`unit_id`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert#unit_id) has been added as request body parameter to [`create_an_alert`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert) in [`Alert`](https://apidocs.chargebee.com/docs/api/alerts).
|
|
24
|
+
- [`include_cancellation_day_in_billing`](https://apidocs.chargebee.com/docs/api/estimates/cancel-subscription-for-items-estimate#include_cancellation_day_in_billing) has been added as request body parameter to [`cancel_subscription_for_items_estimate`](https://apidocs.chargebee.com/docs/api/estimates/cancel-subscription-for-items-estimate) in [`Estimate`](https://apidocs.chargebee.com/docs/api/estimates).
|
|
25
|
+
- [`subscription_id`](https://apidocs.chargebee.com/docs/api/ledger_operations/allocate#subscription_id) has been added as request body parameter to [`allocate`](https://apidocs.chargebee.com/docs/api/ledger_operations/allocate) in [`LedgerOperation`](https://apidocs.chargebee.com/docs/api/ledger_operations).
|
|
26
|
+
- [`unit_id`](https://apidocs.chargebee.com/docs/api/ledger_operations/allocate#unit_id) has been added as request body parameter to [`allocate`](https://apidocs.chargebee.com/docs/api/ledger_operations/allocate) in [`LedgerOperation`](https://apidocs.chargebee.com/docs/api/ledger_operations).
|
|
27
|
+
- [`amount`](https://apidocs.chargebee.com/docs/api/ledger_operations/allocate#amount) has been added as request body parameter to [`allocate`](https://apidocs.chargebee.com/docs/api/ledger_operations/allocate) in [`LedgerOperation`](https://apidocs.chargebee.com/docs/api/ledger_operations).
|
|
28
|
+
- [`expires_at`](https://apidocs.chargebee.com/docs/api/ledger_operations/allocate#expires_at) has been added as request body parameter to [`allocate`](https://apidocs.chargebee.com/docs/api/ledger_operations/allocate) in [`LedgerOperation`](https://apidocs.chargebee.com/docs/api/ledger_operations).
|
|
29
|
+
- [`metadata`](https://apidocs.chargebee.com/docs/api/ledger_operations/allocate#metadata) has been added as request body parameter to [`allocate`](https://apidocs.chargebee.com/docs/api/ledger_operations/allocate) in [`LedgerOperation`](https://apidocs.chargebee.com/docs/api/ledger_operations).
|
|
30
|
+
- [`include_cancellation_day_in_billing`](https://apidocs.chargebee.com/docs/api/subscriptions/cancel-subscription-for-items#include_cancellation_day_in_billing) has been added as request body parameter to [`cancel_subscription_for_items`](https://apidocs.chargebee.com/docs/api/subscriptions/cancel-subscription-for-items) in [`Subscription`](https://apidocs.chargebee.com/docs/api/subscriptions).
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### New Events:
|
|
34
|
+
- [`grant_blocks_created`](https://apidocs.chargebee.com/docs/api/events/webhook/grant_blocks_created) has been added.
|
|
35
|
+
- [`ledger_updated`](https://apidocs.chargebee.com/docs/api/events/webhook/ledger_updated) has been added.
|
|
36
|
+
- [`ledger_account_balance_updated`](https://apidocs.chargebee.com/docs/api/events/webhook/ledger_account_balance_updated) has been added.
|
|
37
|
+
- [`grant_blocks_updated`](https://apidocs.chargebee.com/docs/api/events/webhook/grant_blocks_updated) has been added.
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
### New Enums:
|
|
41
|
+
- `ledger_account_balance_updated`, `grant_blocks_created`, `grant_blocks_updated`, and `ledger_updated` have been added as new values enum `EventType`.
|
|
42
|
+
- `dana`, `touch_n_go`, `tamara`, and `qpay` have been added as new values enum `PaymentMethod`.
|
|
43
|
+
- `dana`, `touch_n_go`, `tamara`, and `qpay` have been added as new values enum `PaymentMethodType`.
|
|
44
|
+
- `dana`, `touch_n_go`, `tamara`, `qpay`, `credit_balance_dropped`, `credit`, `debit`, `hold`, and `unhold` have been added as new values enum `Type`.
|
|
45
|
+
- `active` and `archived` have been added as new values to enum attribute [`status`](https://apidocs.chargebee.com/docs/api/credit_units/credit-unit-object#status) in [`CreditUnit`](https://apidocs.chargebee.com/docs/api/credit_units).
|
|
46
|
+
- `grant_renewal` and `subscription_renewed` have been added as new values to enum attribute [`grant_source`](https://apidocs.chargebee.com/docs/api/grant_blocks/grant-block-object#grant_source) in [`GrantBlock`](https://apidocs.chargebee.com/docs/api/grant_blocks).
|
|
47
|
+
- `provisioned` and `overdraft` have been added as new values to enum attribute [`account_type`](https://apidocs.chargebee.com/docs/api/ledger_entries/ledger-entry-object#account_type) in [`LedgerEntry`](https://apidocs.chargebee.com/docs/api/ledger_entries).
|
|
48
|
+
- `credit_unit` has been added as a new value to enum attribute [`unit_type`](https://apidocs.chargebee.com/docs/api/ledger_entries/ledger-entry-object#unit_type) in [`LedgerEntry`](https://apidocs.chargebee.com/docs/api/ledger_entries).
|
|
49
|
+
- `dana`, `touch_n_go`, `tamara`, and `qpay` have been added as new values to enum attribute [`payment_method_type`](https://apidocs.chargebee.com/docs/api/payment_intents/payment-intent-object#payment_method_type) in [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents).
|
|
50
|
+
- `dana`, `touch_n_go`, `tamara`, and `qpay` have been added as new values to enum attribute [`active_payment_attempt.payment_method_type`](https://apidocs.chargebee.com/docs/api/payment_intents/payment-intent-object#active_payment_attempt_payment_method_type) in [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents).
|
|
51
|
+
- `archived` and `active` have been added as new values to enum query parameter `status.in` in [`list_credit_units`](https://apidocs.chargebee.com/docs/api/credit_units/list-credit-units) of [`CreditUnit`](https://apidocs.chargebee.com/docs/api/credit_units).
|
|
52
|
+
- `archived` and `active` have been added as new values to enum query parameter `status.is` in [`list_credit_units`](https://apidocs.chargebee.com/docs/api/credit_units/list-credit-units) of [`CreditUnit`](https://apidocs.chargebee.com/docs/api/credit_units).
|
|
53
|
+
- `provisioned` and `overdraft` have been added as new values to enum query parameter `account_type.is` in [`list_grant_blocks`](https://apidocs.chargebee.com/docs/api/grant_blocks/list-grant-blocks) of [`GrantBlock`](https://apidocs.chargebee.com/docs/api/grant_blocks).
|
|
54
|
+
- `dana`, `touch_n_go`, `tamara`, and `qpay` have been added as new values to enum request body parameter `payment_method_type` in [`update_a_payment_intent`](https://apidocs.chargebee.com/docs/api/payment_intents/update-a-payment-intent) of [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents).
|
|
55
|
+
- `dana`, `touch_n_go`, `tamara`, and `qpay` have been added as new values to enum request body parameter `payment_method_type` in [`create_a_payment_intent`](https://apidocs.chargebee.com/docs/api/payment_intents/create-a-payment-intent) of [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents).
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
### v3.29.0 (2026-07-21)
|
|
60
|
+
* * *
|
|
61
|
+
### New Resources:
|
|
62
|
+
- [`AsyncResponse`](https://apidocs.chargebee.com/docs/api/async_responses) has been added.
|
|
63
|
+
- [`AsyncResponseList`](https://apidocs.chargebee.com/docs/api/async_response_lists) has been added.
|
|
64
|
+
- [`ColumnDefinition`](https://apidocs.chargebee.com/docs/api/column_definitions) has been added.
|
|
65
|
+
- [`Meter`](https://apidocs.chargebee.com/docs/api/meters) has been added.
|
|
66
|
+
- [`MeteredFeature`](https://apidocs.chargebee.com/docs/api/metered_features) has been added.
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
### New Attributes:
|
|
70
|
+
- [`currency_code`](https://apidocs.chargebee.com/docs/api/alerts/alert-object#currency_code) has been added to [`Alert`](https://apidocs.chargebee.com/docs/api/alerts).
|
|
71
|
+
- [`threshold`](https://apidocs.chargebee.com/docs/api/alerts/alert-object#threshold) has been added to [`Alert`](https://apidocs.chargebee.com/docs/api/alerts).
|
|
72
|
+
- [`filter_conditions`](https://apidocs.chargebee.com/docs/api/alerts/alert-object#filter_conditions) has been added to [`Alert`](https://apidocs.chargebee.com/docs/api/alerts).
|
|
73
|
+
- [`exchange_rates`](https://apidocs.chargebee.com/docs/api/credit_notes/credit-note-object#exchange_rates) has been added to [`CreditNote`](https://apidocs.chargebee.com/docs/api/credit_notes).
|
|
74
|
+
- [`metered`](https://apidocs.chargebee.com/docs/api/features/feature-object#metered) has been added to [`Feature`](https://apidocs.chargebee.com/docs/api/features).
|
|
75
|
+
- [`exchange_rates`](https://apidocs.chargebee.com/docs/api/invoices/invoice-object#exchange_rates) has been added to [`Invoice`](https://apidocs.chargebee.com/docs/api/invoices).
|
|
76
|
+
- [`payment_intent_metadata`](https://apidocs.chargebee.com/docs/api/payment_intents/payment-intent-object#payment_intent_metadata) has been added to [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents).
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
### New Parameters:
|
|
80
|
+
- [`metered`](https://apidocs.chargebee.com/docs/api/features/list-features#metered) has been added as query parameter to [`list_features`](https://apidocs.chargebee.com/docs/api/features/list-features) in [`Feature`](https://apidocs.chargebee.com/docs/api/features).
|
|
81
|
+
- [`decommissioned`](https://apidocs.chargebee.com/docs/api/subscriptions/list-subscriptions#decommissioned) has been added as query parameter to [`list_subscriptions`](https://apidocs.chargebee.com/docs/api/subscriptions/list-subscriptions) in [`Subscription`](https://apidocs.chargebee.com/docs/api/subscriptions).
|
|
82
|
+
- [`currency_code`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert#currency_code) has been added as request body parameter to [`create_an_alert`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert) in [`Alert`](https://apidocs.chargebee.com/docs/api/alerts).
|
|
83
|
+
- [`line_items.proration_mode`](https://apidocs.chargebee.com/docs/api/credit_notes/import-credit-note#line_items_proration_mode) has been added as request body parameter to [`import_credit_note`](https://apidocs.chargebee.com/docs/api/credit_notes/import-credit-note) in [`CreditNote`](https://apidocs.chargebee.com/docs/api/credit_notes).
|
|
84
|
+
- [`item_prices.description`](https://apidocs.chargebee.com/docs/api/estimates/create-invoice-for-items-estimate#item_prices_description) has been added as request body parameter to [`create_invoice_for_items_estimate`](https://apidocs.chargebee.com/docs/api/estimates/create-invoice-for-items-estimate) in [`Estimate`](https://apidocs.chargebee.com/docs/api/estimates).
|
|
85
|
+
- [`item_prices.entity_description`](https://apidocs.chargebee.com/docs/api/estimates/create-invoice-for-items-estimate#item_prices_entity_description) has been added as request body parameter to [`create_invoice_for_items_estimate`](https://apidocs.chargebee.com/docs/api/estimates/create-invoice-for-items-estimate) in [`Estimate`](https://apidocs.chargebee.com/docs/api/estimates).
|
|
86
|
+
- [`charges.entity_description`](https://apidocs.chargebee.com/docs/api/estimates/create-invoice-for-items-estimate#charges_entity_description) has been added as request body parameter to [`create_invoice_for_items_estimate`](https://apidocs.chargebee.com/docs/api/estimates/create-invoice-for-items-estimate) in [`Estimate`](https://apidocs.chargebee.com/docs/api/estimates).
|
|
87
|
+
- [`subscription.decommissioned`](https://apidocs.chargebee.com/docs/api/exports/export-subscriptions#subscription_decommissioned) has been added as request body parameter to [`export_subscriptions`](https://apidocs.chargebee.com/docs/api/exports/export-subscriptions) in [`Export`](https://apidocs.chargebee.com/docs/api/exports).
|
|
88
|
+
- [`item_prices.description`](https://apidocs.chargebee.com/docs/api/invoices/create-invoice-for-items-and-one-time-charges#item_prices_description) has been added as request body parameter to [`create_invoice_for_items_and_one-time_charges`](https://apidocs.chargebee.com/docs/api/invoices/create-invoice-for-items-and-one-time-charges) in [`Invoice`](https://apidocs.chargebee.com/docs/api/invoices).
|
|
89
|
+
- [`item_prices.entity_description`](https://apidocs.chargebee.com/docs/api/invoices/create-invoice-for-items-and-one-time-charges#item_prices_entity_description) has been added as request body parameter to [`create_invoice_for_items_and_one-time_charges`](https://apidocs.chargebee.com/docs/api/invoices/create-invoice-for-items-and-one-time-charges) in [`Invoice`](https://apidocs.chargebee.com/docs/api/invoices).
|
|
90
|
+
- [`charges.entity_description`](https://apidocs.chargebee.com/docs/api/invoices/create-invoice-for-items-and-one-time-charges#charges_entity_description) has been added as request body parameter to [`create_invoice_for_items_and_one-time_charges`](https://apidocs.chargebee.com/docs/api/invoices/create-invoice-for-items-and-one-time-charges) in [`Invoice`](https://apidocs.chargebee.com/docs/api/invoices).
|
|
91
|
+
- [`create_pending_invoice`](https://apidocs.chargebee.com/docs/api/invoices/create-invoice-for-items-and-one-time-charges#create_pending_invoice) has been added as request body parameter to [`create_invoice_for_items_and_one-time_charges`](https://apidocs.chargebee.com/docs/api/invoices/create-invoice-for-items-and-one-time-charges) in [`Invoice`](https://apidocs.chargebee.com/docs/api/invoices).
|
|
92
|
+
- [`line_items.proration_mode`](https://apidocs.chargebee.com/docs/api/invoices/import-invoice#line_items_proration_mode) has been added as request body parameter to [`import_invoice`](https://apidocs.chargebee.com/docs/api/invoices/import-invoice) in [`Invoice`](https://apidocs.chargebee.com/docs/api/invoices).
|
|
93
|
+
- [`paid_at`](https://apidocs.chargebee.com/docs/api/invoices/import-invoice#paid_at) has been added as request body parameter to [`import_invoice`](https://apidocs.chargebee.com/docs/api/invoices/import-invoice) in [`Invoice`](https://apidocs.chargebee.com/docs/api/invoices).
|
|
94
|
+
- [`discounts_to_add.quantity`](https://apidocs.chargebee.com/docs/api/ramps/create-a-ramp#discounts_to_add_quantity) has been added as request body parameter to [`create_a_ramp`](https://apidocs.chargebee.com/docs/api/ramps/create-a-ramp) in [`Ramp`](https://apidocs.chargebee.com/docs/api/ramps).
|
|
95
|
+
- [`discounts_to_add.quantity`](https://apidocs.chargebee.com/docs/api/ramps/update-a-subscription-ramp#discounts_to_add_quantity) has been added as request body parameter to [`update_a_subscription_ramp`](https://apidocs.chargebee.com/docs/api/ramps/update-a-subscription-ramp) in [`Ramp`](https://apidocs.chargebee.com/docs/api/ramps).
|
|
96
|
+
- [`customer.email`](https://apidocs.chargebee.com/docs/api/recorded_purchases/record-a-purchase#customer_email) has been added as request body parameter to [`record_a_purchase`](https://apidocs.chargebee.com/docs/api/recorded_purchases/record-a-purchase) in [`RecordedPurchase`](https://apidocs.chargebee.com/docs/api/recorded_purchases).
|
|
97
|
+
- [`customer.first_name`](https://apidocs.chargebee.com/docs/api/recorded_purchases/record-a-purchase#customer_first_name) has been added as request body parameter to [`record_a_purchase`](https://apidocs.chargebee.com/docs/api/recorded_purchases/record-a-purchase) in [`RecordedPurchase`](https://apidocs.chargebee.com/docs/api/recorded_purchases).
|
|
98
|
+
- [`customer.last_name`](https://apidocs.chargebee.com/docs/api/recorded_purchases/record-a-purchase#customer_last_name) has been added as request body parameter to [`record_a_purchase`](https://apidocs.chargebee.com/docs/api/recorded_purchases/record-a-purchase) in [`RecordedPurchase`](https://apidocs.chargebee.com/docs/api/recorded_purchases).
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
### Parameter Updates:
|
|
102
|
+
- [`metered_feature_id`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert#metered_feature_id) has been changed from required to optional in [`create_an_alert`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert) of [`Alert`](https://apidocs.chargebee.com/docs/api/alerts).
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
### New Events:
|
|
106
|
+
- [`payment_source_business_entity_changed`](https://apidocs.chargebee.com/docs/api/events/webhook/payment_source_business_entity_changed) has been added.
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
### Deleted Attributes:
|
|
110
|
+
- `start_balance` has been removed from [`LedgerOperation`](https://apidocs.chargebee.com/docs/api/ledger_operations).
|
|
111
|
+
- `end_balance` has been removed from [`LedgerOperation`](https://apidocs.chargebee.com/docs/api/ledger_operations).
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
### New Enums:
|
|
115
|
+
- `real_time_payments` has been added as a new value enum `DunningType`.
|
|
116
|
+
- `payment_source_business_entity_changed` has been added as a new value enum `EventType`.
|
|
117
|
+
- `paynow`, `bizum`, and `promptpay` have been added as new values enum `PaymentMethod`.
|
|
118
|
+
- `paynow`, `bizum`, and `promptpay` have been added as new values enum `PaymentMethodType`.
|
|
119
|
+
- `active`, `archived`, and `deleted` have been added as new values enum `Status`.
|
|
120
|
+
- `zero_rated`, `region_non_taxable`, `product_exempt`, `high_value_physical_goods`, `zero_value_item`, and `tax_not_configured_external_provider` have been added as new values enum `TaxOverrideReason`.
|
|
121
|
+
- `paynow`, `bizum`, `promptpay`, `simple`, `compound`, and `spend_exceeded` have been added as new values enum `Type`.
|
|
122
|
+
- `success` and `failed` have been added as new values to enum attribute [`status`](https://apidocs.chargebee.com/docs/api/async_responses/async-response-object#status) in [`AsyncResponse`](https://apidocs.chargebee.com/docs/api/async_responses).
|
|
123
|
+
- `number` and `string` have been added as new values to enum attribute [`data_type`](https://apidocs.chargebee.com/docs/api/column_definitions/column-definition-object#data_type) in [`ColumnDefinition`](https://apidocs.chargebee.com/docs/api/column_definitions).
|
|
124
|
+
- `simple` and `compound` have been added as new values to enum attribute [`type`](https://apidocs.chargebee.com/docs/api/meters/meter-object#type) in [`Meter`](https://apidocs.chargebee.com/docs/api/meters).
|
|
125
|
+
- `active`, `archived`, and `deleted` have been added as new values to enum attribute [`status`](https://apidocs.chargebee.com/docs/api/meters/meter-object#status) in [`Meter`](https://apidocs.chargebee.com/docs/api/meters).
|
|
126
|
+
- `paynow`, `bizum`, and `promptpay` have been added as new values to enum attribute [`payment_method_type`](https://apidocs.chargebee.com/docs/api/payment_intents/payment-intent-object#payment_method_type) in [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents).
|
|
127
|
+
- `paynow`, `bizum`, and `promptpay` have been added as new values to enum attribute [`active_payment_attempt.payment_method_type`](https://apidocs.chargebee.com/docs/api/payment_intents/payment-intent-object#active_payment_attempt_payment_method_type) in [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents).
|
|
128
|
+
- `cb_js`, `components_fields`, `checkout_v3`, `paynow_v3`, `portal_v3`, `gift_v3`, `checkout_v4`, `payment_component`, `pc_inapp_v4`, and `pc_fpc_v4` have been added as new values to enum attribute [`payment_intent_metadata.source`](https://apidocs.chargebee.com/docs/api/payment_intents/payment-intent-object#payment_intent_metadata_source) in [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents).
|
|
129
|
+
- `adjusted_term`, `service_period_revision`, `delta`, and `reset` have been added as new values to enum request body parameter `line_items.proration_mode` in [`import_credit_note`](https://apidocs.chargebee.com/docs/api/credit_notes/import-credit-note) of [`CreditNote`](https://apidocs.chargebee.com/docs/api/credit_notes).
|
|
130
|
+
- `true` and `false` have been added as new values to enum query parameter `metered.is` in [`list_features`](https://apidocs.chargebee.com/docs/api/features/list-features) of [`Feature`](https://apidocs.chargebee.com/docs/api/features).
|
|
131
|
+
- `adjusted_term`, `service_period_revision`, `delta`, and `reset` have been added as new values to enum request body parameter `line_items.proration_mode` in [`import_invoice`](https://apidocs.chargebee.com/docs/api/invoices/import-invoice) of [`Invoice`](https://apidocs.chargebee.com/docs/api/invoices).
|
|
132
|
+
- `updated_at`, `name`, `created_at`, and `id` have been added as new values to enum query parameter `sort_by.asc` in [`list_all_available_meters`](https://apidocs.chargebee.com/docs/api/meters/list-all-available-meters) of [`Meter`](https://apidocs.chargebee.com/docs/api/meters).
|
|
133
|
+
- `updated_at`, `name`, `created_at`, and `id` have been added as new values to enum query parameter `sort_by.desc` in [`list_all_available_meters`](https://apidocs.chargebee.com/docs/api/meters/list-all-available-meters) of [`Meter`](https://apidocs.chargebee.com/docs/api/meters).
|
|
134
|
+
- `number` and `string` have been added as new values to enum request body parameter `column_definitions.data_type` in [`create_a_metered_feature`](https://apidocs.chargebee.com/docs/api/metered_features/create-a-metered-feature) of [`MeteredFeature`](https://apidocs.chargebee.com/docs/api/metered_features).
|
|
135
|
+
- `paynow`, `bizum`, and `promptpay` have been added as new values to enum request body parameter `payment_method_type` in [`update_a_payment_intent`](https://apidocs.chargebee.com/docs/api/payment_intents/update-a-payment-intent) of [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents).
|
|
136
|
+
- `paynow`, `bizum`, and `promptpay` have been added as new values to enum request body parameter `payment_method_type` in [`create_a_payment_intent`](https://apidocs.chargebee.com/docs/api/payment_intents/create-a-payment-intent) of [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents).
|
|
137
|
+
- `true` and `false` have been added as new values to enum query parameter `decommissioned.is` in [`list_subscriptions`](https://apidocs.chargebee.com/docs/api/subscriptions/list-subscriptions) of [`Subscription`](https://apidocs.chargebee.com/docs/api/subscriptions).
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
1
141
|
### v3.28.1 (2026-07-16)
|
|
2
142
|
* * *
|
|
3
143
|
### Bug Fixes:
|
package/cjs/chargebee.cjs.js
CHANGED
|
@@ -4,8 +4,8 @@ const createChargebee_js_1 = require("./createChargebee.js");
|
|
|
4
4
|
const FetchClient_js_1 = require("./net/FetchClient.js");
|
|
5
5
|
const handler_js_1 = require("./resources/webhook/handler.js");
|
|
6
6
|
const auth_js_1 = require("./resources/webhook/auth.js");
|
|
7
|
-
const index_js_1 = require("./telemetry/index.js");
|
|
8
7
|
const chargebeeZodValidationError_js_1 = require("./chargebeeZodValidationError.js");
|
|
8
|
+
const index_js_1 = require("./telemetry/index.js");
|
|
9
9
|
const httpClient = new FetchClient_js_1.FetchHttpClient();
|
|
10
10
|
const Chargebee = (0, createChargebee_js_1.CreateChargebee)(httpClient);
|
|
11
11
|
module.exports = Chargebee;
|
package/cjs/environment.js
CHANGED
|
@@ -11,7 +11,7 @@ exports.Environment = {
|
|
|
11
11
|
hostSuffix: '.chargebee.com',
|
|
12
12
|
apiPath: '/api/v2',
|
|
13
13
|
timeout: DEFAULT_TIME_OUT,
|
|
14
|
-
clientVersion: 'v3.
|
|
14
|
+
clientVersion: 'v3.30.0',
|
|
15
15
|
port: DEFAULT_PORT,
|
|
16
16
|
timemachineWaitInMillis: DEFAULT_TIME_MACHINE_WAIT,
|
|
17
17
|
exportWaitInMillis: DEFAULT_EXPORT_WAIT,
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Endpoints = void 0;
|
|
4
4
|
exports.Endpoints = {
|
|
5
|
+
asyncResponseList: [],
|
|
6
|
+
asyncResponse: [],
|
|
5
7
|
subscription: [
|
|
6
8
|
[
|
|
7
9
|
'create',
|
|
@@ -4230,6 +4232,61 @@ exports.Endpoints = {
|
|
|
4230
4232
|
impactedItem: [],
|
|
4231
4233
|
impactedItemPrice: [],
|
|
4232
4234
|
metadata: [],
|
|
4235
|
+
creditUnit: [
|
|
4236
|
+
['list', 'GET', '/credit_units', null, false, null, false, {}, {}],
|
|
4237
|
+
[
|
|
4238
|
+
'create',
|
|
4239
|
+
'POST',
|
|
4240
|
+
'/credit_units',
|
|
4241
|
+
null,
|
|
4242
|
+
false,
|
|
4243
|
+
null,
|
|
4244
|
+
false,
|
|
4245
|
+
{},
|
|
4246
|
+
{
|
|
4247
|
+
isIdempotent: true,
|
|
4248
|
+
},
|
|
4249
|
+
],
|
|
4250
|
+
[
|
|
4251
|
+
'update',
|
|
4252
|
+
'POST',
|
|
4253
|
+
'/credit_units',
|
|
4254
|
+
null,
|
|
4255
|
+
true,
|
|
4256
|
+
null,
|
|
4257
|
+
false,
|
|
4258
|
+
{},
|
|
4259
|
+
{
|
|
4260
|
+
isIdempotent: true,
|
|
4261
|
+
},
|
|
4262
|
+
],
|
|
4263
|
+
[
|
|
4264
|
+
'archive',
|
|
4265
|
+
'POST',
|
|
4266
|
+
'/credit_units',
|
|
4267
|
+
'/archive_command',
|
|
4268
|
+
true,
|
|
4269
|
+
null,
|
|
4270
|
+
false,
|
|
4271
|
+
{},
|
|
4272
|
+
{
|
|
4273
|
+
isIdempotent: true,
|
|
4274
|
+
},
|
|
4275
|
+
],
|
|
4276
|
+
[
|
|
4277
|
+
'reactivate',
|
|
4278
|
+
'POST',
|
|
4279
|
+
'/credit_units',
|
|
4280
|
+
'/reactivate_command',
|
|
4281
|
+
true,
|
|
4282
|
+
null,
|
|
4283
|
+
false,
|
|
4284
|
+
{},
|
|
4285
|
+
{
|
|
4286
|
+
isIdempotent: true,
|
|
4287
|
+
},
|
|
4288
|
+
],
|
|
4289
|
+
],
|
|
4233
4290
|
subscriptionEntitlement: [
|
|
4234
4291
|
[
|
|
4235
4292
|
'subscriptionEntitlementsForSubscription',
|
|
@@ -4800,6 +4857,7 @@ exports.Endpoints = {
|
|
|
4800
4857
|
],
|
|
4801
4858
|
omnichannelOneTimeOrderItem: [],
|
|
4802
4859
|
rule: [['retrieve', 'GET', '/rules', null, true, null, false, {}, {}]],
|
|
4860
|
+
meter: [['list', 'GET', '/meters', null, false, null, false, {}, {}]],
|
|
4803
4861
|
usageEvent: [
|
|
4804
4862
|
[
|
|
4805
4863
|
'create',
|
|
@@ -4828,6 +4886,60 @@ exports.Endpoints = {
|
|
|
4828
4886
|
{},
|
|
4829
4887
|
],
|
|
4830
4888
|
],
|
|
4889
|
+
meteredFeature: [
|
|
4890
|
+
[
|
|
4891
|
+
'create',
|
|
4892
|
+
'POST',
|
|
4893
|
+
'/metered_features',
|
|
4894
|
+
null,
|
|
4895
|
+
false,
|
|
4896
|
+
null,
|
|
4897
|
+
false,
|
|
4898
|
+
{},
|
|
4899
|
+
{
|
|
4900
|
+
isIdempotent: true,
|
|
4901
|
+
},
|
|
4902
|
+
],
|
|
4903
|
+
[
|
|
4904
|
+
'archive',
|
|
4905
|
+
'POST',
|
|
4906
|
+
'/metered_features',
|
|
4907
|
+
'/archive_command',
|
|
4908
|
+
true,
|
|
4909
|
+
null,
|
|
4910
|
+
false,
|
|
4911
|
+
{},
|
|
4912
|
+
{
|
|
4913
|
+
isIdempotent: true,
|
|
4914
|
+
},
|
|
4915
|
+
],
|
|
4916
|
+
[
|
|
4917
|
+
'reactivate',
|
|
4918
|
+
'POST',
|
|
4919
|
+
'/metered_features',
|
|
4920
|
+
'/reactivate_command',
|
|
4921
|
+
true,
|
|
4922
|
+
null,
|
|
4923
|
+
false,
|
|
4924
|
+
{},
|
|
4925
|
+
{
|
|
4926
|
+
isIdempotent: true,
|
|
4927
|
+
},
|
|
4928
|
+
],
|
|
4929
|
+
[
|
|
4930
|
+
'delete',
|
|
4931
|
+
'POST',
|
|
4932
|
+
'/metered_features',
|
|
4933
|
+
'/delete',
|
|
4934
|
+
true,
|
|
4935
|
+
null,
|
|
4936
|
+
false,
|
|
4937
|
+
{},
|
|
4938
|
+
{
|
|
4939
|
+
isIdempotent: true,
|
|
4940
|
+
},
|
|
4941
|
+
],
|
|
4942
|
+
],
|
|
4831
4943
|
usageFile: [
|
|
4832
4944
|
[
|
|
4833
4945
|
'uploadUrl',
|
|
@@ -5142,6 +5254,19 @@ exports.Endpoints = {
|
|
|
5142
5254
|
},
|
|
5143
5255
|
{},
|
|
5144
5256
|
],
|
|
5257
|
+
[
|
|
5258
|
+
'allocate',
|
|
5259
|
+
'POST',
|
|
5260
|
+
'/ledger_operations',
|
|
5261
|
+
'/allocate',
|
|
5262
|
+
false,
|
|
5263
|
+
null,
|
|
5264
|
+
true,
|
|
5265
|
+
{
|
|
5266
|
+
metadata: 0,
|
|
5267
|
+
},
|
|
5268
|
+
{},
|
|
5269
|
+
],
|
|
5145
5270
|
],
|
|
5146
5271
|
grantBlock: [
|
|
5147
5272
|
[
|
|
@@ -5156,6 +5281,7 @@ exports.Endpoints = {
|
|
|
5156
5281
|
{},
|
|
5157
5282
|
],
|
|
5158
5283
|
],
|
|
5284
|
+
ledgerEntry: [],
|
|
5159
5285
|
promotionalGrant: [
|
|
5160
5286
|
[
|
|
5161
5287
|
'promotionalGrants',
|
|
@@ -69,6 +69,8 @@ var WebhookEventType;
|
|
|
69
69
|
WebhookEventType["GiftScheduled"] = "gift_scheduled";
|
|
70
70
|
WebhookEventType["GiftUnclaimed"] = "gift_unclaimed";
|
|
71
71
|
WebhookEventType["GiftUpdated"] = "gift_updated";
|
|
72
|
+
WebhookEventType["GrantBlocksCreated"] = "grant_blocks_created";
|
|
73
|
+
WebhookEventType["GrantBlocksUpdated"] = "grant_blocks_updated";
|
|
72
74
|
WebhookEventType["HierarchyCreated"] = "hierarchy_created";
|
|
73
75
|
WebhookEventType["HierarchyDeleted"] = "hierarchy_deleted";
|
|
74
76
|
WebhookEventType["InvoiceDeleted"] = "invoice_deleted";
|
|
@@ -88,6 +90,8 @@ var WebhookEventType;
|
|
|
88
90
|
WebhookEventType["ItemPriceEntitlementsUpdated"] = "item_price_entitlements_updated";
|
|
89
91
|
WebhookEventType["ItemPriceUpdated"] = "item_price_updated";
|
|
90
92
|
WebhookEventType["ItemUpdated"] = "item_updated";
|
|
93
|
+
WebhookEventType["LedgerAccountBalanceUpdated"] = "ledger_account_balance_updated";
|
|
94
|
+
WebhookEventType["LedgerUpdated"] = "ledger_updated";
|
|
91
95
|
WebhookEventType["MrrUpdated"] = "mrr_updated";
|
|
92
96
|
WebhookEventType["NetdPaymentDueReminder"] = "netd_payment_due_reminder";
|
|
93
97
|
WebhookEventType["OmnichannelOneTimeOrderCreated"] = "omnichannel_one_time_order_created";
|
|
@@ -139,6 +143,7 @@ var WebhookEventType;
|
|
|
139
143
|
WebhookEventType["PaymentSchedulesCreated"] = "payment_schedules_created";
|
|
140
144
|
WebhookEventType["PaymentSchedulesUpdated"] = "payment_schedules_updated";
|
|
141
145
|
WebhookEventType["PaymentSourceAdded"] = "payment_source_added";
|
|
146
|
+
WebhookEventType["PaymentSourceBusinessEntityChanged"] = "payment_source_business_entity_changed";
|
|
142
147
|
WebhookEventType["PaymentSourceDeleted"] = "payment_source_deleted";
|
|
143
148
|
WebhookEventType["PaymentSourceExpired"] = "payment_source_expired";
|
|
144
149
|
WebhookEventType["PaymentSourceExpiring"] = "payment_source_expiring";
|
|
@@ -7,7 +7,7 @@ exports.ApplicationAlertsforsubscriptionAlertBodySchema = exports.UpdateAlertBod
|
|
|
7
7
|
const zod_1 = require("zod");
|
|
8
8
|
//Alert.create
|
|
9
9
|
const CreateAlertThresholdSchema = zod_1.z.object({
|
|
10
|
-
mode: zod_1.z.enum(['absolute', 'percentage']),
|
|
10
|
+
mode: zod_1.z.enum(['absolute', 'percentage']).optional(),
|
|
11
11
|
value: zod_1.z.number(),
|
|
12
12
|
});
|
|
13
13
|
const CreateAlertFilterConditionsSchema = zod_1.z.object({
|
|
@@ -16,10 +16,12 @@ const CreateAlertFilterConditionsSchema = zod_1.z.object({
|
|
|
16
16
|
value: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
17
17
|
});
|
|
18
18
|
const CreateAlertBodySchema = zod_1.z.looseObject({
|
|
19
|
-
type: zod_1.z.enum(['usage_exceeded']),
|
|
19
|
+
type: zod_1.z.enum(['usage_exceeded', 'spend_exceeded', 'credit_balance_dropped']),
|
|
20
20
|
name: zod_1.z.string().max(50),
|
|
21
21
|
description: zod_1.z.string().max(65000).optional(),
|
|
22
|
-
metered_feature_id: zod_1.z.string().max(50),
|
|
22
|
+
metered_feature_id: zod_1.z.string().max(50).optional(),
|
|
23
|
+
currency_code: zod_1.z.string().max(3).optional(),
|
|
24
|
+
unit_id: zod_1.z.string().max(50).optional(),
|
|
23
25
|
subscription_id: zod_1.z.string().max(50).optional(),
|
|
24
26
|
meta: zod_1.z.string().max(65000).optional(),
|
|
25
27
|
threshold: CreateAlertThresholdSchema.optional(),
|
|
@@ -31,7 +33,9 @@ const ListAlertIdSchema = zod_1.z.object({
|
|
|
31
33
|
in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
32
34
|
});
|
|
33
35
|
const ListAlertTypeSchema = zod_1.z.object({
|
|
34
|
-
is: zod_1.z
|
|
36
|
+
is: zod_1.z
|
|
37
|
+
.enum(['usage_exceeded', 'spend_exceeded', 'credit_balance_dropped'])
|
|
38
|
+
.optional(),
|
|
35
39
|
});
|
|
36
40
|
const ListAlertSubscriptionIdSchema = zod_1.z.object({
|
|
37
41
|
is: zod_1.z.string().min(1).optional(),
|
|
@@ -63,7 +67,9 @@ const ApplicationAlertsforsubscriptionAlertStatusSchema = zod_1.z.object({
|
|
|
63
67
|
is: zod_1.z.enum(['enabled', 'disabled']).optional(),
|
|
64
68
|
});
|
|
65
69
|
const ApplicationAlertsforsubscriptionAlertTypeSchema = zod_1.z.object({
|
|
66
|
-
is: zod_1.z
|
|
70
|
+
is: zod_1.z
|
|
71
|
+
.enum(['usage_exceeded', 'spend_exceeded', 'credit_balance_dropped'])
|
|
72
|
+
.optional(),
|
|
67
73
|
});
|
|
68
74
|
const ApplicationAlertsforsubscriptionAlertBodySchema = zod_1.z.looseObject({
|
|
69
75
|
limit: zod_1.z.number().int().min(1).max(100).optional(),
|
|
@@ -259,8 +259,8 @@ const ListCouponCurrencyCodeSchema = zod_1.z.object({
|
|
|
259
259
|
not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
260
260
|
});
|
|
261
261
|
const ListCouponApplicableItemPriceIdsSchema = zod_1.z.object({
|
|
262
|
-
is: zod_1.z.string().min(1).optional(),
|
|
263
262
|
in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
263
|
+
is: zod_1.z.string().min(1).optional(),
|
|
264
264
|
});
|
|
265
265
|
const ListCouponBodySchema = zod_1.z.looseObject({
|
|
266
266
|
limit: zod_1.z.number().int().min(1).max(100).optional(),
|
|
@@ -95,6 +95,10 @@ const RecordRefundCreditNoteTransactionSchema = zod_1.z.object({
|
|
|
95
95
|
'app_store',
|
|
96
96
|
'play_store',
|
|
97
97
|
'custom',
|
|
98
|
+
'dana',
|
|
99
|
+
'touch_n_go',
|
|
100
|
+
'tamara',
|
|
101
|
+
'qpay',
|
|
98
102
|
]),
|
|
99
103
|
reference_number: zod_1.z.string().max(100).optional(),
|
|
100
104
|
custom_payment_method_id: zod_1.z.string().max(50).optional(),
|
|
@@ -404,6 +408,11 @@ const ImportCreditNoteCreditNoteLineItemsSchema = zod_1.z.object({
|
|
|
404
408
|
tax9_amount: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
405
409
|
tax10_name: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
406
410
|
tax10_amount: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
411
|
+
proration_mode: zod_1.z
|
|
412
|
+
.array(zod_1.z
|
|
413
|
+
.enum(['reset', 'delta', 'service_period_revision', 'adjusted_term'])
|
|
414
|
+
.optional())
|
|
415
|
+
.optional(),
|
|
407
416
|
});
|
|
408
417
|
const ImportCreditNoteCreditNoteLineItemTiersSchema = zod_1.z.object({
|
|
409
418
|
line_item_id: zod_1.z.array(zod_1.z.string().max(40).optional()),
|
|
@@ -470,6 +479,10 @@ const ImportCreditNoteCreditNoteLinkedRefundsSchema = zod_1.z.object({
|
|
|
470
479
|
'app_store',
|
|
471
480
|
'play_store',
|
|
472
481
|
'custom',
|
|
482
|
+
'dana',
|
|
483
|
+
'touch_n_go',
|
|
484
|
+
'tamara',
|
|
485
|
+
'qpay',
|
|
473
486
|
])
|
|
474
487
|
.optional()),
|
|
475
488
|
date: zod_1.z.array(zod_1.z.number().int().optional()),
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Generated Zod schemas: CreditUnit
|
|
3
|
+
// Actions: list, create, update
|
|
4
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.UpdateCreditUnitBodySchema = exports.CreateCreditUnitBodySchema = exports.ListCreditUnitBodySchema = void 0;
|
|
7
|
+
const zod_1 = require("zod");
|
|
8
|
+
//CreditUnit.list
|
|
9
|
+
const ListCreditUnitStatusSchema = zod_1.z.object({
|
|
10
|
+
in: zod_1.z.enum(['active', 'archived']).optional(),
|
|
11
|
+
is: zod_1.z.enum(['active', 'archived']).optional(),
|
|
12
|
+
});
|
|
13
|
+
const ListCreditUnitIdSchema = zod_1.z.object({
|
|
14
|
+
in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
15
|
+
is: zod_1.z.string().min(1).optional(),
|
|
16
|
+
});
|
|
17
|
+
const ListCreditUnitBodySchema = zod_1.z.looseObject({
|
|
18
|
+
limit: zod_1.z.number().int().min(1).max(100).optional(),
|
|
19
|
+
offset: zod_1.z.string().max(1000).optional(),
|
|
20
|
+
status: ListCreditUnitStatusSchema.optional(),
|
|
21
|
+
id: ListCreditUnitIdSchema.optional(),
|
|
22
|
+
});
|
|
23
|
+
exports.ListCreditUnitBodySchema = ListCreditUnitBodySchema;
|
|
24
|
+
//CreditUnit.create
|
|
25
|
+
const CreateCreditUnitBodySchema = zod_1.z.looseObject({
|
|
26
|
+
id: zod_1.z.string().max(50),
|
|
27
|
+
name: zod_1.z.string().max(50),
|
|
28
|
+
is_unlimited: zod_1.z.boolean(),
|
|
29
|
+
overdraft_amount: zod_1.z.string().max(50).optional(),
|
|
30
|
+
external_name: zod_1.z.string().max(50).optional(),
|
|
31
|
+
});
|
|
32
|
+
exports.CreateCreditUnitBodySchema = CreateCreditUnitBodySchema;
|
|
33
|
+
//CreditUnit.update
|
|
34
|
+
const UpdateCreditUnitBodySchema = zod_1.z.looseObject({
|
|
35
|
+
name: zod_1.z.string().max(50).optional(),
|
|
36
|
+
external_name: zod_1.z.string().max(50).optional(),
|
|
37
|
+
});
|
|
38
|
+
exports.UpdateCreditUnitBodySchema = UpdateCreditUnitBodySchema;
|
|
@@ -165,6 +165,13 @@ const CreateCustomerPaymentMethodSchema = zod_1.z.object({
|
|
|
165
165
|
'paypay',
|
|
166
166
|
'gcash',
|
|
167
167
|
'south_korean_cards',
|
|
168
|
+
'paynow',
|
|
169
|
+
'bizum',
|
|
170
|
+
'promptpay',
|
|
171
|
+
'dana',
|
|
172
|
+
'touch_n_go',
|
|
173
|
+
'tamara',
|
|
174
|
+
'qpay',
|
|
168
175
|
])
|
|
169
176
|
.optional(),
|
|
170
177
|
gateway: zod_1.z
|
|
@@ -287,6 +294,13 @@ const CreateCustomerPaymentIntentSchema = zod_1.z.object({
|
|
|
287
294
|
'paypay',
|
|
288
295
|
'gcash',
|
|
289
296
|
'south_korean_cards',
|
|
297
|
+
'paynow',
|
|
298
|
+
'bizum',
|
|
299
|
+
'promptpay',
|
|
300
|
+
'dana',
|
|
301
|
+
'touch_n_go',
|
|
302
|
+
'tamara',
|
|
303
|
+
'qpay',
|
|
290
304
|
])
|
|
291
305
|
.optional(),
|
|
292
306
|
reference_id: zod_1.z.string().max(65000).optional(),
|
|
@@ -706,6 +720,13 @@ const UpdatePaymentMethodCustomerPaymentMethodSchema = zod_1.z.object({
|
|
|
706
720
|
'paypay',
|
|
707
721
|
'gcash',
|
|
708
722
|
'south_korean_cards',
|
|
723
|
+
'paynow',
|
|
724
|
+
'bizum',
|
|
725
|
+
'promptpay',
|
|
726
|
+
'dana',
|
|
727
|
+
'touch_n_go',
|
|
728
|
+
'tamara',
|
|
729
|
+
'qpay',
|
|
709
730
|
]),
|
|
710
731
|
gateway: zod_1.z
|
|
711
732
|
.enum([
|
|
@@ -926,6 +947,10 @@ const RecordExcessPaymentCustomerTransactionSchema = zod_1.z.object({
|
|
|
926
947
|
'app_store',
|
|
927
948
|
'play_store',
|
|
928
949
|
'custom',
|
|
950
|
+
'dana',
|
|
951
|
+
'touch_n_go',
|
|
952
|
+
'tamara',
|
|
953
|
+
'qpay',
|
|
929
954
|
]),
|
|
930
955
|
reference_number: zod_1.z.string().max(100).optional(),
|
|
931
956
|
custom_payment_method_id: zod_1.z.string().max(50).optional(),
|
|
@@ -987,6 +1012,13 @@ const CollectPaymentCustomerPaymentMethodSchema = zod_1.z.object({
|
|
|
987
1012
|
'paypay',
|
|
988
1013
|
'gcash',
|
|
989
1014
|
'south_korean_cards',
|
|
1015
|
+
'paynow',
|
|
1016
|
+
'bizum',
|
|
1017
|
+
'promptpay',
|
|
1018
|
+
'dana',
|
|
1019
|
+
'touch_n_go',
|
|
1020
|
+
'tamara',
|
|
1021
|
+
'qpay',
|
|
990
1022
|
])
|
|
991
1023
|
.optional(),
|
|
992
1024
|
gateway_account_id: zod_1.z.string().max(50).optional(),
|
|
@@ -1065,6 +1097,13 @@ const CollectPaymentCustomerPaymentIntentSchema = zod_1.z.object({
|
|
|
1065
1097
|
'paypay',
|
|
1066
1098
|
'gcash',
|
|
1067
1099
|
'south_korean_cards',
|
|
1100
|
+
'paynow',
|
|
1101
|
+
'bizum',
|
|
1102
|
+
'promptpay',
|
|
1103
|
+
'dana',
|
|
1104
|
+
'touch_n_go',
|
|
1105
|
+
'tamara',
|
|
1106
|
+
'qpay',
|
|
1068
1107
|
])
|
|
1069
1108
|
.optional(),
|
|
1070
1109
|
gw_payment_method_id: zod_1.z.string().max(65000).optional(),
|
|
@@ -7,20 +7,20 @@ exports.CreateEntitlementBodySchema = exports.ListEntitlementBodySchema = void 0
|
|
|
7
7
|
const zod_1 = require("zod");
|
|
8
8
|
//Entitlement.list
|
|
9
9
|
const ListEntitlementFeatureIdSchema = zod_1.z.object({
|
|
10
|
-
is: zod_1.z.string().min(1).optional(),
|
|
11
10
|
in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
11
|
+
is: zod_1.z.string().min(1).optional(),
|
|
12
12
|
});
|
|
13
13
|
const ListEntitlementEntityTypeSchema = zod_1.z.object({
|
|
14
|
-
|
|
14
|
+
in: zod_1.z
|
|
15
15
|
.enum(['plan', 'addon', 'charge', 'plan_price', 'addon_price'])
|
|
16
16
|
.optional(),
|
|
17
|
-
|
|
17
|
+
is: zod_1.z
|
|
18
18
|
.enum(['plan', 'addon', 'charge', 'plan_price', 'addon_price'])
|
|
19
19
|
.optional(),
|
|
20
20
|
});
|
|
21
21
|
const ListEntitlementEntityIdSchema = zod_1.z.object({
|
|
22
|
-
is: zod_1.z.string().min(1).optional(),
|
|
23
22
|
in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
23
|
+
is: zod_1.z.string().min(1).optional(),
|
|
24
24
|
});
|
|
25
25
|
const ListEntitlementBodySchema = zod_1.z.looseObject({
|
|
26
26
|
limit: zod_1.z.number().int().min(1).max(100).optional(),
|