chargebee 2.28.0 → 2.29.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/.github/ISSUE_TEMPLATE/bug_report.yml +81 -0
- package/.github/ISSUE_TEMPLATE/config.yml +6 -0
- package/.github/ISSUE_TEMPLATE/feature_request.yml +34 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +8 -0
- package/.github/workflows/greeting.yml +47 -0
- package/CHANGELOG.md +47 -0
- package/SECURITY.md +8 -0
- package/lib/chargebee.js +1 -1
- package/lib/resources/api_endpoints.js +0 -7
- package/package.json +1 -1
- package/types/core.d.ts +4 -4
- package/types/resources/AttachedItem.d.ts +88 -88
- package/types/resources/Card.d.ts +68 -68
- package/types/resources/Comment.d.ts +50 -44
- package/types/resources/Coupon.d.ts +242 -207
- package/types/resources/CouponSet.d.ts +72 -68
- package/types/resources/CreditNote.d.ts +612 -236
- package/types/resources/Customer.d.ts +655 -513
- package/types/resources/DifferentialPrice.d.ts +99 -74
- package/types/resources/EntitlementOverride.d.ts +27 -12
- package/types/resources/Estimate.d.ts +450 -450
- package/types/resources/Event.d.ts +30 -12
- package/types/resources/Export.d.ts +200 -200
- package/types/resources/Feature.d.ts +66 -35
- package/types/resources/Gift.d.ts +54 -44
- package/types/resources/HostedPage.d.ts +381 -381
- package/types/resources/InAppSubscription.d.ts +94 -90
- package/types/resources/Invoice.d.ts +1242 -660
- package/types/resources/Item.d.ts +148 -142
- package/types/resources/ItemEntitlement.d.ts +36 -36
- package/types/resources/ItemFamily.d.ts +45 -45
- package/types/resources/ItemPrice.d.ts +317 -273
- package/types/resources/PaymentIntent.d.ts +60 -60
- package/types/resources/PaymentVoucher.d.ts +74 -59
- package/types/resources/PortalSession.d.ts +45 -20
- package/types/resources/PromotionalCredit.d.ts +68 -68
- package/types/resources/Purchase.d.ts +3 -3
- package/types/resources/Quote.d.ts +652 -363
- package/types/resources/QuoteLineGroup.d.ts +245 -0
- package/types/resources/QuotedCharge.d.ts +170 -0
- package/types/resources/QuotedSubscription.d.ts +219 -0
- package/types/resources/SiteMigrationDetail.d.ts +7 -7
- package/types/resources/Subscription.d.ts +1219 -932
- package/types/resources/SubscriptionEntitlement.d.ts +33 -12
- package/types/resources/ThirdPartyPaymentMethod.d.ts +1 -1
- package/types/resources/TimeMachine.d.ts +15 -15
- package/types/resources/Token.d.ts +23 -23
- package/types/resources/Transaction.d.ts +229 -112
- package/types/resources/UnbilledCharge.d.ts +112 -67
- package/types/resources/Usage.d.ts +46 -47
- package/types/resources/VirtualBankAccount.d.ts +66 -66
|
@@ -96,63 +96,103 @@ declare module 'chargebee' {
|
|
|
96
96
|
export namespace DifferentialPrice {
|
|
97
97
|
export class DifferentialPriceResource {
|
|
98
98
|
/**
|
|
99
|
-
* @description
|
|
99
|
+
* @description Create a differential price for addon item price, addon item price with tiered pricing, or charge item price.
|
|
100
100
|
|
|
101
101
|
*/
|
|
102
102
|
|
|
103
|
-
|
|
103
|
+
create(item_price_id:string, input:CreateInputParam):ChargebeeRequest<CreateResponse>;
|
|
104
104
|
|
|
105
105
|
/**
|
|
106
|
-
* @description
|
|
106
|
+
* @description Retrieve a differential price using a `differential_price_id` and `item_price_id`.
|
|
107
107
|
|
|
108
108
|
*/
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
retrieve(differential_price_id:string, input:RetrieveInputParam):ChargebeeRequest<RetrieveResponse>;
|
|
111
111
|
|
|
112
112
|
/**
|
|
113
|
-
* @description
|
|
113
|
+
* @description Update a differential price using a `differential_price_id` and `item_price_id`.
|
|
114
114
|
|
|
115
115
|
*/
|
|
116
116
|
|
|
117
|
-
|
|
117
|
+
update(differential_price_id:string, input:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
|
|
118
118
|
|
|
119
119
|
/**
|
|
120
|
-
* @description
|
|
120
|
+
* @description Delete a differential price using a `differential_price_id` and `item_price_id`.
|
|
121
121
|
|
|
122
122
|
*/
|
|
123
123
|
|
|
124
|
-
|
|
124
|
+
delete(differential_price_id:string, input:DeleteInputParam):ChargebeeRequest<DeleteResponse>;
|
|
125
125
|
|
|
126
126
|
/**
|
|
127
|
-
* @description
|
|
127
|
+
* @description Returns a list of differential prices satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
|
|
128
128
|
|
|
129
129
|
*/
|
|
130
130
|
|
|
131
|
-
|
|
131
|
+
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
132
132
|
}
|
|
133
|
-
export interface
|
|
133
|
+
export interface CreateResponse {
|
|
134
134
|
differential_price:DifferentialPrice;
|
|
135
135
|
}
|
|
136
|
-
export interface
|
|
136
|
+
export interface CreateInputParam {
|
|
137
137
|
|
|
138
138
|
/**
|
|
139
|
-
* @description The id of the item
|
|
139
|
+
* @description The id of the plan-item, in relation to which, the differential pricing for the addon or charge is defined. For example, this would be the id of the *Standard* or *Enterprise* plans-items mentioned in the [examples above](./differential_prices?prod_cat_ver=2).
|
|
140
140
|
|
|
141
141
|
*/
|
|
142
142
|
|
|
143
|
+
parent_item_id:string;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* @description The differential price. If the pricing model of the `item_price_id` is `tiered`, `volume`, or `stairstep`, pass `tiers` instead of this.
|
|
147
|
+
|
|
148
|
+
*/
|
|
149
|
+
|
|
150
|
+
price?:number;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* @description The price of the item when the pricing_model is `flat_fee`. When the pricing model is `per_unit`, it is the price per unit quantity of the item. Not applicable for the other pricing models. The value is in decimal and in major units of the currency. Also, this is only applicable when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled.
|
|
154
|
+
|
|
155
|
+
*/
|
|
156
|
+
|
|
157
|
+
price_in_decimal?:string;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* @description Parameters for parent_periods
|
|
161
|
+
|
|
162
|
+
*/
|
|
163
|
+
|
|
164
|
+
parent_periods?:{period?:any[],period_unit:'week' | 'month' | 'year' | 'day'}[];
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* @description Parameters for tiers
|
|
168
|
+
|
|
169
|
+
*/
|
|
170
|
+
|
|
171
|
+
tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
|
|
172
|
+
}
|
|
173
|
+
export interface RetrieveResponse {
|
|
174
|
+
differential_price:DifferentialPrice;
|
|
175
|
+
}
|
|
176
|
+
export interface RetrieveInputParam {
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* @description Retrieve a differential price using a `differential_price_id` and `item_price_id`.
|
|
180
|
+
|
|
181
|
+
*/
|
|
182
|
+
|
|
143
183
|
item_price_id:string;
|
|
144
184
|
}
|
|
145
|
-
export interface
|
|
185
|
+
export interface UpdateResponse {
|
|
146
186
|
differential_price:DifferentialPrice;
|
|
147
187
|
}
|
|
148
|
-
export interface
|
|
188
|
+
export interface UpdateInputParam {
|
|
149
189
|
|
|
150
190
|
/**
|
|
151
|
-
* @description The id of the
|
|
191
|
+
* @description The id of the item price (`addon` or `charge`) whose price should change according to the plan-item it is applied to.
|
|
152
192
|
|
|
153
193
|
*/
|
|
154
194
|
|
|
155
|
-
|
|
195
|
+
item_price_id:string;
|
|
156
196
|
|
|
157
197
|
/**
|
|
158
198
|
* @description The differential price. If the pricing model of the `item_price_id` is `tiered`, `volume`, or `stairstep`, pass `tiers` instead of this.
|
|
@@ -182,6 +222,18 @@ declare module 'chargebee' {
|
|
|
182
222
|
|
|
183
223
|
tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
|
|
184
224
|
}
|
|
225
|
+
export interface DeleteResponse {
|
|
226
|
+
differential_price:DifferentialPrice;
|
|
227
|
+
}
|
|
228
|
+
export interface DeleteInputParam {
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* @description The id of the item price (`addon` or `charge`) whose price should change according to the plan-item it is applied to.
|
|
232
|
+
|
|
233
|
+
*/
|
|
234
|
+
|
|
235
|
+
item_price_id:string;
|
|
236
|
+
}
|
|
185
237
|
export interface ListResponse {
|
|
186
238
|
/**
|
|
187
239
|
* @description Returns a list of differential prices satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
|
|
@@ -200,105 +252,68 @@ declare module 'chargebee' {
|
|
|
200
252
|
export interface ListInputParam {
|
|
201
253
|
[key : string]: any;
|
|
202
254
|
/**
|
|
203
|
-
* @description The
|
|
255
|
+
* @description Returns a list of differential prices satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
|
|
204
256
|
|
|
205
257
|
*/
|
|
206
258
|
|
|
207
259
|
limit?:number;
|
|
208
260
|
|
|
209
261
|
/**
|
|
210
|
-
* @description
|
|
262
|
+
* @description Returns a list of differential prices satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
|
|
211
263
|
|
|
212
264
|
*/
|
|
213
265
|
|
|
214
266
|
offset?:string;
|
|
215
267
|
|
|
216
268
|
/**
|
|
217
|
-
* @description
|
|
269
|
+
* @description Returns a list of differential prices satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
|
|
218
270
|
|
|
219
271
|
*/
|
|
220
272
|
|
|
221
273
|
item_price_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
222
274
|
|
|
223
275
|
/**
|
|
224
|
-
* @description
|
|
276
|
+
* @description Returns a list of differential prices satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
|
|
225
277
|
|
|
226
278
|
*/
|
|
227
279
|
|
|
228
280
|
item_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
229
281
|
|
|
230
282
|
/**
|
|
231
|
-
* @description
|
|
283
|
+
* @description Returns a list of differential prices satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
|
|
232
284
|
|
|
233
285
|
*/
|
|
234
286
|
|
|
235
287
|
id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
236
288
|
|
|
237
289
|
/**
|
|
238
|
-
* @description
|
|
290
|
+
* @description Returns a list of differential prices satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
|
|
239
291
|
|
|
240
292
|
*/
|
|
241
293
|
|
|
242
294
|
parent_item_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
243
295
|
}
|
|
244
|
-
export interface
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
export interface RetrieveInputParam {
|
|
248
|
-
|
|
249
|
-
/**
|
|
250
|
-
* @description Retrieve a differential price using a `differential_price_id` and `item_price_id`.
|
|
251
|
-
|
|
252
|
-
*/
|
|
253
|
-
|
|
254
|
-
item_price_id:string;
|
|
255
|
-
}
|
|
256
|
-
export interface UpdateResponse {
|
|
257
|
-
differential_price:DifferentialPrice;
|
|
258
|
-
}
|
|
259
|
-
export interface UpdateInputParam {
|
|
260
|
-
|
|
261
|
-
/**
|
|
262
|
-
* @description The id of the item price (`addon` or `charge`) whose price should change according to the plan-item it is applied to.
|
|
296
|
+
export interface Tier {
|
|
297
|
+
/**
|
|
298
|
+
* @description The lower limit of a range of units for the tier
|
|
263
299
|
|
|
264
|
-
|
|
300
|
+
*/
|
|
265
301
|
|
|
266
|
-
|
|
302
|
+
starting_unit:number;
|
|
267
303
|
|
|
268
|
-
|
|
269
|
-
|
|
304
|
+
/**
|
|
305
|
+
* @description The upper limit of a range of units for the tier
|
|
270
306
|
|
|
271
|
-
|
|
307
|
+
*/
|
|
272
308
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
/**
|
|
276
|
-
* @description The price of the item when the pricing_model is `flat_fee`. When the pricing model is `per_unit`, it is the price per unit quantity of the item. Not applicable for the other pricing models. The value is in decimal and in major units of the currency. Also, this is only applicable when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled.
|
|
277
|
-
|
|
278
|
-
*/
|
|
279
|
-
|
|
280
|
-
price_in_decimal?:string;
|
|
281
|
-
|
|
282
|
-
/**
|
|
283
|
-
* @description Parameters for parent_periods
|
|
284
|
-
|
|
285
|
-
*/
|
|
286
|
-
|
|
287
|
-
parent_periods?:{period?:any[],period_unit:'week' | 'month' | 'year' | 'day'}[];
|
|
309
|
+
ending_unit?:number;
|
|
288
310
|
|
|
289
|
-
|
|
290
|
-
|
|
311
|
+
/**
|
|
312
|
+
* @description The per-unit price for the tier when the `pricing_model` is `tiered` or `volume`; the total cost for the item price when the `pricing_model` is `stairstep`. The value is in the [minor unit of the currency](https://apidocs.chargebee.com/docs/api#handling_currency_units).
|
|
291
313
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
|
|
295
|
-
}
|
|
296
|
-
export interface Tier {
|
|
297
|
-
starting_unit?:number;
|
|
314
|
+
*/
|
|
298
315
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
price?:number;
|
|
316
|
+
price:number;
|
|
302
317
|
|
|
303
318
|
starting_unit_in_decimal?:string;
|
|
304
319
|
|
|
@@ -307,7 +322,17 @@ declare module 'chargebee' {
|
|
|
307
322
|
price_in_decimal?:string;
|
|
308
323
|
}
|
|
309
324
|
export interface ParentPeriod {
|
|
310
|
-
|
|
325
|
+
/**
|
|
326
|
+
* @description The unit of time for `period`. \* month - A period of 1 calendar month. \* day - A period of 24 hours. \* week - A period of 7 days. \* year - A period of 1 calendar year.
|
|
327
|
+
|
|
328
|
+
*/
|
|
329
|
+
|
|
330
|
+
period_unit:'week' | 'month' | 'year' | 'day';
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* @description The billing period of the plan in `period_unit`s. For example, a 6 month plan has `period` as 6 and `period_unit` as `month`.
|
|
334
|
+
|
|
335
|
+
*/
|
|
311
336
|
|
|
312
337
|
period?:any[];
|
|
313
338
|
}
|
|
@@ -76,14 +76,38 @@ declare module 'chargebee' {
|
|
|
76
76
|
}
|
|
77
77
|
export namespace EntitlementOverride {
|
|
78
78
|
export class EntitlementOverrideResource {
|
|
79
|
+
/**
|
|
80
|
+
* @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.
|
|
81
|
+
|
|
82
|
+
*/
|
|
83
|
+
|
|
84
|
+
add_entitlement_override_for_subscription(subscription_id:string, input?:AddEntitlementOverrideForSubscriptionInputParam):ChargebeeRequest<AddEntitlementOverrideForSubscriptionResponse>;
|
|
85
|
+
|
|
79
86
|
/**
|
|
80
87
|
* @description Retrieve the list of entitlement overrides for a subscription.
|
|
81
88
|
|
|
82
89
|
*/
|
|
83
90
|
|
|
84
91
|
list_entitlement_override_for_subscription(subscription_id:string, input?:ListEntitlementOverrideForSubscriptionInputParam):ChargebeeRequest<ListEntitlementOverrideForSubscriptionResponse>;
|
|
92
|
+
}
|
|
93
|
+
export interface AddEntitlementOverrideForSubscriptionResponse {
|
|
94
|
+
entitlement_override:EntitlementOverride;
|
|
95
|
+
}
|
|
96
|
+
export interface AddEntitlementOverrideForSubscriptionInputParam {
|
|
85
97
|
|
|
86
|
-
|
|
98
|
+
/**
|
|
99
|
+
* @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.
|
|
100
|
+
|
|
101
|
+
*/
|
|
102
|
+
|
|
103
|
+
action?:Action;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* @description Parameters for entitlement_overrides
|
|
107
|
+
|
|
108
|
+
*/
|
|
109
|
+
|
|
110
|
+
entitlement_overrides?:{expires_at?:number,feature_id:string,value?:string}[];
|
|
87
111
|
}
|
|
88
112
|
export interface ListEntitlementOverrideForSubscriptionResponse {
|
|
89
113
|
/**
|
|
@@ -103,28 +127,19 @@ declare module 'chargebee' {
|
|
|
103
127
|
export interface ListEntitlementOverrideForSubscriptionInputParam {
|
|
104
128
|
[key : string]: any;
|
|
105
129
|
/**
|
|
106
|
-
* @description
|
|
130
|
+
* @description Retrieve the list of entitlement overrides for a subscription.
|
|
107
131
|
|
|
108
132
|
*/
|
|
109
133
|
|
|
110
134
|
limit?:number;
|
|
111
135
|
|
|
112
136
|
/**
|
|
113
|
-
* @description
|
|
137
|
+
* @description Retrieve the list of entitlement overrides for a subscription.
|
|
114
138
|
|
|
115
139
|
*/
|
|
116
140
|
|
|
117
141
|
offset?:string;
|
|
118
142
|
}
|
|
119
|
-
export interface AddEntitlementOverrideForSubscriptionResponse {
|
|
120
|
-
entitlement_override:EntitlementOverride;
|
|
121
|
-
}
|
|
122
|
-
export interface AddEntitlementOverrideForSubscriptionInputParam {
|
|
123
|
-
|
|
124
|
-
action?:Action;
|
|
125
|
-
|
|
126
|
-
entitlement_overrides?:{expires_at?:number,feature_id:string,value?:string}[];
|
|
127
|
-
}
|
|
128
143
|
|
|
129
144
|
}
|
|
130
145
|
}
|