chargebee 2.41.0 → 3.0.0-beta.2

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 +11 -15
  2. package/LICENSE +1 -1
  3. package/README.md +90 -170
  4. package/cjs/RequestWrapper.js +84 -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 +80 -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 +90 -55
  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 +24 -35
  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 +230 -747
  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 -4336
  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 +276 -911
  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 -2935
  117. package/types/resources/NonSubscription.d.ts +0 -30
  118. package/types/resources/Session.d.ts +0 -41
@@ -1,570 +1,1221 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
2
  ///<reference path='./../index.d.ts'/>
3
+
3
4
  declare module 'chargebee' {
4
5
  export interface Estimate {
5
-
6
- created_at:number;
7
-
8
- subscription_estimate?:SubscriptionEstimate;
9
-
10
- subscription_estimates?:SubscriptionEstimate[];
11
-
12
- invoice_estimate?:InvoiceEstimate;
13
-
14
- invoice_estimates?:InvoiceEstimate[];
15
-
16
- next_invoice_estimate?:InvoiceEstimate;
17
-
18
- credit_note_estimates?:CreditNoteEstimate[];
19
-
20
- unbilled_charge_estimates?:UnbilledCharge[];
6
+ created_at: number;
7
+ subscription_estimate?: SubscriptionEstimate;
8
+ subscription_estimates?: SubscriptionEstimate[];
9
+ invoice_estimate?: InvoiceEstimate;
10
+ invoice_estimates?: InvoiceEstimate[];
11
+ next_invoice_estimate?: InvoiceEstimate;
12
+ credit_note_estimates?: CreditNoteEstimate[];
13
+ unbilled_charge_estimates?: UnbilledCharge[];
21
14
  }
15
+
22
16
  export namespace Estimate {
23
- export class EstimateResource {
24
- create_subscription(input:CreateSubscriptionInputParam):ChargebeeRequest<CreateSubscriptionResponse>;
25
-
26
- create_sub_item_estimate(input:CreateSubItemEstimateInputParam):ChargebeeRequest<CreateSubItemEstimateResponse>;
27
-
28
- create_sub_for_customer_estimate(customer_id:string, input:CreateSubForCustomerEstimateInputParam):ChargebeeRequest<CreateSubForCustomerEstimateResponse>;
29
-
30
- create_sub_item_for_customer_estimate(customer_id:string, input:CreateSubItemForCustomerEstimateInputParam):ChargebeeRequest<CreateSubItemForCustomerEstimateResponse>;
31
-
32
- update_subscription(input:UpdateSubscriptionInputParam):ChargebeeRequest<UpdateSubscriptionResponse>;
33
-
34
- update_subscription_for_items(input:UpdateSubscriptionForItemsInputParam):ChargebeeRequest<UpdateSubscriptionForItemsResponse>;
35
-
36
- renewal_estimate(subscription_id:string, input?:RenewalEstimateInputParam):ChargebeeRequest<RenewalEstimateResponse>;
37
-
38
- advance_invoice_estimate(subscription_id:string, input?:AdvanceInvoiceEstimateInputParam):ChargebeeRequest<AdvanceInvoiceEstimateResponse>;
39
-
40
- regenerate_invoice_estimate(subscription_id:string, input?:RegenerateInvoiceEstimateInputParam):ChargebeeRequest<RegenerateInvoiceEstimateResponse>;
41
-
42
- upcoming_invoices_estimate(customer_id:string):ChargebeeRequest<UpcomingInvoicesEstimateResponse>;
43
-
44
- change_term_end(subscription_id:string, input:ChangeTermEndInputParam):ChargebeeRequest<ChangeTermEndResponse>;
45
-
46
- cancel_subscription(subscription_id:string, input?:CancelSubscriptionInputParam):ChargebeeRequest<CancelSubscriptionResponse>;
47
-
48
- cancel_subscription_for_items(subscription_id:string, input?:CancelSubscriptionForItemsInputParam):ChargebeeRequest<CancelSubscriptionForItemsResponse>;
49
-
50
- pause_subscription(subscription_id:string, input?:PauseSubscriptionInputParam):ChargebeeRequest<PauseSubscriptionResponse>;
51
-
52
- resume_subscription(subscription_id:string, input?:ResumeSubscriptionInputParam):ChargebeeRequest<ResumeSubscriptionResponse>;
53
-
54
- gift_subscription(input:GiftSubscriptionInputParam):ChargebeeRequest<GiftSubscriptionResponse>;
55
-
56
- gift_subscription_for_items(input:GiftSubscriptionForItemsInputParam):ChargebeeRequest<GiftSubscriptionForItemsResponse>;
57
-
58
- create_invoice(input?:CreateInvoiceInputParam):ChargebeeRequest<CreateInvoiceResponse>;
59
-
60
- create_invoice_for_items(input:CreateInvoiceForItemsInputParam):ChargebeeRequest<CreateInvoiceForItemsResponse>;
61
- }
62
- export interface CreateSubscriptionResponse {
63
- estimate:Estimate;
17
+ export class EstimateResource {
18
+ createSubscription(
19
+ input: CreateSubscriptionInputParam,
20
+ headers?: ChargebeeRequestHeader,
21
+ ): Promise<ChargebeeResponse<CreateSubscriptionResponse>>;
22
+
23
+ createSubItemEstimate(
24
+ input: CreateSubItemEstimateInputParam,
25
+ headers?: ChargebeeRequestHeader,
26
+ ): Promise<ChargebeeResponse<CreateSubItemEstimateResponse>>;
27
+
28
+ createSubForCustomerEstimate(
29
+ customer_id: string,
30
+ input: CreateSubForCustomerEstimateInputParam,
31
+ headers?: ChargebeeRequestHeader,
32
+ ): Promise<ChargebeeResponse<CreateSubForCustomerEstimateResponse>>;
33
+
34
+ createSubItemForCustomerEstimate(
35
+ customer_id: string,
36
+ input: CreateSubItemForCustomerEstimateInputParam,
37
+ headers?: ChargebeeRequestHeader,
38
+ ): Promise<ChargebeeResponse<CreateSubItemForCustomerEstimateResponse>>;
39
+
40
+ updateSubscription(
41
+ input: UpdateSubscriptionInputParam,
42
+ headers?: ChargebeeRequestHeader,
43
+ ): Promise<ChargebeeResponse<UpdateSubscriptionResponse>>;
44
+
45
+ updateSubscriptionForItems(
46
+ input: UpdateSubscriptionForItemsInputParam,
47
+ headers?: ChargebeeRequestHeader,
48
+ ): Promise<ChargebeeResponse<UpdateSubscriptionForItemsResponse>>;
49
+
50
+ renewalEstimate(
51
+ subscription_id: string,
52
+ input?: RenewalEstimateInputParam,
53
+ headers?: ChargebeeRequestHeader,
54
+ ): Promise<ChargebeeResponse<RenewalEstimateResponse>>;
55
+
56
+ advanceInvoiceEstimate(
57
+ subscription_id: string,
58
+ input?: AdvanceInvoiceEstimateInputParam,
59
+ headers?: ChargebeeRequestHeader,
60
+ ): Promise<ChargebeeResponse<AdvanceInvoiceEstimateResponse>>;
61
+
62
+ regenerateInvoiceEstimate(
63
+ subscription_id: string,
64
+ input?: RegenerateInvoiceEstimateInputParam,
65
+ headers?: ChargebeeRequestHeader,
66
+ ): Promise<ChargebeeResponse<RegenerateInvoiceEstimateResponse>>;
67
+
68
+ upcomingInvoicesEstimate(
69
+ customer_id: string,
70
+ headers?: ChargebeeRequestHeader,
71
+ ): Promise<ChargebeeResponse<UpcomingInvoicesEstimateResponse>>;
72
+
73
+ changeTermEnd(
74
+ subscription_id: string,
75
+ input: ChangeTermEndInputParam,
76
+ headers?: ChargebeeRequestHeader,
77
+ ): Promise<ChargebeeResponse<ChangeTermEndResponse>>;
78
+
79
+ cancelSubscription(
80
+ subscription_id: string,
81
+ input?: CancelSubscriptionInputParam,
82
+ headers?: ChargebeeRequestHeader,
83
+ ): Promise<ChargebeeResponse<CancelSubscriptionResponse>>;
84
+
85
+ cancelSubscriptionForItems(
86
+ subscription_id: string,
87
+ input?: CancelSubscriptionForItemsInputParam,
88
+ headers?: ChargebeeRequestHeader,
89
+ ): Promise<ChargebeeResponse<CancelSubscriptionForItemsResponse>>;
90
+
91
+ pauseSubscription(
92
+ subscription_id: string,
93
+ input?: PauseSubscriptionInputParam,
94
+ headers?: ChargebeeRequestHeader,
95
+ ): Promise<ChargebeeResponse<PauseSubscriptionResponse>>;
96
+
97
+ resumeSubscription(
98
+ subscription_id: string,
99
+ input?: ResumeSubscriptionInputParam,
100
+ headers?: ChargebeeRequestHeader,
101
+ ): Promise<ChargebeeResponse<ResumeSubscriptionResponse>>;
102
+
103
+ giftSubscription(
104
+ input: GiftSubscriptionInputParam,
105
+ headers?: ChargebeeRequestHeader,
106
+ ): Promise<ChargebeeResponse<GiftSubscriptionResponse>>;
107
+
108
+ giftSubscriptionForItems(
109
+ input: GiftSubscriptionForItemsInputParam,
110
+ headers?: ChargebeeRequestHeader,
111
+ ): Promise<ChargebeeResponse<GiftSubscriptionForItemsResponse>>;
112
+
113
+ createInvoice(
114
+ input?: CreateInvoiceInputParam,
115
+ headers?: ChargebeeRequestHeader,
116
+ ): Promise<ChargebeeResponse<CreateInvoiceResponse>>;
117
+
118
+ createInvoiceForItems(
119
+ input: CreateInvoiceForItemsInputParam,
120
+ headers?: ChargebeeRequestHeader,
121
+ ): Promise<ChargebeeResponse<CreateInvoiceForItemsResponse>>;
64
122
  }
123
+
124
+ export interface CreateSubscriptionResponse {
125
+ estimate: Estimate;
126
+ }
127
+
128
+ export interface CreateSubItemEstimateResponse {
129
+ estimate: Estimate;
130
+ }
131
+
132
+ export interface CreateSubForCustomerEstimateResponse {
133
+ estimate: Estimate;
134
+ }
135
+
136
+ export interface CreateSubItemForCustomerEstimateResponse {
137
+ estimate: Estimate;
138
+ }
139
+
140
+ export interface UpdateSubscriptionResponse {
141
+ estimate: Estimate;
142
+ }
143
+
144
+ export interface UpdateSubscriptionForItemsResponse {
145
+ estimate: Estimate;
146
+ }
147
+
148
+ export interface RenewalEstimateResponse {
149
+ estimate: Estimate;
150
+ }
151
+
152
+ export interface AdvanceInvoiceEstimateResponse {
153
+ estimate: Estimate;
154
+ }
155
+
156
+ export interface RegenerateInvoiceEstimateResponse {
157
+ estimate: Estimate;
158
+ }
159
+
160
+ export interface UpcomingInvoicesEstimateResponse {
161
+ estimate: Estimate;
162
+ }
163
+
164
+ export interface ChangeTermEndResponse {
165
+ estimate: Estimate;
166
+ }
167
+
168
+ export interface CancelSubscriptionResponse {
169
+ estimate: Estimate;
170
+ }
171
+
172
+ export interface CancelSubscriptionForItemsResponse {
173
+ estimate: Estimate;
174
+ }
175
+
176
+ export interface PauseSubscriptionResponse {
177
+ estimate: Estimate;
178
+ }
179
+
180
+ export interface ResumeSubscriptionResponse {
181
+ estimate: Estimate;
182
+ }
183
+
184
+ export interface GiftSubscriptionResponse {
185
+ estimate: Estimate;
186
+ }
187
+
188
+ export interface GiftSubscriptionForItemsResponse {
189
+ estimate: Estimate;
190
+ }
191
+
192
+ export interface CreateInvoiceResponse {
193
+ estimate: Estimate;
194
+ }
195
+
196
+ export interface CreateInvoiceForItemsResponse {
197
+ estimate: Estimate;
198
+ }
199
+
200
+ // REQUEST PARAMS
201
+ //---------------
202
+
65
203
  export interface CreateSubscriptionInputParam {
66
-
67
- subscription:{contract_term_billing_cycle_on_renewal?:number,coupon?:string,free_period?:number,free_period_unit?:FreePeriodUnit,id?:string,offline_payment_method?:OfflinePaymentMethod,plan_id:string,plan_quantity?:number,plan_quantity_in_decimal?:string,plan_unit_price?:number,plan_unit_price_in_decimal?:string,setup_fee?:number,start_date?:number,trial_end?:number,trial_end_action?:TrialEndAction};
68
-
69
- billing_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
70
-
71
- shipping_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
72
-
73
- customer?:{customer_type?:CustomerType,entity_code?:EntityCode,exempt_number?:string,exemption_details?:any[],registered_for_gst?:boolean,taxability?:Taxability,vat_number?:string,vat_number_prefix?:string};
74
-
75
- contract_term?:{action_at_term_end?:'renew' | 'evergreen' | 'cancel',cancellation_cutoff_period?:number};
76
-
77
- addons?:{billing_cycles?:number,id?:string,quantity?:number,quantity_in_decimal?:string,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
78
-
79
- event_based_addons?:{charge_on?:ChargeOn,charge_once?:boolean,id?:string,on_event?:OnEvent,quantity?:number,quantity_in_decimal?:string,service_period_in_days?:number,unit_price?:number,unit_price_in_decimal?:string}[];
80
-
81
- tax_providers_fields?:{field_id?:string,field_value?:string,provider_name?:string}[];
82
-
83
- billing_cycles?:number;
84
-
85
- mandatory_addons_to_remove?:string[];
86
-
87
- terms_to_charge?:number;
88
-
89
- billing_alignment_mode?:BillingAlignmentMode;
90
-
91
- coupon_ids?:string[];
92
-
93
- invoice_immediately?:boolean;
94
-
95
- invoice_date?:number;
96
-
97
- client_profile_id?:string;
98
- }
99
- export interface CreateSubItemEstimateResponse {
100
- estimate:Estimate;
204
+ billing_cycles?: number;
205
+ mandatory_addons_to_remove?: string[];
206
+ terms_to_charge?: number;
207
+ billing_alignment_mode?: BillingAlignmentMode;
208
+ coupon_ids?: string[];
209
+ invoice_immediately?: boolean;
210
+ invoice_date?: number;
211
+ client_profile_id?: string;
212
+ subscription?: SubscriptionCreateSubscriptionInputParam;
213
+ billing_address?: BillingAddressCreateSubscriptionInputParam;
214
+ shipping_address?: ShippingAddressCreateSubscriptionInputParam;
215
+ customer?: CustomerCreateSubscriptionInputParam;
216
+ contract_term?: ContractTermCreateSubscriptionInputParam;
217
+ addons?: AddonsCreateSubscriptionInputParam[];
218
+ event_based_addons?: EventBasedAddonsCreateSubscriptionInputParam[];
219
+ tax_providers_fields?: TaxProvidersFieldsCreateSubscriptionInputParam[];
101
220
  }
102
221
  export interface CreateSubItemEstimateInputParam {
103
-
104
- subscription?:{contract_term_billing_cycle_on_renewal?:number,coupon?:string,free_period?:number,free_period_unit?:FreePeriodUnit,id?:string,setup_fee?:number,start_date?:number,trial_end?:number,trial_end_action?:TrialEndAction};
105
-
106
- billing_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
107
-
108
- shipping_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
109
-
110
- customer?:{customer_type?:CustomerType,entity_code?:EntityCode,exempt_number?:string,exemption_details?:any[],registered_for_gst?:boolean,taxability?:Taxability,vat_number?:string,vat_number_prefix?:string};
111
-
112
- contract_term?:{action_at_term_end?:'renew' | 'evergreen' | 'cancel',cancellation_cutoff_period?:number,contract_start?:number};
113
-
114
- subscription_items:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,item_type?:ItemType,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
115
-
116
- discounts:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,included_in_mrr?:boolean,item_price_id?:string,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
117
-
118
- item_tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,item_price_id?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
119
-
120
- tax_providers_fields?:{field_id?:string,field_value?:string,provider_name?:string}[];
121
-
122
- billing_cycles?:number;
123
-
124
- mandatory_items_to_remove?:string[];
125
-
126
- terms_to_charge?:number;
127
-
128
- billing_alignment_mode?:BillingAlignmentMode;
129
-
130
- coupon_ids?:string[];
131
-
132
- invoice_immediately?:boolean;
133
-
134
- invoice_date?:number;
135
-
136
- client_profile_id?:string;
137
- }
138
- export interface CreateSubForCustomerEstimateResponse {
139
- estimate:Estimate;
222
+ billing_cycles?: number;
223
+ mandatory_items_to_remove?: string[];
224
+ terms_to_charge?: number;
225
+ billing_alignment_mode?: BillingAlignmentMode;
226
+ coupon_ids?: string[];
227
+ invoice_immediately?: boolean;
228
+ invoice_date?: number;
229
+ client_profile_id?: string;
230
+ subscription?: SubscriptionCreateSubItemEstimateInputParam;
231
+ billing_address?: BillingAddressCreateSubItemEstimateInputParam;
232
+ shipping_address?: ShippingAddressCreateSubItemEstimateInputParam;
233
+ customer?: CustomerCreateSubItemEstimateInputParam;
234
+ contract_term?: ContractTermCreateSubItemEstimateInputParam;
235
+ subscription_items?: SubscriptionItemsCreateSubItemEstimateInputParam[];
236
+ discounts?: DiscountsCreateSubItemEstimateInputParam[];
237
+ item_tiers?: ItemTiersCreateSubItemEstimateInputParam[];
238
+ tax_providers_fields?: TaxProvidersFieldsCreateSubItemEstimateInputParam[];
140
239
  }
141
240
  export interface CreateSubForCustomerEstimateInputParam {
142
-
143
- subscription?:{contract_term_billing_cycle_on_renewal?:number,free_period?:number,free_period_unit?:FreePeriodUnit,id?:string,offline_payment_method?:OfflinePaymentMethod,plan_id:string,plan_quantity?:number,plan_quantity_in_decimal?:string,plan_unit_price?:number,plan_unit_price_in_decimal?:string,setup_fee?:number,start_date?:number,trial_end?:number,trial_end_action?:TrialEndAction};
144
-
145
- shipping_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
146
-
147
- contract_term?:{action_at_term_end?:'renew' | 'evergreen' | 'cancel',cancellation_cutoff_period?:number};
148
-
149
- addons?:{billing_cycles?:number,id?:string,quantity?:number,quantity_in_decimal?:string,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
150
-
151
- event_based_addons?:{charge_on?:ChargeOn,charge_once?:boolean,id?:string,on_event?:OnEvent,quantity?:number,quantity_in_decimal?:string,service_period_in_days?:number,unit_price?:number,unit_price_in_decimal?:string}[];
152
-
153
- use_existing_balances?:boolean;
154
-
155
- invoice_immediately?:boolean;
156
-
157
- billing_cycles?:number;
158
-
159
- mandatory_addons_to_remove?:string[];
160
-
161
- terms_to_charge?:number;
162
-
163
- next_renewal_date?:number;
164
-
165
- charge_model?:'full_charge' | 'prorate';
166
-
167
- billing_alignment_mode?:'immediate' | 'delayed';
168
-
169
- referral_details?:string;
170
-
171
- invoice_date?:number;
172
-
173
- coupon_ids?:string[];
174
-
175
- allow_gift_plan?:boolean;
176
- }
177
- export interface CreateSubItemForCustomerEstimateResponse {
178
- estimate:Estimate;
241
+ use_existing_balances?: boolean;
242
+ invoice_immediately?: boolean;
243
+ billing_cycles?: number;
244
+ mandatory_addons_to_remove?: string[];
245
+ terms_to_charge?: number;
246
+ billing_alignment_mode?: 'immediate' | 'delayed';
247
+ invoice_date?: number;
248
+ coupon_ids?: string[];
249
+ subscription?: SubscriptionCreateSubForCustomerEstimateInputParam;
250
+ shipping_address?: ShippingAddressCreateSubForCustomerEstimateInputParam;
251
+ contract_term?: ContractTermCreateSubForCustomerEstimateInputParam;
252
+ addons?: AddonsCreateSubForCustomerEstimateInputParam[];
253
+ event_based_addons?: EventBasedAddonsCreateSubForCustomerEstimateInputParam[];
179
254
  }
180
255
  export interface CreateSubItemForCustomerEstimateInputParam {
181
-
182
- subscription?:{contract_term_billing_cycle_on_renewal?:number,free_period?:number,free_period_unit?:FreePeriodUnit,id?:string,setup_fee?:number,start_date?:number,trial_end?:number,trial_end_action?:TrialEndAction};
183
-
184
- shipping_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
185
-
186
- billing_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
187
-
188
- contract_term?:{action_at_term_end?:'renew' | 'evergreen' | 'cancel',cancellation_cutoff_period?:number,contract_start?:number};
189
-
190
- subscription_items:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,item_type?:ItemType,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
191
-
192
- discounts:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,included_in_mrr?:boolean,item_price_id?:string,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
193
-
194
- item_tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,item_price_id?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
195
-
196
- use_existing_balances?:boolean;
197
-
198
- invoice_immediately?:boolean;
199
-
200
- billing_cycles?:number;
201
-
202
- mandatory_items_to_remove?:string[];
203
-
204
- terms_to_charge?:number;
205
-
206
- billing_alignment_mode?:BillingAlignmentMode;
207
-
208
- invoice_date?:number;
209
-
210
- coupon_ids?:string[];
211
- }
212
- export interface UpdateSubscriptionResponse {
213
- estimate:Estimate;
256
+ use_existing_balances?: boolean;
257
+ invoice_immediately?: boolean;
258
+ billing_cycles?: number;
259
+ mandatory_items_to_remove?: string[];
260
+ terms_to_charge?: number;
261
+ billing_alignment_mode?: BillingAlignmentMode;
262
+ invoice_date?: number;
263
+ coupon_ids?: string[];
264
+ subscription?: SubscriptionCreateSubItemForCustomerEstimateInputParam;
265
+ shipping_address?: ShippingAddressCreateSubItemForCustomerEstimateInputParam;
266
+ billing_address?: BillingAddressCreateSubItemForCustomerEstimateInputParam;
267
+ contract_term?: ContractTermCreateSubItemForCustomerEstimateInputParam;
268
+ subscription_items?: SubscriptionItemsCreateSubItemForCustomerEstimateInputParam[];
269
+ discounts?: DiscountsCreateSubItemForCustomerEstimateInputParam[];
270
+ item_tiers?: ItemTiersCreateSubItemForCustomerEstimateInputParam[];
214
271
  }
215
272
  export interface UpdateSubscriptionInputParam {
216
-
217
- subscription:{auto_collection?:AutoCollection,coupon?:string,free_period?:number,free_period_unit?:FreePeriodUnit,id:string,offline_payment_method?:OfflinePaymentMethod,plan_id?:string,plan_quantity?:number,plan_quantity_in_decimal?:string,plan_unit_price?:number,plan_unit_price_in_decimal?:string,setup_fee?:number,start_date?:number,trial_end?:number,trial_end_action?:TrialEndAction};
218
-
219
- billing_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
220
-
221
- shipping_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
222
-
223
- customer?:{registered_for_gst?:boolean,taxability?:Taxability,vat_number?:string,vat_number_prefix?:string};
224
-
225
- addons?:{billing_cycles?:number,id?:string,proration_type?:ProrationType,quantity?:number,quantity_in_decimal?:string,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
226
-
227
- changes_scheduled_at?:number;
228
-
229
- change_option?:ChangeOption;
230
-
231
- event_based_addons?:{charge_on?:ChargeOn,charge_once?:boolean,id?:string,on_event?:OnEvent,quantity?:number,quantity_in_decimal?:string,service_period_in_days?:number,unit_price?:number,unit_price_in_decimal?:string}[];
232
-
233
- replace_addon_list?:boolean;
234
-
235
- mandatory_addons_to_remove?:string[];
236
-
237
- invoice_date?:number;
238
-
239
- billing_cycles?:number;
240
-
241
- terms_to_charge?:number;
242
-
243
- reactivate_from?:number;
244
-
245
- billing_alignment_mode?:BillingAlignmentMode;
246
-
247
- coupon_ids?:string[];
248
-
249
- replace_coupon_list?:boolean;
250
-
251
- prorate?:boolean;
252
-
253
- end_of_term?:boolean;
254
-
255
- force_term_reset?:boolean;
256
-
257
- reactivate?:boolean;
258
-
259
- include_delayed_charges?:boolean;
260
-
261
- use_existing_balances?:boolean;
262
-
263
- invoice_immediately?:boolean;
264
- }
265
- export interface UpdateSubscriptionForItemsResponse {
266
- estimate:Estimate;
273
+ changes_scheduled_at?: number;
274
+ change_option?: ChangeOption;
275
+ replace_addon_list?: boolean;
276
+ mandatory_addons_to_remove?: string[];
277
+ invoice_date?: number;
278
+ billing_cycles?: number;
279
+ terms_to_charge?: number;
280
+ reactivate_from?: number;
281
+ billing_alignment_mode?: BillingAlignmentMode;
282
+ coupon_ids?: string[];
283
+ replace_coupon_list?: boolean;
284
+ prorate?: boolean;
285
+ end_of_term?: boolean;
286
+ force_term_reset?: boolean;
287
+ reactivate?: boolean;
288
+ include_delayed_charges?: boolean;
289
+ use_existing_balances?: boolean;
290
+ invoice_immediately?: boolean;
291
+ subscription?: SubscriptionUpdateSubscriptionInputParam;
292
+ billing_address?: BillingAddressUpdateSubscriptionInputParam;
293
+ shipping_address?: ShippingAddressUpdateSubscriptionInputParam;
294
+ customer?: CustomerUpdateSubscriptionInputParam;
295
+ addons?: AddonsUpdateSubscriptionInputParam[];
296
+ event_based_addons?: EventBasedAddonsUpdateSubscriptionInputParam[];
267
297
  }
268
298
  export interface UpdateSubscriptionForItemsInputParam {
269
-
270
- subscription:{auto_collection?:AutoCollection,coupon?:string,free_period?:number,free_period_unit?:FreePeriodUnit,id:string,offline_payment_method?:OfflinePaymentMethod,setup_fee?:number,start_date?:number,trial_end?:number,trial_end_action?:TrialEndAction};
271
-
272
- billing_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
273
-
274
- shipping_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
275
-
276
- customer?:{registered_for_gst?:boolean,taxability?:Taxability,vat_number?:string,vat_number_prefix?:string};
277
-
278
- subscription_items:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,item_type?:ItemType,proration_type?:ProrationType,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
279
-
280
- discounts:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,id?:string,included_in_mrr?:boolean,item_price_id?:string,operation_type:OperationType,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
281
-
282
- item_tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,item_price_id?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
283
-
284
- changes_scheduled_at?:number;
285
-
286
- change_option?:ChangeOption;
287
-
288
- mandatory_items_to_remove?:string[];
289
-
290
- replace_items_list?:boolean;
291
-
292
- invoice_date?:number;
293
-
294
- billing_cycles?:number;
295
-
296
- terms_to_charge?:number;
297
-
298
- reactivate_from?:number;
299
-
300
- billing_alignment_mode?:BillingAlignmentMode;
301
-
302
- coupon_ids?:string[];
303
-
304
- replace_coupon_list?:boolean;
305
-
306
- prorate?:boolean;
307
-
308
- end_of_term?:boolean;
309
-
310
- force_term_reset?:boolean;
311
-
312
- reactivate?:boolean;
313
-
314
- include_delayed_charges?:boolean;
315
-
316
- use_existing_balances?:boolean;
317
-
318
- invoice_immediately?:boolean;
319
-
320
- invoice_usages?:boolean;
321
- }
322
- export interface RenewalEstimateResponse {
323
- estimate:Estimate;
299
+ changes_scheduled_at?: number;
300
+ change_option?: ChangeOption;
301
+ mandatory_items_to_remove?: string[];
302
+ replace_items_list?: boolean;
303
+ invoice_date?: number;
304
+ billing_cycles?: number;
305
+ terms_to_charge?: number;
306
+ reactivate_from?: number;
307
+ billing_alignment_mode?: BillingAlignmentMode;
308
+ coupon_ids?: string[];
309
+ replace_coupon_list?: boolean;
310
+ prorate?: boolean;
311
+ end_of_term?: boolean;
312
+ force_term_reset?: boolean;
313
+ reactivate?: boolean;
314
+ include_delayed_charges?: boolean;
315
+ use_existing_balances?: boolean;
316
+ invoice_immediately?: boolean;
317
+ invoice_usages?: boolean;
318
+ subscription?: SubscriptionUpdateSubscriptionForItemsInputParam;
319
+ billing_address?: BillingAddressUpdateSubscriptionForItemsInputParam;
320
+ shipping_address?: ShippingAddressUpdateSubscriptionForItemsInputParam;
321
+ customer?: CustomerUpdateSubscriptionForItemsInputParam;
322
+ subscription_items?: SubscriptionItemsUpdateSubscriptionForItemsInputParam[];
323
+ discounts?: DiscountsUpdateSubscriptionForItemsInputParam[];
324
+ item_tiers?: ItemTiersUpdateSubscriptionForItemsInputParam[];
324
325
  }
325
326
  export interface RenewalEstimateInputParam {
326
-
327
- include_delayed_charges?:boolean;
328
-
329
- use_existing_balances?:boolean;
330
-
331
- ignore_scheduled_cancellation?:boolean;
332
-
333
- ignore_scheduled_changes?:boolean;
334
- }
335
- export interface AdvanceInvoiceEstimateResponse {
336
- estimate:Estimate;
327
+ include_delayed_charges?: boolean;
328
+ use_existing_balances?: boolean;
329
+ ignore_scheduled_cancellation?: boolean;
330
+ ignore_scheduled_changes?: boolean;
337
331
  }
338
332
  export interface AdvanceInvoiceEstimateInputParam {
339
-
340
- fixed_interval_schedule?:{days_before_renewal?:number,end_date?:number,end_schedule_on?:EndScheduleOn,number_of_occurrences?:number};
341
-
342
- specific_dates_schedule?:{date?:number,terms_to_charge?:number}[];
343
-
344
- terms_to_charge?:number;
345
-
346
- invoice_immediately?:boolean;
347
-
348
- schedule_type?:ScheduleType;
349
- }
350
- export interface RegenerateInvoiceEstimateResponse {
351
- estimate:Estimate;
333
+ terms_to_charge?: number;
334
+ invoice_immediately?: boolean;
335
+ schedule_type?: ScheduleType;
336
+ fixed_interval_schedule?: FixedIntervalScheduleAdvanceInvoiceEstimateInputParam;
337
+ specific_dates_schedule?: SpecificDatesScheduleAdvanceInvoiceEstimateInputParam[];
352
338
  }
353
339
  export interface RegenerateInvoiceEstimateInputParam {
354
-
355
- date_from?:number;
356
-
357
- date_to?:number;
358
-
359
- prorate?:boolean;
360
-
361
- invoice_immediately?:boolean;
362
- }
363
- export interface UpcomingInvoicesEstimateResponse {
364
- estimate:Estimate;
365
- }
366
-
367
- export interface ChangeTermEndResponse {
368
- estimate:Estimate;
340
+ date_from?: number;
341
+ date_to?: number;
342
+ prorate?: boolean;
343
+ invoice_immediately?: boolean;
369
344
  }
370
345
  export interface ChangeTermEndInputParam {
371
-
372
- term_ends_at:number;
373
-
374
- prorate?:boolean;
375
-
376
- invoice_immediately?:boolean;
377
- }
378
- export interface CancelSubscriptionResponse {
379
- estimate:Estimate;
346
+ term_ends_at: number;
347
+ prorate?: boolean;
348
+ invoice_immediately?: boolean;
380
349
  }
381
350
  export interface CancelSubscriptionInputParam {
382
-
383
- cancel_option?:CancelOption;
384
-
385
- end_of_term?:boolean;
386
-
387
- cancel_at?:number;
388
-
389
- credit_option_for_current_term_charges?:CreditOptionForCurrentTermCharges;
390
-
391
- unbilled_charges_option?:UnbilledChargesOption;
392
-
393
- account_receivables_handling?:AccountReceivablesHandling;
394
-
395
- refundable_credits_handling?:RefundableCreditsHandling;
396
-
397
- contract_term_cancel_option?:ContractTermCancelOption;
398
-
399
- invoice_date?:number;
400
-
401
- event_based_addons?:{id?:string,quantity?:number,service_period_in_days?:number,unit_price?:number}[];
402
-
403
- cancel_reason_code?:string;
404
- }
405
- export interface CancelSubscriptionForItemsResponse {
406
- estimate:Estimate;
351
+ cancel_option?: CancelOption;
352
+ end_of_term?: boolean;
353
+ cancel_at?: number;
354
+ credit_option_for_current_term_charges?: CreditOptionForCurrentTermCharges;
355
+ unbilled_charges_option?: UnbilledChargesOption;
356
+ account_receivables_handling?: AccountReceivablesHandling;
357
+ refundable_credits_handling?: RefundableCreditsHandling;
358
+ contract_term_cancel_option?: ContractTermCancelOption;
359
+ invoice_date?: number;
360
+ cancel_reason_code?: string;
361
+ event_based_addons?: EventBasedAddonsCancelSubscriptionInputParam[];
407
362
  }
408
363
  export interface CancelSubscriptionForItemsInputParam {
409
-
410
- cancel_option?:CancelOption;
411
-
412
- end_of_term?:boolean;
413
-
414
- cancel_at?:number;
415
-
416
- credit_option_for_current_term_charges?:CreditOptionForCurrentTermCharges;
417
-
418
- unbilled_charges_option?:UnbilledChargesOption;
419
-
420
- account_receivables_handling?:AccountReceivablesHandling;
421
-
422
- refundable_credits_handling?:RefundableCreditsHandling;
423
-
424
- contract_term_cancel_option?:ContractTermCancelOption;
425
-
426
- invoice_date?:number;
427
-
428
- subscription_items?:{item_price_id?:string,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,unit_price?:number,unit_price_in_decimal?:string}[];
429
-
430
- cancel_reason_code?:string;
431
- }
432
- export interface PauseSubscriptionResponse {
433
- estimate:Estimate;
364
+ cancel_option?: CancelOption;
365
+ end_of_term?: boolean;
366
+ cancel_at?: number;
367
+ credit_option_for_current_term_charges?: CreditOptionForCurrentTermCharges;
368
+ unbilled_charges_option?: UnbilledChargesOption;
369
+ account_receivables_handling?: AccountReceivablesHandling;
370
+ refundable_credits_handling?: RefundableCreditsHandling;
371
+ contract_term_cancel_option?: ContractTermCancelOption;
372
+ invoice_date?: number;
373
+ cancel_reason_code?: string;
374
+ subscription_items?: SubscriptionItemsCancelSubscriptionForItemsInputParam[];
434
375
  }
435
376
  export interface PauseSubscriptionInputParam {
436
-
437
- subscription?:{pause_date?:number,resume_date?:number,skip_billing_cycles?:number};
438
-
439
- pause_option?:PauseOption;
440
-
441
- unbilled_charges_handling?:UnbilledChargesHandling;
442
- }
443
- export interface ResumeSubscriptionResponse {
444
- estimate:Estimate;
377
+ pause_option?: PauseOption;
378
+ unbilled_charges_handling?: UnbilledChargesHandling;
379
+ subscription?: SubscriptionPauseSubscriptionInputParam;
445
380
  }
446
381
  export interface ResumeSubscriptionInputParam {
447
-
448
- subscription?:{resume_date?:number};
449
-
450
- resume_option?:ResumeOption;
451
-
452
- charges_handling?:ChargesHandling;
453
- }
454
- export interface GiftSubscriptionResponse {
455
- estimate:Estimate;
382
+ resume_option?: ResumeOption;
383
+ charges_handling?: ChargesHandling;
384
+ subscription?: SubscriptionResumeSubscriptionInputParam;
456
385
  }
457
386
  export interface GiftSubscriptionInputParam {
458
-
459
- gift?:{auto_claim?:boolean,claim_expiry_date?:number,no_expiry?:boolean,scheduled_at?:number};
460
-
461
- gifter:{customer_id:string,note?:string,payment_src_id?:string,signature:string};
462
-
463
- gift_receiver:{customer_id:string,email:string,first_name:string,last_name:string};
464
-
465
- payment_intent?:{additional_information?:object,gateway_account_id?:string,gw_payment_method_id?:string,gw_token?:string,id?:string,payment_method_type?:'card' | 'ideal' | 'sofort' | 'bancontact' | 'google_pay' | 'dotpay' | 'giropay' | 'apple_pay' | 'upi' | 'netbanking_emandates' | 'paypal_express_checkout' | 'direct_debit' | 'boleto' | 'venmo' | 'amazon_payments' | 'pay_to' | 'faster_payments' | 'sepa_instant_transfer' | 'klarna_pay_now' | 'online_banking_poland',reference_id?:string};
466
-
467
- shipping_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
468
-
469
- subscription:{plan_id:string,plan_quantity?:number,plan_quantity_in_decimal?:string};
470
-
471
- addons?:{id?:string,quantity?:number,quantity_in_decimal?:string}[];
472
-
473
- coupon_ids?:string[];
474
- }
475
- export interface GiftSubscriptionForItemsResponse {
476
- estimate:Estimate;
387
+ coupon_ids?: string[];
388
+ gift?: GiftGiftSubscriptionInputParam;
389
+ gifter?: GifterGiftSubscriptionInputParam;
390
+ gift_receiver?: GiftReceiverGiftSubscriptionInputParam;
391
+ payment_intent?: PaymentIntentGiftSubscriptionInputParam;
392
+ shipping_address?: ShippingAddressGiftSubscriptionInputParam;
393
+ subscription?: SubscriptionGiftSubscriptionInputParam;
394
+ addons?: AddonsGiftSubscriptionInputParam[];
477
395
  }
478
396
  export interface GiftSubscriptionForItemsInputParam {
479
-
480
- gift?:{auto_claim?:boolean,claim_expiry_date?:number,no_expiry?:boolean,scheduled_at?:number};
481
-
482
- gifter:{customer_id:string,note?:string,payment_src_id?:string,signature:string};
483
-
484
- gift_receiver:{customer_id:string,email:string,first_name:string,last_name:string};
485
-
486
- payment_intent?:{additional_information?:object,gateway_account_id?:string,gw_payment_method_id?:string,gw_token?:string,id?:string,payment_method_type?:'card' | 'ideal' | 'sofort' | 'bancontact' | 'google_pay' | 'dotpay' | 'giropay' | 'apple_pay' | 'upi' | 'netbanking_emandates' | 'paypal_express_checkout' | 'direct_debit' | 'boleto' | 'venmo' | 'amazon_payments' | 'pay_to' | 'faster_payments' | 'sepa_instant_transfer' | 'klarna_pay_now' | 'online_banking_poland',reference_id?:string};
487
-
488
- shipping_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
489
-
490
- subscription_items?:{item_price_id?:string,quantity?:number,quantity_in_decimal?:string}[];
491
-
492
- coupon_ids?:string[];
493
- }
494
- export interface CreateInvoiceResponse {
495
- estimate:Estimate;
397
+ coupon_ids?: string[];
398
+ gift?: GiftGiftSubscriptionForItemsInputParam;
399
+ gifter?: GifterGiftSubscriptionForItemsInputParam;
400
+ gift_receiver?: GiftReceiverGiftSubscriptionForItemsInputParam;
401
+ payment_intent?: PaymentIntentGiftSubscriptionForItemsInputParam;
402
+ shipping_address?: ShippingAddressGiftSubscriptionForItemsInputParam;
403
+ subscription_items?: SubscriptionItemsGiftSubscriptionForItemsInputParam[];
496
404
  }
497
405
  export interface CreateInvoiceInputParam {
498
-
499
- invoice?:{customer_id?:string,po_number?:string,subscription_id?:string};
500
-
501
- shipping_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
502
-
503
- addons?:{date_from?:number,date_to?:number,id?:string,quantity?:number,quantity_in_decimal?:string,unit_price?:number,unit_price_in_decimal?:string}[];
504
-
505
- charges?:{amount?:number,amount_in_decimal?:string,avalara_sale_type?:AvalaraSaleType,avalara_service_type?:number,avalara_tax_code?:string,avalara_transaction_type?:number,date_from?:number,date_to?:number,description?:string,hsn_code?:string,tax_profile_id?:string,taxable?:boolean,taxjar_product_code?:string}[];
506
-
507
- notes_to_remove?:{entity_id?:string,entity_type?:EntityType}[];
508
-
509
- tax_providers_fields?:{field_id?:string,field_value?:string,provider_name?:string}[];
510
-
511
- currency_code?:string;
512
-
513
- invoice_note?:string;
514
-
515
- remove_general_note?:boolean;
516
-
517
- coupon?:string;
518
-
519
- coupon_ids?:string[];
520
-
521
- authorization_transaction_id?:string;
522
-
523
- payment_source_id?:string;
524
-
525
- auto_collection?:AutoCollection;
526
-
527
- invoice_date?:number;
528
- }
529
- export interface CreateInvoiceForItemsResponse {
530
- estimate:Estimate;
406
+ currency_code?: string;
407
+ invoice_note?: string;
408
+ remove_general_note?: boolean /**
409
+ * @deprecated Please refer API docs to use other attributes
410
+ */;
411
+
412
+ coupon?: string;
413
+ coupon_ids?: string[];
414
+ authorization_transaction_id?: string;
415
+ payment_source_id?: string;
416
+ auto_collection?: AutoCollection;
417
+ invoice_date?: number;
418
+ invoice?: InvoiceCreateInvoiceInputParam;
419
+ shipping_address?: ShippingAddressCreateInvoiceInputParam;
420
+ addons?: AddonsCreateInvoiceInputParam[];
421
+ charges?: ChargesCreateInvoiceInputParam[];
422
+ notes_to_remove?: NotesToRemoveCreateInvoiceInputParam[];
423
+ tax_providers_fields?: TaxProvidersFieldsCreateInvoiceInputParam[];
531
424
  }
532
425
  export interface CreateInvoiceForItemsInputParam {
533
-
534
- invoice?:{customer_id?:string,po_number?:string,subscription_id?:string};
535
-
536
- shipping_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
537
-
538
- item_prices?:{date_from?:number,date_to?:number,item_price_id?:string,quantity?:number,quantity_in_decimal?:string,unit_price?:number,unit_price_in_decimal?:string}[];
539
-
540
- item_tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,item_price_id?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
541
-
542
- charges?:{amount?:number,amount_in_decimal?:string,avalara_sale_type?:AvalaraSaleType,avalara_service_type?:number,avalara_tax_code?:string,avalara_transaction_type?:number,date_from?:number,date_to?:number,description?:string,hsn_code?:string,tax_profile_id?:string,taxable?:boolean,taxjar_product_code?:string}[];
543
-
544
- notes_to_remove?:{entity_id?:string,entity_type?:EntityType}[];
545
-
546
- discounts:{amount?:number,apply_on:ApplyOn,item_price_id?:string,percentage?:number}[];
547
-
548
- tax_providers_fields?:{field_id?:string,field_value?:string,provider_name?:string}[];
549
-
550
- currency_code?:string;
551
-
552
- invoice_note?:string;
553
-
554
- remove_general_note?:boolean;
555
-
556
- coupon?:string;
557
-
558
- coupon_ids?:string[];
559
-
560
- authorization_transaction_id?:string;
561
-
562
- payment_source_id?:string;
563
-
564
- auto_collection?:AutoCollection;
565
-
566
- invoice_date?:number;
567
- }
568
-
426
+ currency_code?: string;
427
+ invoice_note?: string;
428
+ remove_general_note?: boolean /**
429
+ * @deprecated Please refer API docs to use other attributes
430
+ */;
431
+
432
+ coupon?: string;
433
+ coupon_ids?: string[];
434
+ authorization_transaction_id?: string;
435
+ payment_source_id?: string;
436
+ auto_collection?: AutoCollection;
437
+ invoice_date?: number;
438
+ invoice?: InvoiceCreateInvoiceForItemsInputParam;
439
+ shipping_address?: ShippingAddressCreateInvoiceForItemsInputParam;
440
+ item_prices?: ItemPricesCreateInvoiceForItemsInputParam[];
441
+ item_tiers?: ItemTiersCreateInvoiceForItemsInputParam[];
442
+ charges?: ChargesCreateInvoiceForItemsInputParam[];
443
+ notes_to_remove?: NotesToRemoveCreateInvoiceForItemsInputParam[];
444
+ discounts?: DiscountsCreateInvoiceForItemsInputParam[];
445
+ tax_providers_fields?: TaxProvidersFieldsCreateInvoiceForItemsInputParam[];
446
+ }
447
+ export interface BillingAddressCreateSubscriptionInputParam {
448
+ line1?: string;
449
+ line2?: string;
450
+ line3?: string;
451
+ city?: string;
452
+ state_code?: string;
453
+ zip?: string;
454
+ country?: string;
455
+ validation_status?: ValidationStatus;
456
+ }
457
+ export interface CustomerCreateSubscriptionInputParam {
458
+ vat_number?: string;
459
+ vat_number_prefix?: string;
460
+ registered_for_gst?: boolean;
461
+ taxability?: Taxability;
462
+ entity_code?: EntityCode;
463
+ exempt_number?: string;
464
+ exemption_details?: any;
465
+ customer_type?: CustomerType;
466
+ }
467
+ export interface ShippingAddressCreateSubscriptionInputParam {
468
+ line1?: string;
469
+ line2?: string;
470
+ line3?: string;
471
+ city?: string;
472
+ state_code?: string;
473
+ zip?: string;
474
+ country?: string;
475
+ validation_status?: ValidationStatus;
476
+ }
477
+ export interface ContractTermCreateSubscriptionInputParam {
478
+ action_at_term_end?: 'renew' | 'evergreen' | 'cancel';
479
+ cancellation_cutoff_period?: number;
480
+ }
481
+ export interface SubscriptionCreateSubscriptionInputParam {
482
+ id?: string;
483
+ plan_id: string;
484
+ plan_quantity?: number;
485
+ plan_quantity_in_decimal?: string;
486
+ plan_unit_price?: number;
487
+ plan_unit_price_in_decimal?: string;
488
+ setup_fee?: number;
489
+ trial_end?: number;
490
+ start_date?: number;
491
+ /**
492
+ * @deprecated Please refer API docs to use other attributes
493
+ */
494
+ coupon?: string;
495
+ offline_payment_method?: OfflinePaymentMethod;
496
+ free_period?: number;
497
+ free_period_unit?: FreePeriodUnit;
498
+ contract_term_billing_cycle_on_renewal?: number;
499
+ trial_end_action?: TrialEndAction;
500
+ }
501
+
502
+ export interface EventBasedAddonsCreateSubscriptionInputParam {
503
+ id?: string;
504
+ quantity?: number;
505
+ unit_price?: number;
506
+ quantity_in_decimal?: string;
507
+ unit_price_in_decimal?: string;
508
+ service_period_in_days?: number;
509
+ on_event?: OnEvent;
510
+ charge_once?: boolean;
511
+ charge_on?: ChargeOn;
512
+ }
513
+ export interface AddonsCreateSubscriptionInputParam {
514
+ id?: string;
515
+ quantity?: number;
516
+ quantity_in_decimal?: string;
517
+ unit_price?: number;
518
+ unit_price_in_decimal?: string;
519
+ billing_cycles?: number;
520
+ trial_end?: number;
521
+ }
522
+ export interface TaxProvidersFieldsCreateSubscriptionInputParam {
523
+ provider_name?: string;
524
+ field_id?: string;
525
+ field_value?: string;
526
+ }
527
+ export interface BillingAddressCreateSubItemEstimateInputParam {
528
+ line1?: string;
529
+ line2?: string;
530
+ line3?: string;
531
+ city?: string;
532
+ state_code?: string;
533
+ zip?: string;
534
+ country?: string;
535
+ validation_status?: ValidationStatus;
536
+ }
537
+ export interface CustomerCreateSubItemEstimateInputParam {
538
+ vat_number?: string;
539
+ vat_number_prefix?: string;
540
+ registered_for_gst?: boolean;
541
+ taxability?: Taxability;
542
+ entity_code?: EntityCode;
543
+ exempt_number?: string;
544
+ exemption_details?: any;
545
+ customer_type?: CustomerType;
546
+ }
547
+ export interface ShippingAddressCreateSubItemEstimateInputParam {
548
+ line1?: string;
549
+ line2?: string;
550
+ line3?: string;
551
+ city?: string;
552
+ state_code?: string;
553
+ zip?: string;
554
+ country?: string;
555
+ validation_status?: ValidationStatus;
556
+ }
557
+ export interface ContractTermCreateSubItemEstimateInputParam {
558
+ action_at_term_end?: 'renew' | 'evergreen' | 'cancel';
559
+ /**
560
+ * @deprecated Please refer API docs to use other attributes
561
+ */
562
+ contract_start?: number;
563
+ cancellation_cutoff_period?: number;
564
+ }
565
+ export interface SubscriptionCreateSubItemEstimateInputParam {
566
+ id?: string;
567
+ trial_end?: number;
568
+ /**
569
+ * @deprecated Please refer API docs to use other attributes
570
+ */
571
+ setup_fee?: number;
572
+ start_date?: number;
573
+ /**
574
+ * @deprecated Please refer API docs to use other attributes
575
+ */
576
+ coupon?: string;
577
+ free_period?: number;
578
+ free_period_unit?: FreePeriodUnit;
579
+ contract_term_billing_cycle_on_renewal?: number;
580
+ trial_end_action?: TrialEndAction;
581
+ }
582
+
583
+ export interface SubscriptionItemsCreateSubItemEstimateInputParam {
584
+ item_price_id: string;
585
+ quantity?: number;
586
+ quantity_in_decimal?: string;
587
+ unit_price?: number;
588
+ unit_price_in_decimal?: string;
589
+ billing_cycles?: number;
590
+ trial_end?: number;
591
+ service_period_days?: number;
592
+ charge_on_event?: ChargeOnEvent;
593
+ charge_once?: boolean;
594
+ /**
595
+ * @deprecated Please refer API docs to use other attributes
596
+ */
597
+ item_type?: ItemType;
598
+ charge_on_option?: ChargeOnOption;
599
+ }
600
+ export interface DiscountsCreateSubItemEstimateInputParam {
601
+ apply_on: ApplyOn;
602
+ duration_type: DurationType;
603
+ percentage?: number;
604
+ amount?: number;
605
+ period?: number;
606
+ period_unit?: PeriodUnit;
607
+ included_in_mrr?: boolean;
608
+ item_price_id?: string;
609
+ }
610
+ export interface ItemTiersCreateSubItemEstimateInputParam {
611
+ item_price_id?: string;
612
+ starting_unit?: number;
613
+ ending_unit?: number;
614
+ price?: number;
615
+ starting_unit_in_decimal?: string;
616
+ ending_unit_in_decimal?: string;
617
+ price_in_decimal?: string;
618
+ }
619
+ export interface TaxProvidersFieldsCreateSubItemEstimateInputParam {
620
+ provider_name?: string;
621
+ field_id?: string;
622
+ field_value?: string;
623
+ }
624
+ export interface ShippingAddressCreateSubForCustomerEstimateInputParam {
625
+ line1?: string;
626
+ line2?: string;
627
+ line3?: string;
628
+ city?: string;
629
+ state_code?: string;
630
+ zip?: string;
631
+ country?: string;
632
+ validation_status?: ValidationStatus;
633
+ }
634
+ export interface ContractTermCreateSubForCustomerEstimateInputParam {
635
+ action_at_term_end?: 'renew' | 'evergreen' | 'cancel';
636
+ cancellation_cutoff_period?: number;
637
+ }
638
+ export interface SubscriptionCreateSubForCustomerEstimateInputParam {
639
+ id?: string;
640
+ plan_id: string;
641
+ plan_quantity?: number;
642
+ plan_quantity_in_decimal?: string;
643
+ plan_unit_price?: number;
644
+ plan_unit_price_in_decimal?: string;
645
+ setup_fee?: number;
646
+ trial_end?: number;
647
+ start_date?: number;
648
+ offline_payment_method?: OfflinePaymentMethod;
649
+ free_period?: number;
650
+ free_period_unit?: FreePeriodUnit;
651
+ contract_term_billing_cycle_on_renewal?: number;
652
+ trial_end_action?: TrialEndAction;
653
+ }
654
+
655
+ export interface EventBasedAddonsCreateSubForCustomerEstimateInputParam {
656
+ id?: string;
657
+ quantity?: number;
658
+ unit_price?: number;
659
+ quantity_in_decimal?: string;
660
+ unit_price_in_decimal?: string;
661
+ service_period_in_days?: number;
662
+ on_event?: OnEvent;
663
+ charge_once?: boolean;
664
+ charge_on?: ChargeOn;
665
+ }
666
+ export interface AddonsCreateSubForCustomerEstimateInputParam {
667
+ id?: string;
668
+ quantity?: number;
669
+ quantity_in_decimal?: string;
670
+ unit_price?: number;
671
+ unit_price_in_decimal?: string;
672
+ billing_cycles?: number;
673
+ trial_end?: number;
674
+ }
675
+ export interface BillingAddressCreateSubItemForCustomerEstimateInputParam {
676
+ line1?: string;
677
+ line2?: string;
678
+ line3?: string;
679
+ city?: string;
680
+ state_code?: string;
681
+ zip?: string;
682
+ country?: string;
683
+ validation_status?: ValidationStatus;
684
+ }
685
+ export interface ShippingAddressCreateSubItemForCustomerEstimateInputParam {
686
+ line1?: string;
687
+ line2?: string;
688
+ line3?: string;
689
+ city?: string;
690
+ state_code?: string;
691
+ zip?: string;
692
+ country?: string;
693
+ validation_status?: ValidationStatus;
694
+ }
695
+ export interface ContractTermCreateSubItemForCustomerEstimateInputParam {
696
+ action_at_term_end?: 'renew' | 'evergreen' | 'cancel';
697
+ /**
698
+ * @deprecated Please refer API docs to use other attributes
699
+ */
700
+ contract_start?: number;
701
+ cancellation_cutoff_period?: number;
702
+ }
703
+ export interface SubscriptionCreateSubItemForCustomerEstimateInputParam {
704
+ id?: string;
705
+ trial_end?: number;
706
+ /**
707
+ * @deprecated Please refer API docs to use other attributes
708
+ */
709
+ setup_fee?: number;
710
+ start_date?: number;
711
+ free_period?: number;
712
+ free_period_unit?: FreePeriodUnit;
713
+ contract_term_billing_cycle_on_renewal?: number;
714
+ trial_end_action?: TrialEndAction;
715
+ }
716
+
717
+ export interface SubscriptionItemsCreateSubItemForCustomerEstimateInputParam {
718
+ item_price_id: string;
719
+ quantity?: number;
720
+ quantity_in_decimal?: string;
721
+ unit_price?: number;
722
+ unit_price_in_decimal?: string;
723
+ billing_cycles?: number;
724
+ trial_end?: number;
725
+ service_period_days?: number;
726
+ charge_on_event?: ChargeOnEvent;
727
+ charge_once?: boolean;
728
+ /**
729
+ * @deprecated Please refer API docs to use other attributes
730
+ */
731
+ item_type?: ItemType;
732
+ charge_on_option?: ChargeOnOption;
733
+ }
734
+ export interface DiscountsCreateSubItemForCustomerEstimateInputParam {
735
+ apply_on: ApplyOn;
736
+ duration_type: DurationType;
737
+ percentage?: number;
738
+ amount?: number;
739
+ period?: number;
740
+ period_unit?: PeriodUnit;
741
+ included_in_mrr?: boolean;
742
+ item_price_id?: string;
743
+ }
744
+ export interface ItemTiersCreateSubItemForCustomerEstimateInputParam {
745
+ item_price_id?: string;
746
+ starting_unit?: number;
747
+ ending_unit?: number;
748
+ price?: number;
749
+ starting_unit_in_decimal?: string;
750
+ ending_unit_in_decimal?: string;
751
+ price_in_decimal?: string;
752
+ }
753
+ export interface BillingAddressUpdateSubscriptionInputParam {
754
+ line1?: string;
755
+ line2?: string;
756
+ line3?: string;
757
+ city?: string;
758
+ state_code?: string;
759
+ zip?: string;
760
+ country?: string;
761
+ validation_status?: ValidationStatus;
762
+ }
763
+ export interface CustomerUpdateSubscriptionInputParam {
764
+ vat_number?: string;
765
+ vat_number_prefix?: string;
766
+ registered_for_gst?: boolean;
767
+ /**
768
+ * @deprecated Please refer API docs to use other attributes
769
+ */
770
+ taxability?: Taxability;
771
+ }
772
+ export interface ShippingAddressUpdateSubscriptionInputParam {
773
+ line1?: string;
774
+ line2?: string;
775
+ line3?: string;
776
+ city?: string;
777
+ state_code?: string;
778
+ zip?: string;
779
+ country?: string;
780
+ validation_status?: ValidationStatus;
781
+ }
782
+ export interface SubscriptionUpdateSubscriptionInputParam {
783
+ id: string;
784
+ plan_id?: string;
785
+ plan_quantity?: number;
786
+ plan_unit_price?: number;
787
+ setup_fee?: number;
788
+ plan_quantity_in_decimal?: string;
789
+ plan_unit_price_in_decimal?: string;
790
+ start_date?: number;
791
+ trial_end?: number;
792
+ /**
793
+ * @deprecated Please refer API docs to use other attributes
794
+ */
795
+ coupon?: string;
796
+ auto_collection?: AutoCollection;
797
+ offline_payment_method?: OfflinePaymentMethod;
798
+ free_period?: number;
799
+ free_period_unit?: FreePeriodUnit;
800
+ trial_end_action?: TrialEndAction;
801
+ }
802
+
803
+ export interface EventBasedAddonsUpdateSubscriptionInputParam {
804
+ id?: string;
805
+ quantity?: number;
806
+ unit_price?: number;
807
+ service_period_in_days?: number;
808
+ charge_on?: ChargeOn;
809
+ on_event?: OnEvent;
810
+ charge_once?: boolean;
811
+ quantity_in_decimal?: string;
812
+ unit_price_in_decimal?: string;
813
+ }
814
+ export interface AddonsUpdateSubscriptionInputParam {
815
+ id?: string;
816
+ quantity?: number;
817
+ unit_price?: number;
818
+ billing_cycles?: number;
819
+ quantity_in_decimal?: string;
820
+ unit_price_in_decimal?: string;
821
+ trial_end?: number;
822
+ proration_type?: ProrationType;
823
+ }
824
+ export interface BillingAddressUpdateSubscriptionForItemsInputParam {
825
+ line1?: string;
826
+ line2?: string;
827
+ line3?: string;
828
+ city?: string;
829
+ state_code?: string;
830
+ zip?: string;
831
+ country?: string;
832
+ validation_status?: ValidationStatus;
833
+ }
834
+ export interface CustomerUpdateSubscriptionForItemsInputParam {
835
+ vat_number?: string;
836
+ vat_number_prefix?: string;
837
+ registered_for_gst?: boolean;
838
+ /**
839
+ * @deprecated Please refer API docs to use other attributes
840
+ */
841
+ taxability?: Taxability;
842
+ }
843
+ export interface ShippingAddressUpdateSubscriptionForItemsInputParam {
844
+ line1?: string;
845
+ line2?: string;
846
+ line3?: string;
847
+ city?: string;
848
+ state_code?: string;
849
+ zip?: string;
850
+ country?: string;
851
+ validation_status?: ValidationStatus;
852
+ }
853
+ export interface SubscriptionUpdateSubscriptionForItemsInputParam {
854
+ id: string;
855
+ /**
856
+ * @deprecated Please refer API docs to use other attributes
857
+ */
858
+ setup_fee?: number;
859
+ start_date?: number;
860
+ trial_end?: number;
861
+ /**
862
+ * @deprecated Please refer API docs to use other attributes
863
+ */
864
+ coupon?: string;
865
+ auto_collection?: AutoCollection;
866
+ offline_payment_method?: OfflinePaymentMethod;
867
+ free_period?: number;
868
+ free_period_unit?: FreePeriodUnit;
869
+ trial_end_action?: TrialEndAction;
870
+ }
871
+
872
+ export interface SubscriptionItemsUpdateSubscriptionForItemsInputParam {
873
+ item_price_id: string;
874
+ quantity?: number;
875
+ quantity_in_decimal?: string;
876
+ unit_price?: number;
877
+ unit_price_in_decimal?: string;
878
+ billing_cycles?: number;
879
+ trial_end?: number;
880
+ service_period_days?: number;
881
+ charge_on_event?: ChargeOnEvent;
882
+ charge_once?: boolean;
883
+ charge_on_option?: ChargeOnOption;
884
+ /**
885
+ * @deprecated Please refer API docs to use other attributes
886
+ */
887
+ item_type?: ItemType;
888
+ proration_type?: ProrationType;
889
+ }
890
+ export interface DiscountsUpdateSubscriptionForItemsInputParam {
891
+ apply_on: ApplyOn;
892
+ duration_type: DurationType;
893
+ percentage?: number;
894
+ amount?: number;
895
+ period?: number;
896
+ period_unit?: PeriodUnit;
897
+ included_in_mrr?: boolean;
898
+ item_price_id?: string;
899
+ operation_type: OperationType;
900
+ id?: string;
901
+ }
902
+ export interface ItemTiersUpdateSubscriptionForItemsInputParam {
903
+ item_price_id?: string;
904
+ starting_unit?: number;
905
+ ending_unit?: number;
906
+ price?: number;
907
+ starting_unit_in_decimal?: string;
908
+ ending_unit_in_decimal?: string;
909
+ price_in_decimal?: string;
910
+ }
911
+ export interface FixedIntervalScheduleAdvanceInvoiceEstimateInputParam {
912
+ number_of_occurrences?: number;
913
+ days_before_renewal?: number;
914
+ end_schedule_on?: EndScheduleOn;
915
+ end_date?: number;
916
+ }
917
+
918
+ export interface SpecificDatesScheduleAdvanceInvoiceEstimateInputParam {
919
+ terms_to_charge?: number;
920
+ date?: number;
921
+ }
922
+ export interface EventBasedAddonsCancelSubscriptionInputParam {
923
+ id?: string;
924
+ quantity?: number;
925
+ unit_price?: number;
926
+ service_period_in_days?: number;
927
+ }
928
+ export interface SubscriptionItemsCancelSubscriptionForItemsInputParam {
929
+ item_price_id?: string;
930
+ quantity?: number;
931
+ quantity_in_decimal?: string;
932
+ unit_price?: number;
933
+ unit_price_in_decimal?: string;
934
+ service_period_days?: number;
935
+ }
936
+ export interface SubscriptionPauseSubscriptionInputParam {
937
+ pause_date?: number;
938
+ resume_date?: number;
939
+ skip_billing_cycles?: number;
940
+ }
941
+
942
+ export interface SubscriptionResumeSubscriptionInputParam {
943
+ resume_date?: number;
944
+ }
945
+
946
+ export interface GiftGiftSubscriptionInputParam {
947
+ scheduled_at?: number;
948
+ auto_claim?: boolean;
949
+ no_expiry?: boolean;
950
+ claim_expiry_date?: number;
951
+ }
952
+ export interface GiftReceiverGiftSubscriptionInputParam {
953
+ customer_id: string;
954
+ first_name: string;
955
+ last_name: string;
956
+ email: string;
957
+ }
958
+ export interface GifterGiftSubscriptionInputParam {
959
+ customer_id: string;
960
+ signature: string;
961
+ note?: string;
962
+ payment_src_id?: string;
963
+ }
964
+ export interface ShippingAddressGiftSubscriptionInputParam {
965
+ first_name?: string;
966
+ last_name?: string;
967
+ email?: string;
968
+ company?: string;
969
+ phone?: string;
970
+ line1?: string;
971
+ line2?: string;
972
+ line3?: string;
973
+ city?: string;
974
+ state_code?: string;
975
+ state?: string;
976
+ zip?: string;
977
+ country?: string;
978
+ validation_status?: ValidationStatus;
979
+ }
980
+ export interface PaymentIntentGiftSubscriptionInputParam {
981
+ id?: string;
982
+ gateway_account_id?: string;
983
+ gw_token?: string;
984
+ payment_method_type?:
985
+ | 'card'
986
+ | 'ideal'
987
+ | 'sofort'
988
+ | 'bancontact'
989
+ | 'google_pay'
990
+ | 'dotpay'
991
+ | 'giropay'
992
+ | 'apple_pay'
993
+ | 'upi'
994
+ | 'netbanking_emandates'
995
+ | 'paypal_express_checkout'
996
+ | 'direct_debit'
997
+ | 'boleto'
998
+ | 'venmo'
999
+ | 'amazon_payments'
1000
+ | 'pay_to'
1001
+ | 'faster_payments'
1002
+ | 'sepa_instant_transfer'
1003
+ | 'klarna_pay_now'
1004
+ | 'online_banking_poland';
1005
+ reference_id?: string;
1006
+ /**
1007
+ * @deprecated Please refer API docs to use other attributes
1008
+ */
1009
+ gw_payment_method_id?: string;
1010
+ additional_information?: any;
1011
+ }
1012
+ export interface SubscriptionGiftSubscriptionInputParam {
1013
+ plan_id: string;
1014
+ plan_quantity?: number;
1015
+ plan_quantity_in_decimal?: string;
1016
+ }
1017
+
1018
+ export interface AddonsGiftSubscriptionInputParam {
1019
+ id?: string;
1020
+ quantity?: number;
1021
+ quantity_in_decimal?: string;
1022
+ }
1023
+ export interface GiftGiftSubscriptionForItemsInputParam {
1024
+ scheduled_at?: number;
1025
+ auto_claim?: boolean;
1026
+ no_expiry?: boolean;
1027
+ claim_expiry_date?: number;
1028
+ }
1029
+ export interface GiftReceiverGiftSubscriptionForItemsInputParam {
1030
+ customer_id: string;
1031
+ first_name: string;
1032
+ last_name: string;
1033
+ email: string;
1034
+ }
1035
+ export interface GifterGiftSubscriptionForItemsInputParam {
1036
+ customer_id: string;
1037
+ signature: string;
1038
+ note?: string;
1039
+ payment_src_id?: string;
1040
+ }
1041
+ export interface ShippingAddressGiftSubscriptionForItemsInputParam {
1042
+ first_name?: string;
1043
+ last_name?: string;
1044
+ email?: string;
1045
+ company?: string;
1046
+ phone?: string;
1047
+ line1?: string;
1048
+ line2?: string;
1049
+ line3?: string;
1050
+ city?: string;
1051
+ state_code?: string;
1052
+ state?: string;
1053
+ zip?: string;
1054
+ country?: string;
1055
+ validation_status?: ValidationStatus;
1056
+ }
1057
+ export interface PaymentIntentGiftSubscriptionForItemsInputParam {
1058
+ id?: string;
1059
+ gateway_account_id?: string;
1060
+ gw_token?: string;
1061
+ payment_method_type?:
1062
+ | 'card'
1063
+ | 'ideal'
1064
+ | 'sofort'
1065
+ | 'bancontact'
1066
+ | 'google_pay'
1067
+ | 'dotpay'
1068
+ | 'giropay'
1069
+ | 'apple_pay'
1070
+ | 'upi'
1071
+ | 'netbanking_emandates'
1072
+ | 'paypal_express_checkout'
1073
+ | 'direct_debit'
1074
+ | 'boleto'
1075
+ | 'venmo'
1076
+ | 'amazon_payments'
1077
+ | 'pay_to'
1078
+ | 'faster_payments'
1079
+ | 'sepa_instant_transfer'
1080
+ | 'klarna_pay_now'
1081
+ | 'online_banking_poland';
1082
+ reference_id?: string;
1083
+ /**
1084
+ * @deprecated Please refer API docs to use other attributes
1085
+ */
1086
+ gw_payment_method_id?: string;
1087
+ additional_information?: any;
1088
+ }
1089
+
1090
+ export interface SubscriptionItemsGiftSubscriptionForItemsInputParam {
1091
+ item_price_id?: string;
1092
+ quantity?: number;
1093
+ quantity_in_decimal?: string;
1094
+ }
1095
+ export interface InvoiceCreateInvoiceInputParam {
1096
+ customer_id?: string;
1097
+ subscription_id?: string;
1098
+ po_number?: string;
1099
+ }
1100
+ export interface ShippingAddressCreateInvoiceInputParam {
1101
+ first_name?: string;
1102
+ last_name?: string;
1103
+ email?: string;
1104
+ company?: string;
1105
+ phone?: string;
1106
+ line1?: string;
1107
+ line2?: string;
1108
+ line3?: string;
1109
+ city?: string;
1110
+ state_code?: string;
1111
+ state?: string;
1112
+ zip?: string;
1113
+ country?: string;
1114
+ validation_status?: ValidationStatus;
1115
+ }
1116
+
1117
+ export interface ChargesCreateInvoiceInputParam {
1118
+ amount?: number;
1119
+ amount_in_decimal?: string;
1120
+ description?: string;
1121
+ taxable?: boolean;
1122
+ tax_profile_id?: string;
1123
+ avalara_tax_code?: string;
1124
+ hsn_code?: string;
1125
+ taxjar_product_code?: string;
1126
+ avalara_sale_type?: AvalaraSaleType;
1127
+ avalara_transaction_type?: number;
1128
+ avalara_service_type?: number;
1129
+ date_from?: number;
1130
+ date_to?: number;
1131
+ }
1132
+ export interface AddonsCreateInvoiceInputParam {
1133
+ id?: string;
1134
+ quantity?: number;
1135
+ quantity_in_decimal?: string;
1136
+ unit_price?: number;
1137
+ unit_price_in_decimal?: string;
1138
+ date_from?: number;
1139
+ date_to?: number;
1140
+ }
1141
+ export interface TaxProvidersFieldsCreateInvoiceInputParam {
1142
+ provider_name?: string;
1143
+ field_id?: string;
1144
+ field_value?: string;
1145
+ }
1146
+ export interface NotesToRemoveCreateInvoiceInputParam {
1147
+ entity_type?: EntityType;
1148
+ entity_id?: string;
1149
+ }
1150
+ export interface InvoiceCreateInvoiceForItemsInputParam {
1151
+ customer_id?: string;
1152
+ subscription_id?: string;
1153
+ po_number?: string;
1154
+ }
1155
+ export interface ShippingAddressCreateInvoiceForItemsInputParam {
1156
+ first_name?: string;
1157
+ last_name?: string;
1158
+ email?: string;
1159
+ company?: string;
1160
+ phone?: string;
1161
+ line1?: string;
1162
+ line2?: string;
1163
+ line3?: string;
1164
+ city?: string;
1165
+ state_code?: string;
1166
+ state?: string;
1167
+ zip?: string;
1168
+ country?: string;
1169
+ validation_status?: ValidationStatus;
1170
+ }
1171
+
1172
+ export interface ChargesCreateInvoiceForItemsInputParam {
1173
+ amount?: number;
1174
+ amount_in_decimal?: string;
1175
+ description?: string;
1176
+ taxable?: boolean;
1177
+ tax_profile_id?: string;
1178
+ avalara_tax_code?: string;
1179
+ hsn_code?: string;
1180
+ taxjar_product_code?: string;
1181
+ avalara_sale_type?: AvalaraSaleType;
1182
+ avalara_transaction_type?: number;
1183
+ avalara_service_type?: number;
1184
+ date_from?: number;
1185
+ date_to?: number;
1186
+ }
1187
+ export interface DiscountsCreateInvoiceForItemsInputParam {
1188
+ percentage?: number;
1189
+ amount?: number;
1190
+ apply_on: ApplyOn;
1191
+ item_price_id?: string;
1192
+ }
1193
+ export interface ItemTiersCreateInvoiceForItemsInputParam {
1194
+ item_price_id?: string;
1195
+ starting_unit?: number;
1196
+ ending_unit?: number;
1197
+ price?: number;
1198
+ starting_unit_in_decimal?: string;
1199
+ ending_unit_in_decimal?: string;
1200
+ price_in_decimal?: string;
1201
+ }
1202
+ export interface ItemPricesCreateInvoiceForItemsInputParam {
1203
+ item_price_id?: string;
1204
+ quantity?: number;
1205
+ quantity_in_decimal?: string;
1206
+ unit_price?: number;
1207
+ unit_price_in_decimal?: string;
1208
+ date_from?: number;
1209
+ date_to?: number;
1210
+ }
1211
+ export interface TaxProvidersFieldsCreateInvoiceForItemsInputParam {
1212
+ provider_name?: string;
1213
+ field_id?: string;
1214
+ field_value?: string;
1215
+ }
1216
+ export interface NotesToRemoveCreateInvoiceForItemsInputParam {
1217
+ entity_type?: EntityType;
1218
+ entity_id?: string;
1219
+ }
569
1220
  }
570
- }
1221
+ }