chargebee 2.51.0 → 2.52.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 (64) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/lib/chargebee.js +1 -1
  3. package/lib/resources/api_endpoints.js +14 -1
  4. package/package.json +1 -1
  5. package/types/core.d.ts +4 -4
  6. package/types/index.d.ts +2 -0
  7. package/types/resources/Address.d.ts +2 -194
  8. package/types/resources/AdvanceInvoiceSchedule.d.ts +5 -67
  9. package/types/resources/Attribute.d.ts +4 -1
  10. package/types/resources/BillingConfiguration.d.ts +21 -0
  11. package/types/resources/Brand.d.ts +12 -0
  12. package/types/resources/BusinessEntity.d.ts +8 -6
  13. package/types/resources/BusinessEntityTransfer.d.ts +10 -7
  14. package/types/resources/Card.d.ts +11 -311
  15. package/types/resources/Comment.d.ts +7 -124
  16. package/types/resources/Contact.d.ts +2 -44
  17. package/types/resources/ContractTerm.d.ts +4 -72
  18. package/types/resources/Coupon.d.ts +0 -37
  19. package/types/resources/CouponCode.d.ts +67 -35
  20. package/types/resources/CouponSet.d.ts +12 -121
  21. package/types/resources/CreditNote.d.ts +0 -6
  22. package/types/resources/Currency.d.ts +8 -5
  23. package/types/resources/Customer.d.ts +90 -89
  24. package/types/resources/Discount.d.ts +2 -89
  25. package/types/resources/Download.d.ts +2 -14
  26. package/types/resources/Entitlement.d.ts +15 -103
  27. package/types/resources/EntitlementOverride.d.ts +4 -89
  28. package/types/resources/Estimate.d.ts +2 -10
  29. package/types/resources/Event.d.ts +23 -108
  30. package/types/resources/Export.d.ts +116 -432
  31. package/types/resources/Feature.d.ts +17 -319
  32. package/types/resources/GatewayErrorDetail.d.ts +6 -48
  33. package/types/resources/Gift.d.ts +34 -294
  34. package/types/resources/Hierarchy.d.ts +4 -24
  35. package/types/resources/ImpactedItem.d.ts +4 -36
  36. package/types/resources/ImpactedItemPrice.d.ts +5 -2
  37. package/types/resources/ImpactedSubscription.d.ts +3 -30
  38. package/types/resources/InAppSubscription.d.ts +13 -355
  39. package/types/resources/Invoice.d.ts +2 -16
  40. package/types/resources/InvoiceEstimate.d.ts +1 -1
  41. package/types/resources/Item.d.ts +0 -7
  42. package/types/resources/ItemEntitlement.d.ts +15 -155
  43. package/types/resources/NonSubscription.d.ts +9 -6
  44. package/types/resources/PaymentIntent.d.ts +9 -255
  45. package/types/resources/PaymentReferenceNumber.d.ts +3 -20
  46. package/types/resources/PaymentSource.d.ts +2 -2
  47. package/types/resources/PaymentVoucher.d.ts +20 -203
  48. package/types/resources/PortalSession.d.ts +4 -146
  49. package/types/resources/PromotionalCredit.d.ts +10 -215
  50. package/types/resources/Purchase.d.ts +3 -1
  51. package/types/resources/Quote.d.ts +19 -1
  52. package/types/resources/QuotedRamp.d.ts +11 -16
  53. package/types/resources/RecordedPurchase.d.ts +2 -0
  54. package/types/resources/ResourceMigration.d.ts +2 -54
  55. package/types/resources/SiteMigrationDetail.d.ts +13 -55
  56. package/types/resources/Subscription.d.ts +11 -9
  57. package/types/resources/SubscriptionEntitlement.d.ts +6 -106
  58. package/types/resources/SubscriptionEstimate.d.ts +14 -11
  59. package/types/resources/TaxWithheld.d.ts +14 -26
  60. package/types/resources/ThirdPartyPaymentMethod.d.ts +2 -19
  61. package/types/resources/TimeMachine.d.ts +3 -64
  62. package/types/resources/Token.d.ts +3 -60
  63. package/types/resources/Transaction.d.ts +2 -2
  64. package/types/resources/Usage.d.ts +21 -165
