chargebee 2.46.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.
@@ -3,115 +3,44 @@
3
3
  declare module 'chargebee' {
4
4
  export interface PriceVariant {
5
5
 
6
- /**
7
- * @description The unique and immutable identifier of the price variant.
8
6
 
9
- */
10
-
11
7
  id:string;
12
-
13
- /**
14
- * @description A unique name of the price variant.
15
8
 
16
- */
17
-
18
9
  name:string;
19
-
20
- /**
21
- * @description A unique display name for the price variant.
22
10
 
23
- */
24
-
25
11
  external_name?:string;
26
-
27
- /**
28
- * @description Description of the price variant.
29
12
 
30
- */
31
13
  variant_group?:string;
14
+
32
15
  description?:string;
33
-
34
- /**
35
- * @description Status of a price variant. \* active - Active price variant. This price variant can be attached to [item prices](https://apidocs.chargebee.com/docs/api/item_prices?lang=curl). \* deleted - Deleted price variant. The `id` and `name` of the deleted price variant can be reused. \* archived - Archived price variant. This price variant is no longer `active` and cannot be attached to new [item prices](https://apidocs.chargebee.com/docs/api/item_prices?lang=curl). Existing item prices that already have this price variant attached will continue to remain as is.
36
16
 
37
- */
38
-
39
17
  status?:'active' | 'archived' | 'deleted';
40
-
41
- /**
42
- * @description Timestamp indicating when this price variant is created.
43
18
 
44
- */
45
-
46
19
  created_at:number;
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
20
 
51
- */
52
-
53
21
  resource_version?:number;
54
-
55
- /**
56
- * @description Timestamp indicating when this price variant was last updated.
57
22
 
58
- */
59
-
60
23
  updated_at?:number;
61
-
62
- /**
63
- * @description Timestamp indicating when this price variant was archived.
64
24
 
65
- */
66
-
67
25
  archived_at?:number;
68
-
69
- /**
70
- * @description The list of price variant attribute values.
71
-
72
- Attributes can be used to store additional information about the price variant. For example, for a price variant called 'Germany', the attributes can be 'Country':'Germany', 'City':'Berlin' and so on.
73
26
 
74
- */
75
-
76
27
  attributes?:PriceVariant.Attribute[];
77
28
 
78
29
  business_entity_id?:string;
30
+
31
+ deleted:boolean;
32
+
79
33
  }
80
34
  export namespace PriceVariant {
81
35
  export class PriceVariantResource {
82
- /**
83
- * @description This endpoint allows the creation of a new price variant that can be attached to [item prices](https://apidocs.chargebee.com/docs/api/item_prices?lang=curl).
84
-
85
- */
86
-
87
36
  create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
88
37
 
89
- /**
90
- * @description This endpoint retrieves the details of a specific price variant using its unique identifier.
91
-
92
- */
93
-
94
38
  retrieve(price_variant_id:string):ChargebeeRequest<RetrieveResponse>;
95
39
 
96
- /**
97
- * @description This endpoint modifies the details of an existing price variant.
98
-
99
- */
100
-
101
40
  update(price_variant_id:string, input:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
102
41
 
103
- /**
104
- * @description Deletes the price variant. This is not allowed if price variant is attached to any [item price](https://apidocs.chargebee.com/docs/api/item_prices?lang&#x3D;curl). Once deleted, the &#x60;id&#x60; and &#x60;name&#x60; of the price variant can be reused.
105
-
106
- */
107
-
108
42
  delete(price_variant_id:string):ChargebeeRequest<DeleteResponse>;
109
43
 
110
- /**
111
- * @description This endpoint is used to retrieve a list of price variants.
112
-
113
- */
114
-
115
44
  list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
116
45
  }
117
46
  export interface CreateResponse {
@@ -119,45 +48,18 @@ Attributes can be used to store additional information about the price variant.
119
48
  }
120
49
  export interface CreateInputParam {
121
50
 
122
- /**
123
- * @description The unique and immutable identifier of the price variant.
124
-
125
- */
51
+ attributes:{name:string,value:string}[];
126
52
 
127
53
  id:string;
128
54
 
129
- /**
130
- * @description A unique name of the price variant.
131
-
132
- */
133
-
134
55
  name:string;
135
56
 
136
- /**
137
- * @description A unique display name for the price variant.
138
-
139
- */
140
-
141
57
  external_name?:string;
142
58
 
143
- /**
144
- * @description Description of the price variant.
145
-
146
- */
147
-
148
59
  description?:string;
149
60
 
150
- /**
151
- * @description The list of price variant attribute values.
152
-
153
- Attributes can be used to store additional information about the price variant. For example, for a price variant called &#x27;Germany&#x27;, the attributes can be &#x27;Country&#x27;:&#x27;Germany&#x27;, &#x27;City&#x27;:&#x27;Berlin&#x27; and so on.
154
-
155
- */
156
-
157
- attributes:{name:string,value:string}[];
158
-
159
61
  variant_group?:string;
160
-
62
+
161
63
  business_entity_id?:string;
162
64
  }
163
65
  export interface RetrieveResponse {
@@ -169,137 +71,96 @@ Attributes can be used to store additional information about the price variant.
169
71
  }
170
72
  export interface UpdateInputParam {
171
73
 
172
- /**
173
- * @description A unique name of the price variant.
174
-
175
- */
74
+ attributes:{name:string,value:string}[];
176
75
 
177
76
  name?:string;
178
77
 
179
- /**
180
- * @description A unique display name for the price variant.
181
-
182
- */
183
-
184
78
  external_name?:string;
185
79
 
186
- /**
187
- * @description Description of the price variant.
188
-
189
- */
190
-
191
80
  description?:string;
192
-
193
- variant_group?:string;
194
81
 
195
- /**
196
- * @description Status of a price variant. \* active - Active price variant. This price variant can be attached to [item prices](https://apidocs.chargebee.com/docs/api/item_prices?lang&#x3D;curl). \* deleted - Deleted price variant. The &#x60;id&#x60; and &#x60;name&#x60; of the deleted price variant can be reused. \* archived - Archived price variant. This price variant is no longer &#x60;active&#x60; and cannot be attached to new [item prices](https://apidocs.chargebee.com/docs/api/item_prices?lang&#x3D;curl). Existing item prices that already have this price variant attached will continue to remain as is.
197
-
198
- */
82
+ variant_group?:string;
199
83
 
200
84
  status?:'active' | 'archived';
201
-
202
- /**
203
- * @description The list of price variant attribute values.
204
-
205
- Attributes can be used to store additional information about the price variant. For example, for a price variant called &#x27;Germany&#x27;, the attributes can be &#x27;Country&#x27;:&#x27;Germany&#x27;, &#x27;City&#x27;:&#x27;Berlin&#x27; and so on.
206
-
207
- */
208
-
209
- attributes:{name:string,value:string}[];
210
85
  }
211
86
  export interface DeleteResponse {
212
87
  price_variant:PriceVariant;
213
88
  }
214
89
 
215
90
  export interface ListResponse {
216
- /**
217
- * @description This endpoint is used to retrieve a list of price variants.
218
-
219
- */
220
-
221
91
  list:{price_variant:PriceVariant}[];
222
92
 
223
- /**
224
- * @description This endpoint is used to retrieve a list of price variants.
225
-
226
- */
227
-
228
93
  next_offset?:string;
229
94
  }
230
95
  export interface ListInputParam {
231
96
  [key : string]: any;
232
97
  /**
233
- * @description This endpoint is used to retrieve a list of price variants.
98
+ * @description The number of resources to be returned.
234
99
 
235
100
  */
236
101
 
237
102
  limit?:number;
238
103
 
239
104
  /**
240
- * @description This endpoint is used to retrieve a list of price variants.
105
+ * @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.
241
106
 
242
107
  */
243
108
 
244
109
  offset?:string;
245
110
 
246
111
  /**
247
- * @description This endpoint is used to retrieve a list of price variants.
112
+ * @description Filter variant based on their [id](#).
248
113
 
249
114
  */
250
115
 
251
116
  id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
252
117
 
253
118
  /**
254
- * @description This endpoint is used to retrieve a list of price variants.
119
+ * @description Filter variant based on their &#x60;name&#x60;s.
255
120
 
256
121
  */
257
122
 
258
123
  name?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
259
124
 
260
125
  /**
261
- * @description This endpoint is used to retrieve a list of price variants.
126
+ * @description Filter variant based on their &#x60;status&#x60;.
262
127
 
263
128
  */
264
129
 
265
130
  status?:{in?:string,is?:'active' | 'archived',is_not?:'active' | 'archived',not_in?:string};
266
131
 
267
132
  /**
268
- * @description This endpoint is used to retrieve a list of price variants.
133
+ * @description Filter product based on their &#x60;updated time&#x60;.
269
134
 
270
135
  */
271
136
 
272
137
  updated_at?:{after?:string,before?:string,between?:string,on?:string};
273
138
 
274
139
  /**
275
- * @description This endpoint is used to retrieve a list of price variants.
140
+ * @description Filter product based on their &#x60;created time&#x60;.
276
141
 
277
142
  */
278
143
 
279
144
  created_at?:{after?:string,before?:string,between?:string,on?:string};
280
145
 
281
146
  /**
282
- * @description This endpoint is used to retrieve a list of price variants.
147
+ * @description The unique ID of the [business entity](/docs/api?prod_cat_ver&#x3D;2#mbe) of this subscription. This is always the same as the [business entity](/docs/api/subscriptions?prod_cat_ver&#x3D;2#subscription_customer_id) of the customer.
148
+ The ID of the business entity created for the site. For Product Catalog 1.0, all the site data is tied to this business entity.
149
+ **Note**
150
+
151
+ [Multiple Business Entities](/docs/api?prod_cat_ver&#x3D;2#mbe) is a feature available only on Product Catalog 2.0.
283
152
 
284
153
  */
285
154
 
286
- sort_by?:{asc?:'name' | 'id' | 'status' | 'created_at' | 'updated_at',desc?:'name' | 'id' | 'status' | 'created_at' | 'updated_at'};
287
-
288
155
  business_entity_id?:{is?:string,is_present?:'true' | 'false'};
156
+
157
+ include_site_level_resources?:{is?:'true' | 'false'};
158
+
159
+ sort_by?:{asc?:'name' | 'id' | 'status' | 'created_at' | 'updated_at',desc?:'name' | 'id' | 'status' | 'created_at' | 'updated_at'};
289
160
  }
290
161
  export interface Attribute {
291
- /**
292
- * @description Attribute name
293
-
294
- */
295
-
296
162
  name:string;
297
163
 
298
- /**
299
- * @description Attribute value
300
-
301
- */
302
-
303
164
  value:string;
304
165
  }
305
166
  }
@@ -0,0 +1,38 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
3
+ declare module 'chargebee' {
4
+ export interface Rule {
5
+
6
+
7
+ id:string;
8
+
9
+ namespace:string;
10
+
11
+ rule_name:string;
12
+
13
+ rule_order?:number;
14
+
15
+ status:'active' | 'disabled';
16
+
17
+ conditions?:string;
18
+
19
+ outcome?:string;
20
+
21
+ deleted:boolean;
22
+
23
+ created_at:number;
24
+
25
+ modified_at:number;
26
+
27
+ }
28
+ export namespace Rule {
29
+ export class RuleResource {
30
+ retrieve(rule_id:string):ChargebeeRequest<RetrieveResponse>;
31
+ }
32
+ export interface RetrieveResponse {
33
+ rule:Rule;
34
+ }
35
+
36
+
37
+ }
38
+ }
@@ -1409,6 +1409,8 @@ The ID of the business entity created for the site. For Product Catalog 1.0, all
1409
1409
 
1410
1410
  coupons?:{apply_till?:number,coupon_id?:string}[];
1411
1411
 
1412
+ exhausted_coupon_ids?:string[];
1413
+
1412
1414
  id?:string;
1413
1415
 
1414
1416
  trial_end?:number;
@@ -0,0 +1,46 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
3
+ declare module 'chargebee' {
4
+ export interface UsageEvent {
5
+
6
+
7
+ subscription_id:string;
8
+
9
+ deduplication_id:string;
10
+
11
+ usage_timestamp:number;
12
+
13
+ properties:object;
14
+
15
+ }
16
+ export namespace UsageEvent {
17
+ export class UsageEventResource {
18
+ create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
19
+
20
+ batch_ingest(input:BatchIngestInputParam):ChargebeeRequest<BatchIngestResponse>;
21
+ }
22
+ export interface CreateResponse {
23
+ usage_event:UsageEvent;
24
+ }
25
+ export interface CreateInputParam {
26
+
27
+ deduplication_id:string;
28
+
29
+ subscription_id:string;
30
+
31
+ usage_timestamp:number;
32
+
33
+ properties:object;
34
+ }
35
+ export interface BatchIngestResponse {
36
+ batch_id:string;
37
+
38
+ failed_events:any[];
39
+ }
40
+ export interface BatchIngestInputParam {
41
+
42
+ events:{deduplication_id:string,properties:object,subscription_id:string,usage_timestamp:number}[];
43
+ }
44
+
45
+ }
46
+ }