chargebee 3.34.0 → 3.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (198) hide show
  1. package/CHANGELOG.md +237 -0
  2. package/cjs/environment.js +1 -1
  3. package/cjs/resources/api_endpoints.js +230 -2
  4. package/cjs/resources/webhook/eventType.js +25 -1
  5. package/cjs/schema/addon.schema.js +221 -40
  6. package/cjs/schema/alert.schema.js +17 -2
  7. package/cjs/schema/alert_status.schema.js +6 -1
  8. package/cjs/schema/attached_item.schema.js +101 -26
  9. package/cjs/schema/business_entity.schema.js +43 -6
  10. package/cjs/schema/business_rule.schema.js +2 -2
  11. package/cjs/schema/business_ruleset.schema.js +2 -2
  12. package/cjs/schema/collections_payment_promise.schema.js +43 -0
  13. package/cjs/schema/comment.schema.js +17 -4
  14. package/cjs/schema/coupon.schema.js +218 -37
  15. package/cjs/schema/coupon_code.schema.js +36 -6
  16. package/cjs/schema/coupon_set.schema.js +108 -27
  17. package/cjs/schema/credit_note.schema.js +497 -105
  18. package/cjs/schema/credit_unit.schema.js +12 -2
  19. package/cjs/schema/customer.schema.js +212 -62
  20. package/cjs/schema/differential_price.schema.js +100 -12
  21. package/cjs/schema/dispute.schema.js +125 -33
  22. package/cjs/schema/einvoice.schema.js +27 -6
  23. package/cjs/schema/email_log.schema.js +15 -4
  24. package/cjs/schema/entitlement.schema.js +35 -6
  25. package/cjs/schema/entitlement_override.schema.js +17 -1
  26. package/cjs/schema/estimate.schema.js +585 -40
  27. package/cjs/schema/event.schema.js +1334 -585
  28. package/cjs/schema/export.schema.js +4459 -1412
  29. package/cjs/schema/feature.schema.js +73 -11
  30. package/cjs/schema/gateway_request_log.schema.js +309 -0
  31. package/cjs/schema/gateway_webhook_log.schema.js +257 -0
  32. package/cjs/schema/gift.schema.js +51 -5
  33. package/cjs/schema/grant_block.schema.js +45 -12
  34. package/cjs/schema/hosted_page.schema.js +564 -68
  35. package/cjs/schema/index.js +6 -0
  36. package/cjs/schema/invoice.schema.js +843 -123
  37. package/cjs/schema/item.schema.js +151 -28
  38. package/cjs/schema/item_entitlement.schema.js +23 -2
  39. package/cjs/schema/item_family.schema.js +29 -8
  40. package/cjs/schema/item_price.schema.js +263 -48
  41. package/cjs/schema/ledger_account_balance.schema.js +11 -2
  42. package/cjs/schema/ledger_operation.schema.js +44 -17
  43. package/cjs/schema/metered_feature.schema.js +10 -1
  44. package/cjs/schema/omnichannel_one_time_order.schema.js +42 -4
  45. package/cjs/schema/omnichannel_subscription.schema.js +146 -32
  46. package/cjs/schema/order.schema.js +233 -61
  47. package/cjs/schema/organization_detail.schema.js +36 -0
  48. package/cjs/schema/payment_schedule.schema.js +39 -8
  49. package/cjs/schema/payment_schedule_scheme.schema.js +37 -7
  50. package/cjs/schema/payment_source.schema.js +375 -148
  51. package/cjs/schema/payment_voucher.schema.js +33 -5
  52. package/cjs/schema/plan.schema.js +345 -57
  53. package/cjs/schema/price_ramp.schema.js +153 -0
  54. package/cjs/schema/price_variant.schema.js +88 -18
  55. package/cjs/schema/pricing_page_session.schema.js +36 -2
  56. package/cjs/schema/promotional_credit.schema.js +27 -6
  57. package/cjs/schema/purchase.schema.js +210 -12
  58. package/cjs/schema/quote.schema.js +907 -87
  59. package/cjs/schema/quote_entitlement.schema.js +6 -2
  60. package/cjs/schema/ramp.schema.js +242 -24
  61. package/cjs/schema/retry_segment.schema.js +12 -0
  62. package/cjs/schema/site_migration_detail.schema.js +50 -16
  63. package/cjs/schema/subscription.schema.js +1002 -173
  64. package/cjs/schema/subscription_entitlement.schema.js +9 -1
  65. package/cjs/schema/transaction.schema.js +780 -342
  66. package/cjs/schema/unbilled_charge.schema.js +141 -13
  67. package/cjs/schema/usage.schema.js +59 -11
  68. package/cjs/schema/usage_event.schema.js +13 -1
  69. package/cjs/schema/usage_summary.schema.js +1 -0
  70. package/cjs/schema/virtual_bank_account.schema.js +42 -10
  71. package/cjs/schema/webhook_endpoint.schema.js +50 -2
  72. package/esm/environment.js +1 -1
  73. package/esm/resources/api_endpoints.js +230 -2
  74. package/esm/resources/webhook/eventType.js +25 -1
  75. package/esm/schema/addon.schema.js +221 -40
  76. package/esm/schema/alert.schema.js +17 -2
  77. package/esm/schema/alert_status.schema.js +6 -1
  78. package/esm/schema/attached_item.schema.js +101 -26
  79. package/esm/schema/business_entity.schema.js +42 -5
  80. package/esm/schema/business_rule.schema.js +2 -2
  81. package/esm/schema/business_ruleset.schema.js +2 -2
  82. package/esm/schema/collections_payment_promise.schema.js +40 -0
  83. package/esm/schema/comment.schema.js +17 -4
  84. package/esm/schema/coupon.schema.js +218 -37
  85. package/esm/schema/coupon_code.schema.js +36 -6
  86. package/esm/schema/coupon_set.schema.js +108 -27
  87. package/esm/schema/credit_note.schema.js +497 -105
  88. package/esm/schema/credit_unit.schema.js +12 -2
  89. package/esm/schema/customer.schema.js +212 -62
  90. package/esm/schema/differential_price.schema.js +100 -12
  91. package/esm/schema/dispute.schema.js +125 -33
  92. package/esm/schema/einvoice.schema.js +27 -6
  93. package/esm/schema/email_log.schema.js +15 -4
  94. package/esm/schema/entitlement.schema.js +35 -6
  95. package/esm/schema/entitlement_override.schema.js +17 -1
  96. package/esm/schema/estimate.schema.js +585 -40
  97. package/esm/schema/event.schema.js +1334 -585
  98. package/esm/schema/export.schema.js +4459 -1412
  99. package/esm/schema/feature.schema.js +73 -11
  100. package/esm/schema/gateway_request_log.schema.js +306 -0
  101. package/esm/schema/gateway_webhook_log.schema.js +254 -0
  102. package/esm/schema/gift.schema.js +51 -5
  103. package/esm/schema/grant_block.schema.js +45 -12
  104. package/esm/schema/hosted_page.schema.js +564 -68
  105. package/esm/schema/index.js +6 -0
  106. package/esm/schema/invoice.schema.js +842 -122
  107. package/esm/schema/item.schema.js +151 -28
  108. package/esm/schema/item_entitlement.schema.js +23 -2
  109. package/esm/schema/item_family.schema.js +29 -8
  110. package/esm/schema/item_price.schema.js +263 -48
  111. package/esm/schema/ledger_account_balance.schema.js +10 -1
  112. package/esm/schema/ledger_operation.schema.js +44 -17
  113. package/esm/schema/metered_feature.schema.js +10 -1
  114. package/esm/schema/omnichannel_one_time_order.schema.js +42 -4
  115. package/esm/schema/omnichannel_subscription.schema.js +146 -32
  116. package/esm/schema/order.schema.js +233 -61
  117. package/esm/schema/organization_detail.schema.js +33 -0
  118. package/esm/schema/payment_schedule.schema.js +39 -8
  119. package/esm/schema/payment_schedule_scheme.schema.js +37 -7
  120. package/esm/schema/payment_source.schema.js +375 -148
  121. package/esm/schema/payment_voucher.schema.js +33 -5
  122. package/esm/schema/plan.schema.js +345 -57
  123. package/esm/schema/price_ramp.schema.js +150 -0
  124. package/esm/schema/price_variant.schema.js +88 -18
  125. package/esm/schema/pricing_page_session.schema.js +36 -2
  126. package/esm/schema/promotional_credit.schema.js +27 -6
  127. package/esm/schema/purchase.schema.js +210 -12
  128. package/esm/schema/quote.schema.js +907 -87
  129. package/esm/schema/quote_entitlement.schema.js +6 -2
  130. package/esm/schema/ramp.schema.js +242 -24
  131. package/esm/schema/retry_segment.schema.js +9 -0
  132. package/esm/schema/site_migration_detail.schema.js +50 -16
  133. package/esm/schema/subscription.schema.js +1002 -173
  134. package/esm/schema/subscription_entitlement.schema.js +9 -1
  135. package/esm/schema/transaction.schema.js +780 -342
  136. package/esm/schema/unbilled_charge.schema.js +141 -13
  137. package/esm/schema/usage.schema.js +59 -11
  138. package/esm/schema/usage_event.schema.js +13 -1
  139. package/esm/schema/usage_summary.schema.js +1 -0
  140. package/esm/schema/virtual_bank_account.schema.js +42 -10
  141. package/esm/schema/webhook_endpoint.schema.js +50 -2
  142. package/package.json +1 -1
  143. package/types/core.d.ts +63 -74
  144. package/types/index.d.ts +29 -1
  145. package/types/resources/BillingLineItem.d.ts +10 -0
  146. package/types/resources/BillingMetadata.d.ts +9 -0
  147. package/types/resources/BusinessEntity.d.ts +52 -0
  148. package/types/resources/Citation.d.ts +13 -0
  149. package/types/resources/CollectionsDispute.d.ts +24 -0
  150. package/types/resources/CollectionsPaymentPromise.d.ts +93 -0
  151. package/types/resources/CollectionsReminderSequence.d.ts +35 -0
  152. package/types/resources/Comment.d.ts +2 -1
  153. package/types/resources/Content.d.ts +23 -1
  154. package/types/resources/CreditNote.d.ts +1 -0
  155. package/types/resources/CustomData.d.ts +14 -0
  156. package/types/resources/Discount.d.ts +1 -0
  157. package/types/resources/DraftEstimate.d.ts +13 -0
  158. package/types/resources/DraftRequest.d.ts +45 -0
  159. package/types/resources/EmailAttachment.d.ts +16 -0
  160. package/types/resources/EmailConversation.d.ts +18 -0
  161. package/types/resources/EmailLog.d.ts +1 -0
  162. package/types/resources/EmailMessage.d.ts +40 -0
  163. package/types/resources/Estimate.d.ts +3 -0
  164. package/types/resources/Event.d.ts +25 -1
  165. package/types/resources/Execution.d.ts +12 -0
  166. package/types/resources/GatewayPaymentMethodToken.d.ts +2 -2
  167. package/types/resources/GatewayRequestLog.d.ts +82 -0
  168. package/types/resources/GatewayWebhookLog.d.ts +74 -0
  169. package/types/resources/GrantBlock.d.ts +5 -0
  170. package/types/resources/GroupByAttribute.d.ts +15 -0
  171. package/types/resources/GroupByRecommendation.d.ts +10 -0
  172. package/types/resources/HostedPage.d.ts +18 -0
  173. package/types/resources/Invoice.d.ts +19 -0
  174. package/types/resources/ItemPrice.d.ts +1 -0
  175. package/types/resources/LedgerAccountBalance.d.ts +19 -0
  176. package/types/resources/Meter.d.ts +1 -0
  177. package/types/resources/MeteredFeature.d.ts +1 -0
  178. package/types/resources/OmnichannelOneTimeOrder.d.ts +5 -1
  179. package/types/resources/OmnichannelSubscription.d.ts +6 -1
  180. package/types/resources/OmnichannelSubscriptionItem.d.ts +4 -1
  181. package/types/resources/OrganizationDetail.d.ts +84 -0
  182. package/types/resources/PaymentSchedule.d.ts +1 -1
  183. package/types/resources/PaymentScheduleEstimate.d.ts +1 -1
  184. package/types/resources/PaymentSource.d.ts +19 -0
  185. package/types/resources/PreferenceVariant.d.ts +10 -0
  186. package/types/resources/PriceRamp.d.ts +113 -0
  187. package/types/resources/PrivateNote.d.ts +18 -0
  188. package/types/resources/Purchase.d.ts +6 -0
  189. package/types/resources/Ramp.d.ts +6 -0
  190. package/types/resources/RampInterval.d.ts +12 -0
  191. package/types/resources/RecordedPurchase.d.ts +5 -1
  192. package/types/resources/RetrySegment.d.ts +36 -0
  193. package/types/resources/Subscription.d.ts +3 -0
  194. package/types/resources/Transaction.d.ts +4 -0
  195. package/types/resources/Usage.d.ts +7 -0
  196. package/types/resources/UsageSummary.d.ts +2 -0
  197. package/types/resources/WebhookEvent.d.ts +159 -5
  198. package/types/resources/AppliedBusinessRule.d.ts +0 -15
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  // Generated Zod schemas: Invoice
3
- // Actions: create, createForChargeItemsAndCharges, charge, chargeAddon, createForChargeItem, stopDunning, pauseDunning, resumeDunning, importInvoice, applyPayments, deleteLineItems, applyCredits, list, invoicesForCustomer, invoicesForSubscription, retrieve, pdf, listPaymentReferenceNumbers, addCharge, addAddonCharge, addChargeItem, close, collectPayment, recordPayment, recordTaxWithheld, removeTaxWithheld, refund, recordRefund, removePayment, removeCreditNote, voidInvoice, writeOff, voidBeforeCapture, delete, updateDetails, applyPaymentScheduleScheme
3
+ // Actions: create, createForChargeItemsAndCharges, charge, chargeAddon, createForChargeItem, stopDunning, pauseDunning, resumeDunning, importInvoice, applyPayments, deleteLineItems, applyCredits, list, invoicesForCustomer, invoicesForSubscription, retrieve, pdf, listPaymentReferenceNumbers, addCharge, addAddonCharge, addChargeItem, close, collectPayment, recordPayment, recordTaxWithheld, removeTaxWithheld, refund, recordRefund, removePayment, removeCreditNote, voidInvoice, writeOff, voidBeforeCapture, delete, updateDetails, applyPaymentScheduleScheme, removePaymentScheduleScheme
4
4
  // Do not edit manually – regenerate via sdk-generator
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ApplyPaymentScheduleSchemeInvoiceBodySchema = exports.UpdateDetailsInvoiceBodySchema = exports.DeleteInvoiceBodySchema = exports.VoidBeforeCaptureInvoiceBodySchema = exports.WriteOffInvoiceBodySchema = exports.VoidInvoiceInvoiceBodySchema = exports.RemoveCreditNoteInvoiceBodySchema = exports.RemovePaymentInvoiceBodySchema = exports.RecordRefundInvoiceBodySchema = exports.RefundInvoiceBodySchema = exports.RemoveTaxWithheldInvoiceBodySchema = exports.RecordTaxWithheldInvoiceBodySchema = exports.RecordPaymentInvoiceBodySchema = exports.CollectPaymentInvoiceBodySchema = exports.CloseInvoiceBodySchema = exports.AddChargeItemInvoiceBodySchema = exports.AddAddonChargeInvoiceBodySchema = exports.AddChargeInvoiceBodySchema = exports.ListPaymentReferenceNumbersInvoiceBodySchema = exports.PdfInvoiceBodySchema = exports.RetrieveInvoiceBodySchema = exports.InvoicesForSubscriptionInvoiceBodySchema = exports.InvoicesForCustomerInvoiceBodySchema = exports.ListInvoiceBodySchema = exports.ApplyCreditsInvoiceBodySchema = exports.DeleteLineItemsInvoiceBodySchema = exports.ApplyPaymentsInvoiceBodySchema = exports.ImportInvoiceInvoiceBodySchema = exports.ResumeDunningInvoiceBodySchema = exports.PauseDunningInvoiceBodySchema = exports.StopDunningInvoiceBodySchema = exports.CreateForChargeItemInvoiceBodySchema = exports.ChargeAddonInvoiceBodySchema = exports.ChargeInvoiceBodySchema = exports.CreateForChargeItemsAndChargesInvoiceBodySchema = exports.CreateInvoiceBodySchema = void 0;
6
+ exports.RemovePaymentScheduleSchemeInvoiceBodySchema = exports.ApplyPaymentScheduleSchemeInvoiceBodySchema = exports.UpdateDetailsInvoiceBodySchema = exports.DeleteInvoiceBodySchema = exports.VoidBeforeCaptureInvoiceBodySchema = exports.WriteOffInvoiceBodySchema = exports.VoidInvoiceInvoiceBodySchema = exports.RemoveCreditNoteInvoiceBodySchema = exports.RemovePaymentInvoiceBodySchema = exports.RecordRefundInvoiceBodySchema = exports.RefundInvoiceBodySchema = exports.RemoveTaxWithheldInvoiceBodySchema = exports.RecordTaxWithheldInvoiceBodySchema = exports.RecordPaymentInvoiceBodySchema = exports.CollectPaymentInvoiceBodySchema = exports.CloseInvoiceBodySchema = exports.AddChargeItemInvoiceBodySchema = exports.AddAddonChargeInvoiceBodySchema = exports.AddChargeInvoiceBodySchema = exports.ListPaymentReferenceNumbersInvoiceBodySchema = exports.PdfInvoiceBodySchema = exports.RetrieveInvoiceBodySchema = exports.InvoicesForSubscriptionInvoiceBodySchema = exports.InvoicesForCustomerInvoiceBodySchema = exports.ListInvoiceBodySchema = exports.ApplyCreditsInvoiceBodySchema = exports.DeleteLineItemsInvoiceBodySchema = exports.ApplyPaymentsInvoiceBodySchema = exports.ImportInvoiceInvoiceBodySchema = exports.ResumeDunningInvoiceBodySchema = exports.PauseDunningInvoiceBodySchema = exports.StopDunningInvoiceBodySchema = exports.CreateForChargeItemInvoiceBodySchema = exports.ChargeAddonInvoiceBodySchema = exports.ChargeInvoiceBodySchema = exports.CreateForChargeItemsAndChargesInvoiceBodySchema = exports.CreateInvoiceBodySchema = void 0;
7
7
  const zod_1 = require("zod");
