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,240 +1,103 @@
|
|
|
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 ItemEntitlement {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @description The `id` of the `item` to which this entitlement belongs.
|
|
14
|
-
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
item_id?:string;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* @description The `type` of the `item` to which this entitlement belongs. \* charge - Charge \* item - Item \* subscription - Subscription \* addon - Addon \* plan - Plan
|
|
21
|
-
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
item_type?:'item' | 'charge' | 'addon' | 'subscription' | 'plan';
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @description The `id` of the feature towards which this entitlement has been granted.
|
|
28
|
-
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
feature_id?:string;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @description The `name` of the `feature` towards which this entitlement has been granted.
|
|
35
|
-
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
|
-
feature_name?:string;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* @description The level of entitlement that the item has towards the feature. The possible values depend on the value of `feature.type`:
|
|
42
|
-
|
|
43
|
-
* When `feature.type` is `quantity` and:
|
|
44
|
-
* 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][]`.
|
|
45
|
-
* If `feature.levels[is_unlimited]` is `true` for one of the `feature.levels[]`, then the value can also be:
|
|
46
|
-
* any one of `feature.levels[value][]`
|
|
47
|
-
* or it can be `unlimited` (case-insensitive), indicating unlimited entitlement.
|
|
48
|
-
* When `type` is `range` and:
|
|
49
|
-
* 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).
|
|
50
|
-
* If `feature.levels[is_unlimited]` is `true` for one of the `feature.levels[]`, then the value can be:
|
|
51
|
-
* any whole number equal to or greater than `levels[value][0]`
|
|
52
|
-
* or it can be `unlimited` (case-insensitive), indicating unlimited entitlement.
|
|
53
|
-
* When `type` is `custom`, then the value can be any one of `feature.levels[value][]`.
|
|
54
|
-
* When `type` is `switch`, then the value is set as `available` or `true`.
|
|
55
|
-
|
|
56
|
-
*/
|
|
57
|
-
|
|
58
|
-
value?:string;
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* @description The display name for the entitlement level. The default values are auto-generated based on `feature.type` as follows:
|
|
62
|
-
|
|
63
|
-
* 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`.
|
|
64
|
-
* When `feature.type` is `custom`, then `name` is the same as `value`.a
|
|
65
|
-
|
|
66
|
-
*/
|
|
67
|
-
|
|
68
|
-
name?:string;
|
|
6
|
+
id: string;
|
|
7
|
+
item_id?: string;
|
|
8
|
+
item_type?: 'plan' | 'addon' | 'charge' | 'subscription' | 'item';
|
|
9
|
+
feature_id?: string;
|
|
10
|
+
feature_name?: string;
|
|
11
|
+
value?: string;
|
|
12
|
+
name?: string;
|
|
69
13
|
}
|
|
70
|
-
export namespace ItemEntitlement {
|
|
71
|
-
export class ItemEntitlementResource {
|
|
72
|
-
/**
|
|
73
|
-
* @description **Deprecated**
|
|
74
14
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* @description **Deprecated**
|
|
105
|
-
|
|
106
|
-
This endpoint remains operational, but we recommend transitioning to its successor: [Manage entitlements](entitlements?prod_cat_ver=2#upsert_or_remove_entitlements_for_a_feature).
|
|
107
|
-
|
|
108
|
-
Upserts or removes a set of `item_entitlements` for an [item](items?prod_cat_ver=2) depending on the `action` specified. The API returns the upserted or deleted `item_entitlements` after successfully completing the operation. The operation returns an error when the first `item_entitlement` fails to be processed. Either all the `item_entitlement`s provided in the request are processed or none.
|
|
109
|
-
|
|
110
|
-
*/
|
|
111
|
-
|
|
112
|
-
upsert_or_remove_item_entitlements_for_item(item_id:string, input:UpsertOrRemoveItemEntitlementsForItemInputParam):ChargebeeRequest<UpsertOrRemoveItemEntitlementsForItemResponse>;
|
|
15
|
+
export namespace ItemEntitlement {
|
|
16
|
+
export class ItemEntitlementResource {
|
|
17
|
+
itemEntitlementsForItem(
|
|
18
|
+
item_id: string,
|
|
19
|
+
input?: ItemEntitlementsForItemInputParam,
|
|
20
|
+
headers?: ChargebeeRequestHeader,
|
|
21
|
+
): Promise<ChargebeeResponse<ItemEntitlementsForItemResponse>>;
|
|
22
|
+
|
|
23
|
+
itemEntitlementsForFeature(
|
|
24
|
+
feature_id: string,
|
|
25
|
+
input?: ItemEntitlementsForFeatureInputParam,
|
|
26
|
+
headers?: ChargebeeRequestHeader,
|
|
27
|
+
): Promise<ChargebeeResponse<ItemEntitlementsForFeatureResponse>>;
|
|
28
|
+
|
|
29
|
+
addItemEntitlements(
|
|
30
|
+
feature_id: string,
|
|
31
|
+
input: AddItemEntitlementsInputParam,
|
|
32
|
+
headers?: ChargebeeRequestHeader,
|
|
33
|
+
): Promise<ChargebeeResponse<AddItemEntitlementsResponse>>;
|
|
34
|
+
|
|
35
|
+
upsertOrRemoveItemEntitlementsForItem(
|
|
36
|
+
item_id: string,
|
|
37
|
+
input: UpsertOrRemoveItemEntitlementsForItemInputParam,
|
|
38
|
+
headers?: ChargebeeRequestHeader,
|
|
39
|
+
): Promise<
|
|
40
|
+
ChargebeeResponse<UpsertOrRemoveItemEntitlementsForItemResponse>
|
|
41
|
+
>;
|
|
113
42
|
}
|
|
114
|
-
export interface ItemEntitlementsForItemResponse {
|
|
115
|
-
/**
|
|
116
|
-
* @description **Deprecated**
|
|
117
43
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
*/
|
|
122
|
-
|
|
123
|
-
list:{item_entitlement:ItemEntitlement}[];
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* @description **Deprecated**
|
|
127
|
-
|
|
128
|
-
This endpoint remains operational, but we recommend transitioning to its successor: [List entitlements](entitlements?prod_cat_ver=2#list_all_entitlements).
|
|
129
|
-
Retrieves a list of all the `item_entitlements` for the `item` specified.
|
|
130
|
-
|
|
131
|
-
*/
|
|
132
|
-
|
|
133
|
-
next_offset?:string;
|
|
44
|
+
export interface ItemEntitlementsForItemResponse {
|
|
45
|
+
list: { item_entitlement: ItemEntitlement }[];
|
|
46
|
+
next_offset?: string;
|
|
134
47
|
}
|
|
135
|
-
export interface ItemEntitlementsForItemInputParam {
|
|
136
|
-
[key : string]: any;
|
|
137
|
-
/**
|
|
138
|
-
* @description **Deprecated**
|
|
139
|
-
|
|
140
|
-
This endpoint remains operational, but we recommend transitioning to its successor: [List entitlements](entitlements?prod_cat_ver=2#list_all_entitlements).
|
|
141
|
-
Retrieves a list of all the `item_entitlements` for the `item` specified.
|
|
142
48
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* @description **Deprecated**
|
|
49
|
+
export interface ItemEntitlementsForFeatureResponse {
|
|
50
|
+
list: { item_entitlement: ItemEntitlement }[];
|
|
51
|
+
next_offset?: string;
|
|
52
|
+
}
|
|
149
53
|
|
|
150
|
-
|
|
151
|
-
|
|
54
|
+
export interface AddItemEntitlementsResponse {
|
|
55
|
+
item_entitlement: ItemEntitlement;
|
|
56
|
+
}
|
|
152
57
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
offset?:string;
|
|
58
|
+
export interface UpsertOrRemoveItemEntitlementsForItemResponse {
|
|
59
|
+
item_entitlement: ItemEntitlement;
|
|
156
60
|
}
|
|
157
|
-
export interface ItemEntitlementsForFeatureResponse {
|
|
158
|
-
/**
|
|
159
|
-
* @description **Deprecated**
|
|
160
61
|
|
|
161
|
-
|
|
162
|
-
|
|
62
|
+
// REQUEST PARAMS
|
|
63
|
+
//---------------
|
|
163
64
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
* @description **Deprecated**
|
|
65
|
+
export interface ItemEntitlementsForItemInputParam {
|
|
66
|
+
limit?: number;
|
|
67
|
+
offset?: string /**
|
|
68
|
+
* @deprecated Please refer API docs to use other attributes
|
|
69
|
+
*/;
|
|
170
70
|
|
|
171
|
-
|
|
172
|
-
|
|
71
|
+
include_drafts?: boolean /**
|
|
72
|
+
* @deprecated Please refer API docs to use other attributes
|
|
73
|
+
*/;
|
|
173
74
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
next_offset?:string;
|
|
75
|
+
embed?: string;
|
|
177
76
|
}
|
|
178
77
|
export interface ItemEntitlementsForFeatureInputParam {
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
This endpoint remains operational, but we recommend transitioning to its successor: [List entitlements](entitlements?prod_cat_ver=2#list_all_entitlements).
|
|
184
|
-
Retrieves a list of all the `item_entitlement`s for the `feature` specified.
|
|
185
|
-
|
|
186
|
-
*/
|
|
187
|
-
|
|
188
|
-
limit?:number;
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
* @description **Deprecated**
|
|
78
|
+
limit?: number;
|
|
79
|
+
offset?: string /**
|
|
80
|
+
* @deprecated Please refer API docs to use other attributes
|
|
81
|
+
*/;
|
|
192
82
|
|
|
193
|
-
|
|
194
|
-
Retrieves a list of all the `item_entitlement`s for the `feature` specified.
|
|
195
|
-
|
|
196
|
-
*/
|
|
197
|
-
|
|
198
|
-
offset?:string;
|
|
199
|
-
}
|
|
200
|
-
export interface AddItemEntitlementsResponse {
|
|
201
|
-
item_entitlement:ItemEntitlement;
|
|
83
|
+
include_drafts?: boolean;
|
|
202
84
|
}
|
|
203
85
|
export interface AddItemEntitlementsInputParam {
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
* @description The specific action to be performed for each `item_entitlement` specified. \* remove - Deletes the `item_entitlement` for the `feature_id` and `item_id` combination, if it exists. \* upsert - If the `item_entitlement` already exists for the `feature_id` and `item_id` combination, the `value` of the `item_entitlement` is updated. If it doesn't exist, a new `item_entitelment` is created.
|
|
207
|
-
|
|
208
|
-
*/
|
|
209
|
-
|
|
210
|
-
action:Action;
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* @description Parameters for item_entitlements
|
|
214
|
-
|
|
215
|
-
*/
|
|
216
|
-
|
|
217
|
-
item_entitlements?:{item_id:string,item_type?:'item' | 'charge' | 'addon' | 'subscription' | 'plan',value?:string}[];
|
|
218
|
-
}
|
|
219
|
-
export interface UpsertOrRemoveItemEntitlementsForItemResponse {
|
|
220
|
-
item_entitlement:ItemEntitlement;
|
|
86
|
+
action: Action;
|
|
87
|
+
item_entitlements?: ItemEntitlementsAddItemEntitlementsInputParam[];
|
|
221
88
|
}
|
|
222
89
|
export interface UpsertOrRemoveItemEntitlementsForItemInputParam {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
*/
|
|
235
|
-
|
|
236
|
-
item_entitlements?:{feature_id:string,value?:string}[];
|
|
90
|
+
action: Action;
|
|
91
|
+
item_entitlements?: ItemEntitlementsUpsertOrRemoveItemEntitlementsForItemInputParam[];
|
|
92
|
+
}
|
|
93
|
+
export interface ItemEntitlementsAddItemEntitlementsInputParam {
|
|
94
|
+
item_id: string;
|
|
95
|
+
item_type?: 'plan' | 'addon' | 'charge' | 'subscription' | 'item';
|
|
96
|
+
value?: string;
|
|
97
|
+
}
|
|
98
|
+
export interface ItemEntitlementsUpsertOrRemoveItemEntitlementsForItemInputParam {
|
|
99
|
+
feature_id: string;
|
|
100
|
+
value?: string;
|
|
237
101
|
}
|
|
238
|
-
|
|
239
102
|
}
|
|
240
|
-
}
|
|
103
|
+
}
|
|
@@ -1,198 +1,89 @@
|
|
|
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 ItemFamily {
|
|
4
|
-
[key
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @description A unique display name for the item family. This is visible only in Chargebee and not to customers.
|
|
14
|
-
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
name:string;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* @description Description of the item family. This is visible only in Chargebee and not to customers.
|
|
21
|
-
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
description?:string;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @description Status of the item family. \* active - The item family is active and can be used to create new items. \* deleted - The item family has been deleted and cannot be used to create new items. The `id` and `name` can be reused to create a new item family.
|
|
28
|
-
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
status?:'deleted' | 'active';
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @description The version number of this resource. For every change made to the resource, `resource_version` is updated with a new timestamp in milliseconds.
|
|
35
|
-
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
|
-
resource_version?:number;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* @description When the item family was last updated.
|
|
42
|
-
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
|
-
updated_at?:number;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* @description The subscription channel this object originated from and is maintained in. \* app_store - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed. \* play_store - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed. \* web - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI.
|
|
49
|
-
|
|
50
|
-
*/
|
|
51
|
-
|
|
52
|
-
channel?:Channel;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
status?: 'active' | 'deleted';
|
|
11
|
+
resource_version?: number;
|
|
12
|
+
updated_at?: number;
|
|
13
|
+
channel?: Channel;
|
|
53
14
|
}
|
|
54
|
-
export namespace ItemFamily {
|
|
55
|
-
export class ItemFamilyResource {
|
|
56
|
-
/**
|
|
57
|
-
* @description This endpoint creates an item family for your product line or service.
|
|
58
|
-
|
|
59
|
-
*/
|
|
60
|
-
|
|
61
|
-
create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* @description This endpoint retrieves an item family based on the item family id.
|
|
65
|
-
|
|
66
|
-
*/
|
|
67
|
-
|
|
68
|
-
retrieve(item_family_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* @description Returns a list of item families satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
|
|
72
|
-
|
|
73
|
-
*/
|
|
74
|
-
|
|
75
|
-
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* @description This endpoint updates the name and/or description of the item family.
|
|
79
15
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
16
|
+
export namespace ItemFamily {
|
|
17
|
+
export class ItemFamilyResource {
|
|
18
|
+
create(
|
|
19
|
+
input: CreateInputParam,
|
|
20
|
+
headers?: ChargebeeRequestHeader,
|
|
21
|
+
): Promise<ChargebeeResponse<CreateResponse>>;
|
|
22
|
+
|
|
23
|
+
retrieve(
|
|
24
|
+
item_family_id: string,
|
|
25
|
+
headers?: ChargebeeRequestHeader,
|
|
26
|
+
): Promise<ChargebeeResponse<RetrieveResponse>>;
|
|
27
|
+
|
|
28
|
+
list(
|
|
29
|
+
input?: ListInputParam,
|
|
30
|
+
headers?: ChargebeeRequestHeader,
|
|
31
|
+
): Promise<ChargebeeResponse<ListResponse>>;
|
|
32
|
+
|
|
33
|
+
update(
|
|
34
|
+
item_family_id: string,
|
|
35
|
+
input?: UpdateInputParam,
|
|
36
|
+
headers?: ChargebeeRequestHeader,
|
|
37
|
+
): Promise<ChargebeeResponse<UpdateResponse>>;
|
|
38
|
+
|
|
39
|
+
delete(
|
|
40
|
+
item_family_id: string,
|
|
41
|
+
headers?: ChargebeeRequestHeader,
|
|
42
|
+
): Promise<ChargebeeResponse<DeleteResponse>>;
|
|
93
43
|
}
|
|
94
|
-
export interface CreateInputParam {
|
|
95
|
-
[key : string] : any;
|
|
96
|
-
/**
|
|
97
|
-
* @description The identifier for the item family. Must be unique and is immutable.
|
|
98
|
-
|
|
99
|
-
*/
|
|
100
|
-
|
|
101
|
-
id:string;
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* @description The display name for the item family. Must be unique. This is visible only in Chargebee and not to customers.
|
|
105
44
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
name:string;
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* @description Description of the item family. This is visible only in Chargebee and not to customers.
|
|
112
|
-
|
|
113
|
-
*/
|
|
114
|
-
|
|
115
|
-
description?:string;
|
|
116
|
-
}
|
|
117
|
-
export interface RetrieveResponse {
|
|
118
|
-
item_family:ItemFamily;
|
|
45
|
+
export interface CreateResponse {
|
|
46
|
+
item_family: ItemFamily;
|
|
119
47
|
}
|
|
120
|
-
|
|
121
|
-
export interface ListResponse {
|
|
122
|
-
/**
|
|
123
|
-
* @description Returns a list of item families satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
|
|
124
48
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
list:{item_family:ItemFamily}[];
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* @description Returns a list of item families satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
|
|
131
|
-
|
|
132
|
-
*/
|
|
133
|
-
|
|
134
|
-
next_offset?:string;
|
|
49
|
+
export interface RetrieveResponse {
|
|
50
|
+
item_family: ItemFamily;
|
|
135
51
|
}
|
|
136
|
-
export interface ListInputParam {
|
|
137
|
-
[key : string]: any;
|
|
138
|
-
/**
|
|
139
|
-
* @description Returns a list of item families satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
|
|
140
52
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* @description Returns a list of item families satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
|
|
53
|
+
export interface ListResponse {
|
|
54
|
+
list: { item_family: ItemFamily }[];
|
|
55
|
+
next_offset?: string;
|
|
56
|
+
}
|
|
147
57
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* @description Returns a list of item families satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
|
|
58
|
+
export interface UpdateResponse {
|
|
59
|
+
item_family: ItemFamily;
|
|
60
|
+
}
|
|
154
61
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* @description Returns a list of item families satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
|
|
62
|
+
export interface DeleteResponse {
|
|
63
|
+
item_family: ItemFamily;
|
|
64
|
+
}
|
|
161
65
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
name?:{is?:string,is_not?:string,starts_with?:string};
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* @description Returns a list of item families satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
|
|
66
|
+
// REQUEST PARAMS
|
|
67
|
+
//---------------
|
|
168
68
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
69
|
+
export interface CreateInputParam {
|
|
70
|
+
id: string;
|
|
71
|
+
name: string;
|
|
72
|
+
description?: string;
|
|
73
|
+
[key: string]: unknown;
|
|
172
74
|
}
|
|
173
|
-
export interface
|
|
174
|
-
|
|
75
|
+
export interface ListInputParam {
|
|
76
|
+
limit?: number;
|
|
77
|
+
offset?: string;
|
|
78
|
+
id?: filter.String;
|
|
79
|
+
name?: filter.String;
|
|
80
|
+
updated_at?: filter.Timestamp;
|
|
81
|
+
[key: string]: unknown;
|
|
175
82
|
}
|
|
176
83
|
export interface UpdateInputParam {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
*/
|
|
182
|
-
|
|
183
|
-
name?:string;
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* @description Description of the item family. This is visible only in Chargebee and not to customers.
|
|
187
|
-
|
|
188
|
-
*/
|
|
189
|
-
|
|
190
|
-
description?:string;
|
|
191
|
-
}
|
|
192
|
-
export interface DeleteResponse {
|
|
193
|
-
item_family:ItemFamily;
|
|
84
|
+
name?: string;
|
|
85
|
+
description?: string;
|
|
86
|
+
[key: string]: unknown;
|
|
194
87
|
}
|
|
195
|
-
|
|
196
|
-
|
|
197
88
|
}
|
|
198
|
-
}
|
|
89
|
+
}
|