chargebee 3.24.0 → 3.25.0-beta.1

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 (147) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +39 -0
  3. package/cjs/RequestWrapper.js +27 -0
  4. package/cjs/chargebee.cjs.js +3 -0
  5. package/cjs/chargebee.cjs.worker.js +2 -0
  6. package/cjs/chargebeeZodValidationError.js +18 -0
  7. package/cjs/createChargebee.js +5 -0
  8. package/cjs/environment.js +1 -1
  9. package/cjs/schema/addon.schema.js +153 -0
  10. package/cjs/schema/address.schema.js +35 -0
  11. package/cjs/schema/alert.schema.js +38 -0
  12. package/cjs/schema/attached_item.schema.js +58 -0
  13. package/cjs/schema/business_entity.schema.js +46 -0
  14. package/cjs/schema/card.schema.js +165 -0
  15. package/cjs/schema/comment.schema.js +69 -0
  16. package/cjs/schema/coupon.schema.js +209 -0
  17. package/cjs/schema/coupon_code.schema.js +14 -0
  18. package/cjs/schema/coupon_set.schema.js +28 -0
  19. package/cjs/schema/credit_note.schema.js +288 -0
  20. package/cjs/schema/currency.schema.js +32 -0
  21. package/cjs/schema/customer.schema.js +986 -0
  22. package/cjs/schema/customer_entitlement.schema.js +14 -0
  23. package/cjs/schema/differential_price.schema.js +68 -0
  24. package/cjs/schema/entitlement.schema.js +27 -0
  25. package/cjs/schema/entitlement_override.schema.js +33 -0
  26. package/cjs/schema/estimate.schema.js +1525 -0
  27. package/cjs/schema/export.schema.js +1545 -0
  28. package/cjs/schema/feature.schema.js +37 -0
  29. package/cjs/schema/gift.schema.js +277 -0
  30. package/cjs/schema/hosted_page.schema.js +1649 -0
  31. package/cjs/schema/in_app_subscription.schema.js +68 -0
  32. package/cjs/schema/index.js +80 -0
  33. package/cjs/schema/invoice.schema.js +1467 -0
  34. package/cjs/schema/item.schema.js +91 -0
  35. package/cjs/schema/item_entitlement.schema.js +45 -0
  36. package/cjs/schema/item_family.schema.js +21 -0
  37. package/cjs/schema/item_price.schema.js +190 -0
  38. package/cjs/schema/non_subscription.schema.js +28 -0
  39. package/cjs/schema/offer_event.schema.js +13 -0
  40. package/cjs/schema/offer_fulfillment.schema.js +20 -0
  41. package/cjs/schema/omnichannel_one_time_order.schema.js +26 -0
  42. package/cjs/schema/omnichannel_subscription.schema.js +89 -0
  43. package/cjs/schema/omnichannel_subscription_item.schema.js +13 -0
  44. package/cjs/schema/order.schema.js +273 -0
  45. package/cjs/schema/payment_intent.schema.js +117 -0
  46. package/cjs/schema/payment_schedule_scheme.schema.js +20 -0
  47. package/cjs/schema/payment_source.schema.js +358 -0
  48. package/cjs/schema/payment_voucher.schema.js +57 -0
  49. package/cjs/schema/personalized_offer.schema.js +28 -0
  50. package/cjs/schema/plan.schema.js +225 -0
  51. package/cjs/schema/portal_session.schema.js +22 -0
  52. package/cjs/schema/price_variant.schema.js +36 -0
  53. package/cjs/schema/pricing_page_session.schema.js +135 -0
  54. package/cjs/schema/promotional_credit.schema.js +78 -0
  55. package/cjs/schema/purchase.schema.js +272 -0
  56. package/cjs/schema/quote.schema.js +1557 -0
  57. package/cjs/schema/ramp.schema.js +209 -0
  58. package/cjs/schema/recorded_purchase.schema.js +32 -0
  59. package/cjs/schema/resource_migration.schema.js +14 -0
  60. package/cjs/schema/site_migration_detail.schema.js +81 -0
  61. package/cjs/schema/subscription.schema.js +2993 -0
  62. package/cjs/schema/subscription_entitlement.schema.js +25 -0
  63. package/cjs/schema/time_machine.schema.js +17 -0
  64. package/cjs/schema/transaction.schema.js +70 -0
  65. package/cjs/schema/unbilled_charge.schema.js +113 -0
  66. package/cjs/schema/usage.schema.js +93 -0
  67. package/cjs/schema/usage_charge.schema.js +17 -0
  68. package/cjs/schema/usage_event.schema.js +28 -0
  69. package/cjs/schema/usage_file.schema.js +13 -0
  70. package/cjs/schema/usage_summary.schema.js +17 -0
  71. package/cjs/schema/virtual_bank_account.schema.js +43 -0
  72. package/cjs/schema/webhook_endpoint.schema.js +504 -0
  73. package/cjs/validationLoader.js +59 -0
  74. package/esm/RequestWrapper.js +27 -0
  75. package/esm/chargebee.esm.js +2 -0
  76. package/esm/chargebee.esm.worker.js +1 -0
  77. package/esm/chargebeeZodValidationError.js +14 -0
  78. package/esm/createChargebee.js +5 -0
  79. package/esm/environment.js +1 -1
  80. package/esm/schema/addon.schema.js +150 -0
  81. package/esm/schema/address.schema.js +32 -0
  82. package/esm/schema/alert.schema.js +35 -0
  83. package/esm/schema/attached_item.schema.js +55 -0
  84. package/esm/schema/business_entity.schema.js +43 -0
  85. package/esm/schema/card.schema.js +162 -0
  86. package/esm/schema/comment.schema.js +66 -0
  87. package/esm/schema/coupon.schema.js +206 -0
  88. package/esm/schema/coupon_code.schema.js +11 -0
  89. package/esm/schema/coupon_set.schema.js +25 -0
  90. package/esm/schema/credit_note.schema.js +285 -0
  91. package/esm/schema/currency.schema.js +29 -0
  92. package/esm/schema/customer.schema.js +983 -0
  93. package/esm/schema/customer_entitlement.schema.js +11 -0
  94. package/esm/schema/differential_price.schema.js +65 -0
  95. package/esm/schema/entitlement.schema.js +24 -0
  96. package/esm/schema/entitlement_override.schema.js +30 -0
  97. package/esm/schema/estimate.schema.js +1522 -0
  98. package/esm/schema/export.schema.js +1542 -0
  99. package/esm/schema/feature.schema.js +34 -0
  100. package/esm/schema/gift.schema.js +274 -0
  101. package/esm/schema/hosted_page.schema.js +1646 -0
  102. package/esm/schema/in_app_subscription.schema.js +65 -0
  103. package/esm/schema/index.js +64 -0
  104. package/esm/schema/invoice.schema.js +1464 -0
  105. package/esm/schema/item.schema.js +88 -0
  106. package/esm/schema/item_entitlement.schema.js +42 -0
  107. package/esm/schema/item_family.schema.js +18 -0
  108. package/esm/schema/item_price.schema.js +187 -0
  109. package/esm/schema/non_subscription.schema.js +25 -0
  110. package/esm/schema/offer_event.schema.js +10 -0
  111. package/esm/schema/offer_fulfillment.schema.js +17 -0
  112. package/esm/schema/omnichannel_one_time_order.schema.js +23 -0
  113. package/esm/schema/omnichannel_subscription.schema.js +86 -0
  114. package/esm/schema/omnichannel_subscription_item.schema.js +10 -0
  115. package/esm/schema/order.schema.js +270 -0
  116. package/esm/schema/payment_intent.schema.js +114 -0
  117. package/esm/schema/payment_schedule_scheme.schema.js +17 -0
  118. package/esm/schema/payment_source.schema.js +355 -0
  119. package/esm/schema/payment_voucher.schema.js +54 -0
  120. package/esm/schema/personalized_offer.schema.js +25 -0
  121. package/esm/schema/plan.schema.js +222 -0
  122. package/esm/schema/portal_session.schema.js +19 -0
  123. package/esm/schema/price_variant.schema.js +33 -0
  124. package/esm/schema/pricing_page_session.schema.js +132 -0
  125. package/esm/schema/promotional_credit.schema.js +75 -0
  126. package/esm/schema/purchase.schema.js +269 -0
  127. package/esm/schema/quote.schema.js +1554 -0
  128. package/esm/schema/ramp.schema.js +206 -0
  129. package/esm/schema/recorded_purchase.schema.js +29 -0
  130. package/esm/schema/resource_migration.schema.js +11 -0
  131. package/esm/schema/site_migration_detail.schema.js +78 -0
  132. package/esm/schema/subscription.schema.js +2990 -0
  133. package/esm/schema/subscription_entitlement.schema.js +22 -0
  134. package/esm/schema/time_machine.schema.js +14 -0
  135. package/esm/schema/transaction.schema.js +67 -0
  136. package/esm/schema/unbilled_charge.schema.js +110 -0
  137. package/esm/schema/usage.schema.js +90 -0
  138. package/esm/schema/usage_charge.schema.js +14 -0
  139. package/esm/schema/usage_event.schema.js +25 -0
  140. package/esm/schema/usage_file.schema.js +10 -0
  141. package/esm/schema/usage_summary.schema.js +14 -0
  142. package/esm/schema/virtual_bank_account.schema.js +40 -0
  143. package/esm/schema/webhook_endpoint.schema.js +501 -0
  144. package/esm/validationLoader.js +56 -0
  145. package/package.json +4 -1
  146. package/types/core.d.ts +2 -0
  147. package/types/index.d.ts +16 -0
