chargebee 3.28.0 → 3.29.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 (91) hide show
  1. package/CHANGELOG.md +91 -0
  2. package/cjs/RequestWrapper.js +0 -5
  3. package/cjs/chargebee.cjs.js +1 -1
  4. package/cjs/environment.js +1 -1
  5. package/cjs/resources/api_endpoints.js +57 -0
  6. package/cjs/resources/webhook/eventType.js +1 -0
  7. package/cjs/schema/alert.schema.js +6 -5
  8. package/cjs/schema/credit_note.schema.js +5 -0
  9. package/cjs/schema/customer.schema.js +15 -0
  10. package/cjs/schema/estimate.schema.js +9 -0
  11. package/cjs/schema/event.schema.js +4 -0
  12. package/cjs/schema/export.schema.js +20 -4
  13. package/cjs/schema/feature.schema.js +0 -1
  14. package/cjs/schema/gift.schema.js +6 -0
  15. package/cjs/schema/invoice.schema.js +33 -1
  16. package/cjs/schema/item.schema.js +1 -1
  17. package/cjs/schema/item_family.schema.js +1 -1
  18. package/cjs/schema/item_price.schema.js +1 -1
  19. package/cjs/schema/meter.schema.js +10 -0
  20. package/cjs/schema/omnichannel_subscription.schema.js +2 -2
  21. package/cjs/schema/payment_intent.schema.js +6 -0
  22. package/cjs/schema/payment_source.schema.js +21 -0
  23. package/cjs/schema/price_variant.schema.js +1 -1
  24. package/cjs/schema/purchase.schema.js +3 -0
  25. package/cjs/schema/ramp.schema.js +2 -0
  26. package/cjs/schema/recorded_purchase.schema.js +3 -0
  27. package/cjs/schema/subscription.schema.js +37 -0
  28. package/cjs/schema/transaction.schema.js +12 -0
  29. package/cjs/schema/webhook_endpoint.schema.js +2 -0
  30. package/cjs/telemetry/TelemetryAdapter.js +12 -7
  31. package/esm/RequestWrapper.js +0 -5
  32. package/esm/environment.js +1 -1
  33. package/esm/resources/api_endpoints.js +57 -0
  34. package/esm/resources/webhook/eventType.js +1 -0
  35. package/esm/schema/alert.schema.js +6 -5
  36. package/esm/schema/credit_note.schema.js +5 -0
  37. package/esm/schema/customer.schema.js +15 -0
  38. package/esm/schema/estimate.schema.js +9 -0
  39. package/esm/schema/event.schema.js +4 -0
  40. package/esm/schema/export.schema.js +20 -4
  41. package/esm/schema/feature.schema.js +0 -1
  42. package/esm/schema/gift.schema.js +6 -0
  43. package/esm/schema/invoice.schema.js +33 -1
  44. package/esm/schema/item.schema.js +1 -1
  45. package/esm/schema/item_family.schema.js +1 -1
  46. package/esm/schema/item_price.schema.js +1 -1
  47. package/esm/schema/meter.schema.js +10 -0
  48. package/esm/schema/omnichannel_subscription.schema.js +2 -2
  49. package/esm/schema/payment_intent.schema.js +6 -0
  50. package/esm/schema/payment_source.schema.js +21 -0
  51. package/esm/schema/price_variant.schema.js +1 -1
  52. package/esm/schema/purchase.schema.js +3 -0
  53. package/esm/schema/ramp.schema.js +2 -0
  54. package/esm/schema/recorded_purchase.schema.js +3 -0
  55. package/esm/schema/subscription.schema.js +37 -0
  56. package/esm/schema/transaction.schema.js +12 -0
  57. package/esm/schema/webhook_endpoint.schema.js +2 -0
  58. package/esm/telemetry/TelemetryAdapter.js +12 -7
  59. package/package.json +1 -1
  60. package/types/core.d.ts +40 -6
  61. package/types/index.d.ts +12 -8
  62. package/types/resources/Alert.d.ts +16 -3
  63. package/types/resources/AsyncResponse.d.ts +35 -0
  64. package/types/resources/AsyncResponseList.d.ts +8 -0
  65. package/types/resources/ColumnDefinition.d.ts +9 -0
  66. package/types/resources/Content.d.ts +5 -0
  67. package/types/resources/CreditNote.d.ts +15 -0
  68. package/types/resources/CreditNoteEstimate.d.ts +5 -0
  69. package/types/resources/Customer.d.ts +8 -2
  70. package/types/resources/Estimate.d.ts +11 -2
  71. package/types/resources/Event.d.ts +1 -0
  72. package/types/resources/Export.d.ts +1 -0
  73. package/types/resources/Feature.d.ts +2 -0
  74. package/types/resources/Gift.d.ts +8 -2
  75. package/types/resources/GrantBlock.d.ts +1 -1
  76. package/types/resources/Invoice.d.ts +33 -3
  77. package/types/resources/InvoiceEstimate.d.ts +5 -0
  78. package/types/resources/LedgerOperation.d.ts +1 -3
  79. package/types/resources/Meter.d.ts +42 -0
  80. package/types/resources/MeteredFeature.d.ts +70 -0
  81. package/types/resources/PaymentIntent.d.ts +37 -5
  82. package/types/resources/PaymentSource.d.ts +4 -1
  83. package/types/resources/PromotionalGrant.d.ts +1 -1
  84. package/types/resources/Purchase.d.ts +4 -1
  85. package/types/resources/Quote.d.ts +5 -0
  86. package/types/resources/QuoteLineGroup.d.ts +5 -0
  87. package/types/resources/QuotedCharge.d.ts +3 -0
  88. package/types/resources/Ramp.d.ts +4 -1
  89. package/types/resources/RecordedPurchase.d.ts +3 -0
  90. package/types/resources/Subscription.d.ts +29 -7
  91. package/types/resources/WebhookEvent.d.ts +7 -0
