chargebee 2.47.0 → 2.49.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 +149 -0
- package/lib/chargebee.js +1 -1
- package/lib/resources/api_endpoints.js +16 -2
- package/package.json +1 -1
- package/types/core.d.ts +5 -4
- package/types/index.d.ts +6 -0
- package/types/resources/Addon.d.ts +440 -0
- package/types/resources/CreditNote.d.ts +40 -1
- package/types/resources/CreditNoteEstimate.d.ts +8 -2
- package/types/resources/DifferentialPrice.d.ts +6 -2
- package/types/resources/Estimate.d.ts +6 -4
- package/types/resources/HostedPage.d.ts +227 -893
- package/types/resources/Invoice.d.ts +44 -5
- package/types/resources/InvoiceEstimate.d.ts +40 -1
- package/types/resources/Item.d.ts +4 -0
- package/types/resources/ItemPrice.d.ts +6 -2
- package/types/resources/OmnichannelSubscription.d.ts +5 -5
- package/types/resources/OmnichannelSubscriptionItem.d.ts +42 -1
- package/types/resources/OmnichannelSubscriptionItemScheduledChange.d.ts +36 -0
- package/types/resources/OmnichannelTransaction.d.ts +4 -4
- package/types/resources/PaymentSource.d.ts +7 -0
- package/types/resources/Plan.d.ts +554 -0
- package/types/resources/Purchase.d.ts +13 -258
- package/types/resources/Quote.d.ts +18 -12
- package/types/resources/QuoteLineGroup.d.ts +12 -322
- package/types/resources/QuotedCharge.d.ts +23 -219
- package/types/resources/QuotedSubscription.d.ts +4 -0
- package/types/resources/Ramp.d.ts +48 -542
- package/types/resources/RecordedPurchase.d.ts +5 -3
- package/types/resources/Subscription.d.ts +7 -3
- package/types/resources/Transaction.d.ts +1 -1
- package/types/resources/UnbilledCharge.d.ts +31 -25
|
@@ -138,6 +138,8 @@ declare module 'chargebee' {
|
|
|
138
138
|
|
|
139
139
|
tax_origin?:Invoice.TaxOrigin;
|
|
140
140
|
|
|
141
|
+
line_item_addresses?:Invoice.LineItemAddress[];
|
|
142
|
+
|
|
141
143
|
}
|
|
142
144
|
export namespace Invoice {
|
|
143
145
|
export class InvoiceResource {
|
|
@@ -293,7 +295,7 @@ declare module 'chargebee' {
|
|
|
293
295
|
|
|
294
296
|
item_prices?:{date_from?:number,date_to?:number,item_price_id?:string,quantity?:number,quantity_in_decimal?:string,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
295
297
|
|
|
296
|
-
item_tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,item_price_id?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
|
|
298
|
+
item_tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,item_price_id?:string,package_size?:number,price?:number,price_in_decimal?:string,pricing_type?:PricingType,starting_unit?:number,starting_unit_in_decimal?:string}[];
|
|
297
299
|
|
|
298
300
|
charges?:{amount?:number,amount_in_decimal?:string,avalara_sale_type?:AvalaraSaleType,avalara_service_type?:number,avalara_tax_code?:string,avalara_transaction_type?:number,date_from?:number,date_to?:number,description?:string,hsn_code?:string,tax_profile_id?:string,taxable?:boolean,taxjar_product_code?:string}[];
|
|
299
301
|
|
|
@@ -418,7 +420,7 @@ declare module 'chargebee' {
|
|
|
418
420
|
|
|
419
421
|
item_price:{date_from?:number,date_to?:number,item_price_id:string,quantity?:number,quantity_in_decimal?:string,unit_price?:number,unit_price_in_decimal?:string};
|
|
420
422
|
|
|
421
|
-
item_tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
|
|
423
|
+
item_tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,package_size?:number,price?:number,price_in_decimal?:string,pricing_type?:PricingType,starting_unit?:number,starting_unit_in_decimal?:string}[];
|
|
422
424
|
|
|
423
425
|
customer_id?:string;
|
|
424
426
|
|
|
@@ -454,7 +456,7 @@ declare module 'chargebee' {
|
|
|
454
456
|
|
|
455
457
|
shipping_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
|
|
456
458
|
|
|
457
|
-
line_items:{amount?:number,amount_in_decimal?:string,date_from?:number,date_to?:number,description:string,entity_id?:string,entity_type?:'adhoc' | 'plan_item_price' | 'addon_item_price' | 'charge_item_price',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,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}[];
|
|
459
|
+
line_items:{amount?:number,amount_in_decimal?:string,created_at?:number,date_from?:number,date_to?:number,description:string,entity_id?:string,entity_type?:'adhoc' | 'plan_item_price' | 'addon_item_price' | 'charge_item_price',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,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}[];
|
|
458
460
|
|
|
459
461
|
payment_reference_numbers:{id?:string,number:string,type:'kid' | 'ocr' | 'frn' | 'fik' | 'swiss_reference'}[];
|
|
460
462
|
|
|
@@ -877,7 +879,7 @@ NOTE: Not to be used if *consolidated invoicing* is enabled.
|
|
|
877
879
|
|
|
878
880
|
item_price:{date_from?:number,date_to?:number,item_price_id:string,quantity?:number,quantity_in_decimal?:string,unit_price?:number,unit_price_in_decimal?:string};
|
|
879
881
|
|
|
880
|
-
item_tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
|
|
882
|
+
item_tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,package_size?:number,price?:number,price_in_decimal?:string,pricing_type?:PricingType,starting_unit?:number,starting_unit_in_decimal?:string}[];
|
|
881
883
|
|
|
882
884
|
comment?:string;
|
|
883
885
|
|
|
@@ -1092,7 +1094,9 @@ NOTE: Not to be used if *consolidated invoicing* is enabled.
|
|
|
1092
1094
|
|
|
1093
1095
|
item_level_discount_amount?:number;
|
|
1094
1096
|
|
|
1095
|
-
|
|
1097
|
+
metered?:boolean;
|
|
1098
|
+
|
|
1099
|
+
percentage?:string;
|
|
1096
1100
|
|
|
1097
1101
|
reference_line_item_id?:string;
|
|
1098
1102
|
|
|
@@ -1195,6 +1199,10 @@ NOTE: Not to be used if *consolidated invoicing* is enabled.
|
|
|
1195
1199
|
quantity_used_in_decimal?:string;
|
|
1196
1200
|
|
|
1197
1201
|
unit_amount_in_decimal?:string;
|
|
1202
|
+
|
|
1203
|
+
pricing_type?:'per_unit' | 'flat_fee' | 'package';
|
|
1204
|
+
|
|
1205
|
+
package_size?:number;
|
|
1198
1206
|
}
|
|
1199
1207
|
export interface LinkedPayment {
|
|
1200
1208
|
txn_id:string;
|
|
@@ -1373,5 +1381,36 @@ NOTE: Not to be used if *consolidated invoicing* is enabled.
|
|
|
1373
1381
|
|
|
1374
1382
|
registration_number?:string;
|
|
1375
1383
|
}
|
|
1384
|
+
export interface LineItemAddress {
|
|
1385
|
+
line_item_id?:string;
|
|
1386
|
+
|
|
1387
|
+
first_name?:string;
|
|
1388
|
+
|
|
1389
|
+
last_name?:string;
|
|
1390
|
+
|
|
1391
|
+
email?:string;
|
|
1392
|
+
|
|
1393
|
+
company?:string;
|
|
1394
|
+
|
|
1395
|
+
phone?:string;
|
|
1396
|
+
|
|
1397
|
+
line1?:string;
|
|
1398
|
+
|
|
1399
|
+
line2?:string;
|
|
1400
|
+
|
|
1401
|
+
line3?:string;
|
|
1402
|
+
|
|
1403
|
+
city?:string;
|
|
1404
|
+
|
|
1405
|
+
state_code?:string;
|
|
1406
|
+
|
|
1407
|
+
state?:string;
|
|
1408
|
+
|
|
1409
|
+
country?:string;
|
|
1410
|
+
|
|
1411
|
+
zip?:string;
|
|
1412
|
+
|
|
1413
|
+
validation_status?:'not_validated' | 'valid' | 'partially_valid' | 'invalid';
|
|
1414
|
+
}
|
|
1376
1415
|
}
|
|
1377
1416
|
}
|
|
@@ -38,6 +38,8 @@ declare module 'chargebee' {
|
|
|
38
38
|
|
|
39
39
|
customer_id?:string;
|
|
40
40
|
|
|
41
|
+
line_item_addresses?:InvoiceEstimate.LineItemAddress[];
|
|
42
|
+
|
|
41
43
|
}
|
|
42
44
|
export namespace InvoiceEstimate {
|
|
43
45
|
|
|
@@ -75,7 +77,9 @@ declare module 'chargebee' {
|
|
|
75
77
|
|
|
76
78
|
item_level_discount_amount?:number;
|
|
77
79
|
|
|
78
|
-
|
|
80
|
+
metered?:boolean;
|
|
81
|
+
|
|
82
|
+
percentage?:string;
|
|
79
83
|
|
|
80
84
|
reference_line_item_id?:string;
|
|
81
85
|
|
|
@@ -160,6 +164,10 @@ declare module 'chargebee' {
|
|
|
160
164
|
quantity_used_in_decimal?:string;
|
|
161
165
|
|
|
162
166
|
unit_amount_in_decimal?:string;
|
|
167
|
+
|
|
168
|
+
pricing_type?:'per_unit' | 'flat_fee' | 'package';
|
|
169
|
+
|
|
170
|
+
package_size?:number;
|
|
163
171
|
}
|
|
164
172
|
export interface LineItemCredit {
|
|
165
173
|
cn_id:string;
|
|
@@ -179,5 +187,36 @@ declare module 'chargebee' {
|
|
|
179
187
|
|
|
180
188
|
discount_amount:number;
|
|
181
189
|
}
|
|
190
|
+
export interface LineItemAddress {
|
|
191
|
+
line_item_id?:string;
|
|
192
|
+
|
|
193
|
+
first_name?:string;
|
|
194
|
+
|
|
195
|
+
last_name?:string;
|
|
196
|
+
|
|
197
|
+
email?:string;
|
|
198
|
+
|
|
199
|
+
company?:string;
|
|
200
|
+
|
|
201
|
+
phone?:string;
|
|
202
|
+
|
|
203
|
+
line1?:string;
|
|
204
|
+
|
|
205
|
+
line2?:string;
|
|
206
|
+
|
|
207
|
+
line3?:string;
|
|
208
|
+
|
|
209
|
+
city?:string;
|
|
210
|
+
|
|
211
|
+
state_code?:string;
|
|
212
|
+
|
|
213
|
+
state?:string;
|
|
214
|
+
|
|
215
|
+
country?:string;
|
|
216
|
+
|
|
217
|
+
zip?:string;
|
|
218
|
+
|
|
219
|
+
validation_status?:'not_validated' | 'valid' | 'partially_valid' | 'invalid';
|
|
220
|
+
}
|
|
182
221
|
}
|
|
183
222
|
}
|
|
@@ -44,6 +44,8 @@ declare module 'chargebee' {
|
|
|
44
44
|
|
|
45
45
|
usage_calculation?:'sum_of_usages' | 'last_usage' | 'max_usage';
|
|
46
46
|
|
|
47
|
+
is_percentage_pricing:boolean;
|
|
48
|
+
|
|
47
49
|
archived_at?:number;
|
|
48
50
|
|
|
49
51
|
channel?:Channel;
|
|
@@ -121,6 +123,8 @@ declare module 'chargebee' {
|
|
|
121
123
|
metadata?:object;
|
|
122
124
|
|
|
123
125
|
business_entity_id?:string;
|
|
126
|
+
|
|
127
|
+
is_percentage_pricing?:boolean;
|
|
124
128
|
}
|
|
125
129
|
export interface RetrieveResponse {
|
|
126
130
|
item:Item;
|
|
@@ -116,7 +116,7 @@ declare module 'chargebee' {
|
|
|
116
116
|
|
|
117
117
|
accounting_detail?:{accounting_category1?:string,accounting_category2?:string,accounting_category3?:string,accounting_category4?:string,accounting_code?:string,sku?:string};
|
|
118
118
|
|
|
119
|
-
tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
|
|
119
|
+
tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,package_size?:number,price?:number,price_in_decimal?:string,pricing_type?:PricingType,starting_unit?:number,starting_unit_in_decimal?:string}[];
|
|
120
120
|
|
|
121
121
|
tax_providers_fields:{field_id:string,field_value:string,provider_name:string}[];
|
|
122
122
|
|
|
@@ -189,7 +189,7 @@ declare module 'chargebee' {
|
|
|
189
189
|
|
|
190
190
|
accounting_detail?:{accounting_category1?:string,accounting_category2?:string,accounting_category3?:string,accounting_category4?:string,accounting_code?:string,sku?:string};
|
|
191
191
|
|
|
192
|
-
tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
|
|
192
|
+
tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,package_size?:number,price?:number,price_in_decimal?:string,pricing_type?:PricingType,starting_unit?:number,starting_unit_in_decimal?:string}[];
|
|
193
193
|
|
|
194
194
|
tax_providers_fields:{field_id:string,field_value:string,provider_name:string}[];
|
|
195
195
|
|
|
@@ -450,6 +450,10 @@ The ID of the business entity created for the site. For Product Catalog 1.0, all
|
|
|
450
450
|
ending_unit_in_decimal?:string;
|
|
451
451
|
|
|
452
452
|
price_in_decimal?:string;
|
|
453
|
+
|
|
454
|
+
pricing_type?:'per_unit' | 'flat_fee' | 'package';
|
|
455
|
+
|
|
456
|
+
package_size?:number;
|
|
453
457
|
}
|
|
454
458
|
export interface TaxDetail {
|
|
455
459
|
tax_profile_id?:string;
|
|
@@ -10,7 +10,7 @@ declare module 'chargebee' {
|
|
|
10
10
|
|
|
11
11
|
app_id:string;
|
|
12
12
|
|
|
13
|
-
source:'apple_app_store';
|
|
13
|
+
source:'apple_app_store' | 'google_play_store';
|
|
14
14
|
|
|
15
15
|
customer_id?:string;
|
|
16
16
|
|
|
@@ -91,15 +91,15 @@ declare module 'chargebee' {
|
|
|
91
91
|
|
|
92
92
|
app_id:string;
|
|
93
93
|
|
|
94
|
-
price_currency
|
|
94
|
+
price_currency?:string;
|
|
95
95
|
|
|
96
|
-
price_units
|
|
96
|
+
price_units?:number;
|
|
97
97
|
|
|
98
|
-
price_nanos
|
|
98
|
+
price_nanos?:number;
|
|
99
99
|
|
|
100
100
|
type:'purchase' | 'renewal';
|
|
101
101
|
|
|
102
|
-
transacted_at
|
|
102
|
+
transacted_at?:number;
|
|
103
103
|
|
|
104
104
|
created_at:number;
|
|
105
105
|
|
|
@@ -8,8 +8,12 @@ declare module 'chargebee' {
|
|
|
8
8
|
|
|
9
9
|
item_id_at_source:string;
|
|
10
10
|
|
|
11
|
+
item_parent_id_at_source?:string;
|
|
12
|
+
|
|
11
13
|
status:'active' | 'expired' | 'cancelled' | 'in_dunning' | 'in_grace_period';
|
|
12
14
|
|
|
15
|
+
auto_renew_status?:'off' | 'on';
|
|
16
|
+
|
|
13
17
|
current_term_start?:number;
|
|
14
18
|
|
|
15
19
|
current_term_end?:number;
|
|
@@ -20,11 +24,48 @@ declare module 'chargebee' {
|
|
|
20
24
|
|
|
21
25
|
cancelled_at?:number;
|
|
22
26
|
|
|
23
|
-
cancellation_reason?:'customer_cancelled' | 'customer_did_not_consent_to_price_increase';
|
|
27
|
+
cancellation_reason?:'customer_cancelled' | 'customer_did_not_consent_to_price_increase' | 'refunded_due_to_app_issue' | 'refunded_for_other_reason';
|
|
24
28
|
|
|
25
29
|
grace_period_expires_at?:number;
|
|
26
30
|
|
|
31
|
+
has_scheduled_changes:boolean;
|
|
32
|
+
|
|
27
33
|
resource_version?:number;
|
|
28
34
|
|
|
35
|
+
upcoming_renewal?:OmnichannelSubscriptionItem.UpcomingRenewal;
|
|
36
|
+
|
|
37
|
+
}
|
|
38
|
+
export namespace OmnichannelSubscriptionItem {
|
|
39
|
+
export class OmnichannelSubscriptionItemResource {
|
|
40
|
+
list_omni_sub_item_schedule_changes(omnichannel_subscription_item_id:string, input?:ListOmniSubItemScheduleChangesInputParam):ChargebeeRequest<ListOmniSubItemScheduleChangesResponse>;
|
|
41
|
+
}
|
|
42
|
+
export interface ListOmniSubItemScheduleChangesResponse {
|
|
43
|
+
list:{omnichannel_subscription_item_scheduled_change:OmnichannelSubscriptionItemScheduledChange}[];
|
|
44
|
+
|
|
45
|
+
next_offset?:string;
|
|
46
|
+
}
|
|
47
|
+
export interface ListOmniSubItemScheduleChangesInputParam {
|
|
48
|
+
[key : string]: any;
|
|
49
|
+
/**
|
|
50
|
+
* @description The number of resources to be returned.
|
|
51
|
+
|
|
52
|
+
*/
|
|
53
|
+
|
|
54
|
+
limit?:number;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set \`offset\` to the value of \`next_offset\` obtained in the previous iteration of the API call.
|
|
58
|
+
|
|
59
|
+
*/
|
|
60
|
+
|
|
61
|
+
offset?:string;
|
|
62
|
+
}
|
|
63
|
+
export interface UpcomingRenewal {
|
|
64
|
+
price_currency?:string;
|
|
65
|
+
|
|
66
|
+
price_units?:number;
|
|
67
|
+
|
|
68
|
+
price_nanos?:number;
|
|
69
|
+
}
|
|
29
70
|
}
|
|
30
71
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
declare module 'chargebee' {
|
|
4
|
+
export interface OmnichannelSubscriptionItemScheduledChange {
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
id?:string;
|
|
8
|
+
|
|
9
|
+
omnichannel_subscription_item_id?:string;
|
|
10
|
+
|
|
11
|
+
scheduled_at:number;
|
|
12
|
+
|
|
13
|
+
change_type:'downgrade';
|
|
14
|
+
|
|
15
|
+
created_at:number;
|
|
16
|
+
|
|
17
|
+
modified_at:number;
|
|
18
|
+
|
|
19
|
+
resource_version?:number;
|
|
20
|
+
|
|
21
|
+
current_state?:OmnichannelSubscriptionItemScheduledChange.CurrentState;
|
|
22
|
+
|
|
23
|
+
scheduled_state?:OmnichannelSubscriptionItemScheduledChange.ScheduledState;
|
|
24
|
+
|
|
25
|
+
}
|
|
26
|
+
export namespace OmnichannelSubscriptionItemScheduledChange {
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
export interface CurrentState {
|
|
30
|
+
item_id_at_source?:string;
|
|
31
|
+
}
|
|
32
|
+
export interface ScheduledState {
|
|
33
|
+
item_id_at_source?:string;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -10,15 +10,15 @@ declare module 'chargebee' {
|
|
|
10
10
|
|
|
11
11
|
app_id:string;
|
|
12
12
|
|
|
13
|
-
price_currency
|
|
13
|
+
price_currency?:string;
|
|
14
14
|
|
|
15
|
-
price_units
|
|
15
|
+
price_units?:number;
|
|
16
16
|
|
|
17
|
-
price_nanos
|
|
17
|
+
price_nanos?:number;
|
|
18
18
|
|
|
19
19
|
type:'purchase' | 'renewal';
|
|
20
20
|
|
|
21
|
-
transacted_at
|
|
21
|
+
transacted_at?:number;
|
|
22
22
|
|
|
23
23
|
created_at:number;
|
|
24
24
|
|
|
@@ -266,6 +266,13 @@ declare module 'chargebee' {
|
|
|
266
266
|
|
|
267
267
|
subscription_id?:string;
|
|
268
268
|
|
|
269
|
+
/**
|
|
270
|
+
* @description Indicates whether to include deleted objects in the list. The deleted objects have the attribute \`deleted\` as \`true\`.
|
|
271
|
+
|
|
272
|
+
*/
|
|
273
|
+
|
|
274
|
+
include_deleted?:boolean;
|
|
275
|
+
|
|
269
276
|
customer_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
270
277
|
|
|
271
278
|
/**
|