8
8
  //Invoice.create
9
9
  const CreateInvoiceShippingAddressSchema = zod_1.z.object({
@@ -355,6 +355,15 @@ const CreateInvoicePaymentIntentSchema = zod_1.z.object({
355
355
  gw_payment_method_id: zod_1.z.string().max(65000).optional(),
356
356
  additional_information: CreateInvoiceAdditionalInformationSchema.optional(),
357
357
  });
358
+ const CreateInvoiceAddonsItemSchema = zod_1.z.object({
359
+ id: zod_1.z.string().max(100).optional(),
360
+ quantity: zod_1.z.number().int().min(1).optional(),
361
+ unit_price: zod_1.z.number().int().min(0).optional(),
362
+ quantity_in_decimal: zod_1.z.string().max(33).optional(),
363
+ unit_price_in_decimal: zod_1.z.string().max(39).optional(),
364
+ date_from: zod_1.z.number().int().optional(),
365
+ date_to: zod_1.z.number().int().optional(),
366
+ });
358
367
  const CreateInvoiceAddonsSchema = zod_1.z.object({
359
368
  id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
360
369
  quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
@@ -364,6 +373,23 @@ const CreateInvoiceAddonsSchema = zod_1.z.object({
364
373
  date_from: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
365
374
  date_to: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
366
375
  });
376
+ const CreateInvoiceChargesItemSchema = zod_1.z.object({
377
+ amount: zod_1.z.number().int().min(1).optional(),
378
+ amount_in_decimal: zod_1.z.string().max(39).optional(),
379
+ description: zod_1.z.string().max(250).optional(),
380
+ taxable: zod_1.z.boolean().default(true).optional(),
381
+ tax_profile_id: zod_1.z.string().max(50).optional(),
382
+ avalara_tax_code: zod_1.z.string().max(50).optional(),
383
+ hsn_code: zod_1.z.string().max(50).optional(),
384
+ taxjar_product_code: zod_1.z.string().max(50).optional(),
385
+ avalara_sale_type: zod_1.z
386
+ .enum(['wholesale', 'retail', 'consumed', 'vendor_use'])
387
+ .optional(),
388
+ avalara_transaction_type: zod_1.z.number().int().optional(),
389
+ avalara_service_type: zod_1.z.number().int().optional(),
390
+ date_from: zod_1.z.number().int().optional(),
391
+ date_to: zod_1.z.number().int().optional(),
392
+ });
367
393
  const CreateInvoiceChargesSchema = zod_1.z.object({
368
394
  amount: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
369
395
  amount_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
@@ -381,11 +407,22 @@ const CreateInvoiceChargesSchema = zod_1.z.object({
381
407
  date_from: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
382
408
  date_to: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
383
409
  });
410
+ const CreateInvoiceTaxProvidersFieldsItemSchema = zod_1.z.object({
411
+ provider_name: zod_1.z.string().max(50).optional(),
412
+ field_id: zod_1.z.string().max(50).optional(),
413
+ field_value: zod_1.z.string().max(50).optional(),
414
+ });
384
415
  const CreateInvoiceTaxProvidersFieldsSchema = zod_1.z.object({
385
416
  provider_name: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
386
417
  field_id: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
387
418
  field_value: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
388
419
  });
420
+ const CreateInvoiceNotesToRemoveItemSchema = zod_1.z.object({
421
+ entity_type: zod_1.z
422
+ .enum(['plan', 'addon', 'customer', 'subscription', 'coupon'])
423
+ .optional(),
424
+ entity_id: zod_1.z.string().max(100).optional(),
425
+ });
389
426
  const CreateInvoiceNotesToRemoveSchema = zod_1.z.object({
390
427
  entity_type: zod_1.z
391
428
  .array(zod_1.z
@@ -417,10 +454,30 @@ const CreateInvoiceBodySchema = zod_1.z.looseObject({
417
454
  bank_account: CreateInvoiceBankAccountSchema.optional(),
418
455
  payment_method: CreateInvoicePaymentMethodSchema.optional(),
419
456
  payment_intent: CreateInvoicePaymentIntentSchema.optional(),
420
- addons: CreateInvoiceAddonsSchema.optional(),
421
- charges: CreateInvoiceChargesSchema.optional(),
422
- tax_providers_fields: CreateInvoiceTaxProvidersFieldsSchema.optional(),
423
- notes_to_remove: CreateInvoiceNotesToRemoveSchema.optional(),
457
+ addons: zod_1.z
458
+ .union([
459
+ zod_1.z.array(CreateInvoiceAddonsItemSchema.optional()),
460
+ CreateInvoiceAddonsSchema,
461
+ ])
462
+ .optional(),
463
+ charges: zod_1.z
464
+ .union([
465
+ zod_1.z.array(CreateInvoiceChargesItemSchema.optional()),
466
+ CreateInvoiceChargesSchema,
467
+ ])
468
+ .optional(),
469
+ tax_providers_fields: zod_1.z
470
+ .union([
471
+ zod_1.z.array(CreateInvoiceTaxProvidersFieldsItemSchema.optional()),
472
+ CreateInvoiceTaxProvidersFieldsSchema,
473
+ ])
474
+ .optional(),
475
+ notes_to_remove: zod_1.z
476
+ .union([
477
+ zod_1.z.array(CreateInvoiceNotesToRemoveItemSchema.optional()),
478
+ CreateInvoiceNotesToRemoveSchema,
479
+ ])
480
+ .optional(),
424
481
  });
425
482
  exports.CreateInvoiceBodySchema = CreateInvoiceBodySchema;
426
483
  //Invoice.createForChargeItemsAndCharges
@@ -773,6 +830,17 @@ const CreateForChargeItemsAndChargesInvoicePaymentIntentSchema = zod_1.z.object(
773
830
  gw_payment_method_id: zod_1.z.string().max(65000).optional(),
774
831
  additional_information: CreateForChargeItemsAndChargesInvoiceAdditionalInformationSchema.optional(),
775
832
  });
833
+ const CreateForChargeItemsAndChargesInvoiceItemPricesItemSchema = zod_1.z.object({
834
+ item_price_id: zod_1.z.string().max(100).optional(),
835
+ quantity: zod_1.z.number().int().min(1).optional(),
836
+ quantity_in_decimal: zod_1.z.string().max(33).optional(),
837
+ unit_price: zod_1.z.number().int().min(0).optional(),
838
+ unit_price_in_decimal: zod_1.z.string().max(39).optional(),
839
+ date_from: zod_1.z.number().int().optional(),
840
+ date_to: zod_1.z.number().int().optional(),
841
+ description: zod_1.z.string().max(250).optional(),
842
+ entity_description: zod_1.z.string().max(2000).optional(),
843
+ });
776
844
  const CreateForChargeItemsAndChargesInvoiceItemPricesSchema = zod_1.z.object({
777
845
  item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
778
846
  quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
@@ -784,6 +852,17 @@ const CreateForChargeItemsAndChargesInvoiceItemPricesSchema = zod_1.z.object({
784
852
  description: zod_1.z.array(zod_1.z.string().max(250).optional()).optional(),
785
853
  entity_description: zod_1.z.array(zod_1.z.string().max(2000).optional()).optional(),
786
854
  });
855
+ const CreateForChargeItemsAndChargesInvoiceItemTiersItemSchema = zod_1.z.object({
856
+ item_price_id: zod_1.z.string().max(100).optional(),
857
+ starting_unit: zod_1.z.number().int().min(1).optional(),
858
+ ending_unit: zod_1.z.number().int().optional(),
859
+ price: zod_1.z.number().int().min(0).optional(),
860
+ starting_unit_in_decimal: zod_1.z.string().max(33).optional(),
861
+ ending_unit_in_decimal: zod_1.z.string().max(33).optional(),
862
+ price_in_decimal: zod_1.z.string().max(39).optional(),
863
+ pricing_type: zod_1.z.enum(['per_unit', 'flat_fee', 'package']).optional(),
864
+ package_size: zod_1.z.number().int().min(1).optional(),
865
+ });
787
866
  const CreateForChargeItemsAndChargesInvoiceItemTiersSchema = zod_1.z.object({
788
867
  item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
789
868
  starting_unit: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
@@ -797,6 +876,24 @@ const CreateForChargeItemsAndChargesInvoiceItemTiersSchema = zod_1.z.object({
797
876
  .optional(),
798
877
  package_size: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
799
878
  });
879
+ const CreateForChargeItemsAndChargesInvoiceChargesItemSchema = zod_1.z.object({
880
+ entity_description: zod_1.z.string().max(2000).optional(),
881
+ amount: zod_1.z.number().int().min(1).optional(),
882
+ amount_in_decimal: zod_1.z.string().max(39).optional(),
883
+ description: zod_1.z.string().max(250).optional(),
884
+ taxable: zod_1.z.boolean().default(true).optional(),
885
+ tax_profile_id: zod_1.z.string().max(50).optional(),
886
+ avalara_tax_code: zod_1.z.string().max(50).optional(),
887
+ hsn_code: zod_1.z.string().max(50).optional(),
888
+ taxjar_product_code: zod_1.z.string().max(50).optional(),
889
+ avalara_sale_type: zod_1.z
890
+ .enum(['wholesale', 'retail', 'consumed', 'vendor_use'])
891
+ .optional(),
892
+ avalara_transaction_type: zod_1.z.number().int().optional(),
893
+ avalara_service_type: zod_1.z.number().int().optional(),
894
+ date_from: zod_1.z.number().int().optional(),
895
+ date_to: zod_1.z.number().int().optional(),
896
+ });
800
897
  const CreateForChargeItemsAndChargesInvoiceChargesSchema = zod_1.z.object({
801
898
  entity_description: zod_1.z.array(zod_1.z.string().max(2000).optional()).optional(),
802
899
  amount: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
@@ -815,6 +912,19 @@ const CreateForChargeItemsAndChargesInvoiceChargesSchema = zod_1.z.object({
815
912
  date_from: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
816
913
  date_to: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
817
914
  });
915
+ const CreateForChargeItemsAndChargesInvoiceNotesToRemoveItemSchema = zod_1.z.object({
916
+ entity_type: zod_1.z
917
+ .enum([
918
+ 'customer',
919
+ 'subscription',
920
+ 'coupon',
921
+ 'plan_item_price',
922
+ 'addon_item_price',
923
+ 'charge_item_price',
924
+ ])
925
+ .optional(),
926
+ entity_id: zod_1.z.string().max(100).optional(),
927
+ });
818
928
  const CreateForChargeItemsAndChargesInvoiceNotesToRemoveSchema = zod_1.z.object({
819
929
  entity_type: zod_1.z
820
930
  .array(zod_1.z
@@ -830,11 +940,23 @@ const CreateForChargeItemsAndChargesInvoiceNotesToRemoveSchema = zod_1.z.object(
830
940
  .optional(),
831
941
  entity_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
832
942
  });
943
+ const CreateForChargeItemsAndChargesInvoiceTaxProvidersFieldsItemSchema = zod_1.z.object({
944
+ provider_name: zod_1.z.string().max(50).optional(),
945
+ field_id: zod_1.z.string().max(50).optional(),
946
+ field_value: zod_1.z.string().max(50).optional(),
947
+ });
833
948
  const CreateForChargeItemsAndChargesInvoiceTaxProvidersFieldsSchema = zod_1.z.object({
834
949
  provider_name: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
835
950
  field_id: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
836
951
  field_value: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
837
952
  });
953
+ const CreateForChargeItemsAndChargesInvoiceDiscountsItemSchema = zod_1.z.object({
954
+ percentage: zod_1.z.number().min(0.01).max(100).optional(),
955
+ amount: zod_1.z.number().int().min(0).optional(),
956
+ quantity: zod_1.z.number().int().min(1).optional(),
957
+ apply_on: zod_1.z.enum(['invoice_amount', 'specific_item_price']),
958
+ item_price_id: zod_1.z.string().max(100).optional(),
959
+ });
838
960
  const CreateForChargeItemsAndChargesInvoiceDiscountsSchema = zod_1.z.object({
839
961
  percentage: zod_1.z.array(zod_1.z.number().min(0.01).max(100).optional()).optional(),
840
962
  amount: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
@@ -855,6 +977,23 @@ const CreateForChargeItemsAndChargesInvoiceBodySchema = zod_1.z.looseObject({
855
977
  payment_source_id: zod_1.z.string().max(40).optional(),
856
978
  auto_collection: zod_1.z.enum(['on', 'off']).optional(),
857
979
  net_term_days: zod_1.z.number().int().optional(),
980
+ offline_payment_method: zod_1.z
981
+ .enum([
982
+ 'no_preference',
983
+ 'cash',
984
+ 'check',
985
+ 'bank_transfer',
986
+ 'ach_credit',
987
+ 'sepa_credit',
988
+ 'boleto',
989
+ 'us_automated_bank_transfer',
990
+ 'eu_automated_bank_transfer',
991
+ 'uk_automated_bank_transfer',
992
+ 'jp_automated_bank_transfer',
993
+ 'mx_automated_bank_transfer',
994
+ 'custom',
995
+ ])
996
+ .optional(),
858
997
  invoice_date: zod_1.z.number().int().optional(),
859
998
  create_pending_invoice: zod_1.z.boolean().optional(),
860
999
  token_id: zod_1.z.string().max(40).optional(),
@@ -867,15 +1006,50 @@ const CreateForChargeItemsAndChargesInvoiceBodySchema = zod_1.z.looseObject({
867
1006
  bank_account: CreateForChargeItemsAndChargesInvoiceBankAccountSchema.optional(),
868
1007
  payment_method: CreateForChargeItemsAndChargesInvoicePaymentMethodSchema.optional(),
869
1008
  payment_intent: CreateForChargeItemsAndChargesInvoicePaymentIntentSchema.optional(),
870
- item_prices: CreateForChargeItemsAndChargesInvoiceItemPricesSchema.optional(),
871
- item_tiers: CreateForChargeItemsAndChargesInvoiceItemTiersSchema.optional(),
872
- charges: CreateForChargeItemsAndChargesInvoiceChargesSchema.optional(),
873
- notes_to_remove: CreateForChargeItemsAndChargesInvoiceNotesToRemoveSchema.optional(),
874
- tax_providers_fields: CreateForChargeItemsAndChargesInvoiceTaxProvidersFieldsSchema.optional(),
875
- discounts: CreateForChargeItemsAndChargesInvoiceDiscountsSchema.optional(),
1009
+ item_prices: zod_1.z
1010
+ .union([
1011
+ zod_1.z.array(CreateForChargeItemsAndChargesInvoiceItemPricesItemSchema.optional()),
1012
+ CreateForChargeItemsAndChargesInvoiceItemPricesSchema,
1013
+ ])
1014
+ .optional(),
1015
+ item_tiers: zod_1.z
1016
+ .union([
1017
+ zod_1.z.array(CreateForChargeItemsAndChargesInvoiceItemTiersItemSchema.optional()),
1018
+ CreateForChargeItemsAndChargesInvoiceItemTiersSchema,
1019
+ ])
1020
+ .optional(),
1021
+ charges: zod_1.z
1022
+ .union([
1023
+ zod_1.z.array(CreateForChargeItemsAndChargesInvoiceChargesItemSchema.optional()),
1024
+ CreateForChargeItemsAndChargesInvoiceChargesSchema,
1025
+ ])
1026
+ .optional(),
1027
+ notes_to_remove: zod_1.z
1028
+ .union([
1029
+ zod_1.z.array(CreateForChargeItemsAndChargesInvoiceNotesToRemoveItemSchema.optional()),
1030
+ CreateForChargeItemsAndChargesInvoiceNotesToRemoveSchema,
1031
+ ])
1032
+ .optional(),
1033
+ tax_providers_fields: zod_1.z
1034
+ .union([
1035
+ zod_1.z.array(CreateForChargeItemsAndChargesInvoiceTaxProvidersFieldsItemSchema.optional()),
1036
+ CreateForChargeItemsAndChargesInvoiceTaxProvidersFieldsSchema,
1037
+ ])
1038
+ .optional(),
1039
+ discounts: zod_1.z
1040
+ .union([
1041
+ zod_1.z.array(CreateForChargeItemsAndChargesInvoiceDiscountsItemSchema.optional()),
1042
+ CreateForChargeItemsAndChargesInvoiceDiscountsSchema,
1043
+ ])
1044
+ .optional(),
876
1045
  });
877
1046
  exports.CreateForChargeItemsAndChargesInvoiceBodySchema = CreateForChargeItemsAndChargesInvoiceBodySchema;
878
1047
  //Invoice.charge
1048
+ const ChargeInvoiceTaxProvidersFieldsItemSchema = zod_1.z.object({
1049
+ provider_name: zod_1.z.string().max(50).optional(),
1050
+ field_id: zod_1.z.string().max(50).optional(),
1051
+ field_value: zod_1.z.string().max(50).optional(),
1052
+ });
879
1053
  const ChargeInvoiceTaxProvidersFieldsSchema = zod_1.z.object({
880
1054
  provider_name: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
881
1055
  field_id: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
@@ -901,7 +1075,12 @@ const ChargeInvoiceBodySchema = zod_1.z.looseObject({
901
1075
  invoice_date: zod_1.z.number().int().optional(),
902
1076
  payment_source_id: zod_1.z.string().max(40).optional(),
903
1077
  payment_initiator: zod_1.z.enum(['customer', 'merchant']).optional(),
904
- tax_providers_fields: ChargeInvoiceTaxProvidersFieldsSchema.optional(),
1078
+ tax_providers_fields: zod_1.z
1079
+ .union([
1080
+ zod_1.z.array(ChargeInvoiceTaxProvidersFieldsItemSchema.optional()),
1081
+ ChargeInvoiceTaxProvidersFieldsSchema,
1082
+ ])
1083
+ .optional(),
905
1084
  });
906
1085
  exports.ChargeInvoiceBodySchema = ChargeInvoiceBodySchema;
907
1086
  //Invoice.chargeAddon
@@ -933,6 +1112,16 @@ const CreateForChargeItemInvoiceItemPriceSchema = zod_1.z.object({
933
1112
  date_from: zod_1.z.number().int().optional(),
934
1113
  date_to: zod_1.z.number().int().optional(),
935
1114
  });
1115
+ const CreateForChargeItemInvoiceItemTiersItemSchema = zod_1.z.object({
1116
+ starting_unit: zod_1.z.number().int().min(1).optional(),
1117
+ ending_unit: zod_1.z.number().int().optional(),
1118
+ price: zod_1.z.number().int().min(0).optional(),
1119
+ starting_unit_in_decimal: zod_1.z.string().max(33).optional(),
1120
+ ending_unit_in_decimal: zod_1.z.string().max(33).optional(),
1121
+ price_in_decimal: zod_1.z.string().max(39).optional(),
1122
+ pricing_type: zod_1.z.enum(['per_unit', 'flat_fee', 'package']).optional(),
1123
+ package_size: zod_1.z.number().int().min(1).optional(),
1124
+ });
936
1125
  const CreateForChargeItemInvoiceItemTiersSchema = zod_1.z.object({
937
1126
  starting_unit: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
938
1127
  ending_unit: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
@@ -954,7 +1143,12 @@ const CreateForChargeItemInvoiceBodySchema = zod_1.z.looseObject({
954
1143
  payment_initiator: zod_1.z.enum(['customer', 'merchant']).optional(),
955
1144
  invoice_date: zod_1.z.number().int().optional(),
956
1145
  item_price: CreateForChargeItemInvoiceItemPriceSchema.optional(),
957
- item_tiers: CreateForChargeItemInvoiceItemTiersSchema.optional(),
1146
+ item_tiers: zod_1.z
1147
+ .union([
1148
+ zod_1.z.array(CreateForChargeItemInvoiceItemTiersItemSchema.optional()),
1149
+ CreateForChargeItemInvoiceItemTiersSchema,
1150
+ ])
1151
+ .optional(),
958
1152
  });
959
1153
  exports.CreateForChargeItemInvoiceBodySchema = CreateForChargeItemInvoiceBodySchema;
960
1154
  //Invoice.stopDunning
@@ -1013,6 +1207,74 @@ const ImportInvoiceInvoiceShippingAddressSchema = zod_1.z.object({
1013
1207
  .enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
1014
1208
  .optional(),
1015
1209
  });
1210
+ const ImportInvoiceInvoiceLineItemsItemSchema = zod_1.z.object({
1211
+ id: zod_1.z.string().max(40).optional(),
1212
+ date_from: zod_1.z.number().int().optional(),
1213
+ date_to: zod_1.z.number().int().optional(),
1214
+ subscription_id: zod_1.z.string().max(50).optional(),
1215
+ description: zod_1.z.string().max(250),
1216
+ unit_amount: zod_1.z.number().int().optional(),
1217
+ quantity: zod_1.z.number().int().optional(),
1218
+ amount: zod_1.z.number().int().optional(),
1219
+ unit_amount_in_decimal: zod_1.z.string().max(39).optional(),
1220
+ quantity_in_decimal: zod_1.z.string().max(33).optional(),
1221
+ amount_in_decimal: zod_1.z.string().max(39).optional(),
1222
+ entity_type: zod_1.z
1223
+ .enum([
1224
+ 'adhoc',
1225
+ 'plan_item_price',
1226
+ 'addon_item_price',
1227
+ 'charge_item_price',
1228
+ 'plan_setup',
1229
+ 'plan',
1230
+ 'addon',
1231
+ ])
1232
+ .optional(),
1233
+ entity_id: zod_1.z.string().max(100).optional(),
1234
+ item_level_discount1_entity_id: zod_1.z.string().max(100).optional(),
1235
+ item_level_discount1_amount: zod_1.z.number().int().min(0).optional(),
1236
+ item_level_discount2_entity_id: zod_1.z.string().max(100).optional(),
1237
+ item_level_discount2_amount: zod_1.z.number().int().min(0).optional(),
1238
+ tax1_name: zod_1.z.string().max(50).optional(),
1239
+ tax1_amount: zod_1.z.number().int().min(0).optional(),
1240
+ tax2_name: zod_1.z.string().max(50).optional(),
1241
+ tax2_amount: zod_1.z.number().int().min(0).optional(),
1242
+ tax3_name: zod_1.z.string().max(50).optional(),
1243
+ tax3_amount: zod_1.z.number().int().min(0).optional(),
1244
+ tax4_name: zod_1.z.string().max(50).optional(),
1245
+ tax4_amount: zod_1.z.number().int().min(0).optional(),
1246
+ tax5_name: zod_1.z.string().max(50).optional(),
1247
+ tax5_amount: zod_1.z.number().int().min(0).optional(),
1248
+ tax6_name: zod_1.z.string().max(50).optional(),
1249
+ tax6_amount: zod_1.z.number().int().min(0).optional(),
1250
+ tax7_name: zod_1.z.string().max(50).optional(),
1251
+ tax7_amount: zod_1.z.number().int().min(0).optional(),
1252
+ tax8_name: zod_1.z.string().max(50).optional(),
1253
+ tax8_amount: zod_1.z.number().int().min(0).optional(),
1254
+ tax9_name: zod_1.z.string().max(50).optional(),
1255
+ tax9_amount: zod_1.z.number().int().min(0).optional(),
1256
+ tax10_name: zod_1.z.string().max(50).optional(),
1257
+ tax10_amount: zod_1.z.number().int().min(0).optional(),
1258
+ is_partial_tax_applied: zod_1.z.boolean().optional(),
1259
+ taxable_amount: zod_1.z.number().int().min(0).optional(),
1260
+ tax_exempt_reason: zod_1.z
1261
+ .enum([
1262
+ 'region_non_taxable',
1263
+ 'export',
1264
+ 'customer_exempt',
1265
+ 'product_exempt',
1266
+ 'zero_rated',
1267
+ 'reverse_charge',
1268
+ 'high_value_physical_goods',
1269
+ 'zero_value_item',
1270
+ 'tax_not_configured_external_provider',
1271
+ ])
1272
+ .optional(),
1273
+ proration_mode: zod_1.z
1274
+ .enum(['reset', 'delta', 'service_period_revision', 'adjusted_term'])
1275
+ .optional(),
1276
+ created_at: zod_1.z.number().int().optional(),
1277
+ });
1016
1278
  const ImportInvoiceInvoiceLineItemsSchema = zod_1.z.object({
1017
1279
  id: zod_1.z.array(zod_1.z.string().max(40).optional()).optional(),
1018
1280
  date_from: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
@@ -1073,6 +1335,21 @@ const ImportInvoiceInvoiceLineItemsSchema = zod_1.z.object({
1073
1335
  tax10_amount: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
1074
1336
  is_partial_tax_applied: zod_1.z.array(zod_1.z.boolean().optional()).optional(),
1075
1337
  taxable_amount: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
1338
+ tax_exempt_reason: zod_1.z
1339
+ .array(zod_1.z
1340
+ .enum([
1341
+ 'region_non_taxable',
1342
+ 'export',
1343
+ 'customer_exempt',
1344
+ 'product_exempt',
1345
+ 'zero_rated',
1346
+ 'reverse_charge',
1347
+ 'high_value_physical_goods',
1348
+ 'zero_value_item',
1349
+ 'tax_not_configured_external_provider',
1350
+ ])
1351
+ .optional())
1352
+ .optional(),
1076
1353
  proration_mode: zod_1.z
1077
1354
  .array(zod_1.z
1078
1355
  .enum(['reset', 'delta', 'service_period_revision', 'adjusted_term'])
@@ -1080,11 +1357,27 @@ const ImportInvoiceInvoiceLineItemsSchema = zod_1.z.object({
1080
1357
  .optional(),
1081
1358
  created_at: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
1082
1359
  });
1360
+ const ImportInvoiceInvoicePaymentReferenceNumbersItemSchema = zod_1.z.object({
1361
+ id: zod_1.z.string().max(40).optional(),
1362
+ type: zod_1.z.enum(['kid', 'ocr', 'frn', 'fik', 'swiss_reference']),
1363
+ number: zod_1.z.string().max(100),
1364
+ });
1083
1365
  const ImportInvoiceInvoicePaymentReferenceNumbersSchema = zod_1.z.object({
1084
1366
  id: zod_1.z.array(zod_1.z.string().max(40).optional()).optional(),
1085
1367
  type: zod_1.z.array(zod_1.z.enum(['kid', 'ocr', 'frn', 'fik', 'swiss_reference']).optional()),
1086
1368
  number: zod_1.z.array(zod_1.z.string().max(100).optional()),
1087
1369
  });
1370
+ const ImportInvoiceInvoiceLineItemTiersItemSchema = zod_1.z.object({
1371
+ line_item_id: zod_1.z.string().max(40),
1372
+ starting_unit: zod_1.z.number().int().min(0).optional(),
1373
+ ending_unit: zod_1.z.number().int().optional(),
1374
+ quantity_used: zod_1.z.number().int().min(0).optional(),
1375
+ unit_amount: zod_1.z.number().int().min(0).optional(),
1376
+ starting_unit_in_decimal: zod_1.z.string().max(33).optional(),
1377
+ ending_unit_in_decimal: zod_1.z.string().max(33).optional(),
1378
+ quantity_used_in_decimal: zod_1.z.string().max(33).optional(),
1379
+ unit_amount_in_decimal: zod_1.z.string().max(40).optional(),
1380
+ });
1088
1381
  const ImportInvoiceInvoiceLineItemTiersSchema = zod_1.z.object({
1089
1382
  line_item_id: zod_1.z.array(zod_1.z.string().max(40).optional()),
1090
1383
  starting_unit: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
@@ -1096,6 +1389,19 @@ const ImportInvoiceInvoiceLineItemTiersSchema = zod_1.z.object({
1096
1389
  quantity_used_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
1097
1390
  unit_amount_in_decimal: zod_1.z.array(zod_1.z.string().max(40).optional()).optional(),
1098
1391
  });
1392
+ const ImportInvoiceInvoiceDiscountsItemSchema = zod_1.z.object({
1393
+ line_item_id: zod_1.z.string().max(40).optional(),
1394
+ entity_type: zod_1.z.enum([
1395
+ 'item_level_coupon',
1396
+ 'document_level_coupon',
1397
+ 'promotional_credits',
1398
+ 'item_level_discount',
1399
+ 'document_level_discount',
1400
+ ]),
1401
+ entity_id: zod_1.z.string().max(100).optional(),
1402
+ description: zod_1.z.string().max(250).optional(),
1403
+ amount: zod_1.z.number().int().min(0),
1404
+ });
1099
1405
  const ImportInvoiceInvoiceDiscountsSchema = zod_1.z.object({
1100
1406
  line_item_id: zod_1.z.array(zod_1.z.string().max(40).optional()).optional(),
1101
1407
  entity_type: zod_1.z.array(zod_1.z
@@ -1111,6 +1417,26 @@ const ImportInvoiceInvoiceDiscountsSchema = zod_1.z.object({
1111
1417
  description: zod_1.z.array(zod_1.z.string().max(250).optional()).optional(),
1112
1418
  amount: zod_1.z.array(zod_1.z.number().int().min(0).optional()),
1113
1419
  });
1420
+ const ImportInvoiceInvoiceTaxesItemSchema = zod_1.z.object({
1421
+ name: zod_1.z.string().max(100),
1422
+ rate: zod_1.z.number().min(0).max(100),
1423
+ amount: zod_1.z.number().int().min(0).optional(),
1424
+ description: zod_1.z.string().max(50).optional(),
1425
+ juris_type: zod_1.z
1426
+ .enum([
1427
+ 'country',
1428
+ 'federal',
1429
+ 'state',
1430
+ 'county',
1431
+ 'city',
1432
+ 'special',
1433
+ 'unincorporated',
1434
+ 'other',
1435
+ ])
1436
+ .optional(),
1437
+ juris_name: zod_1.z.string().max(250).optional(),
1438
+ juris_code: zod_1.z.string().max(250).optional(),
1439
+ });
1114
1440
  const ImportInvoiceInvoiceTaxesSchema = zod_1.z.object({
1115
1441
  name: zod_1.z.array(zod_1.z.string().max(100).optional()),
1116
1442
  rate: zod_1.z.array(zod_1.z.number().min(0).max(100).optional()),
@@ -1133,6 +1459,21 @@ const ImportInvoiceInvoiceTaxesSchema = zod_1.z.object({
1133
1459
  juris_name: zod_1.z.array(zod_1.z.string().max(250).optional()).optional(),
1134
1460
  juris_code: zod_1.z.array(zod_1.z.string().max(250).optional()).optional(),
1135
1461
  });
1462
+ const ImportInvoiceInvoicePaymentsItemSchema = zod_1.z.object({
1463
+ id: zod_1.z.string().max(40).optional(),
1464
+ amount: zod_1.z.number().int().min(1),
1465
+ payment_method: zod_1.z.enum([
1466
+ 'cash',
1467
+ 'check',
1468
+ 'bank_transfer',
1469
+ 'other',
1470
+ 'app_store',
1471
+ 'play_store',
1472
+ 'custom',
1473
+ ]),
1474
+ date: zod_1.z.number().int().optional(),
1475
+ reference_number: zod_1.z.string().max(100).min(1).optional(),
1476
+ });
1136
1477
  const ImportInvoiceInvoicePaymentsSchema = zod_1.z.object({
1137
1478
  id: zod_1.z.array(zod_1.z.string().max(40).optional()).optional(),
1138
1479
  amount: zod_1.z.array(zod_1.z.number().int().min(1).optional()),
@@ -1145,17 +1486,25 @@ const ImportInvoiceInvoicePaymentsSchema = zod_1.z.object({
1145
1486
  'app_store',
1146
1487
  'play_store',
1147
1488
  'custom',
1148
- 'tamara',
1149
- 'qpay',
1150
- 'blik',
1151
- 'fpx',
1152
- 'wero',
1153
- 'p24',
1154
1489
  ])
1155
1490
  .optional()),
1156
1491
  date: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
1157
1492
  reference_number: zod_1.z.array(zod_1.z.string().max(100).min(1).optional()).optional(),
1158
1493
  });
1494
+ const ImportInvoiceInvoiceNotesItemSchema = zod_1.z.object({
1495
+ entity_type: zod_1.z
1496
+ .enum([
1497
+ 'coupon',
1498
+ 'plan_item_price',
1499
+ 'addon_item_price',
1500
+ 'charge_item_price',
1501
+ 'plan',
1502
+ 'addon',
1503
+ ])
1504
+ .optional(),
1505
+ entity_id: zod_1.z.string().max(50).optional(),
1506
+ note: zod_1.z.string().max(65000).optional(),
1507
+ });
1159
1508
  const ImportInvoiceInvoiceNotesSchema = zod_1.z.object({
1160
1509
  entity_type: zod_1.z
1161
1510
  .array(zod_1.z
@@ -1172,6 +1521,25 @@ const ImportInvoiceInvoiceNotesSchema = zod_1.z.object({
1172
1521
  entity_id: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
1173
1522
  note: zod_1.z.array(zod_1.z.string().max(65000).optional()).optional(),
1174
1523
  });
1524
+ const ImportInvoiceInvoiceLineItemAddressesItemSchema = zod_1.z.object({
1525
+ line_item_id: zod_1.z.string().max(40).optional(),
1526
+ first_name: zod_1.z.string().max(150).optional(),
1527
+ last_name: zod_1.z.string().max(150).optional(),
1528
+ email: zod_1.z.string().email().max(70).optional(),
1529
+ company: zod_1.z.string().max(250).optional(),
1530
+ phone: zod_1.z.string().max(50).optional(),
1531
+ line1: zod_1.z.string().max(150).optional(),
1532
+ line2: zod_1.z.string().max(150).optional(),
1533
+ line3: zod_1.z.string().max(150).optional(),
1534
+ city: zod_1.z.string().max(50).optional(),
1535
+ state_code: zod_1.z.string().max(50).optional(),
1536
+ state: zod_1.z.string().max(50).optional(),
1537
+ zip: zod_1.z.string().max(20).optional(),
1538
+ country: zod_1.z.string().max(50).optional(),
1539
+ validation_status: zod_1.z
1540
+ .enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
1541
+ .optional(),
1542
+ });
1175
1543
  const ImportInvoiceInvoiceLineItemAddressesSchema = zod_1.z.object({
1176
1544
  line_item_id: zod_1.z.array(zod_1.z.string().max(40).optional()).optional(),
1177
1545
  first_name: zod_1.z.array(zod_1.z.string().max(150).optional()).optional(),
@@ -1234,41 +1602,110 @@ const ImportInvoiceInvoiceBodySchema = zod_1.z.looseObject({
1234
1602
  credit_note: ImportInvoiceInvoiceCreditNoteSchema.optional(),
1235
1603
  billing_address: ImportInvoiceInvoiceBillingAddressSchema.optional(),
1236
1604
  shipping_address: ImportInvoiceInvoiceShippingAddressSchema.optional(),
1237
- line_items: ImportInvoiceInvoiceLineItemsSchema.optional(),
1238
- payment_reference_numbers: ImportInvoiceInvoicePaymentReferenceNumbersSchema.optional(),
1239
- line_item_tiers: ImportInvoiceInvoiceLineItemTiersSchema.optional(),
1240
- discounts: ImportInvoiceInvoiceDiscountsSchema.optional(),
1241
- taxes: ImportInvoiceInvoiceTaxesSchema.optional(),
1242
- payments: ImportInvoiceInvoicePaymentsSchema.optional(),
1243
- notes: ImportInvoiceInvoiceNotesSchema.optional(),
1244
- line_item_addresses: ImportInvoiceInvoiceLineItemAddressesSchema.optional(),
1605
+ line_items: zod_1.z
1606
+ .union([
1607
+ zod_1.z.array(ImportInvoiceInvoiceLineItemsItemSchema.optional()),
1608
+ ImportInvoiceInvoiceLineItemsSchema,
1609
+ ])
1610
+ .optional(),
1611
+ payment_reference_numbers: zod_1.z
1612
+ .union([
1613
+ zod_1.z.array(ImportInvoiceInvoicePaymentReferenceNumbersItemSchema.optional()),
1614
+ ImportInvoiceInvoicePaymentReferenceNumbersSchema,
1615
+ ])
1616
+ .optional(),
1617
+ line_item_tiers: zod_1.z
1618
+ .union([
1619
+ zod_1.z.array(ImportInvoiceInvoiceLineItemTiersItemSchema.optional()),
1620
+ ImportInvoiceInvoiceLineItemTiersSchema,
1621
+ ])
1622
+ .optional(),
1623
+ discounts: zod_1.z
1624
+ .union([
1625
+ zod_1.z.array(ImportInvoiceInvoiceDiscountsItemSchema.optional()),
1626
+ ImportInvoiceInvoiceDiscountsSchema,
1627
+ ])
1628
+ .optional(),
1629
+ taxes: zod_1.z
1630
+ .union([
1631
+ zod_1.z.array(ImportInvoiceInvoiceTaxesItemSchema.optional()),
1632
+ ImportInvoiceInvoiceTaxesSchema,
1633
+ ])
1634
+ .optional(),
1635
+ payments: zod_1.z
1636
+ .union([
1637
+ zod_1.z.array(ImportInvoiceInvoicePaymentsItemSchema.optional()),
1638
+ ImportInvoiceInvoicePaymentsSchema,
1639
+ ])
1640
+ .optional(),
1641
+ notes: zod_1.z
1642
+ .union([
1643
+ zod_1.z.array(ImportInvoiceInvoiceNotesItemSchema.optional()),
1644
+ ImportInvoiceInvoiceNotesSchema,
1645
+ ])
1646
+ .optional(),
1647
+ line_item_addresses: zod_1.z
1648
+ .union([
1649
+ zod_1.z.array(ImportInvoiceInvoiceLineItemAddressesItemSchema.optional()),
1650
+ ImportInvoiceInvoiceLineItemAddressesSchema,
1651
+ ])
1652
+ .optional(),
1245
1653
  });
1246
1654
  exports.ImportInvoiceInvoiceBodySchema = ImportInvoiceInvoiceBodySchema;
1247
1655
  //Invoice.applyPayments
1656
+ const ApplyPaymentsInvoiceTransactionsItemSchema = zod_1.z.object({
1657
+ id: zod_1.z.string().max(40).optional(),
1658
+ amount: zod_1.z.number().int().min(0).optional(),
1659
+ });
1248
1660
  const ApplyPaymentsInvoiceTransactionsSchema = zod_1.z.object({
1249
1661
  id: zod_1.z.array(zod_1.z.string().max(40).optional()).optional(),
1250
1662
  amount: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
1251
1663
  });
1252
1664
  const ApplyPaymentsInvoiceBodySchema = zod_1.z.looseObject({
1253
1665
  comment: zod_1.z.string().max(300).optional(),
1254
- transactions: ApplyPaymentsInvoiceTransactionsSchema.optional(),
1666
+ transactions: zod_1.z
1667
+ .union([
1668
+ zod_1.z.array(ApplyPaymentsInvoiceTransactionsItemSchema.optional()),
1669
+ ApplyPaymentsInvoiceTransactionsSchema,
1670
+ ])
1671
+ .optional(),
1255
1672
  });
1256
1673
  exports.ApplyPaymentsInvoiceBodySchema = ApplyPaymentsInvoiceBodySchema;
1257
1674
  //Invoice.deleteLineItems
1675
+ const DeleteLineItemsInvoiceLineItemsItemSchema = zod_1.z.object({
1676
+ id: zod_1.z.string().max(40).optional(),
1677
+ });
1258
1678
  const DeleteLineItemsInvoiceLineItemsSchema = zod_1.z.object({
1259
1679
  id: zod_1.z.array(zod_1.z.string().max(40).optional()).optional(),
1260
1680
  });
1261
1681
  const DeleteLineItemsInvoiceBodySchema = zod_1.z.looseObject({
1262
- line_items: DeleteLineItemsInvoiceLineItemsSchema.optional(),
1682
+ line_items: zod_1.z
1683
+ .union([
1684
+ zod_1.z.array(DeleteLineItemsInvoiceLineItemsItemSchema.optional()),
1685
+ DeleteLineItemsInvoiceLineItemsSchema,
1686
+ ])
1687
+ .optional(),
1263
1688
  });
1264
1689
  exports.DeleteLineItemsInvoiceBodySchema = DeleteLineItemsInvoiceBodySchema;
1265
1690
  //Invoice.applyCredits
1691
+ const ApplyCreditsInvoiceCreditNotesItemSchema = zod_1.z.object({
1692
+ id: zod_1.z.string().max(50).optional(),
1693
+ amount: zod_1.z.number().int().min(1).optional(),
1694
+ applied_at: zod_1.z.number().int().optional(),
1695
+ });
1266
1696
  const ApplyCreditsInvoiceCreditNotesSchema = zod_1.z.object({
1267
1697
  id: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
1698
+ amount: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
1699
+ applied_at: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
1268
1700
  });
1269
1701
  const ApplyCreditsInvoiceBodySchema = zod_1.z.looseObject({
1270
1702
  comment: zod_1.z.string().max(300).optional(),
1271
- credit_notes: ApplyCreditsInvoiceCreditNotesSchema.optional(),
1703
+ credit_notes: zod_1.z
1704
+ .union([
1705
+ zod_1.z.array(ApplyCreditsInvoiceCreditNotesItemSchema.optional()),
1706
+ ApplyCreditsInvoiceCreditNotesSchema,
1707
+ ])
1708
+ .optional(),
1272
1709
  });
1273
1710
  exports.ApplyCreditsInvoiceBodySchema = ApplyCreditsInvoiceBodySchema;
1274
1711
  //Invoice.list
@@ -1276,26 +1713,56 @@ const ListInvoiceIdSchema = zod_1.z.object({
1276
1713
  is: zod_1.z.string().min(1).optional(),
1277
1714
  is_not: zod_1.z.string().min(1).optional(),
1278
1715
  starts_with: zod_1.z.string().min(1).optional(),
1279
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
1280
- not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
1716
+ in: zod_1.z
1717
+ .union([
1718
+ zod_1.z.array(zod_1.z.string().optional()),
1719
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
1720
+ ])
1721
+ .optional(),
1722
+ not_in: zod_1.z
1723
+ .union([
1724
+ zod_1.z.array(zod_1.z.string().optional()),
1725
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
1726
+ ])
1727
+ .optional(),
1281
1728
  });
1282
1729
  const ListInvoiceSubscriptionIdSchema = zod_1.z.object({
1283
1730
  is: zod_1.z.string().min(1).optional(),
1284
1731
  is_not: zod_1.z.string().min(1).optional(),
1285
1732
  starts_with: zod_1.z.string().min(1).optional(),
1286
- is_present: zod_1.z.enum(['true', 'false']).optional(),
1287
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
1288
- not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
1733
+ is_present: zod_1.z.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])]).optional(),
1734
+ in: zod_1.z
1735
+ .union([
1736
+ zod_1.z.array(zod_1.z.string().optional()),
1737
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
1738
+ ])
1739
+ .optional(),
1740
+ not_in: zod_1.z
1741
+ .union([
1742
+ zod_1.z.array(zod_1.z.string().optional()),
1743
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
1744
+ ])
1745
+ .optional(),
1289
1746
  });
1290
1747
  const ListInvoiceCustomerIdSchema = zod_1.z.object({
1291
1748
  is: zod_1.z.string().min(1).optional(),
1292
1749
  is_not: zod_1.z.string().min(1).optional(),
1293
1750
  starts_with: zod_1.z.string().min(1).optional(),
1294
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
1295
- not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
1751
+ in: zod_1.z
1752
+ .union([
1753
+ zod_1.z.array(zod_1.z.string().optional()),
1754
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
1755
+ ])
1756
+ .optional(),
1757
+ not_in: zod_1.z
1758
+ .union([
1759
+ zod_1.z.array(zod_1.z.string().optional()),
1760
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
1761
+ ])
1762
+ .optional(),
1296
1763
  });
1297
1764
  const ListInvoiceRecurringSchema = zod_1.z.object({
1298
- is: zod_1.z.enum(['true', 'false']).optional(),
1765
+ is: zod_1.z.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])]).optional(),
1299
1766
  });
1300
1767
  const ListInvoiceStatusSchema = zod_1.z.object({
1301
1768
  is: zod_1.z
@@ -1305,113 +1772,330 @@ const ListInvoiceStatusSchema = zod_1.z.object({
1305
1772
  .enum(['paid', 'posted', 'payment_due', 'not_paid', 'voided', 'pending'])
1306
1773
  .optional(),
1307
1774
  in: zod_1.z
1308
- .enum(['paid', 'posted', 'payment_due', 'not_paid', 'voided', 'pending'])
1775
+ .union([
1776
+ zod_1.z.array(zod_1.z
1777
+ .enum([
1778
+ 'paid',
1779
+ 'posted',
1780
+ 'payment_due',
1781
+ 'not_paid',
1782
+ 'voided',
1783
+ 'pending',
1784
+ ])
1785
+ .optional()),
1786
+ zod_1.z.enum([
1787
+ 'paid',
1788
+ 'posted',
1789
+ 'payment_due',
1790
+ 'not_paid',
1791
+ 'voided',
1792
+ 'pending',
1793
+ ]),
1794
+ ])
1309
1795
  .optional(),
1310
1796
  not_in: zod_1.z
1311
- .enum(['paid', 'posted', 'payment_due', 'not_paid', 'voided', 'pending'])
1797
+ .union([
1798
+ zod_1.z.array(zod_1.z
1799
+ .enum([
1800
+ 'paid',
1801
+ 'posted',
1802
+ 'payment_due',
1803
+ 'not_paid',
1804
+ 'voided',
1805
+ 'pending',
1806
+ ])
1807
+ .optional()),
1808
+ zod_1.z.enum([
1809
+ 'paid',
1810
+ 'posted',
1811
+ 'payment_due',
1812
+ 'not_paid',
1813
+ 'voided',
1814
+ 'pending',
1815
+ ]),
1816
+ ])
1312
1817
  .optional(),
1313
1818
  });
1314
1819
  const ListInvoicePriceTypeSchema = zod_1.z.object({
1315
1820
  is: zod_1.z.enum(['tax_exclusive', 'tax_inclusive']).optional(),
1316
1821
  is_not: zod_1.z.enum(['tax_exclusive', 'tax_inclusive']).optional(),
1317
- in: zod_1.z.enum(['tax_exclusive', 'tax_inclusive']).optional(),
1318
- not_in: zod_1.z.enum(['tax_exclusive', 'tax_inclusive']).optional(),
1822
+ in: zod_1.z
1823
+ .union([
1824
+ zod_1.z.array(zod_1.z.enum(['tax_exclusive', 'tax_inclusive']).optional()),
1825
+ zod_1.z.enum(['tax_exclusive', 'tax_inclusive']),
1826
+ ])
1827
+ .optional(),
1828
+ not_in: zod_1.z
1829
+ .union([
1830
+ zod_1.z.array(zod_1.z.enum(['tax_exclusive', 'tax_inclusive']).optional()),
1831
+ zod_1.z.enum(['tax_exclusive', 'tax_inclusive']),
1832
+ ])
1833
+ .optional(),
1319
1834
  });
1320
1835
  const ListInvoiceDateSchema = zod_1.z.object({
1321
- after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
1322
- before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
1323
- on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
1324
- between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
1836
+ after: zod_1.z
1837
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
1838
+ .optional(),
1839
+ before: zod_1.z
1840
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
1841
+ .optional(),
1842
+ on: zod_1.z
1843
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
1844
+ .optional(),
1845
+ between: zod_1.z
1846
+ .union([
1847
+ zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
1848
+ zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
1849
+ ])
1850
+ .optional(),
1325
1851
  });
1326
1852
  const ListInvoicePaidAtSchema = zod_1.z.object({
1327
- after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
1328
- before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
1329
- on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
1330
- between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
1853
+ after: zod_1.z
1854
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
1855
+ .optional(),
1856
+ before: zod_1.z
1857
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
1858
+ .optional(),
1859
+ on: zod_1.z
1860
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
1861
+ .optional(),
1862
+ between: zod_1.z
1863
+ .union([
1864
+ zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
1865
+ zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
1866
+ ])
1867
+ .optional(),
1331
1868
  });
1332
1869
  const ListInvoiceTotalSchema = zod_1.z.object({
1333
- is: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
1334
- is_not: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
1335
- lt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
1336
- lte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
1337
- gt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
1338
- gte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
1339
- between: zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')).optional(),
1870
+ is: zod_1.z
1871
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
1872
+ .optional(),
1873
+ is_not: zod_1.z
1874
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
1875
+ .optional(),
1876
+ lt: zod_1.z
1877
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
1878
+ .optional(),
1879
+ lte: zod_1.z
1880
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
1881
+ .optional(),
1882
+ gt: zod_1.z
1883
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
1884
+ .optional(),
1885
+ gte: zod_1.z
1886
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
1887
+ .optional(),
1888
+ between: zod_1.z
1889
+ .union([
1890
+ zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
1891
+ zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')),
1892
+ ])
1893
+ .optional(),
1340
1894
  });
1341
1895
  const ListInvoiceAmountPaidSchema = zod_1.z.object({
1342
- is: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
1343
- is_not: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
1344
- lt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
1345
- lte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
1346
- gt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
1347
- gte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
1348
- between: zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')).optional(),
1896
+ is: zod_1.z
1897
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
1898
+ .optional(),
1899
+ is_not: zod_1.z
1900
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
1901
+ .optional(),
1902
+ lt: zod_1.z
1903
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
1904
+ .optional(),
1905
+ lte: zod_1.z
1906
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
1907
+ .optional(),
1908
+ gt: zod_1.z
1909
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
1910
+ .optional(),
1911
+ gte: zod_1.z
1912
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
1913
+ .optional(),
1914
+ between: zod_1.z
1915
+ .union([
1916
+ zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
1917
+ zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')),
1918
+ ])
1919
+ .optional(),
1349
1920
  });
1350
1921
  const ListInvoiceAmountAdjustedSchema = zod_1.z.object({
1351
- is: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
1352
- is_not: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
1353
- lt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
1354
- lte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
1355
- gt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
1356
- gte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
1357
- between: zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')).optional(),
1922
+ is: zod_1.z
1923
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
1924
+ .optional(),
1925
+ is_not: zod_1.z
1926
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
1927
+ .optional(),
1928
+ lt: zod_1.z
1929
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
1930
+ .optional(),
1931
+ lte: zod_1.z
1932
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
1933
+ .optional(),
1934
+ gt: zod_1.z
1935
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
1936
+ .optional(),
1937
+ gte: zod_1.z
1938
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
1939
+ .optional(),
1940
+ between: zod_1.z
1941
+ .union([
1942
+ zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
1943
+ zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')),
1944
+ ])
1945
+ .optional(),
1358
1946
  });
1359
1947
  const ListInvoiceCreditsAppliedSchema = zod_1.z.object({
1360
- is: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
1361
- is_not: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
1362
- lt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
1363
- lte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
1364
- gt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
1365
- gte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
1366
- between: zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')).optional(),
1948
+ is: zod_1.z
1949
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
1950
+ .optional(),
1951
+ is_not: zod_1.z
1952
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
1953
+ .optional(),
1954
+ lt: zod_1.z
1955
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
1956
+ .optional(),
1957
+ lte: zod_1.z
1958
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
1959
+ .optional(),
1960
+ gt: zod_1.z
1961
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
1962
+ .optional(),
1963
+ gte: zod_1.z
1964
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
1965
+ .optional(),
1966
+ between: zod_1.z
1967
+ .union([
1968
+ zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
1969
+ zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')),
1970
+ ])
1971
+ .optional(),
1367
1972
  });
1368
1973
  const ListInvoiceAmountDueSchema = zod_1.z.object({
1369
- is: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
1370
- is_not: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
1371
- lt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
1372
- lte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
1373
- gt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
1374
- gte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
1375
- between: zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')).optional(),
1974
+ is: zod_1.z
1975
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
1976
+ .optional(),
1977
+ is_not: zod_1.z
1978
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
1979
+ .optional(),
1980
+ lt: zod_1.z
1981
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
1982
+ .optional(),
1983
+ lte: zod_1.z
1984
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
1985
+ .optional(),
1986
+ gt: zod_1.z
1987
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
1988
+ .optional(),
1989
+ gte: zod_1.z
1990
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
1991
+ .optional(),
1992
+ between: zod_1.z
1993
+ .union([
1994
+ zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
1995
+ zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')),
1996
+ ])
1997
+ .optional(),
1376
1998
  });
1377
1999
  const ListInvoiceDunningStatusSchema = zod_1.z.object({
1378
2000
  is: zod_1.z.enum(['in_progress', 'exhausted', 'stopped', 'success']).optional(),
1379
2001
  is_not: zod_1.z.enum(['in_progress', 'exhausted', 'stopped', 'success']).optional(),
1380
- in: zod_1.z.enum(['in_progress', 'exhausted', 'stopped', 'success']).optional(),
1381
- not_in: zod_1.z.enum(['in_progress', 'exhausted', 'stopped', 'success']).optional(),
1382
- is_present: zod_1.z.enum(['true', 'false']).optional(),
2002
+ in: zod_1.z
2003
+ .union([
2004
+ zod_1.z.array(zod_1.z.enum(['in_progress', 'exhausted', 'stopped', 'success']).optional()),
2005
+ zod_1.z.enum(['in_progress', 'exhausted', 'stopped', 'success']),
2006
+ ])
2007
+ .optional(),
2008
+ not_in: zod_1.z
2009
+ .union([
2010
+ zod_1.z.array(zod_1.z.enum(['in_progress', 'exhausted', 'stopped', 'success']).optional()),
2011
+ zod_1.z.enum(['in_progress', 'exhausted', 'stopped', 'success']),
2012
+ ])
2013
+ .optional(),
2014
+ is_present: zod_1.z.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])]).optional(),
1383
2015
  });
1384
2016
  const ListInvoicePaymentOwnerSchema = zod_1.z.object({
1385
2017
  is: zod_1.z.string().min(1).optional(),
1386
2018
  is_not: zod_1.z.string().min(1).optional(),
1387
2019
  starts_with: zod_1.z.string().min(1).optional(),
1388
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
1389
- not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
2020
+ in: zod_1.z
2021
+ .union([
2022
+ zod_1.z.array(zod_1.z.string().optional()),
2023
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
2024
+ ])
2025
+ .optional(),
2026
+ not_in: zod_1.z
2027
+ .union([
2028
+ zod_1.z.array(zod_1.z.string().optional()),
2029
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
2030
+ ])
2031
+ .optional(),
1390
2032
  });
1391
2033
  const ListInvoiceUpdatedAtSchema = zod_1.z.object({
1392
- after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
1393
- before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
1394
- on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
1395
- between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
2034
+ after: zod_1.z
2035
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
2036
+ .optional(),
2037
+ before: zod_1.z
2038
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
2039
+ .optional(),
2040
+ on: zod_1.z
2041
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
2042
+ .optional(),
2043
+ between: zod_1.z
2044
+ .union([
2045
+ zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
2046
+ zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
2047
+ ])
2048
+ .optional(),
1396
2049
  });
1397
2050
  const ListInvoiceChannelSchema = zod_1.z.object({
1398
2051
  is: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
1399
2052
  is_not: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
1400
- in: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
1401
- not_in: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
2053
+ in: zod_1.z
2054
+ .union([
2055
+ zod_1.z.array(zod_1.z.enum(['web', 'app_store', 'play_store']).optional()),
2056
+ zod_1.z.enum(['web', 'app_store', 'play_store']),
2057
+ ])
2058
+ .optional(),
2059
+ not_in: zod_1.z
2060
+ .union([
2061
+ zod_1.z.array(zod_1.z.enum(['web', 'app_store', 'play_store']).optional()),
2062
+ zod_1.z.enum(['web', 'app_store', 'play_store']),
2063
+ ])
2064
+ .optional(),
1402
2065
  });
1403
2066
  const ListInvoiceVoidedAtSchema = zod_1.z.object({
1404
- after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
1405
- before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
1406
- on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
1407
- between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
2067
+ after: zod_1.z
2068
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
2069
+ .optional(),
2070
+ before: zod_1.z
2071
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
2072
+ .optional(),
2073
+ on: zod_1.z
2074
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
2075
+ .optional(),
2076
+ between: zod_1.z
2077
+ .union([
2078
+ zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
2079
+ zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
2080
+ ])
2081
+ .optional(),
1408
2082
  });
1409
2083
  const ListInvoiceVoidReasonCodeSchema = zod_1.z.object({
1410
2084
  is: zod_1.z.string().min(1).optional(),
1411
2085
  is_not: zod_1.z.string().min(1).optional(),
1412
2086
  starts_with: zod_1.z.string().min(1).optional(),
1413
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
1414
- not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
2087
+ in: zod_1.z
2088
+ .union([
2089
+ zod_1.z.array(zod_1.z.string().optional()),
2090
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
2091
+ ])
2092
+ .optional(),
2093
+ not_in: zod_1.z
2094
+ .union([
2095
+ zod_1.z.array(zod_1.z.string().optional()),
2096
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
2097
+ ])
2098
+ .optional(),
1415
2099
  });
1416
2100
  const ListInvoiceSortBySchema = zod_1.z.looseObject({
1417
2101
  asc: zod_1.z.enum(['date', 'updated_at']).optional(),
@@ -1484,23 +2168,31 @@ const PdfInvoiceBodySchema = zod_1.z.looseObject({
1484
2168
  exports.PdfInvoiceBodySchema = PdfInvoiceBodySchema;
1485
2169
  //Invoice.listPaymentReferenceNumbers
1486
2170
  const ListPaymentReferenceNumbersInvoiceIdSchema = zod_1.z.object({
2171
+ in: zod_1.z
2172
+ .union([
2173
+ zod_1.z.array(zod_1.z.string().optional()),
2174
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
2175
+ ])
2176
+ .optional(),
1487
2177
  is: zod_1.z.string().min(1).optional(),
1488
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
1489
2178
  });
1490
2179
  const ListPaymentReferenceNumbersInvoiceNumberSchema = zod_1.z.object({
2180
+ in: zod_1.z
2181
+ .union([
2182
+ zod_1.z.array(zod_1.z.string().optional()),
2183
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
2184
+ ])
2185
+ .optional(),
1491
2186
  is: zod_1.z.string().min(1).optional(),
1492
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
1493
2187
  });
1494
- const ListPaymentReferenceNumbersInvoicePaymentReferenceNumberItemSchema = zod_1.z.object({
2188
+ const ListPaymentReferenceNumbersInvoicePaymentReferenceNumberSchema = zod_1.z.object({
1495
2189
  number: ListPaymentReferenceNumbersInvoiceNumberSchema.optional(),
1496
2190
  });
1497
2191
  const ListPaymentReferenceNumbersInvoiceBodySchema = zod_1.z.looseObject({
1498
2192
  limit: zod_1.z.number().int().min(1).max(100).optional(),
1499
2193
  offset: zod_1.z.string().max(1000).optional(),
1500
2194
  id: ListPaymentReferenceNumbersInvoiceIdSchema.optional(),
1501
- payment_reference_number: zod_1.z
1502
- .array(ListPaymentReferenceNumbersInvoicePaymentReferenceNumberItemSchema.optional())
1503
- .optional(),
2195
+ payment_reference_number: ListPaymentReferenceNumbersInvoicePaymentReferenceNumberSchema.optional(),
1504
2196
  });
1505
2197
  exports.ListPaymentReferenceNumbersInvoiceBodySchema = ListPaymentReferenceNumbersInvoiceBodySchema;
1506
2198
  //Invoice.addCharge
@@ -1550,6 +2242,16 @@ const AddChargeItemInvoiceItemPriceSchema = zod_1.z.object({
1550
2242
  date_from: zod_1.z.number().int().optional(),
1551
2243
  date_to: zod_1.z.number().int().optional(),
1552
2244
  });
2245
+ const AddChargeItemInvoiceItemTiersItemSchema = zod_1.z.object({
2246
+ starting_unit: zod_1.z.number().int().min(1).optional(),
2247
+ ending_unit: zod_1.z.number().int().optional(),
2248
+ price: zod_1.z.number().int().min(0).optional(),
2249
+ starting_unit_in_decimal: zod_1.z.string().max(33).optional(),
2250
+ ending_unit_in_decimal: zod_1.z.string().max(33).optional(),
2251
+ price_in_decimal: zod_1.z.string().max(39).optional(),
2252
+ pricing_type: zod_1.z.enum(['per_unit', 'flat_fee', 'package']).optional(),
2253
+ package_size: zod_1.z.number().int().min(1).optional(),
2254
+ });
1553
2255
  const AddChargeItemInvoiceItemTiersSchema = zod_1.z.object({
1554
2256
  starting_unit: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
1555
2257
  ending_unit: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
@@ -1566,10 +2268,30 @@ const AddChargeItemInvoiceBodySchema = zod_1.z.looseObject({
1566
2268
  comment: zod_1.z.string().max(300).optional(),
1567
2269
  subscription_id: zod_1.z.string().max(50).optional(),
1568
2270
  item_price: AddChargeItemInvoiceItemPriceSchema.optional(),
1569
- item_tiers: AddChargeItemInvoiceItemTiersSchema.optional(),
2271
+ item_tiers: zod_1.z
2272
+ .union([
2273
+ zod_1.z.array(AddChargeItemInvoiceItemTiersItemSchema.optional()),
2274
+ AddChargeItemInvoiceItemTiersSchema,
2275
+ ])
2276
+ .optional(),
1570
2277
  });
1571
2278
  exports.AddChargeItemInvoiceBodySchema = AddChargeItemInvoiceBodySchema;
1572
2279
  //Invoice.close
2280
+ const CloseInvoiceNotesToRemoveItemSchema = zod_1.z.object({
2281
+ entity_type: zod_1.z
2282
+ .enum([
2283
+ 'customer',
2284
+ 'subscription',
2285
+ 'coupon',
2286
+ 'plan_item_price',
2287
+ 'addon_item_price',
2288
+ 'charge_item_price',
2289
+ 'plan',
2290
+ 'addon',
2291
+ ])
2292
+ .optional(),
2293
+ entity_id: zod_1.z.string().max(100).optional(),
2294
+ });
1573
2295
  const CloseInvoiceNotesToRemoveSchema = zod_1.z.object({
1574
2296
  entity_type: zod_1.z
1575
2297
  .array(zod_1.z
@@ -1592,7 +2314,12 @@ const CloseInvoiceBodySchema = zod_1.z.looseObject({
1592
2314
  invoice_note: zod_1.z.string().max(2000).optional(),
1593
2315
  remove_general_note: zod_1.z.boolean().default(false).optional(),
1594
2316
  invoice_date: zod_1.z.number().int().optional(),
1595
- notes_to_remove: CloseInvoiceNotesToRemoveSchema.optional(),
2317
+ notes_to_remove: zod_1.z
2318
+ .union([
2319
+ zod_1.z.array(CloseInvoiceNotesToRemoveItemSchema.optional()),
2320
+ CloseInvoiceNotesToRemoveSchema,
2321
+ ])
2322
+ .optional(),
1596
2323
  });
1597
2324
  exports.CloseInvoiceBodySchema = CloseInvoiceBodySchema;
1598
2325
  //Invoice.collectPayment
@@ -1615,12 +2342,6 @@ const RecordPaymentInvoiceTransactionSchema = zod_1.z.object({
1615
2342
  'app_store',
1616
2343
  'play_store',
1617
2344
  'custom',
1618
- 'tamara',
1619
- 'qpay',
1620
- 'blik',
1621
- 'fpx',
1622
- 'wero',
1623
- 'p24',
1624
2345
  ]),
1625
2346
  reference_number: zod_1.z.string().max(100).optional(),
1626
2347
  custom_payment_method_id: zod_1.z.string().max(50).optional(),
@@ -1687,12 +2408,6 @@ const RecordRefundInvoiceTransactionSchema = zod_1.z.object({
1687
2408
  'app_store',
1688
2409
  'play_store',
1689
2410
  'custom',
1690
- 'tamara',
1691
- 'qpay',
1692
- 'blik',
1693
- 'fpx',
1694
- 'wero',
1695
- 'p24',
1696
2411
  ]),
1697
2412
  reference_number: zod_1.z.string().max(100).optional(),
1698
2413
  custom_payment_method_id: zod_1.z.string().max(50).optional(),
@@ -1814,3 +2529,8 @@ const ApplyPaymentScheduleSchemeInvoiceBodySchema = zod_1.z.looseObject({
1814
2529
  amount: zod_1.z.number().int().min(0).optional(),
1815
2530
  });
1816
2531
  exports.ApplyPaymentScheduleSchemeInvoiceBodySchema = ApplyPaymentScheduleSchemeInvoiceBodySchema;
2532
+ //Invoice.removePaymentScheduleScheme
2533
+ const RemovePaymentScheduleSchemeInvoiceBodySchema = zod_1.z.looseObject({
2534
+ comment: zod_1.z.string().max(300).optional(),
2535
+ });
2536
+ exports.RemovePaymentScheduleSchemeInvoiceBodySchema = RemovePaymentScheduleSchemeInvoiceBodySchema;