chargebee 2.26.1 → 2.27.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 (43) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/lib/chargebee.js +1 -1
  3. package/lib/resources/api_endpoints.js +8 -1
  4. package/package.json +1 -1
  5. package/types/resources/Address.d.ts +0 -10
  6. package/types/resources/AttachedItem.d.ts +0 -20
  7. package/types/resources/Card.d.ts +0 -110
  8. package/types/resources/Comment.d.ts +0 -17
  9. package/types/resources/Coupon.d.ts +0 -37
  10. package/types/resources/CouponCode.d.ts +0 -10
  11. package/types/resources/CouponSet.d.ts +0 -30
  12. package/types/resources/CreditNote.d.ts +0 -102
  13. package/types/resources/Customer.d.ts +0 -313
  14. package/types/resources/DifferentialPrice.d.ts +0 -20
  15. package/types/resources/Estimate.d.ts +0 -160
  16. package/types/resources/Event.d.ts +0 -7
  17. package/types/resources/Export.d.ts +0 -81
  18. package/types/resources/Feature.d.ts +0 -69
  19. package/types/resources/Gift.d.ts +0 -55
  20. package/types/resources/HostedPage.d.ts +0 -166
  21. package/types/resources/InAppSubscription.d.ts +0 -267
  22. package/types/resources/Invoice.d.ts +0 -350
  23. package/types/resources/Item.d.ts +0 -20
  24. package/types/resources/ItemEntitlement.d.ts +0 -10
  25. package/types/resources/ItemFamily.d.ts +0 -20
  26. package/types/resources/ItemPrice.d.ts +0 -20
  27. package/types/resources/NonSubscription.d.ts +0 -5
  28. package/types/resources/Order.d.ts +0 -52
  29. package/types/resources/PaymentIntent.d.ts +0 -25
  30. package/types/resources/PaymentSource.d.ts +0 -275
  31. package/types/resources/PaymentVoucher.d.ts +0 -10
  32. package/types/resources/PortalSession.d.ts +0 -33
  33. package/types/resources/PromotionalCredit.d.ts +0 -51
  34. package/types/resources/Purchase.d.ts +0 -68
  35. package/types/resources/Quote.d.ts +0 -165
  36. package/types/resources/ResourceMigration.d.ts +0 -5
  37. package/types/resources/Subscription.d.ts +103 -1001
  38. package/types/resources/TimeMachine.d.ts +0 -17
  39. package/types/resources/Token.d.ts +0 -15
  40. package/types/resources/Transaction.d.ts +0 -30
  41. package/types/resources/UnbilledCharge.d.ts +0 -46
  42. package/types/resources/Usage.d.ts +0 -22
  43. package/types/resources/VirtualBankAccount.d.ts +0 -35
package/CHANGELOG.md CHANGED
@@ -2,6 +2,26 @@
2
2
  * * *
3
3
  * Support Descriptions for the attributes and actions has been added.
4
4
 
5
+ ### v2.27.0 (2023-09-05)
6
+ * * *
7
+
8
+ #### New Resource:
9
+ * CsvTaxRule has been added.
10
+
11
+ #### New attributes:
12
+ * direct_debit_scheme has been added to the PaymentSource#PaymentSourceBankAccount resource.
13
+
14
+ #### New Enum :
15
+ * DirectDebitSchemeEnum has been added.
16
+ * Tax1JurisTypeEnum has been added.
17
+ * Tax2JurisTypeEnum has been added.
18
+ * Tax3JurisTypeEnum has been added.
19
+ * Tax4JurisTypeEnum has been added.
20
+
21
+ #### New Input parameters:
22
+ * avalara_tax_code, hsn_code, taxjar_product_code has been added to Invoice#AddChargeRequest.
23
+
24
+
5
25
  ### v2.26.0 (2023-07-31)
6
26
  * * *
