chargebee 3.32.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 (113) hide show
  1. package/CHANGELOG.md +196 -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 +38 -9
  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 +27 -1
  18. package/cjs/schema/hosted_page.schema.js +26 -6
  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/payment_intent.schema.js +27 -0
  25. package/cjs/schema/payment_schedule.schema.js +36 -0
  26. package/cjs/schema/payment_schedule_scheme.schema.js +23 -2
  27. package/cjs/schema/payment_source.schema.js +103 -1
  28. package/cjs/schema/pricing_page_session.schema.js +1 -0
  29. package/cjs/schema/promotional_grant.schema.js +2 -0
  30. package/cjs/schema/purchase.schema.js +14 -1
  31. package/cjs/schema/quote.schema.js +2 -2
  32. package/cjs/schema/ramp.schema.js +8 -0
  33. package/cjs/schema/subscription.schema.js +179 -16
  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 +38 -9
  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 +27 -1
  52. package/esm/schema/hosted_page.schema.js +26 -6
  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 +1 -1
  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/quote.schema.js +2 -2
  67. package/esm/schema/ramp.schema.js +8 -0
  68. package/esm/schema/subscription.schema.js +179 -16
  69. package/esm/schema/subscription_entitlement.schema.js +2 -2
  70. package/esm/schema/transaction.schema.js +60 -2
  71. package/esm/schema/webhook_endpoint.schema.js +28 -0
  72. package/package.json +1 -1
  73. package/types/core.d.ts +86 -8
  74. package/types/index.d.ts +15 -0
  75. package/types/resources/AppliedBusinessRule.d.ts +15 -0
  76. package/types/resources/AppliedRule.d.ts +14 -0
  77. package/types/resources/ApplyRule.d.ts +28 -0
  78. package/types/resources/BusinessRule.d.ts +161 -0
  79. package/types/resources/BusinessRuleset.d.ts +165 -0
  80. package/types/resources/BusinessRulesetRule.d.ts +9 -0
  81. package/types/resources/Card.d.ts +1 -1
  82. package/types/resources/Content.d.ts +9 -0
  83. package/types/resources/Coupon.d.ts +2 -2
  84. package/types/resources/CreditNote.d.ts +12 -0
  85. package/types/resources/CustomDataSchema.d.ts +15 -0
  86. package/types/resources/Customer.d.ts +42 -5
  87. package/types/resources/Dispute.d.ts +65 -0
  88. package/types/resources/Einvoice.d.ts +64 -1
  89. package/types/resources/EmailLog.d.ts +45 -0
  90. package/types/resources/Estimate.d.ts +34 -5
  91. package/types/resources/Event.d.ts +15 -0
  92. package/types/resources/Gift.d.ts +29 -3
  93. package/types/resources/GrantBlock.d.ts +26 -7
  94. package/types/resources/HostedPage.d.ts +14 -3
  95. package/types/resources/Invoice.d.ts +42 -4
  96. package/types/resources/LedgerEntry.d.ts +4 -4
  97. package/types/resources/LedgerOperation.d.ts +15 -8
  98. package/types/resources/OmnichannelSubscriptionItem.d.ts +5 -1
  99. package/types/resources/PaymentIntent.d.ts +72 -5
  100. package/types/resources/PaymentSchedule.d.ts +38 -1
  101. package/types/resources/PaymentScheduleEstimate.d.ts +1 -0
  102. package/types/resources/PaymentScheduleScheme.d.ts +17 -1
  103. package/types/resources/PaymentSource.d.ts +31 -2
  104. package/types/resources/PricingPageSession.d.ts +1 -0
  105. package/types/resources/PromotionalGrant.d.ts +2 -0
  106. package/types/resources/Purchase.d.ts +14 -1
  107. package/types/resources/Quote.d.ts +2 -2
  108. package/types/resources/QuotedSubscription.d.ts +3 -2
  109. package/types/resources/Ramp.d.ts +12 -0
  110. package/types/resources/Subscription.d.ts +116 -17
  111. package/types/resources/ThirdPartyPaymentMethod.d.ts +1 -0
  112. package/types/resources/Transaction.d.ts +5 -0
  113. package/types/resources/WebhookEvent.d.ts +70 -0
