chargebee 3.33.0 → 3.34.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.
Files changed (109) hide show
  1. package/CHANGELOG.md +190 -0
  2. package/cjs/environment.js +1 -1
  3. package/cjs/resources/api_endpoints.js +323 -2
  4. package/cjs/resources/webhook/eventType.js +14 -0
  5. package/cjs/schema/business_rule.schema.js +54 -0
  6. package/cjs/schema/business_ruleset.schema.js +68 -0
  7. package/cjs/schema/card.schema.js +3 -1
  8. package/cjs/schema/credit_note.schema.js +10 -4
  9. package/cjs/schema/customer.schema.js +81 -10
  10. package/cjs/schema/dispute.schema.js +104 -0
  11. package/cjs/schema/einvoice.schema.js +37 -0
  12. package/cjs/schema/email_log.schema.js +28 -0
  13. package/cjs/schema/estimate.schema.js +35 -6
  14. package/cjs/schema/event.schema.js +56 -0
  15. package/cjs/schema/export.schema.js +68 -12
  16. package/cjs/schema/feature.schema.js +2 -2
  17. package/cjs/schema/gift.schema.js +26 -0
  18. package/cjs/schema/hosted_page.schema.js +24 -4
  19. package/cjs/schema/index.js +6 -0
  20. package/cjs/schema/invoice.schema.js +74 -10
  21. package/cjs/schema/ledger_operation.schema.js +4 -0
  22. package/cjs/schema/meter.schema.js +1 -1
  23. package/cjs/schema/metered_feature.schema.js +1 -1
  24. package/cjs/schema/omnichannel_subscription.schema.js +4 -4
  25. package/cjs/schema/payment_intent.schema.js +27 -0
  26. package/cjs/schema/payment_schedule.schema.js +36 -0
  27. package/cjs/schema/payment_schedule_scheme.schema.js +23 -2
  28. package/cjs/schema/payment_source.schema.js +103 -1
  29. package/cjs/schema/pricing_page_session.schema.js +1 -0
  30. package/cjs/schema/promotional_grant.schema.js +2 -0
  31. package/cjs/schema/purchase.schema.js +14 -1
  32. package/cjs/schema/ramp.schema.js +8 -0
  33. package/cjs/schema/subscription.schema.js +175 -12
  34. package/cjs/schema/transaction.schema.js +60 -2
  35. package/cjs/schema/webhook_endpoint.schema.js +28 -0
  36. package/esm/environment.js +1 -1
  37. package/esm/resources/api_endpoints.js +323 -2
  38. package/esm/resources/webhook/eventType.js +14 -0
  39. package/esm/schema/business_rule.schema.js +51 -0
  40. package/esm/schema/business_ruleset.schema.js +65 -0
  41. package/esm/schema/card.schema.js +3 -1
  42. package/esm/schema/credit_note.schema.js +10 -4
  43. package/esm/schema/customer.schema.js +81 -10
  44. package/esm/schema/dispute.schema.js +101 -0
  45. package/esm/schema/einvoice.schema.js +34 -0
  46. package/esm/schema/email_log.schema.js +25 -0
  47. package/esm/schema/estimate.schema.js +35 -6
  48. package/esm/schema/event.schema.js +56 -0
  49. package/esm/schema/export.schema.js +68 -12
  50. package/esm/schema/feature.schema.js +2 -2
  51. package/esm/schema/gift.schema.js +26 -0
  52. package/esm/schema/hosted_page.schema.js +24 -4
  53. package/esm/schema/index.js +6 -0
  54. package/esm/schema/invoice.schema.js +74 -10
  55. package/esm/schema/ledger_operation.schema.js +4 -0
  56. package/esm/schema/meter.schema.js +1 -1
  57. package/esm/schema/metered_feature.schema.js +1 -1
  58. package/esm/schema/omnichannel_subscription.schema.js +4 -4
  59. package/esm/schema/payment_intent.schema.js +27 -0
  60. package/esm/schema/payment_schedule.schema.js +33 -0
  61. package/esm/schema/payment_schedule_scheme.schema.js +22 -1
  62. package/esm/schema/payment_source.schema.js +103 -1
  63. package/esm/schema/pricing_page_session.schema.js +1 -0
  64. package/esm/schema/promotional_grant.schema.js +2 -0
  65. package/esm/schema/purchase.schema.js +14 -1
  66. package/esm/schema/ramp.schema.js +8 -0
  67. package/esm/schema/subscription.schema.js +175 -12
  68. package/esm/schema/transaction.schema.js +60 -2
  69. package/esm/schema/webhook_endpoint.schema.js +28 -0
  70. package/package.json +1 -1
  71. package/types/core.d.ts +86 -8
  72. package/types/index.d.ts +15 -0
  73. package/types/resources/AppliedBusinessRule.d.ts +15 -0
  74. package/types/resources/AppliedRule.d.ts +14 -0
  75. package/types/resources/ApplyRule.d.ts +28 -0
  76. package/types/resources/BusinessRule.d.ts +161 -0
  77. package/types/resources/BusinessRuleset.d.ts +165 -0
  78. package/types/resources/BusinessRulesetRule.d.ts +9 -0
  79. package/types/resources/Card.d.ts +1 -1
  80. package/types/resources/Content.d.ts +9 -0
  81. package/types/resources/CreditNote.d.ts +12 -0
  82. package/types/resources/CustomDataSchema.d.ts +15 -0
  83. package/types/resources/Customer.d.ts +42 -5
  84. package/types/resources/Dispute.d.ts +65 -0
  85. package/types/resources/Einvoice.d.ts +64 -1
  86. package/types/resources/EmailLog.d.ts +45 -0
  87. package/types/resources/Estimate.d.ts +31 -2
  88. package/types/resources/Event.d.ts +15 -0
  89. package/types/resources/Gift.d.ts +28 -2
  90. package/types/resources/GrantBlock.d.ts +26 -7
  91. package/types/resources/HostedPage.d.ts +11 -0
  92. package/types/resources/Invoice.d.ts +42 -4
  93. package/types/resources/LedgerEntry.d.ts +4 -4
  94. package/types/resources/LedgerOperation.d.ts +15 -8
  95. package/types/resources/OmnichannelSubscriptionItem.d.ts +5 -1
  96. package/types/resources/PaymentIntent.d.ts +72 -5
  97. package/types/resources/PaymentSchedule.d.ts +38 -1
  98. package/types/resources/PaymentScheduleEstimate.d.ts +1 -0
  99. package/types/resources/PaymentScheduleScheme.d.ts +17 -1
  100. package/types/resources/PaymentSource.d.ts +31 -2
  101. package/types/resources/PricingPageSession.d.ts +1 -0
  102. package/types/resources/PromotionalGrant.d.ts +2 -0
  103. package/types/resources/Purchase.d.ts +14 -1
  104. package/types/resources/QuotedSubscription.d.ts +1 -0
  105. package/types/resources/Ramp.d.ts +12 -0
  106. package/types/resources/Subscription.d.ts +110 -11
  107. package/types/resources/ThirdPartyPaymentMethod.d.ts +1 -0
  108. package/types/resources/Transaction.d.ts +5 -0
  109. package/types/resources/WebhookEvent.d.ts +70 -0
