chargebee 2.50.0 → 2.52.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 +92 -0
- package/lib/chargebee.js +1 -1
- package/lib/resources/api_endpoints.js +37 -1
- package/package.json +1 -1
- package/types/core.d.ts +8 -5
- package/types/index.d.ts +3 -0
- package/types/resources/Address.d.ts +2 -194
- package/types/resources/AdvanceInvoiceSchedule.d.ts +5 -67
- package/types/resources/Attribute.d.ts +4 -1
- package/types/resources/BillingConfiguration.d.ts +21 -0
- package/types/resources/Brand.d.ts +12 -0
- package/types/resources/BusinessEntity.d.ts +8 -6
- package/types/resources/BusinessEntityTransfer.d.ts +10 -7
- package/types/resources/Card.d.ts +11 -311
- package/types/resources/Comment.d.ts +7 -124
- package/types/resources/Configuration.d.ts +2 -0
- package/types/resources/Contact.d.ts +2 -44
- package/types/resources/ContractTerm.d.ts +4 -72
- package/types/resources/Coupon.d.ts +0 -37
- package/types/resources/CouponCode.d.ts +67 -35
- package/types/resources/CouponSet.d.ts +12 -121
- package/types/resources/CreditNote.d.ts +2 -6
- package/types/resources/CreditNoteEstimate.d.ts +1 -1
- package/types/resources/Currency.d.ts +8 -5
- package/types/resources/Customer.d.ts +90 -89
- package/types/resources/Discount.d.ts +2 -89
- package/types/resources/Download.d.ts +2 -14
- package/types/resources/Entitlement.d.ts +15 -103
- package/types/resources/EntitlementOverride.d.ts +4 -89
- package/types/resources/Estimate.d.ts +6 -10
- package/types/resources/Event.d.ts +23 -108
- package/types/resources/Export.d.ts +116 -432
- package/types/resources/Feature.d.ts +17 -319
- package/types/resources/GatewayErrorDetail.d.ts +6 -48
- package/types/resources/Gift.d.ts +34 -294
- package/types/resources/Hierarchy.d.ts +4 -24
- package/types/resources/ImpactedItem.d.ts +4 -36
- package/types/resources/ImpactedItemPrice.d.ts +5 -2
- package/types/resources/ImpactedSubscription.d.ts +3 -30
- package/types/resources/InAppSubscription.d.ts +13 -355
- package/types/resources/Invoice.d.ts +26 -18
- package/types/resources/InvoiceEstimate.d.ts +1 -1
- package/types/resources/Item.d.ts +4 -9
- package/types/resources/ItemEntitlement.d.ts +15 -155
- package/types/resources/NonSubscription.d.ts +9 -6
- package/types/resources/OmnichannelSubscriptionItem.d.ts +9 -0
- package/types/resources/PaymentIntent.d.ts +9 -255
- package/types/resources/PaymentReferenceNumber.d.ts +3 -20
- package/types/resources/PaymentSource.d.ts +2 -2
- package/types/resources/PaymentVoucher.d.ts +20 -203
- package/types/resources/PortalSession.d.ts +4 -146
- package/types/resources/PromotionalCredit.d.ts +10 -215
- package/types/resources/Purchase.d.ts +3 -1
- package/types/resources/Quote.d.ts +68 -18
- package/types/resources/QuoteLineGroup.d.ts +1 -1
- package/types/resources/QuotedRamp.d.ts +142 -0
- package/types/resources/RecordedPurchase.d.ts +2 -0
- package/types/resources/ResourceMigration.d.ts +2 -54
- package/types/resources/SiteMigrationDetail.d.ts +13 -55
- package/types/resources/Subscription.d.ts +13 -9
- package/types/resources/SubscriptionEntitlement.d.ts +6 -106
- package/types/resources/SubscriptionEstimate.d.ts +14 -11
- package/types/resources/TaxWithheld.d.ts +14 -26
- package/types/resources/ThirdPartyPaymentMethod.d.ts +2 -19
- package/types/resources/TimeMachine.d.ts +3 -64
- package/types/resources/Token.d.ts +3 -60
- package/types/resources/Transaction.d.ts +2 -2
- package/types/resources/Usage.d.ts +21 -165
|
@@ -1,129 +1,42 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
2
3
|
declare module 'chargebee' {
|
|
3
4
|
export interface Discount {
|
|
4
5
|
|
|
5
|
-
/**
|
|
6
|
-
* @description An immutable unique id for the discount. It is always auto-generated.
|
|
7
6
|
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
7
|
id:string;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @description The name of the discount as it should appear on customer-facing pages and documents such as [invoices](/docs/api/invoices?prod_cat_ver=2) and [hosted pages](/docs/api/hosted_pages?prod_cat_ver=2). This is auto-generated based on the `type`, `amount`, and `currency_code` of the discount. For example, it can be `10% off` or `10$ off`.
|
|
14
8
|
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
9
|
invoice_name?:string;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* @description The type of discount. Possible value are: \* percentage - The specified percentage will be given as discount. \* fixed_amount - The specified amount will be given as discount.
|
|
21
10
|
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
11
|
type:'fixed_amount' | 'percentage';
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @description The percentage of the original amount that should be deducted from it. Only applicable when `discount.type` is percentage.
|
|
28
12
|
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
13
|
percentage?:number;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @description The value of the discount. [The format of this value](https://apidocs.chargebee.com/docs/api?prod_cat_ver=2#currencies) depends on the kind of currency. This is only applicable when `discount.type` is `fixed_amount`.
|
|
35
14
|
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
15
|
amount?:number;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* @description The currency code ([ISO 4217 format](https://www.chargebee.com/docs/supported-currencies.html)) of the discount. This is only applicable when `discount.type` is `fixed_amount`.
|
|
42
16
|
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
17
|
currency_code?:string;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* @description Specifies the time duration for which this discount is attached to the subscription. \* forever - The discount is attached to the subscription and applied on the invoices till it is [explicitly removed](/docs/api/subscriptions?prod_cat_ver=2#update_subscription_for_items_discounts_operation_type). \* limited_period - The discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by `period` and `period_unit`. \* one_time - The discount stays attached to the subscription till it is applied on an invoice **once**. It is removed after that from the subscription.
|
|
49
18
|
|
|
50
|
-
*/
|
|
51
|
-
|
|
52
19
|
duration_type:DurationType;
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* @description The duration of time for which the discount is attached to the subscription, in `period_units`. Applicable only when `duration_type` is `limited_period`.
|
|
56
20
|
|
|
57
|
-
*/
|
|
58
|
-
|
|
59
21
|
period?:number;
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* @description The unit of time for `period`. Applicable only when `duration_type` is `limited_period`. \* year - A period of 1 calendar year. \* month - A period of 1 calendar month. \* week - A period of 7 days. \* day - A period of 24 hours.
|
|
63
22
|
|
|
64
|
-
*/
|
|
65
|
-
|
|
66
23
|
period_unit?:PeriodUnit;
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* @description The discount is included in MRR calculations for your site. This attribute is only applicable when `duration_type` is `one_time` and when the [feature is enabled](https://www.chargebee.com/docs/reporting.html#dashboards_flexible-mrr-calculation) in Chargebee. Also, If the [site-level setting](https://www.chargebee.com/docs/reporting.html#chart_flexible-mrr-calculation) is to exclude one-time discounts from MRR calculations, this value is always returned `false`.
|
|
70
24
|
|
|
71
|
-
*/
|
|
72
|
-
|
|
73
25
|
included_in_mrr:boolean;
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* @description The amount on the invoice to which the discount is applied. \* invoice_amount - The discount is applied to the invoice `sub_total`. \* specific_item_price - The discount is applied to the `invoice.line_item.amount` that corresponds to the item price specified by `item_price_id`.
|
|
77
26
|
|
|
78
|
-
*/
|
|
79
|
-
|
|
80
27
|
apply_on:ApplyOn;
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* @description The [id of the item price](/docs/api/subscriptions?prod_cat_ver=2#subscription_subscription_items_item_price_id) in the subscription to which the discount is to be applied. Relevant only when `apply_on` = `specific_item_price`.
|
|
84
28
|
|
|
85
|
-
*/
|
|
86
|
-
|
|
87
29
|
item_price_id?:string;
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* @description Timestamp indicating when this discount is created.
|
|
91
30
|
|
|
92
|
-
*/
|
|
93
|
-
|
|
94
31
|
created_at:number;
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* @description Specifies till when the limited period discount is applicable. This attribute will be sent in the response only for `limited_period` duration type discount.
|
|
98
32
|
|
|
99
|
-
*/
|
|
100
|
-
|
|
101
33
|
apply_till?:number;
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* @description Specifies the number of times the discount has been applied.
|
|
105
34
|
|
|
106
|
-
*/
|
|
107
|
-
|
|
108
35
|
applied_count?:number;
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* @description Used to uniquely identify the coupon in your website/application and to integrate with Chargebee.
|
|
112
|
-
**Note:**
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
When the coupon ID contains a special character; for example: `#`, the API returns an error.
|
|
116
|
-
Make sure that you [encode](https://www.urlencoder.org/) the coupon ID in the path parameter before making an API call.
|
|
117
36
|
|
|
118
|
-
*/
|
|
119
|
-
|
|
120
37
|
coupon_id:string;
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* @description The index number of the subscription to which the item price is added. Provide a unique number between `0` and `4` (inclusive) for each subscription that is to be created.
|
|
124
38
|
|
|
125
|
-
*/
|
|
126
|
-
|
|
127
39
|
index:number;
|
|
40
|
+
|
|
128
41
|
}
|
|
129
42
|
}
|
|
@@ -1,26 +1,14 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
2
3
|
declare module 'chargebee' {
|
|
3
4
|
export interface Download {
|
|
4
5
|
|
|
5
|
-
/**
|
|
6
|
-
* @description The URL at which the file is available for download.
|
|
7
6
|
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
7
|
download_url:string;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @description The time until which the `download_url` is valid.
|
|
14
8
|
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
9
|
valid_till:number;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* @description The [media type](https://en.wikipedia.org/wiki/Media_type) of the file.
|
|
21
10
|
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
11
|
mime_type?:string;
|
|
12
|
+
|
|
25
13
|
}
|
|
26
14
|
}
|
|
@@ -1,174 +1,86 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
2
3
|
declare module 'chargebee' {
|
|
3
4
|
export interface Entitlement {
|
|
4
5
|
|
|
5
|
-
/**
|
|
6
|
-
* @description A unique identifier for the entitlement. This is auto-generated.
|
|
7
6
|
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
7
|
id:string;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @description The unique identifier of the entity being granted entitlement to a specific `feature`.
|
|
14
8
|
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
9
|
entity_id?:string;
|
|
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
10
|
|
|
28
|
-
|
|
29
|
-
\* charge -
|
|
11
|
+
entity_type?:'plan' | 'addon' | 'charge' | 'plan_price' | 'addon_price';
|
|
30
12
|
|
|
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
|
-
|
|
38
|
-
entity_type?:'charge' | 'addon' | 'addon_price' | 'plan_price' | 'plan';
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* @description The unique identifier of the `feature` to which the entity gains entitlement.
|
|
42
|
-
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
13
|
feature_id?:string;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* @description The `name` of the feature associated with this entitlement.
|
|
49
14
|
|
|
50
|
-
*/
|
|
51
|
-
|
|
52
15
|
feature_name?:string;
|
|
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
16
|
|
|
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
|
-
|
|
72
17
|
value?:string;
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* @description The display name for the entitlement level. The value is automatically generated based on `feature.type`:
|
|
76
18
|
|
|
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
|
-
|
|
82
19
|
name?:string;
|
|
20
|
+
|
|
83
21
|
}
|
|
84
22
|
export namespace Entitlement {
|
|
85
23
|
export class EntitlementResource {
|
|
86
|
-
/**
|
|
87
|
-
* @description Retrieves a list of all the `entitlement`s associated with the specified `feature`.
|
|
88
|
-
|
|
89
|
-
*/
|
|
90
|
-
|
|
91
24
|
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
92
25
|
|
|
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
|
-
|
|
100
26
|
create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
|
|
101
27
|
}
|
|
102
28
|
export interface ListResponse {
|
|
103
|
-
/**
|
|
104
|
-
* @description Retrieves a list of all the `entitlement`s associated with the specified `feature`.
|
|
105
|
-
|
|
106
|
-
*/
|
|
107
|
-
|
|
108
29
|
list:{entitlement:Entitlement}[];
|
|
109
30
|
|
|
110
|
-
/**
|
|
111
|
-
* @description Retrieves a list of all the `entitlement`s associated with the specified `feature`.
|
|
112
|
-
|
|
113
|
-
*/
|
|
114
|
-
|
|
115
31
|
next_offset?:string;
|
|
116
32
|
}
|
|
117
33
|
export interface ListInputParam {
|
|
118
34
|
[key : string]: any;
|
|
119
35
|
/**
|
|
120
|
-
* @description
|
|
36
|
+
* @description The number of resources to be returned.
|
|
121
37
|
|
|
122
38
|
*/
|
|
123
39
|
|
|
124
40
|
limit?:number;
|
|
125
41
|
|
|
126
42
|
/**
|
|
127
|
-
* @description
|
|
43
|
+
* @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.
|
|
128
44
|
|
|
129
45
|
*/
|
|
130
46
|
|
|
131
47
|
offset?:string;
|
|
132
48
|
|
|
133
49
|
/**
|
|
134
|
-
* @description
|
|
50
|
+
* @description The `id` of the feature towards which this entitlement has been granted.
|
|
135
51
|
|
|
136
52
|
*/
|
|
137
53
|
|
|
138
54
|
feature_id?:{in?:string,is?:string};
|
|
139
55
|
|
|
140
56
|
/**
|
|
141
|
-
* @description
|
|
57
|
+
* @description The `type` of the `entity` to which this entitlement belongs.
|
|
142
58
|
|
|
143
59
|
*/
|
|
144
60
|
|
|
145
|
-
entity_type?:{in?:string,is?:'
|
|
61
|
+
entity_type?:{in?:string,is?:'plan' | 'addon' | 'charge' | 'plan_price' | 'addon_price'};
|
|
146
62
|
|
|
147
63
|
/**
|
|
148
|
-
* @description
|
|
64
|
+
* @description The `id` of the `entity` to which this entitlement belongs.
|
|
149
65
|
|
|
150
66
|
*/
|
|
151
67
|
|
|
152
68
|
entity_id?:{in?:string,is?:string};
|
|
69
|
+
|
|
70
|
+
include_drafts?:boolean;
|
|
71
|
+
|
|
72
|
+
embed?:string;
|
|
153
73
|
}
|
|
154
74
|
export interface CreateResponse {
|
|
155
75
|
entitlement:Entitlement;
|
|
156
76
|
}
|
|
157
77
|
export interface CreateInputParam {
|
|
158
78
|
|
|
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
|
-
*/
|
|
79
|
+
entitlements:{apply_grandfathering?:boolean,entity_id:string,entity_type?:'plan' | 'addon' | 'charge' | 'plan_price' | 'addon_price',feature_id:string,value?:string}[];
|
|
163
80
|
|
|
164
81
|
action:Action;
|
|
165
82
|
|
|
166
|
-
|
|
167
|
-
* @description Parameters for entitlements
|
|
168
|
-
|
|
169
|
-
*/
|
|
170
|
-
|
|
171
|
-
entitlements:{entity_id:string,entity_type?:'charge' | 'addon' | 'addon_price' | 'plan_price' | 'plan',feature_id:string,value?:string}[];
|
|
83
|
+
change_reason?:string;
|
|
172
84
|
}
|
|
173
85
|
|
|
174
86
|
}
|
|
@@ -3,76 +3,21 @@
|
|
|
3
3
|
declare module 'chargebee' {
|
|
4
4
|
export interface EntitlementOverride {
|
|
5
5
|
|
|
6
|
-
/**
|
|
7
|
-
* @description Unique identifier for the entitlement override. This is always auto-generated.
|
|
8
6
|
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
7
|
id:string;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @description The `id` of the subscription to which this entitlement override belongs.
|
|
15
8
|
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
9
|
entity_id?:string;
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* @description The name of Chargebee resource that this entitlement override is associated with. The value is always `subscription`.
|
|
22
10
|
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
11
|
entity_type?:string;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* @description The `id` of the `feature` towards which this entitlement override has been granted.
|
|
29
12
|
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
13
|
feature_id?:string;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* @description The `name` of the `feature` towards which this entitlement override has been granted.
|
|
36
14
|
|
|
37
|
-
*/
|
|
38
|
-
|
|
39
15
|
feature_name?:string;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* @description The level of entitlement that the item has towards the feature. The possible values depend on the value of `feature.type`:
|
|
43
16
|
|
|
44
|
-
* When `feature.type` is `quantity` and:
|
|
45
|
-
* 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][]`.
|
|
46
|
-
* If `feature.levels[is_unlimited]` is `true` for one of the `feature.levels[]`, then the value can also be:
|
|
47
|
-
* any one of `feature.levels[value][]`
|
|
48
|
-
* or it can be `unlimited` (case-insensitive), indicating unlimited entitlement.
|
|
49
|
-
* When `type` is `range` and:
|
|
50
|
-
* 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).
|
|
51
|
-
* If `feature.levels[is_unlimited]` is `true` for one of the `feature.levels[]`, then the value can be:
|
|
52
|
-
* any whole number equal to or greater than `levels[value][0]`
|
|
53
|
-
* or it can be `unlimited` (case-insensitive), indicating unlimited entitlement.
|
|
54
|
-
* When `type` is `custom`, then the value can be any one of `feature.levels[value][]`.
|
|
55
|
-
* When `type` is `switch`, then the value is set as `true` if the feature is available; it is set as `false` when the feature is unavailable.
|
|
56
|
-
|
|
57
|
-
*/
|
|
58
|
-
|
|
59
17
|
value?:string;
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* @description The display name for the entitlement level. The default values are auto-generated based on `feature.type` as follows:
|
|
63
18
|
|
|
64
|
-
* When `feature.type` is `quantity` or `range`, then `name` is the space-separated concatenation of `value` and the pluralized version of `feature.unit`. For example, if `value` is `20` and `feature.unit` is `user`, then `name` becomes `20 users`.
|
|
65
|
-
* When `feature.type` is `custom`, then `name` is the same as `value`
|
|
66
|
-
|
|
67
|
-
*/
|
|
68
|
-
|
|
69
19
|
name?:string;
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* @description The expiry date for the `entitlement_override`. Once expired, the `entitlement_override` object is no longer returned.
|
|
73
20
|
|
|
74
|
-
*/
|
|
75
|
-
|
|
76
21
|
expires_at?:number;
|
|
77
22
|
|
|
78
23
|
effective_from?:number;
|
|
@@ -82,18 +27,8 @@ declare module 'chargebee' {
|
|
|
82
27
|
}
|
|
83
28
|
export namespace EntitlementOverride {
|
|
84
29
|
export class EntitlementOverrideResource {
|
|
85
|
-
|
|
86
|
-
* @description Upserts or removes a set of `entitlement_overrides` for a `subscription` depending on the `action` specified. The API returns the upserted or deleted `entitlement_overrides` after successfully completing the operation. The operation returns an error when the first `entitlement_override` fails to be processed. Either all the `entitlement_overrides` provided in the request are processed or none.
|
|
87
|
-
|
|
88
|
-
*/
|
|
89
|
-
|
|
90
|
-
add_entitlement_override_for_subscription(subscription_id:string, input?:AddEntitlementOverrideForSubscriptionInputParam):ChargebeeRequest<AddEntitlementOverrideForSubscriptionResponse>;
|
|
30
|
+
add_entitlement_override_for_subscription(subscription_id:string, input:AddEntitlementOverrideForSubscriptionInputParam):ChargebeeRequest<AddEntitlementOverrideForSubscriptionResponse>;
|
|
91
31
|
|
|
92
|
-
/**
|
|
93
|
-
* @description Retrieve the list of entitlement overrides for a subscription.
|
|
94
|
-
|
|
95
|
-
*/
|
|
96
|
-
|
|
97
32
|
list_entitlement_override_for_subscription(subscription_id:string, input?:ListEntitlementOverrideForSubscriptionInputParam):ChargebeeRequest<ListEntitlementOverrideForSubscriptionResponse>;
|
|
98
33
|
}
|
|
99
34
|
export interface AddEntitlementOverrideForSubscriptionResponse {
|
|
@@ -101,46 +36,26 @@ declare module 'chargebee' {
|
|
|
101
36
|
}
|
|
102
37
|
export interface AddEntitlementOverrideForSubscriptionInputParam {
|
|
103
38
|
|
|
104
|
-
|
|
105
|
-
* @description The specific action to be performed for each `entitlement_override` specified. . \* remove - Deletes the `entitlement_override` for the `feature_id` and `item_id` combination, if it exists. \* upsert - If the `entitlement_override` already exists for the `feature_id` and `{subscription_id}` combination, the `value` of the `entitlement_override` is updated. If it doesn't exist, a new `entitlement_override` is created.
|
|
106
|
-
|
|
107
|
-
*/
|
|
39
|
+
entitlement_overrides:{effective_from?:number,expires_at?:number,feature_id:string,value?:string}[];
|
|
108
40
|
|
|
109
41
|
action?:Action;
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* @description Parameters for entitlement_overrides
|
|
113
|
-
|
|
114
|
-
*/
|
|
115
|
-
|
|
116
|
-
entitlement_overrides?:{expires_at?:number,feature_id:string,value?:string}[];
|
|
117
42
|
}
|
|
118
43
|
export interface ListEntitlementOverrideForSubscriptionResponse {
|
|
119
|
-
/**
|
|
120
|
-
* @description Retrieve the list of entitlement overrides for a subscription.
|
|
121
|
-
|
|
122
|
-
*/
|
|
123
|
-
|
|
124
44
|
list:{entitlement_override:EntitlementOverride}[];
|
|
125
45
|
|
|
126
|
-
/**
|
|
127
|
-
* @description Retrieve the list of entitlement overrides for a subscription.
|
|
128
|
-
|
|
129
|
-
*/
|
|
130
|
-
|
|
131
46
|
next_offset?:string;
|
|
132
47
|
}
|
|
133
48
|
export interface ListEntitlementOverrideForSubscriptionInputParam {
|
|
134
49
|
[key : string]: any;
|
|
135
50
|
/**
|
|
136
|
-
* @description
|
|
51
|
+
* @description The number of resources to be returned.
|
|
137
52
|
|
|
138
53
|
*/
|
|
139
54
|
|
|
140
55
|
limit?:number;
|
|
141
56
|
|
|
142
57
|
/**
|
|
143
|
-
* @description
|
|
58
|
+
* @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.
|
|
144
59
|
|
|
145
60
|
*/
|
|
146
61
|
|
|
@@ -166,19 +166,11 @@ declare module 'chargebee' {
|
|
|
166
166
|
|
|
167
167
|
terms_to_charge?:number;
|
|
168
168
|
|
|
169
|
-
next_renewal_date?:number;
|
|
170
|
-
|
|
171
|
-
charge_model?:'full_charge' | 'prorate';
|
|
172
|
-
|
|
173
169
|
billing_alignment_mode?:'immediate' | 'delayed';
|
|
174
170
|
|
|
175
|
-
referral_details?:string;
|
|
176
|
-
|
|
177
171
|
invoice_date?:number;
|
|
178
172
|
|
|
179
173
|
coupon_ids?:string[];
|
|
180
|
-
|
|
181
|
-
allow_gift_plan?:boolean;
|
|
182
174
|
}
|
|
183
175
|
export interface CreateSubItemForCustomerEstimateResponse {
|
|
184
176
|
estimate:Estimate;
|
|
@@ -193,6 +185,8 @@ declare module 'chargebee' {
|
|
|
193
185
|
|
|
194
186
|
contract_term?:{action_at_term_end?:'renew' | 'evergreen' | 'cancel',cancellation_cutoff_period?:number,contract_start?:number};
|
|
195
187
|
|
|
188
|
+
billing_override?:{max_excess_payment_usage?:number,max_refundable_credits_usage?:number};
|
|
189
|
+
|
|
196
190
|
subscription_items:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,item_type?:ItemType,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
197
191
|
|
|
198
192
|
discounts:{amount?:number,apply_on?:ApplyOn,duration_type:DurationType,included_in_mrr?:boolean,item_price_id?:string,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
|
|
@@ -281,6 +275,8 @@ declare module 'chargebee' {
|
|
|
281
275
|
|
|
282
276
|
customer?:{registered_for_gst?:boolean,taxability?:Taxability,vat_number?:string,vat_number_prefix?:string};
|
|
283
277
|
|
|
278
|
+
billing_override?:{max_excess_payment_usage?:number,max_refundable_credits_usage?:number};
|
|
279
|
+
|
|
284
280
|
subscription_items:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,item_type?:ItemType,proration_type?:ProrationType,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
285
281
|
|
|
286
282
|
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}[];
|
|
@@ -468,7 +464,7 @@ declare module 'chargebee' {
|
|
|
468
464
|
|
|
469
465
|
gift_receiver:{customer_id:string,email:string,first_name:string,last_name:string};
|
|
470
466
|
|
|
471
|
-
payment_intent?:{additional_information?:object,gateway_account_id?:string,gw_payment_method_id?:string,gw_token?:string,id?:string,payment_method_type?:'card' | 'ideal' | 'sofort' | 'bancontact' | 'google_pay' | 'dotpay' | 'giropay' | 'apple_pay' | 'upi' | 'netbanking_emandates' | 'paypal_express_checkout' | 'direct_debit' | 'boleto' | 'venmo' | 'amazon_payments' | 'pay_to' | 'faster_payments' | 'sepa_instant_transfer' | 'klarna_pay_now' | 'online_banking_poland',reference_id?:string};
|
|
467
|
+
payment_intent?:{additional_information?:object,gateway_account_id?:string,gw_payment_method_id?:string,gw_token?:string,id?:string,payment_method_type?:'card' | 'ideal' | 'sofort' | 'bancontact' | 'google_pay' | 'dotpay' | 'giropay' | 'apple_pay' | 'upi' | 'netbanking_emandates' | 'paypal_express_checkout' | 'direct_debit' | 'boleto' | 'venmo' | 'amazon_payments' | 'pay_to' | 'faster_payments' | 'sepa_instant_transfer' | 'klarna_pay_now' | 'online_banking_poland' | 'payconiq_by_bancontact',reference_id?:string};
|
|
472
468
|
|
|
473
469
|
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};
|
|
474
470
|
|
|
@@ -489,7 +485,7 @@ declare module 'chargebee' {
|
|
|
489
485
|
|
|
490
486
|
gift_receiver:{customer_id:string,email:string,first_name:string,last_name:string};
|
|
491
487
|
|
|
492
|
-
payment_intent?:{additional_information?:object,gateway_account_id?:string,gw_payment_method_id?:string,gw_token?:string,id?:string,payment_method_type?:'card' | 'ideal' | 'sofort' | 'bancontact' | 'google_pay' | 'dotpay' | 'giropay' | 'apple_pay' | 'upi' | 'netbanking_emandates' | 'paypal_express_checkout' | 'direct_debit' | 'boleto' | 'venmo' | 'amazon_payments' | 'pay_to' | 'faster_payments' | 'sepa_instant_transfer' | 'klarna_pay_now' | 'online_banking_poland',reference_id?:string};
|
|
488
|
+
payment_intent?:{additional_information?:object,gateway_account_id?:string,gw_payment_method_id?:string,gw_token?:string,id?:string,payment_method_type?:'card' | 'ideal' | 'sofort' | 'bancontact' | 'google_pay' | 'dotpay' | 'giropay' | 'apple_pay' | 'upi' | 'netbanking_emandates' | 'paypal_express_checkout' | 'direct_debit' | 'boleto' | 'venmo' | 'amazon_payments' | 'pay_to' | 'faster_payments' | 'sepa_instant_transfer' | 'klarna_pay_now' | 'online_banking_poland' | 'payconiq_by_bancontact',reference_id?:string};
|
|
493
489
|
|
|
494
490
|
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};
|
|
495
491
|
|