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.
- package/CHANGELOG.md +11 -15
- package/LICENSE +1 -1
- package/README.md +90 -170
- package/cjs/RequestWrapper.js +84 -0
- package/cjs/asyncApiSupport.js +39 -0
- package/cjs/chargebee.cjs.js +13 -0
- package/cjs/chargebee.cjs.worker.js +9 -0
- package/cjs/chargebeeError.js +17 -0
- package/cjs/coreCommon.js +72 -0
- package/cjs/createChargebee.js +92 -0
- package/cjs/environment.js +18 -0
- package/cjs/filter.js +1 -0
- package/cjs/net/ClientInterface.js +40 -0
- package/cjs/net/FetchClient.js +86 -0
- package/cjs/net/NodeClient.js +61 -0
- package/cjs/package.json +1 -0
- package/cjs/resources/api_endpoints.js +1086 -0
- package/cjs/util.js +218 -0
- package/esm/RequestWrapper.js +80 -0
- package/esm/asyncApiSupport.js +35 -0
- package/esm/chargebee.esm.js +9 -0
- package/esm/chargebee.esm.worker.js +5 -0
- package/esm/chargebeeError.js +13 -0
- package/esm/coreCommon.js +67 -0
- package/esm/createChargebee.js +88 -0
- package/esm/environment.js +15 -0
- package/esm/filter.js +1 -0
- package/esm/net/ClientInterface.js +35 -0
- package/esm/net/FetchClient.js +81 -0
- package/esm/net/NodeClient.js +56 -0
- package/esm/package.json +1 -0
- package/esm/resources/api_endpoints.js +1083 -0
- package/esm/util.js +202 -0
- package/package.json +69 -38
- package/types/core.d.ts +558 -89
- package/types/index.d.ts +90 -55
- package/types/resources/Address.d.ts +57 -272
- package/types/resources/AdvanceInvoiceSchedule.d.ts +21 -94
- package/types/resources/AttachedItem.d.ts +91 -329
- package/types/resources/Attribute.d.ts +5 -5
- package/types/resources/BusinessEntity.d.ts +49 -69
- package/types/resources/BusinessEntityTransfer.d.ts +11 -17
- package/types/resources/Card.d.ts +146 -424
- package/types/resources/Comment.d.ts +72 -189
- package/types/resources/Contact.d.ts +12 -64
- package/types/resources/ContractTerm.d.ts +15 -96
- package/types/resources/Coupon.d.ts +282 -758
- package/types/resources/CouponCode.d.ts +56 -52
- package/types/resources/CouponSet.d.ts +92 -234
- package/types/resources/CreditNote.d.ts +588 -1758
- package/types/resources/CreditNoteEstimate.d.ts +131 -157
- package/types/resources/Currency.d.ts +75 -62
- package/types/resources/Customer.d.ts +892 -835
- package/types/resources/CustomerEntitlement.d.ts +24 -35
- package/types/resources/DifferentialPrice.d.ts +116 -314
- package/types/resources/Discount.d.ts +20 -125
- package/types/resources/Download.d.ts +6 -22
- package/types/resources/Entitlement.d.ts +51 -160
- package/types/resources/EntitlementOverride.d.ts +58 -139
- package/types/resources/Estimate.d.ts +1178 -527
- package/types/resources/Event.d.ts +67 -178
- package/types/resources/Export.d.ts +563 -723
- package/types/resources/Feature.d.ts +117 -433
- package/types/resources/GatewayErrorDetail.d.ts +16 -72
- package/types/resources/Gift.d.ts +265 -432
- package/types/resources/Hierarchy.d.ts +8 -36
- package/types/resources/HostedPage.d.ts +1017 -1153
- package/types/resources/ImpactedItem.d.ts +13 -50
- package/types/resources/ImpactedItemPrice.d.ts +13 -15
- package/types/resources/ImpactedSubscription.d.ts +13 -45
- package/types/resources/InAppSubscription.d.ts +93 -389
- package/types/resources/Installment.d.ts +35 -110
- package/types/resources/InstallmentConfig.d.ts +54 -155
- package/types/resources/InstallmentDetail.d.ts +19 -27
- package/types/resources/Invoice.d.ts +1574 -3157
- package/types/resources/InvoiceEstimate.d.ts +131 -161
- package/types/resources/Item.d.ts +133 -611
- package/types/resources/ItemEntitlement.d.ts +78 -215
- package/types/resources/ItemFamily.d.ts +69 -178
- package/types/resources/ItemPrice.d.ts +291 -1203
- package/types/resources/Metadata.d.ts +3 -5
- package/types/resources/Order.d.ts +538 -1471
- package/types/resources/PaymentIntent.d.ts +163 -347
- package/types/resources/PaymentReferenceNumber.d.ts +7 -29
- package/types/resources/PaymentSource.d.ts +476 -1272
- package/types/resources/PaymentVoucher.d.ts +87 -306
- package/types/resources/PortalSession.d.ts +71 -207
- package/types/resources/PriceVariant.d.ts +91 -279
- package/types/resources/PricingPageSession.d.ts +92 -41
- package/types/resources/PromotionalCredit.d.ts +90 -346
- package/types/resources/Purchase.d.ts +185 -315
- package/types/resources/Quote.d.ts +1406 -887
- package/types/resources/QuoteLineGroup.d.ts +125 -452
- package/types/resources/QuotedCharge.d.ts +45 -274
- package/types/resources/QuotedSubscription.d.ts +100 -488
- package/types/resources/Ramp.d.ts +230 -747
- package/types/resources/ResourceMigration.d.ts +25 -80
- package/types/resources/SiteMigrationDetail.d.ts +34 -112
- package/types/resources/Subscription.d.ts +2390 -4336
- package/types/resources/SubscriptionEntitlement.d.ts +59 -160
- package/types/resources/SubscriptionEstimate.d.ts +51 -75
- package/types/resources/TaxWithheld.d.ts +15 -40
- package/types/resources/ThirdPartyPaymentMethod.d.ts +7 -29
- package/types/resources/TimeMachine.d.ts +43 -97
- package/types/resources/Token.d.ts +15 -85
- package/types/resources/Transaction.d.ts +276 -911
- package/types/resources/UnbilledCharge.d.ts +189 -164
- package/types/resources/Usage.d.ts +89 -279
- package/types/resources/VirtualBankAccount.d.ts +103 -255
- package/types/resources/filter.d.ts +52 -0
- package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -81
- package/.github/ISSUE_TEMPLATE/config.yml +0 -6
- package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -34
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -8
- package/lib/chargebee.js +0 -512
- package/lib/resources/api_endpoints.js +0 -2935
- package/types/resources/NonSubscription.d.ts +0 -30
- package/types/resources/Session.d.ts +0 -41
|
@@ -1,26 +1,10 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
|
|
2
4
|
declare module 'chargebee' {
|
|
3
5
|
export interface Download {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
download_url:string;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @description The time until which the `download_url` is valid.
|
|
14
|
-
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
valid_till:number;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* @description The [media type](https://en.wikipedia.org/wiki/Media_type) of the file.
|
|
21
|
-
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
mime_type?:string;
|
|
6
|
+
download_url: string;
|
|
7
|
+
valid_till: number;
|
|
8
|
+
mime_type?: string;
|
|
25
9
|
}
|
|
26
|
-
}
|
|
10
|
+
}
|
|
@@ -1,175 +1,66 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
///<reference path='./filter.d.ts'/>
|
|
2
4
|
declare module 'chargebee' {
|
|
3
5
|
export interface Entitlement {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @description The unique identifier of the entity being granted entitlement to a specific `feature`.
|
|
14
|
-
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
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
|
-
|
|
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
|
-
|
|
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
|
-
feature_id?:string;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* @description The `name` of the feature associated with this entitlement.
|
|
49
|
-
|
|
50
|
-
*/
|
|
51
|
-
|
|
52
|
-
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
|
-
|
|
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
|
-
value?:string;
|
|
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
|
-
|
|
82
|
-
name?:string;
|
|
6
|
+
id: string;
|
|
7
|
+
entity_id?: string;
|
|
8
|
+
entity_type?: 'plan' | 'addon' | 'charge' | 'plan_price' | 'addon_price';
|
|
9
|
+
feature_id?: string;
|
|
10
|
+
feature_name?: string;
|
|
11
|
+
value?: string;
|
|
12
|
+
name?: string;
|
|
83
13
|
}
|
|
84
|
-
export namespace Entitlement {
|
|
85
|
-
export class EntitlementResource {
|
|
86
|
-
/**
|
|
87
|
-
* @description Retrieves a list of all the `entitlement`s associated with the specified `feature`.
|
|
88
|
-
|
|
89
|
-
*/
|
|
90
|
-
|
|
91
|
-
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* @description Create, update, or remove a set of `entitlement`s for a feature.
|
|
95
14
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
15
|
+
export namespace Entitlement {
|
|
16
|
+
export class EntitlementResource {
|
|
17
|
+
list(
|
|
18
|
+
input?: ListInputParam,
|
|
19
|
+
headers?: ChargebeeRequestHeader,
|
|
20
|
+
): Promise<ChargebeeResponse<ListResponse>>;
|
|
21
|
+
|
|
22
|
+
create(
|
|
23
|
+
input: CreateInputParam,
|
|
24
|
+
headers?: ChargebeeRequestHeader,
|
|
25
|
+
): Promise<ChargebeeResponse<CreateResponse>>;
|
|
101
26
|
}
|
|
102
|
-
export interface ListResponse {
|
|
103
|
-
/**
|
|
104
|
-
* @description Retrieves a list of all the `entitlement`s associated with the specified `feature`.
|
|
105
27
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* @description Retrieves a list of all the `entitlement`s associated with the specified `feature`.
|
|
112
|
-
|
|
113
|
-
*/
|
|
114
|
-
|
|
115
|
-
next_offset?:string;
|
|
28
|
+
export interface ListResponse {
|
|
29
|
+
list: { entitlement: Entitlement }[];
|
|
30
|
+
next_offset?: string;
|
|
116
31
|
}
|
|
117
|
-
export interface ListInputParam {
|
|
118
|
-
[key : string]: any;
|
|
119
|
-
/**
|
|
120
|
-
* @description Retrieves a list of all the `entitlement`s associated with the specified `feature`.
|
|
121
|
-
|
|
122
|
-
*/
|
|
123
|
-
|
|
124
|
-
limit?:number;
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* @description Retrieves a list of all the `entitlement`s associated with the specified `feature`.
|
|
128
32
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* @description Retrieves a list of all the `entitlement`s associated with the specified `feature`.
|
|
135
|
-
|
|
136
|
-
*/
|
|
137
|
-
|
|
138
|
-
feature_id?:{in?:string,is?:string};
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* @description Retrieves a list of all the `entitlement`s associated with the specified `feature`.
|
|
33
|
+
export interface CreateResponse {
|
|
34
|
+
entitlement: Entitlement;
|
|
35
|
+
}
|
|
142
36
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
entity_type?:{in?:string,is?:'charge' | 'addon' | 'addon_price' | 'plan_price' | 'plan'};
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* @description Retrieves a list of all the `entitlement`s associated with the specified `feature`.
|
|
37
|
+
// REQUEST PARAMS
|
|
38
|
+
//---------------
|
|
149
39
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
40
|
+
export interface ListInputParam {
|
|
41
|
+
limit?: number;
|
|
42
|
+
offset?: string;
|
|
43
|
+
feature_id?: filter.String;
|
|
44
|
+
entity_type?: filter.Enum;
|
|
45
|
+
entity_id?: filter.String /**
|
|
46
|
+
* @deprecated Please refer API docs to use other attributes
|
|
47
|
+
*/;
|
|
48
|
+
|
|
49
|
+
include_drafts?: boolean /**
|
|
50
|
+
* @deprecated Please refer API docs to use other attributes
|
|
51
|
+
*/;
|
|
52
|
+
|
|
53
|
+
embed?: string;
|
|
156
54
|
}
|
|
157
55
|
export interface CreateInputParam {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
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}[];
|
|
56
|
+
action: Action;
|
|
57
|
+
entitlements?: EntitlementsCreateInputParam[];
|
|
58
|
+
}
|
|
59
|
+
export interface EntitlementsCreateInputParam {
|
|
60
|
+
entity_id: string;
|
|
61
|
+
feature_id: string;
|
|
62
|
+
entity_type?: 'plan' | 'addon' | 'charge' | 'plan_price' | 'addon_price';
|
|
63
|
+
value?: string;
|
|
172
64
|
}
|
|
173
|
-
|
|
174
65
|
}
|
|
175
|
-
}
|
|
66
|
+
}
|
|
@@ -1,157 +1,76 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
2
|
///<reference path='./../index.d.ts'/>
|
|
3
|
+
///<reference path='./filter.d.ts'/>
|
|
3
4
|
declare module 'chargebee' {
|
|
4
5
|
export interface EntitlementOverride {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
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
|
-
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
entity_type?:string;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* @description The `id` of the `feature` towards which this entitlement override has been granted.
|
|
29
|
-
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
feature_id?:string;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* @description The `name` of the `feature` towards which this entitlement override has been granted.
|
|
36
|
-
|
|
37
|
-
*/
|
|
38
|
-
|
|
39
|
-
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
|
-
|
|
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
|
-
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
|
-
|
|
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
|
-
name?:string;
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* @description The expiry date for the `entitlement_override`. Once expired, the `entitlement_override` object is no longer returned.
|
|
73
|
-
|
|
74
|
-
*/
|
|
75
|
-
|
|
76
|
-
expires_at?:number;
|
|
77
|
-
|
|
78
|
-
effective_from?:number;
|
|
79
|
-
|
|
80
|
-
schedule_status?:'activated' | 'scheduled' | 'failed';
|
|
81
|
-
|
|
6
|
+
id: string;
|
|
7
|
+
entity_id?: string;
|
|
8
|
+
entity_type?: string;
|
|
9
|
+
feature_id?: string;
|
|
10
|
+
feature_name?: string;
|
|
11
|
+
value?: string;
|
|
12
|
+
name?: string;
|
|
13
|
+
expires_at?: number;
|
|
14
|
+
effective_from?: number;
|
|
15
|
+
schedule_status?: 'activated' | 'scheduled' | 'failed';
|
|
82
16
|
}
|
|
83
|
-
export namespace EntitlementOverride {
|
|
84
|
-
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
17
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
18
|
+
export namespace EntitlementOverride {
|
|
19
|
+
export class EntitlementOverrideResource {
|
|
20
|
+
addEntitlementOverrideForSubscription(
|
|
21
|
+
subscription_id: string,
|
|
22
|
+
input: AddEntitlementOverrideForSubscriptionInputParam,
|
|
23
|
+
headers?: ChargebeeRequestHeader,
|
|
24
|
+
): Promise<
|
|
25
|
+
ChargebeeResponse<AddEntitlementOverrideForSubscriptionResponse>
|
|
26
|
+
>;
|
|
27
|
+
|
|
28
|
+
listEntitlementOverrideForSubscription(
|
|
29
|
+
subscription_id: string,
|
|
30
|
+
input?: ListEntitlementOverrideForSubscriptionInputParam,
|
|
31
|
+
headers?: ChargebeeRequestHeader,
|
|
32
|
+
): Promise<
|
|
33
|
+
ChargebeeResponse<ListEntitlementOverrideForSubscriptionResponse>
|
|
34
|
+
>;
|
|
101
35
|
}
|
|
102
|
-
export interface AddEntitlementOverrideForSubscriptionInputParam {
|
|
103
|
-
|
|
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
36
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* @description Parameters for entitlement_overrides
|
|
37
|
+
export interface AddEntitlementOverrideForSubscriptionResponse {
|
|
38
|
+
entitlement_override: EntitlementOverride;
|
|
39
|
+
}
|
|
113
40
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
41
|
+
export interface ListEntitlementOverrideForSubscriptionResponse {
|
|
42
|
+
list: { entitlement_override: EntitlementOverride }[];
|
|
43
|
+
next_offset?: string;
|
|
117
44
|
}
|
|
118
|
-
export interface ListEntitlementOverrideForSubscriptionResponse {
|
|
119
|
-
/**
|
|
120
|
-
* @description Retrieve the list of entitlement overrides for a subscription.
|
|
121
45
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
list:{entitlement_override:EntitlementOverride}[];
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* @description Retrieve the list of entitlement overrides for a subscription.
|
|
46
|
+
// REQUEST PARAMS
|
|
47
|
+
//---------------
|
|
128
48
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
49
|
+
export interface AddEntitlementOverrideForSubscriptionInputParam {
|
|
50
|
+
action?: Action;
|
|
51
|
+
entitlement_overrides?: EntitlementOverridesAddEntitlementOverrideForSubscriptionInputParam[];
|
|
132
52
|
}
|
|
133
53
|
export interface ListEntitlementOverrideForSubscriptionInputParam {
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
|
|
54
|
+
limit?: number;
|
|
55
|
+
offset?: string /**
|
|
56
|
+
* @deprecated Please refer API docs to use other attributes
|
|
57
|
+
*/;
|
|
137
58
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* @description Retrieve the list of entitlement overrides for a subscription.
|
|
59
|
+
embed?: string /**
|
|
60
|
+
* @deprecated Please refer API docs to use other attributes
|
|
61
|
+
*/;
|
|
144
62
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
63
|
+
include_drafts?: boolean /**
|
|
64
|
+
* @deprecated Please refer API docs to use other attributes
|
|
65
|
+
*/;
|
|
66
|
+
|
|
67
|
+
include_scheduled_overrides?: boolean;
|
|
68
|
+
}
|
|
69
|
+
export interface EntitlementOverridesAddEntitlementOverrideForSubscriptionInputParam {
|
|
70
|
+
feature_id: string;
|
|
71
|
+
value?: string;
|
|
72
|
+
expires_at?: number;
|
|
73
|
+
effective_from?: number;
|
|
154
74
|
}
|
|
155
|
-
|
|
156
75
|
}
|
|
157
|
-
}
|
|
76
|
+
}
|