7
27
 
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.1',
14
+ clientVersion: 'v2.27.0',
15
15
  port: 443,
16
16
  timemachineWaitInMillis: 3000,
17
17
  exportWaitInMillis: 3000
@@ -2676,6 +2676,13 @@ var _endpoints = {
2676
2676
  "/payment_vouchers",
2677
2677
  true
2678
2678
  ]
2679
- ]
2679
+ ],
2680
+ "csv_tax_rule": [[
2681
+ "create",
2682
+ "POST",
2683
+ "/csv_tax_rules",
2684
+ null,
2685
+ false
2686
+ ]]
2680
2687
  };
2681
2688
  module.exports = _endpoints;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"chargebee",
3
- "version":"2.26.1",
3
+ "version":"2.27.0",
4
4
  "description":"A library for integrating with ChargeBee.",
5
5
  "keywords":[
6
6
  "payments",
@@ -138,11 +138,6 @@ If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021
138
138
  update(input:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
139
139
  }
140
140
  export interface RetrieveResponse {
141
- /**
142
- * @description Retrieves an address resource for a subscription and the specified label.
143
-
144
- */
145
-
146
141
  address:Address;
147
142
  }
148
143
  export interface RetrieveInputParam {
@@ -162,11 +157,6 @@ If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021
162
157
  label:string;
163
158
  }
164
159
  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
160
  address:Address;
171
161
  }
172
162
  export interface UpdateInputParam {
@@ -139,11 +139,6 @@ The value set explicitly for &#x60;billing_cycles&#x60; while [applying the addo
139
139
  delete(attached_item_id:string, input:DeleteInputParam):ChargebeeRequest<DeleteResponse>;
140
140
  }
141
141
  export interface RetrieveResponse {
142
- /**
143
- * @description Retrieves details of an attached addon or a charge item.
144
-
145
- */
146
-
147
142
  attached_item:AttachedItem;
148
143
  }
149
144
  export interface RetrieveInputParam {
@@ -156,11 +151,6 @@ The value set explicitly for &#x60;billing_cycles&#x60; while [applying the addo
156
151
  parent_item_id:string;
157
152
  }
158
153
  export interface UpdateResponse {
159
- /**
160
- * @description Updates an attached addon or a charge item for a plan.
161
-
162
- */
163
-
164
154
  attached_item:AttachedItem;
165
155
  }
166
156
  export interface UpdateInputParam {
@@ -290,11 +280,6 @@ The value set explicitly for &#x60;billing_cycles&#x60; while [applying the addo
290
280
  updated_at?:{after?:string,before?:string,between?:string,on?:string};
291
281
  }
292
282
  export interface CreateResponse {
293
- /**
294
- * @description Creates an attached addon or a charge item for a plan.
295
-
296
- */
297
-
298
283
  attached_item:AttachedItem;
299
284
  }
300
285
  export interface CreateInputParam {
@@ -351,11 +336,6 @@ The value set explicitly for &#x60;billing_cycles&#x60; while [applying the addo
351
336
  charge_once?:boolean;
352
337
  }
353
338
  export interface DeleteResponse {
354
- /**
355
- * @description Deletes an attached addon or a charge item.
356
-
357
- */
358
-
359
339
  attached_item:AttachedItem;
360
340
  }
361
341
  export interface DeleteInputParam {
@@ -288,18 +288,6 @@ Passing credit card details to this API involves PCI liability at your end as se
288
288
  update_card_for_customer(customer_id:string, input:UpdateCardForCustomerInputParam):ChargebeeRequest<UpdateCardForCustomerResponse>;
289
289
  }
290
290
  export interface CopyCardForCustomerResponse {
291
- /**
292
- * @description #### deprecated
293
-
294
- 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).
295
-
296
- 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.
297
-
298
- **Limitation**
299
- 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.
300
-
301
- */
302
-
303
291
  third_party_payment_method:ThirdPartyPaymentMethod;
304
292
  }