@@ -384,10 +384,10 @@ const RevenueRecognitionExportAutoCollectionSchema = z.object({
384
384
  not_in: z.enum(['on', 'off']).optional(),
385
385
  });
386
386
  const RevenueRecognitionExportTaxabilitySchema = z.object({
387
- is: z.enum(['taxable', 'exempt']).optional(),
388
- is_not: z.enum(['taxable', 'exempt']).optional(),
389
- in: z.enum(['taxable', 'exempt']).optional(),
390
- not_in: z.enum(['taxable', 'exempt']).optional(),
387
+ is: z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
388
+ is_not: z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
389
+ in: z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
390
+ not_in: z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
391
391
  });
392
392
  const RevenueRecognitionExportCustomerItemSchema = z.object({
393
393
  id: RevenueRecognitionExportIdSchema.optional(),
@@ -831,10 +831,10 @@ const DeferredRevenueExportAutoCollectionSchema = z.object({
831
831
  not_in: z.enum(['on', 'off']).optional(),
832
832
  });
833
833
  const DeferredRevenueExportTaxabilitySchema = z.object({
834
- is: z.enum(['taxable', 'exempt']).optional(),
835
- is_not: z.enum(['taxable', 'exempt']).optional(),
836
- in: z.enum(['taxable', 'exempt']).optional(),
837
- not_in: z.enum(['taxable', 'exempt']).optional(),
834
+ is: z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
835
+ is_not: z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
836
+ in: z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
837
+ not_in: z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
838
838
  });
839
839
  const DeferredRevenueExportCustomerItemSchema = z.object({
840
840
  id: DeferredRevenueExportIdSchema.optional(),
@@ -1250,10 +1250,10 @@ const CustomersExportAutoCollectionSchema = z.object({
1250
1250
  not_in: z.enum(['on', 'off']).optional(),
1251
1251
  });
1252
1252
  const CustomersExportTaxabilitySchema = z.object({
1253
- is: z.enum(['taxable', 'exempt']).optional(),
1254
- is_not: z.enum(['taxable', 'exempt']).optional(),
1255
- in: z.enum(['taxable', 'exempt']).optional(),
1256
- not_in: z.enum(['taxable', 'exempt']).optional(),
1253
+ is: z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
1254
+ is_not: z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
1255
+ in: z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
1256
+ not_in: z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
1257
1257
  });
1258
1258
  const CustomersExportCreatedAtSchema = z.object({
1259
1259
  after: z.string().regex(RegExp('^\\d{10}$')).optional(),
@@ -2136,6 +2136,19 @@ const TransactionsExportPaymentMethodSchema = z.object({
2136
2136
  'touch_n_go',
2137
2137
  'tamara',
2138
2138
  'qpay',
2139
+ 'ovo',
2140
+ 'momo',
2141
+ 'mercado_pago',
2142
+ 'nequi',
2143
+ 'nupay',
2144
+ 'picpay',
2145
+ 'thai_qr',
2146
+ 'blik',
2147
+ 'fpx',
2148
+ 'wero',
2149
+ 'p24',
2150
+ 'affirm_pay',
2151
+ 'rakuten_pay',
2139
2152
  ])
2140
2153
  .optional(),
2141
2154
  is_not: z
@@ -2204,6 +2217,19 @@ const TransactionsExportPaymentMethodSchema = z.object({
2204
2217
  'touch_n_go',
2205
2218
  'tamara',
2206
2219
  'qpay',
2220
+ 'ovo',
2221
+ 'momo',
2222
+ 'mercado_pago',
2223
+ 'nequi',
2224
+ 'nupay',
2225
+ 'picpay',
2226
+ 'thai_qr',
2227
+ 'blik',
2228
+ 'fpx',
2229
+ 'wero',
2230
+ 'p24',
2231
+ 'affirm_pay',
2232
+ 'rakuten_pay',
2207
2233
  ])
2208
2234
  .optional(),
2209
2235
  in: z
@@ -2272,6 +2298,19 @@ const TransactionsExportPaymentMethodSchema = z.object({
2272
2298
  'touch_n_go',
2273
2299
  'tamara',
2274
2300
  'qpay',
2301
+ 'ovo',
2302
+ 'momo',
2303
+ 'mercado_pago',
2304
+ 'nequi',
2305
+ 'nupay',
2306
+ 'picpay',
2307
+ 'thai_qr',
2308
+ 'blik',
2309
+ 'fpx',
2310
+ 'wero',
2311
+ 'p24',
2312
+ 'affirm_pay',
2313
+ 'rakuten_pay',
2275
2314
  ])
2276
2315
  .optional(),
2277
2316
  not_in: z
@@ -2340,6 +2379,19 @@ const TransactionsExportPaymentMethodSchema = z.object({
2340
2379
  'touch_n_go',
2341
2380
  'tamara',
2342
2381
  'qpay',
2382
+ 'ovo',
2383
+ 'momo',
2384
+ 'mercado_pago',
2385
+ 'nequi',
2386
+ 'nupay',
2387
+ 'picpay',
2388
+ 'thai_qr',
2389
+ 'blik',
2390
+ 'fpx',
2391
+ 'wero',
2392
+ 'p24',
2393
+ 'affirm_pay',
2394
+ 'rakuten_pay',
2343
2395
  ])
2344
2396
  .optional(),
2345
2397
  });
@@ -2406,6 +2458,7 @@ const TransactionsExportGatewaySchema = z.object({
2406
2458
  'tempus',
2407
2459
  'moyasar',
2408
2460
  'payway',
2461
+ 'payu',
2409
2462
  'not_applicable',
2410
2463
  ])
2411
2464
  .optional(),
@@ -2471,6 +2524,7 @@ const TransactionsExportGatewaySchema = z.object({
2471
2524
  'tempus',
2472
2525
  'moyasar',
2473
2526
  'payway',
2527
+ 'payu',
2474
2528
  'not_applicable',
2475
2529
  ])
2476
2530
  .optional(),
@@ -2536,6 +2590,7 @@ const TransactionsExportGatewaySchema = z.object({
2536
2590
  'tempus',
2537
2591
  'moyasar',
2538
2592
  'payway',
2593
+ 'payu',
2539
2594
  'not_applicable',
2540
2595
  ])
2541
2596
  .optional(),
@@ -2601,6 +2656,7 @@ const TransactionsExportGatewaySchema = z.object({
2601
2656
  'tempus',
2602
2657
  'moyasar',
2603
2658
  'payway',
2659
+ 'payu',
2604
2660
  'not_applicable',
2605
2661
  ])
2606
2662
  .optional(),
@@ -44,7 +44,7 @@ const ListFeatureBodySchema = z.looseObject({
44
44
  export { ListFeatureBodySchema };
45
45
  //Feature.create
46
46
  const CreateFeatureLevelsSchema = z.object({
47
- name: z.array(z.string().max(50).optional()).optional(),
47
+ name: z.array(z.string().max(100).optional()).optional(),
48
48
  value: z.array(z.string().max(50).optional()).optional(),
49
49
  is_unlimited: z.array(z.boolean().optional()).optional(),
50
50
  level: z.array(z.number().int().optional()).optional(),
@@ -60,7 +60,7 @@ const CreateFeatureBodySchema = z.looseObject({
60
60
  export { CreateFeatureBodySchema };
61
61
  //Feature.update
62
62
  const UpdateFeatureLevelsSchema = z.object({
63
- name: z.array(z.string().max(50).optional()).optional(),
63
+ name: z.array(z.string().max(100).optional()).optional(),
64
64
  value: z.array(z.string().max(50).optional()).optional(),
65
65
  is_unlimited: z.array(z.boolean().optional()).optional(),
66
66
  level: z.array(z.number().int().optional()).optional(),
@@ -74,6 +74,19 @@ const CreateGiftPaymentIntentSchema = z.object({
74
74
  'touch_n_go',
75
75
  'tamara',
76
76
  'qpay',
77
+ 'ovo',
78
+ 'momo',
79
+ 'mercado_pago',
80
+ 'nequi',
81
+ 'nupay',
82
+ 'picpay',
83
+ 'thai_qr',
84
+ 'blik',
85
+ 'fpx',
86
+ 'wero',
87
+ 'p24',
88
+ 'affirm_pay',
89
+ 'rakuten_pay',
77
90
  ])
78
91
  .optional(),
79
92
  reference_id: z.string().max(65000).optional(),
@@ -195,6 +208,19 @@ const CreateForItemsGiftPaymentIntentSchema = z.object({
195
208
  'touch_n_go',
196
209
  'tamara',
197
210
  'qpay',
211
+ 'ovo',
212
+ 'momo',
213
+ 'mercado_pago',
214
+ 'nequi',
215
+ 'nupay',
216
+ 'picpay',
217
+ 'thai_qr',
218
+ 'blik',
219
+ 'fpx',
220
+ 'wero',
221
+ 'p24',
222
+ 'affirm_pay',
223
+ 'rakuten_pay',
198
224
  ])
199
225
  .optional(),
200
226
  reference_id: z.string().max(65000).optional(),
@@ -49,7 +49,7 @@ const CheckoutNewHostedPageCustomerSchema = z.looseObject({
49
49
  company: z.string().max(250).optional(),
50
50
  phone: z.string().max(50).optional(),
51
51
  locale: z.string().max(50).optional(),
52
- taxability: z.enum(['taxable', 'exempt']).optional(),
52
+ taxability: z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
53
53
  vat_number: z.string().max(20).optional(),
54
54
  vat_number_prefix: z.string().max(10).optional(),
55
55
  consolidated_invoicing: z.boolean().optional(),
@@ -116,6 +116,7 @@ const CheckoutNewHostedPageCardSchema = z.object({
116
116
  'tempus',
117
117
  'moyasar',
118
118
  'payway',
119
+ 'payu',
119
120
  ])
120
121
  .optional(),
121
122
  gateway_account_id: z.string().max(50).optional(),
@@ -224,7 +225,7 @@ const CheckoutOneTimeHostedPageCustomerSchema = z.looseObject({
224
225
  company: z.string().max(250).optional(),
225
226
  phone: z.string().max(50).optional(),
226
227
  locale: z.string().max(50).optional(),
227
- taxability: z.enum(['taxable', 'exempt']).optional(),
228
+ taxability: z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
228
229
  vat_number: z.string().max(20).optional(),
229
230
  vat_number_prefix: z.string().max(10).optional(),
230
231
  consolidated_invoicing: z.boolean().optional(),
@@ -294,6 +295,7 @@ const CheckoutOneTimeHostedPageCardSchema = z.object({
294
295
  'tempus',
295
296
  'moyasar',
296
297
  'payway',
298
+ 'payu',
297
299
  ])
298
300
  .optional(),
299
301
  gateway_account_id: z.string().max(50).optional(),
@@ -388,7 +390,7 @@ const CheckoutOneTimeForItemsHostedPageCustomerSchema = z.looseObject({
388
390
  company: z.string().max(250).optional(),
389
391
  phone: z.string().max(50).optional(),
390
392
  locale: z.string().max(50).optional(),
391
- taxability: z.enum(['taxable', 'exempt']).optional(),
393
+ taxability: z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
392
394
  vat_number: z.string().max(20).optional(),
393
395
  vat_number_prefix: z.string().max(10).optional(),
394
396
  einvoicing_method: z.enum(['automatic', 'manual', 'site_default']).optional(),
@@ -462,6 +464,7 @@ const CheckoutOneTimeForItemsHostedPageCardSchema = z.object({
462
464
  'tempus',
463
465
  'moyasar',
464
466
  'payway',
467
+ 'payu',
465
468
  ])
466
469
  .optional(),
467
470
  gateway_account_id: z.string().max(50).optional(),
@@ -559,6 +562,7 @@ const CheckoutOneTimeForItemsHostedPageEntityIdentifiersSchema = z.object({
559
562
  });
560
563
  const CheckoutOneTimeForItemsHostedPageBodySchema = z.looseObject({
561
564
  business_entity_id: z.string().max(50).optional(),
565
+ brand_id: z.string().max(50).optional(),
562
566
  layout: z.enum(['in_app', 'full_page']).optional(),
563
567
  invoice_note: z.string().max(2000).optional(),
564
568
  coupon: z.string().max(100).optional(),
@@ -621,7 +625,7 @@ const CheckoutNewForItemsHostedPageCustomerSchema = z.looseObject({
621
625
  company: z.string().max(250).optional(),
622
626
  phone: z.string().max(50).optional(),
623
627
  locale: z.string().max(50).optional(),
624
- taxability: z.enum(['taxable', 'exempt']).optional(),
628
+ taxability: z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
625
629
  vat_number: z.string().max(20).optional(),
626
630
  vat_number_prefix: z.string().max(10).optional(),
627
631
  is_einvoice_enabled: z.boolean().optional(),
@@ -691,6 +695,7 @@ const CheckoutNewForItemsHostedPageCardSchema = z.object({
691
695
  'tempus',
692
696
  'moyasar',
693
697
  'payway',
698
+ 'payu',
694
699
  ])
695
700
  .optional(),
696
701
  gateway_account_id: z.string().max(50).optional(),
@@ -803,6 +808,7 @@ const CheckoutNewForItemsHostedPageEntityIdentifiersSchema = z.object({
803
808
  const CheckoutNewForItemsHostedPageBodySchema = z.looseObject({
804
809
  layout: z.enum(['in_app', 'full_page']).optional(),
805
810
  business_entity_id: z.string().max(50).optional(),
811
+ brand_id: z.string().max(50).optional(),
806
812
  billing_cycles: z.number().int().min(0).optional(),
807
813
  mandatory_items_to_remove: z.array(z.string().max(100).optional()).optional(),
808
814
  terms_to_charge: z.number().int().min(1).optional(),
@@ -928,6 +934,7 @@ const CheckoutExistingHostedPageCardSchema = z.object({
928
934
  'tempus',
929
935
  'moyasar',
930
936
  'payway',
937
+ 'payu',
931
938
  ])
932
939
  .optional(),
933
940
  gateway_account_id: z.string().max(50).optional(),
@@ -1097,6 +1104,7 @@ const CheckoutExistingForItemsHostedPageCardSchema = z.object({
1097
1104
  'tempus',
1098
1105
  'moyasar',
1099
1106
  'payway',
1107
+ 'payu',
1100
1108
  ])
1101
1109
  .optional(),
1102
1110
  gateway_account_id: z.string().max(50).optional(),
@@ -1174,6 +1182,7 @@ const CheckoutExistingForItemsHostedPageEntityIdentifiersSchema = z.object({
1174
1182
  });
1175
1183
  const CheckoutExistingForItemsHostedPageBodySchema = z.looseObject({
1176
1184
  layout: z.enum(['in_app', 'full_page']).optional(),
1185
+ brand_id: z.string().max(50).optional(),
1177
1186
  mandatory_items_to_remove: z.array(z.string().max(100).optional()).optional(),
1178
1187
  replace_items_list: z.boolean().default(false).optional(),
1179
1188
  invoice_date: z.number().int().optional(),
@@ -1272,6 +1281,7 @@ const UpdateCardHostedPageCardSchema = z.object({
1272
1281
  'tempus',
1273
1282
  'moyasar',
1274
1283
  'payway',
1284
+ 'payu',
1275
1285
  ])
1276
1286
  .optional(),
1277
1287
  gateway_account_id: z.string().max(50).optional(),
@@ -1354,6 +1364,7 @@ const UpdatePaymentMethodHostedPageCardSchema = z.object({
1354
1364
  'tempus',
1355
1365
  'moyasar',
1356
1366
  'payway',
1367
+ 'payu',
1357
1368
  ])
1358
1369
  .optional(),
1359
1370
  gateway_account_id: z.string().max(50).optional(),
@@ -1434,12 +1445,14 @@ const ManagePaymentSourcesHostedPageCardSchema = z.object({
1434
1445
  'tempus',
1435
1446
  'moyasar',
1436
1447
  'payway',
1448
+ 'payu',
1437
1449
  ])
1438
1450
  .optional(),
1439
1451
  gateway_account_id: z.string().max(50).optional(),
1440
1452
  });
1441
1453
  const ManagePaymentSourcesHostedPageBodySchema = z.looseObject({
1442
1454
  business_entity_id: z.string().max(50).optional(),
1455
+ brand_id: z.string().max(50).optional(),
1443
1456
  redirect_url: z.string().max(250).optional(),
1444
1457
  customer: ManagePaymentSourcesHostedPageCustomerSchema.optional(),
1445
1458
  card: ManagePaymentSourcesHostedPageCardSchema.optional(),
@@ -1511,11 +1524,13 @@ const CollectNowHostedPageCardSchema = z.object({
1511
1524
  'tempus',
1512
1525
  'moyasar',
1513
1526
  'payway',
1527
+ 'payu',
1514
1528
  ])
1515
1529
  .optional(),
1516
1530
  gateway_account_id: z.string().max(50).optional(),
1517
1531
  });
1518
1532
  const CollectNowHostedPageBodySchema = z.looseObject({
1533
+ brand_id: z.string().max(50).optional(),
1519
1534
  redirect_url: z.string().max(250).optional(),
1520
1535
  currency_code: z.string().max(3).optional(),
1521
1536
  payment_method_save_policy: z.enum(['always', 'ask', 'never']).optional(),
@@ -1528,6 +1543,7 @@ const AcceptQuoteHostedPageQuoteSchema = z.object({
1528
1543
  id: z.string().max(50),
1529
1544
  });
1530
1545
  const AcceptQuoteHostedPageBodySchema = z.looseObject({
1546
+ brand_id: z.string().max(50).optional(),
1531
1547
  redirect_url: z.string().max(250).optional(),
1532
1548
  layout: z.enum(['in_app', 'full_page']).optional(),
1533
1549
  quote: AcceptQuoteHostedPageQuoteSchema.optional(),
@@ -1538,6 +1554,7 @@ const ExtendSubscriptionHostedPageSubscriptionSchema = z.object({
1538
1554
  id: z.string().max(50),
1539
1555
  });
1540
1556
  const ExtendSubscriptionHostedPageBodySchema = z.looseObject({
1557
+ brand_id: z.string().max(50).optional(),
1541
1558
  expiry: z.number().int().min(1).max(500).optional(),
1542
1559
  billing_cycle: z.number().int().min(1).optional(),
1543
1560
  subscription: ExtendSubscriptionHostedPageSubscriptionSchema.optional(),
@@ -1589,6 +1606,7 @@ const CheckoutGiftForItemsHostedPageItemTiersSchema = z.object({
1589
1606
  const CheckoutGiftForItemsHostedPageBodySchema = z.looseObject({
1590
1607
  layout: z.enum(['in_app', 'full_page']).optional(),
1591
1608
  business_entity_id: z.string().max(50).optional(),
1609
+ brand_id: z.string().max(50).optional(),
1592
1610
  redirect_url: z.string().max(250).optional(),
1593
1611
  coupon_ids: z.array(z.string().max(100).optional()).optional(),
1594
1612
  gifter: CheckoutGiftForItemsHostedPageGifterSchema.optional(),
@@ -1604,6 +1622,7 @@ const ClaimGiftHostedPageCustomerSchema = z.object({
1604
1622
  locale: z.string().max(50).optional(),
1605
1623
  });
1606
1624
  const ClaimGiftHostedPageBodySchema = z.looseObject({
1625
+ brand_id: z.string().max(50).optional(),
1607
1626
  redirect_url: z.string().max(250).optional(),
1608
1627
  gift: ClaimGiftHostedPageGiftSchema.optional(),
1609
1628
  customer: ClaimGiftHostedPageCustomerSchema.optional(),
@@ -1746,6 +1765,7 @@ const PreCancelHostedPageSubscriptionSchema = z.object({
1746
1765
  id: z.string().max(50),
1747
1766
  });
1748
1767
  const PreCancelHostedPageBodySchema = z.looseObject({
1768
+ brand_id: z.string().max(50).optional(),
1749
1769
  pass_thru_content: z.string().max(2048).optional(),
1750
1770
  cancel_url: z.string().max(250).optional(),
1751
1771
  redirect_url: z.string().max(250).optional(),
@@ -5,6 +5,8 @@ export * from './alert.schema.js';
5
5
  export * from './alert_status.schema.js';
6
6
  export * from './attached_item.schema.js';
7
7
  export * from './business_entity.schema.js';
8
+ export * from './business_rule.schema.js';
9
+ export * from './business_ruleset.schema.js';
8
10
  export * from './card.schema.js';
9
11
  export * from './comment.schema.js';
10
12
  export * from './coupon.schema.js';
@@ -16,6 +18,9 @@ export * from './currency.schema.js';
16
18
  export * from './customer.schema.js';
17
19
  export * from './customer_entitlement.schema.js';
18
20
  export * from './differential_price.schema.js';
21
+ export * from './dispute.schema.js';
22
+ export * from './einvoice.schema.js';
23
+ export * from './email_log.schema.js';
19
24
  export * from './entitlement.schema.js';
20
25
  export * from './entitlement_override.schema.js';
21
26
  export * from './estimate.schema.js';
@@ -43,6 +48,7 @@ export * from './omnichannel_subscription.schema.js';
43
48
  export * from './omnichannel_subscription_item.schema.js';
44
49
  export * from './order.schema.js';
45
50
  export * from './payment_intent.schema.js';
51
+ export * from './payment_schedule.schema.js';
46
52
  export * from './payment_schedule_scheme.schema.js';
47
53
  export * from './payment_source.schema.js';
48
54
  export * from './payment_voucher.schema.js';
@@ -87,6 +87,7 @@ const CreateInvoiceCardSchema = z.object({
87
87
  'tempus',
88
88
  'moyasar',
89
89
  'payway',
90
+ 'payu',
90
91
  ])
91
92
  .optional(),
92
93
  gateway_account_id: z.string().max(50).optional(),
@@ -98,7 +99,7 @@ const CreateInvoiceCardSchema = z.object({
98
99
  expiry_year: z.number().int().optional(),
99
100
  cvv: z.string().max(520).optional(),
100
101
  preferred_scheme: z
101
- .enum(['cartes_bancaires', 'mastercard', 'visa'])
102
+ .enum(['cartes_bancaires', 'mastercard', 'visa', 'dankort'])
102
103
  .optional(),
103
104
  billing_addr1: z.string().max(150).optional(),
104
105
  billing_addr2: z.string().max(150).optional(),
@@ -189,6 +190,19 @@ const CreateInvoicePaymentMethodSchema = z.object({
189
190
  'touch_n_go',
190
191
  'tamara',
191
192
  'qpay',
193
+ 'ovo',
194
+ 'momo',
195
+ 'mercado_pago',
196
+ 'nequi',
197
+ 'nupay',
198
+ 'picpay',
199
+ 'thai_qr',
200
+ 'blik',
201
+ 'fpx',
202
+ 'wero',
203
+ 'p24',
204
+ 'affirm_pay',
205
+ 'rakuten_pay',
192
206
  ])
193
207
  .optional(),
194
208
  gateway: z
@@ -252,6 +266,7 @@ const CreateInvoicePaymentMethodSchema = z.object({
252
266
  'tempus',
253
267
  'moyasar',
254
268
  'payway',
269
+ 'payu',
255
270
  ])
256
271
  .optional(),
257
272
  gateway_account_id: z.string().max(50).optional(),
@@ -318,6 +333,19 @@ const CreateInvoicePaymentIntentSchema = z.object({
318
333
  'touch_n_go',
319
334
  'tamara',
320
335
  'qpay',
336
+ 'ovo',
337
+ 'momo',
338
+ 'mercado_pago',
339
+ 'nequi',
340
+ 'nupay',
341
+ 'picpay',
342
+ 'thai_qr',
343
+ 'blik',
344
+ 'fpx',
345
+ 'wero',
346
+ 'p24',
347
+ 'affirm_pay',
348
+ 'rakuten_pay',
321
349
  ])
322
350
  .optional(),
323
351
  reference_id: z.string().max(65000).optional(),
@@ -477,6 +505,7 @@ const CreateForChargeItemsAndChargesInvoiceCardSchema = z.object({
477
505
  'tempus',
478
506
  'moyasar',
479
507
  'payway',
508
+ 'payu',
480
509
  ])
481
510
  .optional(),
482
511
  gateway_account_id: z.string().max(50).optional(),
@@ -488,7 +517,7 @@ const CreateForChargeItemsAndChargesInvoiceCardSchema = z.object({
488
517
  expiry_year: z.number().int().optional(),
489
518
  cvv: z.string().max(520).optional(),
490
519
  preferred_scheme: z
491
- .enum(['cartes_bancaires', 'mastercard', 'visa'])
520
+ .enum(['cartes_bancaires', 'mastercard', 'visa', 'dankort'])
492
521
  .optional(),
493
522
  billing_addr1: z.string().max(150).optional(),
494
523
  billing_addr2: z.string().max(150).optional(),
@@ -579,6 +608,19 @@ const CreateForChargeItemsAndChargesInvoicePaymentMethodSchema = z.object({
579
608
  'touch_n_go',
580
609
  'tamara',
581
610
  'qpay',
611
+ 'ovo',
612
+ 'momo',
613
+ 'mercado_pago',
614
+ 'nequi',
615
+ 'nupay',
616
+ 'picpay',
617
+ 'thai_qr',
618
+ 'blik',
619
+ 'fpx',
620
+ 'wero',
621
+ 'p24',
622
+ 'affirm_pay',
623
+ 'rakuten_pay',
582
624
  ])
583
625
  .optional(),
584
626
  gateway: z
@@ -642,6 +684,7 @@ const CreateForChargeItemsAndChargesInvoicePaymentMethodSchema = z.object({
642
684
  'tempus',
643
685
  'moyasar',
644
686
  'payway',
687
+ 'payu',
645
688
  ])
646
689
  .optional(),
647
690
  gateway_account_id: z.string().max(50).optional(),
@@ -708,6 +751,19 @@ const CreateForChargeItemsAndChargesInvoicePaymentIntentSchema = z.object({
708
751
  'touch_n_go',
709
752
  'tamara',
710
753
  'qpay',
754
+ 'ovo',
755
+ 'momo',
756
+ 'mercado_pago',
757
+ 'nequi',
758
+ 'nupay',
759
+ 'picpay',
760
+ 'thai_qr',
761
+ 'blik',
762
+ 'fpx',
763
+ 'wero',
764
+ 'p24',
765
+ 'affirm_pay',
766
+ 'rakuten_pay',
711
767
  ])
712
768
  .optional(),
713
769
  reference_id: z.string().max(65000).optional(),
@@ -723,7 +779,7 @@ const CreateForChargeItemsAndChargesInvoiceItemPricesSchema = z.object({
723
779
  date_from: z.array(z.number().int().optional()).optional(),
724
780
  date_to: z.array(z.number().int().optional()).optional(),
725
781
  description: z.array(z.string().max(250).optional()).optional(),
726
- entity_description: z.array(z.string().max(500).optional()).optional(),
782
+ entity_description: z.array(z.string().max(2000).optional()).optional(),
727
783
  });
728
784
  const CreateForChargeItemsAndChargesInvoiceItemTiersSchema = z.object({
729
785
  item_price_id: z.array(z.string().max(100).optional()).optional(),
@@ -739,7 +795,7 @@ const CreateForChargeItemsAndChargesInvoiceItemTiersSchema = z.object({
739
795
  package_size: z.array(z.number().int().min(1).optional()).optional(),
740
796
  });
741
797
  const CreateForChargeItemsAndChargesInvoiceChargesSchema = z.object({
742
- entity_description: z.array(z.string().max(500).optional()).optional(),
798
+ entity_description: z.array(z.string().max(2000).optional()).optional(),
743
799
  amount: z.array(z.number().int().min(1).optional()).optional(),
744
800
  amount_in_decimal: z.array(z.string().max(39).optional()).optional(),
745
801
  description: z.array(z.string().max(250).optional()).optional(),
@@ -1012,6 +1068,8 @@ const ImportInvoiceInvoiceLineItemsSchema = z.object({
1012
1068
  tax9_amount: z.array(z.number().int().min(0).optional()).optional(),
1013
1069
  tax10_name: z.array(z.string().max(50).optional()).optional(),
1014
1070
  tax10_amount: z.array(z.number().int().min(0).optional()).optional(),
1071
+ is_partial_tax_applied: z.array(z.boolean().optional()).optional(),
1072
+ taxable_amount: z.array(z.number().int().min(0).optional()).optional(),
1015
1073
  proration_mode: z
1016
1074
  .array(z
1017
1075
  .enum(['reset', 'delta', 'service_period_revision', 'adjusted_term'])
@@ -1084,10 +1142,12 @@ const ImportInvoiceInvoicePaymentsSchema = z.object({
1084
1142
  'app_store',
1085
1143
  'play_store',
1086
1144
  'custom',
1087
- 'dana',
1088
- 'touch_n_go',
1089
1145
  'tamara',
1090
1146
  'qpay',
1147
+ 'blik',
1148
+ 'fpx',
1149
+ 'wero',
1150
+ 'p24',
1091
1151
  ])
1092
1152
  .optional()),
1093
1153
  date: z.array(z.number().int().optional()).optional(),
@@ -1552,10 +1612,12 @@ const RecordPaymentInvoiceTransactionSchema = z.object({
1552
1612
  'app_store',
1553
1613
  'play_store',
1554
1614
  'custom',
1555
- 'dana',
1556
- 'touch_n_go',
1557
1615
  'tamara',
1558
1616
  'qpay',
1617
+ 'blik',
1618
+ 'fpx',
1619
+ 'wero',
1620
+ 'p24',
1559
1621
  ]),
1560
1622
  reference_number: z.string().max(100).optional(),
1561
1623
  custom_payment_method_id: z.string().max(50).optional(),
@@ -1622,10 +1684,12 @@ const RecordRefundInvoiceTransactionSchema = z.object({
1622
1684
  'app_store',
1623
1685
  'play_store',
1624
1686
  'custom',
1625
- 'dana',
1626
- 'touch_n_go',
1627
1687
  'tamara',
1628
1688
  'qpay',
1689
+ 'blik',
1690
+ 'fpx',
1691
+ 'wero',
1692
+ 'p24',
1629
1693
  ]),
1630
1694
  reference_number: z.string().max(100).optional(),
1631
1695
  custom_payment_method_id: z.string().max(50).optional(),
@@ -27,6 +27,7 @@ const ListLedgerOperationsLedgerOperationTypeSchema = z.object({
27
27
  'void',
28
28
  'rollover',
29
29
  'adjustment',
30
+ 'overdraft_settlement',
30
31
  ])
31
32
  .optional(),
32
33
  in: z
@@ -40,6 +41,7 @@ const ListLedgerOperationsLedgerOperationTypeSchema = z.object({
40
41
  'void',
41
42
  'rollover',
42
43
  'adjustment',
44
+ 'overdraft_settlement',
43
45
  ])
44
46
  .optional(),
45
47
  });
@@ -104,7 +106,9 @@ const AllocateLedgerOperationMetadataSchema = z.looseObject({});
104
106
  const AllocateLedgerOperationBodySchema = z.looseObject({
105
107
  subscription_id: z.string().max(50),
106
108
  unit_id: z.string().max(50),
109
+ id: z.string().max(50).optional(),
107
110
  amount: z.string().max(36),
111
+ effective_from: z.number().int().optional(),
108
112
  expires_at: z.number().int(),
109
113
  metadata: AllocateLedgerOperationMetadataSchema.optional(),
110
114
  });
@@ -4,8 +4,8 @@
4
4
  import { z } from 'zod';
5
5
  //Meter.list
6
6
  const ListMeterNameSchema = z.object({
7
- is: z.string().min(1).optional(),
8
7
  starts_with: z.string().min(1).optional(),
8
+ is: z.string().min(1).optional(),
9
9
  });
10
10
  const ListMeterSortBySchema = z.looseObject({
11
11
  asc: z.enum(['id', 'name', 'created_at', 'updated_at']).optional(),
@@ -11,7 +11,7 @@ const CreateMeteredFeatureBodySchema = z.looseObject({
11
11
  name: z.string().max(50),
12
12
  description: z.string().max(250).optional(),
13
13
  feature_unit: z.string().max(50),
14
- query: z.string().max(500),
14
+ query: z.string().max(1000),
15
15
  column_definitions: CreateMeteredFeatureColumnDefinitionsSchema.optional(),
16
16
  });
17
17
  export { CreateMeteredFeatureBodySchema };