@@ -1,290 +1,76 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
2
3
  declare module 'chargebee' {
3
4
  export interface Card {
4
5
 
5
- /**
6
- * @description Identifier of the payment source
7
6
 
8
- */
9
-
10
7
  payment_source_id:string;
11
-
12
- /**
13
- * @description Current status of the card. \* valid - A valid and active credit card \* expiring - A card which is expiring in the current month. \* expired - An expired card
14
8
 
15
- */
16
-
17
9
  status:'valid' | 'expiring' | 'expired';
18
-
19
- /**
20
- * @description Name of the gateway this payment source is stored with. \* bluesnap - BlueSnap is a payment gateway. \* tco - 2Checkout is a payment gateway. \* bluepay - BluePay is a payment gateway. \* paypal_express_checkout - PayPal Express Checkout is a payment gateway. \* paypal_payflow_pro - PayPal Payflow Pro is a payment gateway. \* razorpay - Razorpay is a fast growing payment service provider in India working with all leading banks and support for major local payment methods including Netbanking, UPI etc. \* global_payments - Global Payments is a payment service provider. \* not_applicable - Indicates that payment gateway is not applicable for this resource. \* checkout_com - Checkout.com is a payment gateway. \* adyen - Adyen is a payment gateway. \* braintree - Braintree is a payment gateway. \* nmi - NMI is a payment gateway. \* worldpay - WorldPay is a payment gateway \* moneris_us - Moneris USA is a payment gateway. \* pin - Pin is a payment gateway \* authorize_net - Authorize.net is a payment gateway \* stripe - Stripe is a payment gateway. \* moneris - Moneris is a payment gateway. \* chargebee - Chargebee test gateway. \* cybersource - CyberSource is a payment gateway. \* ecentric - Ecentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities. \* first_data_global - First Data Global Gateway Virtual Terminal Account \* exact - Exact Payments is a payment gateway. \* eway - eWAY Account is a payment gateway. \* metrics_global - Metrics global is a leading payment service provider providing unified payment services in the US. \* amazon_payments - Amazon Payments is a payment service provider. \* windcave - Windcave provides an end to end payment processing solution in ANZ and other leading global markets. \* quickbooks - Intuit QuickBooks Payments gateway \* wepay - WePay is a payment gateway. \* wirecard - WireCard Account is a payment service provider. \* chargebee_payments - Chargebee Payments gateway \* sage_pay - Sage Pay is a payment gateway. \* elavon - Elavon Virtual Merchant is a payment solution. \* paypal_pro - PayPal Pro Account is a payment gateway. \* orbital - Chase Paymentech(Orbital) is a payment gateway. \* paypal - PayPal Commerce is a payment gateway. \* beanstream - Bambora(formerly known as Beanstream) is a payment gateway. \* hdfc - HDFC Account is a payment gateway. \* ingenico_direct - Worldline Online Payments is a payment gateway. \* ogone - Ingenico ePayments (formerly known as Ogone) is a payment gateway. \* migs - MasterCard Internet Gateway Service payment gateway. \* vantiv - Vantiv is a payment gateway. \* bank_of_america - Bank of America Gateway \* eway_rapid - eWAY Rapid is a payment gateway. \* gocardless - GoCardless is a payment service provider. \* mollie - Mollie is a payment gateway. \* paymill - PAYMILL is a payment gateway. \* balanced_payments - Balanced is a payment gateway \* ebanx - EBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion.
21
10
 
22
- */
23
-
24
11
  gateway:Gateway;
25
-
26
- /**
27
- * @description The gateway account to which this payment source is stored with.
28
12
 
29
- */
30
-
31
13
  gateway_account_id?:string;
32
-
33
- /**
34
- * @description Reference transaction id which used for transactions
35
14
 
36
- */
37
-
38
15
  ref_tx_id?:string;
39
-
40
- /**
41
- * @description Cardholder&#x27;s first name
42
16
 
43
- */
44
-
45
17
  first_name?:string;
46
-
47
- /**
48
- * @description Cardholder&#x27;s last name
49
18
 
50
- */
51
-
52
19
  last_name?:string;
53
-
54
- /**
55
- * @description The Issuer Identification Number, i.e. the first six digits of the card number
56
20
 
57
- */
58
-
59
21
  iin:string;
60
-
61
- /**
62
- * @description Last four digits of the card number
63
22
 
64
- */
65
-
66
23
  last4:string;
67
-
68
- /**
69
- * @description Card type \* bancontact - A Bancontact card. \* american_express - An American Express card. \* not_applicable - Used for offline entries in transactions. Not applicable for cards \* diners_club - A Diner&#x27;s Club card. \* discover - A Discover card. \* other - Card belonging to types other than those listed above. \* mastercard - A MasterCard. \* jcb - A JCB card. \* visa - A Visa card.
70
24
 
71
- */
72
-
73
25
  card_type?:'visa' | 'mastercard' | 'american_express' | 'discover' | 'jcb' | 'diners_club' | 'bancontact' | 'cmr_falabella' | 'tarjeta_naranja' | 'nativa' | 'cencosud' | 'cabal' | 'argencard' | 'elo' | 'hipercard' | 'carnet' | 'rupay' | 'maestro' | 'dankort' | 'cartes_bancaires' | 'other' | 'not_applicable';
74
-
75
- /**
76
- * @description Card Funding type \* credit - A credit card. \* prepaid - A prepaid card. \* debit - A debit card. \* not_applicable - Used for ACH. Not applicable for cards \* not_known - An unknown card.
77
26
 
78
- */
79
-
80
- funding_type:'not_known' | 'prepaid' | 'not_applicable' | 'credit' | 'debit';
81
-
82
- /**
83
- * @description Card expiry month.
27
+ funding_type:'credit' | 'debit' | 'prepaid' | 'not_known' | 'not_applicable';
84
28
 
85
- */
86
-
87
29
  expiry_month:number;
88
-
89
- /**
90
- * @description Card expiry year.
91
30
 
92
- */
93
-
94
31
  expiry_year:number;
95
-
96
- /**
97
- * @description [two-letter(alpha2)](https://www.iso.org/iso-3166-country-codes.html) ISO country code.
98
32
 
99
- */
100
-
101
33
  issuing_country?:string;
102
-
103
- /**
104
- * @description Address line 1, as available in card billing address.
105
34
 
106
- */
107
-
108
35
  billing_addr1?:string;
109
-
110
- /**
111
- * @description Address line 2, as available in card billing address.
112
36
 
113
- */
114
-
115
37
  billing_addr2?:string;
116
-
117
- /**
118
- * @description City, as available in card billing address.
119
38
 
120
- */
121
-
122
39
  billing_city?:string;
123
-
124
- /**
125
- * @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;).
126
40
 
127
- */
128
-
129
41
  billing_state_code?:string;
130
-
131
- /**
132
- * @description The state/province name.
133
42
 
134
- */
135
-
136
43
  billing_state?:string;
137
-
138
- /**
139
- * @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).
140
-
141
- **Note** : If you enter an invalid country code, the system will return an error.
142
44
 
143
- **Brexit**
144
-
145
-
146
- 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.
147
-
148
- */
149
-
150
45
  billing_country?:string;
151
-
152
- /**
153
- * @description Postal or Zip code, as available in card billing address.
154
46
 
155
- */
156
-
157
47
  billing_zip?:string;
158
-
159
- /**
160
- * @description Timestamp indicating when this card resource is created.
161
48
 
162
- */
163
-
164
49
  created_at:number;
165
-
166
- /**
167
- * @description Version number of this resource. The &#x60;resource_version&#x60; is updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.
168
50
 
169
- */
170
-
171
51
  resource_version?:number;
172
-
173
- /**
174
- * @description Timestamp indicating when this credit card resource was last updated.
175
52
 
176
- */
177
-
178
53
  updated_at?:number;
179
-
180
- /**
181
- * @description The IP address of the customer. Used primarily for referral integration and EU VAT validation.
182
54
 
183
- */
184
-
185
55
  ip_address?:string;
186
-
187
- /**
188
- * @description Card is powered by payment method. \* card - card \* ideal - ideal \* sofort - sofort \* bancontact - bancontact \* giropay - giropay \* latam_local_card - latam_local_card \* not_applicable - not_applicable
189
56
 
190
- */
191
-
192
- powered_by?:'giropay' | 'bancontact' | 'ideal' | 'latam_local_card' | 'not_applicable' | 'sofort' | 'card';
193
-
194
- /**
195
- * @description Identifier of the customer.
57
+ powered_by?:'ideal' | 'sofort' | 'bancontact' | 'giropay' | 'card' | 'latam_local_card' | 'payconiq' | 'not_applicable';
196
58
 
197
- */
198
-
199
59
  customer_id:string;
200
-
201
- /**
202
- * @description Masked credit card number that is safe to show.
203
60
 
204
- */
205
-
206
61
  masked_number?:string;
62
+
207
63
  }
208
64
  export namespace Card {
209
65
  export class CardResource {
210
- /**
211
- * @description #### Deprecated
212
-
213
- This operation is obsoleted by the [Retrieve a payment source API](/docs/api/payment_sources#retrieve_a_payment_source).
214
-
215
- Retrieves the credit card for the customer id.
216
-
217
- */
218
-
219
66
  retrieve(customer_id:string):ChargebeeRequest<RetrieveResponse>;
220
67
 
221
- /**
222
- * @description #### Deprecated
223
-
224
- The [Payment Sources API](/docs/api/payment_sources), with its additional options and improvements, obsoletes the [Cards APIs](/docs/api/cards). This operation is obsoleted by the following:
225
-
226
- * [Create using temporary token](/docs/api/payment_sources#create_using_temporary_token)
227
- * [Create using permanent token](/docs/api/payment_sources#create_using_permanent_token)
228
- * [Create a card payment source](/docs/api/payment_sources#create_a_card_payment_source)
229
-
230
- Adds or replaces card details of a customer. Updating card details replaces the present payment method.
231
-
232
- Passing credit card details to this API involves PCI liability at your end as sensitive card info passes through your servers. If you wish to avoid that, you can use one of the following integration methodologies if applicable
233
-
234
- * If you are using Stripe gateway, you can use [Stripe.js](https://stripe.com/docs/stripe.js) with your card update form.
235
- * If you are using Braintree gateway, you can use [Braintree.js](https://www.braintreepayments.com/docs/javascript) with your card update form.
236
- * If you are using Authorize.Net gateway, you use [Accept.js](https://developer.authorize.net/api/reference/features/acceptjs.html) with your card update form.
237
- * In case you are using the Adyen gateway, you will have to use the Adyen&#x27;s [Client Side Encryption](https://docs.adyen.com/online-payments/classic-integrations/api-integration-ecommerce/cse-integration-ecommerce) to encrypt sensitive cardholder data. Once the cardholder data is encrypted, pass the value in adyen.encrypted.data as temp token in this API.
238
- * You can also use our [Hosted Pages](https://www.chargebee.com/docs/hosted_pages.html) based integration. Use our [Hosted Page - Update Card](/docs/api/hosted_pages#update_card) API to generate a &#x27;Update Card&#x27; Hosted Page link.
239
-
240
-
241
-
242
- **Legacy behavior:**
243
-
244
- * **For [sites](https://www.chargebee.com/docs/sites-intro.html) created before March 1st, 2014:** On making this request, the &#x60;billing_address&#x60; and &#x60;vat_number&#x60; of the customer are **deleted** and replaced by the values passed with this request. Ensure that you pass the [billing address parameters](/docs/api/subscriptions?prod_cat_ver&#x3D;1#create_a_subscription_card_billing_addr1) and the &#x60;vat_number&#x60; parameters each time you make this request, to avoid losing the same information at the customer-level.
245
- * **For [sites](https://www.chargebee.com/docs/sites-intro.html) created on or after March 1st, 2014:** This request does not alter the &#x60;billing_address&#x60; and &#x60;vat_number&#x60; of the customer.
246
-
247
- */
248
-
249
68
  update_card_for_customer(customer_id:string, input:UpdateCardForCustomerInputParam):ChargebeeRequest<UpdateCardForCustomerResponse>;
250
69
 
251
- /**
252
- * @description #### Deprecated
253
-
254
- This request is obsoleted by the [Switch gateway account API](/docs/api/payment_sources#switch_gateway_account) for Payment Sources.
255
-
256
- Switches the gateway in which customer&#x27;s card information is stored. This is applicable only if the payment method is &#x60;card&#x60;.
257
-
258
- **Limitation**
259
- This request does not support switching between Braintree and Stripe payment gateways. Contact [Chargebee Support](https://chargebee.freshdesk.com/support/home) to perform those actions.
260
-
261
- */
262
-
263
70
  switch_gateway_for_customer(customer_id:string, input:SwitchGatewayForCustomerInputParam):ChargebeeRequest<SwitchGatewayForCustomerResponse>;
264
71
 
265
- /**
266
- * @description #### deprecated
267
-
268
- The [Payment Sources API](/docs/api/payment_sources), with its additional options and improvements, obsoletes the Cards APIs. This request is obsoleted by the [Export payment source API](/docs/api/payment_sources#export_payment_source).
269
-
270
- Copies the customer&#x27;s card information to another payment gateway. This is useful if you want to port your customer&#x27;s card details to another gateway.
271
-
272
- **Limitation**
273
- This request does not support copying of cards between Braintree and Stripe payment gateways. Contact [Chargebee Support](https://chargebee.freshdesk.com/support/home) to perform those actions.
274
-
275
- */
276
-
277
72
  copy_card_for_customer(customer_id:string, input:CopyCardForCustomerInputParam):ChargebeeRequest<CopyCardForCustomerResponse>;
278
73
 
279
- /**
280
- * @description #### deprecated
281
-
282
- The [Payment Sources API](/docs/api/payment_sources), with its additional options and improvements, obsoletes the Cards APIs. This request is obsoleted by the [Delete a payment source API](/docs/api/payment_sources#delete_a_payment_source).
283
-
284
- Deletes the card for a customer. Upon successful deletion the &#x60;auto_collection&#x60; attribute for the customer is set to &#x60;off&#x60; and a &#x60;card_deleted&#x60; event is triggered. If there is no card found at the gateway for the customer, this API returns without errors.
285
-
286
- */
287
-
288
74
  delete_card_for_customer(customer_id:string):ChargebeeRequest<DeleteCardForCustomerResponse>;
289
75
  }
290
76
  export interface RetrieveResponse {
@@ -298,121 +84,43 @@ Deletes the card for a customer. Upon successful deletion the &#x60;auto_collect
298
84
  }
299
85
  export interface UpdateCardForCustomerInputParam {
300
86
 
301
- /**
302
- * @description The gateway account in which this payment source is stored.
303
-
304
- */
87
+ customer?:{vat_number?:string};
305
88
 
306
- gateway_account_id?:string;
89
+ gateway?:Gateway;
307
90
 
308
- /**
309
- * @description The single-use card token returned by vaults like Stripe/Braintree which act as a substitute for your card details. Before calling this API, you should have submitted your card details to the gateway and gotten this token in return.
310
- **Note:** Supported only for Stripe, Braintree and Authorize.Net. If this value is specified, there is no need to specify other card details (like number, cvv, etc).
311
-
312
- */
91
+ gateway_account_id?:string;
313
92
 
314
93
  tmp_token?:string;
315
94
 
316
- /**
317
- * @description Cardholder&#x27;s first name.
318
-
319
- */
320
-
321
95
  first_name?:string;
322
96
 
323
- /**
324
- * @description Cardholder&#x27;s last name.
325
-
326
- */
327
-
328
97
  last_name?:string;
329
98
 
330
- /**
331
- * @description The credit card number without any format. If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js), you can specify the Braintree encrypted card number here.
332
-
333
- */
334
-
335
99
  number:string;
336
100
 
337
- /**
338
- * @description Card expiry month.
339
-
340
- */
341
-
342
101
  expiry_month:number;
343
102
 
344
- /**
345
- * @description Card expiry year.
346
-
347
- */
348
-
349
103
  expiry_year:number;
350
104
 
351
- /**
352
- * @description The card verification value (CVV). If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js), you can specify the Braintree encrypted CVV here.
353
-
354
- */
355
-
356
105
  cvv?:string;
357
106
 
358
- /**
359
- * @description Address line 1, as available in card billing address.
360
-
361
- */
107
+ preferred_scheme?:'cartes_bancaires' | 'mastercard' | 'visa';
362
108
 
363
109
  billing_addr1?:string;
364
110
 
365
- /**
366
- * @description Address line 2, as available in card billing address.
367
-
368
- */
369
-
370
111
  billing_addr2?:string;
371
112
 
372
- /**
373
- * @description City, as available in card billing address.
374
-
375
- */
376
-
377
113
  billing_city?:string;
378
114
 
379
- /**
380
- * @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;).
381
-
382
- */
383
-
384
115
  billing_state_code?:string;
385
116
 
386
- /**
387
- * @description The state/province name. Is set by Chargebee automatically for US, Canada and India If &#x60;state_code&#x60; is provided.
388
-
389
- */
390
-
391
117
  billing_state?:string;
392
118
 
393
- /**
394
- * @description Postal or Zip code, as available in card billing address.
395
-
396
- */
397
-
398
119
  billing_zip?:string;
399
120
 
400
- /**
401
- * @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).
402
-
403
- **Note** : If you enter an invalid country code, the system will return an error.
404
-
405
- **Brexit**
406
-
407
-
408
- 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.
409
- .
410
-
411
- */
412
-
413
121
  billing_country?:string;
414
-
415
- preferred_scheme?:'cartes_bancaires' | 'mastercard' | 'visa';
122
+
123
+ ip_address?:string;
416
124
  }
417
125
  export interface SwitchGatewayForCustomerResponse {
418
126
  customer:Customer;
@@ -421,10 +129,7 @@ If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021
421
129
  }
422
130
  export interface SwitchGatewayForCustomerInputParam {
423
131
 
424
- /**
425
- * @description The gateway account you want to switch to.
426
-
427
- */
132
+ gateway?:Gateway;
428
133
 
429
134
  gateway_account_id:string;
430
135
  }
@@ -433,11 +138,6 @@ If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021
433
138
  }
434
139
  export interface CopyCardForCustomerInputParam {
435
140
 
436
- /**
437
- * @description The gateway account you want to copy the card.
438
-
439
- */
440
-
441
141
  gateway_account_id:string;
442
142
  }
443
143
  export interface DeleteCardForCustomerResponse {
@@ -1,88 +1,32 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
2
3
  declare module 'chargebee' {
3
4
  export interface Comment {
4
5
 
5
- /**
6
- * @description Unique identifier for the comment.
7
6
 
8
- */
9
-
10
7
  id:string;
11
-
12
- /**
13
- * @description Type of the entity this comment generated for \* item - Entity that represents item \* invoice - Invoice description \* product - Entity that represents product \* plan - Entity that represents a subscription plan \* item_family - Entity that represents item family \* transaction - Entity that represents a transaction. \* quote - Entity that represents a quote \* order - Entity that represents an order \* item_price - Entity that represents item price \* customer - Entity that represents a customer \* variant - Entity that represents product variants \* business_entity - Entity that represents item of type business entity \* coupon - Entity that represents a discount coupon \* subscription - Entity that represents a subscription of a customer \* addon - Entity that represents an addon \* credit_note - Credit note description
14
8
 
15
- */
16
-
17
9
  entity_type:EntityType;
18
-
19
- /**
20
- * @description The user who created the comment. If created via API, this contains the name given for the API key used.
21
10
 
22
- */
23
-
24
11
  added_by?:string;
25
-
26
- /**
27
- * @description Actual notes for the comment.
28
12
 
29
- */
30
-
31
13
  notes:string;
32
-
33
- /**
34
- * @description The time at which this comment was created
35
14
 
36
- */
37
-
38
15
  created_at:number;
39
-
40
- /**
41
- * @description Type of comment this is. \* system - Comment generated by Chargebee when any backend changes happen for an entity \* user - Comment generated by user either via API or Admin console.
42
16
 
43
- */
44
-
45
- type:'system' | 'user';
46
-
47
- /**
48
- * @description Unique identifier of the entity.
17
+ type:'user' | 'system';
49
18
 
50
- */
51
-
52
19
  entity_id:string;
20
+
53
21
  }
54
22
  export namespace Comment {
55
23
  export class CommentResource {
56
- /**
57
- * @description Create a new comment for an entity. The newly added comment will be shown in the web interface as well.
58
-
59
- */
60
-
61
24
  create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
62
25
 
63
- /**
64
- * @description Retrieve a comment for an entity identified by comment ID.
65
-
66
- */
67
-
68
26
  retrieve(comment_id:string):ChargebeeRequest<RetrieveResponse>;
69
27
 
70
- /**
71
- * @description Retrieve the list of comments sorted by the recent ones on the top.
72
-
73
- If you want to retrieve the list of comments for an [entity](https://apidocs.chargebee.com/docs/api/v1/comments?prod_cat_ver&#x3D;1#list_comments_entity_type), for example, subscription you can filter them by passing the entity type and unique identifier for that entity, for example, subscription ID.
74
-
75
- */
76
-
77
28
  list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
78
29
 
79
- /**
80
- * @description Delete a comment for an [entity](https://apidocs.chargebee.com/docs/api/v1/comments?prod_cat_ver&#x3D;1#create_a_comment_entity_type) identified by comment ID.
81
-
82
- Only the comments that are added via Admin console and API can be deleted. Chargebee generated &quot;System&quot; comments cannot be deleted.
83
-
84
- */
85
-
86
30
  delete(comment_id:string):ChargebeeRequest<DeleteResponse>;
87
31
  }
88
32
  export interface CreateResponse {
@@ -90,32 +34,12 @@ Only the comments that are added via Admin console and API can be deleted. Charg
90
34
  }
91
35
  export interface CreateInputParam {
92
36
 
93
- /**
94
- * @description Type of the entity to create the comment for. \* item - Entity that represents item \* order - Entity that represents an order \* item_price - Entity that represents item price \* customer - Entity that represents a customer \* variant - Entity that represents product variants \* invoice - Invoice description \* product - Entity that represents product \* business_entity - Entity that represents item of type business entity \* plan - Entity that represents a subscription plan \* coupon - Entity that represents a discount coupon \* subscription - Entity that represents a subscription of a customer \* item_family - Entity that represents item family \* transaction - Entity that represents a transaction. \* addon - Entity that represents an addon \* credit_note - Credit note description \* quote - Entity that represents a quote
95
-
96
- */
97
-
98
37
  entity_type:EntityType;
99
38
 
100
- /**
101
- * @description Unique identifier of the entity.
102
-
103
- */
104
-
105
39
  entity_id:string;
106
40
 
107
- /**
108
- * @description Actual notes for the comment.
109
-
110
- */
111
-
112
41
  notes:string;
113
42
 
114
- /**
115
- * @description The user who created the comment. If created via API, this contains the name given for the API key used.
116
-
117
- */
118
-
119
43
  added_by?:string;
120
44
  }
121
45
  export interface RetrieveResponse {
@@ -123,78 +47,37 @@ Only the comments that are added via Admin console and API can be deleted. Charg
123
47
  }
124
48
 
125
49
  export interface ListResponse {
126
- /**
127
- * @description Retrieve the list of comments sorted by the recent ones on the top.
128
-
129
- If you want to retrieve the list of comments for an [entity](https://apidocs.chargebee.com/docs/api/v1/comments?prod_cat_ver&#x3D;1#list_comments_entity_type), for example, subscription you can filter them by passing the entity type and unique identifier for that entity, for example, subscription ID.
130
-
131
- */
132
-
133
50
  list:{comment:Comment}[];
134
51
 
135
- /**
136
- * @description Retrieve the list of comments sorted by the recent ones on the top.
137
-
138
- If you want to retrieve the list of comments for an [entity](https://apidocs.chargebee.com/docs/api/v1/comments?prod_cat_ver&#x3D;1#list_comments_entity_type), for example, subscription you can filter them by passing the entity type and unique identifier for that entity, for example, subscription ID.
139
-
140
- */
141
-
142
52
  next_offset?:string;
143
53
  }
144
54
  export interface ListInputParam {
145
55
  [key : string]: any;
146
56
  /**
147
- * @description Retrieve the list of comments sorted by the recent ones on the top.
148
-
149
- If you want to retrieve the list of comments for an [entity](https://apidocs.chargebee.com/docs/api/v1/comments?prod_cat_ver&#x3D;1#list_comments_entity_type), for example, subscription you can filter them by passing the entity type and unique identifier for that entity, for example, subscription ID.
57
+ * @description The number of resources to be returned.
150
58
 
151
59
  */
152
60
 
153
61
  limit?:number;
154
62
 
155
63
  /**
156
- * @description Retrieve the list of comments sorted by the recent ones on the top.
157
-
158
- If you want to retrieve the list of comments for an [entity](https://apidocs.chargebee.com/docs/api/v1/comments?prod_cat_ver&#x3D;1#list_comments_entity_type), for example, subscription you can filter them by passing the entity type and unique identifier for that entity, for example, subscription ID.
64
+ * @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.
159
65
 
160
66
  */
161
67
 
162
68
  offset?:string;
163
69
 
164
- /**
165
- * @description Retrieve the list of comments sorted by the recent ones on the top.
166
-
167
- If you want to retrieve the list of comments for an [entity](https://apidocs.chargebee.com/docs/api/v1/comments?prod_cat_ver&#x3D;1#list_comments_entity_type), for example, subscription you can filter them by passing the entity type and unique identifier for that entity, for example, subscription ID.
168
-
169
- */
170
-
171
- entity_type?:'item' | 'product' | 'coupon' | 'addon' | 'item_price' | 'business_entity' | 'subscription' | 'item_family' | 'credit_note' | 'quote' | 'variant' | 'invoice' | 'plan' | 'transaction' | 'customer' | 'order';
70
+ entity_type?:'customer' | 'subscription' | 'invoice' | 'quote' | 'credit_note' | 'transaction' | 'plan' | 'addon' | 'coupon' | 'order' | 'business_entity' | 'omnichannel_subscription' | 'omnichannel_subscription_item' | 'omnichannel_transaction' | 'recorded_purchase' | 'omnichannel_subscription_item_scheduled_change' | 'sales_order' | 'item_family' | 'item' | 'item_price' | 'price_variant';
172
71
 
173
- /**
174
- * @description Retrieve the list of comments sorted by the recent ones on the top.
175
-
176
- If you want to retrieve the list of comments for an [entity](https://apidocs.chargebee.com/docs/api/v1/comments?prod_cat_ver&#x3D;1#list_comments_entity_type), for example, subscription you can filter them by passing the entity type and unique identifier for that entity, for example, subscription ID.
177
-
178
- */
179
-
180
72
  entity_id?:string;
181
73
 
182
74
  /**
183
- * @description Retrieve the list of comments sorted by the recent ones on the top.
184
-
185
- If you want to retrieve the list of comments for an [entity](https://apidocs.chargebee.com/docs/api/v1/comments?prod_cat_ver&#x3D;1#list_comments_entity_type), for example, subscription you can filter them by passing the entity type and unique identifier for that entity, for example, subscription ID.
75
+ * @description The time at which this comment was created
186
76
 
187
77
  */
188
78
 
189
79
  created_at?:{after?:string,before?:string,between?:string,on?:string};
190
80
 
191
- /**
192
- * @description Retrieve the list of comments sorted by the recent ones on the top.
193
-
194
- If you want to retrieve the list of comments for an [entity](https://apidocs.chargebee.com/docs/api/v1/comments?prod_cat_ver&#x3D;1#list_comments_entity_type), for example, subscription you can filter them by passing the entity type and unique identifier for that entity, for example, subscription ID.
195
-
196
- */
197
-
198
81
  sort_by?:{asc?:'created_at',desc?:'created_at'};
199
82
  }
200
83
  export interface DeleteResponse {