305
293
  export interface CopyCardForCustomerInputParam {
@@ -312,45 +300,12 @@ This request does not support copying of cards between Braintree and Stripe paym
312
300
  gateway_account_id:string;
313
301
  }
314
302
  export interface RetrieveResponse {
315
- /**
316
- * @description #### Deprecated
317
-
318
- This operation is obsoleted by the [Retrieve a payment source API](/docs/api/payment_sources#retrieve_a_payment_source).
319
-
320
- Retrieves the credit card for the customer id.
321
-
322
- */
323
-
324
303
  card:Card;
325
304
  }
326
305
 
327
306
  export interface SwitchGatewayForCustomerResponse {
328
- /**
329
- * @description #### Deprecated
330
-
331
- This request is obsoleted by the [Switch gateway account API](/docs/api/payment_sources#switch_gateway_account) for Payment Sources.
332
-
333
- Switches the gateway in which customer&#x27;s card information is stored. This is applicable only if the payment method is &#x60;card&#x60;.
334
-
335
- **Limitation**
336
- 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.
337
-
338
- */
339
-
340
307
  customer:Customer;
341
308
 
342
- /**
343
- * @description #### Deprecated
344
-
345
- This request is obsoleted by the [Switch gateway account API](/docs/api/payment_sources#switch_gateway_account) for Payment Sources.
346
-
347
- Switches the gateway in which customer&#x27;s card information is stored. This is applicable only if the payment method is &#x60;card&#x60;.
348
-
349
- **Limitation**
350
- 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.
351
-
352
- */
353
-
354
309
  card:Card;
355
310
  }
356
311
  export interface SwitchGatewayForCustomerInputParam {
@@ -363,77 +318,12 @@ This request does not support switching between Braintree and Stripe payment gat
363
318
  gateway_account_id:string;
364
319
  }
365
320
  export interface DeleteCardForCustomerResponse {
366
- /**
367
- * @description #### deprecated
368
-
369
- 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).
370
-
371
- 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.
372
-
373
- */
374
-
375
321
  customer:Customer;
376
322
  }
377
323
 
378
324
  export interface UpdateCardForCustomerResponse {
379
- /**
380
- * @description #### Deprecated
381
-
382
- 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:
383
-
384
- * [Create using temporary token](/docs/api/payment_sources#create_using_temporary_token)
385
- * [Create using permanent token](/docs/api/payment_sources#create_using_permanent_token)
386
- * [Create a card payment source](/docs/api/payment_sources#create_a_card_payment_source)
387
-
388
- Adds or replaces card details of a customer. Updating card details replaces the present payment method.
389
-
390
- 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
391
-
392
- * If you are using Stripe gateway, you can use [Stripe.js](https://stripe.com/docs/stripe.js) with your card update form.
393
- * If you are using Braintree gateway, you can use [Braintree.js](https://www.braintreepayments.com/docs/javascript) with your card update form.
394
- * 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.
395
- * In case you are using the Adyen gateway, you will have to use the Adyen&#x27;s [Client Side Encryption](https://docs.adyen.com/developers/features/client-side-encryption) to encrypt sensitive cardholder data. Once the cardholder data is encrypted, pass the value in adyen.encrypted.data as temp token in this API.
396
- * 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.
397
-
398
-
399
-
400
- **Legacy behavior:**
401
-
402
- * **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.
403
- * **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.
404
-
405
- */
406
-
407
325
  customer:Customer;
408
326
 
409
- /**
410
- * @description #### Deprecated
411
-
412
- 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:
413
-
414
- * [Create using temporary token](/docs/api/payment_sources#create_using_temporary_token)
415
- * [Create using permanent token](/docs/api/payment_sources#create_using_permanent_token)
416
- * [Create a card payment source](/docs/api/payment_sources#create_a_card_payment_source)
417
-
418
- Adds or replaces card details of a customer. Updating card details replaces the present payment method.
419
-
420
- 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
421
-
422
- * If you are using Stripe gateway, you can use [Stripe.js](https://stripe.com/docs/stripe.js) with your card update form.
423
- * If you are using Braintree gateway, you can use [Braintree.js](https://www.braintreepayments.com/docs/javascript) with your card update form.
424
- * 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.
425
- * In case you are using the Adyen gateway, you will have to use the Adyen&#x27;s [Client Side Encryption](https://docs.adyen.com/developers/features/client-side-encryption) to encrypt sensitive cardholder data. Once the cardholder data is encrypted, pass the value in adyen.encrypted.data as temp token in this API.
426
- * 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.
427
-
428
-
429
-
430
- **Legacy behavior:**
431
-
432
- * **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.
433
- * **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.
434
-
435
- */
436
-
437
327
  card:Card;
438
328
  }
