chargebee 2.41.0 → 3.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/CHANGELOG.md +11 -15
  2. package/LICENSE +1 -1
  3. package/README.md +90 -170
  4. package/cjs/RequestWrapper.js +84 -0
  5. package/cjs/asyncApiSupport.js +39 -0
  6. package/cjs/chargebee.cjs.js +13 -0
  7. package/cjs/chargebee.cjs.worker.js +9 -0
  8. package/cjs/chargebeeError.js +17 -0
  9. package/cjs/coreCommon.js +72 -0
  10. package/cjs/createChargebee.js +92 -0
  11. package/cjs/environment.js +18 -0
  12. package/cjs/filter.js +1 -0
  13. package/cjs/net/ClientInterface.js +40 -0
  14. package/cjs/net/FetchClient.js +86 -0
  15. package/cjs/net/NodeClient.js +61 -0
  16. package/cjs/package.json +1 -0
  17. package/cjs/resources/api_endpoints.js +1086 -0
  18. package/cjs/util.js +218 -0
  19. package/esm/RequestWrapper.js +80 -0
  20. package/esm/asyncApiSupport.js +35 -0
  21. package/esm/chargebee.esm.js +9 -0
  22. package/esm/chargebee.esm.worker.js +5 -0
  23. package/esm/chargebeeError.js +13 -0
  24. package/esm/coreCommon.js +67 -0
  25. package/esm/createChargebee.js +88 -0
  26. package/esm/environment.js +15 -0
  27. package/esm/filter.js +1 -0
  28. package/esm/net/ClientInterface.js +35 -0
  29. package/esm/net/FetchClient.js +81 -0
  30. package/esm/net/NodeClient.js +56 -0
  31. package/esm/package.json +1 -0
  32. package/esm/resources/api_endpoints.js +1083 -0
  33. package/esm/util.js +202 -0
  34. package/package.json +69 -38
  35. package/types/core.d.ts +558 -89
  36. package/types/index.d.ts +90 -55
  37. package/types/resources/Address.d.ts +57 -272
  38. package/types/resources/AdvanceInvoiceSchedule.d.ts +21 -94
  39. package/types/resources/AttachedItem.d.ts +91 -329
  40. package/types/resources/Attribute.d.ts +5 -5
  41. package/types/resources/BusinessEntity.d.ts +49 -69
  42. package/types/resources/BusinessEntityTransfer.d.ts +11 -17
  43. package/types/resources/Card.d.ts +146 -424
  44. package/types/resources/Comment.d.ts +72 -189
  45. package/types/resources/Contact.d.ts +12 -64
  46. package/types/resources/ContractTerm.d.ts +15 -96
  47. package/types/resources/Coupon.d.ts +282 -758
  48. package/types/resources/CouponCode.d.ts +56 -52
  49. package/types/resources/CouponSet.d.ts +92 -234
  50. package/types/resources/CreditNote.d.ts +588 -1758
  51. package/types/resources/CreditNoteEstimate.d.ts +131 -157
  52. package/types/resources/Currency.d.ts +75 -62
  53. package/types/resources/Customer.d.ts +892 -835
  54. package/types/resources/CustomerEntitlement.d.ts +24 -35
  55. package/types/resources/DifferentialPrice.d.ts +116 -314
  56. package/types/resources/Discount.d.ts +20 -125
  57. package/types/resources/Download.d.ts +6 -22
  58. package/types/resources/Entitlement.d.ts +51 -160
  59. package/types/resources/EntitlementOverride.d.ts +58 -139
  60. package/types/resources/Estimate.d.ts +1178 -527
  61. package/types/resources/Event.d.ts +67 -178
  62. package/types/resources/Export.d.ts +563 -723
  63. package/types/resources/Feature.d.ts +117 -433
  64. package/types/resources/GatewayErrorDetail.d.ts +16 -72
  65. package/types/resources/Gift.d.ts +265 -432
  66. package/types/resources/Hierarchy.d.ts +8 -36
  67. package/types/resources/HostedPage.d.ts +1017 -1153
  68. package/types/resources/ImpactedItem.d.ts +13 -50
  69. package/types/resources/ImpactedItemPrice.d.ts +13 -15
  70. package/types/resources/ImpactedSubscription.d.ts +13 -45
  71. package/types/resources/InAppSubscription.d.ts +93 -389
  72. package/types/resources/Installment.d.ts +35 -110
  73. package/types/resources/InstallmentConfig.d.ts +54 -155
  74. package/types/resources/InstallmentDetail.d.ts +19 -27
  75. package/types/resources/Invoice.d.ts +1574 -3157
  76. package/types/resources/InvoiceEstimate.d.ts +131 -161
  77. package/types/resources/Item.d.ts +133 -611
  78. package/types/resources/ItemEntitlement.d.ts +78 -215
  79. package/types/resources/ItemFamily.d.ts +69 -178
  80. package/types/resources/ItemPrice.d.ts +291 -1203
  81. package/types/resources/Metadata.d.ts +3 -5
  82. package/types/resources/Order.d.ts +538 -1471
  83. package/types/resources/PaymentIntent.d.ts +163 -347
  84. package/types/resources/PaymentReferenceNumber.d.ts +7 -29
  85. package/types/resources/PaymentSource.d.ts +476 -1272
  86. package/types/resources/PaymentVoucher.d.ts +87 -306
  87. package/types/resources/PortalSession.d.ts +71 -207
  88. package/types/resources/PriceVariant.d.ts +91 -279
  89. package/types/resources/PricingPageSession.d.ts +92 -41
  90. package/types/resources/PromotionalCredit.d.ts +90 -346
  91. package/types/resources/Purchase.d.ts +185 -315
  92. package/types/resources/Quote.d.ts +1406 -887
  93. package/types/resources/QuoteLineGroup.d.ts +125 -452
  94. package/types/resources/QuotedCharge.d.ts +45 -274
  95. package/types/resources/QuotedSubscription.d.ts +100 -488
  96. package/types/resources/Ramp.d.ts +230 -747
  97. package/types/resources/ResourceMigration.d.ts +25 -80
  98. package/types/resources/SiteMigrationDetail.d.ts +34 -112
  99. package/types/resources/Subscription.d.ts +2390 -4336
  100. package/types/resources/SubscriptionEntitlement.d.ts +59 -160
  101. package/types/resources/SubscriptionEstimate.d.ts +51 -75
  102. package/types/resources/TaxWithheld.d.ts +15 -40
  103. package/types/resources/ThirdPartyPaymentMethod.d.ts +7 -29
  104. package/types/resources/TimeMachine.d.ts +43 -97
  105. package/types/resources/Token.d.ts +15 -85
  106. package/types/resources/Transaction.d.ts +276 -911
  107. package/types/resources/UnbilledCharge.d.ts +189 -164
  108. package/types/resources/Usage.d.ts +89 -279
  109. package/types/resources/VirtualBankAccount.d.ts +103 -255
  110. package/types/resources/filter.d.ts +52 -0
  111. package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -81
  112. package/.github/ISSUE_TEMPLATE/config.yml +0 -6
  113. package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -34
  114. package/.github/PULL_REQUEST_TEMPLATE.md +0 -8
  115. package/lib/chargebee.js +0 -512
  116. package/lib/resources/api_endpoints.js +0 -2935
  117. package/types/resources/NonSubscription.d.ts +0 -30
  118. package/types/resources/Session.d.ts +0 -41
@@ -1,1798 +1,628 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
2
  ///<reference path='./../index.d.ts'/>
