chargebee 2.40.0 → 3.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/CHANGELOG.md +10 -1
  2. package/LICENSE +1 -1
  3. package/README.md +90 -172
  4. package/cjs/RequestWrapper.js +81 -0
  5. package/cjs/asyncApiSupport.js +39 -0
  6. package/cjs/chargebee.cjs.js +13 -0
  7. package/cjs/chargebee.cjs.worker.js +9 -0
  8. package/cjs/chargebeeError.js +17 -0
  9. package/cjs/coreCommon.js +72 -0
  10. package/cjs/createChargebee.js +92 -0
  11. package/cjs/environment.js +18 -0
  12. package/cjs/filter.js +1 -0
  13. package/cjs/net/ClientInterface.js +40 -0
  14. package/cjs/net/FetchClient.js +86 -0
  15. package/cjs/net/NodeClient.js +61 -0
  16. package/cjs/package.json +1 -0
  17. package/cjs/resources/api_endpoints.js +1086 -0
  18. package/cjs/util.js +218 -0
  19. package/esm/RequestWrapper.js +77 -0
  20. package/esm/asyncApiSupport.js +35 -0
  21. package/esm/chargebee.esm.js +9 -0
  22. package/esm/chargebee.esm.worker.js +5 -0
  23. package/esm/chargebeeError.js +13 -0
  24. package/esm/coreCommon.js +67 -0
  25. package/esm/createChargebee.js +88 -0
  26. package/esm/environment.js +15 -0
  27. package/esm/filter.js +1 -0
  28. package/esm/net/ClientInterface.js +35 -0
  29. package/esm/net/FetchClient.js +81 -0
  30. package/esm/net/NodeClient.js +56 -0
  31. package/esm/package.json +1 -0
  32. package/esm/resources/api_endpoints.js +1083 -0
  33. package/esm/util.js +202 -0
  34. package/package.json +69 -38
  35. package/types/core.d.ts +558 -89
  36. package/types/index.d.ts +91 -54
  37. package/types/resources/Address.d.ts +57 -272
  38. package/types/resources/AdvanceInvoiceSchedule.d.ts +21 -94
  39. package/types/resources/AttachedItem.d.ts +91 -329
  40. package/types/resources/Attribute.d.ts +5 -5
  41. package/types/resources/BusinessEntity.d.ts +49 -69
  42. package/types/resources/BusinessEntityTransfer.d.ts +11 -17
  43. package/types/resources/Card.d.ts +146 -424
  44. package/types/resources/Comment.d.ts +72 -189
  45. package/types/resources/Contact.d.ts +12 -64
  46. package/types/resources/ContractTerm.d.ts +15 -96
  47. package/types/resources/Coupon.d.ts +282 -758
  48. package/types/resources/CouponCode.d.ts +56 -52
  49. package/types/resources/CouponSet.d.ts +92 -234
  50. package/types/resources/CreditNote.d.ts +588 -1758
  51. package/types/resources/CreditNoteEstimate.d.ts +131 -157
  52. package/types/resources/Currency.d.ts +75 -62
  53. package/types/resources/Customer.d.ts +892 -835
  54. package/types/resources/CustomerEntitlement.d.ts +36 -0
  55. package/types/resources/DifferentialPrice.d.ts +116 -314
  56. package/types/resources/Discount.d.ts +20 -125
  57. package/types/resources/Download.d.ts +6 -22
  58. package/types/resources/Entitlement.d.ts +51 -160
  59. package/types/resources/EntitlementOverride.d.ts +58 -139
  60. package/types/resources/Estimate.d.ts +1178 -527
  61. package/types/resources/Event.d.ts +67 -178
  62. package/types/resources/Export.d.ts +563 -723
  63. package/types/resources/Feature.d.ts +117 -433
  64. package/types/resources/GatewayErrorDetail.d.ts +16 -72
  65. package/types/resources/Gift.d.ts +265 -432
  66. package/types/resources/Hierarchy.d.ts +8 -36
  67. package/types/resources/HostedPage.d.ts +1017 -1153
  68. package/types/resources/ImpactedItem.d.ts +13 -50
  69. package/types/resources/ImpactedItemPrice.d.ts +13 -15
  70. package/types/resources/ImpactedSubscription.d.ts +13 -45
  71. package/types/resources/InAppSubscription.d.ts +93 -389
  72. package/types/resources/Installment.d.ts +35 -110
  73. package/types/resources/InstallmentConfig.d.ts +54 -155
  74. package/types/resources/InstallmentDetail.d.ts +19 -27
  75. package/types/resources/Invoice.d.ts +1574 -3157
  76. package/types/resources/InvoiceEstimate.d.ts +131 -161
  77. package/types/resources/Item.d.ts +133 -611
  78. package/types/resources/ItemEntitlement.d.ts +78 -215
  79. package/types/resources/ItemFamily.d.ts +69 -178
  80. package/types/resources/ItemPrice.d.ts +291 -1203
  81. package/types/resources/Metadata.d.ts +3 -5
  82. package/types/resources/Order.d.ts +538 -1471
  83. package/types/resources/PaymentIntent.d.ts +163 -347
  84. package/types/resources/PaymentReferenceNumber.d.ts +7 -29
  85. package/types/resources/PaymentSource.d.ts +476 -1272
  86. package/types/resources/PaymentVoucher.d.ts +87 -306
  87. package/types/resources/PortalSession.d.ts +71 -207
  88. package/types/resources/PriceVariant.d.ts +91 -279
  89. package/types/resources/PricingPageSession.d.ts +92 -41
  90. package/types/resources/PromotionalCredit.d.ts +90 -346
  91. package/types/resources/Purchase.d.ts +185 -315
  92. package/types/resources/Quote.d.ts +1406 -887
  93. package/types/resources/QuoteLineGroup.d.ts +125 -452
  94. package/types/resources/QuotedCharge.d.ts +45 -274
  95. package/types/resources/QuotedSubscription.d.ts +100 -488
  96. package/types/resources/Ramp.d.ts +233 -724
  97. package/types/resources/ResourceMigration.d.ts +25 -80
  98. package/types/resources/SiteMigrationDetail.d.ts +34 -112
  99. package/types/resources/Subscription.d.ts +2390 -4335
  100. package/types/resources/SubscriptionEntitlement.d.ts +59 -160
  101. package/types/resources/SubscriptionEstimate.d.ts +51 -75
  102. package/types/resources/TaxWithheld.d.ts +15 -40
  103. package/types/resources/ThirdPartyPaymentMethod.d.ts +7 -29
  104. package/types/resources/TimeMachine.d.ts +43 -97
  105. package/types/resources/Token.d.ts +15 -85
  106. package/types/resources/Transaction.d.ts +278 -900
  107. package/types/resources/UnbilledCharge.d.ts +189 -164
  108. package/types/resources/Usage.d.ts +89 -279
  109. package/types/resources/VirtualBankAccount.d.ts +103 -255
  110. package/types/resources/filter.d.ts +52 -0
  111. package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -81
  112. package/.github/ISSUE_TEMPLATE/config.yml +0 -6
  113. package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -34
  114. package/.github/PULL_REQUEST_TEMPLATE.md +0 -8
  115. package/lib/chargebee.js +0 -512
  116. package/lib/resources/api_endpoints.js +0 -2912
  117. package/types/resources/NonSubscription.d.ts +0 -30
  118. package/types/resources/Session.d.ts +0 -41
