chargebee 2.51.0 → 2.53.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/lib/chargebee.js +1 -1
  3. package/lib/resources/api_endpoints.js +103 -5
  4. package/package.json +1 -1
  5. package/types/core.d.ts +6 -6
  6. package/types/index.d.ts +10 -0
  7. package/types/resources/Addon.d.ts +3 -3
  8. package/types/resources/Address.d.ts +2 -194
  9. package/types/resources/AdvanceInvoiceSchedule.d.ts +5 -67
  10. package/types/resources/AttachedItem.d.ts +1 -1
  11. package/types/resources/Attribute.d.ts +4 -1
  12. package/types/resources/BillingConfiguration.d.ts +21 -0
  13. package/types/resources/Brand.d.ts +12 -0
  14. package/types/resources/BusinessEntity.d.ts +10 -8
  15. package/types/resources/BusinessEntityTransfer.d.ts +10 -7
  16. package/types/resources/Card.d.ts +11 -311
  17. package/types/resources/Comment.d.ts +10 -125
  18. package/types/resources/Contact.d.ts +2 -44
  19. package/types/resources/ContractTerm.d.ts +4 -72
  20. package/types/resources/Coupon.d.ts +4 -41
  21. package/types/resources/CouponCode.d.ts +67 -35
  22. package/types/resources/CouponSet.d.ts +12 -121
  23. package/types/resources/CreditNote.d.ts +89 -95
  24. package/types/resources/Currency.d.ts +8 -5
  25. package/types/resources/Customer.d.ts +96 -95
  26. package/types/resources/CustomerEntitlement.d.ts +3 -1
  27. package/types/resources/DifferentialPrice.d.ts +1 -1
  28. package/types/resources/Discount.d.ts +5 -90
  29. package/types/resources/Download.d.ts +2 -14
  30. package/types/resources/Entitlement.d.ts +15 -103
  31. package/types/resources/EntitlementOverride.d.ts +4 -89
  32. package/types/resources/Estimate.d.ts +6 -14
  33. package/types/resources/Event.d.ts +24 -109
  34. package/types/resources/Export.d.ts +116 -432
  35. package/types/resources/Feature.d.ts +19 -321
  36. package/types/resources/GatewayErrorDetail.d.ts +6 -48
  37. package/types/resources/Gift.d.ts +34 -294
  38. package/types/resources/Hierarchy.d.ts +4 -24
  39. package/types/resources/HostedPage.d.ts +4 -4
  40. package/types/resources/ImpactedCustomer.d.ts +23 -0
  41. package/types/resources/ImpactedItem.d.ts +4 -36
  42. package/types/resources/ImpactedItemPrice.d.ts +5 -2
  43. package/types/resources/ImpactedSubscription.d.ts +3 -30
  44. package/types/resources/InAppSubscription.d.ts +13 -355
  45. package/types/resources/Invoice.d.ts +112 -126
  46. package/types/resources/InvoiceEstimate.d.ts +1 -1
  47. package/types/resources/Item.d.ts +4 -11
  48. package/types/resources/ItemEntitlement.d.ts +15 -155
  49. package/types/resources/ItemFamily.d.ts +3 -3
  50. package/types/resources/ItemPrice.d.ts +7 -7
  51. package/types/resources/NonSubscription.d.ts +9 -6
  52. package/types/resources/OmnichannelOneTimeOrder.d.ts +90 -0
  53. package/types/resources/OmnichannelOneTimeOrderItem.d.ts +24 -0
  54. package/types/resources/OmnichannelSubscription.d.ts +2 -2
  55. package/types/resources/OmnichannelSubscriptionItem.d.ts +1 -1
  56. package/types/resources/OmnichannelSubscriptionItemScheduledChange.d.ts +1 -1
  57. package/types/resources/Order.d.ts +3 -3
  58. package/types/resources/PaymentIntent.d.ts +9 -255
  59. package/types/resources/PaymentReferenceNumber.d.ts +3 -20
  60. package/types/resources/PaymentSource.d.ts +4 -4
  61. package/types/resources/PaymentVoucher.d.ts +22 -205
  62. package/types/resources/Plan.d.ts +3 -3
  63. package/types/resources/PortalSession.d.ts +4 -146
  64. package/types/resources/PriceVariant.d.ts +2 -2
  65. package/types/resources/PricingPageSession.d.ts +2 -2
  66. package/types/resources/PromotionalCredit.d.ts +12 -215
  67. package/types/resources/Purchase.d.ts +5 -3
  68. package/types/resources/Quote.d.ts +32 -14
  69. package/types/resources/QuotedCharge.d.ts +7 -0
  70. package/types/resources/QuotedRamp.d.ts +11 -16
  71. package/types/resources/Ramp.d.ts +7 -7
  72. package/types/resources/RecordedPurchase.d.ts +8 -1
  73. package/types/resources/ResourceMigration.d.ts +2 -54
  74. package/types/resources/SiteMigrationDetail.d.ts +13 -55
  75. package/types/resources/Subscription.d.ts +33 -29
  76. package/types/resources/SubscriptionEntitlement.d.ts +6 -106
  77. package/types/resources/SubscriptionEntitlementsCreatedDetail.d.ts +12 -0
  78. package/types/resources/SubscriptionEntitlementsUpdatedDetail.d.ts +12 -0
  79. package/types/resources/SubscriptionEstimate.d.ts +14 -11
  80. package/types/resources/TaxWithheld.d.ts +14 -26
  81. package/types/resources/ThirdPartyPaymentMethod.d.ts +2 -19
  82. package/types/resources/TimeMachine.d.ts +3 -64
  83. package/types/resources/Token.d.ts +3 -60
  84. package/types/resources/Transaction.d.ts +8 -8
  85. package/types/resources/UnbilledCharge.d.ts +1 -1
  86. package/types/resources/Usage.d.ts +21 -165
  87. package/types/resources/UsageFile.d.ts +5 -5
  88. package/types/resources/VirtualBankAccount.d.ts +1 -1
  89. package/types/resources/WebhookEndpoint.d.ts +117 -0
