chargebee 3.25.0-beta.1 → 3.25.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.
- package/CHANGELOG.md +66 -4
- package/README.md +0 -39
- package/cjs/RequestWrapper.js +1 -28
- package/cjs/chargebee.cjs.js +0 -3
- package/cjs/chargebee.cjs.worker.js +0 -2
- package/cjs/createChargebee.js +0 -5
- package/cjs/environment.js +1 -1
- package/cjs/resources/api_endpoints.js +1 -2
- package/cjs/resources/webhook/eventType.js +2 -0
- package/esm/RequestWrapper.js +1 -28
- package/esm/chargebee.esm.js +0 -2
- package/esm/chargebee.esm.worker.js +0 -1
- package/esm/createChargebee.js +0 -5
- package/esm/environment.js +1 -1
- package/esm/resources/api_endpoints.js +1 -2
- package/esm/resources/webhook/eventType.js +2 -0
- package/package.json +1 -4
- package/types/core.d.ts +23 -6
- package/types/index.d.ts +0 -17
- package/types/resources/Content.d.ts +0 -1
- package/types/resources/Customer.d.ts +14 -4
- package/types/resources/Estimate.d.ts +14 -4
- package/types/resources/Event.d.ts +2 -0
- package/types/resources/Gift.d.ts +23 -6
- package/types/resources/HostedPage.d.ts +1 -0
- package/types/resources/Invoice.d.ts +14 -5
- package/types/resources/OmnichannelSubscription.d.ts +6 -0
- package/types/resources/OmnichannelSubscriptionItem.d.ts +1 -0
- package/types/resources/PaymentIntent.d.ts +35 -10
- package/types/resources/PaymentSource.d.ts +7 -2
- package/types/resources/Purchase.d.ts +7 -2
- package/types/resources/Subscription.d.ts +49 -14
- package/types/resources/WebhookEvent.d.ts +22 -4
- package/cjs/chargebeeZodValidationError.js +0 -18
- package/cjs/schema/addon.schema.js +0 -153
- package/cjs/schema/address.schema.js +0 -35
- package/cjs/schema/alert.schema.js +0 -38
- package/cjs/schema/attached_item.schema.js +0 -58
- package/cjs/schema/business_entity.schema.js +0 -46
- package/cjs/schema/card.schema.js +0 -165
- package/cjs/schema/comment.schema.js +0 -69
- package/cjs/schema/coupon.schema.js +0 -209
- package/cjs/schema/coupon_code.schema.js +0 -14
- package/cjs/schema/coupon_set.schema.js +0 -28
- package/cjs/schema/credit_note.schema.js +0 -288
- package/cjs/schema/currency.schema.js +0 -32
- package/cjs/schema/customer.schema.js +0 -986
- package/cjs/schema/customer_entitlement.schema.js +0 -14
- package/cjs/schema/differential_price.schema.js +0 -68
- package/cjs/schema/entitlement.schema.js +0 -27
- package/cjs/schema/entitlement_override.schema.js +0 -33
- package/cjs/schema/estimate.schema.js +0 -1525
- package/cjs/schema/export.schema.js +0 -1545
- package/cjs/schema/feature.schema.js +0 -37
- package/cjs/schema/gift.schema.js +0 -277
- package/cjs/schema/hosted_page.schema.js +0 -1649
- package/cjs/schema/in_app_subscription.schema.js +0 -68
- package/cjs/schema/index.js +0 -80
- package/cjs/schema/invoice.schema.js +0 -1467
- package/cjs/schema/item.schema.js +0 -91
- package/cjs/schema/item_entitlement.schema.js +0 -45
- package/cjs/schema/item_family.schema.js +0 -21
- package/cjs/schema/item_price.schema.js +0 -190
- package/cjs/schema/non_subscription.schema.js +0 -28
- package/cjs/schema/offer_event.schema.js +0 -13
- package/cjs/schema/offer_fulfillment.schema.js +0 -20
- package/cjs/schema/omnichannel_one_time_order.schema.js +0 -26
- package/cjs/schema/omnichannel_subscription.schema.js +0 -89
- package/cjs/schema/omnichannel_subscription_item.schema.js +0 -13
- package/cjs/schema/order.schema.js +0 -273
- package/cjs/schema/payment_intent.schema.js +0 -117
- package/cjs/schema/payment_schedule_scheme.schema.js +0 -20
- package/cjs/schema/payment_source.schema.js +0 -358
- package/cjs/schema/payment_voucher.schema.js +0 -57
- package/cjs/schema/personalized_offer.schema.js +0 -28
- package/cjs/schema/plan.schema.js +0 -225
- package/cjs/schema/portal_session.schema.js +0 -22
- package/cjs/schema/price_variant.schema.js +0 -36
- package/cjs/schema/pricing_page_session.schema.js +0 -135
- package/cjs/schema/promotional_credit.schema.js +0 -78
- package/cjs/schema/purchase.schema.js +0 -272
- package/cjs/schema/quote.schema.js +0 -1557
- package/cjs/schema/ramp.schema.js +0 -209
- package/cjs/schema/recorded_purchase.schema.js +0 -32
- package/cjs/schema/resource_migration.schema.js +0 -14
- package/cjs/schema/site_migration_detail.schema.js +0 -81
- package/cjs/schema/subscription.schema.js +0 -2993
- package/cjs/schema/subscription_entitlement.schema.js +0 -25
- package/cjs/schema/time_machine.schema.js +0 -17
- package/cjs/schema/transaction.schema.js +0 -70
- package/cjs/schema/unbilled_charge.schema.js +0 -113
- package/cjs/schema/usage.schema.js +0 -93
- package/cjs/schema/usage_charge.schema.js +0 -17
- package/cjs/schema/usage_event.schema.js +0 -28
- package/cjs/schema/usage_file.schema.js +0 -13
- package/cjs/schema/usage_summary.schema.js +0 -17
- package/cjs/schema/virtual_bank_account.schema.js +0 -43
- package/cjs/schema/webhook_endpoint.schema.js +0 -504
- package/cjs/validationLoader.js +0 -59
- package/esm/chargebeeZodValidationError.js +0 -14
- package/esm/schema/addon.schema.js +0 -150
- package/esm/schema/address.schema.js +0 -32
- package/esm/schema/alert.schema.js +0 -35
- package/esm/schema/attached_item.schema.js +0 -55
- package/esm/schema/business_entity.schema.js +0 -43
- package/esm/schema/card.schema.js +0 -162
- package/esm/schema/comment.schema.js +0 -66
- package/esm/schema/coupon.schema.js +0 -206
- package/esm/schema/coupon_code.schema.js +0 -11
- package/esm/schema/coupon_set.schema.js +0 -25
- package/esm/schema/credit_note.schema.js +0 -285
- package/esm/schema/currency.schema.js +0 -29
- package/esm/schema/customer.schema.js +0 -983
- package/esm/schema/customer_entitlement.schema.js +0 -11
- package/esm/schema/differential_price.schema.js +0 -65
- package/esm/schema/entitlement.schema.js +0 -24
- package/esm/schema/entitlement_override.schema.js +0 -30
- package/esm/schema/estimate.schema.js +0 -1522
- package/esm/schema/export.schema.js +0 -1542
- package/esm/schema/feature.schema.js +0 -34
- package/esm/schema/gift.schema.js +0 -274
- package/esm/schema/hosted_page.schema.js +0 -1646
- package/esm/schema/in_app_subscription.schema.js +0 -65
- package/esm/schema/index.js +0 -64
- package/esm/schema/invoice.schema.js +0 -1464
- package/esm/schema/item.schema.js +0 -88
- package/esm/schema/item_entitlement.schema.js +0 -42
- package/esm/schema/item_family.schema.js +0 -18
- package/esm/schema/item_price.schema.js +0 -187
- package/esm/schema/non_subscription.schema.js +0 -25
- package/esm/schema/offer_event.schema.js +0 -10
- package/esm/schema/offer_fulfillment.schema.js +0 -17
- package/esm/schema/omnichannel_one_time_order.schema.js +0 -23
- package/esm/schema/omnichannel_subscription.schema.js +0 -86
- package/esm/schema/omnichannel_subscription_item.schema.js +0 -10
- package/esm/schema/order.schema.js +0 -270
- package/esm/schema/payment_intent.schema.js +0 -114
- package/esm/schema/payment_schedule_scheme.schema.js +0 -17
- package/esm/schema/payment_source.schema.js +0 -355
- package/esm/schema/payment_voucher.schema.js +0 -54
- package/esm/schema/personalized_offer.schema.js +0 -25
- package/esm/schema/plan.schema.js +0 -222
- package/esm/schema/portal_session.schema.js +0 -19
- package/esm/schema/price_variant.schema.js +0 -33
- package/esm/schema/pricing_page_session.schema.js +0 -132
- package/esm/schema/promotional_credit.schema.js +0 -75
- package/esm/schema/purchase.schema.js +0 -269
- package/esm/schema/quote.schema.js +0 -1554
- package/esm/schema/ramp.schema.js +0 -206
- package/esm/schema/recorded_purchase.schema.js +0 -29
- package/esm/schema/resource_migration.schema.js +0 -11
- package/esm/schema/site_migration_detail.schema.js +0 -78
- package/esm/schema/subscription.schema.js +0 -2990
- package/esm/schema/subscription_entitlement.schema.js +0 -22
- package/esm/schema/time_machine.schema.js +0 -14
- package/esm/schema/transaction.schema.js +0 -67
- package/esm/schema/unbilled_charge.schema.js +0 -110
- package/esm/schema/usage.schema.js +0 -90
- package/esm/schema/usage_charge.schema.js +0 -14
- package/esm/schema/usage_event.schema.js +0 -25
- package/esm/schema/usage_file.schema.js +0 -10
- package/esm/schema/usage_summary.schema.js +0 -14
- package/esm/schema/virtual_bank_account.schema.js +0 -40
- package/esm/schema/webhook_endpoint.schema.js +0 -501
- package/esm/validationLoader.js +0 -56
- package/types/resources/QuoteEntitlement.d.ts +0 -16
|
@@ -1,983 +0,0 @@
|
|
|
1
|
-
// Generated Zod schemas: Customer
|
|
2
|
-
// Actions: create, update, updatePaymentMethod, updateBillingInfo, contactsForCustomer, assignPaymentRole, addContact, updateContact, deleteContact, addPromotionalCredits, deductPromotionalCredits, setPromotionalCredits, recordExcessPayment, collectPayment, delete, move, changeBillingDate, merge, relationships, hierarchy, listHierarchyDetail, updateHierarchySettings
|
|
3
|
-
// Do not edit manually – regenerate via sdk-generator
|
|
4
|
-
import { z } from 'zod';
|
|
5
|
-
//Customer.create
|
|
6
|
-
const CreateCustomerMetaDataSchema = z.looseObject({});
|
|
7
|
-
const CreateCustomerAdditionalInformationSchema = z.looseObject({});
|
|
8
|
-
const CreateCustomerCardSchema = z.object({
|
|
9
|
-
gateway: z
|
|
10
|
-
.enum([
|
|
11
|
-
'chargebee',
|
|
12
|
-
'chargebee_payments',
|
|
13
|
-
'adyen',
|
|
14
|
-
'stripe',
|
|
15
|
-
'wepay',
|
|
16
|
-
'braintree',
|
|
17
|
-
'authorize_net',
|
|
18
|
-
'paypal_pro',
|
|
19
|
-
'pin',
|
|
20
|
-
'eway',
|
|
21
|
-
'eway_rapid',
|
|
22
|
-
'worldpay',
|
|
23
|
-
'balanced_payments',
|
|
24
|
-
'beanstream',
|
|
25
|
-
'bluepay',
|
|
26
|
-
'elavon',
|
|
27
|
-
'first_data_global',
|
|
28
|
-
'hdfc',
|
|
29
|
-
'migs',
|
|
30
|
-
'nmi',
|
|
31
|
-
'ogone',
|
|
32
|
-
'paymill',
|
|
33
|
-
'paypal_payflow_pro',
|
|
34
|
-
'sage_pay',
|
|
35
|
-
'tco',
|
|
36
|
-
'wirecard',
|
|
37
|
-
'amazon_payments',
|
|
38
|
-
'paypal_express_checkout',
|
|
39
|
-
'orbital',
|
|
40
|
-
'moneris_us',
|
|
41
|
-
'moneris',
|
|
42
|
-
'bluesnap',
|
|
43
|
-
'cybersource',
|
|
44
|
-
'vantiv',
|
|
45
|
-
'checkout_com',
|
|
46
|
-
'paypal',
|
|
47
|
-
'ingenico_direct',
|
|
48
|
-
'exact',
|
|
49
|
-
'mollie',
|
|
50
|
-
'quickbooks',
|
|
51
|
-
'razorpay',
|
|
52
|
-
'global_payments',
|
|
53
|
-
'bank_of_america',
|
|
54
|
-
'ecentric',
|
|
55
|
-
'metrics_global',
|
|
56
|
-
'windcave',
|
|
57
|
-
'pay_com',
|
|
58
|
-
'ebanx',
|
|
59
|
-
'dlocal',
|
|
60
|
-
'nuvei',
|
|
61
|
-
'solidgate',
|
|
62
|
-
'paystack',
|
|
63
|
-
'jp_morgan',
|
|
64
|
-
'deutsche_bank',
|
|
65
|
-
'ezidebit',
|
|
66
|
-
'twikey',
|
|
67
|
-
'tempus',
|
|
68
|
-
'moyasar',
|
|
69
|
-
'payway',
|
|
70
|
-
])
|
|
71
|
-
.optional(),
|
|
72
|
-
gateway_account_id: z.string().max(50).optional(),
|
|
73
|
-
tmp_token: z.string().max(300).optional(),
|
|
74
|
-
first_name: z.string().max(50).optional(),
|
|
75
|
-
last_name: z.string().max(50).optional(),
|
|
76
|
-
number: z.string().max(1500).optional(),
|
|
77
|
-
expiry_month: z.number().int().min(1).max(12).optional(),
|
|
78
|
-
expiry_year: z.number().int().optional(),
|
|
79
|
-
cvv: z.string().max(520).optional(),
|
|
80
|
-
preferred_scheme: z
|
|
81
|
-
.enum(['cartes_bancaires', 'mastercard', 'visa'])
|
|
82
|
-
.optional(),
|
|
83
|
-
billing_addr1: z.string().max(150).optional(),
|
|
84
|
-
billing_addr2: z.string().max(150).optional(),
|
|
85
|
-
billing_city: z.string().max(50).optional(),
|
|
86
|
-
billing_state_code: z.string().max(50).optional(),
|
|
87
|
-
billing_state: z.string().max(50).optional(),
|
|
88
|
-
billing_zip: z.string().max(20).optional(),
|
|
89
|
-
billing_country: z.string().max(50).optional(),
|
|
90
|
-
ip_address: z.string().max(50).optional(),
|
|
91
|
-
additional_information: CreateCustomerAdditionalInformationSchema.optional(),
|
|
92
|
-
});
|
|
93
|
-
const CreateCustomerBillingAddressSchema = z.looseObject({});
|
|
94
|
-
const CreateCustomerBankAccountSchema = z.object({
|
|
95
|
-
gateway_account_id: z.string().max(50).optional(),
|
|
96
|
-
iban: z.string().max(50).min(10).optional(),
|
|
97
|
-
first_name: z.string().max(150).optional(),
|
|
98
|
-
last_name: z.string().max(150).optional(),
|
|
99
|
-
company: z.string().max(250).optional(),
|
|
100
|
-
email: z.string().email().max(70).optional(),
|
|
101
|
-
phone: z.string().max(50).optional(),
|
|
102
|
-
bank_name: z.string().max(100).optional(),
|
|
103
|
-
account_number: z.string().max(17).min(4).optional(),
|
|
104
|
-
routing_number: z.string().max(9).min(3).optional(),
|
|
105
|
-
bank_code: z.string().max(20).optional(),
|
|
106
|
-
account_type: z
|
|
107
|
-
.enum(['checking', 'savings', 'business_checking', 'current'])
|
|
108
|
-
.optional(),
|
|
109
|
-
account_holder_type: z.enum(['individual', 'company']).optional(),
|
|
110
|
-
echeck_type: z.enum(['web', 'ppd', 'ccd']).optional(),
|
|
111
|
-
issuing_country: z.string().max(50).optional(),
|
|
112
|
-
swedish_identity_number: z.string().max(12).min(10).optional(),
|
|
113
|
-
billing_address: CreateCustomerBillingAddressSchema.optional(),
|
|
114
|
-
});
|
|
115
|
-
const CreateCustomerPaymentMethodSchema = z.object({
|
|
116
|
-
type: z
|
|
117
|
-
.enum([
|
|
118
|
-
'card',
|
|
119
|
-
'paypal_express_checkout',
|
|
120
|
-
'amazon_payments',
|
|
121
|
-
'direct_debit',
|
|
122
|
-
'generic',
|
|
123
|
-
'alipay',
|
|
124
|
-
'unionpay',
|
|
125
|
-
'apple_pay',
|
|
126
|
-
'wechat_pay',
|
|
127
|
-
'ideal',
|
|
128
|
-
'google_pay',
|
|
129
|
-
'sofort',
|
|
130
|
-
'bancontact',
|
|
131
|
-
'giropay',
|
|
132
|
-
'dotpay',
|
|
133
|
-
'upi',
|
|
134
|
-
'netbanking_emandates',
|
|
135
|
-
'venmo',
|
|
136
|
-
'pay_to',
|
|
137
|
-
'faster_payments',
|
|
138
|
-
'sepa_instant_transfer',
|
|
139
|
-
'automated_bank_transfer',
|
|
140
|
-
'klarna_pay_now',
|
|
141
|
-
'online_banking_poland',
|
|
142
|
-
'payconiq_by_bancontact',
|
|
143
|
-
'electronic_payment_standard',
|
|
144
|
-
'kbc_payment_button',
|
|
145
|
-
'pay_by_bank',
|
|
146
|
-
'trustly',
|
|
147
|
-
'stablecoin',
|
|
148
|
-
'kakao_pay',
|
|
149
|
-
'naver_pay',
|
|
150
|
-
'revolut_pay',
|
|
151
|
-
'cash_app_pay',
|
|
152
|
-
'pix',
|
|
153
|
-
'twint',
|
|
154
|
-
'go_pay',
|
|
155
|
-
'grab_pay',
|
|
156
|
-
'pay_co',
|
|
157
|
-
'after_pay',
|
|
158
|
-
'swish',
|
|
159
|
-
'payme',
|
|
160
|
-
])
|
|
161
|
-
.optional(),
|
|
162
|
-
gateway: z
|
|
163
|
-
.enum([
|
|
164
|
-
'chargebee_payments',
|
|
165
|
-
'adyen',
|
|
166
|
-
'stripe',
|
|
167
|
-
'wepay',
|
|
168
|
-
'braintree',
|
|
169
|
-
'authorize_net',
|
|
170
|
-
'paypal_pro',
|
|
171
|
-
'pin',
|
|
172
|
-
'eway',
|
|
173
|
-
'eway_rapid',
|
|
174
|
-
'worldpay',
|
|
175
|
-
'balanced_payments',
|
|
176
|
-
'beanstream',
|
|
177
|
-
'bluepay',
|
|
178
|
-
'elavon',
|
|
179
|
-
'first_data_global',
|
|
180
|
-
'hdfc',
|
|
181
|
-
'migs',
|
|
182
|
-
'nmi',
|
|
183
|
-
'ogone',
|
|
184
|
-
'paymill',
|
|
185
|
-
'paypal_payflow_pro',
|
|
186
|
-
'sage_pay',
|
|
187
|
-
'tco',
|
|
188
|
-
'wirecard',
|
|
189
|
-
'amazon_payments',
|
|
190
|
-
'paypal_express_checkout',
|
|
191
|
-
'gocardless',
|
|
192
|
-
'orbital',
|
|
193
|
-
'moneris_us',
|
|
194
|
-
'moneris',
|
|
195
|
-
'bluesnap',
|
|
196
|
-
'cybersource',
|
|
197
|
-
'vantiv',
|
|
198
|
-
'checkout_com',
|
|
199
|
-
'paypal',
|
|
200
|
-
'ingenico_direct',
|
|
201
|
-
'exact',
|
|
202
|
-
'mollie',
|
|
203
|
-
'quickbooks',
|
|
204
|
-
'razorpay',
|
|
205
|
-
'global_payments',
|
|
206
|
-
'bank_of_america',
|
|
207
|
-
'ecentric',
|
|
208
|
-
'metrics_global',
|
|
209
|
-
'windcave',
|
|
210
|
-
'pay_com',
|
|
211
|
-
'ebanx',
|
|
212
|
-
'dlocal',
|
|
213
|
-
'nuvei',
|
|
214
|
-
'solidgate',
|
|
215
|
-
'paystack',
|
|
216
|
-
'jp_morgan',
|
|
217
|
-
'deutsche_bank',
|
|
218
|
-
'ezidebit',
|
|
219
|
-
'twikey',
|
|
220
|
-
'tempus',
|
|
221
|
-
'moyasar',
|
|
222
|
-
'payway',
|
|
223
|
-
])
|
|
224
|
-
.optional(),
|
|
225
|
-
gateway_account_id: z.string().max(50).optional(),
|
|
226
|
-
reference_id: z.string().max(200).optional(),
|
|
227
|
-
tmp_token: z.string().max(65000).optional(),
|
|
228
|
-
issuing_country: z.string().max(50).optional(),
|
|
229
|
-
additional_information: CreateCustomerAdditionalInformationSchema.optional(),
|
|
230
|
-
});
|
|
231
|
-
const CreateCustomerPaymentIntentSchema = z.object({
|
|
232
|
-
id: z.string().max(150).optional(),
|
|
233
|
-
gateway_account_id: z.string().max(50).optional(),
|
|
234
|
-
gw_token: z.string().max(65000).optional(),
|
|
235
|
-
payment_method_type: z
|
|
236
|
-
.enum([
|
|
237
|
-
'card',
|
|
238
|
-
'ideal',
|
|
239
|
-
'sofort',
|
|
240
|
-
'bancontact',
|
|
241
|
-
'google_pay',
|
|
242
|
-
'dotpay',
|
|
243
|
-
'giropay',
|
|
244
|
-
'apple_pay',
|
|
245
|
-
'upi',
|
|
246
|
-
'netbanking_emandates',
|
|
247
|
-
'paypal_express_checkout',
|
|
248
|
-
'direct_debit',
|
|
249
|
-
'boleto',
|
|
250
|
-
'venmo',
|
|
251
|
-
'amazon_payments',
|
|
252
|
-
'pay_to',
|
|
253
|
-
'faster_payments',
|
|
254
|
-
'sepa_instant_transfer',
|
|
255
|
-
'klarna_pay_now',
|
|
256
|
-
'online_banking_poland',
|
|
257
|
-
'payconiq_by_bancontact',
|
|
258
|
-
'electronic_payment_standard',
|
|
259
|
-
'kbc_payment_button',
|
|
260
|
-
'pay_by_bank',
|
|
261
|
-
'trustly',
|
|
262
|
-
'stablecoin',
|
|
263
|
-
'kakao_pay',
|
|
264
|
-
'naver_pay',
|
|
265
|
-
'revolut_pay',
|
|
266
|
-
'cash_app_pay',
|
|
267
|
-
'wechat_pay',
|
|
268
|
-
'alipay',
|
|
269
|
-
'pix',
|
|
270
|
-
'twint',
|
|
271
|
-
'go_pay',
|
|
272
|
-
'grab_pay',
|
|
273
|
-
'pay_co',
|
|
274
|
-
'after_pay',
|
|
275
|
-
'swish',
|
|
276
|
-
'payme',
|
|
277
|
-
])
|
|
278
|
-
.optional(),
|
|
279
|
-
reference_id: z.string().max(65000).optional(),
|
|
280
|
-
gw_payment_method_id: z.string().max(65000).optional(),
|
|
281
|
-
additional_information: CreateCustomerAdditionalInformationSchema.optional(),
|
|
282
|
-
});
|
|
283
|
-
const CreateCustomerEntityIdentifiersSchema = z.object({
|
|
284
|
-
id: z.array(z.string().max(40).optional()).optional(),
|
|
285
|
-
scheme: z.array(z.string().max(50).optional()).optional(),
|
|
286
|
-
value: z.array(z.string().max(50).optional()).optional(),
|
|
287
|
-
standard: z.array(z.string().max(50).optional()).optional(),
|
|
288
|
-
});
|
|
289
|
-
const CreateCustomerTaxProvidersFieldsSchema = z.object({
|
|
290
|
-
provider_name: z.array(z.string().max(50).optional()).optional(),
|
|
291
|
-
field_id: z.array(z.string().max(50).optional()).optional(),
|
|
292
|
-
field_value: z.array(z.string().max(50).optional()).optional(),
|
|
293
|
-
});
|
|
294
|
-
const CreateCustomerBodySchema = z.looseObject({
|
|
295
|
-
id: z.string().max(50).optional(),
|
|
296
|
-
first_name: z.string().max(150).optional(),
|
|
297
|
-
last_name: z.string().max(150).optional(),
|
|
298
|
-
email: z.string().email().max(70).optional(),
|
|
299
|
-
preferred_currency_code: z.string().max(3).optional(),
|
|
300
|
-
phone: z.string().max(50).optional(),
|
|
301
|
-
company: z.string().max(250).optional(),
|
|
302
|
-
auto_collection: z.enum(['on', 'off']).optional(),
|
|
303
|
-
net_term_days: z.number().int().optional(),
|
|
304
|
-
allow_direct_debit: z.boolean().default(false).optional(),
|
|
305
|
-
vat_number: z.string().max(20).optional(),
|
|
306
|
-
vat_number_prefix: z.string().max(10).optional(),
|
|
307
|
-
entity_identifier_scheme: z.string().max(50).optional(),
|
|
308
|
-
entity_identifier_standard: z.string().max(50).optional(),
|
|
309
|
-
registered_for_gst: z.boolean().optional(),
|
|
310
|
-
is_einvoice_enabled: z.boolean().optional(),
|
|
311
|
-
einvoicing_method: z.enum(['automatic', 'manual', 'site_default']).optional(),
|
|
312
|
-
taxability: z.enum(['taxable', 'exempt']).optional(),
|
|
313
|
-
exemption_details: z.array(z.string().optional()).optional(),
|
|
314
|
-
customer_type: z
|
|
315
|
-
.enum(['residential', 'business', 'senior_citizen', 'industrial'])
|
|
316
|
-
.optional(),
|
|
317
|
-
client_profile_id: z.string().max(50).optional(),
|
|
318
|
-
taxjar_exemption_category: z
|
|
319
|
-
.enum(['wholesale', 'government', 'other'])
|
|
320
|
-
.optional(),
|
|
321
|
-
business_customer_without_vat_number: z.boolean().optional(),
|
|
322
|
-
locale: z.string().max(50).optional(),
|
|
323
|
-
entity_code: z
|
|
324
|
-
.enum([
|
|
325
|
-
'a',
|
|
326
|
-
'b',
|
|
327
|
-
'c',
|
|
328
|
-
'd',
|
|
329
|
-
'e',
|
|
330
|
-
'f',
|
|
331
|
-
'g',
|
|
332
|
-
'h',
|
|
333
|
-
'i',
|
|
334
|
-
'j',
|
|
335
|
-
'k',
|
|
336
|
-
'l',
|
|
337
|
-
'm',
|
|
338
|
-
'n',
|
|
339
|
-
'p',
|
|
340
|
-
'q',
|
|
341
|
-
'r',
|
|
342
|
-
'med1',
|
|
343
|
-
'med2',
|
|
344
|
-
])
|
|
345
|
-
.optional(),
|
|
346
|
-
exempt_number: z.string().max(100).optional(),
|
|
347
|
-
meta_data: CreateCustomerMetaDataSchema.optional(),
|
|
348
|
-
offline_payment_method: z
|
|
349
|
-
.enum([
|
|
350
|
-
'no_preference',
|
|
351
|
-
'cash',
|
|
352
|
-
'check',
|
|
353
|
-
'bank_transfer',
|
|
354
|
-
'ach_credit',
|
|
355
|
-
'sepa_credit',
|
|
356
|
-
'boleto',
|
|
357
|
-
'us_automated_bank_transfer',
|
|
358
|
-
'eu_automated_bank_transfer',
|
|
359
|
-
'uk_automated_bank_transfer',
|
|
360
|
-
'jp_automated_bank_transfer',
|
|
361
|
-
'mx_automated_bank_transfer',
|
|
362
|
-
'custom',
|
|
363
|
-
])
|
|
364
|
-
.optional(),
|
|
365
|
-
auto_close_invoices: z.boolean().optional(),
|
|
366
|
-
consolidated_invoicing: z.boolean().optional(),
|
|
367
|
-
token_id: z.string().max(40).optional(),
|
|
368
|
-
business_entity_id: z.string().max(50).optional(),
|
|
369
|
-
created_from_ip: z.string().max(50).optional(),
|
|
370
|
-
invoice_notes: z.string().max(2000).optional(),
|
|
371
|
-
card: CreateCustomerCardSchema.optional(),
|
|
372
|
-
bank_account: CreateCustomerBankAccountSchema.optional(),
|
|
373
|
-
payment_method: CreateCustomerPaymentMethodSchema.optional(),
|
|
374
|
-
payment_intent: CreateCustomerPaymentIntentSchema.optional(),
|
|
375
|
-
billing_address: CreateCustomerBillingAddressSchema.optional(),
|
|
376
|
-
entity_identifiers: CreateCustomerEntityIdentifiersSchema.optional(),
|
|
377
|
-
tax_providers_fields: CreateCustomerTaxProvidersFieldsSchema.optional(),
|
|
378
|
-
});
|
|
379
|
-
export { CreateCustomerBodySchema };
|
|
380
|
-
//Customer.update
|
|
381
|
-
const UpdateCustomerMetaDataSchema = z.looseObject({});
|
|
382
|
-
const UpdateCustomerTaxProvidersFieldsSchema = z.object({
|
|
383
|
-
provider_name: z.array(z.string().max(50).optional()).optional(),
|
|
384
|
-
field_id: z.array(z.string().max(50).optional()).optional(),
|
|
385
|
-
field_value: z.array(z.string().max(50).optional()).optional(),
|
|
386
|
-
});
|
|
387
|
-
const UpdateCustomerBodySchema = z.looseObject({
|
|
388
|
-
first_name: z.string().max(150).optional(),
|
|
389
|
-
last_name: z.string().max(150).optional(),
|
|
390
|
-
email: z.string().email().max(70).optional(),
|
|
391
|
-
preferred_currency_code: z.string().max(3).optional(),
|
|
392
|
-
phone: z.string().max(50).optional(),
|
|
393
|
-
company: z.string().max(250).optional(),
|
|
394
|
-
auto_collection: z.enum(['on', 'off']).optional(),
|
|
395
|
-
allow_direct_debit: z.boolean().default(false).optional(),
|
|
396
|
-
net_term_days: z.number().int().optional(),
|
|
397
|
-
taxability: z.enum(['taxable', 'exempt']).optional(),
|
|
398
|
-
exemption_details: z.array(z.string().optional()).optional(),
|
|
399
|
-
customer_type: z
|
|
400
|
-
.enum(['residential', 'business', 'senior_citizen', 'industrial'])
|
|
401
|
-
.optional(),
|
|
402
|
-
client_profile_id: z.string().max(50).optional(),
|
|
403
|
-
taxjar_exemption_category: z
|
|
404
|
-
.enum(['wholesale', 'government', 'other'])
|
|
405
|
-
.optional(),
|
|
406
|
-
locale: z.string().max(50).optional(),
|
|
407
|
-
entity_code: z
|
|
408
|
-
.enum([
|
|
409
|
-
'a',
|
|
410
|
-
'b',
|
|
411
|
-
'c',
|
|
412
|
-
'd',
|
|
413
|
-
'e',
|
|
414
|
-
'f',
|
|
415
|
-
'g',
|
|
416
|
-
'h',
|
|
417
|
-
'i',
|
|
418
|
-
'j',
|
|
419
|
-
'k',
|
|
420
|
-
'l',
|
|
421
|
-
'm',
|
|
422
|
-
'n',
|
|
423
|
-
'p',
|
|
424
|
-
'q',
|
|
425
|
-
'r',
|
|
426
|
-
'med1',
|
|
427
|
-
'med2',
|
|
428
|
-
])
|
|
429
|
-
.optional(),
|
|
430
|
-
exempt_number: z.string().max(100).optional(),
|
|
431
|
-
offline_payment_method: z
|
|
432
|
-
.enum([
|
|
433
|
-
'no_preference',
|
|
434
|
-
'cash',
|
|
435
|
-
'check',
|
|
436
|
-
'bank_transfer',
|
|
437
|
-
'ach_credit',
|
|
438
|
-
'sepa_credit',
|
|
439
|
-
'boleto',
|
|
440
|
-
'us_automated_bank_transfer',
|
|
441
|
-
'eu_automated_bank_transfer',
|
|
442
|
-
'uk_automated_bank_transfer',
|
|
443
|
-
'jp_automated_bank_transfer',
|
|
444
|
-
'mx_automated_bank_transfer',
|
|
445
|
-
'custom',
|
|
446
|
-
])
|
|
447
|
-
.optional(),
|
|
448
|
-
invoice_notes: z.string().max(2000).optional(),
|
|
449
|
-
auto_close_invoices: z.boolean().optional(),
|
|
450
|
-
meta_data: UpdateCustomerMetaDataSchema.optional(),
|
|
451
|
-
fraud_flag: z.enum(['safe', 'fraudulent']).optional(),
|
|
452
|
-
consolidated_invoicing: z.boolean().optional(),
|
|
453
|
-
tax_providers_fields: UpdateCustomerTaxProvidersFieldsSchema.optional(),
|
|
454
|
-
});
|
|
455
|
-
export { UpdateCustomerBodySchema };
|
|
456
|
-
//Customer.updatePaymentMethod
|
|
457
|
-
const UpdatePaymentMethodCustomerAdditionalInformationSchema = z.looseObject({});
|
|
458
|
-
const UpdatePaymentMethodCustomerPaymentMethodSchema = z.object({
|
|
459
|
-
type: z.enum([
|
|
460
|
-
'card',
|
|
461
|
-
'paypal_express_checkout',
|
|
462
|
-
'amazon_payments',
|
|
463
|
-
'direct_debit',
|
|
464
|
-
'generic',
|
|
465
|
-
'alipay',
|
|
466
|
-
'unionpay',
|
|
467
|
-
'wechat_pay',
|
|
468
|
-
'ideal',
|
|
469
|
-
'google_pay',
|
|
470
|
-
'sofort',
|
|
471
|
-
'bancontact',
|
|
472
|
-
'giropay',
|
|
473
|
-
'dotpay',
|
|
474
|
-
'upi',
|
|
475
|
-
'netbanking_emandates',
|
|
476
|
-
'venmo',
|
|
477
|
-
'pay_to',
|
|
478
|
-
'faster_payments',
|
|
479
|
-
'sepa_instant_transfer',
|
|
480
|
-
'automated_bank_transfer',
|
|
481
|
-
'klarna_pay_now',
|
|
482
|
-
'online_banking_poland',
|
|
483
|
-
'payconiq_by_bancontact',
|
|
484
|
-
'electronic_payment_standard',
|
|
485
|
-
'kbc_payment_button',
|
|
486
|
-
'pay_by_bank',
|
|
487
|
-
'trustly',
|
|
488
|
-
'stablecoin',
|
|
489
|
-
'kakao_pay',
|
|
490
|
-
'naver_pay',
|
|
491
|
-
'revolut_pay',
|
|
492
|
-
'cash_app_pay',
|
|
493
|
-
'pix',
|
|
494
|
-
'twint',
|
|
495
|
-
'go_pay',
|
|
496
|
-
'grab_pay',
|
|
497
|
-
'pay_co',
|
|
498
|
-
'after_pay',
|
|
499
|
-
'swish',
|
|
500
|
-
'payme',
|
|
501
|
-
]),
|
|
502
|
-
gateway: z
|
|
503
|
-
.enum([
|
|
504
|
-
'chargebee_payments',
|
|
505
|
-
'adyen',
|
|
506
|
-
'stripe',
|
|
507
|
-
'wepay',
|
|
508
|
-
'braintree',
|
|
509
|
-
'authorize_net',
|
|
510
|
-
'paypal_pro',
|
|
511
|
-
'pin',
|
|
512
|
-
'eway',
|
|
513
|
-
'eway_rapid',
|
|
514
|
-
'worldpay',
|
|
515
|
-
'balanced_payments',
|
|
516
|
-
'beanstream',
|
|
517
|
-
'bluepay',
|
|
518
|
-
'elavon',
|
|
519
|
-
'first_data_global',
|
|
520
|
-
'hdfc',
|
|
521
|
-
'migs',
|
|
522
|
-
'nmi',
|
|
523
|
-
'ogone',
|
|
524
|
-
'paymill',
|
|
525
|
-
'paypal_payflow_pro',
|
|
526
|
-
'sage_pay',
|
|
527
|
-
'tco',
|
|
528
|
-
'wirecard',
|
|
529
|
-
'amazon_payments',
|
|
530
|
-
'paypal_express_checkout',
|
|
531
|
-
'gocardless',
|
|
532
|
-
'orbital',
|
|
533
|
-
'moneris_us',
|
|
534
|
-
'moneris',
|
|
535
|
-
'bluesnap',
|
|
536
|
-
'cybersource',
|
|
537
|
-
'vantiv',
|
|
538
|
-
'checkout_com',
|
|
539
|
-
'paypal',
|
|
540
|
-
'ingenico_direct',
|
|
541
|
-
'exact',
|
|
542
|
-
'mollie',
|
|
543
|
-
'quickbooks',
|
|
544
|
-
'razorpay',
|
|
545
|
-
'global_payments',
|
|
546
|
-
'bank_of_america',
|
|
547
|
-
'ecentric',
|
|
548
|
-
'metrics_global',
|
|
549
|
-
'windcave',
|
|
550
|
-
'pay_com',
|
|
551
|
-
'ebanx',
|
|
552
|
-
'dlocal',
|
|
553
|
-
'nuvei',
|
|
554
|
-
'solidgate',
|
|
555
|
-
'paystack',
|
|
556
|
-
'jp_morgan',
|
|
557
|
-
'deutsche_bank',
|
|
558
|
-
'ezidebit',
|
|
559
|
-
'twikey',
|
|
560
|
-
'tempus',
|
|
561
|
-
'moyasar',
|
|
562
|
-
'payway',
|
|
563
|
-
])
|
|
564
|
-
.optional(),
|
|
565
|
-
gateway_account_id: z.string().max(50).optional(),
|
|
566
|
-
reference_id: z.string().max(200).optional(),
|
|
567
|
-
tmp_token: z.string().max(65000).optional(),
|
|
568
|
-
issuing_country: z.string().max(50).optional(),
|
|
569
|
-
additional_information: UpdatePaymentMethodCustomerAdditionalInformationSchema.optional(),
|
|
570
|
-
});
|
|
571
|
-
const UpdatePaymentMethodCustomerBodySchema = z.looseObject({
|
|
572
|
-
payment_method: UpdatePaymentMethodCustomerPaymentMethodSchema.optional(),
|
|
573
|
-
});
|
|
574
|
-
export { UpdatePaymentMethodCustomerBodySchema };
|
|
575
|
-
//Customer.updateBillingInfo
|
|
576
|
-
const UpdateBillingInfoCustomerBillingAddressSchema = z.object({
|
|
577
|
-
first_name: z.string().max(150).optional(),
|
|
578
|
-
last_name: z.string().max(150).optional(),
|
|
579
|
-
email: z.string().email().max(70).optional(),
|
|
580
|
-
company: z.string().max(250).optional(),
|
|
581
|
-
phone: z.string().max(50).optional(),
|
|
582
|
-
line1: z.string().max(150).optional(),
|
|
583
|
-
line2: z.string().max(150).optional(),
|
|
584
|
-
line3: z.string().max(150).optional(),
|
|
585
|
-
city: z.string().max(50).optional(),
|
|
586
|
-
state_code: z.string().max(50).optional(),
|
|
587
|
-
state: z.string().max(50).optional(),
|
|
588
|
-
zip: z.string().max(20).optional(),
|
|
589
|
-
country: z.string().max(50).optional(),
|
|
590
|
-
validation_status: z
|
|
591
|
-
.enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
|
|
592
|
-
.optional(),
|
|
593
|
-
});
|
|
594
|
-
const UpdateBillingInfoCustomerEntityIdentifiersSchema = z.object({
|
|
595
|
-
id: z.array(z.string().max(40).optional()).optional(),
|
|
596
|
-
scheme: z.array(z.string().max(50).optional()).optional(),
|
|
597
|
-
value: z.array(z.string().max(50).optional()).optional(),
|
|
598
|
-
operation: z
|
|
599
|
-
.array(z.enum(['create', 'update', 'delete']).optional())
|
|
600
|
-
.optional(),
|
|
601
|
-
standard: z.array(z.string().max(50).optional()).optional(),
|
|
602
|
-
});
|
|
603
|
-
const UpdateBillingInfoCustomerTaxProvidersFieldsSchema = z.object({
|
|
604
|
-
provider_name: z.array(z.string().max(50).optional()).optional(),
|
|
605
|
-
field_id: z.array(z.string().max(50).optional()).optional(),
|
|
606
|
-
field_value: z.array(z.string().max(50).optional()).optional(),
|
|
607
|
-
});
|
|
608
|
-
const UpdateBillingInfoCustomerBodySchema = z.looseObject({
|
|
609
|
-
vat_number: z.string().max(20).optional(),
|
|
610
|
-
vat_number_prefix: z.string().max(10).optional(),
|
|
611
|
-
entity_identifier_scheme: z.string().max(50).optional(),
|
|
612
|
-
entity_identifier_standard: z.string().max(50).optional(),
|
|
613
|
-
registered_for_gst: z.boolean().optional(),
|
|
614
|
-
business_customer_without_vat_number: z.boolean().optional(),
|
|
615
|
-
is_einvoice_enabled: z.boolean().optional(),
|
|
616
|
-
einvoicing_method: z.enum(['automatic', 'manual', 'site_default']).optional(),
|
|
617
|
-
billing_address: UpdateBillingInfoCustomerBillingAddressSchema.optional(),
|
|
618
|
-
entity_identifiers: UpdateBillingInfoCustomerEntityIdentifiersSchema.optional(),
|
|
619
|
-
tax_providers_fields: UpdateBillingInfoCustomerTaxProvidersFieldsSchema.optional(),
|
|
620
|
-
});
|
|
621
|
-
export { UpdateBillingInfoCustomerBodySchema };
|
|
622
|
-
//Customer.contactsForCustomer
|
|
623
|
-
const ContactsForCustomerCustomerBodySchema = z.looseObject({
|
|
624
|
-
limit: z.number().int().min(1).max(100).optional(),
|
|
625
|
-
offset: z.string().max(1000).optional(),
|
|
626
|
-
});
|
|
627
|
-
export { ContactsForCustomerCustomerBodySchema };
|
|
628
|
-
//Customer.assignPaymentRole
|
|
629
|
-
const AssignPaymentRoleCustomerBodySchema = z.looseObject({
|
|
630
|
-
payment_source_id: z.string().max(40),
|
|
631
|
-
role: z.enum(['primary', 'backup', 'none']),
|
|
632
|
-
});
|
|
633
|
-
export { AssignPaymentRoleCustomerBodySchema };
|
|
634
|
-
//Customer.addContact
|
|
635
|
-
const AddContactCustomerContactSchema = z.object({
|
|
636
|
-
id: z.string().max(150).optional(),
|
|
637
|
-
first_name: z.string().max(150).optional(),
|
|
638
|
-
last_name: z.string().max(150).optional(),
|
|
639
|
-
email: z.string().email().max(70),
|
|
640
|
-
phone: z.string().max(50).optional(),
|
|
641
|
-
label: z.string().max(50).optional(),
|
|
642
|
-
enabled: z.boolean().default(false).optional(),
|
|
643
|
-
send_billing_email: z.boolean().default(false).optional(),
|
|
644
|
-
send_account_email: z.boolean().default(false).optional(),
|
|
645
|
-
});
|
|
646
|
-
const AddContactCustomerBodySchema = z.looseObject({
|
|
647
|
-
contact: AddContactCustomerContactSchema.optional(),
|
|
648
|
-
});
|
|
649
|
-
export { AddContactCustomerBodySchema };
|
|
650
|
-
//Customer.updateContact
|
|
651
|
-
const UpdateContactCustomerContactSchema = z.object({
|
|
652
|
-
id: z.string().max(150),
|
|
653
|
-
first_name: z.string().max(150).optional(),
|
|
654
|
-
last_name: z.string().max(150).optional(),
|
|
655
|
-
email: z.string().email().max(70).optional(),
|
|
656
|
-
phone: z.string().max(50).optional(),
|
|
657
|
-
label: z.string().max(50).optional(),
|
|
658
|
-
enabled: z.boolean().default(false).optional(),
|
|
659
|
-
send_billing_email: z.boolean().default(false).optional(),
|
|
660
|
-
send_account_email: z.boolean().default(false).optional(),
|
|
661
|
-
});
|
|
662
|
-
const UpdateContactCustomerBodySchema = z.looseObject({
|
|
663
|
-
contact: UpdateContactCustomerContactSchema.optional(),
|
|
664
|
-
});
|
|
665
|
-
export { UpdateContactCustomerBodySchema };
|
|
666
|
-
//Customer.deleteContact
|
|
667
|
-
const DeleteContactCustomerContactSchema = z.object({
|
|
668
|
-
id: z.string().max(150),
|
|
669
|
-
});
|
|
670
|
-
const DeleteContactCustomerBodySchema = z.looseObject({
|
|
671
|
-
contact: DeleteContactCustomerContactSchema.optional(),
|
|
672
|
-
});
|
|
673
|
-
export { DeleteContactCustomerBodySchema };
|
|
674
|
-
//Customer.addPromotionalCredits
|
|
675
|
-
const AddPromotionalCreditsCustomerBodySchema = z.looseObject({
|
|
676
|
-
amount: z.number().int().min(1),
|
|
677
|
-
currency_code: z.string().max(3).optional(),
|
|
678
|
-
description: z.string().max(250),
|
|
679
|
-
credit_type: z
|
|
680
|
-
.enum(['loyalty_credits', 'referral_rewards', 'general'])
|
|
681
|
-
.optional(),
|
|
682
|
-
reference: z.string().max(500).optional(),
|
|
683
|
-
});
|
|
684
|
-
export { AddPromotionalCreditsCustomerBodySchema };
|
|
685
|
-
//Customer.deductPromotionalCredits
|
|
686
|
-
const DeductPromotionalCreditsCustomerBodySchema = z.looseObject({
|
|
687
|
-
amount: z.number().int().min(1),
|
|
688
|
-
currency_code: z.string().max(3).optional(),
|
|
689
|
-
description: z.string().max(250),
|
|
690
|
-
credit_type: z
|
|
691
|
-
.enum(['loyalty_credits', 'referral_rewards', 'general'])
|
|
692
|
-
.optional(),
|
|
693
|
-
reference: z.string().max(500).optional(),
|
|
694
|
-
});
|
|
695
|
-
export { DeductPromotionalCreditsCustomerBodySchema };
|
|
696
|
-
//Customer.setPromotionalCredits
|
|
697
|
-
const SetPromotionalCreditsCustomerBodySchema = z.looseObject({
|
|
698
|
-
amount: z.number().int().min(0),
|
|
699
|
-
currency_code: z.string().max(3).optional(),
|
|
700
|
-
description: z.string().max(250),
|
|
701
|
-
credit_type: z
|
|
702
|
-
.enum(['loyalty_credits', 'referral_rewards', 'general'])
|
|
703
|
-
.optional(),
|
|
704
|
-
reference: z.string().max(500).optional(),
|
|
705
|
-
});
|
|
706
|
-
export { SetPromotionalCreditsCustomerBodySchema };
|
|
707
|
-
//Customer.recordExcessPayment
|
|
708
|
-
const RecordExcessPaymentCustomerTransactionSchema = z.object({
|
|
709
|
-
id: z.string().max(40).optional(),
|
|
710
|
-
amount: z.number().int().min(0),
|
|
711
|
-
currency_code: z.string().max(3).optional(),
|
|
712
|
-
date: z.number().int(),
|
|
713
|
-
payment_method: z.enum([
|
|
714
|
-
'cash',
|
|
715
|
-
'check',
|
|
716
|
-
'bank_transfer',
|
|
717
|
-
'other',
|
|
718
|
-
'app_store',
|
|
719
|
-
'play_store',
|
|
720
|
-
'custom',
|
|
721
|
-
]),
|
|
722
|
-
reference_number: z.string().max(100).optional(),
|
|
723
|
-
custom_payment_method_id: z.string().max(50).optional(),
|
|
724
|
-
});
|
|
725
|
-
const RecordExcessPaymentCustomerBodySchema = z.looseObject({
|
|
726
|
-
comment: z.string().max(300).optional(),
|
|
727
|
-
transaction: RecordExcessPaymentCustomerTransactionSchema.optional(),
|
|
728
|
-
});
|
|
729
|
-
export { RecordExcessPaymentCustomerBodySchema };
|
|
730
|
-
//Customer.collectPayment
|
|
731
|
-
const CollectPaymentCustomerAdditionalInformationSchema = z.looseObject({});
|
|
732
|
-
const CollectPaymentCustomerPaymentMethodSchema = z.object({
|
|
733
|
-
type: z
|
|
734
|
-
.enum([
|
|
735
|
-
'card',
|
|
736
|
-
'paypal_express_checkout',
|
|
737
|
-
'amazon_payments',
|
|
738
|
-
'direct_debit',
|
|
739
|
-
'generic',
|
|
740
|
-
'alipay',
|
|
741
|
-
'unionpay',
|
|
742
|
-
'apple_pay',
|
|
743
|
-
'wechat_pay',
|
|
744
|
-
'ideal',
|
|
745
|
-
'google_pay',
|
|
746
|
-
'sofort',
|
|
747
|
-
'bancontact',
|
|
748
|
-
'giropay',
|
|
749
|
-
'dotpay',
|
|
750
|
-
'upi',
|
|
751
|
-
'netbanking_emandates',
|
|
752
|
-
'venmo',
|
|
753
|
-
'pay_to',
|
|
754
|
-
'faster_payments',
|
|
755
|
-
'sepa_instant_transfer',
|
|
756
|
-
'automated_bank_transfer',
|
|
757
|
-
'klarna_pay_now',
|
|
758
|
-
'online_banking_poland',
|
|
759
|
-
'payconiq_by_bancontact',
|
|
760
|
-
'electronic_payment_standard',
|
|
761
|
-
'kbc_payment_button',
|
|
762
|
-
'pay_by_bank',
|
|
763
|
-
'trustly',
|
|
764
|
-
'stablecoin',
|
|
765
|
-
'kakao_pay',
|
|
766
|
-
'naver_pay',
|
|
767
|
-
'revolut_pay',
|
|
768
|
-
'cash_app_pay',
|
|
769
|
-
'pix',
|
|
770
|
-
'twint',
|
|
771
|
-
'go_pay',
|
|
772
|
-
'grab_pay',
|
|
773
|
-
'pay_co',
|
|
774
|
-
'after_pay',
|
|
775
|
-
'swish',
|
|
776
|
-
'payme',
|
|
777
|
-
])
|
|
778
|
-
.optional(),
|
|
779
|
-
gateway_account_id: z.string().max(50).optional(),
|
|
780
|
-
reference_id: z.string().max(200).optional(),
|
|
781
|
-
tmp_token: z.string().max(65000).optional(),
|
|
782
|
-
additional_information: CollectPaymentCustomerAdditionalInformationSchema.optional(),
|
|
783
|
-
});
|
|
784
|
-
const CollectPaymentCustomerCardSchema = z.object({
|
|
785
|
-
gateway_account_id: z.string().max(50).optional(),
|
|
786
|
-
first_name: z.string().max(50).optional(),
|
|
787
|
-
last_name: z.string().max(50).optional(),
|
|
788
|
-
number: z.string().max(1500).optional(),
|
|
789
|
-
expiry_month: z.number().int().min(1).max(12).optional(),
|
|
790
|
-
expiry_year: z.number().int().optional(),
|
|
791
|
-
cvv: z.string().max(520).optional(),
|
|
792
|
-
preferred_scheme: z
|
|
793
|
-
.enum(['cartes_bancaires', 'mastercard', 'visa'])
|
|
794
|
-
.optional(),
|
|
795
|
-
billing_addr1: z.string().max(150).optional(),
|
|
796
|
-
billing_addr2: z.string().max(150).optional(),
|
|
797
|
-
billing_city: z.string().max(50).optional(),
|
|
798
|
-
billing_state_code: z.string().max(50).optional(),
|
|
799
|
-
billing_state: z.string().max(50).optional(),
|
|
800
|
-
billing_zip: z.string().max(20).optional(),
|
|
801
|
-
billing_country: z.string().max(50).optional(),
|
|
802
|
-
additional_information: CollectPaymentCustomerAdditionalInformationSchema.optional(),
|
|
803
|
-
});
|
|
804
|
-
const CollectPaymentCustomerPaymentIntentSchema = z.object({
|
|
805
|
-
id: z.string().max(150).optional(),
|
|
806
|
-
gateway_account_id: z.string().max(50).optional(),
|
|
807
|
-
gw_token: z.string().max(65000).optional(),
|
|
808
|
-
payment_method_type: z
|
|
809
|
-
.enum([
|
|
810
|
-
'card',
|
|
811
|
-
'ideal',
|
|
812
|
-
'sofort',
|
|
813
|
-
'bancontact',
|
|
814
|
-
'google_pay',
|
|
815
|
-
'dotpay',
|
|
816
|
-
'giropay',
|
|
817
|
-
'apple_pay',
|
|
818
|
-
'upi',
|
|
819
|
-
'netbanking_emandates',
|
|
820
|
-
'paypal_express_checkout',
|
|
821
|
-
'direct_debit',
|
|
822
|
-
'boleto',
|
|
823
|
-
'venmo',
|
|
824
|
-
'amazon_payments',
|
|
825
|
-
'pay_to',
|
|
826
|
-
'faster_payments',
|
|
827
|
-
'sepa_instant_transfer',
|
|
828
|
-
'klarna_pay_now',
|
|
829
|
-
'online_banking_poland',
|
|
830
|
-
'payconiq_by_bancontact',
|
|
831
|
-
'electronic_payment_standard',
|
|
832
|
-
'kbc_payment_button',
|
|
833
|
-
'pay_by_bank',
|
|
834
|
-
'trustly',
|
|
835
|
-
'stablecoin',
|
|
836
|
-
'kakao_pay',
|
|
837
|
-
'naver_pay',
|
|
838
|
-
'revolut_pay',
|
|
839
|
-
'cash_app_pay',
|
|
840
|
-
'wechat_pay',
|
|
841
|
-
'alipay',
|
|
842
|
-
'pix',
|
|
843
|
-
'twint',
|
|
844
|
-
'go_pay',
|
|
845
|
-
'grab_pay',
|
|
846
|
-
'pay_co',
|
|
847
|
-
'after_pay',
|
|
848
|
-
'swish',
|
|
849
|
-
'payme',
|
|
850
|
-
])
|
|
851
|
-
.optional(),
|
|
852
|
-
gw_payment_method_id: z.string().max(65000).optional(),
|
|
853
|
-
reference_id: z.string().max(65000).optional(),
|
|
854
|
-
additional_information: CollectPaymentCustomerAdditionalInformationSchema.optional(),
|
|
855
|
-
});
|
|
856
|
-
const CollectPaymentCustomerInvoiceAllocationsSchema = z.object({
|
|
857
|
-
invoice_id: z.array(z.string().max(50).optional()),
|
|
858
|
-
allocation_amount: z.array(z.number().int().min(0).optional()).optional(),
|
|
859
|
-
});
|
|
860
|
-
const CollectPaymentCustomerBodySchema = z.looseObject({
|
|
861
|
-
amount: z.number().int().min(0).optional(),
|
|
862
|
-
payment_source_id: z.string().max(40).optional(),
|
|
863
|
-
token_id: z.string().max(40).optional(),
|
|
864
|
-
replace_primary_payment_source: z.boolean().default(false).optional(),
|
|
865
|
-
retain_payment_source: z.boolean().default(false).optional(),
|
|
866
|
-
payment_initiator: z.enum(['customer', 'merchant']).optional(),
|
|
867
|
-
payment_method: CollectPaymentCustomerPaymentMethodSchema.optional(),
|
|
868
|
-
card: CollectPaymentCustomerCardSchema.optional(),
|
|
869
|
-
payment_intent: CollectPaymentCustomerPaymentIntentSchema.optional(),
|
|
870
|
-
invoice_allocations: CollectPaymentCustomerInvoiceAllocationsSchema.optional(),
|
|
871
|
-
});
|
|
872
|
-
export { CollectPaymentCustomerBodySchema };
|
|
873
|
-
//Customer.delete
|
|
874
|
-
const DeleteCustomerBodySchema = z.looseObject({
|
|
875
|
-
delete_payment_method: z.boolean().default(true).optional(),
|
|
876
|
-
});
|
|
877
|
-
export { DeleteCustomerBodySchema };
|
|
878
|
-
//Customer.move
|
|
879
|
-
const MoveCustomerBodySchema = z.looseObject({
|
|
880
|
-
id_at_from_site: z.string().max(100),
|
|
881
|
-
from_site: z.string().max(50),
|
|
882
|
-
});
|
|
883
|
-
export { MoveCustomerBodySchema };
|
|
884
|
-
//Customer.changeBillingDate
|
|
885
|
-
const ChangeBillingDateCustomerBodySchema = z.looseObject({
|
|
886
|
-
billing_date: z.number().int().min(1).max(31).optional(),
|
|
887
|
-
billing_month: z.number().int().min(1).max(12).optional(),
|
|
888
|
-
billing_date_mode: z.enum(['using_defaults', 'manually_set']).optional(),
|
|
889
|
-
billing_day_of_week: z
|
|
890
|
-
.enum([
|
|
891
|
-
'sunday',
|
|
892
|
-
'monday',
|
|
893
|
-
'tuesday',
|
|
894
|
-
'wednesday',
|
|
895
|
-
'thursday',
|
|
896
|
-
'friday',
|
|
897
|
-
'saturday',
|
|
898
|
-
])
|
|
899
|
-
.optional(),
|
|
900
|
-
billing_day_of_week_mode: z
|
|
901
|
-
.enum(['using_defaults', 'manually_set'])
|
|
902
|
-
.optional(),
|
|
903
|
-
});
|
|
904
|
-
export { ChangeBillingDateCustomerBodySchema };
|
|
905
|
-
//Customer.merge
|
|
906
|
-
const MergeCustomerBodySchema = z.looseObject({
|
|
907
|
-
from_customer_id: z.string().max(50),
|
|
908
|
-
to_customer_id: z.string().max(50),
|
|
909
|
-
});
|
|
910
|
-
export { MergeCustomerBodySchema };
|
|
911
|
-
//Customer.relationships
|
|
912
|
-
const RelationshipsCustomerParentAccountAccessSchema = z.object({
|
|
913
|
-
portal_edit_child_subscriptions: z
|
|
914
|
-
.enum(['yes', 'view_only', 'no'])
|
|
915
|
-
.optional(),
|
|
916
|
-
portal_download_child_invoices: z.enum(['yes', 'view_only', 'no']).optional(),
|
|
917
|
-
send_subscription_emails: z.boolean().optional(),
|
|
918
|
-
send_payment_emails: z.boolean().optional(),
|
|
919
|
-
send_invoice_emails: z.boolean().optional(),
|
|
920
|
-
});
|
|
921
|
-
const RelationshipsCustomerChildAccountAccessSchema = z.object({
|
|
922
|
-
portal_edit_subscriptions: z.enum(['yes', 'view_only']).optional(),
|
|
923
|
-
portal_download_invoices: z.enum(['yes', 'view_only', 'no']).optional(),
|
|
924
|
-
send_subscription_emails: z.boolean().optional(),
|
|
925
|
-
send_payment_emails: z.boolean().optional(),
|
|
926
|
-
send_invoice_emails: z.boolean().optional(),
|
|
927
|
-
});
|
|
928
|
-
const RelationshipsCustomerBodySchema = z.looseObject({
|
|
929
|
-
parent_id: z.string().max(50).optional(),
|
|
930
|
-
payment_owner_id: z.string().max(50).optional(),
|
|
931
|
-
invoice_owner_id: z.string().max(50).optional(),
|
|
932
|
-
use_default_hierarchy_settings: z.boolean().default(true).optional(),
|
|
933
|
-
parent_account_access: RelationshipsCustomerParentAccountAccessSchema.optional(),
|
|
934
|
-
child_account_access: RelationshipsCustomerChildAccountAccessSchema.optional(),
|
|
935
|
-
});
|
|
936
|
-
export { RelationshipsCustomerBodySchema };
|
|
937
|
-
//Customer.hierarchy
|
|
938
|
-
const HierarchyCustomerBodySchema = z.looseObject({
|
|
939
|
-
hierarchy_operation_type: z.enum([
|
|
940
|
-
'complete_hierarchy',
|
|
941
|
-
'subordinates',
|
|
942
|
-
'path_to_root',
|
|
943
|
-
'subordinates_with_unbilled_charges_payable_by_parent',
|
|
944
|
-
'immediate_children',
|
|
945
|
-
]),
|
|
946
|
-
});
|
|
947
|
-
export { HierarchyCustomerBodySchema };
|
|
948
|
-
//Customer.listHierarchyDetail
|
|
949
|
-
const ListHierarchyDetailCustomerBodySchema = z.looseObject({
|
|
950
|
-
limit: z.number().int().min(1).max(100).optional(),
|
|
951
|
-
offset: z.string().max(1000).optional(),
|
|
952
|
-
hierarchy_operation_type: z.enum([
|
|
953
|
-
'complete_hierarchy',
|
|
954
|
-
'subordinates',
|
|
955
|
-
'path_to_root',
|
|
956
|
-
'subordinates_with_unbilled_charges_payable_by_parent',
|
|
957
|
-
'immediate_children',
|
|
958
|
-
]),
|
|
959
|
-
});
|
|
960
|
-
export { ListHierarchyDetailCustomerBodySchema };
|
|
961
|
-
//Customer.updateHierarchySettings
|
|
962
|
-
const UpdateHierarchySettingsCustomerParentAccountAccessSchema = z.object({
|
|
963
|
-
portal_edit_child_subscriptions: z
|
|
964
|
-
.enum(['yes', 'view_only', 'no'])
|
|
965
|
-
.optional(),
|
|
966
|
-
portal_download_child_invoices: z.enum(['yes', 'view_only', 'no']).optional(),
|
|
967
|
-
send_subscription_emails: z.boolean().optional(),
|
|
968
|
-
send_payment_emails: z.boolean().optional(),
|
|
969
|
-
send_invoice_emails: z.boolean().optional(),
|
|
970
|
-
});
|
|
971
|
-
const UpdateHierarchySettingsCustomerChildAccountAccessSchema = z.object({
|
|
972
|
-
portal_edit_subscriptions: z.enum(['yes', 'view_only']).optional(),
|
|
973
|
-
portal_download_invoices: z.enum(['yes', 'view_only', 'no']).optional(),
|
|
974
|
-
send_subscription_emails: z.boolean().optional(),
|
|
975
|
-
send_payment_emails: z.boolean().optional(),
|
|
976
|
-
send_invoice_emails: z.boolean().optional(),
|
|
977
|
-
});
|
|
978
|
-
const UpdateHierarchySettingsCustomerBodySchema = z.looseObject({
|
|
979
|
-
use_default_hierarchy_settings: z.boolean().default(true).optional(),
|
|
980
|
-
parent_account_access: UpdateHierarchySettingsCustomerParentAccountAccessSchema.optional(),
|
|
981
|
-
child_account_access: UpdateHierarchySettingsCustomerChildAccountAccessSchema.optional(),
|
|
982
|
-
});
|
|
983
|
-
export { UpdateHierarchySettingsCustomerBodySchema };
|