package/types/core.d.ts CHANGED
@@ -1,92 +1,561 @@
1
1
  declare module 'chargebee' {
2
2
  export class RequestConfig {
3
- site ?: string
4
- api_key ?: string
5
- timeout ?: number
6
- timemachineWaitInMillis ?: number
7
- exportWaitInMillis ?: number
3
+ site?: string;
4
+ apiKey?: string;
5
+ timeout?: number;
6
+ timemachineWaitInMillis?: number;
7
+ exportWaitInMillis?: number;
8
8
  }
9
- export class ChargebeeRequest<T> {
10
- setIdempotencyKey(idempotencyKey: string): this;
11
- request(config ?: RequestConfig): Promise<T>;
12
- headers(headers : {[key : string] : string}): this;
13
- }
14
- type AccountHolderType = 'individual' | 'company'
15
- type AccountReceivablesHandling = 'no_action' | 'schedule_payment_collection' | 'write_off'
16
- type AccountType = 'checking' | 'savings' | 'business_checking' | 'current'
17
- type Action = 'upsert' | 'remove'
18
- type ApiVersion = 'v1' | 'v2'
19
- type ApplyOn = 'invoice_amount' | 'specific_item_price'
20
- type AutoCollection = 'on' | 'off'
21
- type AvalaraSaleType = 'wholesale' | 'retail' | 'consumed' | 'vendor_use'
22
- type BillingAlignmentMode = 'immediate' | 'delayed'
23
- type BillingDateMode = 'using_defaults' | 'manually_set'
24
- type BillingDayOfWeekMode = 'using_defaults' | 'manually_set'
25
- type CancelOption = 'immediately' | 'end_of_term' | 'specific_date' | 'end_of_billing_term'
26
- type ChangeOption = 'immediately' | 'end_of_term' | 'specific_date'
27
- type Channel = 'web' | 'app_store' | 'play_store'
28
- type ChargeModel = 'full_charge' | 'prorate'
29
- type ChargeOnEvent = 'subscription_creation' | 'subscription_trial_start' | 'plan_activation' | 'subscription_activation' | 'contract_termination' | 'on_demand'
30
- type ChargeOnOption = 'immediately' | 'on_event'
31
- type ChargesHandling = 'invoice_immediately' | 'add_to_unbilled_charges'
32
- type ContractTermCancelOption = 'terminate_immediately' | 'end_of_contract_term'
33
- type CreditOptionForCurrentTermCharges = 'none' | 'prorate' | 'full'
34
- type CreditType = 'loyalty_credits' | 'referral_rewards' | 'general'
35
- type CustomerType = 'residential' | 'business' | 'senior_citizen' | 'industrial'
36
- type DedupeOption = 'skip' | 'update_existing'
37
- type DirectDebitScheme = 'ach' | 'bacs' | 'sepa_core' | 'autogiro' | 'becs' | 'becs_nz' | 'pad' | 'not_applicable'
38
- type DispositionType = 'attachment' | 'inline'
39
- type DunningType = 'auto_collect' | 'offline' | 'direct_debit'
40
- type DurationType = 'one_time' | 'forever' | 'limited_period'
41
- type EcheckType = 'web' | 'ppd' | 'ccd'
42
- type EinvoicingMethod = 'automatic' | 'manual' | 'site_default'
43
- type EndScheduleOn = 'after_number_of_intervals' | 'specific_date' | 'subscription_end'
44
- type EntityCode = 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'p' | 'q' | 'r' | 'med1' | 'med2'
45
- type EntityType = 'customer' | 'subscription' | 'coupon' | 'plan_item_price' | 'addon_item_price' | 'charge_item_price' | 'invoice' | 'quote' | 'credit_note' | 'transaction' | 'plan' | 'addon' | 'order' | 'item_family' | 'item' | 'item_price' | 'plan_item' | 'addon_item' | 'charge_item' | 'plan_price' | 'addon_price' | 'charge_price' | 'differential_price' | 'attached_item' | 'feature' | 'subscription_entitlement' | 'item_entitlement' | 'business_entity' | 'price_variant'
46
- type EventName = 'cancellation_page_loaded'
47
- type EventType = 'coupon_created' | 'coupon_updated' | 'coupon_deleted' | 'coupon_set_created' | 'coupon_set_updated' | 'coupon_set_deleted' | 'coupon_codes_added' | 'coupon_codes_deleted' | 'coupon_codes_updated' | 'customer_created' | 'customer_changed' | 'customer_deleted' | 'customer_moved_out' | 'customer_moved_in' | 'promotional_credits_added' | 'promotional_credits_deducted' | 'subscription_created' | 'subscription_created_with_backdating' | 'subscription_started' | 'subscription_trial_end_reminder' | 'subscription_activated' | 'subscription_activated_with_backdating' | 'subscription_changed' | 'subscription_trial_extended' | 'mrr_updated' | 'subscription_changed_with_backdating' | 'subscription_cancellation_scheduled' | 'subscription_cancellation_reminder' | 'subscription_cancelled' | 'subscription_canceled_with_backdating' | 'subscription_reactivated' | 'subscription_reactivated_with_backdating' | 'subscription_renewed' | 'subscription_items_renewed' | 'subscription_scheduled_cancellation_removed' | 'subscription_changes_scheduled' | 'subscription_scheduled_changes_removed' | 'subscription_shipping_address_updated' | 'subscription_deleted' | 'subscription_paused' | 'subscription_pause_scheduled' | 'subscription_scheduled_pause_removed' | 'subscription_resumed' | 'subscription_resumption_scheduled' | 'subscription_scheduled_resumption_removed' | 'subscription_advance_invoice_schedule_added' | 'subscription_advance_invoice_schedule_updated' | 'subscription_advance_invoice_schedule_removed' | 'pending_invoice_created' | 'pending_invoice_updated' | 'invoice_generated' | 'invoice_generated_with_backdating' | 'invoice_updated' | 'invoice_deleted' | 'credit_note_created' | 'credit_note_created_with_backdating' | 'credit_note_updated' | 'credit_note_deleted' | 'invoice_installments_created' | 'invoice_installment_updated' | 'installment_config_created' | 'installment_config_deleted' | 'subscription_renewal_reminder' | 'add_usages_reminder' | 'transaction_created' | 'transaction_updated' | 'transaction_deleted' | 'payment_succeeded' | 'payment_failed' | 'payment_refunded' | 'payment_initiated' | 'refund_initiated' | 'authorization_succeeded' | 'authorization_voided' | 'card_added' | 'card_updated' | 'card_expiry_reminder' | 'card_expired' | 'card_deleted' | 'payment_source_added' | 'payment_source_updated' | 'payment_source_deleted' | 'payment_source_expiring' | 'payment_source_expired' | 'payment_source_locally_deleted' | 'virtual_bank_account_added' | 'virtual_bank_account_updated' | 'virtual_bank_account_deleted' | 'token_created' | 'token_consumed' | 'token_expired' | 'unbilled_charges_created' | 'unbilled_charges_voided' | 'unbilled_charges_deleted' | 'unbilled_charges_invoiced' | 'order_created' | 'order_updated' | 'order_cancelled' | 'order_delivered' | 'order_returned' | 'order_ready_to_process' | 'order_ready_to_ship' | 'order_deleted' | 'order_resent' | 'quote_created' | 'quote_updated' | 'quote_deleted' | 'tax_withheld_recorded' | 'tax_withheld_deleted' | 'tax_withheld_refunded' | 'gift_scheduled' | 'gift_unclaimed' | 'gift_claimed' | 'gift_expired' | 'gift_cancelled' | 'gift_updated' | 'hierarchy_created' | 'hierarchy_deleted' | 'payment_intent_created' | 'payment_intent_updated' | 'contract_term_created' | 'contract_term_renewed' | 'contract_term_terminated' | 'contract_term_completed' | 'contract_term_cancelled' | 'item_family_created' | 'item_family_updated' | 'item_family_deleted' | 'item_created' | 'item_updated' | 'item_deleted' | 'item_price_created' | 'item_price_updated' | 'item_price_deleted' | 'attached_item_created' | 'attached_item_updated' | 'attached_item_deleted' | 'differential_price_created' | 'differential_price_updated' | 'differential_price_deleted' | 'feature_created' | 'feature_updated' | 'feature_deleted' | 'feature_activated' | 'feature_reactivated' | 'feature_archived' | 'item_entitlements_updated' | 'entitlement_overrides_updated' | 'entitlement_overrides_removed' | 'item_entitlements_removed' | 'entitlement_overrides_auto_removed' | 'subscription_entitlements_created' | 'business_entity_created' | 'business_entity_updated' | 'business_entity_deleted' | 'customer_business_entity_changed' | 'subscription_business_entity_changed' | 'purchase_created' | 'voucher_created' | 'voucher_expired' | 'voucher_create_failed' | 'item_price_entitlements_updated' | 'item_price_entitlements_removed' | 'ramp_created' | 'ramp_deleted' | 'ramp_applied' | 'subscription_ramp_drafted' | 'subscription_ramp_updated' | 'price_variant_created' | 'price_variant_updated' | 'price_variant_deleted' | 'plan_created' | 'plan_updated' | 'plan_deleted' | 'addon_created' | 'addon_updated' | 'addon_deleted'
48
- type ExportType = 'data' | 'import_friendly_data'
49
- type FreePeriodUnit = 'day' | 'week' | 'month' | 'year'
50
- type FriendOfferType = 'none' | 'coupon' | 'coupon_code'
51
- type Gateway = 'chargebee' | 'chargebee_payments' | 'stripe' | 'wepay' | 'braintree' | 'authorize_net' | 'paypal_pro' | 'pin' | 'eway' | 'eway_rapid' | 'worldpay' | 'balanced_payments' | 'beanstream' | 'bluepay' | 'elavon' | 'first_data_global' | 'hdfc' | 'migs' | 'nmi' | 'ogone' | 'paymill' | 'paypal_payflow_pro' | 'sage_pay' | 'tco' | 'wirecard' | 'amazon_payments' | 'paypal_express_checkout' | 'adyen' | 'orbital' | 'moneris_us' | 'moneris' | 'bluesnap' | 'cybersource' | 'vantiv' | 'checkout_com' | 'paypal' | 'ingenico_direct' | 'exact' | 'mollie' | 'quickbooks' | 'razorpay' | 'global_payments' | 'bank_of_america' | 'ecentric' | 'metrics_global' | 'windcave' | 'pay_com' | 'ebanx' | 'dlocal' | 'nuvei' | 'gocardless' | 'not_applicable'
52
- type HierarchyOperationType = 'complete_hierarchy' | 'subordinates' | 'path_to_root'
53
- type InvoiceDunningHandling = 'continue' | 'stop'
54
- type ItemType = 'plan' | 'addon' | 'charge'
55
- type Layout = 'in_app' | 'full_page'
56
- type NotifyReferralSystem = 'none' | 'first_paid_conversion' | 'all_invoices'
57
- type OfflinePaymentMethod = 'no_preference' | 'cash' | 'check' | 'bank_transfer' | 'ach_credit' | 'sepa_credit' | 'boleto' | 'us_automated_bank_transfer' | 'eu_automated_bank_transfer' | 'uk_automated_bank_transfer' | 'jp_automated_bank_transfer' | 'mx_automated_bank_transfer' | 'custom'
58
- type OnEvent = 'subscription_creation' | 'subscription_trial_start' | 'plan_activation' | 'subscription_activation' | 'contract_termination'
59
- type Operation = 'create' | 'update' | 'delete'
60
- type OperationType = 'add' | 'remove'
61
- type PauseOption = 'immediately' | 'end_of_term' | 'specific_date' | 'billing_cycles'
62
- type PaymentInitiator = 'customer' | 'merchant'
63
- type PaymentMethod = 'cash' | 'check' | 'bank_transfer' | 'other' | 'custom' | 'chargeback' | 'card' | 'amazon_payments' | 'paypal_express_checkout' | 'direct_debit' | 'alipay' | 'unionpay' | 'apple_pay' | 'wechat_pay' | 'ach_credit' | 'sepa_credit' | 'ideal' | 'google_pay' | 'sofort' | 'bancontact' | 'giropay' | 'dotpay' | 'upi' | 'netbanking_emandates' | 'boleto' | 'venmo' | 'pay_to' | 'faster_payments' | 'sepa_instant_transfer' | 'automated_bank_transfer' | 'klarna_pay_now' | 'online_banking_poland'
64
- type PaymentMethodType = 'card' | 'paypal_express_checkout' | 'amazon_payments' | 'direct_debit' | 'generic' | 'alipay' | 'unionpay' | 'apple_pay' | 'wechat_pay' | 'ideal' | 'google_pay' | 'sofort' | 'bancontact' | 'giropay' | 'dotpay' | 'upi' | 'netbanking_emandates' | 'venmo' | 'pay_to' | 'faster_payments' | 'sepa_instant_transfer' | 'automated_bank_transfer' | 'klarna_pay_now' | 'online_banking_poland'
65
- type PaymentVoucherType = 'boleto'
66
- type PeriodUnit = 'day' | 'week' | 'month' | 'year'
67
- type PriceType = 'tax_exclusive' | 'tax_inclusive'
68
- type PricingModel = 'flat_fee' | 'per_unit' | 'tiered' | 'volume' | 'stairstep'
69
- type ProrationType = 'full_term' | 'partial_term' | 'none'
70
- type ReferralSystem = 'referral_candy' | 'referral_saasquatch' | 'friendbuy'
71
- type ReferrerRewardType = 'none' | 'referral_direct_reward' | 'custom_promotional_credit' | 'custom_revenue_percent_based'
72
- type RefundableCreditsHandling = 'no_action' | 'schedule_refund'
73
- type ReportBy = 'customer' | 'invoice' | 'product' | 'subscription'
74
- type ResumeOption = 'immediately' | 'specific_date'
75
- type Role = 'primary' | 'backup' | 'none'
76
- type ScheduleType = 'immediate' | 'specific_dates' | 'fixed_intervals'
77
- type Source = 'admin_console' | 'api' | 'bulk_operation' | 'scheduled_job' | 'hosted_page' | 'portal' | 'system' | 'none' | 'js_api' | 'migration' | 'external_service'
78
- type TaxExemptReason = 'tax_not_configured' | 'region_non_taxable' | 'export' | 'customer_exempt' | 'product_exempt' | 'zero_rated' | 'reverse_charge' | 'high_value_physical_goods' | 'zero_value_item' | 'tax_not_configured_external_provider'
79
- type TaxJurisType = 'country' | 'federal' | 'state' | 'county' | 'city' | 'special' | 'unincorporated' | 'other'
80
- type TaxOverrideReason = 'id_exempt' | 'customer_exempt' | 'export'
81
- type Taxability = 'taxable' | 'exempt'
82
- type TaxjarExemptionCategory = 'wholesale' | 'government' | 'other'
83
- type TrialEndAction = 'site_default' | 'plan_default' | 'activate_subscription' | 'cancel_subscription'
84
- type Type = 'card' | 'paypal_express_checkout' | 'amazon_payments' | 'direct_debit' | 'generic' | 'alipay' | 'unionpay' | 'apple_pay' | 'wechat_pay' | 'ideal' | 'google_pay' | 'sofort' | 'bancontact' | 'giropay' | 'dotpay' | 'upi' | 'netbanking_emandates' | 'venmo' | 'pay_to' | 'faster_payments' | 'sepa_instant_transfer' | 'automated_bank_transfer' | 'klarna_pay_now' | 'online_banking_poland'
85
- type UnbilledChargesHandling = 'no_action' | 'invoice'
86
- type UnbilledChargesOption = 'invoice' | 'delete'
87
- type UnpaidInvoicesHandling = 'no_action' | 'schedule_payment_collection'
88
- type ValidationStatus = 'not_validated' | 'valid' | 'partially_valid' | 'invalid'
89
- type VoucherType = 'boleto'
90
- type ChargeOn = 'immediately' | 'on_event'
91
-
92
- }
9
+ export type ChargebeeResponse<T> = T & {
10
+ headers: { [key: string]: string };
11
+ isIdempotencyReplayed?: boolean | string;
12
+ };
13
+ export type ChargebeeRequestHeader = {
14
+ [key: string]: string | undefined;
15
+ 'chargebee-idempotency-key'?: string;
16
+ 'chargebee-event-email'?: string;
17
+ 'chargebee-request-origin-ip'?: string;
18
+ 'chargebee-request-origin-user'?: string;
19
+ 'chargebee-request-origin-user-encoded'?: string;
20
+ 'chargebee-request-origin-device'?: string;
21
+ };
22
+ type AccountHolderType = 'individual' | 'company';
23
+ type AccountReceivablesHandling =
24
+ | 'no_action'
25
+ | 'schedule_payment_collection'
26
+ | 'write_off';
27
+ type AccountType = 'checking' | 'savings' | 'business_checking' | 'current';
28
+ type Action = 'upsert' | 'remove';
29
+ type ApiVersion = 'v1' | 'v2';
30
+ type ApplyOn = 'invoice_amount' | 'specific_item_price';
31
+ type AutoCollection = 'on' | 'off';
32
+ type AvalaraSaleType = 'wholesale' | 'retail' | 'consumed' | 'vendor_use';
33
+ type BillingAlignmentMode = 'immediate' | 'delayed';
34
+ type BillingDateMode = 'using_defaults' | 'manually_set';
35
+ type BillingDayOfWeekMode = 'using_defaults' | 'manually_set';
36
+ type CancelOption =
37
+ | 'immediately'
38
+ | 'end_of_term'
39
+ | 'specific_date'
40
+ | 'end_of_billing_term';
41
+ type ChangeOption = 'immediately' | 'end_of_term' | 'specific_date';
42
+ type Channel = 'web' | 'app_store' | 'play_store';
43
+ type ChargeModel = 'full_charge' | 'prorate';
44
+ type ChargeOnEvent =
45
+ | 'subscription_creation'
46
+ | 'subscription_trial_start'
47
+ | 'plan_activation'
48
+ | 'subscription_activation'
49
+ | 'contract_termination'
50
+ | 'on_demand';
51
+ type ChargeOnOption = 'immediately' | 'on_event';
52
+ type ChargesHandling = 'invoice_immediately' | 'add_to_unbilled_charges';
53
+ type ContractTermCancelOption =
54
+ | 'terminate_immediately'
55
+ | 'end_of_contract_term';
56
+ type CreditOptionForCurrentTermCharges = 'none' | 'prorate' | 'full';
57
+ type CreditType = 'loyalty_credits' | 'referral_rewards' | 'general';
58
+ type CustomerType =
59
+ | 'residential'
60
+ | 'business'
61
+ | 'senior_citizen'
62
+ | 'industrial';
63
+ type DedupeOption = 'skip' | 'update_existing';
64
+ type DirectDebitScheme =
65
+ | 'ach'
66
+ | 'bacs'
67
+ | 'sepa_core'
68
+ | 'autogiro'
69
+ | 'becs'
70
+ | 'becs_nz'
71
+ | 'pad'
72
+ | 'not_applicable';
73
+ type DispositionType = 'attachment' | 'inline';
74
+ type DunningType = 'auto_collect' | 'offline' | 'direct_debit';
75
+ type DurationType = 'one_time' | 'forever' | 'limited_period';
76
+ type EcheckType = 'web' | 'ppd' | 'ccd';
77
+ type EinvoicingMethod = 'automatic' | 'manual' | 'site_default';
78
+ type EndScheduleOn =
79
+ | 'after_number_of_intervals'
80
+ | 'specific_date'
81
+ | 'subscription_end';
82
+ type EntityCode =
83
+ | 'a'
84
+ | 'b'
85
+ | 'c'
86
+ | 'd'
87
+ | 'e'
88
+ | 'f'
89
+ | 'g'
90
+ | 'h'
91
+ | 'i'
92
+ | 'j'
93
+ | 'k'
94
+ | 'l'
95
+ | 'm'
96
+ | 'n'
97
+ | 'p'
98
+ | 'q'
99
+ | 'r'
100
+ | 'med1'
101
+ | 'med2';
102
+ type EntityType =
103
+ | 'customer'
104
+ | 'subscription'
105
+ | 'coupon'
106
+ | 'plan_item_price'
107
+ | 'addon_item_price'
108
+ | 'charge_item_price'
109
+ | 'invoice'
110
+ | 'quote'
111
+ | 'credit_note'
112
+ | 'transaction'
113
+ | 'plan'
114
+ | 'addon'
115
+ | 'order'
116
+ | 'item_family'
117
+ | 'item'
118
+ | 'item_price'
119
+ | 'plan_item'
120
+ | 'addon_item'
121
+ | 'charge_item'
122
+ | 'plan_price'
123
+ | 'addon_price'
124
+ | 'charge_price'
125
+ | 'differential_price'
126
+ | 'attached_item'
127
+ | 'feature'
128
+ | 'subscription_entitlement'
129
+ | 'item_entitlement'
130
+ | 'business_entity'
131
+ | 'price_variant';
132
+ type EventName = 'cancellation_page_loaded';
133
+ type EventType =
134
+ | 'coupon_created'
135
+ | 'coupon_updated'
136
+ | 'coupon_deleted'
137
+ | 'coupon_set_created'
138
+ | 'coupon_set_updated'
139
+ | 'coupon_set_deleted'
140
+ | 'coupon_codes_added'
141
+ | 'coupon_codes_deleted'
142
+ | 'coupon_codes_updated'
143
+ | 'customer_created'
144
+ | 'customer_changed'
145
+ | 'customer_deleted'
146
+ | 'customer_moved_out'
147
+ | 'customer_moved_in'
148
+ | 'promotional_credits_added'
149
+ | 'promotional_credits_deducted'
150
+ | 'subscription_created'
151
+ | 'subscription_created_with_backdating'
152
+ | 'subscription_started'
153
+ | 'subscription_trial_end_reminder'
154
+ | 'subscription_activated'
155
+ | 'subscription_activated_with_backdating'
156
+ | 'subscription_changed'
157
+ | 'subscription_trial_extended'
158
+ | 'mrr_updated'
159
+ | 'subscription_changed_with_backdating'
160
+ | 'subscription_cancellation_scheduled'
161
+ | 'subscription_cancellation_reminder'
162
+ | 'subscription_cancelled'
163
+ | 'subscription_canceled_with_backdating'
164
+ | 'subscription_reactivated'
165
+ | 'subscription_reactivated_with_backdating'
166
+ | 'subscription_renewed'
167
+ | 'subscription_items_renewed'
168
+ | 'subscription_scheduled_cancellation_removed'
169
+ | 'subscription_changes_scheduled'
170
+ | 'subscription_scheduled_changes_removed'
171
+ | 'subscription_shipping_address_updated'
172
+ | 'subscription_deleted'
173
+ | 'subscription_paused'
174
+ | 'subscription_pause_scheduled'
175
+ | 'subscription_scheduled_pause_removed'
176
+ | 'subscription_resumed'
177
+ | 'subscription_resumption_scheduled'
178
+ | 'subscription_scheduled_resumption_removed'
179
+ | 'subscription_advance_invoice_schedule_added'
180
+ | 'subscription_advance_invoice_schedule_updated'
181
+ | 'subscription_advance_invoice_schedule_removed'
182
+ | 'pending_invoice_created'
183
+ | 'pending_invoice_updated'
184
+ | 'invoice_generated'
185
+ | 'invoice_generated_with_backdating'
186
+ | 'invoice_updated'
187
+ | 'invoice_deleted'
188
+ | 'credit_note_created'
189
+ | 'credit_note_created_with_backdating'
190
+ | 'credit_note_updated'
191
+ | 'credit_note_deleted'
192
+ | 'invoice_installments_created'
193
+ | 'invoice_installment_updated'
194
+ | 'installment_config_created'
195
+ | 'installment_config_deleted'
196
+ | 'subscription_renewal_reminder'
197
+ | 'add_usages_reminder'
198
+ | 'transaction_created'
199
+ | 'transaction_updated'
200
+ | 'transaction_deleted'
201
+ | 'payment_succeeded'
202
+ | 'payment_failed'
203
+ | 'payment_refunded'
204
+ | 'payment_initiated'
205
+ | 'refund_initiated'
206
+ | 'authorization_succeeded'
207
+ | 'authorization_voided'
208
+ | 'card_added'
209
+ | 'card_updated'
210
+ | 'card_expiry_reminder'
211
+ | 'card_expired'
212
+ | 'card_deleted'
213
+ | 'payment_source_added'
214
+ | 'payment_source_updated'
215
+ | 'payment_source_deleted'
216
+ | 'payment_source_expiring'
217
+ | 'payment_source_expired'
218
+ | 'payment_source_locally_deleted'
219
+ | 'virtual_bank_account_added'
220
+ | 'virtual_bank_account_updated'
221
+ | 'virtual_bank_account_deleted'
222
+ | 'token_created'
223
+ | 'token_consumed'
224
+ | 'token_expired'
225
+ | 'unbilled_charges_created'
226
+ | 'unbilled_charges_voided'
227
+ | 'unbilled_charges_deleted'
228
+ | 'unbilled_charges_invoiced'
229
+ | 'order_created'
230
+ | 'order_updated'
231
+ | 'order_cancelled'
232
+ | 'order_delivered'
233
+ | 'order_returned'
234
+ | 'order_ready_to_process'
235
+ | 'order_ready_to_ship'
236
+ | 'order_deleted'
237
+ | 'order_resent'
238
+ | 'quote_created'
239
+ | 'quote_updated'
240
+ | 'quote_deleted'
241
+ | 'tax_withheld_recorded'
242
+ | 'tax_withheld_deleted'
243
+ | 'tax_withheld_refunded'
244
+ | 'gift_scheduled'
245
+ | 'gift_unclaimed'
246
+ | 'gift_claimed'
247
+ | 'gift_expired'
248
+ | 'gift_cancelled'
249
+ | 'gift_updated'
250
+ | 'hierarchy_created'
251
+ | 'hierarchy_deleted'
252
+ | 'payment_intent_created'
253
+ | 'payment_intent_updated'
254
+ | 'contract_term_created'
255
+ | 'contract_term_renewed'
256
+ | 'contract_term_terminated'
257
+ | 'contract_term_completed'
258
+ | 'contract_term_cancelled'
259
+ | 'item_family_created'
260
+ | 'item_family_updated'
261
+ | 'item_family_deleted'
262
+ | 'item_created'
263
+ | 'item_updated'
264
+ | 'item_deleted'
265
+ | 'item_price_created'
266
+ | 'item_price_updated'
267
+ | 'item_price_deleted'
268
+ | 'attached_item_created'
269
+ | 'attached_item_updated'
270
+ | 'attached_item_deleted'
271
+ | 'differential_price_created'
272
+ | 'differential_price_updated'
273
+ | 'differential_price_deleted'
274
+ | 'feature_created'
275
+ | 'feature_updated'
276
+ | 'feature_deleted'
277
+ | 'feature_activated'
278
+ | 'feature_reactivated'
279
+ | 'feature_archived'
280
+ | 'item_entitlements_updated'
281
+ | 'entitlement_overrides_updated'
282
+ | 'entitlement_overrides_removed'
283
+ | 'item_entitlements_removed'
284
+ | 'entitlement_overrides_auto_removed'
285
+ | 'subscription_entitlements_created'
286
+ | 'business_entity_created'
287
+ | 'business_entity_updated'
288
+ | 'business_entity_deleted'
289
+ | 'customer_business_entity_changed'
290
+ | 'subscription_business_entity_changed'
291
+ | 'purchase_created'
292
+ | 'voucher_created'
293
+ | 'voucher_expired'
294
+ | 'voucher_create_failed'
295
+ | 'item_price_entitlements_updated'
296
+ | 'item_price_entitlements_removed'
297
+ | 'ramp_created'
298
+ | 'ramp_deleted'
299
+ | 'ramp_applied'
300
+ | 'subscription_ramp_drafted'
301
+ | 'subscription_ramp_updated'
302
+ | 'price_variant_created'
303
+ | 'price_variant_updated'
304
+ | 'price_variant_deleted'
305
+ | 'customer_entitlements_updated'
306
+ | 'subscription_moved_in'
307
+ | 'subscription_moved_out'
308
+ | 'subscription_movement_failed'
309
+ | 'plan_created'
310
+ | 'plan_updated'
311
+ | 'plan_deleted'
312
+ | 'addon_created'
313
+ | 'addon_updated'
314
+ | 'addon_deleted';
315
+ type ExportType = 'data' | 'import_friendly_data';
316
+ type FreePeriodUnit = 'day' | 'week' | 'month' | 'year';
317
+ type FriendOfferType = 'none' | 'coupon' | 'coupon_code';
318
+ type Gateway =
319
+ | 'chargebee'
320
+ | 'chargebee_payments'
321
+ | 'stripe'
322
+ | 'wepay'
323
+ | 'braintree'
324
+ | 'authorize_net'
325
+ | 'paypal_pro'
326
+ | 'pin'
327
+ | 'eway'
328
+ | 'eway_rapid'
329
+ | 'worldpay'
330
+ | 'balanced_payments'
331
+ | 'beanstream'
332
+ | 'bluepay'
333
+ | 'elavon'
334
+ | 'first_data_global'
335
+ | 'hdfc'
336
+ | 'migs'
337
+ | 'nmi'
338
+ | 'ogone'
339
+ | 'paymill'
340
+ | 'paypal_payflow_pro'
341
+ | 'sage_pay'
342
+ | 'tco'
343
+ | 'wirecard'
344
+ | 'amazon_payments'
345
+ | 'paypal_express_checkout'
346
+ | 'adyen'
347
+ | 'orbital'
348
+ | 'moneris_us'
349
+ | 'moneris'
350
+ | 'bluesnap'
351
+ | 'cybersource'
352
+ | 'vantiv'
353
+ | 'checkout_com'
354
+ | 'paypal'
355
+ | 'ingenico_direct'
356
+ | 'exact'
357
+ | 'mollie'
358
+ | 'quickbooks'
359
+ | 'razorpay'
360
+ | 'global_payments'
361
+ | 'bank_of_america'
362
+ | 'ecentric'
363
+ | 'metrics_global'
364
+ | 'windcave'
365
+ | 'pay_com'
366
+ | 'ebanx'
367
+ | 'dlocal'
368
+ | 'nuvei'
369
+ | 'gocardless'
370
+ | 'not_applicable';
371
+ type HierarchyOperationType =
372
+ | 'complete_hierarchy'
373
+ | 'subordinates'
374
+ | 'path_to_root';
375
+ type InvoiceDunningHandling = 'continue' | 'stop';
376
+ type ItemType = 'plan' | 'addon' | 'charge';
377
+ type Layout = 'in_app' | 'full_page';
378
+ type NotifyReferralSystem = 'none' | 'first_paid_conversion' | 'all_invoices';
379
+ type OfflinePaymentMethod =
380
+ | 'no_preference'
381
+ | 'cash'
382
+ | 'check'
383
+ | 'bank_transfer'
384
+ | 'ach_credit'
385
+ | 'sepa_credit'
386
+ | 'boleto'
387
+ | 'us_automated_bank_transfer'
388
+ | 'eu_automated_bank_transfer'
389
+ | 'uk_automated_bank_transfer'
390
+ | 'jp_automated_bank_transfer'
391
+ | 'mx_automated_bank_transfer'
392
+ | 'custom';
393
+ type OnEvent =
394
+ | 'subscription_creation'
395
+ | 'subscription_trial_start'
396
+ | 'plan_activation'
397
+ | 'subscription_activation'
398
+ | 'contract_termination';
399
+ type Operation = 'create' | 'update' | 'delete';
400
+ type OperationType = 'add' | 'remove';
401
+ type PauseOption =
402
+ | 'immediately'
403
+ | 'end_of_term'
404
+ | 'specific_date'
405
+ | 'billing_cycles';
406
+ type PaymentInitiator = 'customer' | 'merchant';
407
+ type PaymentMethod =
408
+ | 'cash'
409
+ | 'check'
410
+ | 'bank_transfer'
411
+ | 'other'
412
+ | 'custom'
413
+ | 'chargeback'
414
+ | 'card'
415
+ | 'amazon_payments'
416
+ | 'paypal_express_checkout'
417
+ | 'direct_debit'
418
+ | 'alipay'
419
+ | 'unionpay'
420
+ | 'apple_pay'
421
+ | 'wechat_pay'
422
+ | 'ach_credit'
423
+ | 'sepa_credit'
424
+ | 'ideal'
425
+ | 'google_pay'
426
+ | 'sofort'
427
+ | 'bancontact'
428
+ | 'giropay'
429
+ | 'dotpay'
430
+ | 'upi'
431
+ | 'netbanking_emandates'
432
+ | 'boleto'
433
+ | 'venmo'
434
+ | 'pay_to'
435
+ | 'faster_payments'
436
+ | 'sepa_instant_transfer'
437
+ | 'automated_bank_transfer'
438
+ | 'klarna_pay_now'
439
+ | 'online_banking_poland';
440
+ type PaymentMethodType =
441
+ | 'card'
442
+ | 'paypal_express_checkout'
443
+ | 'amazon_payments'
444
+ | 'direct_debit'
445
+ | 'generic'
446
+ | 'alipay'
447
+ | 'unionpay'
448
+ | 'apple_pay'
449
+ | 'wechat_pay'
450
+ | 'ideal'
451
+ | 'google_pay'
452
+ | 'sofort'
453
+ | 'bancontact'
454
+ | 'giropay'
455
+ | 'dotpay'
456
+ | 'upi'
457
+ | 'netbanking_emandates'
458
+ | 'venmo'
459
+ | 'pay_to'
460
+ | 'faster_payments'
461
+ | 'sepa_instant_transfer'
462
+ | 'automated_bank_transfer'
463
+ | 'klarna_pay_now'
464
+ | 'online_banking_poland';
465
+ type PaymentVoucherType = 'boleto';
466
+ type PeriodUnit = 'day' | 'week' | 'month' | 'year';
467
+ type PriceType = 'tax_exclusive' | 'tax_inclusive';
468
+ type PricingModel =
469
+ | 'flat_fee'
470
+ | 'per_unit'
471
+ | 'tiered'
472
+ | 'volume'
473
+ | 'stairstep';
474
+ type ProrationType = 'full_term' | 'partial_term' | 'none';
475
+ type ReferralSystem = 'referral_candy' | 'referral_saasquatch' | 'friendbuy';
476
+ type ReferrerRewardType =
477
+ | 'none'
478
+ | 'referral_direct_reward'
479
+ | 'custom_promotional_credit'
480
+ | 'custom_revenue_percent_based';
481
+ type RefundableCreditsHandling = 'no_action' | 'schedule_refund';
482
+ type ReportBy = 'customer' | 'invoice' | 'product' | 'subscription';
483
+ type ResumeOption = 'immediately' | 'specific_date';
484
+ type Role = 'primary' | 'backup' | 'none';
485
+ type ScheduleType = 'immediate' | 'specific_dates' | 'fixed_intervals';
486
+ type Source =
487
+ | 'admin_console'
488
+ | 'api'
489
+ | 'bulk_operation'
490
+ | 'scheduled_job'
491
+ | 'hosted_page'
492
+ | 'portal'
493
+ | 'system'
494
+ | 'none'
495
+ | 'js_api'
496
+ | 'migration'
497
+ | 'external_service';
498
+ type TaxExemptReason =
499
+ | 'tax_not_configured'
500
+ | 'region_non_taxable'
501
+ | 'export'
502
+ | 'customer_exempt'
503
+ | 'product_exempt'
504
+ | 'zero_rated'
505
+ | 'reverse_charge'
506
+ | 'high_value_physical_goods'
507
+ | 'zero_value_item'
508
+ | 'tax_not_configured_external_provider';
509
+ type TaxJurisType =
510
+ | 'country'
511
+ | 'federal'
512
+ | 'state'
513
+ | 'county'
514
+ | 'city'
515
+ | 'special'
516
+ | 'unincorporated'
517
+ | 'other';
518
+ type TaxOverrideReason = 'id_exempt' | 'customer_exempt' | 'export';
519
+ type Taxability = 'taxable' | 'exempt';
520
+ type TaxjarExemptionCategory = 'wholesale' | 'government' | 'other';
521
+ type TrialEndAction =
522
+ | 'site_default'
523
+ | 'plan_default'
524
+ | 'activate_subscription'
525
+ | 'cancel_subscription';
526
+ type Type =
527
+ | 'card'
528
+ | 'paypal_express_checkout'
529
+ | 'amazon_payments'
530
+ | 'direct_debit'
531
+ | 'generic'
532
+ | 'alipay'
533
+ | 'unionpay'
534
+ | 'apple_pay'
535
+ | 'wechat_pay'
536
+ | 'ideal'
537
+ | 'google_pay'
538
+ | 'sofort'
539
+ | 'bancontact'
540
+ | 'giropay'
541
+ | 'dotpay'
542
+ | 'upi'
543
+ | 'netbanking_emandates'
544
+ | 'venmo'
545
+ | 'pay_to'
546
+ | 'faster_payments'
547
+ | 'sepa_instant_transfer'
548
+ | 'automated_bank_transfer'
549
+ | 'klarna_pay_now'
550
+ | 'online_banking_poland';
551
+ type UnbilledChargesHandling = 'no_action' | 'invoice';
552
+ type UnbilledChargesOption = 'invoice' | 'delete';
553
+ type UnpaidInvoicesHandling = 'no_action' | 'schedule_payment_collection';
554
+ type ValidationStatus =
555
+ | 'not_validated'
556
+ | 'valid'
557
+ | 'partially_valid'
558
+ | 'invalid';
559
+ type VoucherType = 'boleto';
560
+ type ChargeOn = 'immediately' | 'on_event';
561
+ }