@@ -1,140 +1,46 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
2
3
  declare module 'chargebee' {
3
4
  export interface Address {
4
5
 
5
- /**
6
- * @description Label to identify the address. This is unique for all the address for a subscription.
7
6
 
8
- */
9
-
10
7
  label:string;
11
-
12
- /**
13
- * @description First name
14
8
 
15
- */
16
-
17
9
  first_name?:string;
18
-
19
- /**
20
- * @description Last name
21
10
 
22
- */
23
-
24
11
  last_name?:string;
25
-
26
- /**
27
- * @description Email
28
12
 
29
- */
30
-
31
13
  email?:string;
32
-
33
- /**
34
- * @description Company name
35
14
 
36
- */
37
-
38
15
  company?:string;
39
-
40
- /**
41
- * @description Phone number
42
16
 
43
- */
44
-
45
17
  phone?:string;
46
-
47
- /**
48
- * @description Address line 1
49
18
 
50
- */
51
-
52
19
  addr?:string;
53
-
54
- /**
55
- * @description Address line 2
56
20
 
57
- */
58
-
59
21
  extended_addr?:string;
60
-
61
- /**
62
- * @description Address line 3
63
22
 
64
- */
65
-
66
23
  extended_addr2?:string;
67
-
68
- /**
69
- * @description Name of the city
70
24
 
71
- */
72
-
73
25
  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
26
 
78
- */
79
-
80
27
  state_code?:string;
81
-
82
- /**
83
- * @description State or Province
84
28
 
85
- */
86
-
87
29
  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
30
 
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
31
  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
32
 
106
- */
107
-
108
33
  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
34
 
113
- */
114
-
115
35
  validation_status?:ValidationStatus;
116
-
117
- /**
118
- * @description A unique and immutable identifier for the subscription. If not provided, it is autogenerated.
119
36
 
120
- */
121
-
122
37
  subscription_id:string;
38
+
123
39
  }
124
40
  export namespace Address {
125
41
  export class AddressResource {
126
- /**
127
- * @description Retrieves an address resource for a subscription and the specified label.
128
-
129
- */
130
-
131
42
  retrieve(input:RetrieveInputParam):ChargebeeRequest<RetrieveResponse>;
132
43
 
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.
135
-
136
- */
137
-
138
44
  update(input:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
139
45
  }
140
46
  export interface RetrieveResponse {
@@ -142,18 +48,8 @@ If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021
142
48
  }
143
49
  export interface RetrieveInputParam {
144
50
 
145
- /**
146
- * @description Retrieves an address resource for a subscription and the specified label.
147
-
148
- */
149
-
150
51
  subscription_id:string;
151
52
 
152
- /**
153
- * @description Retrieves an address resource for a subscription and the specified label.
154
-
155
- */
156
-
157
53
  label:string;
158
54
  }
159
55
  export interface UpdateResponse {
@@ -161,124 +57,36 @@ If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021
161
57
  }
162
58
  export interface UpdateInputParam {
163
59
 
164
- /**
165
- * @description A unique and immutable identifier for the subscription. If not provided, it is autogenerated.
166
-
167
- */
168
-
169
60
  subscription_id:string;
170
61
 
171
- /**
172
- * @description Label to identify the address. This is unique for all the address for a subscription.
173
-
174
- */
175
-
176
62
  label:string;
177
63
 
178
- /**
179
- * @description First name.
180
-
181
- */
182
-
183
64
  first_name?:string;
184
65
 
185
- /**
186
- * @description Last name.
187
-
188
- */
189
-
190
66
  last_name?:string;
191
67
 
192
- /**
193
- * @description Email.
194
-
195
- */
196
-
197
68
  email?:string;
198
69
 
199
- /**
200
- * @description Company name.
201
-
202
- */
203
-
204
70
  company?:string;
205
71
 
206
- /**
207
- * @description Phone number.
208
-
209
- */
210
-
211
72
  phone?:string;
212
73
 
213
- /**
214
- * @description Address line 1.
215
-
216
- */
217
-
218
74
  addr?:string;
219
75
 
220
- /**
221
- * @description Address line 2.
222
-
223
- */
224
-
225
76
  extended_addr?:string;
226
77
 
227
- /**
228
- * @description Address line 3.
229
-
230
- */
231
-
232
78
  extended_addr2?:string;
233
79
 
234
- /**
235
- * @description Name of the city.
236
-
237
- */
238
-
239
80
  city?:string;
240
81
 
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
82
  state_code?:string;
247
83
 
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
84
  state?:string;
254
85
 
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
86
  zip?:string;
261
87
 
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
88
  country?:string;
276
89
 
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
90
  validation_status?:ValidationStatus;
283
91
  }
284
92
 
@@ -1,102 +1,40 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
2
3
  declare module 'chargebee' {
3
4
  export interface AdvanceInvoiceSchedule {
4
5
 
5
- /**
6
- * @description System-generated and immutable unique Id for the &#x60;advance_invoice_schedule&#x60;.
7
6
 
8
- */
9
-
10
7
  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
8
 
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.
9
+ schedule_type?:'fixed_intervals' | 'specific_dates';
21
10
 
22
- */
23
-
24
11
  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
12
 
29
- */
30
-
31
13
  specific_dates_schedule?:AdvanceInvoiceSchedule.SpecificDatesSchedule;
14
+
32
15
  }
33
16
  export namespace AdvanceInvoiceSchedule {
34
17
 
35
18
 
36
19
  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
20
  end_schedule_on?:EndScheduleOn;
43
21
 
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
22
  number_of_occurrences?:number;
50
23
 
51
- /**
52
- * @description The number of days before each interval that advance invoices are generated.
53
-
54
- */
55
-
56
24
  days_before_renewal?:number;
57
25
 
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
26
  end_date?:number;
64
27
 
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
- */
28
+ created_at:number;
76
29
 
77
30
  terms_to_charge?:number;
78
31
  }
79
32
  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
33
  terms_to_charge?:number;
86
34
 
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
35
  date?:number;
93
36
 
94
- /**
95
- * @description The date when this advance invoicing schedule was created.
96
-
97
- */
98
-
99
- created_at?:number;
37
+ created_at:number;
100
38
  }
101
39
  }
102
40
  }
@@ -118,7 +118,7 @@ declare module 'chargebee' {
118
118
  limit?:number;
119
119
 
120
120
  /**
121
- * @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set \&#x60;offset\&#x60; to the value of \&#x60;next_offset\&#x60; obtained in the previous iteration of the API call.
121
+ * @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set &#x27;offset&#x27; to the value of &#x27;next_offset&#x27; obtained in the previous iteration of the API call.
122
122
 
123
123
  */
124
124
 
@@ -1,9 +1,12 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
2
3
  declare module 'chargebee' {
3
4
  export interface Attribute {
4
5
 
6
+
5
7
  name:string;
6
-
8
+
7
9
  value:string;
10
+
8
11
  }
9
12
  }
@@ -0,0 +1,21 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
3
+ declare module 'chargebee' {
4
+ export interface BillingConfiguration {
5
+
6
+
7
+ is_calendar_billing_enabled:boolean;
8
+
9
+ billing_dates?:BillingConfiguration.BillingDate[];
10
+
11
+ }
12
+ export namespace BillingConfiguration {
13
+
14
+
15
+ export interface BillingDate {
16
+ start_date?:number;
17
+
18
+ end_date?:number;
19
+ }
20
+ }
21
+ }
@@ -0,0 +1,12 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
3
+ declare module 'chargebee' {
4
+ export interface Brand {
5
+
6
+
7
+ id:string;
8
+
9
+ name:string;
10
+
11
+ }
12
+ }
@@ -3,19 +3,21 @@
3
3
  declare module 'chargebee' {
4
4
  export interface BusinessEntity {
5
5
 
6
+
6
7
  id:string;
7
-
8
+
8
9
  name:string;
9
-
10
+
10
11
  status:'active' | 'inactive';
11
-
12
+
12
13
  deleted:boolean;
13
-
14
+
14
15
  created_at:number;
15
-
16
+
16
17
  resource_version?:number;
17
-
18
+
18
19
  updated_at?:number;
20
+
19
21
  }
20
22
  export namespace BusinessEntity {
21
23
  export class BusinessEntityResource {
@@ -53,7 +55,7 @@ declare module 'chargebee' {
53
55
  limit?:number;
54
56
 
55
57
  /**
56
- * @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set \&#x60;offset\&#x60; to the value of \&#x60;next_offset\&#x60; obtained in the previous iteration of the API call.
58
+ * @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set &#x27;offset&#x27; to the value of &#x27;next_offset&#x27; obtained in the previous iteration of the API call.
57
59
 
58
60
  */
59
61
 
@@ -77,7 +79,7 @@ declare module 'chargebee' {
77
79
 
78
80
  created_at?:{after?:string,before?:string,between?:string,on?:string};
79
81
 
80
- sort_by?:{asc?:'created_at',desc?:'created_at'};
82
+ sort_by?:object;
81
83
  }
82
84
 
83
85
  }
@@ -1,21 +1,24 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
2
3
  declare module 'chargebee' {
3
4
  export interface BusinessEntityTransfer {
4
5
 
6
+
5
7
  id:string;
6
-
8
+
7
9
  resource_type:'customer' | 'subscription';
8
-
10
+
9
11
  resource_id:string;
10
-
12
+
11
13
  active_resource_id:string;
12
-
14
+
13
15
  destination_business_entity_id:string;
14
-
16
+
15
17
  source_business_entity_id:string;
16
-
18
+
17
19
  reason_code:'correction';
18
-
20
+
19
21
  created_at:number;
22
+
20
23
  }
21
24
  }