chargebee 2.45.0 → 2.47.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.
@@ -1,38 +1,41 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
2
3
  declare module 'chargebee' {
3
4
  export interface CreditNoteEstimate {
4
5
 
6
+
5
7
  reference_invoice_id:string;
6
-
8
+
7
9
  type:'adjustment' | 'refundable';
8
-
10
+
9
11
  price_type:PriceType;
10
-
12
+
11
13
  currency_code:string;
12
-
14
+
13
15
  sub_total:number;
14
-
16
+
15
17
  total:number;
16
-
18
+
17
19
  amount_allocated:number;
18
-
20
+
19
21
  amount_available:number;
20
-
22
+
21
23
  line_items?:CreditNoteEstimate.LineItem[];
22
-
24
+
23
25
  discounts?:CreditNoteEstimate.Discount[];
24
-
26
+
25
27
  taxes?:CreditNoteEstimate.Tax[];
26
-
28
+
27
29
  line_item_taxes?:CreditNoteEstimate.LineItemTax[];
28
-
30
+
29
31
  line_item_discounts?:CreditNoteEstimate.LineItemDiscount[];
30
-
32
+
31
33
  line_item_tiers?:CreditNoteEstimate.LineItemTier[];
32
-
34
+
33
35
  round_off_amount?:number;
34
-
36
+
35
37
  customer_id?:string;
38
+
36
39
  }
37
40
  export namespace CreditNoteEstimate {
38
41
 
@@ -93,6 +96,8 @@ declare module 'chargebee' {
93
96
 
94
97
  entity_type:'item_level_coupon' | 'document_level_coupon' | 'promotional_credits' | 'prorated_credits' | 'item_level_discount' | 'document_level_discount';
95
98
 
99
+ discount_type?:'fixed_amount' | 'percentage';
100
+
96
101
  entity_id?:string;
97
102
 
98
103
  coupon_set_code?:string;
@@ -1,135 +1,50 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
2
3
  declare module 'chargebee' {
3
4
  export interface DifferentialPrice {
4
5
 
5
- /**
6
- * @description A unique and immutable ID for the differential price. It is auto-generated when the differential price is created.
7
6
 
8
- */
9
-
10
7
  id:string;
11
-
12
- /**
13
- * @description The ID of the item price (&#x60;addon&#x60; or &#x60;charge&#x60;) whose price should change according to the plan-item it is applied to.
14
8
 
15
- */
16
-
17
9
  item_price_id:string;
18
-
19
- /**
20
- * @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&#x3D;2).
21
10
 
22
- */
23
-
24
11
  parent_item_id:string;
25
-
26
- /**
27
- * @description The differential price. If the pricing model of the &#x60;item_price_id&#x60; is &#x60;tiered&#x60;, &#x60;volume&#x60;, or &#x60;stairstep&#x60;, pass &#x60;tiers&#x60; instead of this.
28
12
 
29
- */
30
-
31
13
  price?:number;
32
-
33
- /**
34
- * @description The price of the item when the pricing_model is &#x60;flat_fee&#x60;. When the pricing model is &#x60;per_unit&#x60;, 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.
35
14
 
36
- */
37
-
38
15
  price_in_decimal?:string;
39
-
40
- /**
41
- * @description The item family state. \* active - New items can be created with the item family. \* deleted - No items allowed for the item family.
42
16
 
43
- */
44
-
45
- status?:'deleted' | 'active';
46
-
47
- /**
48
- * @description Version number of this resource. The &#x60;resource_version&#x60; is updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.
17
+ status?:'active' | 'deleted';
49
18
 
50
- */
51
-
52
19
  resource_version?:number;
53
-
54
- /**
55
- * @description Timestamp when this differential price was last updated.
56
20
 
57
- */
58
-
59
21
  updated_at?:number;
60
-
61
- /**
62
- * @description Timestamp at which this differential price was created.
63
22
 
64
- */
65
-
66
23
  created_at:number;
67
-
68
- /**
69
- * @description Timestamp at which this differential price was last modified.
70
24
 
71
- */
72
-
73
25
  modified_at:number;
74
-
75
- /**
76
- * @description The currency code (ISO 4217 format) of the plan
77
-
78
- */
79
-
80
- currency_code:string;
81
-
82
- /**
83
- * @description List of quantity-based pricing tiers for the differential price. Applicable only for &#x60;tiered&#x60;, &#x60;volume&#x60;, and &#x60;stairstep&#x60; &#x60;pricing_model&#x60; s. The tiers are exactly the same as those set for the item price. Only the &#x60;price&#x60; attribute for the various tiers can be overridden for the differential price.
84
26
 
85
- */
86
-
87
27
  tiers?:DifferentialPrice.Tier[];
88
-
89
- /**
90
- * @description When &#x60;item_price_id&#x60; is a charge-item, you can specify the plan period for which the price applies. Although an array, currently you can specify only one period. In other words, only index &#x60;0&#x60; is allowed. Create another differential price to specify another period. Is permitted only when &#x60;item_price_id&#x60; is a charge-item.
91
28
 
92
- */
93
-
29
+ currency_code:string;
30
+
94
31
  parent_periods?:DifferentialPrice.ParentPeriod[];
95
32
 
96
33
  business_entity_id?:string;
34
+
35
+ deleted:boolean;
36
+
97
37
  }
98
38
  export namespace DifferentialPrice {
99
39
  export class DifferentialPriceResource {
100
- /**
101
- * @description Create a differential price for addon item price, addon item price with tiered pricing, or charge item price.
102
-
103
- */
104
-
105
40
  create(item_price_id:string, input:CreateInputParam):ChargebeeRequest<CreateResponse>;
106
41
 
107
- /**
108
- * @description Retrieve a differential price using a &#x60;differential_price_id&#x60; and &#x60;item_price_id&#x60;.
109
-
110
- */
111
-
112
42
  retrieve(differential_price_id:string, input:RetrieveInputParam):ChargebeeRequest<RetrieveResponse>;
113
43
 
114
- /**
115
- * @description Update a differential price using a &#x60;differential_price_id&#x60; and &#x60;item_price_id&#x60;.
116
-
117
- */
118
-
119
44
  update(differential_price_id:string, input:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
120
45
 
121
- /**
122
- * @description Delete a differential price using a &#x60;differential_price_id&#x60; and &#x60;item_price_id&#x60;.
123
-
124
- */
125
-
126
46
  delete(differential_price_id:string, input:DeleteInputParam):ChargebeeRequest<DeleteResponse>;
127
47
 
128
- /**
129
- * @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).
130
-
131
- */
132
-
133
48
  list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
134
49
  }
135
50
  export interface CreateResponse {
@@ -137,41 +52,16 @@ declare module 'chargebee' {
137
52
  }
138
53
  export interface CreateInputParam {
139
54
 
140
- /**
141
- * @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&#x3D;2).
142
-
143
- */
55
+ parent_periods:{period?:any[],period_unit:'day' | 'week' | 'month' | 'year'}[];
144
56
 
145
- parent_item_id:string;
57
+ tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
146
58
 
147
- /**
148
- * @description The differential price. If the pricing model of the &#x60;item_price_id&#x60; is &#x60;tiered&#x60;, &#x60;volume&#x60;, or &#x60;stairstep&#x60;, pass &#x60;tiers&#x60; instead of this.
149
-
150
- */
59
+ parent_item_id:string;
151
60
 
152
61
  price?:number;
153
62
 
154
- /**
155
- * @description The price of the item when the pricing_model is &#x60;flat_fee&#x60;. When the pricing model is &#x60;per_unit&#x60;, 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.
156
-
157
- */
158
-
159
63
  price_in_decimal?:string;
160
64
 
161
- /**
162
- * @description Parameters for parent_periods
163
-
164
- */
165
-
166
- parent_periods?:{period?:any[],period_unit:'week' | 'month' | 'year' | 'day'}[];
167
-
168
- /**
169
- * @description Parameters for tiers
170
-
171
- */
172
-
173
- tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
174
-
175
65
  business_entity_id?:string;
176
66
  }
177
67
  export interface RetrieveResponse {
@@ -179,11 +69,6 @@ declare module 'chargebee' {
179
69
  }
180
70
  export interface RetrieveInputParam {
181
71
 
182
- /**
183
- * @description Retrieve a differential price using a &#x60;differential_price_id&#x60; and &#x60;item_price_id&#x60;.
184
-
185
- */
186
-
187
72
  item_price_id:string;
188
73
  }
189
74
  export interface UpdateResponse {
@@ -191,132 +76,77 @@ declare module 'chargebee' {
191
76
  }
192
77
  export interface UpdateInputParam {
193
78
 
194
- /**
195
- * @description The id of the item price (&#x60;addon&#x60; or &#x60;charge&#x60;) whose price should change according to the plan-item it is applied to.
196
-
197
- */
79
+ parent_periods:{period?:any[],period_unit:'day' | 'week' | 'month' | 'year'}[];
198
80
 
199
- item_price_id:string;
81
+ tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
200
82
 
201
- /**
202
- * @description The differential price. If the pricing model of the &#x60;item_price_id&#x60; is &#x60;tiered&#x60;, &#x60;volume&#x60;, or &#x60;stairstep&#x60;, pass &#x60;tiers&#x60; instead of this.
203
-
204
- */
83
+ item_price_id:string;
205
84
 
206
85
  price?:number;
207
86
 
208
- /**
209
- * @description The price of the item when the pricing_model is &#x60;flat_fee&#x60;. When the pricing model is &#x60;per_unit&#x60;, 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.
210
-
211
- */
212
-
213
87
  price_in_decimal?:string;
214
-
215
- /**
216
- * @description Parameters for parent_periods
217
-
218
- */
219
-
220
- parent_periods?:{period?:any[],period_unit:'week' | 'month' | 'year' | 'day'}[];
221
-
222
- /**
223
- * @description Parameters for tiers
224
-
225
- */
226
-
227
- tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
228
88
  }
229
89
  export interface DeleteResponse {
230
90
  differential_price:DifferentialPrice;
231
91
  }
232
92
  export interface DeleteInputParam {
233
93
 
234
- /**
235
- * @description The id of the item price (&#x60;addon&#x60; or &#x60;charge&#x60;) whose price should change according to the plan-item it is applied to.
236
-
237
- */
238
-
239
94
  item_price_id:string;
240
95
  }
241
96
  export interface ListResponse {
242
- /**
243
- * @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).
244
-
245
- */
246
-
247
97
  list:{differential_price:DifferentialPrice}[];
248
98
 
249
- /**
250
- * @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).
251
-
252
- */
253
-
254
99
  next_offset?:string;
255
100
  }
256
101
  export interface ListInputParam {
257
102
  [key : string]: any;
258
103
  /**
259
- * @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).
104
+ * @description The number of resources to be returned.
260
105
 
261
106
  */
262
107
 
263
108
  limit?:number;
264
109
 
265
110
  /**
266
- * @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).
111
+ * @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set \&#x60;offset\&#x60; to the value of \&#x60;next_offset\&#x60; obtained in the previous iteration of the API call.
267
112
 
268
113
  */
269
114
 
270
115
  offset?:string;
271
116
 
272
117
  /**
273
- * @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).
118
+ * @description The id of the item price (&#x60;addon&#x60; or &#x60;charge&#x60;) whose price should change according to the plan-item it is applied to.
274
119
 
275
120
  */
276
121
 
277
122
  item_price_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
278
123
 
279
124
  /**
280
- * @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).
125
+ * @description Item Id of Addon / Charge item price for which differential pricing is applied to
281
126
 
282
127
  */
283
128
 
284
129
  item_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
285
130
 
286
131
  /**
287
- * @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).
132
+ * @description A unique and immutable id for the differential price. It is auto-generated when the differential price is created.
288
133
 
289
134
  */
290
135
 
291
136
  id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
292
137
 
293
138
  /**
294
- * @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).
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&#x3D;2).
295
140
 
296
141
  */
297
142
 
298
143
  parent_item_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
299
144
  }
300
145
  export interface Tier {
301
- /**
302
- * @description The lower limit of a range of units for the tier
303
-
304
- */
305
-
306
146
  starting_unit:number;
307
147
 
308
- /**
309
- * @description The upper limit of a range of units for the tier
310
-
311
- */
312
-
313
148
  ending_unit?:number;
314
149
 
315
- /**
316
- * @description The per-unit price for the tier when the &#x60;pricing_model&#x60; is &#x60;tiered&#x60; or &#x60;volume&#x60;; the total cost for the item price when the &#x60;pricing_model&#x60; is &#x60;stairstep&#x60;. The value is in the [minor unit of the currency](https://apidocs.chargebee.com/docs/api#handling_currency_units).
317
-
318
- */
319
-
320
150
  price:number;
321
151
 
322
152
  starting_unit_in_decimal?:string;
@@ -326,17 +156,7 @@ declare module 'chargebee' {
326
156
  price_in_decimal?:string;
327
157
  }
328
158
  export interface ParentPeriod {
329
- /**
330
- * @description The unit of time for &#x60;period&#x60;. \* 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.
331
-
332
- */
333
-
334
- period_unit:'week' | 'month' | 'year' | 'day';
335
-
336
- /**
337
- * @description The billing period of the plan in &#x60;period_unit&#x60;s. For example, a 6 month plan has &#x60;period&#x60; as 6 and &#x60;period_unit&#x60; as &#x60;month&#x60;.
338
-
339
- */
159
+ period_unit:'day' | 'week' | 'month' | 'year';
340
160
 
341
161
  period?:any[];
342
162
  }
@@ -133,7 +133,7 @@ declare module 'chargebee' {
133
133
 
134
134
  */
135
135
 
136
- webhook_status?:{in?:string,is?:'not_configured' | 're_scheduled' | 'scheduled' | 'failed' | 'not_applicable' | 'succeeded' | 'skipped',is_not?:'not_configured' | 're_scheduled' | 'scheduled' | 'failed' | 'not_applicable' | 'succeeded' | 'skipped',not_in?:string};
136
+ webhook_status?:{in?:string,is?:'not_configured' | 're_scheduled' | 'scheduled' | 'failed' | 'not_applicable' | 'succeeded' | 'skipped' | 'disabled',is_not?:'not_configured' | 're_scheduled' | 'scheduled' | 'failed' | 'not_applicable' | 'succeeded' | 'skipped',not_in?:string};
137
137
 
138
138
  /**
139
139
  * @description Retrieves list of events.
@@ -186,7 +186,7 @@ declare module 'chargebee' {
186
186
 
187
187
  */
188
188
 
189
- webhook_status:'not_configured' | 're_scheduled' | 'scheduled' | 'failed' | 'not_applicable' | 'succeeded' | 'skipped';
189
+ webhook_status:'not_configured' | 're_scheduled' | 'scheduled' | 'failed' | 'not_applicable' | 'succeeded' | 'skipped' | 'disabled';
190
190
  }
191
191
  }
192
192
  }
@@ -72,5 +72,7 @@ declare module 'chargebee' {
72
72
  processor_error_code?:string;
73
73
 
74
74
  processor_error_message?:string;
75
+
76
+ error_cause_id?:string;
75
77
  }
76
78
  }