diff --git a/CHANGELOG.md b/CHANGELOG.md index 9863325..d986499 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,61 @@ +### v3.30.0 (2026-07-30) +* * * +### New Resources: +- [`CreditUnit`](https://apidocs.chargebee.com/docs/api/credit_units) has been added. +- [`LedgerEntry`](https://apidocs.chargebee.com/docs/api/ledger_entries) has been added. + + +### New Actions: +- [`allocate`](https://apidocs.chargebee.com/docs/api/ledger_operations/allocate) has been added to [`LedgerOperation`](https://apidocs.chargebee.com/docs/api/ledger_operations). + + +### New Attributes: +- [`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). +- [`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). +- [`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). +- [`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). +- [`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). +- [`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). + + +### New Parameters: +- [`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). +- [`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). +- [`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). +- [`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). +- [`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). +- [`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). +- [`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). +- [`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). +- [`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). + + +### New Events: +- [`grant_blocks_created`](https://apidocs.chargebee.com/docs/api/events/webhook/grant_blocks_created) has been added. +- [`ledger_updated`](https://apidocs.chargebee.com/docs/api/events/webhook/ledger_updated) has been added. +- [`ledger_account_balance_updated`](https://apidocs.chargebee.com/docs/api/events/webhook/ledger_account_balance_updated) has been added. +- [`grant_blocks_updated`](https://apidocs.chargebee.com/docs/api/events/webhook/grant_blocks_updated) has been added. + + +### New Enums: +- `ledger_account_balance_updated`, `grant_blocks_created`, `grant_blocks_updated`, and `ledger_updated` have been added as new values enum `EventType`. +- `dana`, `touch_n_go`, `tamara`, and `qpay` have been added as new values enum `PaymentMethod`. +- `dana`, `touch_n_go`, `tamara`, and `qpay` have been added as new values enum `PaymentMethodType`. +- `dana`, `touch_n_go`, `tamara`, `qpay`, `credit_balance_dropped`, `credit`, `debit`, `hold`, and `unhold` have been added as new values enum `Type`. +- `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). +- `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). +- `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). +- `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). +- `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). +- `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). +- `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). +- `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). +- `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). +- `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). +- `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). + + + ### v3.29.0 (2026-07-21) * * * ### New Resources: diff --git a/VERSION b/VERSION index c7c9773..1cfe511 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.29.0 +3.30.0 diff --git a/package-lock.json b/package-lock.json index 7895e17..20597dc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "chargebee", - "version": "3.29.0", + "version": "3.30.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "chargebee", - "version": "3.29.0", + "version": "3.30.0", "dependencies": { "zod": "^4.3.6" }, diff --git a/package.json b/package.json index 410aa53..153d29a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "chargebee", - "version": "3.29.0", + "version": "3.30.0", "description": "A library for integrating with Chargebee.", "scripts": { "prepack": "npm install && npm run build", diff --git a/src/environment.ts b/src/environment.ts index 51c3e29..5082734 100644 --- a/src/environment.ts +++ b/src/environment.ts @@ -9,7 +9,7 @@ export const Environment = { hostSuffix: '.chargebee.com', apiPath: '/api/v2', timeout: DEFAULT_TIME_OUT, - clientVersion: 'v3.29.0', + clientVersion: 'v3.30.0', port: DEFAULT_PORT, timemachineWaitInMillis: DEFAULT_TIME_MACHINE_WAIT, exportWaitInMillis: DEFAULT_EXPORT_WAIT, diff --git a/src/resources/api_endpoints.ts b/src/resources/api_endpoints.ts index c8eafe1..a208c64 100644 --- a/src/resources/api_endpoints.ts +++ b/src/resources/api_endpoints.ts @@ -79,6 +79,7 @@ interface Endpoints { impactedItem: EndpointTuple[]; impactedItemPrice: EndpointTuple[]; metadata: EndpointTuple[]; + creditUnit: EndpointTuple[]; subscriptionEntitlement: EndpointTuple[]; customerEntitlement: EndpointTuple[]; itemEntitlement: EndpointTuple[]; @@ -118,6 +119,7 @@ interface Endpoints { ledgerAccountBalance: EndpointTuple[]; ledgerOperation: EndpointTuple[]; grantBlock: EndpointTuple[]; + ledgerEntry: EndpointTuple[]; promotionalGrant: EndpointTuple[]; impactedCustomer: EndpointTuple[]; subscriptionEntitlementsUpdatedDetail: EndpointTuple[]; @@ -4354,6 +4356,61 @@ export const Endpoints: Endpoints = { impactedItem: [], impactedItemPrice: [], metadata: [], + creditUnit: [ + ['list', 'GET', '/credit_units', null, false, null, false, {}, {}], + [ + 'create', + 'POST', + '/credit_units', + null, + false, + null, + false, + {}, + { + isIdempotent: true, + }, + ], + [ + 'update', + 'POST', + '/credit_units', + null, + true, + null, + false, + {}, + { + isIdempotent: true, + }, + ], + [ + 'archive', + 'POST', + '/credit_units', + '/archive_command', + true, + null, + false, + {}, + { + isIdempotent: true, + }, + ], + [ + 'reactivate', + 'POST', + '/credit_units', + '/reactivate_command', + true, + null, + false, + {}, + { + isIdempotent: true, + }, + ], + ], subscriptionEntitlement: [ [ 'subscriptionEntitlementsForSubscription', @@ -5321,6 +5378,19 @@ export const Endpoints: Endpoints = { }, {}, ], + [ + 'allocate', + 'POST', + '/ledger_operations', + '/allocate', + false, + null, + true, + { + metadata: 0, + }, + {}, + ], ], grantBlock: [ [ @@ -5335,6 +5405,7 @@ export const Endpoints: Endpoints = { {}, ], ], + ledgerEntry: [], promotionalGrant: [ [ 'promotionalGrants', diff --git a/src/resources/webhook/content.ts b/src/resources/webhook/content.ts index bfbe5b4..253ae00 100644 --- a/src/resources/webhook/content.ts +++ b/src/resources/webhook/content.ts @@ -324,6 +324,14 @@ export interface GiftUpdatedContent { Gift: import('chargebee').Gift; } +export interface GrantBlocksCreatedContent { + GrantBlock: import('chargebee').GrantBlock[]; +} + +export interface GrantBlocksUpdatedContent { + GrantBlock: import('chargebee').GrantBlock[]; +} + export interface HierarchyCreatedContent { Customer: import('chargebee').Customer; } @@ -424,6 +432,20 @@ export interface ItemUpdatedContent { Item: import('chargebee').Item; } +export interface LedgerAccountBalanceUpdatedContent { + LedgerAccountBalance: import('chargebee').LedgerAccountBalance; +} + +export interface LedgerUpdatedContent { + LedgerOperation: import('chargebee').LedgerOperation[]; + + LedgerAccountBalance: import('chargebee').LedgerAccountBalance; + + GrantBlock: import('chargebee').GrantBlock[]; + + LedgerEntry: import('chargebee').LedgerEntry[]; +} + export interface MrrUpdatedContent { Subscription: import('chargebee').Subscription; } @@ -1589,6 +1611,10 @@ export type WebhookContentMap = { [WebhookEventType.GiftUpdated]: GiftUpdatedContent; + [WebhookEventType.GrantBlocksCreated]: GrantBlocksCreatedContent; + + [WebhookEventType.GrantBlocksUpdated]: GrantBlocksUpdatedContent; + [WebhookEventType.HierarchyCreated]: HierarchyCreatedContent; [WebhookEventType.HierarchyDeleted]: HierarchyDeletedContent; @@ -1627,6 +1653,10 @@ export type WebhookContentMap = { [WebhookEventType.ItemUpdated]: ItemUpdatedContent; + [WebhookEventType.LedgerAccountBalanceUpdated]: LedgerAccountBalanceUpdatedContent; + + [WebhookEventType.LedgerUpdated]: LedgerUpdatedContent; + [WebhookEventType.MrrUpdated]: MrrUpdatedContent; [WebhookEventType.NetdPaymentDueReminder]: NetdPaymentDueReminderContent; diff --git a/src/resources/webhook/eventType.ts b/src/resources/webhook/eventType.ts index 5eb6461..ed0d0ac 100644 --- a/src/resources/webhook/eventType.ts +++ b/src/resources/webhook/eventType.ts @@ -127,6 +127,10 @@ export enum WebhookEventType { GiftUpdated = 'gift_updated', + GrantBlocksCreated = 'grant_blocks_created', + + GrantBlocksUpdated = 'grant_blocks_updated', + HierarchyCreated = 'hierarchy_created', HierarchyDeleted = 'hierarchy_deleted', @@ -165,6 +169,10 @@ export enum WebhookEventType { ItemUpdated = 'item_updated', + LedgerAccountBalanceUpdated = 'ledger_account_balance_updated', + + LedgerUpdated = 'ledger_updated', + MrrUpdated = 'mrr_updated', NetdPaymentDueReminder = 'netd_payment_due_reminder', diff --git a/src/schema/alert.schema.ts b/src/schema/alert.schema.ts index e641d74..82ffc1f 100644 --- a/src/schema/alert.schema.ts +++ b/src/schema/alert.schema.ts @@ -16,11 +16,12 @@ const CreateAlertFilterConditionsSchema = z.object({ value: z.array(z.string().max(50).optional()).optional(), }); const CreateAlertBodySchema = z.looseObject({ - type: z.enum(['usage_exceeded', 'spend_exceeded']), + type: z.enum(['usage_exceeded', 'spend_exceeded', 'credit_balance_dropped']), name: z.string().max(50), description: z.string().max(65000).optional(), metered_feature_id: z.string().max(50).optional(), currency_code: z.string().max(3).optional(), + unit_id: z.string().max(50).optional(), subscription_id: z.string().max(50).optional(), meta: z.string().max(65000).optional(), threshold: CreateAlertThresholdSchema.optional(), @@ -35,7 +36,9 @@ const ListAlertIdSchema = z.object({ in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(), }); const ListAlertTypeSchema = z.object({ - is: z.enum(['usage_exceeded', 'spend_exceeded']).optional(), + is: z + .enum(['usage_exceeded', 'spend_exceeded', 'credit_balance_dropped']) + .optional(), }); const ListAlertSubscriptionIdSchema = z.object({ is: z.string().min(1).optional(), @@ -73,7 +76,9 @@ const ApplicationAlertsforsubscriptionAlertStatusSchema = z.object({ is: z.enum(['enabled', 'disabled']).optional(), }); const ApplicationAlertsforsubscriptionAlertTypeSchema = z.object({ - is: z.enum(['usage_exceeded', 'spend_exceeded']).optional(), + is: z + .enum(['usage_exceeded', 'spend_exceeded', 'credit_balance_dropped']) + .optional(), }); const ApplicationAlertsforsubscriptionAlertBodySchema = z.looseObject({ limit: z.number().int().min(1).max(100).optional(), diff --git a/src/schema/coupon.schema.ts b/src/schema/coupon.schema.ts index 607c5ef..21f1506 100644 --- a/src/schema/coupon.schema.ts +++ b/src/schema/coupon.schema.ts @@ -282,8 +282,8 @@ const ListCouponCurrencyCodeSchema = z.object({ not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(), }); const ListCouponApplicableItemPriceIdsSchema = z.object({ - is: z.string().min(1).optional(), in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(), + is: z.string().min(1).optional(), }); const ListCouponBodySchema = z.looseObject({ limit: z.number().int().min(1).max(100).optional(), diff --git a/src/schema/credit_note.schema.ts b/src/schema/credit_note.schema.ts index 5305fbc..a79c10b 100644 --- a/src/schema/credit_note.schema.ts +++ b/src/schema/credit_note.schema.ts @@ -111,6 +111,10 @@ const RecordRefundCreditNoteTransactionSchema = z.object({ 'app_store', 'play_store', 'custom', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]), reference_number: z.string().max(100).optional(), custom_payment_method_id: z.string().max(50).optional(), @@ -526,6 +530,10 @@ const ImportCreditNoteCreditNoteLinkedRefundsSchema = z.object({ 'app_store', 'play_store', 'custom', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), ), diff --git a/src/schema/credit_unit.schema.ts b/src/schema/credit_unit.schema.ts new file mode 100644 index 0000000..b3fd74a --- /dev/null +++ b/src/schema/credit_unit.schema.ts @@ -0,0 +1,45 @@ +// Generated Zod schemas: CreditUnit +// Actions: list, create, update +// Do not edit manually – regenerate via sdk-generator + +import { z } from 'zod'; + +//CreditUnit.list + +const ListCreditUnitStatusSchema = z.object({ + in: z.enum(['active', 'archived']).optional(), + is: z.enum(['active', 'archived']).optional(), +}); +const ListCreditUnitIdSchema = z.object({ + in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(), + is: z.string().min(1).optional(), +}); +const ListCreditUnitBodySchema = z.looseObject({ + limit: z.number().int().min(1).max(100).optional(), + offset: z.string().max(1000).optional(), + status: ListCreditUnitStatusSchema.optional(), + id: ListCreditUnitIdSchema.optional(), +}); +export { ListCreditUnitBodySchema }; +export type ListCreditUnitBody = z.infer; + +//CreditUnit.create + +const CreateCreditUnitBodySchema = z.looseObject({ + id: z.string().max(50), + name: z.string().max(50), + is_unlimited: z.boolean(), + overdraft_amount: z.string().max(50).optional(), + external_name: z.string().max(50).optional(), +}); +export { CreateCreditUnitBodySchema }; +export type CreateCreditUnitBody = z.infer; + +//CreditUnit.update + +const UpdateCreditUnitBodySchema = z.looseObject({ + name: z.string().max(50).optional(), + external_name: z.string().max(50).optional(), +}); +export { UpdateCreditUnitBodySchema }; +export type UpdateCreditUnitBody = z.infer; diff --git a/src/schema/customer.schema.ts b/src/schema/customer.schema.ts index dfaa1fc..44da0f5 100644 --- a/src/schema/customer.schema.ts +++ b/src/schema/customer.schema.ts @@ -168,6 +168,10 @@ const CreateCustomerPaymentMethodSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), gateway: z @@ -293,6 +297,10 @@ const CreateCustomerPaymentIntentSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), reference_id: z.string().max(65000).optional(), @@ -726,6 +734,10 @@ const UpdatePaymentMethodCustomerPaymentMethodSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]), gateway: z .enum([ @@ -999,6 +1011,10 @@ const RecordExcessPaymentCustomerTransactionSchema = z.object({ 'app_store', 'play_store', 'custom', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]), reference_number: z.string().max(100).optional(), custom_payment_method_id: z.string().max(50).optional(), @@ -1068,6 +1084,10 @@ const CollectPaymentCustomerPaymentMethodSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), gateway_account_id: z.string().max(50).optional(), @@ -1151,6 +1171,10 @@ const CollectPaymentCustomerPaymentIntentSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), gw_payment_method_id: z.string().max(65000).optional(), diff --git a/src/schema/entitlement.schema.ts b/src/schema/entitlement.schema.ts index 88bcd00..f321142 100644 --- a/src/schema/entitlement.schema.ts +++ b/src/schema/entitlement.schema.ts @@ -7,20 +7,20 @@ import { z } from 'zod'; //Entitlement.list const ListEntitlementFeatureIdSchema = z.object({ - is: z.string().min(1).optional(), in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(), + is: z.string().min(1).optional(), }); const ListEntitlementEntityTypeSchema = z.object({ - is: z + in: z .enum(['plan', 'addon', 'charge', 'plan_price', 'addon_price']) .optional(), - in: z + is: z .enum(['plan', 'addon', 'charge', 'plan_price', 'addon_price']) .optional(), }); const ListEntitlementEntityIdSchema = z.object({ - is: z.string().min(1).optional(), in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(), + is: z.string().min(1).optional(), }); const ListEntitlementBodySchema = z.looseObject({ limit: z.number().int().min(1).max(100).optional(), diff --git a/src/schema/estimate.schema.ts b/src/schema/estimate.schema.ts index 0ae041a..63d79bc 100644 --- a/src/schema/estimate.schema.ts +++ b/src/schema/estimate.schema.ts @@ -1156,6 +1156,7 @@ const CancelSubscriptionForItemsEstimateBodySchema = z.looseObject({ ]) .optional(), invoice_date: z.number().int().optional(), + include_cancellation_day_in_billing: z.boolean().optional(), cancel_reason_code: z.string().max(100).optional(), subscription_items: CancelSubscriptionForItemsEstimateSubscriptionItemsSchema.optional(), @@ -1276,6 +1277,10 @@ const GiftSubscriptionEstimatePaymentIntentSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), reference_id: z.string().max(65000).optional(), @@ -1402,6 +1407,10 @@ const GiftSubscriptionForItemsEstimatePaymentIntentSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), reference_id: z.string().max(65000).optional(), diff --git a/src/schema/event.schema.ts b/src/schema/event.schema.ts index e8f98fd..859e480 100644 --- a/src/schema/event.schema.ts +++ b/src/schema/event.schema.ts @@ -293,6 +293,10 @@ const ListEventEventTypeSchema = z.object({ 'alert_status_changed', 'omnichannel_subscription_item_updated', 'omnichannel_subscription_item_recovered', + 'ledger_account_balance_updated', + 'grant_blocks_created', + 'grant_blocks_updated', + 'ledger_updated', ]) .optional(), is_not: z @@ -520,6 +524,10 @@ const ListEventEventTypeSchema = z.object({ 'alert_status_changed', 'omnichannel_subscription_item_updated', 'omnichannel_subscription_item_recovered', + 'ledger_account_balance_updated', + 'grant_blocks_created', + 'grant_blocks_updated', + 'ledger_updated', ]) .optional(), in: z @@ -747,6 +755,10 @@ const ListEventEventTypeSchema = z.object({ 'alert_status_changed', 'omnichannel_subscription_item_updated', 'omnichannel_subscription_item_recovered', + 'ledger_account_balance_updated', + 'grant_blocks_created', + 'grant_blocks_updated', + 'ledger_updated', ]) .optional(), not_in: z @@ -974,6 +986,10 @@ const ListEventEventTypeSchema = z.object({ 'alert_status_changed', 'omnichannel_subscription_item_updated', 'omnichannel_subscription_item_recovered', + 'ledger_account_balance_updated', + 'grant_blocks_created', + 'grant_blocks_updated', + 'ledger_updated', ]) .optional(), }); diff --git a/src/schema/export.schema.ts b/src/schema/export.schema.ts index 8110b61..6ca2c22 100644 --- a/src/schema/export.schema.ts +++ b/src/schema/export.schema.ts @@ -1128,8 +1128,8 @@ const CouponsExportCurrencyCodeSchema = z.object({ not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(), }); const CouponsExportApplicableItemPriceIdsSchema = z.object({ - is: z.string().min(1).optional(), in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(), + is: z.string().min(1).optional(), }); const CouponsExportIdSchema = z.object({ is: z.string().min(1).optional(), @@ -2182,6 +2182,10 @@ const TransactionsExportPaymentMethodSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), is_not: z @@ -2246,6 +2250,10 @@ const TransactionsExportPaymentMethodSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), in: z @@ -2310,6 +2318,10 @@ const TransactionsExportPaymentMethodSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), not_in: z @@ -2374,6 +2386,10 @@ const TransactionsExportPaymentMethodSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), }); @@ -2986,8 +3002,8 @@ export type OrdersExportBody = z.infer; //Export.itemFamilies const ItemFamiliesExportBusinessEntityIdSchema = z.object({ - is_present: z.enum(['true', 'false']).optional(), is: z.string().min(1).optional(), + is_present: z.enum(['true', 'false']).optional(), }); const ItemFamiliesExportIncludeSiteLevelResourcesSchema = z.object({ is: z.enum(['true', 'false']).optional(), @@ -3031,8 +3047,8 @@ export type ItemFamiliesExportBody = z.infer< //Export.items const ItemsExportBusinessEntityIdSchema = z.object({ - is_present: z.enum(['true', 'false']).optional(), is: z.string().min(1).optional(), + is_present: z.enum(['true', 'false']).optional(), }); const ItemsExportIncludeSiteLevelResourcesSchema = z.object({ is: z.enum(['true', 'false']).optional(), @@ -3151,8 +3167,8 @@ const ItemPricesExportCurrencyCodeSchema = z.object({ not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(), }); const ItemPricesExportBusinessEntityIdSchema = z.object({ - is_present: z.enum(['true', 'false']).optional(), is: z.string().min(1).optional(), + is_present: z.enum(['true', 'false']).optional(), }); const ItemPricesExportIncludeSiteLevelResourcesSchema = z.object({ is: z.enum(['true', 'false']).optional(), @@ -3426,8 +3442,8 @@ export type DifferentialPricesExportBody = z.infer< //Export.priceVariants const PriceVariantsExportBusinessEntityIdSchema = z.object({ - is_present: z.enum(['true', 'false']).optional(), is: z.string().min(1).optional(), + is_present: z.enum(['true', 'false']).optional(), }); const PriceVariantsExportIncludeSiteLevelResourcesSchema = z.object({ is: z.enum(['true', 'false']).optional(), diff --git a/src/schema/gift.schema.ts b/src/schema/gift.schema.ts index b9d7d72..32c3b03 100644 --- a/src/schema/gift.schema.ts +++ b/src/schema/gift.schema.ts @@ -73,6 +73,10 @@ const CreateGiftPaymentIntentSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), reference_id: z.string().max(65000).optional(), @@ -193,6 +197,10 @@ const CreateForItemsGiftPaymentIntentSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), reference_id: z.string().max(65000).optional(), diff --git a/src/schema/grant_block.schema.ts b/src/schema/grant_block.schema.ts index 2311ebd..6e27df2 100644 --- a/src/schema/grant_block.schema.ts +++ b/src/schema/grant_block.schema.ts @@ -12,6 +12,9 @@ const ListGrantBlocksGrantBlockSubscriptionIdSchema = z.object({ const ListGrantBlocksGrantBlockUnitIdSchema = z.object({ is: z.string().min(1).optional(), }); +const ListGrantBlocksGrantBlockAccountTypeSchema = z.object({ + is: z.enum(['provisioned', 'overdraft']).optional(), +}); const ListGrantBlocksGrantBlockEffectiveFromSchema = z.object({ after: z.string().regex(RegExp('^\\d{10}$')).optional(), before: z.string().regex(RegExp('^\\d{10}$')).optional(), @@ -39,6 +42,7 @@ const ListGrantBlocksGrantBlockBodySchema = z.looseObject({ offset: z.string().max(1000).optional(), subscription_id: ListGrantBlocksGrantBlockSubscriptionIdSchema, unit_id: ListGrantBlocksGrantBlockUnitIdSchema.optional(), + account_type: ListGrantBlocksGrantBlockAccountTypeSchema.optional(), effective_from: ListGrantBlocksGrantBlockEffectiveFromSchema.optional(), expires_at: ListGrantBlocksGrantBlockExpiresAtSchema.optional(), created_at: ListGrantBlocksGrantBlockCreatedAtSchema.optional(), diff --git a/src/schema/index.ts b/src/schema/index.ts index 2539d3c..b0999f3 100644 --- a/src/schema/index.ts +++ b/src/schema/index.ts @@ -11,6 +11,7 @@ export * from './coupon.schema.js'; export * from './coupon_code.schema.js'; export * from './coupon_set.schema.js'; export * from './credit_note.schema.js'; +export * from './credit_unit.schema.js'; export * from './currency.schema.js'; export * from './customer.schema.js'; export * from './customer_entitlement.schema.js'; diff --git a/src/schema/invoice.schema.ts b/src/schema/invoice.schema.ts index 70eaac3..3d00cfe 100644 --- a/src/schema/invoice.schema.ts +++ b/src/schema/invoice.schema.ts @@ -188,6 +188,10 @@ const CreateInvoicePaymentMethodSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), gateway: z @@ -313,6 +317,10 @@ const CreateInvoicePaymentIntentSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), reference_id: z.string().max(65000).optional(), @@ -582,6 +590,10 @@ const CreateForChargeItemsAndChargesInvoicePaymentMethodSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), gateway: z @@ -708,6 +720,10 @@ const CreateForChargeItemsAndChargesInvoicePaymentIntentSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), reference_id: z.string().max(65000).optional(), @@ -1140,6 +1156,10 @@ const ImportInvoiceInvoicePaymentsSchema = z.object({ 'app_store', 'play_store', 'custom', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), ), @@ -1518,12 +1538,12 @@ export type PdfInvoiceBody = z.infer; //Invoice.listPaymentReferenceNumbers const ListPaymentReferenceNumbersInvoiceIdSchema = z.object({ - is: z.string().min(1).optional(), in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(), + is: z.string().min(1).optional(), }); const ListPaymentReferenceNumbersInvoiceNumberSchema = z.object({ - is: z.string().min(1).optional(), in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(), + is: z.string().min(1).optional(), }); const ListPaymentReferenceNumbersInvoicePaymentReferenceNumberItemSchema = z.object({ @@ -1680,6 +1700,10 @@ const RecordPaymentInvoiceTransactionSchema = z.object({ 'app_store', 'play_store', 'custom', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]), reference_number: z.string().max(100).optional(), custom_payment_method_id: z.string().max(50).optional(), @@ -1764,6 +1788,10 @@ const RecordRefundInvoiceTransactionSchema = z.object({ 'app_store', 'play_store', 'custom', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]), reference_number: z.string().max(100).optional(), custom_payment_method_id: z.string().max(50).optional(), diff --git a/src/schema/item.schema.ts b/src/schema/item.schema.ts index 4db679a..b2ed785 100644 --- a/src/schema/item.schema.ts +++ b/src/schema/item.schema.ts @@ -164,8 +164,8 @@ const ListItemChannelSchema = z.object({ not_in: z.enum(['web', 'app_store', 'play_store']).optional(), }); const ListItemBusinessEntityIdSchema = z.object({ - is_present: z.enum(['true', 'false']).optional(), is: z.string().min(1).optional(), + is_present: z.enum(['true', 'false']).optional(), }); const ListItemIncludeSiteLevelResourcesSchema = z.object({ is: z.enum(['true', 'false']).optional(), diff --git a/src/schema/item_family.schema.ts b/src/schema/item_family.schema.ts index 7cc2c11..bec4cb2 100644 --- a/src/schema/item_family.schema.ts +++ b/src/schema/item_family.schema.ts @@ -36,8 +36,8 @@ const ListItemFamilyUpdatedAtSchema = z.object({ between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(), }); const ListItemFamilyBusinessEntityIdSchema = z.object({ - is_present: z.enum(['true', 'false']).optional(), is: z.string().min(1).optional(), + is_present: z.enum(['true', 'false']).optional(), }); const ListItemFamilyIncludeSiteLevelResourcesSchema = z.object({ is: z.enum(['true', 'false']).optional(), diff --git a/src/schema/item_price.schema.ts b/src/schema/item_price.schema.ts index 9356504..e96efaa 100644 --- a/src/schema/item_price.schema.ts +++ b/src/schema/item_price.schema.ts @@ -262,8 +262,8 @@ const ListItemPriceUpdatedAtSchema = z.object({ between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(), }); const ListItemPriceBusinessEntityIdSchema = z.object({ - is_present: z.enum(['true', 'false']).optional(), is: z.string().min(1).optional(), + is_present: z.enum(['true', 'false']).optional(), }); const ListItemPriceIncludeSiteLevelResourcesSchema = z.object({ is: z.enum(['true', 'false']).optional(), diff --git a/src/schema/ledger_operation.schema.ts b/src/schema/ledger_operation.schema.ts index e4f0e8e..61c9665 100644 --- a/src/schema/ledger_operation.schema.ts +++ b/src/schema/ledger_operation.schema.ts @@ -1,5 +1,5 @@ // Generated Zod schemas: LedgerOperation -// Actions: listLedgerOperations, capture, authorize, captureAuthorization, releaseAuthorization +// Actions: listLedgerOperations, capture, authorize, captureAuthorization, releaseAuthorization, allocate // Do not edit manually – regenerate via sdk-generator import { z } from 'zod'; @@ -19,7 +19,7 @@ const ListLedgerOperationsLedgerOperationCreatedAtSchema = z.object({ between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(), }); const ListLedgerOperationsLedgerOperationTypeSchema = z.object({ - is: z + in: z .enum([ 'allocation', 'capture', @@ -32,7 +32,7 @@ const ListLedgerOperationsLedgerOperationTypeSchema = z.object({ 'adjustment', ]) .optional(), - in: z + is: z .enum([ 'allocation', 'capture', @@ -125,3 +125,18 @@ export { ReleaseAuthorizationLedgerOperationBodySchema }; export type ReleaseAuthorizationLedgerOperationBody = z.infer< typeof ReleaseAuthorizationLedgerOperationBodySchema >; + +//LedgerOperation.allocate + +const AllocateLedgerOperationMetadataSchema = z.looseObject({}); +const AllocateLedgerOperationBodySchema = z.looseObject({ + subscription_id: z.string().max(50), + unit_id: z.string().max(50), + amount: z.string().max(36), + expires_at: z.number().int(), + metadata: AllocateLedgerOperationMetadataSchema.optional(), +}); +export { AllocateLedgerOperationBodySchema }; +export type AllocateLedgerOperationBody = z.infer< + typeof AllocateLedgerOperationBodySchema +>; diff --git a/src/schema/meter.schema.ts b/src/schema/meter.schema.ts index e41f1a6..b9c769d 100644 --- a/src/schema/meter.schema.ts +++ b/src/schema/meter.schema.ts @@ -7,8 +7,8 @@ import { z } from 'zod'; //Meter.list const ListMeterNameSchema = z.object({ - is: z.string().min(1).optional(), starts_with: z.string().min(1).optional(), + is: z.string().min(1).optional(), }); const ListMeterSortBySchema = z.looseObject({ asc: z.enum(['id', 'name', 'created_at', 'updated_at']).optional(), diff --git a/src/schema/payment_intent.schema.ts b/src/schema/payment_intent.schema.ts index cca4942..b544b2b 100644 --- a/src/schema/payment_intent.schema.ts +++ b/src/schema/payment_intent.schema.ts @@ -64,6 +64,10 @@ const CreatePaymentIntentBodySchema = z.looseObject({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), success_url: z.string().max(250).optional(), @@ -130,6 +134,10 @@ const UpdatePaymentIntentBodySchema = z.looseObject({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), success_url: z.string().max(250).optional(), diff --git a/src/schema/payment_source.schema.ts b/src/schema/payment_source.schema.ts index 8c93dbf..1b951cc 100644 --- a/src/schema/payment_source.schema.ts +++ b/src/schema/payment_source.schema.ts @@ -62,6 +62,10 @@ const CreateUsingTempTokenPaymentSourceBodySchema = z.looseObject({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]), tmp_token: z.string().max(65000), issuing_country: z.string().max(50).optional(), @@ -177,6 +181,10 @@ const CreateUsingPermanentTokenPaymentSourceBodySchema = z.looseObject({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]), gateway_account_id: z.string().max(50).optional(), reference_id: z.string().max(200).optional(), @@ -271,6 +279,10 @@ const CreateUsingPaymentIntentPaymentSourcePaymentIntentSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), reference_id: z.string().max(65000).optional(), @@ -499,6 +511,10 @@ const ListPaymentSourceTypeSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), is_not: z @@ -553,6 +569,10 @@ const ListPaymentSourceTypeSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), in: z @@ -607,6 +627,10 @@ const ListPaymentSourceTypeSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), not_in: z @@ -661,6 +685,10 @@ const ListPaymentSourceTypeSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), }); diff --git a/src/schema/price_variant.schema.ts b/src/schema/price_variant.schema.ts index 9194c2f..e3c490a 100644 --- a/src/schema/price_variant.schema.ts +++ b/src/schema/price_variant.schema.ts @@ -78,8 +78,8 @@ const ListPriceVariantCreatedAtSchema = z.object({ between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(), }); const ListPriceVariantBusinessEntityIdSchema = z.object({ - is_present: z.enum(['true', 'false']).optional(), is: z.string().min(1).optional(), + is_present: z.enum(['true', 'false']).optional(), }); const ListPriceVariantIncludeSiteLevelResourcesSchema = z.object({ is: z.enum(['true', 'false']).optional(), diff --git a/src/schema/purchase.schema.ts b/src/schema/purchase.schema.ts index 88ad082..c6b966b 100644 --- a/src/schema/purchase.schema.ts +++ b/src/schema/purchase.schema.ts @@ -72,6 +72,10 @@ const CreatePurchasePaymentIntentSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), reference_id: z.string().max(65000).optional(), diff --git a/src/schema/ramp.schema.ts b/src/schema/ramp.schema.ts index 15f585c..2800618 100644 --- a/src/schema/ramp.schema.ts +++ b/src/schema/ramp.schema.ts @@ -235,12 +235,12 @@ export type UpdateRampBody = z.infer; //Ramp.list const ListRampStatusSchema = z.object({ - is: z.enum(['scheduled', 'succeeded', 'failed', 'draft']).optional(), in: z.enum(['scheduled', 'succeeded', 'failed', 'draft']).optional(), + is: z.enum(['scheduled', 'succeeded', 'failed', 'draft']).optional(), }); const ListRampSubscriptionIdSchema = z.object({ - is: z.string().min(1).optional(), in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(), + is: z.string().min(1).optional(), }); const ListRampEffectiveFromSchema = z.object({ after: z.string().regex(RegExp('^\\d{10}$')).optional(), diff --git a/src/schema/subscription.schema.ts b/src/schema/subscription.schema.ts index 7bdde6c..cc8db35 100644 --- a/src/schema/subscription.schema.ts +++ b/src/schema/subscription.schema.ts @@ -239,6 +239,10 @@ const CreateSubscriptionPaymentMethodSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), gateway: z @@ -365,6 +369,10 @@ const CreateSubscriptionPaymentIntentSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), reference_id: z.string().max(65000).optional(), @@ -609,6 +617,10 @@ const CreateForCustomerSubscriptionPaymentIntentSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), reference_id: z.string().max(65000).optional(), @@ -816,6 +828,10 @@ const CreateWithItemsSubscriptionPaymentIntentSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), reference_id: z.string().max(65000).optional(), @@ -1492,6 +1508,10 @@ const UpdateSubscriptionPaymentMethodSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), gateway: z @@ -1618,6 +1638,10 @@ const UpdateSubscriptionPaymentIntentSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), reference_id: z.string().max(65000).optional(), @@ -1950,6 +1974,10 @@ const UpdateForItemsSubscriptionPaymentMethodSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), gateway: z @@ -2076,6 +2104,10 @@ const UpdateForItemsSubscriptionPaymentIntentSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), reference_id: z.string().max(65000).optional(), @@ -2379,6 +2411,10 @@ const ReactivateSubscriptionPaymentIntentSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), reference_id: z.string().max(65000).optional(), @@ -2736,6 +2772,10 @@ const ImportSubscriptionSubscriptionPaymentMethodSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), gateway: z @@ -2854,6 +2894,10 @@ const ImportSubscriptionSubscriptionTransactionSchema = z.object({ 'app_store', 'play_store', 'custom', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), reference_number: z.string().max(100).optional(), @@ -2988,6 +3032,10 @@ const ImportForCustomerSubscriptionTransactionSchema = z.object({ 'app_store', 'play_store', 'custom', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), reference_number: z.string().max(100).optional(), @@ -3237,6 +3285,10 @@ const ImportForItemsSubscriptionTransactionSchema = z.object({ 'app_store', 'play_store', 'custom', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), reference_number: z.string().max(100).optional(), @@ -3497,6 +3549,7 @@ const CancelForItemsSubscriptionBodySchema = z.looseObject({ ]) .optional(), invoice_date: z.number().int().optional(), + include_cancellation_day_in_billing: z.boolean().optional(), cancel_reason_code: z.string().max(100).optional(), decommissioned: z.boolean().default(false).optional(), subscription_items: @@ -3564,6 +3617,10 @@ const ResumeSubscriptionPaymentIntentSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), reference_id: z.string().max(65000).optional(), diff --git a/src/schema/transaction.schema.ts b/src/schema/transaction.schema.ts index df35be2..544c988 100644 --- a/src/schema/transaction.schema.ts +++ b/src/schema/transaction.schema.ts @@ -30,6 +30,10 @@ const RecordRefundTransactionBodySchema = z.looseObject({ 'app_store', 'play_store', 'custom', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]), date: z.number().int(), reference_number: z.string().max(100).optional(), @@ -158,6 +162,10 @@ const ListTransactionPaymentMethodSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), is_not: z @@ -222,6 +230,10 @@ const ListTransactionPaymentMethodSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), in: z @@ -286,6 +298,10 @@ const ListTransactionPaymentMethodSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), not_in: z @@ -350,6 +366,10 @@ const ListTransactionPaymentMethodSchema = z.object({ 'paynow', 'bizum', 'promptpay', + 'dana', + 'touch_n_go', + 'tamara', + 'qpay', ]) .optional(), }); diff --git a/src/schema/webhook_endpoint.schema.ts b/src/schema/webhook_endpoint.schema.ts index e97a7f7..de264dc 100644 --- a/src/schema/webhook_endpoint.schema.ts +++ b/src/schema/webhook_endpoint.schema.ts @@ -245,6 +245,10 @@ const CreateWebhookEndpointBodySchema = z.looseObject({ 'alert_status_changed', 'omnichannel_subscription_item_updated', 'omnichannel_subscription_item_recovered', + 'ledger_account_balance_updated', + 'grant_blocks_created', + 'grant_blocks_updated', + 'ledger_updated', 'plan_created', 'plan_updated', 'plan_deleted', @@ -499,6 +503,10 @@ const UpdateWebhookEndpointBodySchema = z.looseObject({ 'alert_status_changed', 'omnichannel_subscription_item_updated', 'omnichannel_subscription_item_recovered', + 'ledger_account_balance_updated', + 'grant_blocks_created', + 'grant_blocks_updated', + 'ledger_updated', 'plan_created', 'plan_updated', 'plan_deleted', diff --git a/types/core.d.ts b/types/core.d.ts index b99e9f0..ade1628 100644 --- a/types/core.d.ts +++ b/types/core.d.ts @@ -377,6 +377,10 @@ declare module 'chargebee' { | 'alert_status_changed' | 'omnichannel_subscription_item_updated' | 'omnichannel_subscription_item_recovered' + | 'ledger_account_balance_updated' + | 'grant_blocks_created' + | 'grant_blocks_updated' + | 'ledger_updated' | 'plan_created' | 'plan_updated' | 'plan_deleted' @@ -495,6 +499,10 @@ declare module 'chargebee' { | 'bank_transfer' | 'other' | 'custom' + | 'dana' + | 'touch_n_go' + | 'tamara' + | 'qpay' | 'chargeback' | 'card' | 'amazon_payments' @@ -599,7 +607,11 @@ declare module 'chargebee' { | 'south_korean_cards' | 'paynow' | 'bizum' - | 'promptpay'; + | 'promptpay' + | 'dana' + | 'touch_n_go' + | 'tamara' + | 'qpay'; type PaymentVoucherTypeEnum = 'boleto'; type PeriodUnitEnum = 'day' | 'week' | 'month' | 'year'; type PriceTypeEnum = 'tax_exclusive' | 'tax_inclusive'; @@ -735,13 +747,22 @@ declare module 'chargebee' { | 'paynow' | 'bizum' | 'promptpay' + | 'dana' + | 'touch_n_go' + | 'tamara' + | 'qpay' | 'free_trial' | 'pay_up_front' | 'pay_as_you_go' | 'simple' | 'compound' | 'usage_exceeded' - | 'spend_exceeded'; + | 'spend_exceeded' + | 'credit_balance_dropped' + | 'credit' + | 'debit' + | 'hold' + | 'unhold'; type UnbilledChargesHandlingEnum = 'no_action' | 'invoice'; type UnbilledChargesOptionEnum = 'invoice' | 'delete'; type UnpaidInvoicesHandlingEnum = 'no_action' | 'schedule_payment_collection'; @@ -971,6 +992,10 @@ declare module 'chargebee' { | 'alert_status_changed' | 'omnichannel_subscription_item_updated' | 'omnichannel_subscription_item_recovered' + | 'ledger_account_balance_updated' + | 'grant_blocks_created' + | 'grant_blocks_updated' + | 'ledger_updated' | 'plan_created' | 'plan_updated' | 'plan_deleted' diff --git a/types/index.d.ts b/types/index.d.ts index d37b2af..f4023de 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -23,6 +23,7 @@ /// /// /// +/// /// /// /// @@ -54,6 +55,7 @@ /// /// /// +/// /// /// /// @@ -278,6 +280,7 @@ declare module 'chargebee' { couponCode: CouponCode.CouponCodeResource; couponSet: CouponSet.CouponSetResource; creditNote: CreditNote.CreditNoteResource; + creditUnit: CreditUnit.CreditUnitResource; currency: Currency.CurrencyResource; customer: Customer.CustomerResource; customerEntitlement: CustomerEntitlement.CustomerEntitlementResource; diff --git a/types/resources/Alert.d.ts b/types/resources/Alert.d.ts index 2e0a2f0..18faaf7 100644 --- a/types/resources/Alert.d.ts +++ b/types/resources/Alert.d.ts @@ -9,12 +9,13 @@ declare module 'chargebee' { description?: string; metered_feature_id?: string; currency_code?: string; + unit_id?: string; subscription_id?: string; status?: 'enabled' | 'disabled'; meta?: string; created_at: number; updated_at: number; - threshold?: Alert.Threshold[]; + threshold?: Alert.Threshold; filter_conditions?: Alert.FilterCondition[]; } @@ -80,7 +81,7 @@ declare module 'chargebee' { } export interface Threshold { - mode: 'absolute' | 'percentage'; + mode: ModeEnum; value: number; } export interface FilterCondition { @@ -97,6 +98,7 @@ declare module 'chargebee' { description?: string; metered_feature_id?: string; currency_code?: string; + unit_id?: string; subscription_id?: string; meta?: string; threshold?: ThresholdCreateInputParam; diff --git a/types/resources/AttachedItem.d.ts b/types/resources/AttachedItem.d.ts index e8d1d12..bcb33b6 100644 --- a/types/resources/AttachedItem.d.ts +++ b/types/resources/AttachedItem.d.ts @@ -11,8 +11,8 @@ declare module 'chargebee' { quantity?: number; quantity_in_decimal?: string; billing_cycles?: number; - charge_on_event: ChargeOnEventEnum; - charge_once: boolean; + charge_on_event?: ChargeOnEventEnum; + charge_once?: boolean; created_at: number; resource_version?: number; updated_at?: number; diff --git a/types/resources/Content.d.ts b/types/resources/Content.d.ts index 2a17dc7..2d71590 100644 --- a/types/resources/Content.d.ts +++ b/types/resources/Content.d.ts @@ -28,6 +28,7 @@ declare module 'chargebee' { cpq_quote_signature: CpqQuoteSignature; credit_note: CreditNote; credit_note_estimate: CreditNoteEstimate; + credit_unit: CreditUnit; currency: Currency; customer: Customer; customer_entitlement: CustomerEntitlement; @@ -59,6 +60,7 @@ declare module 'chargebee' { item_family: ItemFamily; item_price: ItemPrice; ledger_account_balance: LedgerAccountBalance; + ledger_entry: LedgerEntry; ledger_operation: LedgerOperation; metadata: Metadata; meter: Meter; diff --git a/types/resources/CreditUnit.d.ts b/types/resources/CreditUnit.d.ts new file mode 100644 index 0000000..3e80090 --- /dev/null +++ b/types/resources/CreditUnit.d.ts @@ -0,0 +1,90 @@ +/// +/// +/// +declare module 'chargebee' { + export interface CreditUnit { + id: string; + name: string; + external_name: string; + status?: 'active' | 'archived'; + resource_version?: number; + updated_at?: number; + created_at: number; + created_by?: string; + updated_by?: string; + is_unlimited: boolean; + overdraft_amount?: string; + } + + export namespace CreditUnit { + export class CreditUnitResource { + list( + input?: ListInputParam, + headers?: ChargebeeRequestHeader, + ): Promise>; + + create( + input: CreateInputParam, + headers?: ChargebeeRequestHeader, + ): Promise>; + + update( + credit_unit_id: string, + input?: UpdateInputParam, + headers?: ChargebeeRequestHeader, + ): Promise>; + + archive( + credit_unit_id: string, + headers?: ChargebeeRequestHeader, + ): Promise>; + + reactivate( + credit_unit_id: string, + headers?: ChargebeeRequestHeader, + ): Promise>; + } + + export interface ListResponse { + list: { credit_unit: CreditUnit }[]; + next_offset?: string; + } + + export interface CreateResponse { + credit_unit: CreditUnit; + } + + export interface UpdateResponse { + credit_unit: CreditUnit; + } + + export interface ArchiveResponse { + credit_unit: CreditUnit; + } + + export interface ReactivateResponse { + credit_unit: CreditUnit; + } + + // REQUEST PARAMS + //--------------- + + export interface ListInputParam { + limit?: number; + offset?: string; + status?: filter.Enum; + id?: filter.String; + } + export interface CreateInputParam { + id: string; + name: string; + is_unlimited: boolean; + overdraft_amount?: string; + external_name?: string; + } + export interface UpdateInputParam { + name?: string; + external_name?: string; + } + } +} diff --git a/types/resources/Customer.d.ts b/types/resources/Customer.d.ts index 5a2fc08..9f1e811 100644 --- a/types/resources/Customer.d.ts +++ b/types/resources/Customer.d.ts @@ -777,7 +777,11 @@ declare module 'chargebee' { | 'south_korean_cards' | 'paynow' | 'bizum' - | 'promptpay'; + | 'promptpay' + | 'dana' + | 'touch_n_go' + | 'tamara' + | 'qpay'; reference_id?: string; /** * @deprecated Please refer API docs to use other attributes @@ -977,7 +981,11 @@ declare module 'chargebee' { | 'south_korean_cards' | 'paynow' | 'bizum' - | 'promptpay'; + | 'promptpay' + | 'dana' + | 'touch_n_go' + | 'tamara' + | 'qpay'; /** * @deprecated Please refer API docs to use other attributes */ diff --git a/types/resources/Estimate.d.ts b/types/resources/Estimate.d.ts index 79bb7cf..cb7caa9 100644 --- a/types/resources/Estimate.d.ts +++ b/types/resources/Estimate.d.ts @@ -387,6 +387,7 @@ declare module 'chargebee' { refundable_credits_handling?: RefundableCreditsHandlingEnum; contract_term_cancel_option?: ContractTermCancelOptionEnum; invoice_date?: number; + include_cancellation_day_in_billing?: boolean; cancel_reason_code?: string; subscription_items?: SubscriptionItemsCancelSubscriptionForItemsInputParam[]; } @@ -1073,7 +1074,11 @@ declare module 'chargebee' { | 'south_korean_cards' | 'paynow' | 'bizum' - | 'promptpay'; + | 'promptpay' + | 'dana' + | 'touch_n_go' + | 'tamara' + | 'qpay'; reference_id?: string; /** * @deprecated Please refer API docs to use other attributes @@ -1178,7 +1183,11 @@ declare module 'chargebee' { | 'south_korean_cards' | 'paynow' | 'bizum' - | 'promptpay'; + | 'promptpay' + | 'dana' + | 'touch_n_go' + | 'tamara' + | 'qpay'; reference_id?: string; /** * @deprecated Please refer API docs to use other attributes diff --git a/types/resources/Event.d.ts b/types/resources/Event.d.ts index c8c5da1..986bbd2 100644 --- a/types/resources/Event.d.ts +++ b/types/resources/Event.d.ts @@ -28,6 +28,7 @@ declare module 'chargebee' { TaxWithheldDeletedContent & UnbilledChargesDeletedContent & CouponUpdatedContent & + GrantBlocksCreatedContent & OmnichannelSubscriptionItemReactivatedContent & OmnichannelSubscriptionItemRenewedContent & UnbilledChargesCreatedContent & @@ -169,6 +170,7 @@ declare module 'chargebee' { SubscriptionDeletedContent & PaymentSourceAddedContent & SubscriptionMovedInContent & + LedgerUpdatedContent & ItemPriceCreatedContent & SubscriptionScheduledCancellationRemovedContent & PaymentRefundedContent & @@ -203,6 +205,7 @@ declare module 'chargebee' { PaymentSourceBusinessEntityChangedContent & PromotionalCreditsAddedContent & SubscriptionRampUpdatedContent & + LedgerAccountBalanceUpdatedContent & CustomerEntitlementsUpdatedContent & PaymentSourceExpiredContent & CustomerMovedOutContent & @@ -233,6 +236,7 @@ declare module 'chargebee' { AttachedItemUpdatedContent & PaymentSourceUpdatedContent & BusinessEntityDeletedContent & + GrantBlocksUpdatedContent & AuthorizationVoidedContent & SubscriptionRampDeletedContent & PlanDeletedContent & diff --git a/types/resources/Gift.d.ts b/types/resources/Gift.d.ts index b4ac553..0ec557e 100644 --- a/types/resources/Gift.d.ts +++ b/types/resources/Gift.d.ts @@ -231,7 +231,11 @@ declare module 'chargebee' { | 'south_korean_cards' | 'paynow' | 'bizum' - | 'promptpay'; + | 'promptpay' + | 'dana' + | 'touch_n_go' + | 'tamara' + | 'qpay'; reference_id?: string; /** * @deprecated Please refer API docs to use other attributes @@ -330,7 +334,11 @@ declare module 'chargebee' { | 'south_korean_cards' | 'paynow' | 'bizum' - | 'promptpay'; + | 'promptpay' + | 'dana' + | 'touch_n_go' + | 'tamara' + | 'qpay'; reference_id?: string; /** * @deprecated Please refer API docs to use other attributes diff --git a/types/resources/GrantBlock.d.ts b/types/resources/GrantBlock.d.ts index 589ac0f..7e6eb5c 100644 --- a/types/resources/GrantBlock.d.ts +++ b/types/resources/GrantBlock.d.ts @@ -4,6 +4,10 @@ declare module 'chargebee' { export interface GrantBlock { id: string; + subscription_id?: string; + account_type?: 'provisioned' | 'overdraft'; + unit_id?: string; + unit_type?: 'credit_unit'; granted_amount: string; effective_from: number; expires_at: number; @@ -20,11 +24,12 @@ declare module 'chargebee' { | 'subscription_changed' | 'top_up' | 'promotional_grants' - | 'rollover'; - created_at?: number; - account_type?: 'provisioned' | 'overdraft'; - unit_id?: string; - unit_type?: 'credit_unit'; + | 'rollover' + | 'grant_renewal' + | 'subscription_renewed'; + created_at: number; + modified_at: number; + resource_version?: number; metadata?: any; } @@ -49,6 +54,7 @@ declare module 'chargebee' { offset?: string; subscription_id: filter.String; unit_id?: filter.String; + account_type?: filter.Enum; effective_from?: filter.Timestamp; expires_at?: filter.Timestamp; created_at?: filter.Timestamp; diff --git a/types/resources/Invoice.d.ts b/types/resources/Invoice.d.ts index 86d0a4a..559148a 100644 --- a/types/resources/Invoice.d.ts +++ b/types/resources/Invoice.d.ts @@ -1313,7 +1313,11 @@ declare module 'chargebee' { | 'south_korean_cards' | 'paynow' | 'bizum' - | 'promptpay'; + | 'promptpay' + | 'dana' + | 'touch_n_go' + | 'tamara' + | 'qpay'; reference_id?: string; /** * @deprecated Please refer API docs to use other attributes @@ -1487,7 +1491,11 @@ declare module 'chargebee' { | 'south_korean_cards' | 'paynow' | 'bizum' - | 'promptpay'; + | 'promptpay' + | 'dana' + | 'touch_n_go' + | 'tamara' + | 'qpay'; reference_id?: string; /** * @deprecated Please refer API docs to use other attributes diff --git a/types/resources/LedgerAccountBalance.d.ts b/types/resources/LedgerAccountBalance.d.ts index 0158bae..0ecac57 100644 --- a/types/resources/LedgerAccountBalance.d.ts +++ b/types/resources/LedgerAccountBalance.d.ts @@ -6,7 +6,9 @@ declare module 'chargebee' { subscription_id: string; unit_id: string; unit_type: 'credit_unit'; - modified_at?: number; + created_at: number; + modified_at: number; + resource_version?: number; provisioned_balance?: LedgerAccountBalance.ProvisionedBalance; overdraft_balance?: LedgerAccountBalance.OverdraftBalance; } diff --git a/types/resources/LedgerEntry.d.ts b/types/resources/LedgerEntry.d.ts new file mode 100644 index 0000000..4e81a6d --- /dev/null +++ b/types/resources/LedgerEntry.d.ts @@ -0,0 +1,22 @@ +/// +/// + +declare module 'chargebee' { + export interface LedgerEntry { + id: string; + subscription_id?: string; + account_type?: 'provisioned' | 'overdraft'; + unit_id?: string; + unit_type?: 'credit_unit'; + amount: string; + grant_block_start_balance: string; + grant_block_end_balance: string; + account_start_balance: string; + account_end_balance: string; + type: TypeEnum; + ledger_operation_id: string; + grant_block_id: string; + created_at: number; + modified_at: number; + } +} diff --git a/types/resources/LedgerOperation.d.ts b/types/resources/LedgerOperation.d.ts index 87e4ae8..2d916f7 100644 --- a/types/resources/LedgerOperation.d.ts +++ b/types/resources/LedgerOperation.d.ts @@ -4,6 +4,9 @@ declare module 'chargebee' { export interface LedgerOperation { id: string; + subscription_id?: string; + unit_id?: string; + unit_type?: 'credit_unit'; type: | 'allocation' | 'capture' @@ -20,13 +23,10 @@ declare module 'chargebee' { overdraft_start_balance: string; overdraft_end_balance: string; parent_ledger_operation_id?: string; - ledger_operation_timestamp?: number; + ledger_operation_timestamp: number; auto_release_timestamp?: number; - created_at?: number; - modified_at?: number; - subscription_id?: string; - unit_id?: string; - unit_type?: 'credit_unit'; + created_at: number; + modified_at: number; metadata?: any; } @@ -61,6 +61,11 @@ declare module 'chargebee' { input: ReleaseAuthorizationInputParam, headers?: ChargebeeRequestHeader, ): Promise>; + + allocate( + input: AllocateInputParam, + headers?: ChargebeeRequestHeader, + ): Promise>; } export interface RetrieveLedgerOperationResponse { @@ -75,21 +80,36 @@ declare module 'chargebee' { export interface CaptureResponse { ledger_operation: LedgerOperation; ledger_account_balance: LedgerAccountBalance; + grant_blocks: GrantBlock[]; + ledger_entries: LedgerEntry[]; } export interface AuthorizeResponse { ledger_operation: LedgerOperation; ledger_account_balance: LedgerAccountBalance; + grant_blocks: GrantBlock[]; + ledger_entries: LedgerEntry[]; } export interface CaptureAuthorizationResponse { ledger_operation: LedgerOperation; ledger_account_balance: LedgerAccountBalance; + grant_blocks: GrantBlock[]; + ledger_entries: LedgerEntry[]; } export interface ReleaseAuthorizationResponse { ledger_operation: LedgerOperation; ledger_account_balance: LedgerAccountBalance; + grant_blocks: GrantBlock[]; + ledger_entries: LedgerEntry[]; + } + + export interface AllocateResponse { + ledger_account_balance: LedgerAccountBalance; + ledger_operations: LedgerOperation[]; + grant_blocks: GrantBlock[]; + ledger_entries: LedgerEntry[]; } // REQUEST PARAMS @@ -135,5 +155,12 @@ declare module 'chargebee' { ledger_operation_timestamp: number; metadata?: any; } + export interface AllocateInputParam { + subscription_id: string; + unit_id: string; + amount: string; + expires_at: number; + metadata?: any; + } } } diff --git a/types/resources/PaymentIntent.d.ts b/types/resources/PaymentIntent.d.ts index 77e0e12..ffc161b 100644 --- a/types/resources/PaymentIntent.d.ts +++ b/types/resources/PaymentIntent.d.ts @@ -58,7 +58,11 @@ declare module 'chargebee' { | 'south_korean_cards' | 'paynow' | 'bizum' - | 'promptpay'; + | 'promptpay' + | 'dana' + | 'touch_n_go' + | 'tamara' + | 'qpay'; success_url?: string; failure_url?: string; created_at: number; @@ -162,7 +166,11 @@ declare module 'chargebee' { | 'south_korean_cards' | 'paynow' | 'bizum' - | 'promptpay'; + | 'promptpay' + | 'dana' + | 'touch_n_go' + | 'tamara' + | 'qpay'; id_at_gateway?: string; error_code?: string; error_text?: string; @@ -229,7 +237,11 @@ declare module 'chargebee' { | 'south_korean_cards' | 'paynow' | 'bizum' - | 'promptpay'; + | 'promptpay' + | 'dana' + | 'touch_n_go' + | 'tamara' + | 'qpay'; id_at_gateway?: string; error_code?: string; error_text?: string; @@ -313,7 +325,11 @@ declare module 'chargebee' { | 'south_korean_cards' | 'paynow' | 'bizum' - | 'promptpay'; + | 'promptpay' + | 'dana' + | 'touch_n_go' + | 'tamara' + | 'qpay'; success_url?: string; failure_url?: string; } @@ -369,7 +385,11 @@ declare module 'chargebee' { | 'south_korean_cards' | 'paynow' | 'bizum' - | 'promptpay'; + | 'promptpay' + | 'dana' + | 'touch_n_go' + | 'tamara' + | 'qpay'; success_url?: string; failure_url?: string; } diff --git a/types/resources/PaymentSource.d.ts b/types/resources/PaymentSource.d.ts index 17dcdd6..001f36d 100644 --- a/types/resources/PaymentSource.d.ts +++ b/types/resources/PaymentSource.d.ts @@ -482,7 +482,11 @@ declare module 'chargebee' { | 'south_korean_cards' | 'paynow' | 'bizum' - | 'promptpay'; + | 'promptpay' + | 'dana' + | 'touch_n_go' + | 'tamara' + | 'qpay'; reference_id?: string; /** * @deprecated Please refer API docs to use other attributes diff --git a/types/resources/Purchase.d.ts b/types/resources/Purchase.d.ts index 720ab6d..81c61c1 100644 --- a/types/resources/Purchase.d.ts +++ b/types/resources/Purchase.d.ts @@ -125,7 +125,11 @@ declare module 'chargebee' { | 'south_korean_cards' | 'paynow' | 'bizum' - | 'promptpay'; + | 'promptpay' + | 'dana' + | 'touch_n_go' + | 'tamara' + | 'qpay'; reference_id?: string; /** * @deprecated Please refer API docs to use other attributes diff --git a/types/resources/Subscription.d.ts b/types/resources/Subscription.d.ts index 6207143..51b4ce2 100644 --- a/types/resources/Subscription.d.ts +++ b/types/resources/Subscription.d.ts @@ -1269,6 +1269,7 @@ declare module 'chargebee' { refundable_credits_handling?: RefundableCreditsHandlingEnum; contract_term_cancel_option?: ContractTermCancelOptionEnum; invoice_date?: number; + include_cancellation_day_in_billing?: boolean; cancel_reason_code?: string; decommissioned?: boolean; subscription_items?: SubscriptionItemsCancelForItemsInputParam[]; @@ -1435,7 +1436,11 @@ declare module 'chargebee' { | 'south_korean_cards' | 'paynow' | 'bizum' - | 'promptpay'; + | 'promptpay' + | 'dana' + | 'touch_n_go' + | 'tamara' + | 'qpay'; reference_id?: string; /** * @deprecated Please refer API docs to use other attributes @@ -1590,7 +1595,11 @@ declare module 'chargebee' { | 'south_korean_cards' | 'paynow' | 'bizum' - | 'promptpay'; + | 'promptpay' + | 'dana' + | 'touch_n_go' + | 'tamara' + | 'qpay'; reference_id?: string; /** * @deprecated Please refer API docs to use other attributes @@ -1712,7 +1721,11 @@ declare module 'chargebee' { | 'south_korean_cards' | 'paynow' | 'bizum' - | 'promptpay'; + | 'promptpay' + | 'dana' + | 'touch_n_go' + | 'tamara' + | 'qpay'; reference_id?: string; /** * @deprecated Please refer API docs to use other attributes @@ -1889,7 +1902,11 @@ declare module 'chargebee' { | 'south_korean_cards' | 'paynow' | 'bizum' - | 'promptpay'; + | 'promptpay' + | 'dana' + | 'touch_n_go' + | 'tamara' + | 'qpay'; reference_id?: string; /** * @deprecated Please refer API docs to use other attributes @@ -2080,7 +2097,11 @@ declare module 'chargebee' { | 'south_korean_cards' | 'paynow' | 'bizum' - | 'promptpay'; + | 'promptpay' + | 'dana' + | 'touch_n_go' + | 'tamara' + | 'qpay'; reference_id?: string; /** * @deprecated Please refer API docs to use other attributes @@ -2227,7 +2248,11 @@ declare module 'chargebee' { | 'south_korean_cards' | 'paynow' | 'bizum' - | 'promptpay'; + | 'promptpay' + | 'dana' + | 'touch_n_go' + | 'tamara' + | 'qpay'; reference_id?: string; /** * @deprecated Please refer API docs to use other attributes @@ -2680,7 +2705,11 @@ declare module 'chargebee' { | 'south_korean_cards' | 'paynow' | 'bizum' - | 'promptpay'; + | 'promptpay' + | 'dana' + | 'touch_n_go' + | 'tamara' + | 'qpay'; reference_id?: string; /** * @deprecated Please refer API docs to use other attributes diff --git a/types/resources/WebhookEvent.d.ts b/types/resources/WebhookEvent.d.ts index 4e8ec47..69642ee 100644 --- a/types/resources/WebhookEvent.d.ts +++ b/types/resources/WebhookEvent.d.ts @@ -11,6 +11,7 @@ declare module 'chargebee' { TaxWithheldDeleted = 'tax_withheld_deleted', UnbilledChargesDeleted = 'unbilled_charges_deleted', CouponUpdated = 'coupon_updated', + GrantBlocksCreated = 'grant_blocks_created', OmnichannelSubscriptionItemReactivated = 'omnichannel_subscription_item_reactivated', OmnichannelSubscriptionItemRenewed = 'omnichannel_subscription_item_renewed', UnbilledChargesCreated = 'unbilled_charges_created', @@ -152,6 +153,7 @@ declare module 'chargebee' { SubscriptionDeleted = 'subscription_deleted', PaymentSourceAdded = 'payment_source_added', SubscriptionMovedIn = 'subscription_moved_in', + LedgerUpdated = 'ledger_updated', ItemPriceCreated = 'item_price_created', SubscriptionScheduledCancellationRemoved = 'subscription_scheduled_cancellation_removed', PaymentRefunded = 'payment_refunded', @@ -186,6 +188,7 @@ declare module 'chargebee' { PaymentSourceBusinessEntityChanged = 'payment_source_business_entity_changed', PromotionalCreditsAdded = 'promotional_credits_added', SubscriptionRampUpdated = 'subscription_ramp_updated', + LedgerAccountBalanceUpdated = 'ledger_account_balance_updated', CustomerEntitlementsUpdated = 'customer_entitlements_updated', PaymentSourceExpired = 'payment_source_expired', CustomerMovedOut = 'customer_moved_out', @@ -216,6 +219,7 @@ declare module 'chargebee' { AttachedItemUpdated = 'attached_item_updated', PaymentSourceUpdated = 'payment_source_updated', BusinessEntityDeleted = 'business_entity_deleted', + GrantBlocksUpdated = 'grant_blocks_updated', AuthorizationVoided = 'authorization_voided', SubscriptionRampDeleted = 'subscription_ramp_deleted', PlanDeleted = 'plan_deleted', @@ -239,6 +243,7 @@ declare module 'chargebee' { [WebhookEventType.TaxWithheldDeleted]: TaxWithheldDeletedContent; [WebhookEventType.UnbilledChargesDeleted]: UnbilledChargesDeletedContent; [WebhookEventType.CouponUpdated]: CouponUpdatedContent; + [WebhookEventType.GrantBlocksCreated]: GrantBlocksCreatedContent; [WebhookEventType.OmnichannelSubscriptionItemReactivated]: OmnichannelSubscriptionItemReactivatedContent; [WebhookEventType.OmnichannelSubscriptionItemRenewed]: OmnichannelSubscriptionItemRenewedContent; [WebhookEventType.UnbilledChargesCreated]: UnbilledChargesCreatedContent; @@ -380,6 +385,7 @@ declare module 'chargebee' { [WebhookEventType.SubscriptionDeleted]: SubscriptionDeletedContent; [WebhookEventType.PaymentSourceAdded]: PaymentSourceAddedContent; [WebhookEventType.SubscriptionMovedIn]: SubscriptionMovedInContent; + [WebhookEventType.LedgerUpdated]: LedgerUpdatedContent; [WebhookEventType.ItemPriceCreated]: ItemPriceCreatedContent; [WebhookEventType.SubscriptionScheduledCancellationRemoved]: SubscriptionScheduledCancellationRemovedContent; [WebhookEventType.PaymentRefunded]: PaymentRefundedContent; @@ -414,6 +420,7 @@ declare module 'chargebee' { [WebhookEventType.PaymentSourceBusinessEntityChanged]: PaymentSourceBusinessEntityChangedContent; [WebhookEventType.PromotionalCreditsAdded]: PromotionalCreditsAddedContent; [WebhookEventType.SubscriptionRampUpdated]: SubscriptionRampUpdatedContent; + [WebhookEventType.LedgerAccountBalanceUpdated]: LedgerAccountBalanceUpdatedContent; [WebhookEventType.CustomerEntitlementsUpdated]: CustomerEntitlementsUpdatedContent; [WebhookEventType.PaymentSourceExpired]: PaymentSourceExpiredContent; [WebhookEventType.CustomerMovedOut]: CustomerMovedOutContent; @@ -444,6 +451,7 @@ declare module 'chargebee' { [WebhookEventType.AttachedItemUpdated]: AttachedItemUpdatedContent; [WebhookEventType.PaymentSourceUpdated]: PaymentSourceUpdatedContent; [WebhookEventType.BusinessEntityDeleted]: BusinessEntityDeletedContent; + [WebhookEventType.GrantBlocksUpdated]: GrantBlocksUpdatedContent; [WebhookEventType.AuthorizationVoided]: AuthorizationVoidedContent; [WebhookEventType.SubscriptionRampDeleted]: SubscriptionRampDeletedContent; [WebhookEventType.PlanDeleted]: PlanDeletedContent; @@ -514,6 +522,9 @@ declare module 'chargebee' { export type CouponUpdatedContent = { coupon: Coupon; }; + export type GrantBlocksCreatedContent = { + grant_block: GrantBlock[]; + }; export type OmnichannelSubscriptionItemReactivatedContent = { omnichannel_subscription: OmnichannelSubscription; @@ -1317,6 +1328,15 @@ declare module 'chargebee' { export type SubscriptionMovedInContent = { subscription: Subscription; }; + export type LedgerUpdatedContent = { + ledger_operation: LedgerOperation[]; + + ledger_account_balance: LedgerAccountBalance; + + grant_block: GrantBlock[]; + + ledger_entry: LedgerEntry[]; + }; export type ItemPriceCreatedContent = { item_price: ItemPrice; }; @@ -1519,6 +1539,9 @@ declare module 'chargebee' { export type SubscriptionRampUpdatedContent = { ramp: Ramp; }; + export type LedgerAccountBalanceUpdatedContent = { + ledger_account_balance: LedgerAccountBalance; + }; export type CustomerEntitlementsUpdatedContent = { impacted_customer: ImpactedCustomer; }; @@ -1659,6 +1682,9 @@ declare module 'chargebee' { export type BusinessEntityDeletedContent = { business_entity: BusinessEntity; }; + export type GrantBlocksUpdatedContent = { + grant_block: GrantBlock[]; + }; export type AuthorizationVoidedContent = { transaction: Transaction; };