439
329
  export interface UpdateCardForCustomerInputParam {
@@ -86,22 +86,10 @@ If you want to retrieve the list of comments for an [entity](https://apidocs.cha
86
86
  create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
87
87
  }
88
88
  export interface DeleteResponse {
89
- /**
90
- * @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.
91
-
92
- Only the comments that are added via Admin console and API can be deleted. Chargebee generated &quot;System&quot; comments cannot be deleted.
93
-
94
- */
95
-
96
89
  comment:Comment;
97
90
  }
98
91
 
99
92
  export interface RetrieveResponse {
100
- /**
101
- * @description Retrieve a comment for an entity identified by comment ID.
102
-
103
- */
104
-
105
93
  comment:Comment;
106
94
  }
107
95
 
@@ -175,11 +163,6 @@ If you want to retrieve the list of comments for an [entity](https://apidocs.cha
175
163
  sort_by?:{asc?:'created_at',desc?:'created_at'};
176
164
  }
177
165
  export interface CreateResponse {
178
- /**
179
- * @description Create a new comment for an entity. The newly added comment will be shown in the web interface as well.
180
-
181
- */
182
-
183
166
  comment:Comment;
184
167
  }
185
168
  export interface CreateInputParam {
@@ -362,11 +362,6 @@ Make sure that you [encode](https://www.urlencoder.org/) the name of the coupon
362
362
  plan?:{};
363
363
  }
364
364
  export interface UpdateForItemsResponse {
365
- /**
366
- * @description This API updates a coupon that is created for a specific promotion or offers.
367
-
368
- */
369
-
370
365
  coupon:Coupon;
371
366
  }
372
367
  export interface UpdateForItemsInputParam {
@@ -517,36 +512,14 @@ If not specified, the coupon can be redeemed an indefinite number of times.
517
512
  coupon_constraints?:{entity_type:'customer',type:'max_redemptions' | 'unique_by',value?:string}[];
518
513
  }
519
514
  export interface UnarchiveResponse {
520
- /**
521
- * @description This API unarchives a specific coupon using the coupon ID.
522
-
523
- */
524
-
525
515
  coupon:Coupon;
526
516
  }
527
517
 
528
518
  export interface DeleteResponse {
529
- /**
530
- * @description If no Subscriptions/Invoices are linked to this Coupon, the Coupon will be deleted from your Chargebee site. This action cannot be undone.
531
-
532
- To ensure that existing Subscriptions/Invoices are not affected, Coupons associated with them will not be deleted, but moved to &quot;Archived&quot; state. Once a Coupon has been archived, it cannot be edited or used again unless [unarchived](coupons#unarchive_a_coupon). Unused Coupons codes are deleted.
533
-
534
- */
535
-
536
519
  coupon:Coupon;
537
520
  }
538
521
 
539
522
  export interface CopyResponse {
540
- /**
541
- * @description Copies a coupon over from one site to another. Copying of [archived](./coupons?prod_cat_ver&#x3D;2#coupon_status) coupons is not supported.
542
-
543
- The item prices that are linked to the coupon in the source site are also linked to the coupon in the destination site. However, this will only work if those item prices exist and with the same [ids](./item_prices?prod_cat_ver&#x3D;2#item_price_id), in the destination site. Hence, it is recommended that the item prices be copied over before copying the coupons.
544
-
545
- The value for [redemptions](./coupons?prod_cat_ver&#x3D;2#coupon_redemptions) is not copied. It is set to &#x60;0&#x60; for the newly created coupon. Hence, if such a coupon had &#x60;expired&#x60; in the source site due to &#x60;redemptions&#x60; having reached [max_redemptions](./coupons?prod_cat_ver&#x3D;2#coupon_max_redemptions), it&#x27;s [status](./coupons?prod_cat_ver&#x3D;2#coupon_status) would be &#x60;active&#x60; in the destination site.
546
-
547
-
548
- */
549
-
550
523
  coupon:Coupon;
551
524
  }
552
525
  export interface CopyInputParam {
@@ -582,20 +555,10 @@ The value for [redemptions](./coupons?prod_cat_ver&#x3D;2#coupon_redemptions) is
582
555
  for_site_merging?:boolean;
583
556
  }
584
557
  export interface RetrieveResponse {
585
- /**
586
- * @description This API retrieves a specific coupon using the coupon ID.
587
-
588
- */
589
-
590
558
  coupon:Coupon;
591
559
  }
592
560
 
593
561
  export interface CreateForItemsResponse {
594
- /**
595
- * @description This API creates a new coupon for a specific promotion or offers.
596
-
597
- */
598
-
599
562
  coupon:Coupon;
600
563
  }
601
564
  export interface CreateForItemsInputParam {
@@ -54,20 +54,10 @@ declare module 'chargebee' {
54
54
  archive(coupon_code_code:string):ChargebeeRequest<ArchiveResponse>;
55
55
  }
56
56
  export interface RetrieveResponse {
57
- /**
58
- * @description Retrieves a specific coupon code details.
59
-
60
- */
61
-
62
57
  coupon_code:CouponCode;
63
58
  }
64
59
 
65
60
  export interface ArchiveResponse {
66
- /**
67
- * @description Archives a coupon code thereby making it inactive. The archived coupon code cannot be applied to any subscription.
68
-
69
- */
70
-
71
61
  coupon_code:CouponCode;
72
62
  }
73
63
 
@@ -169,11 +169,6 @@ declare module 'chargebee' {
169
169
  archived_count?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string};
170
170
  }
171
171
  export interface CreateResponse {
172
- /**
173
- * @description Create a coupon set with a coupon code compatible to your product offers and promotional discounts
174
-
175
- */
176
-
177
172
  coupon_set:CouponSet;
178
173
  }
179
174
  export interface CreateInputParam {
@@ -207,11 +202,6 @@ declare module 'chargebee' {
207
202
  meta_data?:object;
208
203
  }
209
204
  export interface UpdateResponse {
210
- /**
211
- * @description Use this API to update a specific coupon set by updating its &#x60;name&#x60; and the &#x60;meta_data&#x60;.
212
-
213
- */
214
-
215
205
  coupon_set:CouponSet;
216
206
  }
217
207
  export interface UpdateInputParam {
@@ -231,20 +221,10 @@ declare module 'chargebee' {
231
221
  meta_data?:object;
232
222
  }
233
223
  export interface RetrieveResponse {
234
- /**
235
- * @description Use this API to retrieve a specific coupon set.
236
-
237
- */
238
-
239
224
  coupon_set:CouponSet;
240
225
  }
241
226
 
242
227
  export interface AddCouponCodesResponse {
243
- /**
244
- * @description This API add coupon codes to an existing coupon set.
245
-
246
- */
247
-
248
228
  coupon_set:CouponSet;
249
229
  }
250
230
  export interface AddCouponCodesInputParam {
@@ -257,20 +237,10 @@ declare module 'chargebee' {
257
237
  code?:string[];
258
238
  }
259
239
  export interface DeleteUnusedCouponCodesResponse {
260
- /**
261
- * @description Use this API to delete all the unutilised coupon codes from a specific coupon set.
262
-
263
- */
264
-
265
240
  coupon_set:CouponSet;
266
241
  }
267
242
 
268
243
  export interface DeleteResponse {
269
- /**
270
- * @description Use this endpoint to delete a specific coupon set
271
-
272
- */
273
-
274
244
  coupon_set:CouponSet;
275
245
  }
276
246
 
@@ -444,13 +444,6 @@ This endpoint schedules e-invoices manually. This operation is not allowed when
444
444
  send_einvoice(credit_note_id:string):ChargebeeRequest<SendEinvoiceResponse>;
445
445
  }
446
446
  export interface VoidCreditNoteResponse {
447
- /**
448
- * @description Use this API to [void a credit note.](https://www.chargebee.com/docs/credit-notes.html#voiding-or-deleting-a-credit-note) A voided credit is a null entity and cannot be used again. A credit note which has already been voided or refunded cannot be voided. An error message will be displayed when you render such credit notes void.
449
-
450
- **Note:** When adjustment credit notes are voided, the associated invoice will reflect as NOT PAID, and the amount in the invoice will be recalculated to reflect the amount after considering the voided credit note.
451
-
452
- */
453
-
454
447
  credit_note:CreditNote;
455
448
  }
456
449
  export interface VoidCreditNoteInputParam {
@@ -463,18 +456,8 @@ This endpoint schedules e-invoices manually. This operation is not allowed when
463
456
  comment?:string;
464
457
  }
465
458
  export interface RefundResponse {
466
- /**
467
- * @description Refunds a ([refundable](https://www.chargebee.com/docs/credit-notes.html#types-of-credit-notes_refundable-credit-note)) credit note to the [payment source](/docs/api/payment_sources) associated with the [transaction](/docs/api/transactions). Any [linked_tax_withheld_refunds](/docs/api/credit_notes#credit_note_linked_tax_withheld_refunds) recorded against the credit note are not refunded.
468
-
469
- */
470
-
471
459
  credit_note:CreditNote;
472
460
 
473
- /**
474
- * @description Refunds a ([refundable](https://www.chargebee.com/docs/credit-notes.html#types-of-credit-notes_refundable-credit-note)) credit note to the [payment source](/docs/api/payment_sources) associated with the [transaction](/docs/api/transactions). Any [linked_tax_withheld_refunds](/docs/api/credit_notes#credit_note_linked_tax_withheld_refunds) recorded against the credit note are not refunded.
475
-
476
- */
477
-
478
461
  transaction:Transaction;
479
462
  }
480
463
  export interface RefundInputParam {
@@ -673,24 +656,8 @@ NOTE: Not to be used if *consolidated invoicing* feature is enabled.
673
656
  einvoice?:{status?:{in?:string,is?:'in_progress' | 'scheduled' | 'success' | 'registered' | 'failed' | 'skipped',is_not?:'in_progress' | 'scheduled' | 'success' | 'registered' | 'failed' | 'skipped',not_in?:string}};
674
657
  }
675
658
  export interface CreateResponse {
676
- /**
677
- * @description Creates a &#x60;credit_note&#x60; for the specified invoice.
678
- **Note:**
679
-
680
- If the &#x60;credit_note&#x60; [type](/docs/api/credit_notes#create_credit_note_type) is &#x60;refundable&#x60;, then &#x60;linked_taxes_withheld.amount&#x60; for the [invoice specified](/docs/api/credit_notes#create_credit_note_reference_invoice_id) can also be included in the [total](/docs/api/credit_notes#create_credit_note_total).
681
-
682
- */
683
-
684
659
  credit_note:CreditNote;
685
660
 
686
- /**
687
- * @description Creates a &#x60;credit_note&#x60; for the specified invoice.
688
- **Note:**
689
-
690
- If the &#x60;credit_note&#x60; [type](/docs/api/credit_notes#create_credit_note_type) is &#x60;refundable&#x60;, then &#x60;linked_taxes_withheld.amount&#x60; for the [invoice specified](/docs/api/credit_notes#create_credit_note_reference_invoice_id) can also be included in the [total](/docs/api/credit_notes#create_credit_note_total).
691
-
692
- */
693
-
694
661
  invoice:Invoice;
695
662
  }
696
663
  export interface CreateInputParam {
@@ -759,18 +726,8 @@ If the &#x60;credit_note&#x60; [type](/docs/api/credit_notes#create_credit_note_
759
726
  line_items?:{amount?:number,date_from?:number,date_to?:number,description?:string,quantity?:number,quantity_in_decimal?:string,reference_line_item_id:string,unit_amount?:number,unit_amount_in_decimal?:string}[];
760
727
  }
761
728
  export interface RecordRefundResponse {
762
- /**
763
- * @description Refunds a ([refundable](https://www.chargebee.com/docs/credit-notes.html#types-of-credit-notes_refundable-credit-note)) credit note. The refund is provided against &#x60;linked_payments&#x60; first and then against any &#x60;linked_taxes_withheld&#x60; for the [invoice](/docs/api/credit_notes#credit_note_reference_invoice_id) associated with the &#x60;credit_note&#x60;. For payments made via online transactions, the refund request is processed via the [payment source](/docs/api/payment_sources) associated with the [transaction](/docs/api/transactions).
764
-
765
- */
766
-
767
729
  credit_note:CreditNote;
768
730
 
769
- /**
770
- * @description Refunds a ([refundable](https://www.chargebee.com/docs/credit-notes.html#types-of-credit-notes_refundable-credit-note)) credit note. The refund is provided against &#x60;linked_payments&#x60; first and then against any &#x60;linked_taxes_withheld&#x60; for the [invoice](/docs/api/credit_notes#credit_note_reference_invoice_id) associated with the &#x60;credit_note&#x60;. For payments made via online transactions, the refund request is processed via the [payment source](/docs/api/payment_sources) associated with the [transaction](/docs/api/transactions).
771
-
772
- */
773
-
774
731
  transaction?:Transaction;
775
732
  }
776
733
  export interface RecordRefundInputParam {
@@ -797,11 +754,6 @@ If the &#x60;credit_note&#x60; [type](/docs/api/credit_notes#create_credit_note_
797
754
  transaction?:{amount?:number,date:number,payment_method:PaymentMethod,reference_number?:string};
798
755
  }
799
756
  export interface ImportCreditNoteResponse {
800
- /**
801
- * @description Use this api to import credit notes into your Chargebee site. Billing address, Shipping Address, Vat number will be copied from the reference invoice.
802
-
803
- */
804
-
805
757
  credit_note:CreditNote;
806
758
  }
807
759
  export interface ImportCreditNoteInputParam {
@@ -966,11 +918,6 @@ Ireland** . The first two characters of the VAT number in such a case is &#x60;X
966
918
  linked_refunds?:{amount:number,date:number,payment_method:PaymentMethod,reference_number?:string}[];
967
919
  }
968
920
  export interface DeleteResponse {
969
- /**
970
- * @description This API [deletes a credit note.](https://www.chargebee.com/docs/credit-notes.html#voiding-or-deleting-a-credit-note) A credit note once deleted, is deleted permanently. You cannot delete a credit which has already been deleted or refunded. If you try to delete a refunded or deleted credit note, an error message will be displayed.
971
-
972
- */
973
-
974
921
  credit_note:CreditNote;
975
922
  }
976
923
  export interface DeleteInputParam {
@@ -983,24 +930,10 @@ Ireland** . The first two characters of the VAT number in such a case is &#x60;X
983
930
  comment?:string;
984
931
  }
985
932
  export interface DownloadEinvoiceResponse {
986
- /**
987
- * @description Download the e-invoice for the credit note in both XML and PDF formats. The response consists of a &#x60;download&#x60; object for each format. The XML format follows the [structure as per Peppol BIS Billing v3.0](https://docs.peppol.eu/poacc/billing/3.0/syntax/ubl-creditnote/tree/).
988
- **Note**
989
-
990
- * You can only download e-invoices when their &#x60;status&#x60; is &#x60;success&#x60; or &#x60;registered&#x60;.
991
- * There are some cases in which the PDF is not available for download. In such cases, you can obtain it from the XML by decoding the value for [cbc:EmbeddedDocumentBinaryObject](https://docs.peppol.eu/poacc/billing/3.0/syntax/ubl-creditnote/cac-AdditionalDocumentReference/cac-Attachment/cbc-EmbeddedDocumentBinaryObject/), which is the Base64-encoded version of the PDF.
992
-
993
- */
994
-
995
933
  downloads:Download[];
996
934
  }
997
935
 
998
936
  export interface PdfResponse {
999
- /**
1000
- * @description Gets the credit note as PDF. The returned URL is secure and allows download. The URL will expire in 60 minutes.
1001
-
1002
- */
1003
-
1004
937
  download:Download;
1005
938
  }
1006
939
  export interface PdfInputParam {
@@ -1013,20 +946,10 @@ Ireland** . The first two characters of the VAT number in such a case is &#x60;X
1013
946
  disposition_type?:DispositionType;
1014
947
  }
1015
948
  export interface ResendEinvoiceResponse {
1016
- /**
1017
- * @description Resend failed einvoice in credit notes.
1018
-
1019
- */
1020
-
1021
949
  credit_note:CreditNote;
1022
950
  }
1023
951
 
1024
952
  export interface RemoveTaxWithheldRefundResponse {
1025
- /**
1026
- * @description Removes a [linked_tax_withheld_refunds](/docs/api/credit_notes#credit_note_linked_tax_withheld_refunds) record from the &#x60;credit_note&#x60;.
1027
-
1028
- */
1029
-
1030
953
  credit_note:CreditNote;
1031
954
  }
1032
955
  export interface RemoveTaxWithheldRefundInputParam {
@@ -1039,35 +962,10 @@ Ireland** . The first two characters of the VAT number in such a case is &#x60;X
1039
962
  tax_withheld?:{id:string};
1040
963
  }
1041
964
  export interface RetrieveResponse {
1042
- /**
1043
- * @description Retrieves the Credit Note identified by the specified Credit Note number.
1044
-
1045
- */
1046
-
1047
965
  credit_note:CreditNote;
1048
966
  }
1049
967
 
1050
968
  export interface SendEinvoiceResponse {
1051
- /**
1052
- * @description This endpoint is used to send an e-invoice for invoice.
1053
-
1054
- To support cases like TDS and invoice edits, we need to stop auto e-invoice sending and be able to send e-invoices manually.
1055
-
1056
- This endpoint schedules e-invoices manually. This operation is not allowed when any of the following condition matches:
1057
-
1058
- * If e-invoicing is not enabled at the site and customer level.
1059
-
1060
- * If there is an e-invoice generated already for the invoice.
1061
-
1062
- * If the &quot;**Use automatic e-invoicing**&quot; option is selected.
1063
-
1064
- * If there are no generated e-invoices with the &#x60;failed&#x60; or &#x60;skipped&#x60; status.
1065
-
1066
- * If the invoice status is &#x60;voided&#x60; or &#x60;pending&#x60;.
1067
-
1068
-
1069
- */
1070
-
1071
969
  credit_note:CreditNote;
1072
970
  }
1073
971