chargebee 2.26.0 → 2.26.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 (64) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/lib/chargebee.js +1 -1
  3. package/package.json +1 -1
  4. package/types/core.d.ts +1 -0
  5. package/types/resources/Address.d.ts +245 -5
  6. package/types/resources/AdvanceInvoiceSchedule.d.ts +78 -2
  7. package/types/resources/AttachedItem.d.ts +305 -13
  8. package/types/resources/Card.d.ts +485 -13
  9. package/types/resources/Comment.d.ts +177 -11
  10. package/types/resources/Contact.d.ts +54 -0
  11. package/types/resources/ContractTerm.d.ts +83 -0
  12. package/types/resources/Coupon.d.ts +665 -20
  13. package/types/resources/CouponCode.d.ts +56 -5
  14. package/types/resources/CouponSet.d.ts +224 -17
  15. package/types/resources/CreditNote.d.ts +1202 -44
  16. package/types/resources/CreditNoteEstimate.d.ts +75 -6
  17. package/types/resources/Customer.d.ts +2132 -73
  18. package/types/resources/DifferentialPrice.d.ts +266 -15
  19. package/types/resources/Discount.d.ts +107 -0
  20. package/types/resources/Download.d.ts +18 -0
  21. package/types/resources/EntitlementOverride.d.ts +101 -7
  22. package/types/resources/Estimate.d.ts +1181 -27
  23. package/types/resources/Event.d.ts +145 -8
  24. package/types/resources/Export.d.ts +703 -32
  25. package/types/resources/Feature.d.ts +356 -22
  26. package/types/resources/Gift.d.ts +351 -24
  27. package/types/resources/Hierarchy.d.ts +30 -0
  28. package/types/resources/HostedPage.d.ts +1212 -37
  29. package/types/resources/ImpactedItem.d.ts +41 -1
  30. package/types/resources/ImpactedSubscription.d.ts +36 -1
  31. package/types/resources/InAppSubscription.d.ts +636 -9
  32. package/types/resources/Invoice.d.ts +2293 -93
  33. package/types/resources/InvoiceEstimate.d.ts +75 -6
  34. package/types/resources/Item.d.ts +542 -16
  35. package/types/resources/ItemEntitlement.d.ts +172 -13
  36. package/types/resources/ItemFamily.d.ts +173 -15
  37. package/types/resources/ItemPrice.d.ts +971 -26
  38. package/types/resources/Media.d.ts +24 -0
  39. package/types/resources/NonSubscription.d.ts +51 -3
  40. package/types/resources/Order.d.ts +1224 -32
  41. package/types/resources/PaymentIntent.d.ts +318 -8
  42. package/types/resources/PaymentReferenceNumber.d.ts +24 -0
  43. package/types/resources/PaymentSource.d.ts +1259 -55
  44. package/types/resources/PaymentVoucher.d.ts +262 -14
  45. package/types/resources/PortalSession.d.ts +187 -10
  46. package/types/resources/PromotionalCredit.d.ts +351 -16
  47. package/types/resources/Purchase.d.ts +274 -5
  48. package/types/resources/Quote.d.ts +1595 -62
  49. package/types/resources/QuoteLineGroup.d.ts +134 -5
  50. package/types/resources/QuotedCharge.d.ts +63 -5
  51. package/types/resources/QuotedSubscription.d.ts +192 -5
  52. package/types/resources/ResourceMigration.d.ts +73 -3
  53. package/types/resources/SiteMigrationDetail.d.ts +98 -5
  54. package/types/resources/Subscription.d.ts +3462 -137
  55. package/types/resources/SubscriptionEntitlement.d.ts +116 -8
  56. package/types/resources/SubscriptionEstimate.d.ts +36 -2
  57. package/types/resources/TaxWithheld.d.ts +32 -0
  58. package/types/resources/ThirdPartyPaymentMethod.d.ts +24 -0
  59. package/types/resources/TimeMachine.d.ts +99 -7
  60. package/types/resources/Token.d.ts +179 -7
  61. package/types/resources/Transaction.d.ts +597 -25
  62. package/types/resources/UnbilledCharge.d.ts +355 -14
  63. package/types/resources/Usage.d.ts +259 -13
  64. package/types/resources/VirtualBankAccount.d.ts +255 -17
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### v2.26.1 (2023-08-11)
2
+ * * *
3
+ * Support Descriptions for the attributes and actions has been added.
4
+
1
5
  ### v2.26.0 (2023-07-31)
