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/index.d.ts CHANGED
@@ -15,6 +15,7 @@
15
15
  ///<reference path='./resources/CreditNoteEstimate.d.ts' />
16
16
  ///<reference path='./resources/Currency.d.ts' />
17
17
  ///<reference path='./resources/Customer.d.ts' />
18
+ ///<reference path='./resources/CustomerEntitlement.d.ts' />
18
19
  ///<reference path='./resources/DifferentialPrice.d.ts' />
19
20
  ///<reference path='./resources/Discount.d.ts' />
20
21
  ///<reference path='./resources/Download.d.ts' />
@@ -42,7 +43,6 @@
42
43
  ///<reference path='./resources/ItemFamily.d.ts' />
43
44
  ///<reference path='./resources/ItemPrice.d.ts' />
44
45
  ///<reference path='./resources/Metadata.d.ts' />
45
- ///<reference path='./resources/NonSubscription.d.ts' />
46
46
  ///<reference path='./resources/Order.d.ts' />
47
47
  ///<reference path='./resources/PaymentIntent.d.ts' />
48
48
  ///<reference path='./resources/PaymentReferenceNumber.d.ts' />
@@ -72,58 +72,95 @@
72
72
  ///<reference path='./resources/Usage.d.ts' />
73
73
  ///<reference path='./resources/VirtualBankAccount.d.ts' />
74
74
 