@@ -12,7 +12,7 @@ const CreateSubscriptionCustomerSchema = z.looseObject({
12
12
  company: z.string().max(250).optional(),
13
13
  phone: z.string().max(50).optional(),
14
14
  locale: z.string().max(50).optional(),
15
- taxability: z.enum(['taxable', 'exempt']).optional(),
15
+ taxability: z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
16
16
  entity_code: z
17
17
  .enum([
18
18
  'a',
@@ -137,6 +137,7 @@ const CreateSubscriptionCardSchema = z.object({
137
137
  'tempus',
138
138
  'moyasar',
139
139
  'payway',
140
+ 'payu',
140
141
  ])
141
142
  .optional(),
142
143
  gateway_account_id: z.string().max(50).optional(),
@@ -148,7 +149,7 @@ const CreateSubscriptionCardSchema = z.object({
148
149
  expiry_year: z.number().int().optional(),
149
150
  cvv: z.string().max(520).optional(),
150
151
  preferred_scheme: z
151
- .enum(['cartes_bancaires', 'mastercard', 'visa'])
152
+ .enum(['cartes_bancaires', 'mastercard', 'visa', 'dankort'])
152
153
  .optional(),
153
154
  billing_addr1: z.string().max(150).optional(),
154
155
  billing_addr2: z.string().max(150).optional(),
@@ -239,6 +240,19 @@ const CreateSubscriptionPaymentMethodSchema = z.object({
239
240
  'touch_n_go',
240
241
  'tamara',
241
242
  'qpay',
243
+ 'ovo',
244
+ 'momo',
245
+ 'mercado_pago',
246
+ 'nequi',
247
+ 'nupay',
248
+ 'picpay',
249
+ 'thai_qr',
250
+ 'blik',
251
+ 'fpx',
252
+ 'wero',
253
+ 'p24',
254
+ 'affirm_pay',
255
+ 'rakuten_pay',
242
256
  ])
243
257
  .optional(),
244
258
  gateway: z
@@ -302,6 +316,7 @@ const CreateSubscriptionPaymentMethodSchema = z.object({
302
316
  'tempus',
303
317
  'moyasar',
304
318
  'payway',
319
+ 'payu',
305
320
  ])
306
321
  .optional(),
307
322
  gateway_account_id: z.string().max(50).optional(),
@@ -368,6 +383,19 @@ const CreateSubscriptionPaymentIntentSchema = z.object({
368
383
  'touch_n_go',
369
384
  'tamara',
370
385
  'qpay',
386
+ 'ovo',
387
+ 'momo',
388
+ 'mercado_pago',
389
+ 'nequi',
390
+ 'nupay',
391
+ 'picpay',
392
+ 'thai_qr',
393
+ 'blik',
394
+ 'fpx',
395
+ 'wero',
396
+ 'p24',
397
+ 'affirm_pay',
398
+ 'rakuten_pay',
371
399
  ])
372
400
  .optional(),
373
401
  reference_id: z.string().max(65000).optional(),
@@ -448,7 +476,8 @@ const CreateSubscriptionCouponsSchema = z.object({
448
476
  });
449
477
  const CreateSubscriptionBodySchema = z.looseObject({
450
478
  id: z.string().max(50).optional(),
451
- plan_id: z.string().max(100),
479
+ brand_id: z.string().max(50).optional(),
480
+ plan_id: z.string().max(100).optional(),
452
481
  plan_quantity: z.number().int().min(1).optional(),
453
482
  plan_quantity_in_decimal: z.string().max(33).optional(),
454
483
  plan_unit_price: z.number().int().min(0).optional(),
@@ -606,6 +635,19 @@ const CreateForCustomerSubscriptionPaymentIntentSchema = z.object({
606
635
  'touch_n_go',
607
636
  'tamara',
608
637
  'qpay',
638
+ 'ovo',
639
+ 'momo',
640
+ 'mercado_pago',
641
+ 'nequi',
642
+ 'nupay',
643
+ 'picpay',
644
+ 'thai_qr',
645
+ 'blik',
646
+ 'fpx',
647
+ 'wero',
648
+ 'p24',
649
+ 'affirm_pay',
650
+ 'rakuten_pay',
609
651
  ])
610
652
  .optional(),
611
653
  reference_id: z.string().max(65000).optional(),
@@ -654,7 +696,8 @@ const CreateForCustomerSubscriptionCouponsSchema = z.object({
654
696
  });
655
697
  const CreateForCustomerSubscriptionBodySchema = z.looseObject({
656
698
  id: z.string().max(50).optional(),
657
- plan_id: z.string().max(100),
699
+ brand_id: z.string().max(50).optional(),
700
+ plan_id: z.string().max(100).optional(),
658
701
  plan_quantity: z.number().int().min(1).optional(),
659
702
  plan_quantity_in_decimal: z.string().max(33).optional(),
660
703
  plan_unit_price: z.number().int().min(0).optional(),
@@ -804,6 +847,19 @@ const CreateWithItemsSubscriptionPaymentIntentSchema = z.object({
804
847
  'touch_n_go',
805
848
  'tamara',
806
849
  'qpay',
850
+ 'ovo',
851
+ 'momo',
852
+ 'mercado_pago',
853
+ 'nequi',
854
+ 'nupay',
855
+ 'picpay',
856
+ 'thai_qr',
857
+ 'blik',
858
+ 'fpx',
859
+ 'wero',
860
+ 'p24',
861
+ 'affirm_pay',
862
+ 'rakuten_pay',
807
863
  ])
808
864
  .optional(),
809
865
  reference_id: z.string().max(65000).optional(),
@@ -843,6 +899,7 @@ const CreateWithItemsSubscriptionSubscriptionItemsSchema = z.object({
843
899
  .optional(),
844
900
  charge_once: z.array(z.boolean().optional()).optional(),
845
901
  item_type: z.array(z.enum(['plan', 'addon', 'charge']).optional()).optional(),
902
+ description: z.array(z.string().max(500).optional()).optional(),
846
903
  charge_on_option: z
847
904
  .array(z.enum(['immediately', 'on_event']).optional())
848
905
  .optional(),
@@ -885,6 +942,7 @@ const CreateWithItemsSubscriptionCouponsSchema = z.object({
885
942
  const CreateWithItemsSubscriptionBodySchema = z.looseObject({
886
943
  id: z.string().max(50).optional(),
887
944
  business_entity_id: z.string().max(50).optional(),
945
+ brand_id: z.string().max(50).optional(),
888
946
  trial_end: z.number().int().optional(),
889
947
  billing_cycles: z.number().int().min(0).optional(),
890
948
  setup_fee: z.number().int().min(0).optional(),
@@ -1361,6 +1419,7 @@ const UpdateSubscriptionCardSchema = z.object({
1361
1419
  'tempus',
1362
1420
  'moyasar',
1363
1421
  'payway',
1422
+ 'payu',
1364
1423
  ])
1365
1424
  .optional(),
1366
1425
  gateway_account_id: z.string().max(50).optional(),
@@ -1372,7 +1431,7 @@ const UpdateSubscriptionCardSchema = z.object({
1372
1431
  expiry_year: z.number().int().optional(),
1373
1432
  cvv: z.string().max(520).optional(),
1374
1433
  preferred_scheme: z
1375
- .enum(['cartes_bancaires', 'mastercard', 'visa'])
1434
+ .enum(['cartes_bancaires', 'mastercard', 'visa', 'dankort'])
1376
1435
  .optional(),
1377
1436
  billing_addr1: z.string().max(150).optional(),
1378
1437
  billing_addr2: z.string().max(150).optional(),
@@ -1441,6 +1500,19 @@ const UpdateSubscriptionPaymentMethodSchema = z.object({
1441
1500
  'touch_n_go',
1442
1501
  'tamara',
1443
1502
  'qpay',
1503
+ 'ovo',
1504
+ 'momo',
1505
+ 'mercado_pago',
1506
+ 'nequi',
1507
+ 'nupay',
1508
+ 'picpay',
1509
+ 'thai_qr',
1510
+ 'blik',
1511
+ 'fpx',
1512
+ 'wero',
1513
+ 'p24',
1514
+ 'affirm_pay',
1515
+ 'rakuten_pay',
1444
1516
  ])
1445
1517
  .optional(),
1446
1518
  gateway: z
@@ -1504,6 +1576,7 @@ const UpdateSubscriptionPaymentMethodSchema = z.object({
1504
1576
  'tempus',
1505
1577
  'moyasar',
1506
1578
  'payway',
1579
+ 'payu',
1507
1580
  ])
1508
1581
  .optional(),
1509
1582
  gateway_account_id: z.string().max(50).optional(),
@@ -1570,6 +1643,19 @@ const UpdateSubscriptionPaymentIntentSchema = z.object({
1570
1643
  'touch_n_go',
1571
1644
  'tamara',
1572
1645
  'qpay',
1646
+ 'ovo',
1647
+ 'momo',
1648
+ 'mercado_pago',
1649
+ 'nequi',
1650
+ 'nupay',
1651
+ 'picpay',
1652
+ 'thai_qr',
1653
+ 'blik',
1654
+ 'fpx',
1655
+ 'wero',
1656
+ 'p24',
1657
+ 'affirm_pay',
1658
+ 'rakuten_pay',
1573
1659
  ])
1574
1660
  .optional(),
1575
1661
  reference_id: z.string().max(65000).optional(),
@@ -1817,6 +1903,7 @@ const UpdateForItemsSubscriptionCardSchema = z.object({
1817
1903
  'tempus',
1818
1904
  'moyasar',
1819
1905
  'payway',
1906
+ 'payu',
1820
1907
  ])
1821
1908
  .optional(),
1822
1909
  gateway_account_id: z.string().max(50).optional(),
@@ -1828,7 +1915,7 @@ const UpdateForItemsSubscriptionCardSchema = z.object({
1828
1915
  expiry_year: z.number().int().optional(),
1829
1916
  cvv: z.string().max(520).optional(),
1830
1917
  preferred_scheme: z
1831
- .enum(['cartes_bancaires', 'mastercard', 'visa'])
1918
+ .enum(['cartes_bancaires', 'mastercard', 'visa', 'dankort'])
1832
1919
  .optional(),
1833
1920
  billing_addr1: z.string().max(150).optional(),
1834
1921
  billing_addr2: z.string().max(150).optional(),
@@ -1897,6 +1984,19 @@ const UpdateForItemsSubscriptionPaymentMethodSchema = z.object({
1897
1984
  'touch_n_go',
1898
1985
  'tamara',
1899
1986
  'qpay',
1987
+ 'ovo',
1988
+ 'momo',
1989
+ 'mercado_pago',
1990
+ 'nequi',
1991
+ 'nupay',
1992
+ 'picpay',
1993
+ 'thai_qr',
1994
+ 'blik',
1995
+ 'fpx',
1996
+ 'wero',
1997
+ 'p24',
1998
+ 'affirm_pay',
1999
+ 'rakuten_pay',
1900
2000
  ])
1901
2001
  .optional(),
1902
2002
  gateway: z
@@ -1960,6 +2060,7 @@ const UpdateForItemsSubscriptionPaymentMethodSchema = z.object({
1960
2060
  'tempus',
1961
2061
  'moyasar',
1962
2062
  'payway',
2063
+ 'payu',
1963
2064
  ])
1964
2065
  .optional(),
1965
2066
  gateway_account_id: z.string().max(50).optional(),
@@ -2026,6 +2127,19 @@ const UpdateForItemsSubscriptionPaymentIntentSchema = z.object({
2026
2127
  'touch_n_go',
2027
2128
  'tamara',
2028
2129
  'qpay',
2130
+ 'ovo',
2131
+ 'momo',
2132
+ 'mercado_pago',
2133
+ 'nequi',
2134
+ 'nupay',
2135
+ 'picpay',
2136
+ 'thai_qr',
2137
+ 'blik',
2138
+ 'fpx',
2139
+ 'wero',
2140
+ 'p24',
2141
+ 'affirm_pay',
2142
+ 'rakuten_pay',
2029
2143
  ])
2030
2144
  .optional(),
2031
2145
  reference_id: z.string().max(65000).optional(),
@@ -2119,6 +2233,7 @@ const UpdateForItemsSubscriptionSubscriptionItemsSchema = z.object({
2119
2233
  .array(z.enum(['immediately', 'on_event']).optional())
2120
2234
  .optional(),
2121
2235
  item_type: z.array(z.enum(['plan', 'addon', 'charge']).optional()).optional(),
2236
+ description: z.array(z.string().max(500).optional()).optional(),
2122
2237
  proration_type: z
2123
2238
  .array(z.enum(['full_term', 'partial_term', 'none']).optional())
2124
2239
  .optional(),
@@ -2316,6 +2431,19 @@ const ReactivateSubscriptionPaymentIntentSchema = z.object({
2316
2431
  'touch_n_go',
2317
2432
  'tamara',
2318
2433
  'qpay',
2434
+ 'ovo',
2435
+ 'momo',
2436
+ 'mercado_pago',
2437
+ 'nequi',
2438
+ 'nupay',
2439
+ 'picpay',
2440
+ 'thai_qr',
2441
+ 'blik',
2442
+ 'fpx',
2443
+ 'wero',
2444
+ 'p24',
2445
+ 'affirm_pay',
2446
+ 'rakuten_pay',
2319
2447
  ])
2320
2448
  .optional(),
2321
2449
  reference_id: z.string().max(65000).optional(),
@@ -2438,7 +2566,7 @@ const ImportSubscriptionSubscriptionCustomerSchema = z.looseObject({
2438
2566
  company: z.string().max(250).optional(),
2439
2567
  phone: z.string().max(50).optional(),
2440
2568
  locale: z.string().max(50).optional(),
2441
- taxability: z.enum(['taxable', 'exempt']).optional(),
2569
+ taxability: z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
2442
2570
  entity_code: z
2443
2571
  .enum([
2444
2572
  'a',
@@ -2550,6 +2678,7 @@ const ImportSubscriptionSubscriptionCardSchema = z.object({
2550
2678
  'tempus',
2551
2679
  'moyasar',
2552
2680
  'payway',
2681
+ 'payu',
2553
2682
  ])
2554
2683
  .optional(),
2555
2684
  gateway_account_id: z.string().max(50).optional(),
@@ -2561,7 +2690,7 @@ const ImportSubscriptionSubscriptionCardSchema = z.object({
2561
2690
  expiry_year: z.number().int().optional(),
2562
2691
  cvv: z.string().max(520).optional(),
2563
2692
  preferred_scheme: z
2564
- .enum(['cartes_bancaires', 'mastercard', 'visa'])
2693
+ .enum(['cartes_bancaires', 'mastercard', 'visa', 'dankort'])
2565
2694
  .optional(),
2566
2695
  billing_addr1: z.string().max(150).optional(),
2567
2696
  billing_addr2: z.string().max(150).optional(),
@@ -2629,6 +2758,19 @@ const ImportSubscriptionSubscriptionPaymentMethodSchema = z.object({
2629
2758
  'touch_n_go',
2630
2759
  'tamara',
2631
2760
  'qpay',
2761
+ 'ovo',
2762
+ 'momo',
2763
+ 'mercado_pago',
2764
+ 'nequi',
2765
+ 'nupay',
2766
+ 'picpay',
2767
+ 'thai_qr',
2768
+ 'blik',
2769
+ 'fpx',
2770
+ 'wero',
2771
+ 'p24',
2772
+ 'affirm_pay',
2773
+ 'rakuten_pay',
2632
2774
  ])
2633
2775
  .optional(),
2634
2776
  gateway: z
@@ -2692,6 +2834,7 @@ const ImportSubscriptionSubscriptionPaymentMethodSchema = z.object({
2692
2834
  'tempus',
2693
2835
  'moyasar',
2694
2836
  'payway',
2837
+ 'payu',
2695
2838
  ])
2696
2839
  .optional(),
2697
2840
  gateway_account_id: z.string().max(50).optional(),
@@ -2746,10 +2889,12 @@ const ImportSubscriptionSubscriptionTransactionSchema = z.object({
2746
2889
  'app_store',
2747
2890
  'play_store',
2748
2891
  'custom',
2749
- 'dana',
2750
- 'touch_n_go',
2751
2892
  'tamara',
2752
2893
  'qpay',
2894
+ 'blik',
2895
+ 'fpx',
2896
+ 'wero',
2897
+ 'p24',
2753
2898
  ])
2754
2899
  .optional(),
2755
2900
  reference_number: z.string().max(100).optional(),
@@ -2796,7 +2941,7 @@ const ImportSubscriptionSubscriptionCouponsSchema = z.object({
2796
2941
  const ImportSubscriptionSubscriptionBodySchema = z.looseObject({
2797
2942
  id: z.string().max(50).optional(),
2798
2943
  client_profile_id: z.string().max(50).optional(),
2799
- plan_id: z.string().max(100),
2944
+ plan_id: z.string().max(100).optional(),
2800
2945
  plan_quantity: z.number().int().min(1).optional(),
2801
2946
  plan_quantity_in_decimal: z.string().max(33).optional(),
2802
2947
  plan_unit_price: z.number().int().min(0).optional(),
@@ -2873,10 +3018,12 @@ const ImportForCustomerSubscriptionTransactionSchema = z.object({
2873
3018
  'app_store',
2874
3019
  'play_store',
2875
3020
  'custom',
2876
- 'dana',
2877
- 'touch_n_go',
2878
3021
  'tamara',
2879
3022
  'qpay',
3023
+ 'blik',
3024
+ 'fpx',
3025
+ 'wero',
3026
+ 'p24',
2880
3027
  ])
2881
3028
  .optional(),
2882
3029
  reference_number: z.string().max(100).optional(),
@@ -2940,7 +3087,7 @@ const ImportForCustomerSubscriptionCouponsSchema = z.object({
2940
3087
  });
2941
3088
  const ImportForCustomerSubscriptionBodySchema = z.looseObject({
2942
3089
  id: z.string().max(50).optional(),
2943
- plan_id: z.string().max(100),
3090
+ plan_id: z.string().max(100).optional(),
2944
3091
  plan_quantity: z.number().int().min(1).optional(),
2945
3092
  plan_quantity_in_decimal: z.string().max(33).optional(),
2946
3093
  plan_unit_price: z.number().int().min(0).optional(),
@@ -3101,10 +3248,12 @@ const ImportForItemsSubscriptionTransactionSchema = z.object({
3101
3248
  'app_store',
3102
3249
  'play_store',
3103
3250
  'custom',
3104
- 'dana',
3105
- 'touch_n_go',
3106
3251
  'tamara',
3107
3252
  'qpay',
3253
+ 'blik',
3254
+ 'fpx',
3255
+ 'wero',
3256
+ 'p24',
3108
3257
  ])
3109
3258
  .optional(),
3110
3259
  reference_number: z.string().max(100).optional(),
@@ -3152,6 +3301,7 @@ const ImportForItemsSubscriptionSubscriptionItemsSchema = z.object({
3152
3301
  .optional(),
3153
3302
  charge_once: z.array(z.boolean().optional()).optional(),
3154
3303
  item_type: z.array(z.enum(['plan', 'addon', 'charge']).optional()).optional(),
3304
+ description: z.array(z.string().max(500).optional()).optional(),
3155
3305
  });
3156
3306
  const ImportForItemsSubscriptionDiscountsSchema = z.object({
3157
3307
  apply_on: z
@@ -3408,6 +3558,19 @@ const ResumeSubscriptionPaymentIntentSchema = z.object({
3408
3558
  'touch_n_go',
3409
3559
  'tamara',
3410
3560
  'qpay',
3561
+ 'ovo',
3562
+ 'momo',
3563
+ 'mercado_pago',
3564
+ 'nequi',
3565
+ 'nupay',
3566
+ 'picpay',
3567
+ 'thai_qr',
3568
+ 'blik',
3569
+ 'fpx',
3570
+ 'wero',
3571
+ 'p24',
3572
+ 'affirm_pay',
3573
+ 'rakuten_pay',
3411
3574
  ])
3412
3575
  .optional(),
3413
3576
  reference_id: z.string().max(65000).optional(),
@@ -10,7 +10,7 @@ const SubscriptionEntitlementsForSubscriptionSubscriptionEntitlementBodySchema =
10
10
  embed: z.string().max(1000).optional(),
11
11
  include_scheduled_overrides: z.boolean().default(false).optional(),
12
12
  });
13
- export { SubscriptionEntitlementsForSubscriptionSubscriptionEntitlementBodySchema };
13
+ export { SubscriptionEntitlementsForSubscriptionSubscriptionEntitlementBodySchema, };
14
14
  //SubscriptionEntitlement.setSubscriptionEntitlementAvailability
15
15
  const SetSubscriptionEntitlementAvailabilitySubscriptionEntitlementSubscriptionEntitlementsSchema = z.object({
16
16
  feature_id: z.array(z.string().max(50).optional()),
@@ -19,4 +19,4 @@ const SetSubscriptionEntitlementAvailabilitySubscriptionEntitlementBodySchema =
19
19
  is_enabled: z.boolean(),
20
20
  subscription_entitlements: SetSubscriptionEntitlementAvailabilitySubscriptionEntitlementSubscriptionEntitlementsSchema.optional(),
21
21
  });
22
- export { SetSubscriptionEntitlementAvailabilitySubscriptionEntitlementBodySchema };
22
+ export { SetSubscriptionEntitlementAvailabilitySubscriptionEntitlementBodySchema, };
@@ -22,10 +22,12 @@ const RecordRefundTransactionBodySchema = z.looseObject({
22
22
  'app_store',
23
23
  'play_store',
24
24
  'custom',
25
- 'dana',
26
- 'touch_n_go',
27
25
  'tamara',
28
26
  'qpay',
27
+ 'blik',
28
+ 'fpx',
29
+ 'wero',
30
+ 'p24',
29
31
  ]),
30
32
  date: z.number().int(),
31
33
  reference_number: z.string().max(100).optional(),
@@ -145,6 +147,19 @@ const ListTransactionPaymentMethodSchema = z.object({
145
147
  'touch_n_go',
146
148
  'tamara',
147
149
  'qpay',
150
+ 'ovo',
151
+ 'momo',
152
+ 'mercado_pago',
153
+ 'nequi',
154
+ 'nupay',
155
+ 'picpay',
156
+ 'thai_qr',
157
+ 'blik',
158
+ 'fpx',
159
+ 'wero',
160
+ 'p24',
161
+ 'affirm_pay',
162
+ 'rakuten_pay',
148
163
  ])
149
164
  .optional(),
150
165
  is_not: z
@@ -213,6 +228,19 @@ const ListTransactionPaymentMethodSchema = z.object({
213
228
  'touch_n_go',
214
229
  'tamara',
215
230
  'qpay',
231
+ 'ovo',
232
+ 'momo',
233
+ 'mercado_pago',
234
+ 'nequi',
235
+ 'nupay',
236
+ 'picpay',
237
+ 'thai_qr',
238
+ 'blik',
239
+ 'fpx',
240
+ 'wero',
241
+ 'p24',
242
+ 'affirm_pay',
243
+ 'rakuten_pay',
216
244
  ])
217
245
  .optional(),
218
246
  in: z
@@ -281,6 +309,19 @@ const ListTransactionPaymentMethodSchema = z.object({
281
309
  'touch_n_go',
282
310
  'tamara',
283
311
  'qpay',
312
+ 'ovo',
313
+ 'momo',
314
+ 'mercado_pago',
315
+ 'nequi',
316
+ 'nupay',
317
+ 'picpay',
318
+ 'thai_qr',
319
+ 'blik',
320
+ 'fpx',
321
+ 'wero',
322
+ 'p24',
323
+ 'affirm_pay',
324
+ 'rakuten_pay',
284
325
  ])
285
326
  .optional(),
286
327
  not_in: z
@@ -349,6 +390,19 @@ const ListTransactionPaymentMethodSchema = z.object({
349
390
  'touch_n_go',
350
391
  'tamara',
351
392
  'qpay',
393
+ 'ovo',
394
+ 'momo',
395
+ 'mercado_pago',
396
+ 'nequi',
397
+ 'nupay',
398
+ 'picpay',
399
+ 'thai_qr',
400
+ 'blik',
401
+ 'fpx',
402
+ 'wero',
403
+ 'p24',
404
+ 'affirm_pay',
405
+ 'rakuten_pay',
352
406
  ])
353
407
  .optional(),
354
408
  });
@@ -415,6 +469,7 @@ const ListTransactionGatewaySchema = z.object({
415
469
  'tempus',
416
470
  'moyasar',
417
471
  'payway',
472
+ 'payu',
418
473
  'not_applicable',
419
474
  ])
420
475
  .optional(),
@@ -480,6 +535,7 @@ const ListTransactionGatewaySchema = z.object({
480
535
  'tempus',
481
536
  'moyasar',
482
537
  'payway',
538
+ 'payu',
483
539
  'not_applicable',
484
540
  ])
485
541
  .optional(),
@@ -545,6 +601,7 @@ const ListTransactionGatewaySchema = z.object({
545
601
  'tempus',
546
602
  'moyasar',
547
603
  'payway',
604
+ 'payu',
548
605
  'not_applicable',
549
606
  ])
550
607
  .optional(),
@@ -610,6 +667,7 @@ const ListTransactionGatewaySchema = z.object({
610
667
  'tempus',
611
668
  'moyasar',
612
669
  'payway',
670
+ 'payu',
613
671
  'not_applicable',
614
672
  ])
615
673
  .optional(),
@@ -76,6 +76,8 @@ const CreateWebhookEndpointBodySchema = z.looseObject({
76
76
  'credit_note_created_with_backdating',
77
77
  'credit_note_updated',
78
78
  'credit_note_deleted',
79
+ 'einvoice_created',
80
+ 'einvoice_updated',
79
81
  'payment_schedules_created',
80
82
  'payment_schedules_updated',
81
83
  'payment_schedule_scheme_created',
@@ -246,9 +248,21 @@ const CreateWebhookEndpointBodySchema = z.looseObject({
246
248
  'grant_blocks_created',
247
249
  'grant_blocks_updated',
248
250
  'ledger_updated',
251
+ 'business_rule_created',
252
+ 'business_rule_updated',
253
+ 'business_rule_activated',
254
+ 'business_rule_deactivated',
255
+ 'business_rule_deleted',
256
+ 'business_rule_released',
249
257
  'vault_token_created',
250
258
  'vault_token_updated',
251
259
  'vault_token_deleted',
260
+ 'business_rules_applied',
261
+ 'business_ruleset_created',
262
+ 'business_ruleset_updated',
263
+ 'business_ruleset_activated',
264
+ 'business_ruleset_deactivated',
265
+ 'business_ruleset_deleted',
252
266
  'plan_created',
253
267
  'plan_updated',
254
268
  'plan_deleted',
@@ -331,6 +345,8 @@ const UpdateWebhookEndpointBodySchema = z.looseObject({
331
345
  'credit_note_created_with_backdating',
332
346
  'credit_note_updated',
333
347
  'credit_note_deleted',
348
+ 'einvoice_created',
349
+ 'einvoice_updated',
334
350
  'payment_schedules_created',
335
351
  'payment_schedules_updated',
336
352
  'payment_schedule_scheme_created',
@@ -501,9 +517,21 @@ const UpdateWebhookEndpointBodySchema = z.looseObject({
501
517
  'grant_blocks_created',
502
518
  'grant_blocks_updated',
503
519
  'ledger_updated',
520
+ 'business_rule_created',
521
+ 'business_rule_updated',
522
+ 'business_rule_activated',
523
+ 'business_rule_deactivated',
524
+ 'business_rule_deleted',
525
+ 'business_rule_released',
504
526
  'vault_token_created',
505
527
  'vault_token_updated',
506
528
  'vault_token_deleted',
529
+ 'business_rules_applied',
530
+ 'business_ruleset_created',
531
+ 'business_ruleset_updated',
532
+ 'business_ruleset_activated',
533
+ 'business_ruleset_deactivated',
534
+ 'business_ruleset_deleted',
507
535
  'plan_created',
508
536
  'plan_updated',
509
537
  'plan_deleted',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chargebee",
3
- "version": "3.32.0",
3
+ "version": "3.34.0",
4
4
  "description": "A library for integrating with Chargebee.",
5
5
  "scripts": {
6
6
  "prepack": "npm ci && npm run build",