2
6
  * * *
3
7
 
package/lib/chargebee.js CHANGED
@@ -11,7 +11,7 @@ ChargeBee._env = {
11
11
  hostSuffix: '.chargebee.com',
12
12
  apiPath: '/api/v2',
13
13
  timeout: 80000,
14
- clientVersion: 'v2.26.0',
14
+ clientVersion: 'v2.26.1',
15
15
  port: 443,
16
16
  timemachineWaitInMillis: 3000,
17
17
  exportWaitInMillis: 3000
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"chargebee",
3
- "version":"2.26.0",
3
+ "version":"2.26.1",
4
4
  "description":"A library for integrating with ChargeBee.",
5
5
  "keywords":[
6
6
  "payments",
package/types/core.d.ts CHANGED
@@ -57,6 +57,7 @@ declare module 'chargebee' {
57
57
  type Operation = 'create' | 'update' | 'delete'
58
58
  type OperationType = 'add' | 'remove'
59
59
  type PauseOption = 'end_of_term' | 'billing_cycles' | 'immediately' | 'specific_date'
60
+ type PaymentInitiator = 'merchant' | 'customer'
60
61
  type PaymentMethod = 'other' | 'netbanking_emandates' | 'ach_credit' | 'dotpay' | 'boleto' | 'direct_debit' | 'chargeback' | 'wechat_pay' | 'cash' | 'giropay' | 'bank_transfer' | 'alipay' | 'ideal' | 'google_pay' | 'custom' | 'unionpay' | 'check' | 'sofort' | 'amazon_payments' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'sepa_credit' | 'card'
61
62
  type PaymentMethodType = 'giropay' | 'alipay' | 'ideal' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'unionpay' | 'direct_debit' | 'generic' | 'sofort' | 'amazon_payments' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'wechat_pay' | 'card'
62
63
  type PaymentVoucherType = 'boleto'
@@ -1,54 +1,294 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
2
  declare module 'chargebee' {
3
3
  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
+
4
10
  label:string;
11
+
12
+ /**
13
+ * @description First name
14
+
15
+ */
16
+
5
17
  first_name?:string;
18
+
19
+ /**
20
+ * @description Last name
21
+
22
+ */
23
+
6
24
  last_name?:string;
25
+
26
+ /**
27
+ * @description Email
28
+
29
+ */
30
+
7
31
  email?:string;
32
+
33
+ /**
34
+ * @description Company name
35
+
36
+ */
37
+
8
38
  company?:string;
39
+
40
+ /**
41
+ * @description Phone number
42
+
43
+ */
44
+
9
45
  phone?:string;
46
+
47
+ /**
48
+ * @description Address line 1
49
+
50
+ */
51
+
10
52
  addr?:string;
53
+
54
+ /**
55
+ * @description Address line 2
56
+
57
+ */
58
+
11
59
  extended_addr?:string;
60
+
61
+ /**
62
+ * @description Address line 3
63
+
64
+ */
65
+
12
66
  extended_addr2?:string;
67
+
68
+ /**
69
+ * @description Name of the city
70
+
71
+ */
72
+
13
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
+
14
80
  state_code?:string;
81
+
82
+ /**
83
+ * @description State or Province
84
+
85
+ */
86
+
15
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
+
16
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
+
17
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
+
18
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
+
19
122
  subscription_id:string;
20
123
  }
21
124
  export namespace Address {
22
- export class AddressResource {
125
+ export class AddressResource {
126
+ /**
127
+ * @description Retrieves an address resource for a subscription and the specified label.
128
+
129
+ */
130
+
23
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.
135
+
136
+ */
137
+
24
138
  update(input:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
25
139
  }
26
- export interface RetrieveResponse {
27
- address:Address;
140
+ export interface RetrieveResponse {
141
+ /**
142
+ * @description Retrieves an address resource for a subscription and the specified label.
143
+
144
+ */
145
+
146
+ address:Address;
28
147
  }
29
148
  export interface RetrieveInputParam {
149
+
150
+ /**
151
+ * @description Retrieves an address resource for a subscription and the specified label.
152
+
153
+ */
154
+
30
155
  subscription_id:string;
156
+
157
+ /**
158
+ * @description Retrieves an address resource for a subscription and the specified label.
159
+
160
+ */
161
+
31
162
  label:string;
32
163
  }
33
- export interface UpdateResponse {
34
- address:Address;
164
+ export interface UpdateResponse {
165
+ /**
166
+ * @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.
167
+
168
+ */
169
+
170
+ address:Address;
35
171
  }
36
172
  export interface UpdateInputParam {
173
+
174
+ /**
175
+ * @description A unique and immutable identifier for the subscription. If not provided, it is autogenerated.
176
+
177
+ */
178
+
37
179
  subscription_id:string;
180
+
181
+ /**
182
+ * @description Label to identify the address. This is unique for all the address for a subscription.
183
+
184
+ */
185
+
38
186
  label:string;
187
+
188
+ /**
189
+ * @description First name.
190
+
191
+ */
192
+
39
193
  first_name?:string;
194
+
195
+ /**
196
+ * @description Last name.
197
+
198
+ */
199
+
40
200
  last_name?:string;
201
+
202
+ /**
203
+ * @description Email.
204
+
205
+ */
206
+
41
207
  email?:string;
208
+
209
+ /**
210
+ * @description Company name.
211
+
212
+ */
213
+
42
214
  company?:string;
215
+
216
+ /**
217
+ * @description Phone number.
218
+
219
+ */
220
+
43
221
  phone?:string;
222
+
223
+ /**
224
+ * @description Address line 1.
225
+
226
+ */
227
+
44
228
  addr?:string;
229
+
230
+ /**
231
+ * @description Address line 2.
232
+
233
+ */
234
+
45
235
  extended_addr?:string;
236
+
237
+ /**
238
+ * @description Address line 3.
239
+
240
+ */
241
+
46
242
  extended_addr2?:string;
243
+
244
+ /**
245
+ * @description Name of the city.
246
+
247
+ */
248
+
47
249
  city?:string;
250
+
251
+ /**
252
+ * @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;).
253
+
254
+ */
255
+
48
256
  state_code?:string;
257
+
258
+ /**
259
+ * @description The state/province name. Is set by Chargebee automatically for US, Canada and India If &#x60;state_code&#x60; is provided.
260
+
261
+ */
262
+
49
263
  state?:string;
264
+
265
+ /**
266
+ * @description Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address).
267
+
268
+ */
269
+
50
270
  zip?:string;
271
+
272
+ /**
273
+ * @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).
274
+
275
+ **Note** : If you enter an invalid country code, the system will return an error.
276
+
277
+ **Brexit**
278
+
279
+
280
+ 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.
281
+ .
282
+
283
+ */
284
+
51
285
  country?:string;
286
+
287
+ /**
288
+ * @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.
289
+
290
+ */
291
+
52
292
  validation_status?:ValidationStatus;
53
293
  }
54
294
 
@@ -1,25 +1,101 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
2
  declare module 'chargebee' {
3
3
  export interface AdvanceInvoiceSchedule {
4
+
5
+ /**
6
+ * @description System-generated and immutable unique Id for the &#x60;advance_invoice_schedule&#x60;.
7
+
8
+ */
9
+
4
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
+
5
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
+
6
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
+
7
31
  specific_dates_schedule?:AdvanceInvoiceSchedule.SpecificDatesSchedule;
8
32
  }
9
33
  export namespace AdvanceInvoiceSchedule {
10
34
 
11
35
 
12
- export interface FixedIntervalSchedule {
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
+
13
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
+
14
49
  number_of_occurrences?:number;
50
+
51
+ /**
52
+ * @description The number of days before each interval that advance invoices are generated.
53
+
54
+ */
55
+
15
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
+
16
63
  end_date?:number;
64
+
65
+ /**
66
+ * @description The date when this advance invoicing schedule was created.
67
+
68
+ */
69
+
17
70
  created_at?:number;
71
+
72
+ /**
73
+ * @description The number of billing cycles in one interval.
74
+
75
+ */
76
+
18
77
  terms_to_charge?:number;
19
78
  }
20
- export interface SpecificDatesSchedule {
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
+
21
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
+
22
92
  date?:number;
93
+
94
+ /**
95
+ * @description The date when this advance invoicing schedule was created.
96
+
97
+ */
98
+
23
99
  created_at?:number;
24
100
  }
25
101
  }