75
+ export type Config = {
76
+ /**
77
+ * @apiKey api key for the site.
78
+ */
79
+ apiKey: string;
80
+ /**
81
+ * @site api site name.
82
+ */
83
+ site: string;
84
+ /**
85
+ * @apiPath this value indicates the api version, default value is /api/v2.
86
+ */
87
+ apiPath?: '/api/v2' | '/api/v1';
88
+ /**
89
+ * @timeout client side request timeout in milliseconds, default value is 80000ms.
90
+ */
91
+ timeout?: number;
92
+ /**
93
+ * @port url port
94
+ */
95
+ port?: number;
96
+ /**
97
+ * @timemachineWaitInMillis time interval at which two subsequent retrieve timemachine call in milliseconds, default value is 3000ms.
98
+ */
99
+ timemachineWaitInMillis?: number;
100
+ /**
101
+ * @exportWaitInMillis time interval at which two subsequent retrieve export call in milliseconds, default value is 3000ms.
102
+ */
103
+ exportWaitInMillis?: number;
104
+ /**
105
+ * @protocol http protocol, default value is https
106
+ */
107
+ protocol?: 'https' | 'http';
108
+ /**
109
+ * @hostSuffix url host suffix, default value is .chargebee.com
110
+ */
111
+ hostSuffix?: string;
112
+ };
75
113
  declare module 'chargebee' {
76
- export default class {
77
- static configure({ site, api_key }: { site: string; api_key: string });
78
- static address: Address.AddressResource;
79
- static attached_item: AttachedItem.AttachedItemResource;
80
- static business_entity: BusinessEntity.BusinessEntityResource;
81
- static card: Card.CardResource;
82
- static comment: Comment.CommentResource;
83
- static coupon: Coupon.CouponResource;
84
- static coupon_code: CouponCode.CouponCodeResource;
85
- static coupon_set: CouponSet.CouponSetResource;
86
- static credit_note: CreditNote.CreditNoteResource;
87
- static currency: Currency.CurrencyResource;
88
- static customer: Customer.CustomerResource;
89
- static differential_price: DifferentialPrice.DifferentialPriceResource;
90
- static entitlement: Entitlement.EntitlementResource;
91
- static entitlement_override: EntitlementOverride.EntitlementOverrideResource;
92
- static estimate: Estimate.EstimateResource;
93
- static event: Event.EventResource;
94
- static export: Export.ExportResource;
95
- static feature: Feature.FeatureResource;
96
- static gift: Gift.GiftResource;
97
- static hosted_page: HostedPage.HostedPageResource;
98
- static in_app_subscription: InAppSubscription.InAppSubscriptionResource;
99
- static installment: Installment.InstallmentResource;
100
- static installment_config: InstallmentConfig.InstallmentConfigResource;
101
- static invoice: Invoice.InvoiceResource;
102
- static item: Item.ItemResource;
103
- static item_entitlement: ItemEntitlement.ItemEntitlementResource;
104
- static item_family: ItemFamily.ItemFamilyResource;
105
- static item_price: ItemPrice.ItemPriceResource;
106
- static non_subscription: NonSubscription.NonSubscriptionResource;
107
- static order: Order.OrderResource;
108
- static payment_intent: PaymentIntent.PaymentIntentResource;
109
- static payment_source: PaymentSource.PaymentSourceResource;
110
- static payment_voucher: PaymentVoucher.PaymentVoucherResource;
111
- static portal_session: PortalSession.PortalSessionResource;
112
- static price_variant: PriceVariant.PriceVariantResource;
113
- static pricing_page_session: PricingPageSession.PricingPageSessionResource;
114
- static promotional_credit: PromotionalCredit.PromotionalCreditResource;
115
- static purchase: Purchase.PurchaseResource;
116
- static quote: Quote.QuoteResource;
117
- static ramp: Ramp.RampResource;
118
- static resource_migration: ResourceMigration.ResourceMigrationResource;
119
- static site_migration_detail: SiteMigrationDetail.SiteMigrationDetailResource;
120
- static subscription: Subscription.SubscriptionResource;
121
- static subscription_entitlement: SubscriptionEntitlement.SubscriptionEntitlementResource;
122
- static time_machine: TimeMachine.TimeMachineResource;
123
- static transaction: Transaction.TransactionResource;
124
- static unbilled_charge: UnbilledCharge.UnbilledChargeResource;
125
- static usage: Usage.UsageResource;
126
- static virtual_bank_account: VirtualBankAccount.VirtualBankAccountResource;
127
-
114
+ export default class Chargebee {
115
+ constructor(config: Config);
116
+ address: Address.AddressResource;
117
+ attachedItem: AttachedItem.AttachedItemResource;
118
+ businessEntity: BusinessEntity.BusinessEntityResource;
119
+ card: Card.CardResource;
120
+ comment: Comment.CommentResource;
121
+ coupon: Coupon.CouponResource;
122
+ couponCode: CouponCode.CouponCodeResource;
123
+ couponSet: CouponSet.CouponSetResource;
124
+ creditNote: CreditNote.CreditNoteResource;
125
+ currency: Currency.CurrencyResource;
126
+ customer: Customer.CustomerResource;
127
+ customerEntitlement: CustomerEntitlement.CustomerEntitlementResource;
128
+ differentialPrice: DifferentialPrice.DifferentialPriceResource;
129
+ entitlement: Entitlement.EntitlementResource;
130
+ entitlementOverride: EntitlementOverride.EntitlementOverrideResource;
131
+ estimate: Estimate.EstimateResource;
132
+ event: Event.EventResource;
133
+ export: Export.ExportResource;
134
+ feature: Feature.FeatureResource;
135
+ gift: Gift.GiftResource;
136
+ hostedPage: HostedPage.HostedPageResource;
137
+ inAppSubscription: InAppSubscription.InAppSubscriptionResource;
138
+ installment: Installment.InstallmentResource;
139
+ installmentConfig: InstallmentConfig.InstallmentConfigResource;
140
+ invoice: Invoice.InvoiceResource;
141
+ item: Item.ItemResource;
142
+ itemEntitlement: ItemEntitlement.ItemEntitlementResource;
143
+ itemFamily: ItemFamily.ItemFamilyResource;
144
+ itemPrice: ItemPrice.ItemPriceResource;
145
+ order: Order.OrderResource;
146
+ paymentIntent: PaymentIntent.PaymentIntentResource;
147
+ paymentSource: PaymentSource.PaymentSourceResource;
148
+ paymentVoucher: PaymentVoucher.PaymentVoucherResource;
149
+ portalSession: PortalSession.PortalSessionResource;
150
+ priceVariant: PriceVariant.PriceVariantResource;
151
+ pricingPageSession: PricingPageSession.PricingPageSessionResource;
152
+ promotionalCredit: PromotionalCredit.PromotionalCreditResource;
153
+ purchase: Purchase.PurchaseResource;
154
+ quote: Quote.QuoteResource;
155
+ ramp: Ramp.RampResource;
156
+ resourceMigration: ResourceMigration.ResourceMigrationResource;
157
+ siteMigrationDetail: SiteMigrationDetail.SiteMigrationDetailResource;
158
+ subscription: Subscription.SubscriptionResource;
159
+ subscriptionEntitlement: SubscriptionEntitlement.SubscriptionEntitlementResource;
160
+ timeMachine: TimeMachine.TimeMachineResource;
161
+ transaction: Transaction.TransactionResource;
162
+ unbilledCharge: UnbilledCharge.UnbilledChargeResource;
163
+ usage: Usage.UsageResource;
164
+ virtualBankAccount: VirtualBankAccount.VirtualBankAccountResource;
128
165
  }
129
- }
166
+ }
@@ -1,286 +1,71 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
3
+
2
4
  declare module 'chargebee' {
3
5
  export interface Address {
4
-
5
- /**
6
- * @description Label to identify the address. This is unique for all the address for a subscription.
7
-
8
- */
9
-
10
- label:string;
11
-
12
- /**
13
- * @description First name
14
-
15
- */
16
-
17
- first_name?:string;
18
-
19
- /**
20
- * @description Last name
21
-
22
- */
23
-
24
- last_name?:string;
25
-
26
- /**
27
- * @description Email
28
-
29
- */
30
-
31
- email?:string;
32
-
33
- /**
34
- * @description Company name
35
-
36
- */
37
-
38
- company?:string;
39
-
40
- /**
41
- * @description Phone number
42
-
43
- */
44
-
45
- phone?:string;
46
-
47
- /**
48
- * @description Address line 1
49
-
50
- */
51
-
52
- addr?:string;
53
-
54
- /**
55
- * @description Address line 2
56
-
57
- */
58
-
59
- extended_addr?:string;
60
-
61
- /**
62
- * @description Address line 3
63
-
64
- */
65
-
66
- extended_addr2?:string;
67
-
68
- /**
69
- * @description Name of the city
70
-
71
- */
72
-
73
- city?:string;
74
-
75
- /**
76
- * @description The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set &#x60;state_code&#x60; as &#x60;AZ&#x60; (not &#x60;US-AZ&#x60;). For Tamil Nadu (India), set as &#x60;TN&#x60; (not &#x60;IN-TN&#x60;). For British Columbia (Canada), set as &#x60;BC&#x60; (not &#x60;CA-BC&#x60;).
77
-
78
- */
79
-
80
- state_code?:string;
81
-
82
- /**
83
- * @description State or Province
84
-
85
- */
86
-
87
- state?:string;
88
-
89
- /**
90
- * @description The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).
91
-
92
- **Note** : If you enter an invalid country code, the system will return an error.
93
-
94
- **Brexit**
95
-
96
-
97
- If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then &#x60;XI&#x60; (the code for **United Kingdom -- Northern Ireland**) is available as an option.
98
-
99
- */
100
-
101
- country?:string;
102
-
103
- /**
104
- * @description Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address).
105
-
106
- */
107
-
108
- zip?:string;
109
-
110
- /**
111
- * @description The address verification status. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* not_validated - Address is not yet validated. \* invalid - Address is invalid. \* valid - Address was validated successfully.
112
-
113
- */
114
-
115
- validation_status?:ValidationStatus;
116
-
117
- /**
118
- * @description A unique and immutable identifier for the subscription. If not provided, it is autogenerated.
119
-
120
- */
121
-
122
- subscription_id:string;
6
+ label: string;
7
+ first_name?: string;
8
+ last_name?: string;
9
+ email?: string;
10
+ company?: string;
11
+ phone?: string;
12
+ addr?: string;
13
+ extended_addr?: string;
14
+ extended_addr2?: string;
15
+ city?: string;
16
+ state_code?: string;
17
+ state?: string;
18
+ country?: string;
19
+ zip?: string;
20
+ validation_status?: ValidationStatus;
21
+ subscription_id: string;
123
22
  }
124
- export namespace Address {
125
- export class AddressResource {
126
- /**
127
- * @description Retrieves an address resource for a subscription and the specified label.
128
23
 
129
- */
130
-
131
- retrieve(input:RetrieveInputParam):ChargebeeRequest<RetrieveResponse>;
132
-
133
- /**
134
- * @description Adds or replaces the address for a subscription. If an address is already present for the specified label, it will be replaced otherwise new address is added with that label.
24
+ export namespace Address {
25
+ export class AddressResource {
26
+ retrieve(
27
+ input: RetrieveInputParam,
28
+ headers?: ChargebeeRequestHeader,
29
+ ): Promise<ChargebeeResponse<RetrieveResponse>>;
30
+
31
+ update(
32
+ input: UpdateInputParam,
33
+ headers?: ChargebeeRequestHeader,
34
+ ): Promise<ChargebeeResponse<UpdateResponse>>;
35
+ }
135
36
 
136
- */
137
-
138
- update(input:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
37
+ export interface RetrieveResponse {
38
+ address: Address;
139
39
  }
140
- export interface RetrieveResponse {
141
- address:Address;
40
+
41
+ export interface UpdateResponse {
42
+ address: Address;
142
43
  }
143
- export interface RetrieveInputParam {
144
-
145
- /**
146
- * @description Retrieves an address resource for a subscription and the specified label.
147
44
 
148
- */
149
-
150
- subscription_id:string;
151
-
152
- /**
153
- * @description Retrieves an address resource for a subscription and the specified label.
45
+ // REQUEST PARAMS
46
+ //---------------
154
47
 
155
- */
156
-
157
- label:string;
158
- }
159
- export interface UpdateResponse {
160
- address:Address;
48
+ export interface RetrieveInputParam {
49
+ subscription_id: string;
50
+ label: string;
161
51
  }
162
52
  export interface UpdateInputParam {
163
-
164
- /**
165
- * @description A unique and immutable identifier for the subscription. If not provided, it is autogenerated.
166
-
167
- */
168
-
169
- subscription_id:string;
170
-
171
- /**
172
- * @description Label to identify the address. This is unique for all the address for a subscription.
173
-
174
- */
175
-
176
- label:string;
177
-
178
- /**
179
- * @description First name.
180
-
181
- */
182
-
183
- first_name?:string;
184
-
185
- /**
186
- * @description Last name.
187
-
188
- */
189
-
190
- last_name?:string;
191
-
192
- /**
193
- * @description Email.
194
-
195
- */
196
-
197
- email?:string;
198
-
199
- /**
200
- * @description Company name.
201
-
202
- */
203
-
204
- company?:string;
205
-
206
- /**
207
- * @description Phone number.
208
-
209
- */
210
-
211
- phone?:string;
212
-
213
- /**
214
- * @description Address line 1.
215
-
216
- */
217
-
218
- addr?:string;
219
-
220
- /**
221
- * @description Address line 2.
222
-
223
- */
224
-
225
- extended_addr?:string;
226
-
227
- /**
228
- * @description Address line 3.
229
-
230
- */
231
-
232
- extended_addr2?:string;
233
-
234
- /**
235
- * @description Name of the city.
236
-
237
- */
238
-
239
- city?:string;
240
-
241
- /**
242
- * @description The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set &#x60;state_code&#x60; as &#x60;AZ&#x60; (not &#x60;US-AZ&#x60;). For Tamil Nadu (India), set as &#x60;TN&#x60; (not &#x60;IN-TN&#x60;). For British Columbia (Canada), set as &#x60;BC&#x60; (not &#x60;CA-BC&#x60;).
243
-
244
- */
245
-
246
- state_code?:string;
247
-
248
- /**
249
- * @description The state/province name. Is set by Chargebee automatically for US, Canada and India If &#x60;state_code&#x60; is provided.
250
-
251
- */
252
-
253
- state?:string;
254
-
255
- /**
256
- * @description Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address).
257
-
258
- */
259
-
260
- zip?:string;
261
-
262
- /**
263
- * @description The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).
264
-
265
- **Note** : If you enter an invalid country code, the system will return an error.
266
-
267
- **Brexit**
268
-
269
-
270
- If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then &#x60;XI&#x60; (the code for **United Kingdom -- Northern Ireland**) is available as an option.
271
- .
272
-
273
- */
274
-
275
- country?:string;
276
-
277
- /**
278
- * @description The address verification status. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* not_validated - Address is not yet validated. \* invalid - Address is invalid. \* valid - Address was validated successfully.
279
-
280
- */
281
-
282
- validation_status?:ValidationStatus;
53
+ subscription_id: string;
54
+ label: string;
55
+ first_name?: string;
56
+ last_name?: string;
57
+ email?: string;
58
+ company?: string;
59
+ phone?: string;
60
+ addr?: string;
61
+ extended_addr?: string;
62
+ extended_addr2?: string;
63
+ city?: string;
64
+ state_code?: string;
65
+ state?: string;
66
+ zip?: string;
67
+ country?: string;
68
+ validation_status?: ValidationStatus;
283
69
  }
284
-
285
70
  }
286
- }
71
+ }
@@ -1,102 +1,29 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
3
+
2
4
  declare module 'chargebee' {
3
5
  export interface AdvanceInvoiceSchedule {
4
-
5
- /**
6
- * @description System-generated and immutable unique Id for the &#x60;advance_invoice_schedule&#x60;.
7
-
8
- */
9
-
10
- id:string;
11
-
12
- /**
13
- * @description The type of advance invoice or advance invoicing schedule. \* specific_dates - The advance charges occur on specific dates. For each date, [a fixed number of billing cycles](advance_invoice_schedules#advance_invoice_schedule_specific_dates_schedule_terms_to_charge) is charged for. There can be up to 5 dates configured. \* fixed_intervals - The advance charges occur at [fixed intervals of time](advance_invoice_schedules#advance_invoice_schedule_fixed_interval_schedule_terms_to_charge).
14
-
15
- */
16
-
17
- schedule_type?:'specific_dates' | 'fixed_intervals';
18
-
19
- /**
20
- * @description When the &#x60;schedule_type&#x60; is &#x60;fixed_intervals&#x60;, this object gives further details of the schedule.
21
-
22
- */
23
-
24
- fixed_interval_schedule?:AdvanceInvoiceSchedule.FixedIntervalSchedule;
25
-
26
- /**
27
- * @description The advance charges occur on specific dates. For each date, [a fixed number of billing cycles](advance_invoice_schedules#advance_invoice_schedule_specific_dates_schedule_terms_to_charge) is charged for. There can be up to 5 dates configured.
28
-
29
- */
30
-
31
- specific_dates_schedule?:AdvanceInvoiceSchedule.SpecificDatesSchedule;
6
+ id: string;
7
+ schedule_type?: 'fixed_intervals' | 'specific_dates';
8
+ fixed_interval_schedule?: AdvanceInvoiceSchedule.FixedIntervalSchedule;
9
+ specific_dates_schedule?: AdvanceInvoiceSchedule.SpecificDatesSchedule;
32
10
  }
33
- export namespace AdvanceInvoiceSchedule {
34
-
35
-
36
- export interface FixedIntervalSchedule {
37
- /**
38
- * @description Specifies when the schedule should end. \* after_number_of_intervals - Advance invoices are generated a &#x60;specified number of times&#x60; \* subscription_end - Advance invoices are generated for as long as the subscription is active. \* specific_date - End the advance invoicing schedule on a &#x60;specific date&#x60;.
39
-
40
- */
41
-
42
- end_schedule_on?:EndScheduleOn;
43
-
44
- /**
45
- * @description The number of advance invoices to generate. The schedule is created such that the total number of billing cycles in the schedule does not exceed the [&#x60;remaining_billing_cycles&#x60;](subscriptions#subscription_remaining_billing_cycles) of the subscription. This parameter is applicable only when [&#x60;fixed_interval_schedule[end_schedule_on]&#x60;](advance_invoice_schedules#advance_invoice_schedule_fixed_interval_schedule_end_schedule_on) &#x3D; &#x60;after_number_of_intervals&#x60;
46
-
47
- */
48
-
49
- number_of_occurrences?:number;
50
-
51
- /**
52
- * @description The number of days before each interval that advance invoices are generated.
53
11
 
54
- */
55
-
56
- days_before_renewal?:number;
57
-
58
- /**
59
- * @description The date when the schedule should end. Advance invoices are not generated beyond this date. It must be at least 1 day before the start of the last billing cycle of the subscription and also within 5 years from the current date. This parameter is only applicable when [&#x60;fixed_interval_schedule[end_schedule_on]&#x60;](advance_invoice_schedules#advance_invoice_schedule_fixed_interval_schedule_end_schedule_on) &#x3D; &#x60;specific_date&#x60;.
60
-
61
- */
62
-
63
- end_date?:number;
64
-
65
- /**
66
- * @description The date when this advance invoicing schedule was created.
67
-
68
- */
69
-
70
- created_at?:number;
71
-
72
- /**
73
- * @description The number of billing cycles in one interval.
74
-
75
- */
76
-
77
- terms_to_charge?:number;
12
+ export namespace AdvanceInvoiceSchedule {
13
+ export interface FixedIntervalSchedule {
14
+ end_schedule_on?: EndScheduleOn;
15
+ number_of_occurrences?: number;
16
+ days_before_renewal?: number;
17
+ end_date?: number;
18
+ created_at: number;
19
+ terms_to_charge?: number;
78
20
  }
79
- export interface SpecificDatesSchedule {
80
- /**
81
- * @description The number of billing cycles to charge for, on the date specified. Applicable only when [&#x60;schedule_type&#x60;](advance_invoice_schedules#advance_invoice_schedule_schedule_type) is specific_dates.
82
-
83
- */
84
-
85
- terms_to_charge?:number;
86
-
87
- /**
88
- * @description The unique id of the member of the advance_invoice_schedule array which corresponds to the specific_dates_schedule that you intend to modify. Only applicable when [&#x60;schedule_type&#x60;](advance_invoice_schedules#advance_invoice_schedule_schedule_type) is &#x60;specific_dates&#x60;.
89
-
90
- */
91
-
92
- date?:number;
93
-
94
- /**
95
- * @description The date when this advance invoicing schedule was created.
96
-
97
- */
98
-
99
- created_at?:number;
21
+ export interface SpecificDatesSchedule {
22
+ terms_to_charge?: number;
23
+ date?: number;
24
+ created_at: number;
100
25
  }
26
+ // REQUEST PARAMS
27
+ //---------------
101
28
  }
102
- }
29
+ }