@@ -228,6 +228,7 @@ const ListEventEventTypeSchema = z.object({
228
228
  'business_entity_deleted',
229
229
  'customer_business_entity_changed',
230
230
  'subscription_business_entity_changed',
231
+ 'payment_source_business_entity_changed',
231
232
  'purchase_created',
232
233
  'voucher_created',
233
234
  'voucher_expired',
@@ -454,6 +455,7 @@ const ListEventEventTypeSchema = z.object({
454
455
  'business_entity_deleted',
455
456
  'customer_business_entity_changed',
456
457
  'subscription_business_entity_changed',
458
+ 'payment_source_business_entity_changed',
457
459
  'purchase_created',
458
460
  'voucher_created',
459
461
  'voucher_expired',
@@ -680,6 +682,7 @@ const ListEventEventTypeSchema = z.object({
680
682
  'business_entity_deleted',
681
683
  'customer_business_entity_changed',
682
684
  'subscription_business_entity_changed',
685
+ 'payment_source_business_entity_changed',
683
686
  'purchase_created',
684
687
  'voucher_created',
685
688
  'voucher_expired',
@@ -906,6 +909,7 @@ const ListEventEventTypeSchema = z.object({
906
909
  'business_entity_deleted',
907
910
  'customer_business_entity_changed',
908
911
  'subscription_business_entity_changed',
912
+ 'payment_source_business_entity_changed',
909
913
  'purchase_created',
910
914
  'voucher_created',
911
915
  'voucher_expired',
@@ -1640,6 +1640,9 @@ const SubscriptionsExportChannelSchema = z.object({
1640
1640
  in: z.enum(['web', 'app_store', 'play_store']).optional(),
1641
1641
  not_in: z.enum(['web', 'app_store', 'play_store']).optional(),
1642
1642
  });
1643
+ const SubscriptionsExportDecommissionedSchema = z.object({
1644
+ is: z.enum(['true', 'false']).optional(),
1645
+ });
1643
1646
  const SubscriptionsExportPlanIdSchema = z.object({
1644
1647
  is: z.string().min(1).optional(),
1645
1648
  is_not: z.string().min(1).optional(),
@@ -1662,6 +1665,7 @@ const SubscriptionsExportSubscriptionItemSchema = z.object({
1662
1665
  offline_payment_method: SubscriptionsExportOfflinePaymentMethodSchema.optional(),
1663
1666
  auto_close_invoices: SubscriptionsExportAutoCloseInvoicesSchema.optional(),
1664
1667
  channel: SubscriptionsExportChannelSchema.optional(),
1668
+ decommissioned: SubscriptionsExportDecommissionedSchema.optional(),
1665
1669
  plan_id: SubscriptionsExportPlanIdSchema.optional(),
1666
1670
  });
1667
1671
  const SubscriptionsExportBodySchema = z.looseObject({
@@ -2125,6 +2129,9 @@ const TransactionsExportPaymentMethodSchema = z.object({
2125
2129
  'paypay',
2126
2130
  'gcash',
2127
2131
  'south_korean_cards',
2132
+ 'paynow',
2133
+ 'bizum',
2134
+ 'promptpay',
2128
2135
  ])
2129
2136
  .optional(),
2130
2137
  is_not: z
@@ -2186,6 +2193,9 @@ const TransactionsExportPaymentMethodSchema = z.object({
2186
2193
  'paypay',
2187
2194
  'gcash',
2188
2195
  'south_korean_cards',
2196
+ 'paynow',
2197
+ 'bizum',
2198
+ 'promptpay',
2189
2199
  ])
2190
2200
  .optional(),
2191
2201
  in: z
@@ -2247,6 +2257,9 @@ const TransactionsExportPaymentMethodSchema = z.object({
2247
2257
  'paypay',
2248
2258
  'gcash',
2249
2259
  'south_korean_cards',
2260
+ 'paynow',
2261
+ 'bizum',
2262
+ 'promptpay',
2250
2263
  ])
2251
2264
  .optional(),
2252
2265
  not_in: z
@@ -2308,6 +2321,9 @@ const TransactionsExportPaymentMethodSchema = z.object({
2308
2321
  'paypay',
2309
2322
  'gcash',
2310
2323
  'south_korean_cards',
2324
+ 'paynow',
2325
+ 'bizum',
2326
+ 'promptpay',
2311
2327
  ])
2312
2328
  .optional(),
2313
2329
  });
@@ -2911,8 +2927,8 @@ const OrdersExportBodySchema = z.looseObject({
2911
2927
  export { OrdersExportBodySchema };
2912
2928
  //Export.itemFamilies
2913
2929
  const ItemFamiliesExportBusinessEntityIdSchema = z.object({
2914
- is: z.string().min(1).optional(),
2915
2930
  is_present: z.enum(['true', 'false']).optional(),
2931
+ is: z.string().min(1).optional(),
2916
2932
  });
2917
2933
  const ItemFamiliesExportIncludeSiteLevelResourcesSchema = z.object({
2918
2934
  is: z.enum(['true', 'false']).optional(),
@@ -2950,8 +2966,8 @@ const ItemFamiliesExportBodySchema = z.looseObject({
2950
2966
  export { ItemFamiliesExportBodySchema };
2951
2967
  //Export.items
2952
2968
  const ItemsExportBusinessEntityIdSchema = z.object({
2953
- is: z.string().min(1).optional(),
2954
2969
  is_present: z.enum(['true', 'false']).optional(),
2970
+ is: z.string().min(1).optional(),
2955
2971
  });
2956
2972
  const ItemsExportIncludeSiteLevelResourcesSchema = z.object({
2957
2973
  is: z.enum(['true', 'false']).optional(),
@@ -3066,8 +3082,8 @@ const ItemPricesExportCurrencyCodeSchema = z.object({
3066
3082
  not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
3067
3083
  });
3068
3084
  const ItemPricesExportBusinessEntityIdSchema = z.object({
3069
- is: z.string().min(1).optional(),
3070
3085
  is_present: z.enum(['true', 'false']).optional(),
3086
+ is: z.string().min(1).optional(),
3071
3087
  });
3072
3088
  const ItemPricesExportIncludeSiteLevelResourcesSchema = z.object({
3073
3089
  is: z.enum(['true', 'false']).optional(),
@@ -3327,8 +3343,8 @@ const DifferentialPricesExportBodySchema = z.looseObject({
3327
3343
  export { DifferentialPricesExportBodySchema };
3328
3344
  //Export.priceVariants
3329
3345
  const PriceVariantsExportBusinessEntityIdSchema = z.object({
3330
- is: z.string().min(1).optional(),
3331
3346
  is_present: z.enum(['true', 'false']).optional(),
3347
+ is: z.string().min(1).optional(),
3332
3348
  });
3333
3349
  const PriceVariantsExportIncludeSiteLevelResourcesSchema = z.object({
3334
3350
  is: z.enum(['true', 'false']).optional(),
@@ -55,7 +55,6 @@ const CreateFeatureBodySchema = z.looseObject({
55
55
  description: z.string().max(500).optional(),
56
56
  type: z.enum(['switch', 'custom', 'quantity', 'range']).optional(),
57
57
  unit: z.string().max(50).optional(),
58
- metered: z.boolean().optional(),
59
58
  levels: CreateFeatureLevelsSchema.optional(),
60
59
  });
61
60
  export { CreateFeatureBodySchema };
@@ -67,6 +67,9 @@ const CreateGiftPaymentIntentSchema = z.object({
67
67
  'paypay',
68
68
  'gcash',
69
69
  'south_korean_cards',
70
+ 'paynow',
71
+ 'bizum',
72
+ 'promptpay',
70
73
  ])
71
74
  .optional(),
72
75
  reference_id: z.string().max(65000).optional(),
@@ -181,6 +184,9 @@ const CreateForItemsGiftPaymentIntentSchema = z.object({
181
184
  'paypay',
182
185
  'gcash',
183
186
  'south_korean_cards',
187
+ 'paynow',
188
+ 'bizum',
189
+ 'promptpay',
184
190
  ])
185
191
  .optional(),
186
192
  reference_id: z.string().max(65000).optional(),
@@ -182,6 +182,9 @@ const CreateInvoicePaymentMethodSchema = z.object({
182
182
  'paypay',
183
183
  'gcash',
184
184
  'south_korean_cards',
185
+ 'paynow',
186
+ 'bizum',
187
+ 'promptpay',
185
188
  ])
186
189
  .optional(),
187
190
  gateway: z
@@ -304,6 +307,9 @@ const CreateInvoicePaymentIntentSchema = z.object({
304
307
  'paypay',
305
308
  'gcash',
306
309
  'south_korean_cards',
310
+ 'paynow',
311
+ 'bizum',
312
+ 'promptpay',
307
313
  ])
308
314
  .optional(),
309
315
  reference_id: z.string().max(65000).optional(),
@@ -558,6 +564,9 @@ const CreateForChargeItemsAndChargesInvoicePaymentMethodSchema = z.object({
558
564
  'paypay',
559
565
  'gcash',
560
566
  'south_korean_cards',
567
+ 'paynow',
568
+ 'bizum',
569
+ 'promptpay',
561
570
  ])
562
571
  .optional(),
563
572
  gateway: z
@@ -680,6 +689,9 @@ const CreateForChargeItemsAndChargesInvoicePaymentIntentSchema = z.object({
680
689
  'paypay',
681
690
  'gcash',
682
691
  'south_korean_cards',
692
+ 'paynow',
693
+ 'bizum',
694
+ 'promptpay',
683
695
  ])
684
696
  .optional(),
685
697
  reference_id: z.string().max(65000).optional(),
@@ -694,6 +706,8 @@ const CreateForChargeItemsAndChargesInvoiceItemPricesSchema = z.object({
694
706
  unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(),
695
707
  date_from: z.array(z.number().int().optional()).optional(),
696
708
  date_to: z.array(z.number().int().optional()).optional(),
709
+ description: z.array(z.string().max(250).optional()).optional(),
710
+ entity_description: z.array(z.string().max(500).optional()).optional(),
697
711
  });
698
712
  const CreateForChargeItemsAndChargesInvoiceItemTiersSchema = z.object({
699
713
  item_price_id: z.array(z.string().max(100).optional()).optional(),
@@ -709,6 +723,7 @@ const CreateForChargeItemsAndChargesInvoiceItemTiersSchema = z.object({
709
723
  package_size: z.array(z.number().int().min(1).optional()).optional(),
710
724
  });
711
725
  const CreateForChargeItemsAndChargesInvoiceChargesSchema = z.object({
726
+ entity_description: z.array(z.string().max(500).optional()).optional(),
712
727
  amount: z.array(z.number().int().min(1).optional()).optional(),
713
728
  amount_in_decimal: z.array(z.string().max(39).optional()).optional(),
714
729
  description: z.array(z.string().max(250).optional()).optional(),
@@ -766,6 +781,7 @@ const CreateForChargeItemsAndChargesInvoiceBodySchema = z.looseObject({
766
781
  auto_collection: z.enum(['on', 'off']).optional(),
767
782
  net_term_days: z.number().int().optional(),
768
783
  invoice_date: z.number().int().optional(),
784
+ create_pending_invoice: z.boolean().optional(),
769
785
  token_id: z.string().max(40).optional(),
770
786
  replace_primary_payment_source: z.boolean().default(false).optional(),
771
787
  retain_payment_source: z.boolean().default(true).optional(),
@@ -980,6 +996,11 @@ const ImportInvoiceInvoiceLineItemsSchema = z.object({
980
996
  tax9_amount: z.array(z.number().int().min(0).optional()).optional(),
981
997
  tax10_name: z.array(z.string().max(50).optional()).optional(),
982
998
  tax10_amount: z.array(z.number().int().min(0).optional()).optional(),
999
+ proration_mode: z
1000
+ .array(z
1001
+ .enum(['reset', 'delta', 'service_period_revision', 'adjusted_term'])
1002
+ .optional())
1003
+ .optional(),
983
1004
  created_at: z.array(z.number().int().optional()).optional(),
984
1005
  });
985
1006
  const ImportInvoiceInvoicePaymentReferenceNumbersSchema = z.object({
@@ -1097,7 +1118,17 @@ const ImportInvoiceInvoiceBodySchema = z.looseObject({
1097
1118
  po_number: z.string().max(100).optional(),
1098
1119
  price_type: z.enum(['tax_exclusive', 'tax_inclusive']).optional(),
1099
1120
  tax_override_reason: z
1100
- .enum(['id_exempt', 'customer_exempt', 'export'])
1121
+ .enum([
1122
+ 'zero_rated',
1123
+ 'id_exempt',
1124
+ 'customer_exempt',
1125
+ 'region_non_taxable',
1126
+ 'product_exempt',
1127
+ 'export',
1128
+ 'high_value_physical_goods',
1129
+ 'zero_value_item',
1130
+ 'tax_not_configured_external_provider',
1131
+ ])
1101
1132
  .optional(),
1102
1133
  vat_number: z.string().max(20).optional(),
1103
1134
  vat_number_prefix: z.string().max(10).optional(),
@@ -1116,6 +1147,7 @@ const ImportInvoiceInvoiceBodySchema = z.looseObject({
1116
1147
  net_term_days: z.number().int().optional(),
1117
1148
  has_advance_charges: z.boolean().default(false).optional(),
1118
1149
  use_for_proration: z.boolean().default(false).optional(),
1150
+ paid_at: z.number().int().optional(),
1119
1151
  credit_note: ImportInvoiceInvoiceCreditNoteSchema.optional(),
1120
1152
  billing_address: ImportInvoiceInvoiceBillingAddressSchema.optional(),
1121
1153
  shipping_address: ImportInvoiceInvoiceShippingAddressSchema.optional(),
@@ -155,8 +155,8 @@ const ListItemChannelSchema = z.object({
155
155
  not_in: z.enum(['web', 'app_store', 'play_store']).optional(),
156
156
  });
157
157
  const ListItemBusinessEntityIdSchema = z.object({
158
- is: z.string().min(1).optional(),
159
158
  is_present: z.enum(['true', 'false']).optional(),
159
+ is: z.string().min(1).optional(),
160
160
  });
161
161
  const ListItemIncludeSiteLevelResourcesSchema = z.object({
162
162
  is: z.enum(['true', 'false']).optional(),
@@ -30,8 +30,8 @@ const ListItemFamilyUpdatedAtSchema = z.object({
30
30
  between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
31
31
  });
32
32
  const ListItemFamilyBusinessEntityIdSchema = z.object({
33
- is: z.string().min(1).optional(),
34
33
  is_present: z.enum(['true', 'false']).optional(),
34
+ is: z.string().min(1).optional(),
35
35
  });
36
36
  const ListItemFamilyIncludeSiteLevelResourcesSchema = z.object({
37
37
  is: z.enum(['true', 'false']).optional(),
@@ -253,8 +253,8 @@ const ListItemPriceUpdatedAtSchema = z.object({
253
253
  between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
254
254
  });
255
255
  const ListItemPriceBusinessEntityIdSchema = z.object({
256
- is: z.string().min(1).optional(),
257
256
  is_present: z.enum(['true', 'false']).optional(),
257
+ is: z.string().min(1).optional(),
258
258
  });
259
259
  const ListItemPriceIncludeSiteLevelResourcesSchema = z.object({
260
260
  is: z.enum(['true', 'false']).optional(),
@@ -3,8 +3,18 @@
3
3
  // Do not edit manually – regenerate via sdk-generator
4
4
  import { z } from 'zod';
5
5
  //Meter.list
6
+ const ListMeterNameSchema = z.object({
7
+ is: z.string().min(1).optional(),
8
+ starts_with: z.string().min(1).optional(),
9
+ });
10
+ const ListMeterSortBySchema = z.looseObject({
11
+ asc: z.enum(['id', 'name', 'created_at', 'updated_at']).optional(),
12
+ desc: z.enum(['id', 'name', 'created_at', 'updated_at']).optional(),
13
+ });
6
14
  const ListMeterBodySchema = z.looseObject({
7
15
  limit: z.number().int().min(1).max(100).optional(),
8
16
  offset: z.string().max(1000).optional(),
17
+ name: ListMeterNameSchema.optional(),
18
+ sort_by: ListMeterSortBySchema.optional(),
9
19
  });
10
20
  export { ListMeterBodySchema };
@@ -31,12 +31,12 @@ const ListOmnichannelSubscriptionIdAtSourceSchema = z.object({
31
31
  not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
32
32
  });
33
33
  const ListOmnichannelSubscriptionUpdatedAtSchema = z.object({
34
- after: z.string().regex(RegExp('^\\d{10}$')).optional(),
35
34
  before: z.string().regex(RegExp('^\\d{10}$')).optional(),
35
+ after: z.string().regex(RegExp('^\\d{10}$')).optional(),
36
36
  });
37
37
  const ListOmnichannelSubscriptionPurchasedAtSchema = z.object({
38
- after: z.string().regex(RegExp('^\\d{10}$')).optional(),
39
38
  before: z.string().regex(RegExp('^\\d{10}$')).optional(),
39
+ after: z.string().regex(RegExp('^\\d{10}$')).optional(),
40
40
  });
41
41
  const ListOmnichannelSubscriptionSortBySchema = z.looseObject({
42
42
  asc: z.enum(['created_at', 'updated_at']).optional(),
@@ -58,6 +58,9 @@ const CreatePaymentIntentBodySchema = z.looseObject({
58
58
  'paypay',
59
59
  'gcash',
60
60
  'south_korean_cards',
61
+ 'paynow',
62
+ 'bizum',
63
+ 'promptpay',
61
64
  ])
62
65
  .optional(),
63
66
  success_url: z.string().max(250).optional(),
@@ -116,6 +119,9 @@ const UpdatePaymentIntentBodySchema = z.looseObject({
116
119
  'paypay',
117
120
  'gcash',
118
121
  'south_korean_cards',
122
+ 'paynow',
123
+ 'bizum',
124
+ 'promptpay',
119
125
  ])
120
126
  .optional(),
121
127
  success_url: z.string().max(250).optional(),
@@ -55,6 +55,9 @@ const CreateUsingTempTokenPaymentSourceBodySchema = z.looseObject({
55
55
  'paypay',
56
56
  'gcash',
57
57
  'south_korean_cards',
58
+ 'paynow',
59
+ 'bizum',
60
+ 'promptpay',
58
61
  ]),
59
62
  tmp_token: z.string().max(65000),
60
63
  issuing_country: z.string().max(50).optional(),
@@ -160,6 +163,9 @@ const CreateUsingPermanentTokenPaymentSourceBodySchema = z.looseObject({
160
163
  'paypay',
161
164
  'gcash',
162
165
  'south_korean_cards',
166
+ 'paynow',
167
+ 'bizum',
168
+ 'promptpay',
163
169
  ]),
164
170
  gateway_account_id: z.string().max(50).optional(),
165
171
  reference_id: z.string().max(200).optional(),
@@ -236,6 +242,9 @@ const CreateUsingPaymentIntentPaymentSourcePaymentIntentSchema = z.object({
236
242
  'paypay',
237
243
  'gcash',
238
244
  'south_korean_cards',
245
+ 'paynow',
246
+ 'bizum',
247
+ 'promptpay',
239
248
  ])
240
249
  .optional(),
241
250
  reference_id: z.string().max(65000).optional(),
@@ -416,6 +425,9 @@ const ListPaymentSourceTypeSchema = z.object({
416
425
  'paypay',
417
426
  'gcash',
418
427
  'south_korean_cards',
428
+ 'paynow',
429
+ 'bizum',
430
+ 'promptpay',
419
431
  ])
420
432
  .optional(),
421
433
  is_not: z
@@ -467,6 +479,9 @@ const ListPaymentSourceTypeSchema = z.object({
467
479
  'paypay',
468
480
  'gcash',
469
481
  'south_korean_cards',
482
+ 'paynow',
483
+ 'bizum',
484
+ 'promptpay',
470
485
  ])
471
486
  .optional(),
472
487
  in: z
@@ -518,6 +533,9 @@ const ListPaymentSourceTypeSchema = z.object({
518
533
  'paypay',
519
534
  'gcash',
520
535
  'south_korean_cards',
536
+ 'paynow',
537
+ 'bizum',
538
+ 'promptpay',
521
539
  ])
522
540
  .optional(),
523
541
  not_in: z
@@ -569,6 +587,9 @@ const ListPaymentSourceTypeSchema = z.object({
569
587
  'paypay',
570
588
  'gcash',
571
589
  'south_korean_cards',
590
+ 'paynow',
591
+ 'bizum',
592
+ 'promptpay',
572
593
  ])
573
594
  .optional(),
574
595
  });
@@ -65,8 +65,8 @@ const ListPriceVariantCreatedAtSchema = z.object({
65
65
  between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
66
66
  });
67
67
  const ListPriceVariantBusinessEntityIdSchema = z.object({
68
- is: z.string().min(1).optional(),
69
68
  is_present: z.enum(['true', 'false']).optional(),
69
+ is: z.string().min(1).optional(),
70
70
  });
71
71
  const ListPriceVariantIncludeSiteLevelResourcesSchema = z.object({
72
72
  is: z.enum(['true', 'false']).optional(),
@@ -66,6 +66,9 @@ const CreatePurchasePaymentIntentSchema = z.object({
66
66
  'paypay',
67
67
  'gcash',
68
68
  'south_korean_cards',
69
+ 'paynow',
70
+ 'bizum',
71
+ 'promptpay',
69
72
  ])
70
73
  .optional(),
71
74
  reference_id: z.string().max(65000).optional(),
@@ -82,6 +82,7 @@ const CreateForSubscriptionRampDiscountsToAddSchema = z.object({
82
82
  duration_type: z.array(z.enum(['one_time', 'forever', 'limited_period']).optional()),
83
83
  percentage: z.array(z.number().min(0.01).max(100).optional()).optional(),
84
84
  amount: z.array(z.number().int().min(0).optional()).optional(),
85
+ quantity: z.array(z.number().int().min(1).optional()).optional(),
85
86
  period: z.array(z.number().int().min(1).optional()).optional(),
86
87
  period_unit: z
87
88
  .array(z.enum(['day', 'week', 'month', 'year']).optional())
@@ -183,6 +184,7 @@ const UpdateRampDiscountsToAddSchema = z.object({
183
184
  duration_type: z.array(z.enum(['one_time', 'forever', 'limited_period']).optional()),
184
185
  percentage: z.array(z.number().min(0.01).max(100).optional()).optional(),
185
186
  amount: z.array(z.number().int().min(0).optional()).optional(),
187
+ quantity: z.array(z.number().int().min(1).optional()).optional(),
186
188
  period: z.array(z.number().int().min(1).optional()).optional(),
187
189
  period_unit: z
188
190
  .array(z.enum(['day', 'week', 'month', 'year']).optional())
@@ -5,6 +5,9 @@ import { z } from 'zod';
5
5
  //RecordedPurchase.create
6
6
  const CreateRecordedPurchaseCustomerSchema = z.object({
7
7
  id: z.string().max(50),
8
+ email: z.string().email().max(70).optional(),
9
+ first_name: z.string().max(150).optional(),
10
+ last_name: z.string().max(150).optional(),
8
11
  });
9
12
  const CreateRecordedPurchaseAppleAppStoreSchema = z.object({
10
13
  transaction_id: z.string().max(100).optional(),
@@ -232,6 +232,9 @@ const CreateSubscriptionPaymentMethodSchema = z.object({
232
232
  'paypay',
233
233
  'gcash',
234
234
  'south_korean_cards',
235
+ 'paynow',
236
+ 'bizum',
237
+ 'promptpay',
235
238
  ])
236
239
  .optional(),
237
240
  gateway: z
@@ -354,6 +357,9 @@ const CreateSubscriptionPaymentIntentSchema = z.object({
354
357
  'paypay',
355
358
  'gcash',
356
359
  'south_korean_cards',
360
+ 'paynow',
361
+ 'bizum',
362
+ 'promptpay',
357
363
  ])
358
364
  .optional(),
359
365
  reference_id: z.string().max(65000).optional(),
@@ -585,6 +591,9 @@ const CreateForCustomerSubscriptionPaymentIntentSchema = z.object({
585
591
  'paypay',
586
592
  'gcash',
587
593
  'south_korean_cards',
594
+ 'paynow',
595
+ 'bizum',
596
+ 'promptpay',
588
597
  ])
589
598
  .optional(),
590
599
  reference_id: z.string().max(65000).optional(),
@@ -776,6 +785,9 @@ const CreateWithItemsSubscriptionPaymentIntentSchema = z.object({
776
785
  'paypay',
777
786
  'gcash',
778
787
  'south_korean_cards',
788
+ 'paynow',
789
+ 'bizum',
790
+ 'promptpay',
779
791
  ])
780
792
  .optional(),
781
793
  reference_id: z.string().max(65000).optional(),
@@ -1186,6 +1198,9 @@ const ListSubscriptionChannelSchema = z.object({
1186
1198
  in: z.enum(['web', 'app_store', 'play_store']).optional(),
1187
1199
  not_in: z.enum(['web', 'app_store', 'play_store']).optional(),
1188
1200
  });
1201
+ const ListSubscriptionDecommissionedSchema = z.object({
1202
+ is: z.enum(['true', 'false']).optional(),
1203
+ });
1189
1204
  const ListSubscriptionPlanIdSchema = z.object({
1190
1205
  is: z.string().min(1).optional(),
1191
1206
  is_not: z.string().min(1).optional(),
@@ -1217,6 +1232,7 @@ const ListSubscriptionBodySchema = z.looseObject({
1217
1232
  sort_by: ListSubscriptionSortBySchema.optional(),
1218
1233
  business_entity_id: ListSubscriptionBusinessEntityIdSchema.optional(),
1219
1234
  channel: ListSubscriptionChannelSchema.optional(),
1235
+ decommissioned: ListSubscriptionDecommissionedSchema.optional(),
1220
1236
  plan_id: ListSubscriptionPlanIdSchema.optional(),
1221
1237
  });
1222
1238
  export { ListSubscriptionBodySchema };
@@ -1402,6 +1418,9 @@ const UpdateSubscriptionPaymentMethodSchema = z.object({
1402
1418
  'paypay',
1403
1419
  'gcash',
1404
1420
  'south_korean_cards',
1421
+ 'paynow',
1422
+ 'bizum',
1423
+ 'promptpay',
1405
1424
  ])
1406
1425
  .optional(),
1407
1426
  gateway: z
@@ -1524,6 +1543,9 @@ const UpdateSubscriptionPaymentIntentSchema = z.object({
1524
1543
  'paypay',
1525
1544
  'gcash',
1526
1545
  'south_korean_cards',
1546
+ 'paynow',
1547
+ 'bizum',
1548
+ 'promptpay',
1527
1549
  ])
1528
1550
  .optional(),
1529
1551
  reference_id: z.string().max(65000).optional(),
@@ -1844,6 +1866,9 @@ const UpdateForItemsSubscriptionPaymentMethodSchema = z.object({
1844
1866
  'paypay',
1845
1867
  'gcash',
1846
1868
  'south_korean_cards',
1869
+ 'paynow',
1870
+ 'bizum',
1871
+ 'promptpay',
1847
1872
  ])
1848
1873
  .optional(),
1849
1874
  gateway: z
@@ -1966,6 +1991,9 @@ const UpdateForItemsSubscriptionPaymentIntentSchema = z.object({
1966
1991
  'paypay',
1967
1992
  'gcash',
1968
1993
  'south_korean_cards',
1994
+ 'paynow',
1995
+ 'bizum',
1996
+ 'promptpay',
1969
1997
  ])
1970
1998
  .optional(),
1971
1999
  reference_id: z.string().max(65000).optional(),
@@ -2249,6 +2277,9 @@ const ReactivateSubscriptionPaymentIntentSchema = z.object({
2249
2277
  'paypay',
2250
2278
  'gcash',
2251
2279
  'south_korean_cards',
2280
+ 'paynow',
2281
+ 'bizum',
2282
+ 'promptpay',
2252
2283
  ])
2253
2284
  .optional(),
2254
2285
  reference_id: z.string().max(65000).optional(),
@@ -2555,6 +2586,9 @@ const ImportSubscriptionSubscriptionPaymentMethodSchema = z.object({
2555
2586
  'paypay',
2556
2587
  'gcash',
2557
2588
  'south_korean_cards',
2589
+ 'paynow',
2590
+ 'bizum',
2591
+ 'promptpay',
2558
2592
  ])
2559
2593
  .optional(),
2560
2594
  gateway: z
@@ -3314,6 +3348,9 @@ const ResumeSubscriptionPaymentIntentSchema = z.object({
3314
3348
  'paypay',
3315
3349
  'gcash',
3316
3350
  'south_korean_cards',
3351
+ 'paynow',
3352
+ 'bizum',
3353
+ 'promptpay',
3317
3354
  ])
3318
3355
  .optional(),
3319
3356
  reference_id: z.string().max(65000).optional(),
@@ -134,6 +134,9 @@ const ListTransactionPaymentMethodSchema = z.object({
134
134
  'paypay',
135
135
  'gcash',
136
136
  'south_korean_cards',
137
+ 'paynow',
138
+ 'bizum',
139
+ 'promptpay',
137
140
  ])
138
141
  .optional(),
139
142
  is_not: z
@@ -195,6 +198,9 @@ const ListTransactionPaymentMethodSchema = z.object({
195
198
  'paypay',
196
199
  'gcash',
197
200
  'south_korean_cards',
201
+ 'paynow',
202
+ 'bizum',
203
+ 'promptpay',
198
204
  ])
199
205
  .optional(),
200
206
  in: z
@@ -256,6 +262,9 @@ const ListTransactionPaymentMethodSchema = z.object({
256
262
  'paypay',
257
263
  'gcash',
258
264
  'south_korean_cards',
265
+ 'paynow',
266
+ 'bizum',
267
+ 'promptpay',
259
268
  ])
260
269
  .optional(),
261
270
  not_in: z
@@ -317,6 +326,9 @@ const ListTransactionPaymentMethodSchema = z.object({
317
326
  'paypay',
318
327
  'gcash',
319
328
  'south_korean_cards',
329
+ 'paynow',
330
+ 'bizum',
331
+ 'promptpay',
320
332
  ])
321
333
  .optional(),
322
334
  });
@@ -179,6 +179,7 @@ const CreateWebhookEndpointBodySchema = z.looseObject({
179
179
  'business_entity_deleted',
180
180
  'customer_business_entity_changed',
181
181
  'subscription_business_entity_changed',
182
+ 'payment_source_business_entity_changed',
182
183
  'purchase_created',
183
184
  'voucher_created',
184
185
  'voucher_expired',
@@ -425,6 +426,7 @@ const UpdateWebhookEndpointBodySchema = z.looseObject({
425
426
  'business_entity_deleted',
426
427
  'customer_business_entity_changed',
427
428
  'subscription_business_entity_changed',
429
+ 'payment_source_business_entity_changed',
428
430
  'purchase_created',
429
431
  'voucher_created',
430
432
  'voucher_expired',