chargebee 2.30.0 → 2.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +54 -0
- package/LICENSE +1 -1
- package/lib/chargebee.js +1 -1
- package/lib/resources/api_endpoints.js +16 -0
- package/package.json +1 -1
- package/types/core.d.ts +7 -6
- package/types/index.d.ts +2 -0
- package/types/resources/Card.d.ts +2 -2
- package/types/resources/CreditNote.d.ts +23 -2
- package/types/resources/CreditNoteEstimate.d.ts +2 -2
- package/types/resources/Customer.d.ts +98 -74
- package/types/resources/Entitlement.d.ts +78 -0
- package/types/resources/Event.d.ts +1 -1
- package/types/resources/Export.d.ts +7 -7
- package/types/resources/Feature.d.ts +89 -17
- package/types/resources/Hierarchy.d.ts +5 -5
- package/types/resources/HostedPage.d.ts +7 -0
- package/types/resources/Invoice.d.ts +99 -49
- package/types/resources/InvoiceEstimate.d.ts +26 -20
- package/types/resources/ItemPrice.d.ts +21 -0
- package/types/resources/Order.d.ts +85 -4
- package/types/resources/PaymentSource.d.ts +380 -246
- package/types/resources/Quote.d.ts +46 -25
- package/types/resources/QuoteLineGroup.d.ts +23 -17
- package/types/resources/Subscription.d.ts +29 -17
- package/types/resources/SubscriptionEntitlement.d.ts +1 -1
- package/types/resources/SubscriptionEstimate.d.ts +12 -12
- package/types/resources/ThirdPartyPaymentMethod.d.ts +1 -1
- package/types/resources/Transaction.d.ts +35 -3
- package/types/resources/VirtualBankAccount.d.ts +4 -4
|
@@ -42,11 +42,11 @@ declare module 'chargebee' {
|
|
|
42
42
|
|
|
43
43
|
subscription_id?:string;
|
|
44
44
|
|
|
45
|
-
date_from
|
|
45
|
+
date_from:number;
|
|
46
46
|
|
|
47
|
-
date_to
|
|
47
|
+
date_to:number;
|
|
48
48
|
|
|
49
|
-
unit_amount
|
|
49
|
+
unit_amount:number;
|
|
50
50
|
|
|
51
51
|
quantity?:number;
|
|
52
52
|
|
|
@@ -54,7 +54,7 @@ declare module 'chargebee' {
|
|
|
54
54
|
|
|
55
55
|
pricing_model?:'volume' | 'per_unit' | 'tiered' | 'flat_fee' | 'stairstep';
|
|
56
56
|
|
|
57
|
-
is_taxed
|
|
57
|
+
is_taxed:boolean;
|
|
58
58
|
|
|
59
59
|
tax_amount?:number;
|
|
60
60
|
|
|
@@ -72,11 +72,11 @@ declare module 'chargebee' {
|
|
|
72
72
|
|
|
73
73
|
reference_line_item_id?:string;
|
|
74
74
|
|
|
75
|
-
description
|
|
75
|
+
description:string;
|
|
76
76
|
|
|
77
77
|
entity_description?:string;
|
|
78
78
|
|
|
79
|
-
entity_type
|
|
79
|
+
entity_type:'addon_item_price' | 'plan_item_price' | 'charge_item_price' | 'adhoc';
|
|
80
80
|
|
|
81
81
|
tax_exempt_reason?:'high_value_physical_goods' | 'tax_not_configured' | 'reverse_charge' | 'zero_rated' | 'customer_exempt' | 'region_non_taxable' | 'zero_value_item' | 'export' | 'product_exempt';
|
|
82
82
|
|
|
@@ -85,13 +85,13 @@ declare module 'chargebee' {
|
|
|
85
85
|
customer_id?:string;
|
|
86
86
|
}
|
|
87
87
|
export interface Discount {
|
|
88
|
-
amount
|
|
88
|
+
amount:number;
|
|
89
89
|
|
|
90
90
|
description?:string;
|
|
91
91
|
|
|
92
92
|
line_item_id?:string;
|
|
93
93
|
|
|
94
|
-
entity_type
|
|
94
|
+
entity_type:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'prorated_credits' | 'document_level_discount' | 'document_level_coupon';
|
|
95
95
|
|
|
96
96
|
discount_type?:'fixed_amount' | 'percentage';
|
|
97
97
|
|
|
@@ -100,26 +100,32 @@ declare module 'chargebee' {
|
|
|
100
100
|
coupon_set_code?:string;
|
|
101
101
|
}
|
|
102
102
|
export interface Tax {
|
|
103
|
-
name
|
|
103
|
+
name:string;
|
|
104
104
|
|
|
105
|
-
amount
|
|
105
|
+
amount:number;
|
|
106
106
|
|
|
107
107
|
description?:string;
|
|
108
108
|
}
|
|
109
109
|
export interface LineItemTax {
|
|
110
110
|
line_item_id?:string;
|
|
111
111
|
|
|
112
|
-
tax_name
|
|
112
|
+
tax_name:string;
|
|
113
113
|
|
|
114
|
-
tax_rate
|
|
114
|
+
tax_rate:number;
|
|
115
|
+
|
|
116
|
+
date_to?:number;
|
|
117
|
+
|
|
118
|
+
date_from?:number;
|
|
119
|
+
|
|
120
|
+
prorated_taxable_amount?:number;
|
|
115
121
|
|
|
116
122
|
is_partial_tax_applied?:boolean;
|
|
117
123
|
|
|
118
124
|
is_non_compliance_tax?:boolean;
|
|
119
125
|
|
|
120
|
-
taxable_amount
|
|
126
|
+
taxable_amount:number;
|
|
121
127
|
|
|
122
|
-
tax_amount
|
|
128
|
+
tax_amount:number;
|
|
123
129
|
|
|
124
130
|
tax_juris_type?:'special' | 'country' | 'unincorporated' | 'other' | 'city' | 'federal' | 'county' | 'state';
|
|
125
131
|
|
|
@@ -134,13 +140,13 @@ declare module 'chargebee' {
|
|
|
134
140
|
export interface LineItemTier {
|
|
135
141
|
line_item_id?:string;
|
|
136
142
|
|
|
137
|
-
starting_unit
|
|
143
|
+
starting_unit:number;
|
|
138
144
|
|
|
139
145
|
ending_unit?:number;
|
|
140
146
|
|
|
141
|
-
quantity_used
|
|
147
|
+
quantity_used:number;
|
|
142
148
|
|
|
143
|
-
unit_amount
|
|
149
|
+
unit_amount:number;
|
|
144
150
|
|
|
145
151
|
starting_unit_in_decimal?:string;
|
|
146
152
|
|
|
@@ -151,15 +157,15 @@ declare module 'chargebee' {
|
|
|
151
157
|
unit_amount_in_decimal?:string;
|
|
152
158
|
}
|
|
153
159
|
export interface LineItemDiscount {
|
|
154
|
-
line_item_id
|
|
160
|
+
line_item_id:string;
|
|
155
161
|
|
|
156
|
-
discount_type
|
|
162
|
+
discount_type:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'prorated_credits' | 'document_level_discount' | 'document_level_coupon';
|
|
157
163
|
|
|
158
164
|
coupon_id?:string;
|
|
159
165
|
|
|
160
166
|
entity_id?:string;
|
|
161
167
|
|
|
162
|
-
discount_amount
|
|
168
|
+
discount_amount:number;
|
|
163
169
|
}
|
|
164
170
|
}
|
|
165
171
|
}
|
|
@@ -60,6 +60,13 @@ If your input contains characters that are subjected to sanitization (like incom
|
|
|
60
60
|
|
|
61
61
|
external_name?:string;
|
|
62
62
|
|
|
63
|
+
/**
|
|
64
|
+
* @description null
|
|
65
|
+
|
|
66
|
+
*/
|
|
67
|
+
|
|
68
|
+
proration_type?:'partial_term' | 'full_term' | 'site_default';
|
|
69
|
+
|
|
63
70
|
/**
|
|
64
71
|
* @description The [pricing scheme](https://www.chargebee.com/docs/2.0/plans.html#pricing-models) for this item price. If subscriptions, invoices or [differential prices](./differential_prices?prod_cat_ver=2) exist for this item price, `pricing_model` cannot be changed.
|
|
65
72
|
\* tiered - The per unit price is based on the tier that the total quantity falls in.
|
|
@@ -373,6 +380,13 @@ If your input contains characters that are subjected to sanitization (like incom
|
|
|
373
380
|
|
|
374
381
|
invoice_notes?:string;
|
|
375
382
|
|
|
383
|
+
/**
|
|
384
|
+
* @description null
|
|
385
|
+
|
|
386
|
+
*/
|
|
387
|
+
|
|
388
|
+
proration_type?:'partial_term' | 'full_term' | 'site_default';
|
|
389
|
+
|
|
376
390
|
/**
|
|
377
391
|
* @description The name of the item price used in customer-facing pages and documents. These include [invoices](./invoices?prod_cat_ver=2) and [hosted pages](hosted_pages?prod_cat_ver=2). If not provided, then `name` is used.
|
|
378
392
|
|
|
@@ -569,6 +583,13 @@ If your input contains characters that are subjected to sanitization (like incom
|
|
|
569
583
|
|
|
570
584
|
description?:string;
|
|
571
585
|
|
|
586
|
+
/**
|
|
587
|
+
* @description null
|
|
588
|
+
|
|
589
|
+
*/
|
|
590
|
+
|
|
591
|
+
proration_type?:'partial_term' | 'full_term' | 'site_default';
|
|
592
|
+
|
|
572
593
|
/**
|
|
573
594
|
* @description The status of the item price. \* archived - The item price is no longer active and cannot be used in new subscriptions or added to existing ones. Existing subscriptions that already have this item price will continue to renew with the item price. \* active - The item price can be used in subscriptions. \* deleted - Indicates that the item price has been deleted. The `id` and `name` can be reused.
|
|
574
595
|
|
|
@@ -1381,28 +1381,109 @@ If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021
|
|
|
1381
1381
|
validation_status?:ValidationStatus;
|
|
1382
1382
|
}
|
|
1383
1383
|
export interface LineItemTax {
|
|
1384
|
+
/**
|
|
1385
|
+
* @description The unique reference id of the line item for which the tax is applicable
|
|
1386
|
+
|
|
1387
|
+
*/
|
|
1388
|
+
|
|
1384
1389
|
line_item_id?:string;
|
|
1385
1390
|
|
|
1386
|
-
|
|
1391
|
+
/**
|
|
1392
|
+
* @description The name of the tax applied
|
|
1393
|
+
|
|
1394
|
+
*/
|
|
1395
|
+
|
|
1396
|
+
tax_name:string;
|
|
1397
|
+
|
|
1398
|
+
/**
|
|
1399
|
+
* @description The rate of tax used to calculate tax amount
|
|
1400
|
+
|
|
1401
|
+
*/
|
|
1402
|
+
|
|
1403
|
+
tax_rate:number;
|
|
1404
|
+
|
|
1405
|
+
/**
|
|
1406
|
+
* @description Indicates the service period end of the tax rate for the line item.
|
|
1407
|
+
|
|
1408
|
+
*/
|
|
1409
|
+
|
|
1410
|
+
date_to?:number;
|
|
1411
|
+
|
|
1412
|
+
/**
|
|
1413
|
+
* @description Indicates the service period start of the tax rate for the line item.
|
|
1414
|
+
|
|
1415
|
+
*/
|
|
1416
|
+
|
|
1417
|
+
date_from?:number;
|
|
1418
|
+
|
|
1419
|
+
/**
|
|
1420
|
+
* @description Indicates the prorated line item amount in cents.
|
|
1421
|
+
|
|
1422
|
+
*/
|
|
1423
|
+
|
|
1424
|
+
prorated_taxable_amount?:number;
|
|
1387
1425
|
|
|
1388
|
-
|
|
1426
|
+
/**
|
|
1427
|
+
* @description Indicates if tax is applied only on a portion of the line item amount.
|
|
1428
|
+
|
|
1429
|
+
*/
|
|
1389
1430
|
|
|
1390
1431
|
is_partial_tax_applied?:boolean;
|
|
1391
1432
|
|
|
1433
|
+
/**
|
|
1434
|
+
* @description Indicates the non-compliance tax that should not be reported to the jurisdiction.
|
|
1435
|
+
|
|
1436
|
+
*/
|
|
1437
|
+
|
|
1392
1438
|
is_non_compliance_tax?:boolean;
|
|
1393
1439
|
|
|
1394
|
-
|
|
1440
|
+
/**
|
|
1441
|
+
* @description Indicates the actual portion of the line item amount that is taxable.
|
|
1442
|
+
|
|
1443
|
+
*/
|
|
1444
|
+
|
|
1445
|
+
taxable_amount:number;
|
|
1395
1446
|
|
|
1396
|
-
|
|
1447
|
+
/**
|
|
1448
|
+
* @description The tax amount
|
|
1449
|
+
|
|
1450
|
+
*/
|
|
1451
|
+
|
|
1452
|
+
tax_amount:number;
|
|
1453
|
+
|
|
1454
|
+
/**
|
|
1455
|
+
* @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.
|
|
1456
|
+
|
|
1457
|
+
*/
|
|
1397
1458
|
|
|
1398
1459
|
tax_juris_type?:'special' | 'country' | 'unincorporated' | 'other' | 'city' | 'federal' | 'county' | 'state';
|
|
1399
1460
|
|
|
1461
|
+
/**
|
|
1462
|
+
* @description The name of the tax jurisdiction
|
|
1463
|
+
|
|
1464
|
+
*/
|
|
1465
|
+
|
|
1400
1466
|
tax_juris_name?:string;
|
|
1401
1467
|
|
|
1468
|
+
/**
|
|
1469
|
+
* @description The tax jurisdiction code
|
|
1470
|
+
|
|
1471
|
+
*/
|
|
1472
|
+
|
|
1402
1473
|
tax_juris_code?:string;
|
|
1403
1474
|
|
|
1475
|
+
/**
|
|
1476
|
+
* @description Total tax amount in the currency of the place of supply. This is applicable only for Invoice and Credit Notes API.
|
|
1477
|
+
|
|
1478
|
+
*/
|
|
1479
|
+
|
|
1404
1480
|
tax_amount_in_local_currency?:number;
|
|
1405
1481
|
|
|
1482
|
+
/**
|
|
1483
|
+
* @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.
|
|
1484
|
+
|
|
1485
|
+
*/
|
|
1486
|
+
|
|
1406
1487
|
local_currency_code?:string;
|
|
1407
1488
|
}
|
|
1408
1489
|
export interface LineItemDiscount {
|