3
-
3
+ ///<reference path='./filter.d.ts'/>
4
4
  declare module 'chargebee' {
5
5
  export interface CreditNote {
6
-
7
- /**
8
- * @description Credit-note id.
9
-
10
- */
11
-
12
- id:string;
13
-
14
- /**
15
- * @description The identifier of the customer this Credit Note belongs to.
16
-
17
- */
18
-
19
- customer_id:string;
20
-
21
- /**
22
- * @description The identifier of the subscription this Credit Note belongs to.
23
- **Note:** If *consolidated invoicing* is enabled, to know the subscriptions attached with this Credit Note you have to refer [line_item&#x27;s](/docs/api/credit_notes#credit_note_line_items) *subscription_id* . This attribute should **not** be used (which will be *null* if this credit note has lines from multiple subscriptions).
24
-
25
- */
26
-
27
- subscription_id?:string;
28
-
29
- /**
30
- * @description The identifier of the invoice against which this Credit Note is issued
31
-
32
- */
33
-
34
- reference_invoice_id:string;
35
-
36
- /**
37
- * @description The credit note type. \* refundable - Refundable Credit Note \* adjustment - Adjustment Credit Note
38
-
39
- */
40
-
41
- type:'adjustment' | 'refundable';
42
-
43
- /**
44
- * @description The reason for issuing this Credit Note. The following reason codes are supported now\[Deprecated; use the [create_reason_code](/docs/api/credit_notes#credit_note_create_reason_code) parameter instead\] \* subscription_change - This reason will be set automatically for Credit Notes created during Change Subscription operation when [proration](https://www.chargebee.com/docs/proration.html) is enabled \* order_change - Order Change \* other - Can be set when none of the above reason codes are applicable \* fraudulent - FRAUDULENT \* chargeback - Can be set when you are recording your customer Chargebacks \* subscription_pause - This reason will be automatically set to credit notes created during pause/resume subscription operation. \* waiver - Waiver \* subscription_cancellation - This reason will be set automatically for Credit Notes created during cancel subscription operation \* product_unsatisfactory - Product Unsatisfactory \* order_cancellation - Order Cancellation \* write_off - This reason will be set automatically for the Credit Notes created during invoice [Write Off](https://www.chargebee.com/docs/invoice-operations.html#write-off) operation. \* service_unsatisfactory - Service Unsatisfactory
45
-
46
- */
47
-
48
- reason_code?:'other' | 'product_unsatisfactory' | 'subscription_pause' | 'order_cancellation' | 'service_unsatisfactory' | 'subscription_cancellation' | 'chargeback' | 'order_change' | 'write_off' | 'waiver' | 'subscription_change' | 'fraudulent';
49
-
50
- /**
51
- * @description The credit note status. \* voided - When the Credit Note has been cancelled. \* refund_due - When the credits are yet to be used, or have been partially used. \* refunded - When the entire credits (Credit Note amount) have been used (i.e either allocated to invoices or refunded). \* adjusted - When the Credit Note has been adjusted against an invoice.
52
-
53
- */
54
-
55
- status:'refund_due' | 'adjusted' | 'refunded' | 'voided';
56
-
57
- /**
58
- * @description VAT number of the customer for whom this Credit Note is raised.
59
-
60
- */
61
-
62
- vat_number?:string;
63
-
64
- /**
65
- * @description The date the Credit Note is issued.
66
-
67
- */
68
-
69
- date?:number;
70
-
71
- /**
72
- * @description The price type of the Credit Note. \* tax_inclusive - All amounts in the document are inclusive of tax. \* tax_exclusive - All amounts in the document are exclusive of tax.
73
-
74
- */
75
-
76
- price_type:PriceType;
77
-
78
- /**
79
- * @description The currency code (ISO 4217 format) for the credit note
80
-
81
- */
82
-
83
- currency_code:string;
84
-
85
- /**
86
- * @description Credit Note amount in cents.
87
-
88
- */
89
-
90
- total?:number;
91
-
92
- /**
93
- * @description The amount allocated to the invoices.
94
-
95
- */
96
-
97
- amount_allocated?:number;
98
-
99
- /**
100
- * @description The refunds issued from this Credit Note.
101
-
102
- */
103
-
104
- amount_refunded?:number;
105
-
106
- /**
107
- * @description The yet to be used credits of this Credit Note.
108
-
109
- */
110
-
111
- amount_available?:number;
112
-
113
- /**
114
- * @description The time this Credit Note gets fully used. Please note that this field is not present when partial refunds are issued.
115
-
116
- */
117
-
118
- refunded_at?:number;
119
-
120
- /**
121
- * @description Timestamp indicating the date and time this Credit Note gets voided.
122
-
123
- */
124
-
125
- voided_at?:number;
126
-
127
- /**
128
- * @description The date/time when the credit note was raised. This date/time can be backdated, which means that the date/time can be earlier than the date/time the credit note was created.
129
-
130
- */
131
-
132
- generated_at?:number;
133
-
134
- /**
135
- * @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.
136
-
137
- */
138
-
139
- resource_version?:number;
140
-
141
- /**
142
- * @description Timestamp indicating when this Credit Note was last updated. This attribute will be present only if the resource has been updated after 2016-09-28.
143
-
144
- */
145
-
146
- updated_at?:number;
147
-
148
- /**
149
- * @description The subscription channel this object originated from and is maintained in. \* play_store - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed.
150
-
151
- In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com) for more information.
152
- \* web - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI. \* app_store - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed.
153
-
154
- */
155
-
156
- channel?:Channel;
157
-
158
- /**
159
- * @description The Credit Note sub-total
160
-
161
- */
162
-
163
- sub_total:number;
164
-
165
- /**
166
- * @description Invoice subtotal in the currency of the place of supply.
167
-
168
- */
169
-
170
- sub_total_in_local_currency?:number;
171
-
172
- /**
173
- * @description Total invoice amount in the currency of the place of supply.
174
-
175
- */
176
-
177
- total_in_local_currency?:number;
178
-
179
- /**
180
- * @description The currency code (ISO 4217 format) of the place of supply in which VAT needs to be converted and displayed.
181
-
182
- */
183
-
184
- local_currency_code?:string;
185
-
186
- /**
187
- * @description Indicates the rounded-off amount. For example, if your invoice amount is $99.99, and the amount is rounded off to $100.00, in this case, $100.00 is your invoice amount, $0.01 is the &#x60;round_off_amount&#x60;. If there is no &#x60;round-off amount&#x60;, it will display &#x60;0&#x60;.
188
-
189
- */
190
-
191
- round_off_amount?:number;
192
-
193
- /**
194
- * @description Indicates the fractional correction amount.
195
-
196
- */
197
-
198
- fractional_correction?:number;
199
-
200
- /**
201
- * @description Indicates that this resource has been deleted.
202
-
203
- */
204
-
205
- deleted:boolean;
206
-
207
- /**
208
- * @description Specifies the customer&#x27;s category for the Goods and Services Tax (GST). This field is returned only if you&#x27;ve configured GST for the India region.
209
-
210
- */
211
-
212
- tax_category?:string;
213
-
214
- /**
215
- * @description This parameter represents the exchange rate as a relative price of the base currency that appears as local currency in invoices and credit notes. The local currency exchange rate specifically refers to the exchange rate of a country&#x27;s currency when converting it to another currency. For example, if you want to convert US dollars to euros, the local currency exchange rate would be the rate at which you can convert US dollars to euros.
216
-
217
- */
218
-
219
- local_currency_exchange_rate?:number;
220
-
221
- /**
222
- * @description Reason code for creating the credit note. Must be one from a list of reason codes set in the Chargebee app in **Settings \&gt; Configure Chargebee \&gt; Reason Codes \&gt; Credit Notes \&gt; Create Credit Note**. Must be passed if set as mandatory in the app. The codes are case-sensitive
223
-
224
- */
225
-
226
- create_reason_code?:string;
227
-
228
- /**
229
- * @description An overridden value for the first two characters of the [full VAT
230
- number](https://en.wikipedia.org/wiki/VAT_identification_number). Only applicable specifically for customers with [billing_address](customers#customer_billing_address) &#x60;country&#x60; as &#x60;XI&#x60; (which is **United Kingdom - Northern Ireland** ).
231
-
232
- When you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or have [manually
233
- enabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, you have the option of setting [billing_address](customers#customer_billing_address) &#x60;country&#x60; as &#x60;XI&#x60;. That&#x27;s the code for **United Kingdom - Northern
234
- Ireland** . The first two characters of the VAT number in such a case is &#x60;XI&#x60; by default. However, if the VAT number was registered in UK, the value should be &#x60;GB&#x60;. Set &#x60;vat_number_prefix&#x60; to &#x60;GB&#x60; for such cases.
235
-
236
- */
237
-
238
- vat_number_prefix?:string;
239
-
240
- /**
241
- * @description The unique ID of the [business entity](/docs/api/advanced-features?prod_cat_ver&#x3D;2#mbe) of this credit_note. This is always the same as the business entity of the invoice referred to by [reference_invoice_id](/docs/api/credit_notes?prod_cat_ver&#x3D;2#credit_note_reference_invoice_id).
242
-
243
- */
244
-
245
- business_entity_id?:string;
246
-
247
- /**
248
- * @description An e-invoice or electronic invoice is a structured representation of an invoice that is interoperable between computerized invoicing systems. Depending on the country, e-invoicing can be necessary to meet financial/taxation authority regulations.
249
-
250
- */
251
-
252
- einvoice?:CreditNote.Einvoice;
253
-
254
- /**
255
- * @description The line items of this Credit Note
256
-
257
- */
258
-
259
- line_items?:CreditNote.LineItem[];
260
-
261
- /**
262
- * @description The list of discounts applied to this Credit Note
263
-
264
- */
265
-
266
- discounts?:CreditNote.Discount[];
267
-
268
- /**
269
- * @description The list of discount(s) applied for each line item of this invoice.
270
-
271
- */
272
-
273
- line_item_discounts?:CreditNote.LineItemDiscount[];
274
-
275
- /**
276
- * @description The list of tiers applicable for this line item
277
-
278
- */
279
-
280
- line_item_tiers?:CreditNote.LineItemTier[];
281
-
282
- /**
283
- * @description The tax-lines of this Credit Note
284
-
285
- */
286
-
287
- taxes?:CreditNote.Tax[];
288
-
289
- /**
290
- * @description The list of taxes applied on line items
291
-
292
- */
293
-
294
- line_item_taxes?:CreditNote.LineItemTax[];
295
-
296
- /**
297
- * @description Payment Refunds issued from this Credit Note
298
-
299
- */
300
-
301
- linked_refunds?:CreditNote.CreditNoteTransaction[];
302
-
303
- /**
304
- * @description The details of refunds recorded against the [invoice.linked_taxes_withheld](/docs/api/invoices#invoice_linked_taxes_withheld) component of the &#x60;invoice&#x60; [associated](/docs/api/credit_notes#credit_note_reference_invoice_id) with this &#x60;credit_note&#x60;.
305
-
306
- */
307
-
308
- linked_tax_withheld_refunds?:CreditNote.LinkedTaxWithheldRefund[];
309
-
310
- /**
311
- * @description Invoice allocations made from this Credit Note.
312
-
313
- */
314
-
315
- allocations?:CreditNote.AppliedCredit[];
316
-
317
- /**
318
- * @description Shipping address for the quote.
319
-
320
- */
321
-
322
- shipping_address?:CreditNote.ShippingAddress;
323
-
324
- /**
325
- * @description Billing address for the quote.
326
-
327
- */
328
-
329
- billing_address?:CreditNote.BillingAddress;
330
-
331
- site_details_at_creation?:CreditNote.SiteDetailsAtCreation;
332
-
333
- tax_origin?:CreditNote.TaxOrigin;
6
+ id: string;
7
+ customer_id: string;
8
+ subscription_id?: string;
9
+ reference_invoice_id?: string;
10
+ type: 'adjustment' | 'refundable';
11
+ reason_code?:
12
+ | 'write_off'
13
+ | 'subscription_change'
14
+ | 'subscription_cancellation'
15
+ | 'subscription_pause'
16
+ | 'chargeback'
17
+ | 'product_unsatisfactory'
18
+ | 'service_unsatisfactory'
19
+ | 'order_change'
20
+ | 'order_cancellation'
21
+ | 'waiver'
22
+ | 'other'
23
+ | 'fraudulent';
24
+ status: 'adjusted' | 'refunded' | 'refund_due' | 'voided';
25
+ vat_number?: string;
26
+ date?: number;
27
+ price_type: PriceType;
28
+ currency_code: string;
29
+ total?: number;
30
+ amount_allocated?: number;
31
+ amount_refunded?: number;
32
+ amount_available?: number;
33
+ refunded_at?: number;
34
+ voided_at?: number;
35
+ generated_at?: number;
36
+ resource_version?: number;
37
+ updated_at?: number;
38
+ channel?: Channel;
39
+ einvoice?: CreditNote.Einvoice;
40
+ sub_total: number;
41
+ sub_total_in_local_currency?: number;
42
+ total_in_local_currency?: number;
43
+ local_currency_code?: string;
44
+ round_off_amount?: number;
45
+ fractional_correction?: number;
46
+ line_items?: CreditNote.LineItem[];
47
+ discounts?: CreditNote.Discount[];
48
+ line_item_discounts?: CreditNote.LineItemDiscount[];
49
+ line_item_tiers?: CreditNote.LineItemTier[];
50
+ taxes?: CreditNote.Tax[];
51
+ line_item_taxes?: CreditNote.LineItemTax[];
52
+ linked_refunds?: CreditNote.LinkedRefund[];
53
+ allocations?: CreditNote.Allocation[];
54
+ deleted: boolean;
55
+ tax_category?: string;
56
+ local_currency_exchange_rate?: number;
57
+ create_reason_code?: string;
58
+ vat_number_prefix?: string;
59
+ business_entity_id?: string;
60
+ shipping_address?: CreditNote.ShippingAddress;
61
+ billing_address?: CreditNote.BillingAddress;
62
+ site_details_at_creation?: CreditNote.SiteDetailsAtCreation;
63
+ tax_origin?: CreditNote.TaxOrigin;
334
64
  }
335
- export namespace CreditNote {
336
- export class CreditNoteResource {
337
- /**
338
- * @description Creates a &#x60;credit_note&#x60; for the specified invoice.
339
- **Note:**
340
-
341
- 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).
342
-
343
- */
344
-
345
- create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
346
-
347
- /**
348
- * @description Retrieves the Credit Note identified by the specified Credit Note number.
349
65
 
350
- */
351
-
352
- retrieve(credit_note_id:string):ChargebeeRequest<RetrieveResponse>;
353
-
354
- /**
355
- * @description Gets the credit note as PDF. The returned URL is secure and allows download. The URL will expire in 60 minutes.
356
-
357
- */
358
-
359
- pdf(credit_note_id:string, input?:PdfInputParam):ChargebeeRequest<PdfResponse>;
360
-
361
- /**
362
- * @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/).
363
- **Note**
364
-
365
- * You can only download e-invoices when their &#x60;status&#x60; is &#x60;success&#x60; or &#x60;registered&#x60;.
366
- * 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.
367
-
368
- */
369
-
370
- download_einvoice(credit_note_id:string):ChargebeeRequest<DownloadEinvoiceResponse>;
371
-
372
- /**
373
- * @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.
374
-
375
- */
376
-
377
- refund(credit_note_id:string, input?:RefundInputParam):ChargebeeRequest<RefundResponse>;
378
-
379
- /**
380
- * @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).
381
-
382
- */
383
-
384
- record_refund(credit_note_id:string, input:RecordRefundInputParam):ChargebeeRequest<RecordRefundResponse>;
385
-
386
- /**
387
- * @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.
388
-
389
- **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.
390
-
391
- */
392
-
393
- void_credit_note(credit_note_id:string, input?:VoidCreditNoteInputParam):ChargebeeRequest<VoidCreditNoteResponse>;
394
-
395
- /**
396
- * @description Lists all the Credit Notes.
397
-
398
- */
399
-
400
- list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
401
-
402
- /**
403
- * @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.
66
+ export namespace CreditNote {
67
+ export class CreditNoteResource {
68
+ create(
69
+ input: CreateInputParam,
70
+ headers?: ChargebeeRequestHeader,
71
+ ): Promise<ChargebeeResponse<CreateResponse>>;
404
72
 
405
- */
406
-
407
- delete(credit_note_id:string, input?:DeleteInputParam):ChargebeeRequest<DeleteResponse>;
408
-
409
- /**
410
- * @description Removes a [linked_tax_withheld_refunds](/docs/api/credit_notes#credit_note_linked_tax_withheld_refunds) record from the &#x60;credit_note&#x60;.
73
+ retrieve(
74
+ credit_note_id: string,
75
+ headers?: ChargebeeRequestHeader,
76
+ ): Promise<ChargebeeResponse<RetrieveResponse>>;
411
77
 
412
- */
413
-
414
- remove_tax_withheld_refund(credit_note_id:string, input?:RemoveTaxWithheldRefundInputParam):ChargebeeRequest<RemoveTaxWithheldRefundResponse>;
415
-
416
- /**
417
- * @description Resend failed einvoice in credit notes.
78
+ pdf(
79
+ credit_note_id: string,
80
+ input?: PdfInputParam,
81
+ headers?: ChargebeeRequestHeader,
82
+ ): Promise<ChargebeeResponse<PdfResponse>>;
418
83
 
419
- */
420
-
421
- resend_einvoice(credit_note_id:string):ChargebeeRequest<ResendEinvoiceResponse>;
422
-
423
- /**
424
- * @description This endpoint is used to send an e-invoice for invoice.
84
+ downloadEinvoice(
85
+ credit_note_id: string,
86
+ headers?: ChargebeeRequestHeader,
87
+ ): Promise<ChargebeeResponse<DownloadEinvoiceResponse>>;
425
88
 
426
- To support cases like TDS and invoice edits, we need to stop auto e-invoice sending and be able to send e-invoices manually.
89
+ refund(
90
+ credit_note_id: string,
91
+ input?: RefundInputParam,
92
+ headers?: ChargebeeRequestHeader,
93
+ ): Promise<ChargebeeResponse<RefundResponse>>;
427
94
 
428
- This endpoint schedules e-invoices manually. This operation is not allowed when any of the following condition matches:
95
+ recordRefund(
96
+ credit_note_id: string,
97
+ input: RecordRefundInputParam,
98
+ headers?: ChargebeeRequestHeader,
99
+ ): Promise<ChargebeeResponse<RecordRefundResponse>>;
429
100
 
430
- * If e-invoicing is not enabled at the site and customer level.
101
+ voidCreditNote(
102
+ credit_note_id: string,
103
+ input?: VoidCreditNoteInputParam,
104
+ headers?: ChargebeeRequestHeader,
105
+ ): Promise<ChargebeeResponse<VoidCreditNoteResponse>>;
431
106
 
432
- * If there is an e-invoice generated already for the invoice.
107
+ list(
108
+ input?: ListInputParam,
109
+ headers?: ChargebeeRequestHeader,
110
+ ): Promise<ChargebeeResponse<ListResponse>>;
433
111
 
434
- * If the &quot;**Use automatic e-invoicing**&quot; option is selected.
112
+ creditNotesForCustomer(
113
+ customer_id: string,
114
+ input?: CreditNotesForCustomerInputParam,
115
+ headers?: ChargebeeRequestHeader,
116
+ ): Promise<ChargebeeResponse<CreditNotesForCustomerResponse>>;
435
117
 
436
- * If there are no generated e-invoices with the &#x60;failed&#x60; or &#x60;skipped&#x60; status.
118
+ delete(
119
+ credit_note_id: string,
120
+ input?: DeleteInputParam,
121
+ headers?: ChargebeeRequestHeader,
122
+ ): Promise<ChargebeeResponse<DeleteResponse>>;
437
123
 
438
- * If the invoice status is &#x60;voided&#x60; or &#x60;pending&#x60;.
124
+ removeTaxWithheldRefund(
125
+ credit_note_id: string,
126
+ input: RemoveTaxWithheldRefundInputParam,
127
+ headers?: ChargebeeRequestHeader,
128
+ ): Promise<ChargebeeResponse<RemoveTaxWithheldRefundResponse>>;
439
129
 
130
+ resendEinvoice(
131
+ credit_note_id: string,
132
+ headers?: ChargebeeRequestHeader,
133
+ ): Promise<ChargebeeResponse<ResendEinvoiceResponse>>;
440
134
 
441
- */
442
-
443
- send_einvoice(credit_note_id:string):ChargebeeRequest<SendEinvoiceResponse>;
444
-
445
- /**
446
- * @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.
135
+ sendEinvoice(
136
+ credit_note_id: string,
137
+ headers?: ChargebeeRequestHeader,
138
+ ): Promise<ChargebeeResponse<SendEinvoiceResponse>>;
447
139
 
448
- */
449
-
450
- import_credit_note(input:ImportCreditNoteInputParam):ChargebeeRequest<ImportCreditNoteResponse>;
140
+ importCreditNote(
141
+ input: ImportCreditNoteInputParam,
142
+ headers?: ChargebeeRequestHeader,
143
+ ): Promise<ChargebeeResponse<ImportCreditNoteResponse>>;
451
144
  }
452
- export interface CreateResponse {
453
- credit_note:CreditNote;
454
-
455
- invoice:Invoice;
456
- }
457
- export interface CreateInputParam {
458
-
459
- /**
460
- * @description The identifier of the invoice against which this Credit Note is issued.
461
-
462
- */
463
-
464
- reference_invoice_id:string;
465
-
466
- /**
467
- * @description Credit Note amount in cents. You can either pass the total parameter or the line_items parameter. Passing both will result in an error.
468
-
469
- */
470
-
471
- total?:number;
472
-
473
- /**
474
- * @description The credit note type. \* refundable - Refundable Credit Note \* adjustment - Adjustment Credit Note
475
-
476
- */
477
-
478
- type:'adjustment' | 'refundable';
479
-
480
- /**
481
- * @description The reason for issuing this Credit Note. The following reason codes are supported now\[Deprecated; use the [create_reason_code](/docs/api/credit_notes#credit_note_create_reason_code) parameter instead\]. \* chargeback - Can be set when you are recording your customer Chargebacks \* subscription_change - This reason will be set automatically for Credit Notes created during Change Subscription operation when [proration](https://www.chargebee.com/docs/proration.html) is enabled \* waiver - Waiver \* order_cancellation - Order Cancellation \* order_change - Order Change \* product_unsatisfactory - Product Unsatisfactory \* subscription_pause - This reason will be automatically set to credit notes created during pause/resume subscription operation. \* service_unsatisfactory - Service Unsatisfactory \* other - Can be set when none of the above reason codes are applicable \* subscription_cancellation - This reason will be set automatically for Credit Notes created during cancel subscription operation \* write_off - This reason will be set automatically for the Credit Notes created during invoice [Write Off](https://www.chargebee.com/docs/invoice-operations.html#write-off) operation. \* fraudulent - FRAUDULENT
482
-
483
- */
484
-
485
- reason_code?:'order_cancellation' | 'service_unsatisfactory' | 'other' | 'product_unsatisfactory' | 'order_change' | 'waiver';
486
-
487
- /**
488
- * @description Reason code for creating the credit note. Must be one from a list of reason codes set in the Chargebee app in **Settings \&gt; Configure Chargebee \&gt; Reason Codes \&gt; Credit Notes \&gt; Create Credit Note**. Must be passed if set as mandatory in the app. The codes are case-sensitive.
489
-
490
- */
491
-
492
- create_reason_code?:string;
493
-
494
- /**
495
- * @description The date the Credit Note is issued.
496
-
497
- */
498
-
499
- date?:number;
500
-
501
- /**
502
- * @description A note to be added for this operation, to the credit note. This note is displayed on customer-facing documents such as the [Credit Note PDF](./credit_notes#retrieve_credit_note_as_pdf).
503
145
 
504
- */
505
-
506
- customer_notes?:string;
507
-
508
- /**
509
- * @description An internal [comment](./comments) to be added for this operation, to the credit note. This comment is displayed on the Chargebee UI. It is not displayed on any customer-facing [Hosted Page](./hosted_pages) or any document such as the [Credit Note PDF](./credit_notes#retrieve_credit_note_as_pdf).
146
+ export interface CreateResponse {
147
+ credit_note: CreditNote;
148
+ invoice?: Invoice;
149
+ }
150
+
151
+ export interface RetrieveResponse {
152
+ credit_note: CreditNote;
153
+ }
154
+
155
+ export interface PdfResponse {
156
+ download: Download;
157
+ }
158
+
159
+ export interface DownloadEinvoiceResponse {
160
+ downloads: Download[];
161
+ }
162
+
163
+ export interface RefundResponse {
164
+ credit_note: CreditNote;
165
+ transaction: Transaction;
166
+ }
167
+
168
+ export interface RecordRefundResponse {
169
+ credit_note: CreditNote;
170
+ transaction?: Transaction;
171
+ }
172
+
173
+ export interface VoidCreditNoteResponse {
174
+ credit_note: CreditNote;
175
+ }
176
+
177
+ export interface ListResponse {
178
+ list: { credit_note: CreditNote }[];
179
+ next_offset?: string;
180
+ }
181
+
182
+ export interface CreditNotesForCustomerResponse {
183
+ list: { credit_note: CreditNote }[];
184
+ next_offset?: string;
185
+ }
186
+
187
+ export interface DeleteResponse {
188
+ credit_note: CreditNote;
189
+ }
190
+
191
+ export interface RemoveTaxWithheldRefundResponse {
192
+ credit_note: CreditNote;
193
+ }
194
+
195
+ export interface ResendEinvoiceResponse {
196
+ credit_note: CreditNote;
197
+ }
198
+
199
+ export interface SendEinvoiceResponse {
200
+ credit_note: CreditNote;
201
+ }
202
+
203
+ export interface ImportCreditNoteResponse {
204
+ credit_note: CreditNote;
205
+ }
206
+
207
+ export interface Einvoice {
208
+ id: string;
209
+ reference_number?: string;
210
+ status:
211
+ | 'scheduled'
212
+ | 'skipped'
213
+ | 'in_progress'
214
+ | 'success'
215
+ | 'failed'
216
+ | 'registered';
217
+ message?: string;
218
+ }
219
+ export interface LineItem {
220
+ id?: string;
221
+ subscription_id?: string;
222
+ date_from: number;
223
+ date_to: number;
224
+ unit_amount: number;
225
+ quantity?: number;
226
+ amount?: number;
227
+ pricing_model?:
228
+ | 'flat_fee'
229
+ | 'per_unit'
230
+ | 'tiered'
231
+ | 'volume'
232
+ | 'stairstep';
233
+ is_taxed: boolean;
234
+ tax_amount?: number;
235
+ tax_rate?: number;
236
+ unit_amount_in_decimal?: string;
237
+ quantity_in_decimal?: string;
238
+ amount_in_decimal?: string;
239
+ discount_amount?: number;
240
+ item_level_discount_amount?: number;
241
+ usage_percentage?: string;
242
+ reference_line_item_id?: string;
243
+ description: string;
244
+ entity_description?: string;
245
+ entity_type:
246
+ | 'adhoc'
247
+ | 'plan_item_price'
248
+ | 'addon_item_price'
249
+ | 'charge_item_price'
250
+ | 'plan_setup'
251
+ | 'plan'
252
+ | 'addon';
253
+ tax_exempt_reason?:
254
+ | 'tax_not_configured'
255
+ | 'region_non_taxable'
256
+ | 'export'
257
+ | 'customer_exempt'
258
+ | 'product_exempt'
259
+ | 'zero_rated'
260
+ | 'reverse_charge'
261
+ | 'high_value_physical_goods'
262
+ | 'zero_value_item'
263
+ | 'tax_not_configured_external_provider';
264
+ entity_id?: string;
265
+ customer_id?: string;
266
+ }
267
+ export interface Discount {
268
+ amount: number;
269
+ description?: string;
270
+ entity_type:
271
+ | 'item_level_coupon'
272
+ | 'document_level_coupon'
273
+ | 'promotional_credits'
274
+ | 'prorated_credits'
275
+ | 'item_level_discount'
276
+ | 'document_level_discount';
277
+ entity_id?: string;
278
+ coupon_set_code?: string;
279
+ }
280
+ export interface LineItemDiscount {
281
+ line_item_id: string;
282
+ discount_type:
283
+ | 'item_level_coupon'
284
+ | 'document_level_coupon'
285
+ | 'promotional_credits'
286
+ | 'prorated_credits'
287
+ | 'item_level_discount'
288
+ | 'document_level_discount';
289
+ coupon_id?: string;
290
+ entity_id?: string;
291
+ discount_amount: number;
292
+ }
293
+ export interface LineItemTier {
294
+ line_item_id?: string;
295
+ starting_unit: number;
296
+ ending_unit?: number;
297
+ quantity_used: number;
298
+ unit_amount: number;
299
+ starting_unit_in_decimal?: string;
300
+ ending_unit_in_decimal?: string;
301
+ quantity_used_in_decimal?: string;
302
+ unit_amount_in_decimal?: string;
303
+ }
304
+ export interface Tax {
305
+ name: string;
306
+ amount: number;
307
+ description?: string;
308
+ }
309
+ export interface LineItemTax {
310
+ line_item_id?: string;
311
+ tax_name: string;
312
+ tax_rate: number;
313
+ date_to?: number;
314
+ date_from?: number;
315
+ prorated_taxable_amount?: number;
316
+ is_partial_tax_applied?: boolean;
317
+ is_non_compliance_tax?: boolean;
318
+ taxable_amount: number;
319
+ tax_amount: number;
320
+ tax_juris_type?:
321
+ | 'country'
322
+ | 'federal'
323
+ | 'state'
324
+ | 'county'
325
+ | 'city'
326
+ | 'special'
327
+ | 'unincorporated'
328
+ | 'other';
329
+ tax_juris_name?: string;
330
+ tax_juris_code?: string;
331
+ tax_amount_in_local_currency?: number;
332
+ local_currency_code?: string;
333
+ }
334
+ export interface LinkedRefund {
335
+ txn_id: string;
336
+ applied_amount: number;
337
+ applied_at: number;
338
+ txn_status?:
339
+ | 'in_progress'
340
+ | 'success'
341
+ | 'voided'
342
+ | 'failure'
343
+ | 'timeout'
344
+ | 'needs_attention';
345
+ txn_date?: number;
346
+ txn_amount?: number;
347
+ refund_reason_code?: string;
348
+ }
349
+ export interface Allocation {
350
+ invoice_id: string;
351
+ allocated_amount: number;
352
+ allocated_at: number;
353
+ invoice_date?: number;
354
+ invoice_status:
355
+ | 'paid'
356
+ | 'posted'
357
+ | 'payment_due'
358
+ | 'not_paid'
359
+ | 'voided'
360
+ | 'pending';
361
+ }
362
+ export interface ShippingAddress {
363
+ first_name?: string;
364
+ last_name?: string;
365
+ email?: string;
366
+ company?: string;
367
+ phone?: string;
368
+ line1?: string;
369
+ line2?: string;
370
+ line3?: string;
371
+ city?: string;
372
+ state_code?: string;
373
+ state?: string;
374
+ country?: string;
375
+ zip?: string;
376
+ validation_status?: ValidationStatus;
377
+ index: number;
378
+ }
379
+ export interface BillingAddress {
380
+ first_name?: string;
381
+ last_name?: string;
382
+ email?: string;
383
+ company?: string;
384
+ phone?: string;
385
+ line1?: string;
386
+ line2?: string;
387
+ line3?: string;
388
+ city?: string;
389
+ state_code?: string;
390
+ state?: string;
391
+ country?: string;
392
+ zip?: string;
393
+ validation_status?: ValidationStatus;
394
+ }
395
+ export interface SiteDetailsAtCreation {
396
+ timezone?: string;
397
+ organization_address?: object;
398
+ }
399
+ export interface TaxOrigin {
400
+ country?: string;
401
+ registration_number?: string;
402
+ }
403
+ // REQUEST PARAMS
404
+ //---------------
510
405
 
511
- */
512
-
513
- comment?:string;
514
-
515
- /**
516
- * @description Parameters for line_items
517
-
518
- */
519
-
520
- 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}[];
521
- }
522
- export interface RetrieveResponse {
523
- credit_note:CreditNote;
524
- }
525
-
526
- export interface PdfResponse {
527
- download:Download;
406
+ export interface CreateInputParam {
407
+ reference_invoice_id?: string;
408
+ customer_id?: string;
409
+ total?: number;
410
+ type: 'adjustment' | 'refundable';
411
+ reason_code?:
412
+ | 'product_unsatisfactory'
413
+ | 'service_unsatisfactory'
414
+ | 'order_change'
415
+ | 'order_cancellation'
416
+ | 'waiver'
417
+ | 'other';
418
+ create_reason_code?: string;
419
+ date?: number;
420
+ customer_notes?: string;
421
+ currency_code?: string;
422
+ comment?: string;
423
+ line_items?: LineItemsCreateInputParam[];
528
424
  }
529
425
  export interface PdfInputParam {
530
-
531
- /**
532
- * @description Determines the pdf should be rendered as inline or attachment in the browser. \* attachment - PDF is rendered as attachment in the browser \* inline - PDF is rendered as inline in the browser
533
-
534
- */
535
-
536
- disposition_type?:DispositionType;
537
- }
538
- export interface DownloadEinvoiceResponse {
539
- downloads:Download[];
540
- }
541
-
542
- export interface RefundResponse {
543
- credit_note:CreditNote;
544
-
545
- transaction:Transaction;
426
+ disposition_type?: DispositionType;
546
427
  }
547
428
  export interface RefundInputParam {
548
-
549
- /**
550
- * @description The amount to be refunded. If not specified, the entire [refundable amount](/docs/api/credit_notes#credit_note_amount_available) for this &#x60;credit_note&#x60; is refunded. **Note:** Any [linked_tax_withheld_refunds](/docs/api/credit_notes#credit_note_linked_tax_withheld_refunds) associated with the &#x60;credit_note&#x60; cannot be refunded via this operation.
551
-
552
- */
553
-
554
- refund_amount?:number;
555
-
556
- /**
557
- * @description A note to be added for this operation, to the credit note. This note is displayed on customer-facing documents such as the [Credit Note PDF](./credit_notes#retrieve_credit_note_as_pdf).
558
-
559
- */
560
-
561
- customer_notes?:string;
562
-
563
- /**
564
- * @description Reason code for the refund. Must be one from a list of reason codes set in the Chargebee app in **Settings \&gt; Configure Chargebee \&gt; Reason Codes \&gt; Credit Notes \&gt; Refund Credit Note**. Must be passed if set as mandatory in the app. The codes are case-sensitive.
565
-
566
- */
567
-
568
- refund_reason_code?:string;
569
- }
570
- export interface RecordRefundResponse {
571
- credit_note:CreditNote;
572
-
573
- transaction?:Transaction;
429
+ refund_amount?: number;
430
+ customer_notes?: string;
431
+ refund_reason_code?: string;
574
432
  }
575
433
  export interface RecordRefundInputParam {
576
-
577
- /**
578
- * @description Reason code for the refund. Must be one from a list of reason codes set in the Chargebee app in **Settings \&gt; Configure Chargebee \&gt; Reason Codes \&gt; Credit Notes \&gt; Refund Credit Note**. Must be passed if set as mandatory in the app. The codes are case-sensitive.
579
-
580
- */
581
-
582
- refund_reason_code?:string;
583
-
584
- /**
585
- * @description Remarks, if any, on the refund.
586
-
587
- */
588
-
589
- comment?:string;
590
-
591
- /**
592
- * @description Parameters for transaction
593
-
594
- */
595
-
596
- transaction:{amount?:number,custom_payment_method_id?:string,date:number,payment_method:PaymentMethod,reference_number?:string};
597
- }
598
- export interface VoidCreditNoteResponse {
599
- credit_note:CreditNote;
434
+ refund_reason_code?: string;
435
+ comment?: string;
436
+ transaction?: TransactionRecordRefundInputParam;
600
437
  }
601
438
  export interface VoidCreditNoteInputParam {
602
-
603
- /**
604
- * @description Reason for voiding credit note. This comment will be added to the credit note.
605
-
606
- */
607
-
608
- comment?:string;
609
- }
610
- export interface ListResponse {
611
- /**
612
- * @description Lists all the Credit Notes.
613
-
614
- */
615
-
616
- list:{credit_note:CreditNote}[];
617
-
618
- /**
619
- * @description Lists all the Credit Notes.
620
-
621
- */
622
-
623
- next_offset?:string;
439
+ comment?: string;
624
440
  }
625
441
  export interface ListInputParam {
626
- [key : string]: any;
627
- /**
628
- * @description Lists all the Credit Notes.
629
-
630
- */
631
-
632
- limit?:number;
633
-
634
- /**
635
- * @description Lists all the Credit Notes.
636
-
637
- */
638
-
639
- offset?:string;
640
-
641
- /**
642
- * @description Lists all the Credit Notes.
643
-
644
- */
645
-
646
- include_deleted?:boolean;
647
-
648
- /**
649
- * @description Lists all the Credit Notes.
650
-
651
- */
652
-
653
- id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
654
-
655
- /**
656
- * @description Lists all the Credit Notes.
657
-
658
- */
659
-
660
- customer_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
661
-
662
- /**
663
- * @description Lists all the Credit Notes.
664
-
665
- */
666
-
667
- subscription_id?:{in?:string,is?:string,is_not?:string,is_present?:'true' | 'false',not_in?:string,starts_with?:string};
668
-
669
- /**
670
- * @description Lists all the Credit Notes.
671
-
672
- */
673
-
674
- reference_invoice_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
675
-
676
- /**
677
- * @description Lists all the Credit Notes.
678
-
679
- */
680
-
681
- type?:{in?:string,is?:'adjustment' | 'refundable',is_not?:'adjustment' | 'refundable',not_in?:string};
682
-
683
- /**
684
- * @description Lists all the Credit Notes.
685
-
686
- */
687
-
688
- reason_code?:{in?:string,is?:'other' | 'product_unsatisfactory' | 'subscription_pause' | 'order_cancellation' | 'service_unsatisfactory' | 'subscription_cancellation' | 'chargeback' | 'order_change' | 'write_off' | 'waiver' | 'subscription_change' | 'fraudulent',is_not?:'other' | 'product_unsatisfactory' | 'subscription_pause' | 'order_cancellation' | 'service_unsatisfactory' | 'subscription_cancellation' | 'chargeback' | 'order_change' | 'write_off' | 'waiver' | 'subscription_change' | 'fraudulent',not_in?:string};
689
-
690
- /**
691
- * @description Lists all the Credit Notes.
692
-
693
- */
694
-
695
- create_reason_code?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
696
-
697
- /**
698
- * @description Lists all the Credit Notes.
699
-
700
- */
701
-
702
- status?:{in?:string,is?:'refund_due' | 'adjusted' | 'refunded' | 'voided',is_not?:'refund_due' | 'adjusted' | 'refunded' | 'voided',not_in?:string};
703
-
704
- /**
705
- * @description Lists all the Credit Notes.
706
-
707
- */
708
-
709
- date?:{after?:string,before?:string,between?:string,on?:string};
710
-
711
- /**
712
- * @description Lists all the Credit Notes.
713
-
714
- */
715
-
716
- total?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string};
717
-
718
- /**
719
- * @description Lists all the Credit Notes.
720
-
721
- */
722
-
723
- price_type?:{in?:string,is?:'tax_exclusive' | 'tax_inclusive',is_not?:'tax_exclusive' | 'tax_inclusive',not_in?:string};
724
-
725
- /**
726
- * @description Lists all the Credit Notes.
727
-
728
- */
729
-
730
- amount_allocated?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string};
731
-
732
- /**
733
- * @description Lists all the Credit Notes.
734
-
735
- */
736
-
737
- amount_refunded?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string};
738
-
739
- /**
740
- * @description Lists all the Credit Notes.
741
-
742
- */
743
-
744
- amount_available?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string};
745
-
746
- /**
747
- * @description Lists all the Credit Notes.
748
-
749
- */
750
-
751
- voided_at?:{after?:string,before?:string,between?:string,on?:string};
752
-
753
- /**
754
- * @description Lists all the Credit Notes.
755
-
756
- */
757
-
758
- updated_at?:{after?:string,before?:string,between?:string,on?:string};
759
-
760
- /**
761
- * @description Lists all the Credit Notes.
762
-
763
- */
764
-
765
- sort_by?:{asc?:'date',desc?:'date'};
766
-
767
- /**
768
- * @description Lists all the Credit Notes.
769
-
770
- */
771
-
772
- channel?:{in?:string,is?:'app_store' | 'web' | 'play_store',is_not?:'app_store' | 'web' | 'play_store',not_in?:string};
773
-
774
- /**
775
- * @description Lists all the Credit Notes.
776
-
777
- */
778
-
779
- einvoice?:{status?:{in?:string,is?:'in_progress' | 'scheduled' | 'success' | 'registered' | 'failed' | 'skipped',is_not?:'in_progress' | 'scheduled' | 'success' | 'registered' | 'failed' | 'skipped',not_in?:string}};
780
- }
781
- export interface DeleteResponse {
782
- credit_note:CreditNote;
442
+ limit?: number;
443
+ offset?: string;
444
+ einvoice?: EinvoiceCreditNoteListInputParam;
445
+ include_deleted?: boolean;
446
+ id?: filter.String;
447
+ customer_id?: filter.String;
448
+ subscription_id?: filter.String;
449
+ reference_invoice_id?: filter.String;
450
+ type?: filter.Enum;
451
+ reason_code?: filter.Enum;
452
+ create_reason_code?: filter.String;
453
+ status?: filter.Enum;
454
+ date?: filter.Timestamp;
455
+ total?: filter.Number;
456
+ price_type?: filter.Enum;
457
+ amount_allocated?: filter.Number;
458
+ amount_refunded?: filter.Number;
459
+ amount_available?: filter.Number;
460
+ voided_at?: filter.Timestamp;
461
+ updated_at?: filter.Timestamp;
462
+ channel?: filter.Enum;
463
+ 'sort_by[asc]'?: string;
464
+ 'sort_by[desc]'?: string;
465
+ }
466
+ export interface CreditNotesForCustomerInputParam {
467
+ limit?: number;
468
+ offset?: string;
783
469
  }