@@ -0,0 +1,1646 @@
1
+ // Generated Zod schemas: HostedPage
2
+ // Actions: checkoutNew, checkoutOneTime, checkoutOneTimeForItems, checkoutNewForItems, checkoutExisting, checkoutExistingForItems, updateCard, updatePaymentMethod, managePaymentSources, collectNow, acceptQuote, extendSubscription, checkoutGift, checkoutGiftForItems, claimGift, retrieveAgreementPdf, preCancel, events, viewVoucher
3
+ // Do not edit manually – regenerate via sdk-generator
4
+ import { z } from 'zod';
5
+ //HostedPage.checkoutNew
6
+ const CheckoutNewHostedPageSubscriptionSchema = z.looseObject({
7
+ id: z.string().max(50).optional(),
8
+ plan_id: z.string().max(100),
9
+ plan_quantity: z.number().int().min(1).optional(),
10
+ plan_quantity_in_decimal: z.string().max(33).optional(),
11
+ plan_unit_price: z.number().int().min(0).optional(),
12
+ plan_unit_price_in_decimal: z.string().max(39).optional(),
13
+ setup_fee: z.number().int().min(0).optional(),
14
+ trial_end: z.number().int().optional(),
15
+ start_date: z.number().int().optional(),
16
+ coupon: z.string().max(100).optional(),
17
+ auto_collection: z.enum(['on', 'off']).optional(),
18
+ offline_payment_method: z
19
+ .enum([
20
+ 'no_preference',
21
+ 'cash',
22
+ 'check',
23
+ 'bank_transfer',
24
+ 'ach_credit',
25
+ 'sepa_credit',
26
+ 'boleto',
27
+ 'us_automated_bank_transfer',
28
+ 'eu_automated_bank_transfer',
29
+ 'uk_automated_bank_transfer',
30
+ 'jp_automated_bank_transfer',
31
+ 'mx_automated_bank_transfer',
32
+ 'custom',
33
+ ])
34
+ .optional(),
35
+ invoice_notes: z.string().max(2000).optional(),
36
+ affiliate_token: z.string().max(250).optional(),
37
+ contract_term_billing_cycle_on_renewal: z
38
+ .number()
39
+ .int()
40
+ .min(1)
41
+ .max(100)
42
+ .optional(),
43
+ });
44
+ const CheckoutNewHostedPageCustomerSchema = z.looseObject({
45
+ id: z.string().max(50).optional(),
46
+ email: z.string().email().max(70).optional(),
47
+ first_name: z.string().max(150).optional(),
48
+ last_name: z.string().max(150).optional(),
49
+ company: z.string().max(250).optional(),
50
+ phone: z.string().max(50).optional(),
51
+ locale: z.string().max(50).optional(),
52
+ taxability: z.enum(['taxable', 'exempt']).optional(),
53
+ vat_number: z.string().max(20).optional(),
54
+ vat_number_prefix: z.string().max(10).optional(),
55
+ consolidated_invoicing: z.boolean().optional(),
56
+ });
57
+ const CheckoutNewHostedPageCardSchema = z.object({
58
+ gateway: z
59
+ .enum([
60
+ 'chargebee',
61
+ 'chargebee_payments',
62
+ 'adyen',
63
+ 'stripe',
64
+ 'wepay',
65
+ 'braintree',
66
+ 'authorize_net',
67
+ 'paypal_pro',
68
+ 'pin',
69
+ 'eway',
70
+ 'eway_rapid',
71
+ 'worldpay',
72
+ 'balanced_payments',
73
+ 'beanstream',
74
+ 'bluepay',
75
+ 'elavon',
76
+ 'first_data_global',
77
+ 'hdfc',
78
+ 'migs',
79
+ 'nmi',
80
+ 'ogone',
81
+ 'paymill',
82
+ 'paypal_payflow_pro',
83
+ 'sage_pay',
84
+ 'tco',
85
+ 'wirecard',
86
+ 'amazon_payments',
87
+ 'paypal_express_checkout',
88
+ 'orbital',
89
+ 'moneris_us',
90
+ 'moneris',
91
+ 'bluesnap',
92
+ 'cybersource',
93
+ 'vantiv',
94
+ 'checkout_com',
95
+ 'paypal',
96
+ 'ingenico_direct',
97
+ 'exact',
98
+ 'mollie',
99
+ 'quickbooks',
100
+ 'razorpay',
101
+ 'global_payments',
102
+ 'bank_of_america',
103
+ 'ecentric',
104
+ 'metrics_global',
105
+ 'windcave',
106
+ 'pay_com',
107
+ 'ebanx',
108
+ 'dlocal',
109
+ 'nuvei',
110
+ 'solidgate',
111
+ 'paystack',
112
+ 'jp_morgan',
113
+ 'deutsche_bank',
114
+ 'ezidebit',
115
+ 'twikey',
116
+ 'tempus',
117
+ 'moyasar',
118
+ 'payway',
119
+ ])
120
+ .optional(),
121
+ gateway_account_id: z.string().max(50).optional(),
122
+ });
123
+ const CheckoutNewHostedPageBillingAddressSchema = z.object({
124
+ first_name: z.string().max(150).optional(),
125
+ last_name: z.string().max(150).optional(),
126
+ email: z.string().email().max(70).optional(),
127
+ company: z.string().max(250).optional(),
128
+ phone: z.string().max(50).optional(),
129
+ line1: z.string().max(150).optional(),
130
+ line2: z.string().max(150).optional(),
131
+ line3: z.string().max(150).optional(),
132
+ city: z.string().max(50).optional(),
133
+ state_code: z.string().max(50).optional(),
134
+ state: z.string().max(50).optional(),
135
+ zip: z.string().max(20).optional(),
136
+ country: z.string().max(50).optional(),
137
+ validation_status: z
138
+ .enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
139
+ .optional(),
140
+ });
141
+ const CheckoutNewHostedPageShippingAddressSchema = z.object({
142
+ first_name: z.string().max(150).optional(),
143
+ last_name: z.string().max(150).optional(),
144
+ email: z.string().email().max(70).optional(),
145
+ company: z.string().max(250).optional(),
146
+ phone: z.string().max(50).optional(),
147
+ line1: z.string().max(150).optional(),
148
+ line2: z.string().max(150).optional(),
149
+ line3: z.string().max(150).optional(),
150
+ city: z.string().max(50).optional(),
151
+ state_code: z.string().max(50).optional(),
152
+ state: z.string().max(50).optional(),
153
+ zip: z.string().max(20).optional(),
154
+ country: z.string().max(50).optional(),
155
+ validation_status: z
156
+ .enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
157
+ .optional(),
158
+ });
159
+ const CheckoutNewHostedPageContractTermSchema = z.object({
160
+ action_at_term_end: z.enum(['renew', 'evergreen', 'cancel']).optional(),
161
+ cancellation_cutoff_period: z.number().int().optional(),
162
+ });
163
+ const CheckoutNewHostedPageAddonsSchema = z.object({
164
+ id: z.array(z.string().max(100).optional()).optional(),
165
+ quantity: z.array(z.number().int().min(1).optional()).optional(),
166
+ quantity_in_decimal: z.array(z.string().max(33).optional()).optional(),
167
+ unit_price: z.array(z.number().int().min(0).optional()).optional(),
168
+ unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(),
169
+ billing_cycles: z.array(z.number().int().min(0).optional()).optional(),
170
+ });
171
+ const CheckoutNewHostedPageEventBasedAddonsSchema = z.object({
172
+ id: z.array(z.string().max(100).optional()).optional(),
173
+ quantity: z.array(z.number().int().min(1).optional()).optional(),
174
+ unit_price: z.array(z.number().int().min(0).optional()).optional(),
175
+ quantity_in_decimal: z.array(z.string().max(33).optional()).optional(),
176
+ unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(),
177
+ service_period_in_days: z
178
+ .array(z.number().int().min(1).max(4000).optional())
179
+ .optional(),
180
+ on_event: z
181
+ .array(z
182
+ .enum([
183
+ 'subscription_creation',
184
+ 'subscription_trial_start',
185
+ 'plan_activation',
186
+ 'subscription_activation',
187
+ 'contract_termination',
188
+ ])
189
+ .optional())
190
+ .optional(),
191
+ charge_once: z.array(z.boolean().default(true).optional()).optional(),
192
+ charge_on: z.array(z.enum(['immediately', 'on_event']).optional()).optional(),
193
+ });
194
+ const CheckoutNewHostedPageBodySchema = z.looseObject({
195
+ billing_cycles: z.number().int().min(0).optional(),
196
+ mandatory_addons_to_remove: z
197
+ .array(z.string().max(100).optional())
198
+ .optional(),
199
+ terms_to_charge: z.number().int().min(1).optional(),
200
+ billing_alignment_mode: z.enum(['immediate', 'delayed']).optional(),
201
+ coupon_ids: z.array(z.string().max(100).optional()).optional(),
202
+ redirect_url: z.string().max(250).optional(),
203
+ cancel_url: z.string().max(250).optional(),
204
+ pass_thru_content: z.string().max(2048).optional(),
205
+ embed: z.boolean().default(true).optional(),
206
+ iframe_messaging: z.boolean().default(false).optional(),
207
+ allow_offline_payment_methods: z.boolean().optional(),
208
+ subscription: CheckoutNewHostedPageSubscriptionSchema.optional(),
209
+ customer: CheckoutNewHostedPageCustomerSchema.optional(),
210
+ card: CheckoutNewHostedPageCardSchema.optional(),
211
+ billing_address: CheckoutNewHostedPageBillingAddressSchema.optional(),
212
+ shipping_address: CheckoutNewHostedPageShippingAddressSchema.optional(),
213
+ contract_term: CheckoutNewHostedPageContractTermSchema.optional(),
214
+ addons: CheckoutNewHostedPageAddonsSchema.optional(),
215
+ event_based_addons: CheckoutNewHostedPageEventBasedAddonsSchema.optional(),
216
+ });
217
+ export { CheckoutNewHostedPageBodySchema };
218
+ //HostedPage.checkoutOneTime
219
+ const CheckoutOneTimeHostedPageCustomerSchema = z.looseObject({
220
+ id: z.string().max(50).optional(),
221
+ email: z.string().email().max(70).optional(),
222
+ first_name: z.string().max(150).optional(),
223
+ last_name: z.string().max(150).optional(),
224
+ company: z.string().max(250).optional(),
225
+ phone: z.string().max(50).optional(),
226
+ locale: z.string().max(50).optional(),
227
+ taxability: z.enum(['taxable', 'exempt']).optional(),
228
+ vat_number: z.string().max(20).optional(),
229
+ vat_number_prefix: z.string().max(10).optional(),
230
+ consolidated_invoicing: z.boolean().optional(),
231
+ });
232
+ const CheckoutOneTimeHostedPageInvoiceSchema = z.object({
233
+ po_number: z.string().max(100).optional(),
234
+ });
235
+ const CheckoutOneTimeHostedPageCardSchema = z.object({
236
+ gateway: z
237
+ .enum([
238
+ 'chargebee',
239
+ 'chargebee_payments',
240
+ 'adyen',
241
+ 'stripe',
242
+ 'wepay',
243
+ 'braintree',
244
+ 'authorize_net',
245
+ 'paypal_pro',
246
+ 'pin',
247
+ 'eway',
248
+ 'eway_rapid',
249
+ 'worldpay',
250
+ 'balanced_payments',
251
+ 'beanstream',
252
+ 'bluepay',
253
+ 'elavon',
254
+ 'first_data_global',
255
+ 'hdfc',
256
+ 'migs',
257
+ 'nmi',
258
+ 'ogone',
259
+ 'paymill',
260
+ 'paypal_payflow_pro',
261
+ 'sage_pay',
262
+ 'tco',
263
+ 'wirecard',
264
+ 'amazon_payments',
265
+ 'paypal_express_checkout',
266
+ 'orbital',
267
+ 'moneris_us',
268
+ 'moneris',
269
+ 'bluesnap',
270
+ 'cybersource',
271
+ 'vantiv',
272
+ 'checkout_com',
273
+ 'paypal',
274
+ 'ingenico_direct',
275
+ 'exact',
276
+ 'mollie',
277
+ 'quickbooks',
278
+ 'razorpay',
279
+ 'global_payments',
280
+ 'bank_of_america',
281
+ 'ecentric',
282
+ 'metrics_global',
283
+ 'windcave',
284
+ 'pay_com',
285
+ 'ebanx',
286
+ 'dlocal',
287
+ 'nuvei',
288
+ 'solidgate',
289
+ 'paystack',
290
+ 'jp_morgan',
291
+ 'deutsche_bank',
292
+ 'ezidebit',
293
+ 'twikey',
294
+ 'tempus',
295
+ 'moyasar',
296
+ 'payway',
297
+ ])
298
+ .optional(),
299
+ gateway_account_id: z.string().max(50).optional(),
300
+ });
301
+ const CheckoutOneTimeHostedPageBillingAddressSchema = z.object({
302
+ first_name: z.string().max(150).optional(),
303
+ last_name: z.string().max(150).optional(),
304
+ email: z.string().email().max(70).optional(),
305
+ company: z.string().max(250).optional(),
306
+ phone: z.string().max(50).optional(),
307
+ line1: z.string().max(150).optional(),
308
+ line2: z.string().max(150).optional(),
309
+ line3: z.string().max(150).optional(),
310
+ city: z.string().max(50).optional(),
311
+ state_code: z.string().max(50).optional(),
312
+ state: z.string().max(50).optional(),
313
+ zip: z.string().max(20).optional(),
314
+ country: z.string().max(50).optional(),
315
+ validation_status: z
316
+ .enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
317
+ .optional(),
318
+ });
319
+ const CheckoutOneTimeHostedPageShippingAddressSchema = z.object({
320
+ first_name: z.string().max(150).optional(),
321
+ last_name: z.string().max(150).optional(),
322
+ email: z.string().email().max(70).optional(),
323
+ company: z.string().max(250).optional(),
324
+ phone: z.string().max(50).optional(),
325
+ line1: z.string().max(150).optional(),
326
+ line2: z.string().max(150).optional(),
327
+ line3: z.string().max(150).optional(),
328
+ city: z.string().max(50).optional(),
329
+ state_code: z.string().max(50).optional(),
330
+ state: z.string().max(50).optional(),
331
+ zip: z.string().max(20).optional(),
332
+ country: z.string().max(50).optional(),
333
+ validation_status: z
334
+ .enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
335
+ .optional(),
336
+ });
337
+ const CheckoutOneTimeHostedPageAddonsSchema = z.object({
338
+ id: z.array(z.string().max(100).optional()).optional(),
339
+ quantity: z.array(z.number().int().min(1).optional()).optional(),
340
+ unit_price: z.array(z.number().int().min(0).optional()).optional(),
341
+ quantity_in_decimal: z.array(z.string().max(33).optional()).optional(),
342
+ unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(),
343
+ date_from: z.array(z.number().int().optional()).optional(),
344
+ date_to: z.array(z.number().int().optional()).optional(),
345
+ });
346
+ const CheckoutOneTimeHostedPageChargesSchema = z.object({
347
+ amount: z.array(z.number().int().min(1).optional()).optional(),
348
+ amount_in_decimal: z.array(z.string().max(39).optional()).optional(),
349
+ description: z.array(z.string().max(250).optional()).optional(),
350
+ taxable: z.array(z.boolean().default(true).optional()).optional(),
351
+ tax_profile_id: z.array(z.string().max(50).optional()).optional(),
352
+ avalara_tax_code: z.array(z.string().max(50).optional()).optional(),
353
+ hsn_code: z.array(z.string().max(50).optional()).optional(),
354
+ taxjar_product_code: z.array(z.string().max(50).optional()).optional(),
355
+ avalara_sale_type: z
356
+ .array(z.enum(['wholesale', 'retail', 'consumed', 'vendor_use']).optional())
357
+ .optional(),
358
+ avalara_transaction_type: z.array(z.number().int().optional()).optional(),
359
+ avalara_service_type: z.array(z.number().int().optional()).optional(),
360
+ date_from: z.array(z.number().int().optional()).optional(),
361
+ date_to: z.array(z.number().int().optional()).optional(),
362
+ });
363
+ const CheckoutOneTimeHostedPageBodySchema = z.looseObject({
364
+ currency_code: z.string().max(3).optional(),
365
+ invoice_note: z.string().max(2000).optional(),
366
+ coupon: z.string().max(100).optional(),
367
+ coupon_ids: z.array(z.string().max(100).optional()).optional(),
368
+ redirect_url: z.string().max(250).optional(),
369
+ cancel_url: z.string().max(250).optional(),
370
+ pass_thru_content: z.string().max(2048).optional(),
371
+ embed: z.boolean().default(true).optional(),
372
+ iframe_messaging: z.boolean().default(false).optional(),
373
+ customer: CheckoutOneTimeHostedPageCustomerSchema.optional(),
374
+ invoice: CheckoutOneTimeHostedPageInvoiceSchema.optional(),
375
+ card: CheckoutOneTimeHostedPageCardSchema.optional(),
376
+ billing_address: CheckoutOneTimeHostedPageBillingAddressSchema.optional(),
377
+ shipping_address: CheckoutOneTimeHostedPageShippingAddressSchema.optional(),
378
+ addons: CheckoutOneTimeHostedPageAddonsSchema.optional(),
379
+ charges: CheckoutOneTimeHostedPageChargesSchema.optional(),
380
+ });
381
+ export { CheckoutOneTimeHostedPageBodySchema };
382
+ //HostedPage.checkoutOneTimeForItems
383
+ const CheckoutOneTimeForItemsHostedPageCustomerSchema = z.looseObject({
384
+ id: z.string().max(50).optional(),
385
+ email: z.string().email().max(70).optional(),
386
+ first_name: z.string().max(150).optional(),
387
+ last_name: z.string().max(150).optional(),
388
+ company: z.string().max(250).optional(),
389
+ phone: z.string().max(50).optional(),
390
+ locale: z.string().max(50).optional(),
391
+ taxability: z.enum(['taxable', 'exempt']).optional(),
392
+ vat_number: z.string().max(20).optional(),
393
+ vat_number_prefix: z.string().max(10).optional(),
394
+ einvoicing_method: z.enum(['automatic', 'manual', 'site_default']).optional(),
395
+ is_einvoice_enabled: z.boolean().optional(),
396
+ entity_identifier_scheme: z.string().max(50).optional(),
397
+ entity_identifier_standard: z.string().max(50).optional(),
398
+ consolidated_invoicing: z.boolean().optional(),
399
+ });
400
+ const CheckoutOneTimeForItemsHostedPageInvoiceSchema = z.object({
401
+ po_number: z.string().max(100).optional(),
402
+ });
403
+ const CheckoutOneTimeForItemsHostedPageCardSchema = z.object({
404
+ gateway: z
405
+ .enum([
406
+ 'chargebee',
407
+ 'chargebee_payments',
408
+ 'adyen',
409
+ 'stripe',
410
+ 'wepay',
411
+ 'braintree',
412
+ 'authorize_net',
413
+ 'paypal_pro',
414
+ 'pin',
415
+ 'eway',
416
+ 'eway_rapid',
417
+ 'worldpay',
418
+ 'balanced_payments',
419
+ 'beanstream',
420
+ 'bluepay',
421
+ 'elavon',
422
+ 'first_data_global',
423
+ 'hdfc',
424
+ 'migs',
425
+ 'nmi',
426
+ 'ogone',
427
+ 'paymill',
428
+ 'paypal_payflow_pro',
429
+ 'sage_pay',
430
+ 'tco',
431
+ 'wirecard',
432
+ 'amazon_payments',
433
+ 'paypal_express_checkout',
434
+ 'orbital',
435
+ 'moneris_us',
436
+ 'moneris',
437
+ 'bluesnap',
438
+ 'cybersource',
439
+ 'vantiv',
440
+ 'checkout_com',
441
+ 'paypal',
442
+ 'ingenico_direct',
443
+ 'exact',
444
+ 'mollie',
445
+ 'quickbooks',
446
+ 'razorpay',
447
+ 'global_payments',
448
+ 'bank_of_america',
449
+ 'ecentric',
450
+ 'metrics_global',
451
+ 'windcave',
452
+ 'pay_com',
453
+ 'ebanx',
454
+ 'dlocal',
455
+ 'nuvei',
456
+ 'solidgate',
457
+ 'paystack',
458
+ 'jp_morgan',
459
+ 'deutsche_bank',
460
+ 'ezidebit',
461
+ 'twikey',
462
+ 'tempus',
463
+ 'moyasar',
464
+ 'payway',
465
+ ])
466
+ .optional(),
467
+ gateway_account_id: z.string().max(50).optional(),
468
+ });
469
+ const CheckoutOneTimeForItemsHostedPageBillingAddressSchema = z.object({
470
+ first_name: z.string().max(150).optional(),
471
+ last_name: z.string().max(150).optional(),
472
+ email: z.string().email().max(70).optional(),
473
+ company: z.string().max(250).optional(),
474
+ phone: z.string().max(50).optional(),
475
+ line1: z.string().max(150).optional(),
476
+ line2: z.string().max(150).optional(),
477
+ line3: z.string().max(150).optional(),
478
+ city: z.string().max(50).optional(),
479
+ state_code: z.string().max(50).optional(),
480
+ state: z.string().max(50).optional(),
481
+ zip: z.string().max(20).optional(),
482
+ country: z.string().max(50).optional(),
483
+ validation_status: z
484
+ .enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
485
+ .optional(),
486
+ });
487
+ const CheckoutOneTimeForItemsHostedPageShippingAddressSchema = z.object({
488
+ first_name: z.string().max(150).optional(),
489
+ last_name: z.string().max(150).optional(),
490
+ email: z.string().email().max(70).optional(),
491
+ company: z.string().max(250).optional(),
492
+ phone: z.string().max(50).optional(),
493
+ line1: z.string().max(150).optional(),
494
+ line2: z.string().max(150).optional(),
495
+ line3: z.string().max(150).optional(),
496
+ city: z.string().max(50).optional(),
497
+ state_code: z.string().max(50).optional(),
498
+ state: z.string().max(50).optional(),
499
+ zip: z.string().max(20).optional(),
500
+ country: z.string().max(50).optional(),
501
+ validation_status: z
502
+ .enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
503
+ .optional(),
504
+ });
505
+ const CheckoutOneTimeForItemsHostedPageItemPricesSchema = z.object({
506
+ item_price_id: z.array(z.string().max(100).optional()).optional(),
507
+ quantity: z.array(z.number().int().min(1).optional()).optional(),
508
+ quantity_in_decimal: z.array(z.string().max(33).optional()).optional(),
509
+ unit_price: z.array(z.number().int().min(0).optional()).optional(),
510
+ unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(),
511
+ date_from: z.array(z.number().int().optional()).optional(),
512
+ date_to: z.array(z.number().int().optional()).optional(),
513
+ });
514
+ const CheckoutOneTimeForItemsHostedPageItemTiersSchema = z.object({
515
+ item_price_id: z.array(z.string().max(100).optional()).optional(),
516
+ starting_unit: z.array(z.number().int().min(1).optional()).optional(),
517
+ ending_unit: z.array(z.number().int().optional()).optional(),
518
+ price: z.array(z.number().int().min(0).optional()).optional(),
519
+ starting_unit_in_decimal: z.array(z.string().max(33).optional()).optional(),
520
+ ending_unit_in_decimal: z.array(z.string().max(33).optional()).optional(),
521
+ price_in_decimal: z.array(z.string().max(39).optional()).optional(),
522
+ pricing_type: z
523
+ .array(z.enum(['per_unit', 'flat_fee', 'package']).optional())
524
+ .optional(),
525
+ package_size: z.array(z.number().int().min(1).optional()).optional(),
526
+ });
527
+ const CheckoutOneTimeForItemsHostedPageChargesSchema = z.object({
528
+ amount: z.array(z.number().int().min(1).optional()).optional(),
529
+ amount_in_decimal: z.array(z.string().max(39).optional()).optional(),
530
+ description: z.array(z.string().max(250).optional()).optional(),
531
+ taxable: z.array(z.boolean().default(true).optional()).optional(),
532
+ tax_profile_id: z.array(z.string().max(50).optional()).optional(),
533
+ avalara_tax_code: z.array(z.string().max(50).optional()).optional(),
534
+ hsn_code: z.array(z.string().max(50).optional()).optional(),
535
+ taxjar_product_code: z.array(z.string().max(50).optional()).optional(),
536
+ avalara_sale_type: z
537
+ .array(z.enum(['wholesale', 'retail', 'consumed', 'vendor_use']).optional())
538
+ .optional(),
539
+ avalara_transaction_type: z.array(z.number().int().optional()).optional(),
540
+ avalara_service_type: z.array(z.number().int().optional()).optional(),
541
+ date_from: z.array(z.number().int().optional()).optional(),
542
+ date_to: z.array(z.number().int().optional()).optional(),
543
+ });
544
+ const CheckoutOneTimeForItemsHostedPageDiscountsSchema = z.object({
545
+ percentage: z.array(z.number().min(0.01).max(100).optional()).optional(),
546
+ amount: z.array(z.number().int().min(0).optional()).optional(),
547
+ quantity: z.array(z.number().int().min(1).optional()).optional(),
548
+ apply_on: z.array(z.enum(['invoice_amount', 'specific_item_price']).optional()),
549
+ item_price_id: z.array(z.string().max(100).optional()).optional(),
550
+ });
551
+ const CheckoutOneTimeForItemsHostedPageEntityIdentifiersSchema = z.object({
552
+ id: z.array(z.string().max(40).optional()).optional(),
553
+ scheme: z.array(z.string().max(50).optional()).optional(),
554
+ value: z.array(z.string().max(50).optional()).optional(),
555
+ operation: z
556
+ .array(z.enum(['create', 'update', 'delete']).optional())
557
+ .optional(),
558
+ standard: z.array(z.string().max(50).optional()).optional(),
559
+ });
560
+ const CheckoutOneTimeForItemsHostedPageBodySchema = z.looseObject({
561
+ business_entity_id: z.string().max(50).optional(),
562
+ layout: z.enum(['in_app', 'full_page']).optional(),
563
+ invoice_note: z.string().max(2000).optional(),
564
+ coupon: z.string().max(100).optional(),
565
+ coupon_ids: z.array(z.string().max(100).optional()).optional(),
566
+ currency_code: z.string().max(3).optional(),
567
+ redirect_url: z.string().max(250).optional(),
568
+ cancel_url: z.string().max(250).optional(),
569
+ pass_thru_content: z.string().max(2048).optional(),
570
+ customer: CheckoutOneTimeForItemsHostedPageCustomerSchema.optional(),
571
+ invoice: CheckoutOneTimeForItemsHostedPageInvoiceSchema.optional(),
572
+ card: CheckoutOneTimeForItemsHostedPageCardSchema.optional(),
573
+ billing_address: CheckoutOneTimeForItemsHostedPageBillingAddressSchema.optional(),
574
+ shipping_address: CheckoutOneTimeForItemsHostedPageShippingAddressSchema.optional(),
575
+ item_prices: CheckoutOneTimeForItemsHostedPageItemPricesSchema.optional(),
576
+ item_tiers: CheckoutOneTimeForItemsHostedPageItemTiersSchema.optional(),
577
+ charges: CheckoutOneTimeForItemsHostedPageChargesSchema.optional(),
578
+ discounts: CheckoutOneTimeForItemsHostedPageDiscountsSchema.optional(),
579
+ entity_identifiers: CheckoutOneTimeForItemsHostedPageEntityIdentifiersSchema.optional(),
580
+ });
581
+ export { CheckoutOneTimeForItemsHostedPageBodySchema };
582
+ //HostedPage.checkoutNewForItems
583
+ const CheckoutNewForItemsHostedPageSubscriptionSchema = z.looseObject({
584
+ id: z.string().max(50).optional(),
585
+ trial_end: z.number().int().optional(),
586
+ setup_fee: z.number().int().min(0).optional(),
587
+ start_date: z.number().int().optional(),
588
+ coupon: z.string().max(100).optional(),
589
+ auto_collection: z.enum(['on', 'off']).optional(),
590
+ offline_payment_method: z
591
+ .enum([
592
+ 'no_preference',
593
+ 'cash',
594
+ 'check',
595
+ 'bank_transfer',
596
+ 'ach_credit',
597
+ 'sepa_credit',
598
+ 'boleto',
599
+ 'us_automated_bank_transfer',
600
+ 'eu_automated_bank_transfer',
601
+ 'uk_automated_bank_transfer',
602
+ 'jp_automated_bank_transfer',
603
+ 'mx_automated_bank_transfer',
604
+ 'custom',
605
+ ])
606
+ .optional(),
607
+ invoice_notes: z.string().max(2000).optional(),
608
+ po_number: z.string().max(100).optional(),
609
+ contract_term_billing_cycle_on_renewal: z
610
+ .number()
611
+ .int()
612
+ .min(1)
613
+ .max(100)
614
+ .optional(),
615
+ });
616
+ const CheckoutNewForItemsHostedPageCustomerSchema = z.looseObject({
617
+ id: z.string().max(50).optional(),
618
+ email: z.string().email().max(70).optional(),
619
+ first_name: z.string().max(150).optional(),
620
+ last_name: z.string().max(150).optional(),
621
+ company: z.string().max(250).optional(),
622
+ phone: z.string().max(50).optional(),
623
+ locale: z.string().max(50).optional(),
624
+ taxability: z.enum(['taxable', 'exempt']).optional(),
625
+ vat_number: z.string().max(20).optional(),
626
+ vat_number_prefix: z.string().max(10).optional(),
627
+ is_einvoice_enabled: z.boolean().optional(),
628
+ entity_identifier_scheme: z.string().max(50).optional(),
629
+ entity_identifier_standard: z.string().max(50).optional(),
630
+ einvoicing_method: z.enum(['automatic', 'manual', 'site_default']).optional(),
631
+ });
632
+ const CheckoutNewForItemsHostedPageCardSchema = z.object({
633
+ gateway: z
634
+ .enum([
635
+ 'chargebee',
636
+ 'chargebee_payments',
637
+ 'adyen',
638
+ 'stripe',
639
+ 'wepay',
640
+ 'braintree',
641
+ 'authorize_net',
642
+ 'paypal_pro',
643
+ 'pin',
644
+ 'eway',
645
+ 'eway_rapid',
646
+ 'worldpay',
647
+ 'balanced_payments',
648
+ 'beanstream',
649
+ 'bluepay',
650
+ 'elavon',
651
+ 'first_data_global',
652
+ 'hdfc',
653
+ 'migs',
654
+ 'nmi',
655
+ 'ogone',
656
+ 'paymill',
657
+ 'paypal_payflow_pro',
658
+ 'sage_pay',
659
+ 'tco',
660
+ 'wirecard',
661
+ 'amazon_payments',
662
+ 'paypal_express_checkout',
663
+ 'orbital',
664
+ 'moneris_us',
665
+ 'moneris',
666
+ 'bluesnap',
667
+ 'cybersource',
668
+ 'vantiv',
669
+ 'checkout_com',
670
+ 'paypal',
671
+ 'ingenico_direct',
672
+ 'exact',
673
+ 'mollie',
674
+ 'quickbooks',
675
+ 'razorpay',
676
+ 'global_payments',
677
+ 'bank_of_america',
678
+ 'ecentric',
679
+ 'metrics_global',
680
+ 'windcave',
681
+ 'pay_com',
682
+ 'ebanx',
683
+ 'dlocal',
684
+ 'nuvei',
685
+ 'solidgate',
686
+ 'paystack',
687
+ 'jp_morgan',
688
+ 'deutsche_bank',
689
+ 'ezidebit',
690
+ 'twikey',
691
+ 'tempus',
692
+ 'moyasar',
693
+ 'payway',
694
+ ])
695
+ .optional(),
696
+ gateway_account_id: z.string().max(50).optional(),
697
+ });
698
+ const CheckoutNewForItemsHostedPageBillingAddressSchema = z.object({
699
+ first_name: z.string().max(150).optional(),
700
+ last_name: z.string().max(150).optional(),
701
+ email: z.string().email().max(70).optional(),
702
+ company: z.string().max(250).optional(),
703
+ phone: z.string().max(50).optional(),
704
+ line1: z.string().max(150).optional(),
705
+ line2: z.string().max(150).optional(),
706
+ line3: z.string().max(150).optional(),
707
+ city: z.string().max(50).optional(),
708
+ state_code: z.string().max(50).optional(),
709
+ state: z.string().max(50).optional(),
710
+ zip: z.string().max(20).optional(),
711
+ country: z.string().max(50).optional(),
712
+ validation_status: z
713
+ .enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
714
+ .optional(),
715
+ });
716
+ const CheckoutNewForItemsHostedPageShippingAddressSchema = z.object({
717
+ first_name: z.string().max(150).optional(),
718
+ last_name: z.string().max(150).optional(),
719
+ email: z.string().email().max(70).optional(),
720
+ company: z.string().max(250).optional(),
721
+ phone: z.string().max(50).optional(),
722
+ line1: z.string().max(150).optional(),
723
+ line2: z.string().max(150).optional(),
724
+ line3: z.string().max(150).optional(),
725
+ city: z.string().max(50).optional(),
726
+ state_code: z.string().max(50).optional(),
727
+ state: z.string().max(50).optional(),
728
+ zip: z.string().max(20).optional(),
729
+ country: z.string().max(50).optional(),
730
+ validation_status: z
731
+ .enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
732
+ .optional(),
733
+ });
734
+ const CheckoutNewForItemsHostedPageContractTermSchema = z.object({
735
+ action_at_term_end: z.enum(['renew', 'evergreen', 'cancel']).optional(),
736
+ cancellation_cutoff_period: z.number().int().optional(),
737
+ });
738
+ const CheckoutNewForItemsHostedPageSubscriptionItemsSchema = z.object({
739
+ item_price_id: z.array(z.string().max(100).optional()),
740
+ quantity: z.array(z.number().int().min(1).optional()).optional(),
741
+ quantity_in_decimal: z.array(z.string().max(33).optional()).optional(),
742
+ unit_price: z.array(z.number().int().min(0).optional()).optional(),
743
+ unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(),
744
+ billing_cycles: z.array(z.number().int().min(0).optional()).optional(),
745
+ trial_end: z.array(z.number().int().optional()).optional(),
746
+ service_period_days: z
747
+ .array(z.number().int().min(1).max(730).optional())
748
+ .optional(),
749
+ charge_on_event: z
750
+ .array(z
751
+ .enum([
752
+ 'subscription_creation',
753
+ 'subscription_trial_start',
754
+ 'plan_activation',
755
+ 'subscription_activation',
756
+ 'contract_termination',
757
+ ])
758
+ .optional())
759
+ .optional(),
760
+ charge_once: z.array(z.boolean().optional()).optional(),
761
+ item_type: z.array(z.enum(['plan', 'addon', 'charge']).optional()).optional(),
762
+ charge_on_option: z
763
+ .array(z.enum(['immediately', 'on_event']).optional())
764
+ .optional(),
765
+ });
766
+ const CheckoutNewForItemsHostedPageDiscountsSchema = z.object({
767
+ apply_on: z
768
+ .array(z.enum(['invoice_amount', 'specific_item_price']).optional())
769
+ .optional(),
770
+ duration_type: z.array(z.enum(['one_time', 'forever', 'limited_period']).optional()),
771
+ percentage: z.array(z.number().min(0.01).max(100).optional()).optional(),
772
+ amount: z.array(z.number().int().min(0).optional()).optional(),
773
+ period: z.array(z.number().int().min(1).optional()).optional(),
774
+ period_unit: z
775
+ .array(z.enum(['day', 'week', 'month', 'year']).optional())
776
+ .optional(),
777
+ included_in_mrr: z.array(z.boolean().optional()).optional(),
778
+ item_price_id: z.array(z.string().max(100).optional()).optional(),
779
+ quantity: z.array(z.number().int().min(1).optional()).optional(),
780
+ });
781
+ const CheckoutNewForItemsHostedPageItemTiersSchema = z.object({
782
+ item_price_id: z.array(z.string().max(100).optional()).optional(),
783
+ starting_unit: z.array(z.number().int().min(1).optional()).optional(),
784
+ ending_unit: z.array(z.number().int().optional()).optional(),
785
+ price: z.array(z.number().int().min(0).optional()).optional(),
786
+ starting_unit_in_decimal: z.array(z.string().max(33).optional()).optional(),
787
+ ending_unit_in_decimal: z.array(z.string().max(33).optional()).optional(),
788
+ price_in_decimal: z.array(z.string().max(39).optional()).optional(),
789
+ pricing_type: z
790
+ .array(z.enum(['per_unit', 'flat_fee', 'package']).optional())
791
+ .optional(),
792
+ package_size: z.array(z.number().int().min(1).optional()).optional(),
793
+ });
794
+ const CheckoutNewForItemsHostedPageEntityIdentifiersSchema = z.object({
795
+ id: z.array(z.string().max(40).optional()).optional(),
796
+ scheme: z.array(z.string().max(50).optional()).optional(),
797
+ value: z.array(z.string().max(50).optional()).optional(),
798
+ operation: z
799
+ .array(z.enum(['create', 'update', 'delete']).optional())
800
+ .optional(),
801
+ standard: z.array(z.string().max(50).optional()).optional(),
802
+ });
803
+ const CheckoutNewForItemsHostedPageBodySchema = z.looseObject({
804
+ layout: z.enum(['in_app', 'full_page']).optional(),
805
+ business_entity_id: z.string().max(50).optional(),
806
+ billing_cycles: z.number().int().min(0).optional(),
807
+ mandatory_items_to_remove: z.array(z.string().max(100).optional()).optional(),
808
+ terms_to_charge: z.number().int().min(1).optional(),
809
+ billing_alignment_mode: z.enum(['immediate', 'delayed']).optional(),
810
+ coupon_ids: z.array(z.string().max(100).optional()).optional(),
811
+ redirect_url: z.string().max(250).optional(),
812
+ cancel_url: z.string().max(250).optional(),
813
+ pass_thru_content: z.string().max(2048).optional(),
814
+ allow_offline_payment_methods: z.boolean().optional(),
815
+ subscription: CheckoutNewForItemsHostedPageSubscriptionSchema.optional(),
816
+ customer: CheckoutNewForItemsHostedPageCustomerSchema.optional(),
817
+ card: CheckoutNewForItemsHostedPageCardSchema.optional(),
818
+ billing_address: CheckoutNewForItemsHostedPageBillingAddressSchema.optional(),
819
+ shipping_address: CheckoutNewForItemsHostedPageShippingAddressSchema.optional(),
820
+ contract_term: CheckoutNewForItemsHostedPageContractTermSchema.optional(),
821
+ subscription_items: CheckoutNewForItemsHostedPageSubscriptionItemsSchema.optional(),
822
+ discounts: CheckoutNewForItemsHostedPageDiscountsSchema.optional(),
823
+ item_tiers: CheckoutNewForItemsHostedPageItemTiersSchema.optional(),
824
+ entity_identifiers: CheckoutNewForItemsHostedPageEntityIdentifiersSchema.optional(),
825
+ });
826
+ export { CheckoutNewForItemsHostedPageBodySchema };
827
+ //HostedPage.checkoutExisting
828
+ const CheckoutExistingHostedPageSubscriptionSchema = z.looseObject({
829
+ id: z.string().max(50),
830
+ plan_id: z.string().max(100).optional(),
831
+ plan_quantity: z.number().int().min(1).optional(),
832
+ plan_unit_price: z.number().int().min(0).optional(),
833
+ setup_fee: z.number().int().min(0).optional(),
834
+ plan_quantity_in_decimal: z.string().max(33).optional(),
835
+ plan_unit_price_in_decimal: z.string().max(39).optional(),
836
+ start_date: z.number().int().optional(),
837
+ trial_end: z.number().int().optional(),
838
+ coupon: z.string().max(100).optional(),
839
+ auto_collection: z.enum(['on', 'off']).optional(),
840
+ offline_payment_method: z
841
+ .enum([
842
+ 'no_preference',
843
+ 'cash',
844
+ 'check',
845
+ 'bank_transfer',
846
+ 'ach_credit',
847
+ 'sepa_credit',
848
+ 'boleto',
849
+ 'us_automated_bank_transfer',
850
+ 'eu_automated_bank_transfer',
851
+ 'uk_automated_bank_transfer',
852
+ 'jp_automated_bank_transfer',
853
+ 'mx_automated_bank_transfer',
854
+ 'custom',
855
+ ])
856
+ .optional(),
857
+ invoice_notes: z.string().max(2000).optional(),
858
+ contract_term_billing_cycle_on_renewal: z
859
+ .number()
860
+ .int()
861
+ .min(1)
862
+ .max(100)
863
+ .optional(),
864
+ });
865
+ const CheckoutExistingHostedPageCustomerSchema = z.looseObject({
866
+ vat_number: z.string().max(20).optional(),
867
+ vat_number_prefix: z.string().max(10).optional(),
868
+ });
869
+ const CheckoutExistingHostedPageCardSchema = z.object({
870
+ gateway: z
871
+ .enum([
872
+ 'chargebee',
873
+ 'chargebee_payments',
874
+ 'adyen',
875
+ 'stripe',
876
+ 'wepay',
877
+ 'braintree',
878
+ 'authorize_net',
879
+ 'paypal_pro',
880
+ 'pin',
881
+ 'eway',
882
+ 'eway_rapid',
883
+ 'worldpay',
884
+ 'balanced_payments',
885
+ 'beanstream',
886
+ 'bluepay',
887
+ 'elavon',
888
+ 'first_data_global',
889
+ 'hdfc',
890
+ 'migs',
891
+ 'nmi',
892
+ 'ogone',
893
+ 'paymill',
894
+ 'paypal_payflow_pro',
895
+ 'sage_pay',
896
+ 'tco',
897
+ 'wirecard',
898
+ 'amazon_payments',
899
+ 'paypal_express_checkout',
900
+ 'orbital',
901
+ 'moneris_us',
902
+ 'moneris',
903
+ 'bluesnap',
904
+ 'cybersource',
905
+ 'vantiv',
906
+ 'checkout_com',
907
+ 'paypal',
908
+ 'ingenico_direct',
909
+ 'exact',
910
+ 'mollie',
911
+ 'quickbooks',
912
+ 'razorpay',
913
+ 'global_payments',
914
+ 'bank_of_america',
915
+ 'ecentric',
916
+ 'metrics_global',
917
+ 'windcave',
918
+ 'pay_com',
919
+ 'ebanx',
920
+ 'dlocal',
921
+ 'nuvei',
922
+ 'solidgate',
923
+ 'paystack',
924
+ 'jp_morgan',
925
+ 'deutsche_bank',
926
+ 'ezidebit',
927
+ 'twikey',
928
+ 'tempus',
929
+ 'moyasar',
930
+ 'payway',
931
+ ])
932
+ .optional(),
933
+ gateway_account_id: z.string().max(50).optional(),
934
+ });
935
+ const CheckoutExistingHostedPageContractTermSchema = z.object({
936
+ action_at_term_end: z.enum(['renew', 'evergreen', 'cancel']).optional(),
937
+ cancellation_cutoff_period: z.number().int().optional(),
938
+ });
939
+ const CheckoutExistingHostedPageAddonsSchema = z.object({
940
+ id: z.array(z.string().max(100).optional()).optional(),
941
+ quantity: z.array(z.number().int().min(1).optional()).optional(),
942
+ unit_price: z.array(z.number().int().min(0).optional()).optional(),
943
+ billing_cycles: z.array(z.number().int().min(0).optional()).optional(),
944
+ quantity_in_decimal: z.array(z.string().max(33).optional()).optional(),
945
+ unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(),
946
+ });
947
+ const CheckoutExistingHostedPageEventBasedAddonsSchema = z.object({
948
+ id: z.array(z.string().max(100).optional()).optional(),
949
+ quantity: z.array(z.number().int().min(1).optional()).optional(),
950
+ unit_price: z.array(z.number().int().min(0).optional()).optional(),
951
+ service_period_in_days: z
952
+ .array(z.number().int().min(1).max(4000).optional())
953
+ .optional(),
954
+ charge_on: z.array(z.enum(['immediately', 'on_event']).optional()).optional(),
955
+ on_event: z
956
+ .array(z
957
+ .enum([
958
+ 'subscription_creation',
959
+ 'subscription_trial_start',
960
+ 'plan_activation',
961
+ 'subscription_activation',
962
+ 'contract_termination',
963
+ ])
964
+ .optional())
965
+ .optional(),
966
+ charge_once: z.array(z.boolean().default(true).optional()).optional(),
967
+ quantity_in_decimal: z.array(z.string().max(33).optional()).optional(),
968
+ unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(),
969
+ });
970
+ const CheckoutExistingHostedPageBodySchema = z.looseObject({
971
+ replace_addon_list: z.boolean().default(false).optional(),
972
+ mandatory_addons_to_remove: z
973
+ .array(z.string().max(100).optional())
974
+ .optional(),
975
+ invoice_date: z.number().int().optional(),
976
+ billing_cycles: z.number().int().min(0).optional(),
977
+ terms_to_charge: z.number().int().min(1).optional(),
978
+ reactivate_from: z.number().int().optional(),
979
+ billing_alignment_mode: z.enum(['immediate', 'delayed']).optional(),
980
+ coupon_ids: z.array(z.string().max(100).optional()).optional(),
981
+ replace_coupon_list: z.boolean().default(false).optional(),
982
+ reactivate: z.boolean().optional(),
983
+ force_term_reset: z.boolean().default(false).optional(),
984
+ redirect_url: z.string().max(250).optional(),
985
+ cancel_url: z.string().max(250).optional(),
986
+ pass_thru_content: z.string().max(2048).optional(),
987
+ embed: z.boolean().default(true).optional(),
988
+ iframe_messaging: z.boolean().default(false).optional(),
989
+ allow_offline_payment_methods: z.boolean().optional(),
990
+ subscription: CheckoutExistingHostedPageSubscriptionSchema.optional(),
991
+ customer: CheckoutExistingHostedPageCustomerSchema.optional(),
992
+ card: CheckoutExistingHostedPageCardSchema.optional(),
993
+ contract_term: CheckoutExistingHostedPageContractTermSchema.optional(),
994
+ addons: CheckoutExistingHostedPageAddonsSchema.optional(),
995
+ event_based_addons: CheckoutExistingHostedPageEventBasedAddonsSchema.optional(),
996
+ });
997
+ export { CheckoutExistingHostedPageBodySchema };
998
+ //HostedPage.checkoutExistingForItems
999
+ const CheckoutExistingForItemsHostedPageSubscriptionSchema = z.looseObject({
1000
+ id: z.string().max(50),
1001
+ setup_fee: z.number().int().min(0).optional(),
1002
+ start_date: z.number().int().optional(),
1003
+ trial_end: z.number().int().optional(),
1004
+ coupon: z.string().max(100).optional(),
1005
+ auto_collection: z.enum(['on', 'off']).optional(),
1006
+ offline_payment_method: z
1007
+ .enum([
1008
+ 'no_preference',
1009
+ 'cash',
1010
+ 'check',
1011
+ 'bank_transfer',
1012
+ 'ach_credit',
1013
+ 'sepa_credit',
1014
+ 'boleto',
1015
+ 'us_automated_bank_transfer',
1016
+ 'eu_automated_bank_transfer',
1017
+ 'uk_automated_bank_transfer',
1018
+ 'jp_automated_bank_transfer',
1019
+ 'mx_automated_bank_transfer',
1020
+ 'custom',
1021
+ ])
1022
+ .optional(),
1023
+ invoice_notes: z.string().max(2000).optional(),
1024
+ contract_term_billing_cycle_on_renewal: z
1025
+ .number()
1026
+ .int()
1027
+ .min(1)
1028
+ .max(100)
1029
+ .optional(),
1030
+ });
1031
+ const CheckoutExistingForItemsHostedPageCustomerSchema = z.looseObject({
1032
+ vat_number: z.string().max(20).optional(),
1033
+ vat_number_prefix: z.string().max(10).optional(),
1034
+ is_einvoice_enabled: z.boolean().optional(),
1035
+ entity_identifier_scheme: z.string().max(50).optional(),
1036
+ entity_identifier_standard: z.string().max(50).optional(),
1037
+ });
1038
+ const CheckoutExistingForItemsHostedPageCardSchema = z.object({
1039
+ gateway: z
1040
+ .enum([
1041
+ 'chargebee',
1042
+ 'chargebee_payments',
1043
+ 'adyen',
1044
+ 'stripe',
1045
+ 'wepay',
1046
+ 'braintree',
1047
+ 'authorize_net',
1048
+ 'paypal_pro',
1049
+ 'pin',
1050
+ 'eway',
1051
+ 'eway_rapid',
1052
+ 'worldpay',
1053
+ 'balanced_payments',
1054
+ 'beanstream',
1055
+ 'bluepay',
1056
+ 'elavon',
1057
+ 'first_data_global',
1058
+ 'hdfc',
1059
+ 'migs',
1060
+ 'nmi',
1061
+ 'ogone',
1062
+ 'paymill',
1063
+ 'paypal_payflow_pro',
1064
+ 'sage_pay',
1065
+ 'tco',
1066
+ 'wirecard',
1067
+ 'amazon_payments',
1068
+ 'paypal_express_checkout',
1069
+ 'orbital',
1070
+ 'moneris_us',
1071
+ 'moneris',
1072
+ 'bluesnap',
1073
+ 'cybersource',
1074
+ 'vantiv',
1075
+ 'checkout_com',
1076
+ 'paypal',
1077
+ 'ingenico_direct',
1078
+ 'exact',
1079
+ 'mollie',
1080
+ 'quickbooks',
1081
+ 'razorpay',
1082
+ 'global_payments',
1083
+ 'bank_of_america',
1084
+ 'ecentric',
1085
+ 'metrics_global',
1086
+ 'windcave',
1087
+ 'pay_com',
1088
+ 'ebanx',
1089
+ 'dlocal',
1090
+ 'nuvei',
1091
+ 'solidgate',
1092
+ 'paystack',
1093
+ 'jp_morgan',
1094
+ 'deutsche_bank',
1095
+ 'ezidebit',
1096
+ 'twikey',
1097
+ 'tempus',
1098
+ 'moyasar',
1099
+ 'payway',
1100
+ ])
1101
+ .optional(),
1102
+ gateway_account_id: z.string().max(50).optional(),
1103
+ });
1104
+ const CheckoutExistingForItemsHostedPageContractTermSchema = z.object({
1105
+ action_at_term_end: z.enum(['renew', 'evergreen', 'cancel']).optional(),
1106
+ cancellation_cutoff_period: z.number().int().optional(),
1107
+ });
1108
+ const CheckoutExistingForItemsHostedPageSubscriptionItemsSchema = z.object({
1109
+ item_price_id: z.array(z.string().max(100).optional()),
1110
+ quantity: z.array(z.number().int().min(1).optional()).optional(),
1111
+ quantity_in_decimal: z.array(z.string().max(33).optional()).optional(),
1112
+ unit_price: z.array(z.number().int().min(0).optional()).optional(),
1113
+ unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(),
1114
+ billing_cycles: z.array(z.number().int().min(0).optional()).optional(),
1115
+ trial_end: z.array(z.number().int().optional()).optional(),
1116
+ service_period_days: z
1117
+ .array(z.number().int().min(1).max(730).optional())
1118
+ .optional(),
1119
+ charge_on_event: z
1120
+ .array(z
1121
+ .enum([
1122
+ 'subscription_creation',
1123
+ 'subscription_trial_start',
1124
+ 'plan_activation',
1125
+ 'subscription_activation',
1126
+ 'contract_termination',
1127
+ ])
1128
+ .optional())
1129
+ .optional(),
1130
+ charge_once: z.array(z.boolean().optional()).optional(),
1131
+ charge_on_option: z
1132
+ .array(z.enum(['immediately', 'on_event']).optional())
1133
+ .optional(),
1134
+ item_type: z.array(z.enum(['plan', 'addon', 'charge']).optional()).optional(),
1135
+ });
1136
+ const CheckoutExistingForItemsHostedPageDiscountsSchema = z.object({
1137
+ apply_on: z
1138
+ .array(z.enum(['invoice_amount', 'specific_item_price']).optional())
1139
+ .optional(),
1140
+ duration_type: z.array(z.enum(['one_time', 'forever', 'limited_period']).optional()),
1141
+ percentage: z.array(z.number().min(0.01).max(100).optional()).optional(),
1142
+ amount: z.array(z.number().int().min(0).optional()).optional(),
1143
+ period: z.array(z.number().int().min(1).optional()).optional(),
1144
+ period_unit: z
1145
+ .array(z.enum(['day', 'week', 'month', 'year']).optional())
1146
+ .optional(),
1147
+ included_in_mrr: z.array(z.boolean().optional()).optional(),
1148
+ item_price_id: z.array(z.string().max(100).optional()).optional(),
1149
+ quantity: z.array(z.number().int().min(1).optional()).optional(),
1150
+ operation_type: z.array(z.enum(['add', 'remove']).optional()),
1151
+ id: z.array(z.string().max(50).optional()).optional(),
1152
+ });
1153
+ const CheckoutExistingForItemsHostedPageItemTiersSchema = z.object({
1154
+ item_price_id: z.array(z.string().max(100).optional()).optional(),
1155
+ starting_unit: z.array(z.number().int().min(1).optional()).optional(),
1156
+ ending_unit: z.array(z.number().int().optional()).optional(),
1157
+ price: z.array(z.number().int().min(0).optional()).optional(),
1158
+ starting_unit_in_decimal: z.array(z.string().max(33).optional()).optional(),
1159
+ ending_unit_in_decimal: z.array(z.string().max(33).optional()).optional(),
1160
+ price_in_decimal: z.array(z.string().max(39).optional()).optional(),
1161
+ pricing_type: z
1162
+ .array(z.enum(['per_unit', 'flat_fee', 'package']).optional())
1163
+ .optional(),
1164
+ package_size: z.array(z.number().int().min(1).optional()).optional(),
1165
+ });
1166
+ const CheckoutExistingForItemsHostedPageEntityIdentifiersSchema = z.object({
1167
+ id: z.array(z.string().max(40).optional()).optional(),
1168
+ scheme: z.array(z.string().max(50).optional()).optional(),
1169
+ value: z.array(z.string().max(50).optional()).optional(),
1170
+ operation: z
1171
+ .array(z.enum(['create', 'update', 'delete']).optional())
1172
+ .optional(),
1173
+ standard: z.array(z.string().max(50).optional()).optional(),
1174
+ });
1175
+ const CheckoutExistingForItemsHostedPageBodySchema = z.looseObject({
1176
+ layout: z.enum(['in_app', 'full_page']).optional(),
1177
+ mandatory_items_to_remove: z.array(z.string().max(100).optional()).optional(),
1178
+ replace_items_list: z.boolean().default(false).optional(),
1179
+ invoice_date: z.number().int().optional(),
1180
+ billing_cycles: z.number().int().min(0).optional(),
1181
+ terms_to_charge: z.number().int().min(1).optional(),
1182
+ reactivate_from: z.number().int().optional(),
1183
+ billing_alignment_mode: z.enum(['immediate', 'delayed']).optional(),
1184
+ coupon_ids: z.array(z.string().max(100).optional()).optional(),
1185
+ replace_coupon_list: z.boolean().default(false).optional(),
1186
+ reactivate: z.boolean().optional(),
1187
+ force_term_reset: z.boolean().default(false).optional(),
1188
+ change_option: z
1189
+ .enum(['immediately', 'end_of_term', 'specific_date'])
1190
+ .optional(),
1191
+ changes_scheduled_at: z.number().int().optional(),
1192
+ invoice_usages: z.boolean().default(false).optional(),
1193
+ redirect_url: z.string().max(250).optional(),
1194
+ cancel_url: z.string().max(250).optional(),
1195
+ pass_thru_content: z.string().max(2048).optional(),
1196
+ allow_offline_payment_methods: z.boolean().optional(),
1197
+ subscription: CheckoutExistingForItemsHostedPageSubscriptionSchema.optional(),
1198
+ customer: CheckoutExistingForItemsHostedPageCustomerSchema.optional(),
1199
+ card: CheckoutExistingForItemsHostedPageCardSchema.optional(),
1200
+ contract_term: CheckoutExistingForItemsHostedPageContractTermSchema.optional(),
1201
+ subscription_items: CheckoutExistingForItemsHostedPageSubscriptionItemsSchema.optional(),
1202
+ discounts: CheckoutExistingForItemsHostedPageDiscountsSchema.optional(),
1203
+ item_tiers: CheckoutExistingForItemsHostedPageItemTiersSchema.optional(),
1204
+ entity_identifiers: CheckoutExistingForItemsHostedPageEntityIdentifiersSchema.optional(),
1205
+ });
1206
+ export { CheckoutExistingForItemsHostedPageBodySchema };
1207
+ //HostedPage.updateCard
1208
+ const UpdateCardHostedPageCustomerSchema = z.object({
1209
+ id: z.string().max(50),
1210
+ vat_number: z.string().max(20).optional(),
1211
+ vat_number_prefix: z.string().max(10).optional(),
1212
+ });
1213
+ const UpdateCardHostedPageCardSchema = z.object({
1214
+ gateway: z
1215
+ .enum([
1216
+ 'chargebee',
1217
+ 'chargebee_payments',
1218
+ 'adyen',
1219
+ 'stripe',
1220
+ 'wepay',
1221
+ 'braintree',
1222
+ 'authorize_net',
1223
+ 'paypal_pro',
1224
+ 'pin',
1225
+ 'eway',
1226
+ 'eway_rapid',
1227
+ 'worldpay',
1228
+ 'balanced_payments',
1229
+ 'beanstream',
1230
+ 'bluepay',
1231
+ 'elavon',
1232
+ 'first_data_global',
1233
+ 'hdfc',
1234
+ 'migs',
1235
+ 'nmi',
1236
+ 'ogone',
1237
+ 'paymill',
1238
+ 'paypal_payflow_pro',
1239
+ 'sage_pay',
1240
+ 'tco',
1241
+ 'wirecard',
1242
+ 'amazon_payments',
1243
+ 'paypal_express_checkout',
1244
+ 'orbital',
1245
+ 'moneris_us',
1246
+ 'moneris',
1247
+ 'bluesnap',
1248
+ 'cybersource',
1249
+ 'vantiv',
1250
+ 'checkout_com',
1251
+ 'paypal',
1252
+ 'ingenico_direct',
1253
+ 'exact',
1254
+ 'mollie',
1255
+ 'quickbooks',
1256
+ 'razorpay',
1257
+ 'global_payments',
1258
+ 'bank_of_america',
1259
+ 'ecentric',
1260
+ 'metrics_global',
1261
+ 'windcave',
1262
+ 'pay_com',
1263
+ 'ebanx',
1264
+ 'dlocal',
1265
+ 'nuvei',
1266
+ 'solidgate',
1267
+ 'paystack',
1268
+ 'jp_morgan',
1269
+ 'deutsche_bank',
1270
+ 'ezidebit',
1271
+ 'twikey',
1272
+ 'tempus',
1273
+ 'moyasar',
1274
+ 'payway',
1275
+ ])
1276
+ .optional(),
1277
+ gateway_account_id: z.string().max(50).optional(),
1278
+ });
1279
+ const UpdateCardHostedPageBodySchema = z.looseObject({
1280
+ redirect_url: z.string().max(250).optional(),
1281
+ cancel_url: z.string().max(250).optional(),
1282
+ pass_thru_content: z.string().max(2048).optional(),
1283
+ iframe_messaging: z.boolean().default(false).optional(),
1284
+ customer: UpdateCardHostedPageCustomerSchema.optional(),
1285
+ card: UpdateCardHostedPageCardSchema.optional(),
1286
+ embed: z.boolean().default(true).optional(),
1287
+ });
1288
+ export { UpdateCardHostedPageBodySchema };
1289
+ //HostedPage.updatePaymentMethod
1290
+ const UpdatePaymentMethodHostedPageCustomerSchema = z.object({
1291
+ id: z.string().max(50),
1292
+ vat_number: z.string().max(20).optional(),
1293
+ vat_number_prefix: z.string().max(10).optional(),
1294
+ });
1295
+ const UpdatePaymentMethodHostedPageCardSchema = z.object({
1296
+ gateway: z
1297
+ .enum([
1298
+ 'chargebee',
1299
+ 'chargebee_payments',
1300
+ 'adyen',
1301
+ 'stripe',
1302
+ 'wepay',
1303
+ 'braintree',
1304
+ 'authorize_net',
1305
+ 'paypal_pro',
1306
+ 'pin',
1307
+ 'eway',
1308
+ 'eway_rapid',
1309
+ 'worldpay',
1310
+ 'balanced_payments',
1311
+ 'beanstream',
1312
+ 'bluepay',
1313
+ 'elavon',
1314
+ 'first_data_global',
1315
+ 'hdfc',
1316
+ 'migs',
1317
+ 'nmi',
1318
+ 'ogone',
1319
+ 'paymill',
1320
+ 'paypal_payflow_pro',
1321
+ 'sage_pay',
1322
+ 'tco',
1323
+ 'wirecard',
1324
+ 'amazon_payments',
1325
+ 'paypal_express_checkout',
1326
+ 'orbital',
1327
+ 'moneris_us',
1328
+ 'moneris',
1329
+ 'bluesnap',
1330
+ 'cybersource',
1331
+ 'vantiv',
1332
+ 'checkout_com',
1333
+ 'paypal',
1334
+ 'ingenico_direct',
1335
+ 'exact',
1336
+ 'mollie',
1337
+ 'quickbooks',
1338
+ 'razorpay',
1339
+ 'global_payments',
1340
+ 'bank_of_america',
1341
+ 'ecentric',
1342
+ 'metrics_global',
1343
+ 'windcave',
1344
+ 'pay_com',
1345
+ 'ebanx',
1346
+ 'dlocal',
1347
+ 'nuvei',
1348
+ 'solidgate',
1349
+ 'paystack',
1350
+ 'jp_morgan',
1351
+ 'deutsche_bank',
1352
+ 'ezidebit',
1353
+ 'twikey',
1354
+ 'tempus',
1355
+ 'moyasar',
1356
+ 'payway',
1357
+ ])
1358
+ .optional(),
1359
+ gateway_account_id: z.string().max(50).optional(),
1360
+ });
1361
+ const UpdatePaymentMethodHostedPageBodySchema = z.looseObject({
1362
+ redirect_url: z.string().max(250).optional(),
1363
+ cancel_url: z.string().max(250).optional(),
1364
+ pass_thru_content: z.string().max(2048).optional(),
1365
+ iframe_messaging: z.boolean().default(false).optional(),
1366
+ customer: UpdatePaymentMethodHostedPageCustomerSchema.optional(),
1367
+ card: UpdatePaymentMethodHostedPageCardSchema.optional(),
1368
+ embed: z.boolean().default(true).optional(),
1369
+ });
1370
+ export { UpdatePaymentMethodHostedPageBodySchema };
1371
+ //HostedPage.managePaymentSources
1372
+ const ManagePaymentSourcesHostedPageCustomerSchema = z.object({
1373
+ id: z.string().max(50),
1374
+ });
1375
+ const ManagePaymentSourcesHostedPageCardSchema = z.object({
1376
+ gateway: z
1377
+ .enum([
1378
+ 'chargebee',
1379
+ 'chargebee_payments',
1380
+ 'adyen',
1381
+ 'stripe',
1382
+ 'wepay',
1383
+ 'braintree',
1384
+ 'authorize_net',
1385
+ 'paypal_pro',
1386
+ 'pin',
1387
+ 'eway',
1388
+ 'eway_rapid',
1389
+ 'worldpay',
1390
+ 'balanced_payments',
1391
+ 'beanstream',
1392
+ 'bluepay',
1393
+ 'elavon',
1394
+ 'first_data_global',
1395
+ 'hdfc',
1396
+ 'migs',
1397
+ 'nmi',
1398
+ 'ogone',
1399
+ 'paymill',
1400
+ 'paypal_payflow_pro',
1401
+ 'sage_pay',
1402
+ 'tco',
1403
+ 'wirecard',
1404
+ 'amazon_payments',
1405
+ 'paypal_express_checkout',
1406
+ 'orbital',
1407
+ 'moneris_us',
1408
+ 'moneris',
1409
+ 'bluesnap',
1410
+ 'cybersource',
1411
+ 'vantiv',
1412
+ 'checkout_com',
1413
+ 'paypal',
1414
+ 'ingenico_direct',
1415
+ 'exact',
1416
+ 'mollie',
1417
+ 'quickbooks',
1418
+ 'razorpay',
1419
+ 'global_payments',
1420
+ 'bank_of_america',
1421
+ 'ecentric',
1422
+ 'metrics_global',
1423
+ 'windcave',
1424
+ 'pay_com',
1425
+ 'ebanx',
1426
+ 'dlocal',
1427
+ 'nuvei',
1428
+ 'solidgate',
1429
+ 'paystack',
1430
+ 'jp_morgan',
1431
+ 'deutsche_bank',
1432
+ 'ezidebit',
1433
+ 'twikey',
1434
+ 'tempus',
1435
+ 'moyasar',
1436
+ 'payway',
1437
+ ])
1438
+ .optional(),
1439
+ gateway_account_id: z.string().max(50).optional(),
1440
+ });
1441
+ const ManagePaymentSourcesHostedPageBodySchema = z.looseObject({
1442
+ business_entity_id: z.string().max(50).optional(),
1443
+ redirect_url: z.string().max(250).optional(),
1444
+ customer: ManagePaymentSourcesHostedPageCustomerSchema.optional(),
1445
+ card: ManagePaymentSourcesHostedPageCardSchema.optional(),
1446
+ });
1447
+ export { ManagePaymentSourcesHostedPageBodySchema };
1448
+ //HostedPage.collectNow
1449
+ const CollectNowHostedPageCustomerSchema = z.object({
1450
+ id: z.string().max(50),
1451
+ });
1452
+ const CollectNowHostedPageCardSchema = z.object({
1453
+ gateway: z
1454
+ .enum([
1455
+ 'chargebee',
1456
+ 'chargebee_payments',
1457
+ 'adyen',
1458
+ 'stripe',
1459
+ 'wepay',
1460
+ 'braintree',
1461
+ 'authorize_net',
1462
+ 'paypal_pro',
1463
+ 'pin',
1464
+ 'eway',
1465
+ 'eway_rapid',
1466
+ 'worldpay',
1467
+ 'balanced_payments',
1468
+ 'beanstream',
1469
+ 'bluepay',
1470
+ 'elavon',
1471
+ 'first_data_global',
1472
+ 'hdfc',
1473
+ 'migs',
1474
+ 'nmi',
1475
+ 'ogone',
1476
+ 'paymill',
1477
+ 'paypal_payflow_pro',
1478
+ 'sage_pay',
1479
+ 'tco',
1480
+ 'wirecard',
1481
+ 'amazon_payments',
1482
+ 'paypal_express_checkout',
1483
+ 'orbital',
1484
+ 'moneris_us',
1485
+ 'moneris',
1486
+ 'bluesnap',
1487
+ 'cybersource',
1488
+ 'vantiv',
1489
+ 'checkout_com',
1490
+ 'paypal',
1491
+ 'ingenico_direct',
1492
+ 'exact',
1493
+ 'mollie',
1494
+ 'quickbooks',
1495
+ 'razorpay',
1496
+ 'global_payments',
1497
+ 'bank_of_america',
1498
+ 'ecentric',
1499
+ 'metrics_global',
1500
+ 'windcave',
1501
+ 'pay_com',
1502
+ 'ebanx',
1503
+ 'dlocal',
1504
+ 'nuvei',
1505
+ 'solidgate',
1506
+ 'paystack',
1507
+ 'jp_morgan',
1508
+ 'deutsche_bank',
1509
+ 'ezidebit',
1510
+ 'twikey',
1511
+ 'tempus',
1512
+ 'moyasar',
1513
+ 'payway',
1514
+ ])
1515
+ .optional(),
1516
+ gateway_account_id: z.string().max(50).optional(),
1517
+ });
1518
+ const CollectNowHostedPageBodySchema = z.looseObject({
1519
+ redirect_url: z.string().max(250).optional(),
1520
+ currency_code: z.string().max(3).optional(),
1521
+ payment_method_save_policy: z.enum(['always', 'ask', 'never']).optional(),
1522
+ customer: CollectNowHostedPageCustomerSchema.optional(),
1523
+ card: CollectNowHostedPageCardSchema.optional(),
1524
+ });
1525
+ export { CollectNowHostedPageBodySchema };
1526
+ //HostedPage.acceptQuote
1527
+ const AcceptQuoteHostedPageQuoteSchema = z.object({
1528
+ id: z.string().max(50),
1529
+ });
1530
+ const AcceptQuoteHostedPageBodySchema = z.looseObject({
1531
+ redirect_url: z.string().max(250).optional(),
1532
+ layout: z.enum(['in_app', 'full_page']).optional(),
1533
+ quote: AcceptQuoteHostedPageQuoteSchema.optional(),
1534
+ });
1535
+ export { AcceptQuoteHostedPageBodySchema };
1536
+ //HostedPage.extendSubscription
1537
+ const ExtendSubscriptionHostedPageSubscriptionSchema = z.object({
1538
+ id: z.string().max(50),
1539
+ });
1540
+ const ExtendSubscriptionHostedPageBodySchema = z.looseObject({
1541
+ expiry: z.number().int().min(1).max(500).optional(),
1542
+ billing_cycle: z.number().int().min(1).optional(),
1543
+ subscription: ExtendSubscriptionHostedPageSubscriptionSchema.optional(),
1544
+ });
1545
+ export { ExtendSubscriptionHostedPageBodySchema };
1546
+ //HostedPage.checkoutGift
1547
+ const CheckoutGiftHostedPageGifterSchema = z.object({
1548
+ customer_id: z.string().max(50).optional(),
1549
+ });
1550
+ const CheckoutGiftHostedPageSubscriptionSchema = z.looseObject({
1551
+ plan_id: z.string().max(100),
1552
+ plan_quantity: z.number().int().min(1).optional(),
1553
+ plan_quantity_in_decimal: z.string().max(33).optional(),
1554
+ coupon: z.string().max(100).optional(),
1555
+ });
1556
+ const CheckoutGiftHostedPageAddonsSchema = z.object({
1557
+ id: z.array(z.string().max(100).optional()).optional(),
1558
+ quantity: z.array(z.number().int().min(1).optional()).optional(),
1559
+ quantity_in_decimal: z.array(z.string().max(33).optional()).optional(),
1560
+ });
1561
+ const CheckoutGiftHostedPageBodySchema = z.looseObject({
1562
+ redirect_url: z.string().max(250).optional(),
1563
+ coupon_ids: z.array(z.string().max(100).optional()).optional(),
1564
+ gifter: CheckoutGiftHostedPageGifterSchema.optional(),
1565
+ subscription: CheckoutGiftHostedPageSubscriptionSchema.optional(),
1566
+ addons: CheckoutGiftHostedPageAddonsSchema.optional(),
1567
+ });
1568
+ export { CheckoutGiftHostedPageBodySchema };
1569
+ //HostedPage.checkoutGiftForItems
1570
+ const CheckoutGiftForItemsHostedPageGifterSchema = z.object({
1571
+ customer_id: z.string().max(50).optional(),
1572
+ });
1573
+ const CheckoutGiftForItemsHostedPageSubscriptionItemsSchema = z.object({
1574
+ item_price_id: z.array(z.string().max(100).optional()).optional(),
1575
+ quantity: z.array(z.number().int().min(1).optional()).optional(),
1576
+ quantity_in_decimal: z.array(z.string().max(33).optional()).optional(),
1577
+ unit_price: z.array(z.number().int().min(0).optional()).optional(),
1578
+ unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(),
1579
+ });
1580
+ const CheckoutGiftForItemsHostedPageItemTiersSchema = z.object({
1581
+ item_price_id: z.array(z.string().max(100).optional()).optional(),
1582
+ starting_unit: z.array(z.number().int().min(1).optional()).optional(),
1583
+ ending_unit: z.array(z.number().int().optional()).optional(),
1584
+ price: z.array(z.number().int().min(0).optional()).optional(),
1585
+ starting_unit_in_decimal: z.array(z.string().max(33).optional()).optional(),
1586
+ ending_unit_in_decimal: z.array(z.string().max(33).optional()).optional(),
1587
+ price_in_decimal: z.array(z.string().max(39).optional()).optional(),
1588
+ });
1589
+ const CheckoutGiftForItemsHostedPageBodySchema = z.looseObject({
1590
+ business_entity_id: z.string().max(50).optional(),
1591
+ redirect_url: z.string().max(250).optional(),
1592
+ coupon_ids: z.array(z.string().max(100).optional()).optional(),
1593
+ gifter: CheckoutGiftForItemsHostedPageGifterSchema.optional(),
1594
+ subscription_items: CheckoutGiftForItemsHostedPageSubscriptionItemsSchema.optional(),
1595
+ item_tiers: CheckoutGiftForItemsHostedPageItemTiersSchema.optional(),
1596
+ });
1597
+ export { CheckoutGiftForItemsHostedPageBodySchema };
1598
+ //HostedPage.claimGift
1599
+ const ClaimGiftHostedPageGiftSchema = z.object({
1600
+ id: z.string().max(150),
1601
+ });
1602
+ const ClaimGiftHostedPageCustomerSchema = z.object({
1603
+ locale: z.string().max(50).optional(),
1604
+ });
1605
+ const ClaimGiftHostedPageBodySchema = z.looseObject({
1606
+ redirect_url: z.string().max(250).optional(),
1607
+ gift: ClaimGiftHostedPageGiftSchema.optional(),
1608
+ customer: ClaimGiftHostedPageCustomerSchema.optional(),
1609
+ });
1610
+ export { ClaimGiftHostedPageBodySchema };
1611
+ //HostedPage.retrieveAgreementPdf
1612
+ const RetrieveAgreementPdfHostedPageBodySchema = z.looseObject({
1613
+ payment_source_id: z.string().max(40),
1614
+ });
1615
+ export { RetrieveAgreementPdfHostedPageBodySchema };
1616
+ //HostedPage.preCancel
1617
+ const PreCancelHostedPageSubscriptionSchema = z.object({
1618
+ id: z.string().max(50),
1619
+ });
1620
+ const PreCancelHostedPageBodySchema = z.looseObject({
1621
+ pass_thru_content: z.string().max(2048).optional(),
1622
+ cancel_url: z.string().max(250).optional(),
1623
+ redirect_url: z.string().max(250).optional(),
1624
+ subscription: PreCancelHostedPageSubscriptionSchema.optional(),
1625
+ });
1626
+ export { PreCancelHostedPageBodySchema };
1627
+ //HostedPage.events
1628
+ const EventsHostedPageEventDataSchema = z.looseObject({});
1629
+ const EventsHostedPageBodySchema = z.looseObject({
1630
+ event_name: z.enum(['cancellation_page_loaded']),
1631
+ occurred_at: z.number().int().optional(),
1632
+ event_data: EventsHostedPageEventDataSchema,
1633
+ });
1634
+ export { EventsHostedPageBodySchema };
1635
+ //HostedPage.viewVoucher
1636
+ const ViewVoucherHostedPagePaymentVoucherSchema = z.object({
1637
+ id: z.string().max(40),
1638
+ });
1639
+ const ViewVoucherHostedPageCustomerSchema = z.object({
1640
+ locale: z.string().max(50).optional(),
1641
+ });
1642
+ const ViewVoucherHostedPageBodySchema = z.looseObject({
1643
+ payment_voucher: ViewVoucherHostedPagePaymentVoucherSchema.optional(),
1644
+ customer: ViewVoucherHostedPageCustomerSchema.optional(),
1645
+ });
1646
+ export { ViewVoucherHostedPageBodySchema };