chargebee 2.51.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 +27 -0
- package/lib/chargebee.js +1 -1
- package/lib/resources/api_endpoints.js +14 -1
- package/package.json +1 -1
- package/types/core.d.ts +4 -4
- package/types/index.d.ts +2 -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/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 +0 -6
- 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 +2 -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 +2 -16
- package/types/resources/InvoiceEstimate.d.ts +1 -1
- package/types/resources/Item.d.ts +0 -7
- package/types/resources/ItemEntitlement.d.ts +15 -155
- package/types/resources/NonSubscription.d.ts +9 -6
- 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 +19 -1
- package/types/resources/QuotedRamp.d.ts +11 -16
- 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 +11 -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,397 +1,127 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
2
3
|
declare module 'chargebee' {
|
|
3
4
|
export interface Feature {
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @description A unique and immutable identifier for the feature. You can set it yourself, in which case it is recommended that a human-readable format (or slug) be used. For example, `number-of-users-ccjht01`. When not provided, a random value is automatically set.
|
|
5
|
+
[key : string] : any;
|
|
7
6
|
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
7
|
id:string;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @description A case-sensitive unique name for the feature. For example: `user license`, `data storage`, `Salesforce Integration`, `devices`, `UHD Streaming`, and so on.
|
|
14
|
-
**Note:** This name is not displayed on any customer-facing documents or pages such as [invoice PDFs](invoices#retrieve_invoice_as_pdf) or [hosted pages](hosted_pages). However, in the future, it is likely to be introduced on the [Self-Serve Portal](portal_sessions).
|
|
15
8
|
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
9
|
name:string;
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* @description A brief description of the feature. For example: `Access to 10TB cloud storage`.
|
|
22
10
|
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
11
|
description?:string;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* @description The current status of the feature. \* active - A `draft` or an `archived` feature can be changed to `active`. Any [item](item_entitlements) or [subscription entitlements](subscription_entitlements) defined for the feature take effect immediately. \* draft - The feature is in an unpublished state. [Item](item_entitlements) and [subscription entitlements](subscription_entitlements) can be created for a draft feature but they are not effective until the feature is active. A feature `status` cannot be changed back to `draft` once it is in `active` or `archived` `status`. \* archived - An `active` feature can be changed to `archived`. Once `archived`, no **new** [item](item_entitlements) or [subscription entitlements](subscription_entitlements) can be created for the feature. However, any pre-existing item or subscription entitlements from the time that the feature was `active`, remain effective.
|
|
29
12
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
status?:'archived' | 'draft' | 'active';
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* @description The type of feature. \* quantity - The feature is quantity-based and entitlement levels available for it are a set of predefined number of quantity units. For example, a feature with `name` such as `number of users` can have entitlement levels of say, `5`, `20`, `50`, and `100`. `levels[is_unlimited]` is used for specifying the "unlimited" entitlement level. \* range - The feature is quantity-based and the entitlement levels available for it are the set of whole numbers within a range. The range is defined by a minimum and a maximum value. For example, a feature such as `number of users` can have entitlement levels starting at `5` users and go up to `50000`. `levels[is_unlimited]` is used for specifying the "unlimited" entitlement level. \* switch - A switch or toggle is a feature that an item or subscription can be either fully entitled to or not entitled to at all. \* custom - The entitlement levels available for this feature are defined as a set of custom values. For example, a feature `Email Support` can have entitlement levels as `24×7` and `24×5`.
|
|
13
|
+
status?:'active' | 'archived' | 'draft';
|
|
36
14
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
type?:'quantity' | 'custom' | 'range' | 'switch';
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* @description For features of `type` `quantity` or `range`, this specifies the unit of measure. The value is expected in the singular form and when used by the system, it is pluralized automatically as needed. For example, for a feature such as `user licenses`, the `unit` can be `license`.
|
|
15
|
+
type?:'switch' | 'custom' | 'quantity' | 'range';
|
|
43
16
|
|
|
44
|
-
*/
|
|
45
|
-
|
|
46
17
|
unit?:string;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* @description The version number of this resource. For every change made to the resource, `resource_version` is updated with a new timestamp in milliseconds.
|
|
50
18
|
|
|
51
|
-
*/
|
|
52
|
-
|
|
53
19
|
resource_version?:number;
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* @description The version number of this resource. For every change made to the resource, `resource_version` is updated with a new timestamp in milliseconds.
|
|
57
20
|
|
|
58
|
-
*/
|
|
59
|
-
|
|
60
21
|
updated_at?:number;
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* @description When the feature was created.
|
|
64
22
|
|
|
65
|
-
*/
|
|
66
|
-
|
|
67
23
|
created_at:number;
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* @description An ordered list of entitlement levels available for the feature. This is only applicable when `type` is other than `switch`.
|
|
71
|
-
**Note:** When the `type` of the feature is `switch`, this is not applicable. This is because any given item (or subscription) can be either fully entitled to a `switch` feature or not entitled at all; there are no intermediate entitlement levels.
|
|
72
24
|
|
|
73
|
-
*/
|
|
74
|
-
|
|
75
25
|
levels?:Feature.Level[];
|
|
26
|
+
|
|
76
27
|
}
|
|
77
28
|
export namespace Feature {
|
|
78
29
|
export class FeatureResource {
|
|
79
|
-
/**
|
|
80
|
-
* @description "This API fetches all the available features. " If the limit parameter is not set, it will return upto 10 features. "
|
|
81
|
-
|
|
82
|
-
*/
|
|
83
|
-
|
|
84
30
|
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
85
31
|
|
|
86
|
-
/**
|
|
87
|
-
* @description Creates a new feature and optionally defines the <item_entitlements> for it.
|
|
88
|
-
|
|
89
|
-
*/
|
|
90
|
-
|
|
91
32
|
create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
|
|
92
33
|
|
|
93
|
-
/**
|
|
94
|
-
* @description Updates a specific feature.
|
|
95
|
-
**Note**
|
|
96
|
-
|
|
97
|
-
The list of objects `levels[]` provided as part of this operation fully replaces the existing
|
|
98
|
-
list of objects [levels[]](features#feature_levels) of the feature.
|
|
99
|
-
|
|
100
|
-
### Considerations when modifying `levels` {#considerations}
|
|
101
|
-
|
|
102
|
-
This section describes validations that are performed by Chargebee when modifying the `levels` list of
|
|
103
|
-
objects for the feature, using this operation.
|
|
104
|
-
|
|
105
|
-
#### Adding `levels` {#adding}
|
|
106
|
-
|
|
107
|
-
Adding a new object to the `levels[]` list is allowed if and only if the feature [type](features#feature_type) is `quantity` or `custom`
|
|
108
|
-
|
|
109
|
-
#### Removing `levels` {#removing}
|
|
110
|
-
|
|
111
|
-
Removing an existing object in the `levels[]` list is not allowed if the `value` for that
|
|
112
|
-
object is currently mapped to one or more [item_entitlement](item_entitlements)s or
|
|
113
|
-
[subscription_entitlement](subscription_entitlements)s.
|
|
114
|
-
|
|
115
|
-
#### Reordering `levels` {#reorder}
|
|
116
|
-
|
|
117
|
-
**Note**
|
|
118
|
-
|
|
119
|
-
The validation described in this section is only applicable for features of `type`
|
|
120
|
-
`custom`
|
|
121
|
-
|
|
122
|
-
If any of `levels[].value` are currently mapped to `item_entitlement`s or `subscription_entitlement`s,
|
|
123
|
-
then the relative order of the corresponding `levels[].level` must be preserved when invoking this
|
|
124
|
-
operation.
|
|
125
|
-
|
|
126
|
-
For example, consider that the `levels[]` list is currently in the state shown below. (For brevity,
|
|
127
|
-
only the `value` and `level` key are shown here and the JSONs have been compacted.)
|
|
128
|
-
`
|
|
129
|
-
{
|
|
130
|
-
"levels":[{
|
|
131
|
-
"value":"email-basic",
|
|
132
|
-
"level":0
|
|
133
|
-
},{
|
|
134
|
-
"value":"email-rise",
|
|
135
|
-
"level":1
|
|
136
|
-
},{
|
|
137
|
-
"value":"email-advanced",
|
|
138
|
-
"level":2
|
|
139
|
-
},{
|
|
140
|
-
"value":"email-pro",
|
|
141
|
-
"level":3
|
|
142
|
-
},{
|
|
143
|
-
"value":"email-scale",
|
|
144
|
-
"level":4
|
|
145
|
-
}]
|
|
146
|
-
}
|
|
147
|
-
`
|
|
148
|
-
|
|
149
|
-
Now consider that `email-rise`, `email-advanced`, and `email-pro` have already
|
|
150
|
-
been mapped to `item_entitlement`s or `subscription_entitlement`s. As seen in the above
|
|
151
|
-
object, the relative order of `levels[].level` is such that `email-rise` \< `email-advanced`
|
|
152
|
-
\< `email-pro`.
|
|
153
|
-
|
|
154
|
-
Invoking this API to change `levels[]` to the state below is allowed since the relative order of
|
|
155
|
-
`level` corresponding to `email-rise`, `email-advanced`, and
|
|
156
|
-
`email-pro` has been preserved.
|
|
157
|
-
`
|
|
158
|
-
{
|
|
159
|
-
"levels":[{
|
|
160
|
-
"value":"email-basic",
|
|
161
|
-
"level":0
|
|
162
|
-
},{
|
|
163
|
-
"value":"email-rise",
|
|
164
|
-
"level":1
|
|
165
|
-
},{
|
|
166
|
-
"value":"email-scale",
|
|
167
|
-
"level":2
|
|
168
|
-
},{
|
|
169
|
-
"value":"email-advanced",
|
|
170
|
-
"level":3
|
|
171
|
-
},{
|
|
172
|
-
"value":"email-pro",
|
|
173
|
-
"level":4
|
|
174
|
-
}]
|
|
175
|
-
}
|
|
176
|
-
`
|
|
177
|
-
|
|
178
|
-
However, changing `levels[]` to the state shown below is not permissible because the
|
|
179
|
-
`level` of `email-advanced` is provided as greater than the `level` of `email-pro`,
|
|
180
|
-
thereby disrupting the original order.
|
|
181
|
-
`
|
|
182
|
-
{
|
|
183
|
-
"levels":[{
|
|
184
|
-
"value":"email-basic",
|
|
185
|
-
"level":0
|
|
186
|
-
},{
|
|
187
|
-
"value":"email-rise",
|
|
188
|
-
"level":1
|
|
189
|
-
},{
|
|
190
|
-
"value":"email-pro",
|
|
191
|
-
"level":2
|
|
192
|
-
},{
|
|
193
|
-
"value":"email-advanced",
|
|
194
|
-
"level":3
|
|
195
|
-
},{
|
|
196
|
-
"value":"email-scale",
|
|
197
|
-
"level":4
|
|
198
|
-
}]
|
|
199
|
-
}
|
|
200
|
-
`
|
|
201
|
-
|
|
202
|
-
*/
|
|
203
|
-
|
|
204
34
|
update(feature_id:string, input?:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
|
|
205
35
|
|
|
206
|
-
/**
|
|
207
|
-
* @description Retrieve a specific feature using its id.
|
|
208
|
-
|
|
209
|
-
*/
|
|
210
|
-
|
|
211
36
|
retrieve(feature_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
212
37
|
|
|
213
|
-
/**
|
|
214
|
-
* @description Deletes a feature. Any item entitlements and subscription entitlements defined for the feature are also removed. This action is not permissible when the `status` of the feature is `active`.
|
|
215
|
-
|
|
216
|
-
*/
|
|
217
|
-
|
|
218
38
|
delete(feature_id:string):ChargebeeRequest<DeleteResponse>;
|
|
219
39
|
|
|
220
|
-
/**
|
|
221
|
-
* @description Activates a `draft` feature so that any [item](item_entitlements) or [subscription entitlements](subscription_entitlements) defined towards it take effect immediately. This operation changes the [status](features#feature_status) of the feature to `active`. The feature `status` must be `draft` when calling this endpoint.
|
|
222
|
-
|
|
223
|
-
*/
|
|
224
|
-
|
|
225
40
|
activate(feature_id:string):ChargebeeRequest<ActivateResponse>;
|
|
226
41
|
|
|
227
|
-
/**
|
|
228
|
-
* @description Archives an `active` feature so that no **new** [item](item_entitlements) or [subscription entitlements](subscription_entitlements) can be created towards the feature. Any pre-existing item or subscription entitlements from the time that the feature was `active` remain effective. This operation changes the [status](features#feature_status) of the feature to `archived`. The feature `status` must be `active` when calling this endpoint.
|
|
229
|
-
|
|
230
|
-
*/
|
|
231
|
-
|
|
232
42
|
archive(feature_id:string):ChargebeeRequest<ArchiveResponse>;
|
|
233
43
|
|
|
234
|
-
/**
|
|
235
|
-
* @description Reactivates an archived feature so that **new** [item](item_entitlements) or [subscription entitlements](subscription_entitlements) can be created towards the feature. This operation changes the [status](features#feature_status) of the feature to `active`. The feature `status` must be `archived` when calling this endpoint.
|
|
236
|
-
|
|
237
|
-
*/
|
|
238
|
-
|
|
239
44
|
reactivate(feature_id:string):ChargebeeRequest<ReactivateResponse>;
|
|
240
45
|
}
|
|
241
46
|
export interface ListResponse {
|
|
242
|
-
/**
|
|
243
|
-
* @description "This API fetches all the available features. " If the limit parameter is not set, it will return upto 10 features. "
|
|
244
|
-
|
|
245
|
-
*/
|
|
246
|
-
|
|
247
47
|
list:{feature:Feature}[];
|
|
248
48
|
|
|
249
|
-
/**
|
|
250
|
-
* @description "This API fetches all the available features. " If the limit parameter is not set, it will return upto 10 features. "
|
|
251
|
-
|
|
252
|
-
*/
|
|
253
|
-
|
|
254
49
|
next_offset?:string;
|
|
255
50
|
}
|
|
256
51
|
export interface ListInputParam {
|
|
257
52
|
[key : string]: any;
|
|
258
53
|
/**
|
|
259
|
-
* @description
|
|
54
|
+
* @description The number of resources to be returned.
|
|
260
55
|
|
|
261
56
|
*/
|
|
262
57
|
|
|
263
58
|
limit?:number;
|
|
264
59
|
|
|
265
60
|
/**
|
|
266
|
-
* @description
|
|
61
|
+
* @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.
|
|
267
62
|
|
|
268
63
|
*/
|
|
269
64
|
|
|
270
65
|
offset?:string;
|
|
271
66
|
|
|
272
67
|
/**
|
|
273
|
-
* @description
|
|
68
|
+
* @description A case-sensitive unique name for the feature. For example: `user license`, `data storage`, `Salesforce Integration`, `devices`, `UHD Streaming`, and so on.
|
|
69
|
+
**Note:** This name is not displayed on any customer-facing documents or pages such as [invoice PDFs](invoices#retrieve_invoice_as_pdf) or [hosted pages](hosted_pages). However, in the future, it is likely to be introduced on the [Self-Serve Portal](portal_sessions).
|
|
274
70
|
|
|
275
71
|
*/
|
|
276
72
|
|
|
277
73
|
name?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
278
74
|
|
|
279
75
|
/**
|
|
280
|
-
* @description
|
|
76
|
+
* @description A unique and immutable identifier for the feature. You can set it yourself, in which case it is recommended that a human-readable format (or slug) be used. For example, `number-of-users-ccjht01`. When not provided, a random value is automatically set.
|
|
281
77
|
|
|
282
78
|
*/
|
|
283
79
|
|
|
284
80
|
id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
285
81
|
|
|
286
82
|
/**
|
|
287
|
-
* @description
|
|
83
|
+
* @description The current status of the feature.
|
|
288
84
|
|
|
289
85
|
*/
|
|
290
86
|
|
|
291
|
-
status?:{in?:string,is?:'
|
|
87
|
+
status?:{in?:string,is?:'active' | 'archived' | 'draft',is_not?:'active' | 'archived' | 'draft',not_in?:string};
|
|
292
88
|
|
|
293
89
|
/**
|
|
294
|
-
* @description
|
|
90
|
+
* @description The type of feature.
|
|
295
91
|
|
|
296
92
|
*/
|
|
297
93
|
|
|
298
|
-
type?:{in?:string,is?:'
|
|
94
|
+
type?:{in?:string,is?:'switch' | 'custom' | 'quantity' | 'range',is_not?:'switch' | 'custom' | 'quantity' | 'range',not_in?:string};
|
|
299
95
|
}
|
|
300
96
|
export interface CreateResponse {
|
|
301
97
|
feature:Feature;
|
|
302
98
|
}
|
|
303
99
|
export interface CreateInputParam {
|
|
304
100
|
[key : string] : any;
|
|
305
|
-
|
|
306
|
-
* @description A unique and immutable identifier for the feature. You can set it yourself, in which case it is recommended that a human-readable format (or slug) be used. For example, `number-of-users-ccjht01`. When not provided, a random value is automatically set.
|
|
307
|
-
|
|
308
|
-
*/
|
|
101
|
+
levels?:{is_unlimited?:boolean,level?:number,name?:string,value?:string}[];
|
|
309
102
|
|
|
310
103
|
id?:string;
|
|
311
104
|
|
|
312
|
-
/**
|
|
313
|
-
* @description A case-sensitive unique name for the feature. For example: `user license`, `data storage`, `Salesforce Integration`, `devices`, `UHD Streaming`, and so on.
|
|
314
|
-
**Note:** This name is not displayed on any customer-facing documents or pages such as [invoice PDFs](invoices#retrieve_invoice_as_pdf) or [hosted pages](hosted_pages). However, in the future, it is likely to be introduced on the [Self-Serve Portal](portal_sessions).
|
|
315
|
-
|
|
316
|
-
*/
|
|
317
|
-
|
|
318
105
|
name:string;
|
|
319
106
|
|
|
320
|
-
/**
|
|
321
|
-
* @description A brief description of the feature. For example: `Access to 10TB cloud storage`.
|
|
322
|
-
|
|
323
|
-
*/
|
|
324
|
-
|
|
325
107
|
description?:string;
|
|
326
108
|
|
|
327
|
-
|
|
328
|
-
* @description The type of feature. \* quantity - The feature is quantity-based and entitlement levels available for it are a set of predefined number of quantity units. For example, a feature with `name` such as `number of users` can have entitlement levels of say, `5`, `20`, `50`, and `100`. `levels[is_unlimited]` is used for specifying the "unlimited" entitlement level. \* range - The feature is quantity-based and the entitlement levels available for it are the set of whole numbers within a range. The range is defined by a minimum and a maximum value. For example, a feature such as `number of users` can have entitlement levels starting at `5` users and go up to `50000`. `levels[is_unlimited]` is used for specifying the "unlimited" entitlement level. \* switch - A switch or toggle is a feature that an item or subscription can be either fully entitled to or not entitled to at all. \* custom - The entitlement levels available for this feature are defined as a set of custom values. For example, a feature `Email Support` can have entitlement levels as `24×7` and `24×5`.
|
|
329
|
-
|
|
330
|
-
*/
|
|
331
|
-
|
|
332
|
-
type?:'quantity' | 'custom' | 'range' | 'switch';
|
|
333
|
-
|
|
334
|
-
/**
|
|
335
|
-
* @description The current status of the feature. \* active - A `draft` or an `archived` feature can be changed to `active`. Any [item](item_entitlements) or [subscription entitlements](subscription_entitlements) defined for the feature take effect immediately. \* draft - The feature is in an unpublished state. [Item](item_entitlements) and [subscription entitlements](subscription_entitlements) can be created for a draft feature but they are not effective until the feature is active. A feature `status` cannot be changed back to `draft` once it is in `active` or `archived` `status`. \* archived - An `active` feature can be changed to `archived`. Once `archived`, no **new** [item](item_entitlements) or [subscription entitlements](subscription_entitlements) can be created for the feature. However, any pre-existing item or subscription entitlements from the time that the feature was `active`, remain effective.
|
|
336
|
-
|
|
337
|
-
*/
|
|
338
|
-
|
|
339
|
-
status?:'draft' | 'active';
|
|
340
|
-
|
|
341
|
-
/**
|
|
342
|
-
* @description For features of `type` `quantity` or `range`, this specifies the unit of measure. The value is expected in the singular form and when used by the system, it is pluralized automatically as needed. For example, for a feature such as `user licenses`, the `unit` can be `license`.
|
|
343
|
-
|
|
344
|
-
*/
|
|
109
|
+
type?:'switch' | 'custom' | 'quantity' | 'range';
|
|
345
110
|
|
|
346
111
|
unit?:string;
|
|
347
|
-
|
|
348
|
-
/**
|
|
349
|
-
* @description Parameters for levels
|
|
350
|
-
|
|
351
|
-
*/
|
|
352
|
-
|
|
353
|
-
levels?:{is_unlimited?:boolean,level?:number,name?:string,value?:string}[];
|
|
354
112
|
}
|
|
355
113
|
export interface UpdateResponse {
|
|
356
114
|
feature:Feature;
|
|
357
115
|
}
|
|
358
116
|
export interface UpdateInputParam {
|
|
359
117
|
[key : string] : any;
|
|
360
|
-
|
|
361
|
-
* @description A case-sensitive unique name for the feature. For example: `user license`, `data storage`, `Salesforce Integration`, `devices`, `UHD Streaming`, and so on.
|
|
362
|
-
**Note:** This name is not displayed on any customer-facing documents or pages such as [invoice PDFs](invoices#retrieve_invoice_as_pdf) or [hosted pages](hosted_pages). However, in the future, it is likely to be introduced on the [Self-Serve Portal](portal_sessions).
|
|
363
|
-
|
|
364
|
-
*/
|
|
118
|
+
levels?:{is_unlimited?:boolean,level?:number,name?:string,value?:string}[];
|
|
365
119
|
|
|
366
120
|
name?:string;
|
|
367
121
|
|
|
368
|
-
/**
|
|
369
|
-
* @description A brief description of the feature. For example: `Access to 10TB cloud storage`.
|
|
370
|
-
|
|
371
|
-
*/
|
|
372
|
-
|
|
373
122
|
description?:string;
|
|
374
123
|
|
|
375
|
-
/**
|
|
376
|
-
* @description The current status of the feature. \* active - A `draft` or an `archived` feature can be changed to `active`. Any [item](item_entitlements) or [subscription entitlements](subscription_entitlements) defined for the feature take effect immediately. \* draft - The feature is in an unpublished state. [Item](item_entitlements) and [subscription entitlements](subscription_entitlements) can be created for a draft feature but they are not effective until the feature is active. A feature `status` cannot be changed back to `draft` once it is in `active` or `archived` `status`. \* archived - An `active` feature can be changed to `archived`. Once `archived`, no **new** [item](item_entitlements) or [subscription entitlements](subscription_entitlements) can be created for the feature. However, any pre-existing item or subscription entitlements from the time that the feature was `active`, remain effective.
|
|
377
|
-
|
|
378
|
-
*/
|
|
379
|
-
|
|
380
|
-
status?:'archived' | 'draft' | 'active';
|
|
381
|
-
|
|
382
|
-
/**
|
|
383
|
-
* @description For features of `type` `quantity` or `range`, this specifies the unit of measure. The value is expected in the singular form and when used by the system, it is pluralized automatically as needed. For example, for a feature such as `user licenses`, the `unit` can be `license`.
|
|
384
|
-
|
|
385
|
-
*/
|
|
386
|
-
|
|
387
124
|
unit?:string;
|
|
388
|
-
|
|
389
|
-
/**
|
|
390
|
-
* @description Parameters for levels
|
|
391
|
-
|
|
392
|
-
*/
|
|
393
|
-
|
|
394
|
-
levels?:{is_unlimited?:boolean,level?:number,name?:string,value?:string}[];
|
|
395
125
|
}
|
|
396
126
|
export interface RetrieveResponse {
|
|
397
127
|
feature:Feature;
|
|
@@ -414,44 +144,12 @@ thereby disrupting the original order.
|
|
|
414
144
|
}
|
|
415
145
|
|
|
416
146
|
export interface Level {
|
|
417
|
-
/**
|
|
418
|
-
* @description A case-sensitive display name for the entitlement level. Provide a name that helps you clearly identify the entitlement level. For example: a feature such as `Email Support` can have entitlement levels named as `All weekdays`, `All days`, `40 hours per week` and so on. When not provided for `feature.type` `quantity` or `range`, this name is auto-generated as the space-separated concatenation of `levels[].value` and the pluralized version of `unit`. For example, if `levels[].value` is `20` and `unit` is `user`, then `levels[].name` becomes `20 users`.
|
|
419
|
-
|
|
420
|
-
*/
|
|
421
|
-
|
|
422
147
|
name?:string;
|
|
423
148
|
|
|
424
|
-
/**
|
|
425
|
-
* @description The value denoting the entitlement level granted.
|
|
426
|
-
|
|
427
|
-
* **When `type` is `quantity`:** this attribute denotes the quantity of units of the feature for this entitlement level. For example, a feature such as `number of users` can have `levels[].value` as `5`, `20`, `50`, and `100`. `levels[].is_unlimited` is used to set the entitlement level to "unlimited".
|
|
428
|
-
* **When `type` is `range`:** there can be be only two elements in the `levels[]` array; one corresponding to the minimum value (`levels[0]`) and the other to the maximum value (`levels[1]`) of the range of possible entitlement levels. For example, a feature such as `number of users` may have `levels[0].value` = `5` and `levels[1].value` = `50000`. When the upper limit is "unlimited", then `levels[1].value` is not set and `levels[1].is_unlimited` is `true`.
|
|
429
|
-
* **When `type` is `custom`:** this attribute denotes the value of this custom entitlement level. For example, a feature `Email Support` can have `levels[].value` as one of say, `24×7` and `24×5`.
|
|
430
|
-
|
|
431
|
-
*/
|
|
432
|
-
|
|
433
149
|
value:string;
|
|
434
150
|
|
|
435
|
-
/**
|
|
436
|
-
* @description This attribute represents the order of the entitlement levels from lowest to highest.
|
|
437
|
-
|
|
438
|
-
* When `type` is `quantity` or `custom`: The lowest entitlement level has the value `0`, the next higher level has the value `1`, followed by `2`, and so on.
|
|
439
|
-
* When `type` is `range`: This attribute is `0` for the minimum value and `1` for the maximum value in the range.
|
|
440
|
-
|
|
441
|
-
When not defined, it is assumed as the index of the `levels[]` array.
|
|
442
|
-
|
|
443
|
-
*/
|
|
444
|
-
|
|
445
151
|
level:number;
|
|
446
152
|
|
|
447
|
-
/**
|
|
448
|
-
* @description When `type` is `quantity` or `range`, this attribute indicates whether the entitlement level corresponds to unlimited units of the feature. Possible values:
|
|
449
|
-
|
|
450
|
-
* `true`: The entitlement level corresponds to unlimited units of the feature. `levels[].value` is ignored for this level. This can only be set for the level that has the highest value for `levels[].level.`
|
|
451
|
-
* `false`: The entitlement level does not correspond to unlimited units of the feature.
|
|
452
|
-
|
|
453
|
-
*/
|
|
454
|
-
|
|
455
153
|
is_unlimited:boolean;
|
|
456
154
|
}
|
|
457
155
|
}
|
|
@@ -1,78 +1,36 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
2
3
|
declare module 'chargebee' {
|
|
3
4
|
export interface GatewayErrorDetail {
|
|
4
5
|
|
|
5
|
-
/**
|
|
6
|
-
* @description This is a unique identifier assigned by the payment gateway. It is used to track the request at the payment gateway
|
|
7
6
|
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
7
|
request_id?:string;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @description This parameter categorizes the type of error that occurred for the request. It helps in understanding whether the error is due to API error, validation, processing, network issues, and more
|
|
14
8
|
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
9
|
error_category?:string;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* @description A gateway-specific code that corresponds to the particular error encountered for the request. This code can be used for identifying the error in a standardized manner across the gateway's services
|
|
21
10
|
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
11
|
error_code?:string;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @description A message provided by the gateway that describes the nature of the error encountered
|
|
28
12
|
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
13
|
error_message?:string;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @description When a transaction is declined, this code is provided by the gateway to specify the reason for the decline
|
|
35
14
|
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
15
|
decline_code?:string;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* @description This message gives a descriptive explanation of the reason for the transaction's decline
|
|
42
16
|
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
17
|
decline_message?:string;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* @description This code represents errors that originate from the payment network (such as Visa, MasterCard, and more). It is different from the gateway error code and is specific to the network's error-handling system
|
|
49
18
|
|
|
50
|
-
*/
|
|
51
|
-
|
|
52
19
|
network_error_code?:string;
|
|
53
|
-
|
|
20
|
+
|
|
54
21
|
network_error_message?:string;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* @description This parameter indicates which specific data field or attribute in the request caused the error
|
|
58
22
|
|
|
59
|
-
*/
|
|
60
|
-
|
|
61
23
|
error_field?:string;
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* @description After an error has occurred, the gateway or payment network may provide a recommendation code. This code suggests a course of action or remedy that you can follow to resolve the issue
|
|
65
24
|
|
|
66
|
-
*/
|
|
67
|
-
|
|
68
25
|
recommendation_code?:string;
|
|
69
|
-
|
|
26
|
+
|
|
70
27
|
recommendation_message?:string;
|
|
71
|
-
|
|
28
|
+
|
|
72
29
|
processor_error_code?:string;
|
|
73
|
-
|
|
30
|
+
|
|
74
31
|
processor_error_message?:string;
|
|
75
32
|
|
|
76
33
|
error_cause_id?:string;
|
|
34
|
+
|
|
77
35
|
}
|
|
78
36
|
}
|