784
470
  export interface DeleteInputParam {
785
-
786
- /**
787
- * @description Reason for deleting this credit note. This comment will be added to the associated invoice entity.
788
-
789
- */
790
-
791
- comment?:string;
792
- }
793
- export interface RemoveTaxWithheldRefundResponse {
794
- credit_note:CreditNote;
471
+ comment?: string;
795
472
  }
796
473
  export interface RemoveTaxWithheldRefundInputParam {
797
-
798
- /**
799
- * @description Parameters for tax_withheld
800
-
801
- */
802
-
803
- tax_withheld:{id:string};
804
- }
805
- export interface ResendEinvoiceResponse {
806
- credit_note:CreditNote;
807
- }
808
-
809
- export interface SendEinvoiceResponse {
810
- credit_note:CreditNote;
811
- }
812
-
813
- export interface ImportCreditNoteResponse {
814
- credit_note:CreditNote;
474
+ tax_withheld?: TaxWithheldRemoveTaxWithheldRefundInputParam;
815
475
  }
816
476
  export interface ImportCreditNoteInputParam {
817
-
818
- /**
819
- * @description Credit Note Number.
820
-
821
- */
822
-
823
- id:string;
824
-
825
- /**
826
- * @description This identifies the customer for whom the credit note needs to be created.
827
-
828
- */
829
-
830
- customer_id?:string;
831
-
832
- /**
833
- * @description The identifier of the subscription for which this credit note needs to be created.
834
-
835
- */
836
-
837
- subscription_id?:string;
838
-
839
- /**
840
- * @description The identifier of the invoice against which this Credit Note is issued.
841
-
842
- */
843
-
844
- reference_invoice_id:string;
845
-
846
- /**
847
- * @description The credit note type. \* refundable - Refundable Credit Note \* adjustment - Adjustment Credit Note
848
-
849
- */
850
-
851
- type:'adjustment' | 'refundable';
852
-
853
- /**
854
- * @description The currency code (ISO 4217 format) for the credit note.
855
-
856
- */
857
-
858
- currency_code?:string;
859
-
860
- /**
861
- * @description Reason code for creating the credit note. Must be one from a list of reason codes set in the Chargebee app in **Settings \&gt; Configure Chargebee \&gt; Reason Codes \&gt; Credit Notes \&gt; Create Credit Note**. Must be passed if set as mandatory in the app. The codes are case-sensitive.
862
-
863
- */
864
-
865
- create_reason_code:string;
866
-
867
- /**
868
- * @description The date the Credit Note is issued.
869
-
870
- */
871
-
872
- date:number;
873
-
874
- /**
875
- * @description The credit note status. \* refund_due - When the credits are yet to be used, or have been partially used. \* refunded - When the entire credits (Credit Note amount) have been used (i.e either allocated to invoices or refunded). \* voided - When the Credit Note has been cancelled. \* adjusted - When the Credit Note has been adjusted against an invoice.
876
-
877
- */
878
-
879
- status?:'refund_due' | 'adjusted' | 'refunded' | 'voided';
880
-
881
- /**
882
- * @description Credit Note amount in cents.
883
-
884
- */
885
-
886
- total?:number;
887
-
888
- /**
889
- * @description The time this Credit Note gets fully used. Please note that this field is not present when partial refunds are issued.
890
-
891
- */
892
-
893
- refunded_at?:number;
894
-
895
- /**
896
- * @description Timestamp indicating the date and time this Credit Note gets voided.
897
-
898
- */
899
-
900
- voided_at?:number;
901
-
902
- /**
903
- * @description The Credit Note sub-total.
904
-
905
- */
906
-
907
- sub_total?:number;
908
-
909
- /**
910
- * @description Indicates the rounded-off amount. For example, if your invoice amount is $99.99, and the amount is rounded off to $100.00, in this case, $100.00 is your invoice amount, $0.01 is the &#x60;round_off_amount&#x60;. If there is no &#x60;round-off amount&#x60;, it will display &#x60;0&#x60;.
911
-
912
- */
913
-
914
- round_off_amount?:number;
915
-
916
- /**
917
- * @description Indicates the fractional correction amount.
918
-
919
- */
920
-
921
- fractional_correction?:number;
922
-
923
- /**
924
- * @description An overridden value for the first two characters of the [full VAT
925
- number](https://en.wikipedia.org/wiki/VAT_identification_number). Only applicable specifically for customers with [billing_address](customers#customer_billing_address) &#x60;country&#x60; as &#x60;XI&#x60; (which is **United Kingdom - Northern Ireland** ).
926
-
927
- When you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or have [manually
928
- enabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, you have the option of setting [billing_address](customers#customer_billing_address) &#x60;country&#x60; as &#x60;XI&#x60;. That&#x27;s the code for **United Kingdom - Northern
929
- Ireland** . The first two characters of the VAT number in such a case is &#x60;XI&#x60; by default. However, if the VAT number was registered in UK, the value should be &#x60;GB&#x60;. Set &#x60;vat_number_prefix&#x60; to &#x60;GB&#x60; for such cases.
930
-
931
- */
932
-
933
- vat_number_prefix?:string;
934
-
935
- /**
936
- * @description Parameters for line_items
937
-
938
- */
939
-
940
- line_items:{amount?:number,amount_in_decimal?:string,date_from?:number,date_to?:number,description:string,entity_id?:string,entity_type?:'addon_item_price' | 'plan_item_price' | 'charge_item_price' | 'adhoc',id?:string,item_level_discount1_amount?:number,item_level_discount1_entity_id?:string,item_level_discount2_amount?:number,item_level_discount2_entity_id?:string,quantity?:number,quantity_in_decimal?:string,reference_line_item_id?:string,subscription_id?:string,tax10_amount?:number,tax10_name?:string,tax1_amount?:number,tax1_name?:string,tax2_amount?:number,tax2_name?:string,tax3_amount?:number,tax3_name?:string,tax4_amount?:number,tax4_name?:string,tax5_amount?:number,tax5_name?:string,tax6_amount?:number,tax6_name?:string,tax7_amount?:number,tax7_name?:string,tax8_amount?:number,tax8_name?:string,tax9_amount?:number,tax9_name?:string,unit_amount?:number,unit_amount_in_decimal?:string}[];
941
-
942
- /**
943
- * @description Parameters for line_item_tiers
944
-
945
- */
946
-
947
- line_item_tiers:{ending_unit?:number,ending_unit_in_decimal?:string,line_item_id:string,quantity_used?:number,quantity_used_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string,unit_amount?:number,unit_amount_in_decimal?:string}[];
948
-
949
- /**
950
- * @description Parameters for discounts
951
-
952
- */
953
-
954
- discounts:{amount:number,description?:string,entity_id?:string,entity_type:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'document_level_discount' | 'document_level_coupon',line_item_id?:string}[];
955
-
956
- /**
957
- * @description Parameters for taxes
958
-
959
- */
960
-
961
- taxes:{amount?:number,description?:string,juris_code?:string,juris_name?:string,juris_type?:'special' | 'country' | 'unincorporated' | 'other' | 'city' | 'federal' | 'county' | 'state',name:string,rate:number}[];
962
-
963
- /**
964
- * @description Parameters for allocations
965
-
966
- */
967
-
968
- allocations:{allocated_amount:number,allocated_at:number,invoice_id:string}[];
969
-
970
- /**
971
- * @description Parameters for linked_refunds
972
-
973
- */
974
-
975
- linked_refunds:{amount:number,date:number,payment_method:PaymentMethod,reference_number?:string}[];
976
- }
977
- export interface Einvoice {
978
- /**
979
- * @description The unique &#x60;id&#x60; for the e-invoice. This is auto-generated by Chargebee.
980
-
981
- */
982
-
983
- id:string;
984
-
985
- /**
986
- * @description This attribute is used to populate the unique reference number assigned to an invoice on the Invoice Registration Portal (IRP) network. It is essential for identifying and tracking invoices that are processed through the IRP network. In the future, this field may be used to store similar reference numbers for other networks.
987
-
988
- */
989
-
990
- reference_number?:string;
991
-
992
- /**
993
- * @description The status of processing the e-invoice. To obtain detailed information about the current &#x60;status&#x60;, see &#x60;message&#x60;. \* scheduled - Sending the e-invoice to the customer has been scheduled. \* skipped - The e-invoice was not sent. This could be due to missing information or because the &#x60;entity_identifier&#x60; is not registered on the e-invoicing network. \* success - The e-invoice has been successfully delivered to the customer. \* failed - The e-invoice was sent and there was an error due to which it was not delivered. \* in_progress - The e-invoice has been sent and Chargebee is waiting for confirmation from the receiving entity. \* registered - The e-invoice was sent and there was an error due to which it was not delivered but got cleared in the IRP.
994
-
995
- */
996
-
997
- status:'in_progress' | 'scheduled' | 'success' | 'registered' | 'failed' | 'skipped';
998
-
999
- /**
1000
- * @description Detailed information about the status of the e-invoice. When &#x60;status&#x60; is &#x60;skipped&#x60; or &#x60;failed&#x60;, this contains the reason or error details. The following are some valid examples:
1001
-
1002
- * Invoice successfully sent to customer via the e-invoicing network 9090:123456
1003
- * Invoice successfully sent to customer via email id abc@acme.com
1004
-
1005
- */
1006
-
1007
- message?:string;
1008
- }
1009
- export interface LineItem {
1010
- /**
1011
- * @description Uniquely identifies a line_item
1012
-
1013
- */
1014
-
1015
- id?:string;
1016
-
1017
- /**
1018
- * @description A unique identifier for the subscription this line item belongs to.
1019
-
1020
- */
1021
-
1022
- subscription_id?:string;
1023
-
1024
- /**
1025
- * @description Start date of this line item.
1026
-
1027
- */
1028
-
1029
- date_from:number;
1030
-
1031
- /**
1032
- * @description End date of this line item.
1033
-
1034
- */
1035
-
1036
- date_to:number;
1037
-
1038
- /**
1039
- * @description Unit amount of the line item.
1040
-
1041
- */
1042
-
1043
- unit_amount:number;
1044
-
1045
- /**
1046
- * @description [Quantity of the recurring item](/docs/api/invoices?prod_cat_ver&#x3D;2#invoice_line_items_quantity) which is represented by this line item. For &#x60;metered&#x60; line items, this value is updated from [usages](/docs/api/usages) once when the invoice is generated as &#x60;pending&#x60; and finally when the invoice is [closed](/docs/api/invoices#close_a_pending_invoice).
1047
-
1048
- */
1049
-
1050
- quantity?:number;
1051
-
1052
- /**
1053
- * @description Total amount of this line item. Typically equals to unit amount x quantity
1054
-
1055
- */
1056
-
1057
- amount?:number;
1058
-
1059
- /**
1060
- * @description The [pricing scheme](https://www.chargebee.com/docs/2.0/plans.html#pricing-models) for this item price. \* stairstep - A quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in. \* flat_fee - A fixed price that is not quantity-based. \* tiered - The per unit price is based on the tier that the total quantity falls in. \* per_unit - A fixed price per unit quantity. \* volume - There are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers.
1061
-
1062
- */
1063
-
1064
- pricing_model?:'volume' | 'per_unit' | 'tiered' | 'flat_fee' | 'stairstep';
1065
-
1066
- /**
1067
- * @description Specifies whether this line item is taxed or not
1068
-
1069
- */
1070
-
1071
- is_taxed:boolean;
1072
-
1073
- /**
1074
- * @description The tax amount charged for this item
1075
-
1076
- */
1077
-
1078
- tax_amount?:number;
1079
-
1080
- /**
1081
- * @description Rate of tax used to calculate tax for this lineitem
1082
-
1083
- */
1084
-
1085
- tax_rate?:number;
1086
-
1087
- /**
1088
- * @description The decimal representation of the unit amount of the &#x60;line_item&#x60;. The value is in major units of the currency. Returned when the &#x60;line_item&#x60; is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled.
1089
-
1090
- */
1091
-
1092
- unit_amount_in_decimal?:string;
1093
-
1094
- /**
1095
- * @description The decimal representation of the quantity of this line_item. Returned when the &#x60;line_item&#x60; is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled.
1096
-
1097
- */
1098
-
1099
- quantity_in_decimal?:string;
1100
-
1101
- /**
1102
- * @description The decimal representation of the amount for the &#x60;line_item&#x60;, in major units of the currency. Typically equals to &#x60;unit_amount_in_decimal&#x60; x &#x60;quantity_in_decimal&#x60;. Returned when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled.
1103
-
1104
- */
1105
-
1106
- amount_in_decimal?:string;
1107
-
1108
- /**
1109
- * @description Total discounts for this line
1110
-
1111
- */
1112
-
1113
- discount_amount?:number;
1114
-
1115
- /**
1116
- * @description Line Item-level discounts for this line.
1117
-
1118
- */
1119
-
1120
- item_level_discount_amount?:number;
1121
-
1122
- /**
1123
- * @description Invoice Reference Line Item ID
1124
-
1125
- */
1126
-
1127
- reference_line_item_id?:string;
1128
-
1129
- /**
1130
- * @description Detailed description about this line item.
1131
-
1132
- */
1133
-
1134
- description:string;
1135
-
1136
- /**
1137
- * @description Detailed description about this item.
1138
-
1139
- */
1140
-
1141
- entity_description?:string;
1142
-
1143
- /**
1144
- * @description Specifies the modelled entity this line item is based on. \* addon - Indicates that this lineitem is based on &#x27;Addon&#x27; entity. The &#x27;entity_id&#x27; attribute specifies the [addon](/docs/api/addons#addon_attributes) id \* plan - Indicates that this lineitem is based on &#x27;Plan&#x27; entity. The &#x27;entity_id&#x27; attribute specifies the [plan](/docs/api/plans#plan_attributes) id \* plan_item_price - Indicates that this line item is based on plan Item Price \* addon_item_price - Indicates that this line item is based on addon Item Price \* charge_item_price - Indicates that this line item is based on charge Item Price \* adhoc - Indicates that this lineitem is not modelled. i.e created adhoc. So the &#x27;entity_id&#x27; attribute will be null in this case \* plan_setup - Indicates that this lineitem is based on &#x27;Plan Setup&#x27; charge. The &#x27;entity_id&#x27; attribute specifies the [plan](/docs/api/plans#plan_attributes) id
1145
-
1146
- */
1147
-
1148
- entity_type:'addon_item_price' | 'plan_item_price' | 'charge_item_price' | 'adhoc';
1149
-
1150
- /**
1151
- * @description The reason due to which the line item price/amount is exempted from tax. \* zero_value_item - If the total invoice value/amount is equal to zero. E.g., If the total order value is $10 and a $10 coupon has been applied against that order, the total order value becomes $0. Hence the invoice value also becomes $0. \* reverse_charge - If the Customer is identified as B2B customer (when VAT Number is entered), applicable for EU only \* tax_not_configured - If tax is not enabled for the site \* high_value_physical_goods - If physical goods are sold from outside Australia to customers in Australia, and the price of all the physical good line items is greater than AUD 1000, then tax will not be applied \* customer_exempt - If the Customer is marked as Tax exempt \* region_non_taxable - If the product sold is not taxable in this region, but it is taxable in other regions, hence this region is not part of the Taxable jurisdiction \* product_exempt - If the Plan or Addon is marked as Tax exempt \* zero_rated - If the rate of tax is 0% and no Sales/ GST tax is collectable for that line item \* export - You are not registered for tax in the customer&#x27;s region. This is also the reason code when both &#x60;billing_address&#x60; and &#x60;shipping_address&#x60; have not been provided for the customer and subscription respectively
1152
-
1153
- */
1154
-
1155
- tax_exempt_reason?:'high_value_physical_goods' | 'tax_not_configured' | 'reverse_charge' | 'zero_rated' | 'tax_not_configured_external_provider' | 'customer_exempt' | 'region_non_taxable' | 'zero_value_item' | 'export' | 'product_exempt';
1156
-
1157
- /**
1158
- * @description The identifier of the modelled entity this line item is based on. Will be null for &#x27;adhoc&#x27; entity type
1159
-
1160
- */
1161
-
1162
- entity_id?:string;
1163
-
1164
- /**
1165
- * @description A unique identifier for the customer this line item belongs to
1166
-
1167
- */
1168
-
1169
- customer_id?:string;
1170
- }
1171
- export interface Discount {
1172
- /**
1173
- * @description The amount deducted. The format of this value depends on the [kind of currency](/docs/api?prod_cat_ver&#x3D;2#currencies).
1174
-
1175
- */
1176
-
1177
- amount:number;
1178
-
1179
- /**
1180
- * @description Description for this deduction.
1181
-
1182
- */
1183
-
1184
- description?:string;
1185
-
1186
- /**
1187
- * @description The unique id of the line item that this deduction is for. Is required when &#x60;discounts[entity_type]&#x60; is &#x60;item_level_coupon&#x60; or &#x60;document_level_coupon&#x60;.
1188
-
1189
- */
1190
-
1191
- line_item_id?:string;
1192
-
1193
- /**
1194
- * @description The type of deduction and the amount to which it is applied. \* prorated_credits - The deduction is due to a legacy adjustment credit applied to the invoice. The &#x60;entity_id&#x60; is &#x60;null&#x60; in this case. The legacy credits feature is superseded by [adjustment_credit_notes](/docs/api/invoices?prod_cat_ver&#x3D;2#invoice_adjustment_credit_notes). \* item_level_coupon - The deduction is due to a coupon applied to line item. The coupon &#x60;id&#x60; is passed as &#x60;entity_id&#x60;. \* item_level_discount - The deduction is due to a [discount](/docs/api/discounts?prod_cat_ver&#x3D;2) applied to a line item of the invoice. The discount &#x60;id&#x60; is available as the &#x60;entity_id&#x60;. \* document_level_coupon - The deduction is due to a coupon applied to the invoice &#x60;sub_total&#x60;. The coupon id is passed as &#x60;entity_id&#x60;. \* promotional_credits - The deduction is due to a [promotional credit](/docs/api/promotional_credits?prod_cat_ver&#x3D;2) applied to the invoice. \* document_level_discount - The deduction is due to a [discount](/docs/api/discounts?prod_cat_ver&#x3D;2) applied to the invoice &#x60;sub_total&#x60;. The discount &#x60;id&#x60; is available as the &#x60;entity_id&#x60;.
1195
-
1196
- */
1197
-
1198
- entity_type:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'prorated_credits' | 'document_level_discount' | 'document_level_coupon';
1199
-
1200
- /**
1201
- * @description The type of discount that is applied to the line item. Relevant only when &#x60;discounts[entity_type]&#x60; is one of &#x60;item_level_discount&#x60; , &#x60;item_level_coupon&#x60;, &#x60;document_level_discount&#x60;, or &#x60;document_level_coupon&#x60; \* percentage - when percentage is applied as discount \* fixed_amount - when amount is applied as discount
1202
-
1203
- */
1204
-
1205
- discount_type?:'fixed_amount' | 'percentage';
1206
-
1207
- /**
1208
- * @description When the deduction is due to a &#x60;coupon&#x60; or a [discount](discounts), then this is the &#x60;id&#x60; of the coupon or discount.
1209
-
1210
- */
1211
-
1212
- entity_id?:string;
1213
-
1214
- /**
1215
- * @description The [coupon code](/docs/api/coupon_codes#coupon_code_code), if applicable, used to provide the discount. The [coupon.id](/docs/api/coupons#coupon_id) is available in &#x60;entity_id&#x60;.
1216
-
1217
- */
1218
-
1219
- coupon_set_code?:string;
1220
- }
1221
- export interface LineItemDiscount {
1222
- /**
1223
- * @description The unique id of the line item that this deduction is for.
1224
-
1225
- */
1226
-
1227
- line_item_id:string;
1228
-
1229
- /**
1230
- * @description The type of deduction and the amount to which it is applied. \* prorated_credits - The deduction is due to a legacy adjustment credit applied to the invoice. The &#x60;entity_id&#x60; is &#x60;null&#x60; in this case. The legacy credits feature is superseded by [adjustment_credit_notes](/docs/api/invoices?prod_cat_ver&#x3D;2#invoice_adjustment_credit_notes). \* document_level_coupon - The deduction is due to a coupon applied to the invoice &#x60;sub_total&#x60;. The coupon &#x60;id&#x60; is available as &#x60;entity_id&#x60;. \* promotional_credits - The deduction is due to a [promotional credit](/docs/api/promotional_credits) applied to the invoice. The &#x60;entity_id&#x60; is &#x60;null&#x60; in this case. \* item_level_coupon - The deduction is due to a coupon applied to a line item of the invoice. The coupon &#x60;id&#x60; is available as &#x60;entity_id&#x60;. \* document_level_discount - The deduction is due to a [discount](/docs/api/discounts?prod_cat_ver&#x3D;2) applied to the invoice &#x60;sub_total&#x60;. The discount &#x60;id&#x60; is available as the &#x60;entity_id&#x60;. \* item_level_discount - The deduction is due to a [discount](/docs/api/discounts?prod_cat_ver&#x3D;2) applied to a line item of the invoice. The discount &#x60;id&#x60; is available as the &#x60;entity_id&#x60;.
1231
-
1232
- */
1233
-
1234
- discount_type:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'prorated_credits' | 'document_level_discount' | 'document_level_coupon';
1235
-
1236
- coupon_id?:string;
1237
-
1238
- /**
1239
- * @description When the deduction is due to a &#x60;coupon&#x60; or a [discount](discounts), then this is the &#x60;id&#x60; of the coupon or discount.
1240
-
1241
- */
1242
-
1243
- entity_id?:string;
1244
-
1245
- /**
1246
- * @description The amount deducted. The format of this value depends on the [kind of currency](/docs/api#currencies).
1247
-
1248
- */
1249
-
1250
- discount_amount:number;
1251
- }
1252
- export interface LineItemTier {
1253
- /**
1254
- * @description Uniquely identifies a line_item
1255
-
1256
- */
1257
-
1258
- line_item_id?:string;
1259
-
1260
- /**
1261
- * @description The lower limit of a range of units for the tier
1262
-
1263
- */
1264
-
1265
- starting_unit:number;
1266
-
1267
- /**
1268
- * @description The upper limit of a range of units for the tier
1269
-
1270
- */
1271
-
1272
- ending_unit?:number;
1273
-
1274
- /**
1275
- * @description The number of units purchased in a range.
1276
-
1277
- */
1278
-
1279
- quantity_used:number;
1280
-
1281
- /**
1282
- * @description The price of the tier if the charge model is a &#x60;stairtstep&#x60; pricing , or the price of each unit in the tier if the charge model is &#x60;tiered&#x60;/&#x60;volume&#x60; pricing.
1283
-
1284
- */
1285
-
1286
- unit_amount:number;
1287
-
1288
- /**
1289
- * @description The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as &#x60;ending_unit_in_decimal&#x60; of the next lower tier. Returned only when the &#x60;line_items.pricing_model&#x60; is &#x60;tiered&#x60;, &#x60;volume&#x60; or &#x60;stairstep&#x60; and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled.
1290
-
1291
- */
1292
-
1293
- starting_unit_in_decimal?:string;
1294
-
1295
- /**
1296
- * @description The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the &#x60;starting_unit_in_decimal&#x60; of the next higher tier. Returned only when the &#x60;line_items.pricing_model&#x60; is &#x60;tiered&#x60;, &#x60;volume&#x60; or stairstep and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled.
1297
-
1298
- */
1299
-
1300
- ending_unit_in_decimal?:string;
1301
-
1302
- /**
1303
- * @description The decimal representation of the quantity purchased from this tier. Returned when the &#x60;line_item&#x60; is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled.
1304
-
1305
- */
1306
-
1307
- quantity_used_in_decimal?:string;
1308
-
1309
- /**
1310
- * @description The decimal representation of the per-unit price for the tier when the &#x60;pricing_model&#x60; is &#x60;tiered&#x60; or &#x60;volume&#x60;. When the &#x60;pricing_model&#x60; is &#x60;stairstep&#x60;, it is the decimal representation of the total price for &#x60;line_item&#x60;. The value is in major units of the currency. Returned when the &#x60;line_item&#x60; is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled.
1311
-
1312
- */
1313
-
1314
- unit_amount_in_decimal?:string;
1315
- }
1316
- export interface Tax {
1317
- /**
1318
- * @description The name of the tax applied. E.g. GST.
1319
-
1320
- */
1321
-
1322
- name:string;
1323
-
1324
- /**
1325
- * @description The tax amount.
1326
-
1327
- */
1328
-
1329
- amount:number;
1330
-
1331
- /**
1332
- * @description Description of the tax item.
1333
-
1334
- */
1335
-
1336
- description?:string;
1337
- }
1338
- export interface LineItemTax {
1339
- /**
1340
- * @description The unique reference id of the line item for which the tax is applicable
1341
-
1342
- */
1343
-
1344
- line_item_id?:string;
1345
-
1346
- /**
1347
- * @description The name of the tax applied
1348
-
1349
- */
1350
-
1351
- tax_name:string;
1352
-
1353
- /**
1354
- * @description The rate of tax used to calculate tax amount
1355
-
1356
- */
1357
-
1358
- tax_rate:number;
1359
-
1360
- /**
1361
- * @description Indicates the service period end of the tax rate for the line item.
1362
-
1363
- */
1364
-
1365
- date_to?:number;
1366
-
1367
- /**
1368
- * @description Indicates the service period start of the tax rate for the line item.
1369
-
1370
- */
1371
-
1372
- date_from?:number;
1373
-
1374
- /**
1375
- * @description Indicates the prorated line item amount in cents.
1376
-
1377
- */
1378
-
1379
- prorated_taxable_amount?:number;
1380
-
1381
- /**
1382
- * @description Indicates if tax is applied only on a portion of the line item amount.
1383
-
1384
- */
1385
-
1386
- is_partial_tax_applied?:boolean;
1387
-
1388
- /**
1389
- * @description Indicates the non-compliance tax that should not be reported to the jurisdiction.
1390
-
1391
- */
1392
-
1393
- is_non_compliance_tax?:boolean;
1394
-
1395
- /**
1396
- * @description Indicates the actual portion of the line item amount that is taxable.
1397
-
1398
- */
1399
-
1400
- taxable_amount:number;
1401
-
1402
- /**
1403
- * @description The tax amount
1404
-
1405
- */
1406
-
1407
- tax_amount:number;
1408
-
1409
- /**
1410
- * @description The type of tax jurisdiction \* federal - The tax jurisdiction is a federal \* state - The tax jurisdiction is a state \* county - The tax jurisdiction is a county \* country - The tax jurisdiction is a country \* city - The tax jurisdiction is a city \* special - Special tax jurisdiction. \* unincorporated - Combined tax of state and county. \* other - Jurisdictions other than the ones listed above.
1411
-
1412
- */
1413
-
1414
- tax_juris_type?:'special' | 'country' | 'unincorporated' | 'other' | 'city' | 'federal' | 'county' | 'state';
1415
-
1416
- /**
1417
- * @description The name of the tax jurisdiction
1418
-
1419
- */
1420
-
1421
- tax_juris_name?:string;
1422
-
1423
- /**
1424
- * @description The tax jurisdiction code
1425
-
1426
- */
1427
-
1428
- tax_juris_code?:string;
1429
-
1430
- /**
1431
- * @description Total tax amount in the currency of the place of supply. This is applicable only for Invoice and Credit Notes API.
1432
-
1433
- */
1434
-
1435
- tax_amount_in_local_currency?:number;
1436
-
1437
- /**
1438
- * @description The currency code (ISO 4217 format) of the place of supply in which VAT needs to be converted and displayed. This is applicable only for Invoice and Credit Notes API.
1439
-
1440
- */
1441
-
1442
- local_currency_code?:string;
1443
- }
1444
- export interface CreditNoteTransaction {
1445
- /**
1446
- * @description Uniquely identifies the transaction.
1447
-
1448
- */
1449
-
1450
- txn_id:string;
1451
-
1452
- /**
1453
- * @description The transaction amount applied to this invoice
1454
-
1455
- */
1456
-
1457
- applied_amount:number;
1458
-
1459
- /**
1460
- * @description Time when the transaction amount applied to this invoice.
1461
-
1462
- */
1463
-
1464
- applied_at:number;
1465
-
1466
- /**
1467
- * @description The status of this transaction. \* needs_attention - Connection with Gateway got terminated abruptly. So, status of this transaction needs to be resolved manually \* voided - The transaction got voided or authorization expired at gateway. \* timeout - Transaction failed because of Gateway not accepting the connection. \* success - The transaction is successful. \* failure - Transaction failed. Refer the &#x27;error_code&#x27; and &#x27;error_text&#x27; fields to know the reason for failure \* in_progress - Transaction is being processed by the gateway. This typically happens for [direct debit transactions](https://www.chargebee.com/docs/direct-debit-payments.html) or, in case of cards, refund transactions. Such transactions can take 2-7 days to complete, depending on the gateway and payment method.
1468
-
1469
- */
1470
-
1471
- txn_status?:'in_progress' | 'success' | 'failure' | 'voided' | 'timeout' | 'needs_attention';
1472
-
1473
- /**
1474
- * @description Indicates when this transaction occurred.
1475
-
1476
- */
1477
-
1478
- txn_date?:number;
1479
-
1480
- /**
1481
- * @description Total amount of the transaction
1482
-
1483
- */
1484
-
1485
- txn_amount?:number;
1486
-
1487
- /**
1488
- * @description Reason code for the refund. Must be one from a list of reason codes set in the Chargebee app in **Settings \&gt; Configure Chargebee \&gt; Reason Codes \&gt; Credit Notes \&gt; Refund Credit Note**. Must be passed if set as mandatory in the app. The codes are case-sensitive
1489
-
1490
- */
1491
-
1492
- refund_reason_code?:string;
1493
- }
1494
- export interface LinkedTaxWithheldRefund {
1495
- /**
1496
- * @description An auto-generated unique identifier for the tax withheld. The value starts with the prefix &#x60;tax_wh_&#x60;. For example, &#x60;tax_wh_16BdDXSlbu4uV1Ee6&#x60;.
1497
-
1498
- */
1499
-
1500
- id:string;
1501
-
1502
- /**
1503
- * @description The amount withheld by the customer as tax from the invoice. The unit depends on the [type of currency](/docs/api#md_disabled).
1504
-
1505
- */
1506
-
1507
- amount?:number;
1508
-
1509
- /**
1510
- * @description The description for this tax withheld.
1511
-
1512
- */
1513
-
1514
- description?:string;
1515
-
1516
- /**
1517
- * @description Date or time associated with the tax withheld.
1518
-
1519
- */
1520
-
1521
- date?:number;
1522
-
1523
- /**
1524
- * @description A unique external reference number for the tax withheld. Typically, this is the reference number used by the system you are integrating the API with. Depending on your integration, this could be the reference number issued by the taxation authority to identify the customer or the specific tax transaction.
1525
-
1526
- */
1527
-
1528
- reference_number?:string;
1529
- }
1530
- export interface AppliedCredit {
1531
- /**
1532
- * @description Unique identifier of the invoice.
1533
-
1534
- */
1535
-
1536
- invoice_id:string;
1537
-
1538
- /**
1539
- * @description Amount of this refund transaction.
1540
-
1541
- */
1542
-
1543
- allocated_amount:number;
1544
-
1545
- /**
1546
- * @description Indicates when this refund occured.
1547
-
1548
- */
1549
-
1550
- allocated_at:number;
1551
-
1552
- /**
1553
- * @description Closing date of the invoice. Typically this is the date on which invoice is generated
1554
-
1555
- */
1556
-
1557
- invoice_date?:number;
1558
-
1559
- /**
1560
- * @description Current status of the invoice. \* not_paid - Indicates the payment is not made and all attempts to collect is failed. \* paid - Indicates a paid invoice. \* voided - Indicates a voided invoice. \* posted - Indicates the payment is not yet collected and will be in this state till the due date to indicate the due period \* pending -
1561
- The [invoice](/docs/api/invoices?prod_cat_ver&#x3D;2#invoice_status) is yet to be closed (sent for payment collection). An invoice is generated with this &#x60;status&#x60; when it has line items that belong to items that are &#x60;metered&#x60; or when the &#x60;subscription.create_pending_invoices&#x60;attribute is set to &#x60;true&#x60;.
1562
- The [invoice](/docs/api/invoices?prod_cat_ver&#x3D;1#invoice_status) is yet to be closed (sent for payment collection). All invoices are generated with this &#x60;status&#x60; when [Metered Billing](https://www.chargebee.com/docs/1.0/metered_billing.html) is enabled for the site. \* payment_due - Indicates the payment is not yet collected and is being retried as per retry settings.
1563
-
1564
- */
1565
-
1566
- invoice_status:'pending' | 'paid' | 'voided' | 'not_paid' | 'posted' | 'payment_due';
1567
- }
1568
- export interface ShippingAddress {
1569
- /**
1570
- * @description The first name of the contact.
1571
-
1572
- */
1573
-
1574
- first_name?:string;
1575
-
1576
- /**
1577
- * @description The last name of the contact.
1578
-
1579
- */
1580
-
1581
- last_name?:string;
1582
-
1583
- /**
1584
- * @description The email address.
1585
-
1586
- */
1587
-
1588
- email?:string;
1589
-
1590
- /**
1591
- * @description The company name.
1592
-
1593
- */
1594
-
1595
- company?:string;
1596
-
1597
- /**
1598
- * @description The phone number.
1599
-
1600
- */
1601
-
1602
- phone?:string;
1603
-
1604
- /**
1605
- * @description Address line 1
1606
-
1607
- */
1608
-
1609
- line1?:string;
1610
-
1611
- /**
1612
- * @description Address line 2
1613
-
1614
- */
1615
-
1616
- line2?:string;
1617
-
1618
- /**
1619
- * @description Address line 3
1620
-
1621
- */
1622
-
1623
- line3?:string;
1624
-
1625
- /**
1626
- * @description The name of the city.
1627
-
1628
- */
1629
-
1630
- city?:string;
1631
-
1632
- /**
1633
- * @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;).
1634
-
1635
- */
1636
-
1637
- state_code?:string;
1638
-
1639
- /**
1640
- * @description The state/province name.
1641
-
1642
- */
1643
-
1644
- state?:string;
1645
-
1646
- /**
1647
- * @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).
1648
-
1649
- **Note** : If you enter an invalid country code, the system will return an error.
1650
-
1651
- **Brexit**
1652
-
1653
-
1654
- 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.
1655
-
1656
- */
1657
-
1658
- country?:string;
1659
-
1660
- /**
1661
- * @description Zip or postal code. The number of characters is validated according to the rules [specified here](https://i18napis.appspot.com/address).
1662
-
1663
- */
1664
-
1665
- zip?:string;
1666
-
1667
- /**
1668
- * @description The address verification status. \* not_validated - Address is not yet validated. \* valid - Address was validated successfully. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid.
1669
-
1670
- */
1671
-
1672
- validation_status?:ValidationStatus;
1673
-
1674
- /**
1675
- * @description The index number of the subscription/one-time group to which the item price is added. Provide a unique number between &#x60;0&#x60; and &#x60;9&#x60; (inclusive) for each group that is to be created. To increase this limit, contact Chargebee Support
1676
-
1677
- */
1678
-
1679
- index:number;
1680
- }
1681
- export interface BillingAddress {
1682
- /**
1683
- * @description The first name of the billing contact.
1684
-
1685
- */
1686
-
1687
- first_name?:string;
1688
-
1689
- /**
1690
- * @description The last name of the billing contact.
1691
-
1692
- */
1693
-
1694
- last_name?:string;
1695
-
1696
- /**
1697
- * @description The email address.
1698
-
1699
- */
1700
-
1701
- email?:string;
1702
-
1703
- /**
1704
- * @description The company name.
1705
-
1706
- */
1707
-
1708
- company?:string;
1709
-
1710
- /**
1711
- * @description The phone number.
1712
-
1713
- */
1714
-
1715
- phone?:string;
1716
-
1717
- /**
1718
- * @description Address line 1
1719
-
1720
- */
1721
-
1722
- line1?:string;
1723
-
1724
- /**
1725
- * @description Address line 2
1726
-
1727
- */
1728
-
1729
- line2?:string;
1730
-
1731
- /**
1732
- * @description Address line 3
1733
-
1734
- */
1735
-
1736
- line3?:string;
1737
-
1738
- /**
1739
- * @description The name of the city.
1740
-
1741
- */
1742
-
1743
- city?:string;
1744
-
1745
- /**
1746
- * @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;).
1747
-
1748
- */
1749
-
1750
- state_code?:string;
1751
-
1752
- /**
1753
- * @description State or Province
1754
-
1755
- */
1756
-
1757
- state?:string;
1758
-
1759
- /**
1760
- * @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).
1761
-
1762
- **Note** : If you enter an invalid country code, the system will return an error.
1763
-
1764
- **Brexit**
1765
-
1766
-
1767
- 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.
1768
-
1769
- */
1770
-
1771
- country?:string;
1772
-
1773
- /**
1774
- * @description Zip or postal code. The number of characters is validated according to the rules [specified here](https://i18napis.appspot.com/address).
1775
-
1776
- */
1777
-
1778
- zip?:string;
1779
-
1780
- /**
1781
- * @description The address verification status. \* valid - Address was validated successfully. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated.
1782
-
1783
- */
1784
-
1785
- validation_status?:ValidationStatus;
1786
- }
1787
- export interface SiteDetailsAtCreation {
1788
- timezone?:string;
1789
-
1790
- organization_address?:object;
1791
- }
1792
- export interface TaxOrigin {
1793
- country?:string;
1794
-
1795
- registration_number?:string;
477
+ id: string;
478
+ customer_id?: string;
479
+ subscription_id?: string;
480
+ reference_invoice_id: string;
481
+ type: 'adjustment' | 'refundable';
482
+ currency_code?: string;
483
+ create_reason_code: string;
484
+ date: number;
485
+ status?: 'adjusted' | 'refunded' | 'refund_due' | 'voided';
486
+ total?: number;
487
+ refunded_at?: number;
488
+ voided_at?: number;
489
+ sub_total?: number;
490
+ round_off_amount?: number;
491
+ fractional_correction?: number;
492
+ vat_number_prefix?: string;
493
+ line_items?: LineItemsImportCreditNoteInputParam[];
494
+ line_item_tiers?: LineItemTiersImportCreditNoteInputParam[];
495
+ discounts?: DiscountsImportCreditNoteInputParam[];
496
+ taxes?: TaxesImportCreditNoteInputParam[];
497
+ allocations?: AllocationsImportCreditNoteInputParam[];
498
+ linked_refunds?: LinkedRefundsImportCreditNoteInputParam[];
499
+ }
500
+ export interface LineItemsCreateInputParam {
501
+ reference_line_item_id?: string;
502
+ unit_amount?: number;
503
+ unit_amount_in_decimal?: string;
504
+ quantity?: number;
505
+ quantity_in_decimal?: string;
506
+ amount?: number;
507
+ date_from?: number;
508
+ date_to?: number;
509
+ description?: string;
510
+ entity_type?:
511
+ | 'adhoc'
512
+ | 'plan_item_price'
513
+ | 'addon_item_price'
514
+ | 'charge_item_price';
515
+ entity_id?: string;
516
+ }
517
+ export interface TransactionRecordRefundInputParam {
518
+ amount?: number;
519
+ payment_method: PaymentMethod;
520
+ reference_number?: string;
521
+ custom_payment_method_id?: string;
522
+ date: number;
523
+ }
524
+
525
+ export interface EinvoiceCreditNoteListInputParam {
526
+ status?: filter.Enum;
527
+ }
528
+
529
+ export interface TaxWithheldRemoveTaxWithheldRefundInputParam {
530
+ id: string;
531
+ }
532
+
533
+ export interface AllocationsImportCreditNoteInputParam {
534
+ invoice_id: string;
535
+ allocated_amount: number;
536
+ allocated_at: number;
537
+ }
538
+ export interface DiscountsImportCreditNoteInputParam {
539
+ entity_type:
540
+ | 'item_level_coupon'
541
+ | 'document_level_coupon'
542
+ | 'promotional_credits'
543
+ | 'item_level_discount'
544
+ | 'document_level_discount';
545
+ entity_id?: string;
546
+ description?: string;
547
+ amount: number;
548
+ }
549
+ export interface LinkedRefundsImportCreditNoteInputParam {
550
+ amount: number;
551
+ payment_method: PaymentMethod;
552
+ date: number;
553
+ reference_number?: string;
554
+ }
555
+ export interface TaxesImportCreditNoteInputParam {
556
+ name: string;
557
+ rate: number;
558
+ amount?: number;
559
+ description?: string;
560
+ juris_type?:
561
+ | 'country'
562
+ | 'federal'
563
+ | 'state'
564
+ | 'county'
565
+ | 'city'
566
+ | 'special'
567
+ | 'unincorporated'
568
+ | 'other';
569
+ juris_name?: string;
570
+ juris_code?: string;
571
+ }
572
+ export interface LineItemTiersImportCreditNoteInputParam {
573
+ line_item_id: string;
574
+ starting_unit?: number;
575
+ ending_unit?: number;
576
+ quantity_used?: number;
577
+ unit_amount?: number;
578
+ starting_unit_in_decimal?: string;
579
+ ending_unit_in_decimal?: string;
580
+ quantity_used_in_decimal?: string;
581
+ unit_amount_in_decimal?: string;
582
+ }
583
+ export interface LineItemsImportCreditNoteInputParam {
584
+ reference_line_item_id?: string;
585
+ id?: string;
586
+ date_from?: number;
587
+ date_to?: number;
588
+ subscription_id?: string;
589
+ description: string;
590
+ unit_amount?: number;
591
+ quantity?: number;
592
+ amount?: number;
593
+ unit_amount_in_decimal?: string;
594
+ quantity_in_decimal?: string;
595
+ amount_in_decimal?: string;
596
+ entity_type?:
597
+ | 'adhoc'
598
+ | 'plan_item_price'
599
+ | 'addon_item_price'
600
+ | 'charge_item_price';
601
+ entity_id?: string;
602
+ item_level_discount1_entity_id?: string;
603
+ item_level_discount1_amount?: number;
604
+ item_level_discount2_entity_id?: string;
605
+ item_level_discount2_amount?: number;
606
+ tax1_name?: string;
607
+ tax1_amount?: number;
608
+ tax2_name?: string;
609
+ tax2_amount?: number;
610
+ tax3_name?: string;
611
+ tax3_amount?: number;
612
+ tax4_name?: string;
613
+ tax4_amount?: number;
614
+ tax5_name?: string;
615
+ tax5_amount?: number;
616
+ tax6_name?: string;
617
+ tax6_amount?: number;
618
+ tax7_name?: string;
619
+ tax7_amount?: number;
620
+ tax8_name?: string;
621
+ tax8_amount?: number;
622
+ tax9_name?: string;
623
+ tax9_amount?: number;
624
+ tax10_name?: string;
625
+ tax10_amount?: number;
1796
626
  }
1797
627
  }
1798
- }
628
+ }