chargebee 2.32.0 → 2.33.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 +22 -0
- package/lib/chargebee.js +1 -1
- package/lib/resources/api_endpoints.js +20 -15
- package/package.json +1 -1
- package/types/core.d.ts +1 -1
- package/types/index.d.ts +1 -0
- package/types/resources/CreditNote.d.ts +9 -9
- package/types/resources/CreditNoteEstimate.d.ts +27 -19
- package/types/resources/Entitlement.d.ts +102 -5
- package/types/resources/Estimate.d.ts +25 -15
- package/types/resources/Event.d.ts +2 -0
- package/types/resources/GatewayErrorDetail.d.ts +76 -0
- package/types/resources/ImpactedSubscription.d.ts +7 -7
- package/types/resources/Invoice.d.ts +2 -2
- package/types/resources/InvoiceEstimate.d.ts +3 -1
- package/types/resources/ItemEntitlement.d.ts +50 -12
- package/types/resources/ItemPrice.d.ts +21 -3
- package/types/resources/PaymentIntent.d.ts +13 -5
- package/types/resources/PaymentVoucher.d.ts +3 -3
- package/types/resources/PortalSession.d.ts +5 -5
- package/types/resources/Purchase.d.ts +7 -7
- package/types/resources/Quote.d.ts +1 -1
- package/types/resources/QuoteLineGroup.d.ts +1 -1
- package/types/resources/QuotedCharge.d.ts +12 -12
- package/types/resources/QuotedSubscription.d.ts +27 -20
- package/types/resources/Subscription.d.ts +7 -0
- package/types/resources/Transaction.d.ts +80 -2
- package/types/resources/Usage.d.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
### v2.33.0 (2024-02-29)
|
|
2
|
+
* * *
|
|
3
|
+
|
|
4
|
+
#### New attributes:
|
|
5
|
+
* usage_percentage has been added to QuoteLineGroup resource.
|
|
6
|
+
* usage_percentage has been added to Quote resource.
|
|
7
|
+
* usage_percentage has been added to CreditNoteEstimate resource.
|
|
8
|
+
* usage_percentage has been added to CreditNote resource.
|
|
9
|
+
* usage_percentage has been added to InvoiceEstimate resource.
|
|
10
|
+
* usage_percentage has been added to Invoice resource.
|
|
11
|
+
* error_detail of type GatewayErrorDetail has been added to PaymentIntent#PaymentAttempt subResource.
|
|
12
|
+
* origin_user has been added to Event resource.
|
|
13
|
+
* proration_type has been added to QuotedSubscription#SubscriptionItem and Subscription#SubscriptionItem subResources
|
|
14
|
+
* network_error_message, recommendation_message, processor_error_code, processor_error_message has been added to Transaction#GatewayErrorDetail subResource.
|
|
15
|
+
|
|
16
|
+
#### New Enum values:
|
|
17
|
+
* TAX_NOT_CONFIGURED_EXTERNAL_PROVIDER has been added to TaxExemptReasonEnum.
|
|
18
|
+
|
|
19
|
+
#### New Input parameters:
|
|
20
|
+
* billing_address has been added to Estimate#CreateSubItemForCustomerEstimateRequest.
|
|
21
|
+
* transactions[amount] has been added to Invoice#ApplyPaymentsRequest.
|
|
22
|
+
|
|
1
23
|
### v2.32.0 (2024-01-31)
|
|
2
24
|
* * *
|
|
3
25
|
|
package/lib/chargebee.js
CHANGED
|
@@ -2092,20 +2092,24 @@ var _endpoints = {
|
|
|
2092
2092
|
true
|
|
2093
2093
|
]
|
|
2094
2094
|
],
|
|
2095
|
-
"site_migration_detail": [
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2095
|
+
"site_migration_detail": [
|
|
2096
|
+
[
|
|
2097
|
+
"list",
|
|
2098
|
+
"GET",
|
|
2099
|
+
"/site_migration_details",
|
|
2100
|
+
null,
|
|
2101
|
+
false
|
|
2102
|
+
]
|
|
2103
|
+
],
|
|
2104
|
+
"resource_migration": [
|
|
2105
|
+
[
|
|
2106
|
+
"retrieve_latest",
|
|
2107
|
+
"GET",
|
|
2108
|
+
"/resource_migrations",
|
|
2109
|
+
"/retrieve_latest",
|
|
2110
|
+
false
|
|
2111
|
+
]
|
|
2112
|
+
],
|
|
2109
2113
|
"time_machine": [
|
|
2110
2114
|
[
|
|
2111
2115
|
"retrieve",
|
|
@@ -2273,6 +2277,7 @@ var _endpoints = {
|
|
|
2273
2277
|
true
|
|
2274
2278
|
]
|
|
2275
2279
|
],
|
|
2280
|
+
"gateway_error_detail": [],
|
|
2276
2281
|
"item_family": [
|
|
2277
2282
|
[
|
|
2278
2283
|
"create",
|
|
@@ -2685,6 +2690,6 @@ var _endpoints = {
|
|
|
2685
2690
|
"/payment_vouchers",
|
|
2686
2691
|
true
|
|
2687
2692
|
]
|
|
2688
|
-
]
|
|
2693
|
+
]
|
|
2689
2694
|
};
|
|
2690
2695
|
module.exports = _endpoints;
|
package/package.json
CHANGED
package/types/core.d.ts
CHANGED
|
@@ -73,7 +73,7 @@ declare module 'chargebee' {
|
|
|
73
73
|
type Role = 'backup' | 'none' | 'primary'
|
|
74
74
|
type ScheduleType = 'immediate' | 'specific_dates' | 'fixed_intervals'
|
|
75
75
|
type Source = 'admin_console' | 'system' | 'scheduled_job' | 'js_api' | 'bulk_operation' | 'hosted_page' | 'migration' | 'api' | 'none' | 'portal' | 'external_service'
|
|
76
|
-
type TaxExemptReason = 'high_value_physical_goods' | 'tax_not_configured' | 'reverse_charge' | 'zero_rated' | 'customer_exempt' | 'region_non_taxable' | 'zero_value_item' | 'export' | 'product_exempt'
|
|
76
|
+
type TaxExemptReason = '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'
|
|
77
77
|
type TaxJurisType = 'special' | 'country' | 'unincorporated' | 'other' | 'city' | 'federal' | 'county' | 'state'
|
|
78
78
|
type TaxOverrideReason = 'id_exempt' | 'customer_exempt' | 'export'
|
|
79
79
|
type Taxability = 'taxable' | 'exempt'
|
package/types/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
///<reference path='./resources/Event.d.ts' />
|
|
21
21
|
///<reference path='./resources/Export.d.ts' />
|
|
22
22
|
///<reference path='./resources/Feature.d.ts' />
|
|
23
|
+
///<reference path='./resources/GatewayErrorDetail.d.ts' />
|
|
23
24
|
///<reference path='./resources/Gift.d.ts' />
|
|
24
25
|
///<reference path='./resources/Hierarchy.d.ts' />
|
|
25
26
|
///<reference path='./resources/HostedPage.d.ts' />
|
|
@@ -511,7 +511,7 @@ This endpoint schedules e-invoices manually. This operation is not allowed when
|
|
|
511
511
|
|
|
512
512
|
*/
|
|
513
513
|
|
|
514
|
-
line_items
|
|
514
|
+
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}[];
|
|
515
515
|
}
|
|
516
516
|
export interface RetrieveResponse {
|
|
517
517
|
credit_note:CreditNote;
|
|
@@ -794,7 +794,7 @@ This endpoint schedules e-invoices manually. This operation is not allowed when
|
|
|
794
794
|
|
|
795
795
|
*/
|
|
796
796
|
|
|
797
|
-
tax_withheld
|
|
797
|
+
tax_withheld:{id:string};
|
|
798
798
|
}
|
|
799
799
|
export interface ResendEinvoiceResponse {
|
|
800
800
|
credit_note:CreditNote;
|
|
@@ -931,42 +931,42 @@ Ireland** . The first two characters of the VAT number in such a case is `X
|
|
|
931
931
|
|
|
932
932
|
*/
|
|
933
933
|
|
|
934
|
-
line_items
|
|
934
|
+
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}[];
|
|
935
935
|
|
|
936
936
|
/**
|
|
937
937
|
* @description Parameters for line_item_tiers
|
|
938
938
|
|
|
939
939
|
*/
|
|
940
940
|
|
|
941
|
-
line_item_tiers
|
|
941
|
+
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}[];
|
|
942
942
|
|
|
943
943
|
/**
|
|
944
944
|
* @description Parameters for discounts
|
|
945
945
|
|
|
946
946
|
*/
|
|
947
947
|
|
|
948
|
-
discounts
|
|
948
|
+
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}[];
|
|
949
949
|
|
|
950
950
|
/**
|
|
951
951
|
* @description Parameters for taxes
|
|
952
952
|
|
|
953
953
|
*/
|
|
954
954
|
|
|
955
|
-
taxes
|
|
955
|
+
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}[];
|
|
956
956
|
|
|
957
957
|
/**
|
|
958
958
|
* @description Parameters for allocations
|
|
959
959
|
|
|
960
960
|
*/
|
|
961
961
|
|
|
962
|
-
allocations
|
|
962
|
+
allocations:{allocated_amount:number,allocated_at:number,invoice_id:string}[];
|
|
963
963
|
|
|
964
964
|
/**
|
|
965
965
|
* @description Parameters for linked_refunds
|
|
966
966
|
|
|
967
967
|
*/
|
|
968
968
|
|
|
969
|
-
linked_refunds
|
|
969
|
+
linked_refunds:{amount:number,date:number,payment_method:PaymentMethod,reference_number?:string}[];
|
|
970
970
|
}
|
|
971
971
|
export interface Einvoice {
|
|
972
972
|
/**
|
|
@@ -1146,7 +1146,7 @@ Ireland** . The first two characters of the VAT number in such a case is `X
|
|
|
1146
1146
|
|
|
1147
1147
|
*/
|
|
1148
1148
|
|
|
1149
|
-
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';
|
|
1149
|
+
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';
|
|
1150
1150
|
|
|
1151
1151
|
/**
|
|
1152
1152
|
* @description The identifier of the modelled entity this line item is based on. Will be null for 'adhoc' entity type
|
|
@@ -46,7 +46,7 @@ declare module 'chargebee' {
|
|
|
46
46
|
|
|
47
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
|
|
|
@@ -69,29 +69,31 @@ declare module 'chargebee' {
|
|
|
69
69
|
discount_amount?:number;
|
|
70
70
|
|
|
71
71
|
item_level_discount_amount?:number;
|
|
72
|
+
|
|
73
|
+
usage_percentage?:string;
|
|
72
74
|
|
|
73
75
|
reference_line_item_id?:string;
|
|
74
76
|
|
|
75
|
-
description
|
|
77
|
+
description:string;
|
|
76
78
|
|
|
77
79
|
entity_description?:string;
|
|
78
80
|
|
|
79
|
-
entity_type
|
|
81
|
+
entity_type:'addon_item_price' | 'plan_item_price' | 'charge_item_price' | 'adhoc';
|
|
80
82
|
|
|
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';
|
|
83
|
+
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';
|
|
82
84
|
|
|
83
85
|
entity_id?:string;
|
|
84
86
|
|
|
85
87
|
customer_id?:string;
|
|
86
88
|
}
|
|
87
89
|
export interface Discount {
|
|
88
|
-
amount
|
|
90
|
+
amount:number;
|
|
89
91
|
|
|
90
92
|
description?:string;
|
|
91
93
|
|
|
92
94
|
line_item_id?:string;
|
|
93
95
|
|
|
94
|
-
entity_type
|
|
96
|
+
entity_type:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'prorated_credits' | 'document_level_discount' | 'document_level_coupon';
|
|
95
97
|
|
|
96
98
|
discount_type?:'fixed_amount' | 'percentage';
|
|
97
99
|
|
|
@@ -100,26 +102,32 @@ declare module 'chargebee' {
|
|
|
100
102
|
coupon_set_code?:string;
|
|
101
103
|
}
|
|
102
104
|
export interface Tax {
|
|
103
|
-
name
|
|
105
|
+
name:string;
|
|
104
106
|
|
|
105
|
-
amount
|
|
107
|
+
amount:number;
|
|
106
108
|
|
|
107
109
|
description?:string;
|
|
108
110
|
}
|
|
109
111
|
export interface LineItemTax {
|
|
110
112
|
line_item_id?:string;
|
|
111
113
|
|
|
112
|
-
tax_name
|
|
114
|
+
tax_name:string;
|
|
113
115
|
|
|
114
|
-
tax_rate
|
|
116
|
+
tax_rate:number;
|
|
117
|
+
|
|
118
|
+
date_to?:number;
|
|
119
|
+
|
|
120
|
+
date_from?:number;
|
|
121
|
+
|
|
122
|
+
prorated_taxable_amount?:number;
|
|
115
123
|
|
|
116
124
|
is_partial_tax_applied?:boolean;
|
|
117
125
|
|
|
118
126
|
is_non_compliance_tax?:boolean;
|
|
119
127
|
|
|
120
|
-
taxable_amount
|
|
128
|
+
taxable_amount:number;
|
|
121
129
|
|
|
122
|
-
tax_amount
|
|
130
|
+
tax_amount:number;
|
|
123
131
|
|
|
124
132
|
tax_juris_type?:'special' | 'country' | 'unincorporated' | 'other' | 'city' | 'federal' | 'county' | 'state';
|
|
125
133
|
|
|
@@ -132,26 +140,26 @@ declare module 'chargebee' {
|
|
|
132
140
|
local_currency_code?:string;
|
|
133
141
|
}
|
|
134
142
|
export interface LineItemDiscount {
|
|
135
|
-
line_item_id
|
|
143
|
+
line_item_id:string;
|
|
136
144
|
|
|
137
|
-
discount_type
|
|
145
|
+
discount_type:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'prorated_credits' | 'document_level_discount' | 'document_level_coupon';
|
|
138
146
|
|
|
139
147
|
coupon_id?:string;
|
|
140
148
|
|
|
141
149
|
entity_id?:string;
|
|
142
150
|
|
|
143
|
-
discount_amount
|
|
151
|
+
discount_amount:number;
|
|
144
152
|
}
|
|
145
153
|
export interface LineItemTier {
|
|
146
154
|
line_item_id?:string;
|
|
147
155
|
|
|
148
|
-
starting_unit
|
|
156
|
+
starting_unit:number;
|
|
149
157
|
|
|
150
158
|
ending_unit?:number;
|
|
151
159
|
|
|
152
|
-
quantity_used
|
|
160
|
+
quantity_used:number;
|
|
153
161
|
|
|
154
|
-
unit_amount
|
|
162
|
+
unit_amount:number;
|
|
155
163
|
|
|
156
164
|
starting_unit_in_decimal?:string;
|
|
157
165
|
|
|
@@ -2,63 +2,150 @@
|
|
|
2
2
|
declare module 'chargebee' {
|
|
3
3
|
export interface Entitlement {
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* @description A unique identifier for the entitlement. This is auto-generated.
|
|
7
|
+
|
|
8
|
+
*/
|
|
9
|
+
|
|
5
10
|
id:string;
|
|
6
11
|
|
|
12
|
+
/**
|
|
13
|
+
* @description The unique identifier of the entity being granted entitlement to a specific `feature`.
|
|
14
|
+
|
|
15
|
+
*/
|
|
16
|
+
|
|
7
17
|
entity_id?:string;
|
|
8
18
|
|
|
19
|
+
/**
|
|
20
|
+
* @description The type of the entity that holds this entitlement. \* plan -
|
|
21
|
+
|
|
22
|
+
Indicates that the entity is an `item` with [type](items?prod_cat_ver=2#item_type) set to `plan`.
|
|
23
|
+
\* addon -
|
|
24
|
+
|
|
25
|
+
Indicates that the entity is an `item` with [type](items?prod_cat_ver=2#item_type) set to `addon`.
|
|
26
|
+
\* addon_price -
|
|
27
|
+
|
|
28
|
+
Indicates that the entity is an `item_price` associated with an `item` with [type](items?prod_cat_ver=2#item_type) set to `addon`.
|
|
29
|
+
\* charge -
|
|
30
|
+
|
|
31
|
+
Indicates that the entity is an `item` with [type](items?prod_cat_ver=2#item_type) set to `charge`.
|
|
32
|
+
\* plan_price -
|
|
33
|
+
|
|
34
|
+
Indicates that the entity is an `item_price` associated with an `item` of [type](items?prod_cat_ver=2#item_type) `plan`.
|
|
35
|
+
|
|
36
|
+
*/
|
|
37
|
+
|
|
9
38
|
entity_type?:'charge' | 'addon' | 'addon_price' | 'plan_price' | 'plan';
|
|
10
39
|
|
|
40
|
+
/**
|
|
41
|
+
* @description The unique identifier of the `feature` to which the entity gains entitlement.
|
|
42
|
+
|
|
43
|
+
*/
|
|
44
|
+
|
|
11
45
|
feature_id?:string;
|
|
12
46
|
|
|
47
|
+
/**
|
|
48
|
+
* @description The `name` of the feature associated with this entitlement.
|
|
49
|
+
|
|
50
|
+
*/
|
|
51
|
+
|
|
13
52
|
feature_name?:string;
|
|
14
53
|
|
|
54
|
+
/**
|
|
55
|
+
* @description The level of entitlement that the entity has towards the feature. The possible values depend on the value of `feature.type`:
|
|
56
|
+
|
|
57
|
+
* When `feature.type` is `quantity` and:
|
|
58
|
+
* If `feature.levels[is_unlimited]` is not `true` for any one of `feature.levels[]`, then the value can be any one of `feature.levels[value][]`.
|
|
59
|
+
* If `feature.levels[is_unlimited]` is `true` for one of the `feature.levels[]`, then the value can be:
|
|
60
|
+
* any one of `feature.levels[value][]`
|
|
61
|
+
* or it can be `unlimited` (case-insensitive), indicating unlimited entitlement.
|
|
62
|
+
* When `type` is `range` and:
|
|
63
|
+
* If `feature.levels[is_unlimited]` is not `true` for any one of `feature.levels[]`, then the value can be any whole number between `levels[value][0]` and `levels[value][1]` (inclusive).
|
|
64
|
+
* If `feature.levels[is_unlimited]` is `true` for one of the `feature.levels[]`, then the value can be:
|
|
65
|
+
* any whole number equal to or greater than `levels[value][0]`
|
|
66
|
+
* or it can be `unlimited` (case-insensitive), indicating unlimited entitlement.
|
|
67
|
+
* When `type` is `custom`, then the value can be any one of `feature.levels[value][]`.
|
|
68
|
+
* When `type` is `switch`, then the value is set as `available` or `true`.
|
|
69
|
+
|
|
70
|
+
*/
|
|
71
|
+
|
|
15
72
|
value?:string;
|
|
16
73
|
|
|
74
|
+
/**
|
|
75
|
+
* @description The display name for the entitlement level. The value is automatically generated based on `feature.type`:
|
|
76
|
+
|
|
77
|
+
* When `feature.type` is `quantity` or `range`, the `name` is the space-separated concatenation of `value` and the plural form of `feature.unit`. For instance, if `value` is `20` and `feature.unit` is `user`, the `name` will be `20 users`.
|
|
78
|
+
* When `feature.type` is `custom`, the `name` matches the `value`.
|
|
79
|
+
|
|
80
|
+
*/
|
|
81
|
+
|
|
17
82
|
name?:string;
|
|
18
83
|
}
|
|
19
84
|
export namespace Entitlement {
|
|
20
85
|
export class EntitlementResource {
|
|
86
|
+
/**
|
|
87
|
+
* @description Retrieves a list of all the `entitlement`s associated with the specified `feature`.
|
|
88
|
+
|
|
89
|
+
*/
|
|
90
|
+
|
|
21
91
|
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
22
92
|
|
|
93
|
+
/**
|
|
94
|
+
* @description Create, update, or remove a set of `entitlement`s for a feature.
|
|
95
|
+
|
|
96
|
+
The behavior depends on the specified `action`. It tries to create, update, or delete `entitlement` objects. If any of the entitlement objects fail to process, the entire operation stops with an error, and no entitlements are processed. In essence, the request processes either all the provided entitlements or none of them.
|
|
97
|
+
|
|
98
|
+
*/
|
|
99
|
+
|
|
23
100
|
create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
|
|
24
101
|
}
|
|
25
102
|
export interface ListResponse {
|
|
103
|
+
/**
|
|
104
|
+
* @description Retrieves a list of all the `entitlement`s associated with the specified `feature`.
|
|
105
|
+
|
|
106
|
+
*/
|
|
107
|
+
|
|
26
108
|
list:{entitlement:Entitlement}[];
|
|
27
109
|
|
|
110
|
+
/**
|
|
111
|
+
* @description Retrieves a list of all the `entitlement`s associated with the specified `feature`.
|
|
112
|
+
|
|
113
|
+
*/
|
|
114
|
+
|
|
28
115
|
next_offset?:string;
|
|
29
116
|
}
|
|
30
117
|
export interface ListInputParam {
|
|
31
118
|
[key : string]: any;
|
|
32
119
|
/**
|
|
33
|
-
* @description
|
|
120
|
+
* @description Retrieves a list of all the `entitlement`s associated with the specified `feature`.
|
|
34
121
|
|
|
35
122
|
*/
|
|
36
123
|
|
|
37
124
|
limit?:number;
|
|
38
125
|
|
|
39
126
|
/**
|
|
40
|
-
* @description
|
|
127
|
+
* @description Retrieves a list of all the `entitlement`s associated with the specified `feature`.
|
|
41
128
|
|
|
42
129
|
*/
|
|
43
130
|
|
|
44
131
|
offset?:string;
|
|
45
132
|
|
|
46
133
|
/**
|
|
47
|
-
* @description
|
|
134
|
+
* @description Retrieves a list of all the `entitlement`s associated with the specified `feature`.
|
|
48
135
|
|
|
49
136
|
*/
|
|
50
137
|
|
|
51
138
|
feature_id?:{in?:string,is?:string};
|
|
52
139
|
|
|
53
140
|
/**
|
|
54
|
-
* @description
|
|
141
|
+
* @description Retrieves a list of all the `entitlement`s associated with the specified `feature`.
|
|
55
142
|
|
|
56
143
|
*/
|
|
57
144
|
|
|
58
145
|
entity_type?:{in?:string,is?:'charge' | 'addon' | 'addon_price' | 'plan_price' | 'plan'};
|
|
59
146
|
|
|
60
147
|
/**
|
|
61
|
-
* @description
|
|
148
|
+
* @description Retrieves a list of all the `entitlement`s associated with the specified `feature`.
|
|
62
149
|
|
|
63
150
|
*/
|
|
64
151
|
|
|
@@ -69,8 +156,18 @@ declare module 'chargebee' {
|
|
|
69
156
|
}
|
|
70
157
|
export interface CreateInputParam {
|
|
71
158
|
|
|
159
|
+
/**
|
|
160
|
+
* @description The specific action to be performed for each `entitlement` specified. \* upsert - If the `entitlement` already exists for the `feature_id` and `entity_id` combination, the `value` of the `entitlement` is updated. If it doesn't exist, a new `entitlement` is created. \* remove - Deletes the `entitlement` for the `feature_id` and `entity_id` combination, if it exists.
|
|
161
|
+
|
|
162
|
+
*/
|
|
163
|
+
|
|
72
164
|
action:Action;
|
|
73
165
|
|
|
166
|
+
/**
|
|
167
|
+
* @description Parameters for entitlements
|
|
168
|
+
|
|
169
|
+
*/
|
|
170
|
+
|
|
74
171
|
entitlements:{entity_id:string,entity_type?:'charge' | 'addon' | 'addon_price' | 'plan_price' | 'plan',feature_id:string,value?:string}[];
|
|
75
172
|
}
|
|
76
173
|
|
|
@@ -80,7 +80,7 @@ The response contains one or more of the following objects:
|
|
|
80
80
|
|
|
81
81
|
*/
|
|
82
82
|
|
|
83
|
-
create_sub_item_estimate(input
|
|
83
|
+
create_sub_item_estimate(input:CreateSubItemEstimateInputParam):ChargebeeRequest<CreateSubItemEstimateResponse>;
|
|
84
84
|
|
|
85
85
|
/**
|
|
86
86
|
* @description Generates an estimate without creating a subscription. This endpoint can be called when you want to preview details of a new subscription before actually creating one.
|
|
@@ -90,7 +90,7 @@ The response contains one or more of the following objects:
|
|
|
90
90
|
|
|
91
91
|
*/
|
|
92
92
|
|
|
93
|
-
create_sub_item_for_customer_estimate(customer_id:string, input
|
|
93
|
+
create_sub_item_for_customer_estimate(customer_id:string, input:CreateSubItemForCustomerEstimateInputParam):ChargebeeRequest<CreateSubItemForCustomerEstimateResponse>;
|
|
94
94
|
|
|
95
95
|
/**
|
|
96
96
|
* @description Returns an estimate for updating a subscription.
|
|
@@ -109,7 +109,7 @@ In the response,
|
|
|
109
109
|
|
|
110
110
|
*/
|
|
111
111
|
|
|
112
|
-
update_subscription_for_items(input
|
|
112
|
+
update_subscription_for_items(input:UpdateSubscriptionForItemsInputParam):ChargebeeRequest<UpdateSubscriptionForItemsResponse>;
|
|
113
113
|
|
|
114
114
|
/**
|
|
115
115
|
* @description This returns an estimate of the amount that will be charged when the subscription is billed next. The estimate is calculated based on the current recurring items of the subscription - plan, addons, and coupons.
|
|
@@ -237,14 +237,14 @@ In the response,
|
|
|
237
237
|
|
|
238
238
|
*/
|
|
239
239
|
|
|
240
|
-
gift_subscription_for_items(input
|
|
240
|
+
gift_subscription_for_items(input:GiftSubscriptionForItemsInputParam):ChargebeeRequest<GiftSubscriptionForItemsResponse>;
|
|
241
241
|
|
|
242
242
|
/**
|
|
243
243
|
* @description This endpoint creates an invoice estimate for non-recurring items.
|
|
244
244
|
|
|
245
245
|
*/
|
|
246
246
|
|
|
247
|
-
create_invoice_for_items(input
|
|
247
|
+
create_invoice_for_items(input:CreateInvoiceForItemsInputParam):ChargebeeRequest<CreateInvoiceForItemsResponse>;
|
|
248
248
|
}
|
|
249
249
|
export interface CreateSubItemEstimateResponse {
|
|
250
250
|
estimate:Estimate;
|
|
@@ -348,14 +348,14 @@ In the response,
|
|
|
348
348
|
|
|
349
349
|
*/
|
|
350
350
|
|
|
351
|
-
subscription_items
|
|
351
|
+
subscription_items:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
352
352
|
|
|
353
353
|
/**
|
|
354
354
|
* @description Parameters for discounts
|
|
355
355
|
|
|
356
356
|
*/
|
|
357
357
|
|
|
358
|
-
discounts
|
|
358
|
+
discounts:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,included_in_mrr?:boolean,item_price_id?:string,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
|
|
359
359
|
|
|
360
360
|
/**
|
|
361
361
|
* @description Parameters for item_tiers
|
|
@@ -440,6 +440,16 @@ In the response,
|
|
|
440
440
|
|
|
441
441
|
shipping_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
|
|
442
442
|
|
|
443
|
+
/**
|
|
444
|
+
* @description Generates an estimate without creating a subscription. This endpoint can be called when you want to preview details of a new subscription before actually creating one.
|
|
445
|
+
**See also**
|
|
446
|
+
|
|
447
|
+
* [Estimate a purchase](https://apidocs.chargebee.com/docs/api/purchases#estimates_for_purchase): an operation that estimates a `purchase` representing multiple subscriptions bought together by a customer.
|
|
448
|
+
|
|
449
|
+
*/
|
|
450
|
+
|
|
451
|
+
billing_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
|
|
452
|
+
|
|
443
453
|
/**
|
|
444
454
|
* @description Parameters for contract_term
|
|
445
455
|
|
|
@@ -452,14 +462,14 @@ In the response,
|
|
|
452
462
|
|
|
453
463
|
*/
|
|
454
464
|
|
|
455
|
-
subscription_items
|
|
465
|
+
subscription_items:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
456
466
|
|
|
457
467
|
/**
|
|
458
468
|
* @description Parameters for discounts
|
|
459
469
|
|
|
460
470
|
*/
|
|
461
471
|
|
|
462
|
-
discounts
|
|
472
|
+
discounts:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,included_in_mrr?:boolean,item_price_id?:string,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
|
|
463
473
|
|
|
464
474
|
/**
|
|
465
475
|
* @description Parameters for item_tiers
|
|
@@ -617,7 +627,7 @@ An immediate previous change was made
|
|
|
617
627
|
|
|
618
628
|
*/
|
|
619
629
|
|
|
620
|
-
subscription
|
|
630
|
+
subscription:{auto_collection?:AutoCollection,free_period?:number,free_period_unit?:FreePeriodUnit,id:string,offline_payment_method?:OfflinePaymentMethod,start_date?:number,trial_end?:number,trial_end_action?:TrialEndAction};
|
|
621
631
|
|
|
622
632
|
/**
|
|
623
633
|
* @description Parameters for billing_address
|
|
@@ -645,14 +655,14 @@ An immediate previous change was made
|
|
|
645
655
|
|
|
646
656
|
*/
|
|
647
657
|
|
|
648
|
-
subscription_items
|
|
658
|
+
subscription_items:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,proration_type?:ProrationType,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
649
659
|
|
|
650
660
|
/**
|
|
651
661
|
* @description Parameters for discounts
|
|
652
662
|
|
|
653
663
|
*/
|
|
654
664
|
|
|
655
|
-
discounts
|
|
665
|
+
discounts:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,id?:string,included_in_mrr?:boolean,item_price_id?:string,operation_type:OperationType,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
|
|
656
666
|
|
|
657
667
|
/**
|
|
658
668
|
* @description Parameters for item_tiers
|
|
@@ -1051,14 +1061,14 @@ If `no_action` is chosen, charges are added to the resumption invoice.
|
|
|
1051
1061
|
|
|
1052
1062
|
*/
|
|
1053
1063
|
|
|
1054
|
-
gifter
|
|
1064
|
+
gifter:{customer_id:string,note?:string,payment_src_id?:string,signature:string};
|
|
1055
1065
|
|
|
1056
1066
|
/**
|
|
1057
1067
|
* @description Parameters for gift_receiver
|
|
1058
1068
|
|
|
1059
1069
|
*/
|
|
1060
1070
|
|
|
1061
|
-
gift_receiver
|
|
1071
|
+
gift_receiver:{customer_id:string,email:string,first_name:string,last_name:string};
|
|
1062
1072
|
|
|
1063
1073
|
/**
|
|
1064
1074
|
* @description Parameters for payment_intent
|
|
@@ -1189,7 +1199,7 @@ If `no_action` is chosen, charges are added to the resumption invoice.
|
|
|
1189
1199
|
|
|
1190
1200
|
*/
|
|
1191
1201
|
|
|
1192
|
-
discounts
|
|
1202
|
+
discounts:{amount?:number,apply_on:ApplyOn,item_price_id?:string,percentage?:number}[];
|
|
1193
1203
|
}
|
|
1194
1204
|
|
|
1195
1205
|
}
|
|
@@ -56,6 +56,8 @@ declare module 'chargebee' {
|
|
|
56
56
|
|
|
57
57
|
content:object;
|
|
58
58
|
|
|
59
|
+
origin_user?:string;
|
|
60
|
+
|
|
59
61
|
/**
|
|
60
62
|
* @description Array of webhook call statuses: one for each of the webhooks configured for the site. This object is only available after the first webhook call for the event has completed or timed out. Also, creation/updation of the `webhook` object data is a queued operation and hence there can be an additional delay of up to 5 seconds.
|
|
61
63
|
|