chargebee 2.25.3 → 2.26.1

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.
Files changed (65) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +55 -49
  3. package/lib/chargebee.js +1 -1
  4. package/package.json +1 -1
  5. package/types/core.d.ts +1 -0
  6. package/types/resources/Address.d.ts +245 -5
  7. package/types/resources/AdvanceInvoiceSchedule.d.ts +78 -2
  8. package/types/resources/AttachedItem.d.ts +305 -13
  9. package/types/resources/Card.d.ts +485 -13
  10. package/types/resources/Comment.d.ts +177 -11
  11. package/types/resources/Contact.d.ts +54 -0
  12. package/types/resources/ContractTerm.d.ts +83 -0
  13. package/types/resources/Coupon.d.ts +665 -20
  14. package/types/resources/CouponCode.d.ts +56 -5
  15. package/types/resources/CouponSet.d.ts +224 -17
  16. package/types/resources/CreditNote.d.ts +1202 -44
  17. package/types/resources/CreditNoteEstimate.d.ts +75 -6
  18. package/types/resources/Customer.d.ts +2132 -73
  19. package/types/resources/DifferentialPrice.d.ts +266 -15
  20. package/types/resources/Discount.d.ts +107 -0
  21. package/types/resources/Download.d.ts +18 -0
  22. package/types/resources/EntitlementOverride.d.ts +101 -7
  23. package/types/resources/Estimate.d.ts +1181 -27
  24. package/types/resources/Event.d.ts +145 -8
  25. package/types/resources/Export.d.ts +703 -32
  26. package/types/resources/Feature.d.ts +356 -22
  27. package/types/resources/Gift.d.ts +351 -24
  28. package/types/resources/Hierarchy.d.ts +30 -0
  29. package/types/resources/HostedPage.d.ts +1212 -37
  30. package/types/resources/ImpactedItem.d.ts +41 -1
  31. package/types/resources/ImpactedSubscription.d.ts +36 -1
  32. package/types/resources/InAppSubscription.d.ts +636 -9
  33. package/types/resources/Invoice.d.ts +2293 -93
  34. package/types/resources/InvoiceEstimate.d.ts +75 -6
  35. package/types/resources/Item.d.ts +542 -16
  36. package/types/resources/ItemEntitlement.d.ts +172 -13
  37. package/types/resources/ItemFamily.d.ts +173 -15
  38. package/types/resources/ItemPrice.d.ts +971 -26
  39. package/types/resources/Media.d.ts +24 -0
  40. package/types/resources/NonSubscription.d.ts +51 -3
  41. package/types/resources/Order.d.ts +1224 -32
  42. package/types/resources/PaymentIntent.d.ts +318 -8
  43. package/types/resources/PaymentReferenceNumber.d.ts +24 -0
  44. package/types/resources/PaymentSource.d.ts +1259 -55
  45. package/types/resources/PaymentVoucher.d.ts +262 -14
  46. package/types/resources/PortalSession.d.ts +187 -10
  47. package/types/resources/PromotionalCredit.d.ts +351 -16
  48. package/types/resources/Purchase.d.ts +274 -5
  49. package/types/resources/Quote.d.ts +1595 -62
  50. package/types/resources/QuoteLineGroup.d.ts +134 -5
  51. package/types/resources/QuotedCharge.d.ts +63 -5
  52. package/types/resources/QuotedSubscription.d.ts +192 -5
  53. package/types/resources/ResourceMigration.d.ts +73 -3
  54. package/types/resources/SiteMigrationDetail.d.ts +98 -5
  55. package/types/resources/Subscription.d.ts +3462 -137
  56. package/types/resources/SubscriptionEntitlement.d.ts +116 -8
  57. package/types/resources/SubscriptionEstimate.d.ts +36 -2
  58. package/types/resources/TaxWithheld.d.ts +32 -0
  59. package/types/resources/ThirdPartyPaymentMethod.d.ts +24 -0
  60. package/types/resources/TimeMachine.d.ts +99 -7
  61. package/types/resources/Token.d.ts +179 -7
  62. package/types/resources/Transaction.d.ts +597 -25
  63. package/types/resources/UnbilledCharge.d.ts +355 -14
  64. package/types/resources/Usage.d.ts +259 -13
  65. package/types/resources/VirtualBankAccount.d.ts +255 -17
@@ -1,51 +1,210 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
2
  declare module 'chargebee' {
3
3
  export interface ItemEntitlement {
4
+
5
+ /**
6
+ * @description A unique identifier for the &#x60;item_entitlement&#x60;. This is auto-generated.
7
+
8
+ */
9
+
4
10
  id:string;
11
+
12
+ /**
13
+ * @description The &#x60;id&#x60; of the &#x60;item&#x60; to which this entitlement belongs.
14
+
15
+ */
16
+
5
17
  item_id?:string;
18
+
19
+ /**
20
+ * @description The &#x60;type&#x60; of the &#x60;item&#x60; to which this entitlement belongs. \* charge - Charge \* item - Item \* subscription - Subscription \* addon - Addon \* plan - Plan
21
+
22
+ */
23
+
6
24
  item_type?:'item' | 'charge' | 'addon' | 'subscription' | 'plan';
25
+
26
+ /**
27
+ * @description The &#x60;id&#x60; of the feature towards which this entitlement has been granted.
28
+
29
+ */
30
+
7
31
  feature_id?:string;
32
+
33
+ /**
34
+ * @description The &#x60;name&#x60; of the &#x60;feature&#x60; towards which this entitlement has been granted.
35
+
36
+ */
37
+
8
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 &#x60;feature.type&#x60;:
42
+
43
+ * When &#x60;feature.type&#x60; is &#x60;quantity&#x60; and:
44
+ * If &#x60;feature.levels[is_unlimited]&#x60; is not &#x60;true&#x60; for any one of &#x60;feature.levels[]&#x60;, then the value can be any one of &#x60;feature.levels[value][]&#x60;.
45
+ * If &#x60;feature.levels[is_unlimited]&#x60; is &#x60;true&#x60; for one of the &#x60;feature.levels[]&#x60;, then the value can also be:
46
+ * any one of &#x60;feature.levels[value][]&#x60;
47
+ * or it can be &#x60;unlimited&#x60; (case-insensitive), indicating unlimited entitlement.
48
+ * When &#x60;type&#x60; is &#x60;range&#x60; and:
49
+ * If &#x60;feature.levels[is_unlimited]&#x60; is not &#x60;true&#x60; for any one of &#x60;feature.levels[]&#x60;, then the value can be any whole number between &#x60;levels[value][0]&#x60; and &#x60;levels[value][1]&#x60; (inclusive).
50
+ * If &#x60;feature.levels[is_unlimited]&#x60; is &#x60;true&#x60; for one of the &#x60;feature.levels[]&#x60;, then the value can be:
51
+ * any whole number equal to or greater than &#x60;levels[value][0]&#x60;
52
+ * or it can be &#x60;unlimited&#x60; (case-insensitive), indicating unlimited entitlement.
53
+ * When &#x60;type&#x60; is &#x60;custom&#x60;, then the value can be any one of &#x60;feature.levels[value][]&#x60;.
54
+ * When &#x60;type&#x60; is &#x60;switch&#x60;, then the value is set as &#x60;available&#x60; or &#x60;true&#x60;.
55
+
56
+ */
57
+
9
58
  value?:string;
59
+
60
+ /**
61
+ * @description The display name for the entitlement level. The default values are auto-generated based on &#x60;feature.type&#x60; as follows:
62
+
63
+ * When &#x60;feature.type&#x60; is &#x60;quantity&#x60; or &#x60;range&#x60;, then &#x60;name&#x60; is the space-separated concatenation of &#x60;value&#x60; and the pluralized version of &#x60;feature.unit&#x60;. For example, if &#x60;value&#x60; is &#x60;20&#x60; and &#x60;feature.unit&#x60; is &#x60;user&#x60;, then &#x60;name&#x60; becomes &#x60;20 users&#x60;.
64
+ * When &#x60;feature.type&#x60; is &#x60;custom&#x60;, then &#x60;name&#x60; is the same as &#x60;value&#x60;.a
65
+
66
+ */
67
+
10
68
  name?:string;
11
69
  }
12
70
  export namespace ItemEntitlement {
13
- export class ItemEntitlementResource {
71
+ export class ItemEntitlementResource {
72
+ /**
73
+ * @description Retrieves a list of all the &#x60;item_entitlement&#x60;s for the &#x60;feature&#x60; specified.
74
+
75
+ */
76
+
14
77
  item_entitlements_for_feature(feature_id:string, input?:ItemEntitlementsForFeatureInputParam):ChargebeeRequest<ItemEntitlementsForFeatureResponse>;
78
+
79
+ /**
80
+ * @description Upserts or removes a set of &#x60;item_entitlement&#x60;s for an &#x60;feature&#x60; depending on the &#x60;action&#x60; specified. The API returns the upserted or deleted &#x60;item_entitlements&#x60; after successfully completing the operation. The operation returns an error when the first &#x60;item_entitlement&#x60; fails to be processed. Either all the &#x60;item_entitlement&#x60;s provided in the request are processed or none.
81
+
82
+ */
83
+
15
84
  add_item_entitlements(feature_id:string, input:AddItemEntitlementsInputParam):ChargebeeRequest<AddItemEntitlementsResponse>;
85
+
86
+ /**
87
+ * @description Retrieves a list of all the &#x60;item_entitlements&#x60; for the &#x60;item&#x60; specified.
88
+
89
+ */
90
+
16
91
  item_entitlements_for_item(item_id:string, input?:ItemEntitlementsForItemInputParam):ChargebeeRequest<ItemEntitlementsForItemResponse>;
92
+
93
+ /**
94
+ * @description Upserts or removes a set of &#x60;item_entitlements&#x60; for an [item](items?prod_cat_ver&#x3D;2) depending on the &#x60;action&#x60; specified. The API returns the upserted or deleted &#x60;item_entitlements&#x60; after successfully completing the operation. The operation returns an error when the first &#x60;item_entitlement&#x60; fails to be processed. Either all the &#x60;item_entitlement&#x60;s provided in the request are processed or none.
95
+
96
+ */
97
+
17
98
  upsert_or_remove_item_entitlements_for_item(item_id:string, input:UpsertOrRemoveItemEntitlementsForItemInputParam):ChargebeeRequest<UpsertOrRemoveItemEntitlementsForItemResponse>;
18
99
  }
19
- export interface ItemEntitlementsForFeatureResponse {
20
- list:{item_entitlement:ItemEntitlement}[];
21
- next_offset?:string;
100
+ export interface ItemEntitlementsForFeatureResponse {
101
+ /**
102
+ * @description Retrieves a list of all the &#x60;item_entitlement&#x60;s for the &#x60;feature&#x60; specified.
103
+
104
+ */
105
+
106
+ list:{item_entitlement:ItemEntitlement}[];
107
+
108
+ /**
109
+ * @description Retrieves a list of all the &#x60;item_entitlement&#x60;s for the &#x60;feature&#x60; specified.
110
+
111
+ */
112
+
113
+ next_offset?:string;
22
114
  }
23
115
  export interface ItemEntitlementsForFeatureInputParam {
24
- [key : string]: any;
116
+ [key : string]: any;
117
+ /**
118
+ * @description The number of resources to be returned.
119
+
120
+ */
121
+
25
122
  limit?:number;
123
+
124
+ /**
125
+ * @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.
126
+
127
+ */
128
+
26
129
  offset?:string;
27
130
  }
28
- export interface AddItemEntitlementsResponse {
29
- item_entitlement:ItemEntitlement;
131
+ export interface AddItemEntitlementsResponse {
132
+ /**
133
+ * @description Upserts or removes a set of &#x60;item_entitlement&#x60;s for an &#x60;feature&#x60; depending on the &#x60;action&#x60; specified. The API returns the upserted or deleted &#x60;item_entitlements&#x60; after successfully completing the operation. The operation returns an error when the first &#x60;item_entitlement&#x60; fails to be processed. Either all the &#x60;item_entitlement&#x60;s provided in the request are processed or none.
134
+
135
+ */
136
+
137
+ item_entitlement:ItemEntitlement;
30
138
  }
31
139
  export interface AddItemEntitlementsInputParam {
140
+
141
+ /**
142
+ * @description The specific action to be performed for each &#x60;item_entitlement&#x60; specified. \* remove - Deletes the &#x60;item_entitlement&#x60; for the &#x60;feature_id&#x60; and &#x60;item_id&#x60; combination, if it exists. \* upsert - If the &#x60;item_entitlement&#x60; already exists for the &#x60;feature_id&#x60; and &#x60;item_id&#x60; combination, the &#x60;value&#x60; of the &#x60;item_entitlement&#x60; is updated. If it doesn&#x27;t exist, a new &#x60;item_entitelment&#x60; is created.
143
+
144
+ */
145
+
32
146
  action:Action;
147
+
148
+ /**
149
+ * @description Parameters for item_entitlements
150
+
151
+ */
152
+
33
153
  item_entitlements?:{item_id:string,item_type?:'item' | 'charge' | 'addon' | 'subscription' | 'plan',value?:string}[];
34
154
  }
35
- export interface ItemEntitlementsForItemResponse {
36
- list:{item_entitlement:ItemEntitlement}[];
37
- next_offset?:string;
155
+ export interface ItemEntitlementsForItemResponse {
156
+ /**
157
+ * @description Retrieves a list of all the &#x60;item_entitlements&#x60; for the &#x60;item&#x60; specified.
158
+
159
+ */
160
+
161
+ list:{item_entitlement:ItemEntitlement}[];
162
+
163
+ /**
164
+ * @description Retrieves a list of all the &#x60;item_entitlements&#x60; for the &#x60;item&#x60; specified.
165
+
166
+ */
167
+
168
+ next_offset?:string;
38
169
  }
39
170
  export interface ItemEntitlementsForItemInputParam {
40
- [key : string]: any;
171
+ [key : string]: any;
172
+ /**
173
+ * @description The number of resources to be returned.
174
+
175
+ */
176
+
41
177
  limit?:number;
178
+
179
+ /**
180
+ * @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.
181
+
182
+ */
183
+
42
184
  offset?:string;
43
185
  }
44
- export interface UpsertOrRemoveItemEntitlementsForItemResponse {
45
- item_entitlement:ItemEntitlement;
186
+ export interface UpsertOrRemoveItemEntitlementsForItemResponse {
187
+ /**
188
+ * @description Upserts or removes a set of &#x60;item_entitlements&#x60; for an [item](items?prod_cat_ver&#x3D;2) depending on the &#x60;action&#x60; specified. The API returns the upserted or deleted &#x60;item_entitlements&#x60; after successfully completing the operation. The operation returns an error when the first &#x60;item_entitlement&#x60; fails to be processed. Either all the &#x60;item_entitlement&#x60;s provided in the request are processed or none.
189
+
190
+ */
191
+
192
+ item_entitlement:ItemEntitlement;
46
193
  }
47
194
  export interface UpsertOrRemoveItemEntitlementsForItemInputParam {
195
+
196
+ /**
197
+ * @description The specific action to be performed for each &#x60;item_entitlement&#x60; specified. \* remove - Deletes the &#x60;item_entitlement&#x60; for the &#x60;feature_id&#x60; and &#x60;item_id&#x60; combination, if it exists. \* upsert - If the &#x60;item_entitlement&#x60; already exists for the &#x60;feature_id&#x60; and &#x60;item_id&#x60; combination, the &#x60;value&#x60; of the &#x60;item_entitlement&#x60; is updated. If it doesn&#x27;t exist, a new &#x60;item_entitelment&#x60; is created.
198
+
199
+ */
200
+
48
201
  action:Action;
202
+
203
+ /**
204
+ * @description Parameters for item_entitlements
205
+
206
+ */
207
+
49
208
  item_entitlements?:{feature_id:string,value?:string}[];
50
209
  }
51
210
 
@@ -2,57 +2,215 @@
2
2
  declare module 'chargebee' {
3
3
  export interface ItemFamily {
4
4
  [key : string] : any;
5
+ /**
6
+ * @description The identifier for the item family. It is unique and immutable.
7
+
8
+ */
9
+
5
10
  id:string;
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
+
6
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
+
7
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 &#x60;id&#x60; and &#x60;name&#x60; can be reused to create a new item family.
28
+
29
+ */
30
+
8
31
  status?:'deleted' | 'active';
32
+
33
+ /**
34
+ * @description The version number of this resource. For every change made to the resource, &#x60;resource_version&#x60; is updated with a new timestamp in milliseconds.
35
+
36
+ */
37
+
9
38
  resource_version?:number;
39
+
40
+ /**
41
+ * @description When the item family was last updated.
42
+
43
+ */
44
+
10
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
+
11
52
  channel?:Channel;
12
53
  }
13
54
  export namespace ItemFamily {
14
- export class ItemFamilyResource {
55
+ export class ItemFamilyResource {
56
+ /**
57
+ * @description Deletes an item family, marking its &#x60;status&#x60; as &#x60;deleted&#x60;. This is not allowed if there are &#x60;active&#x60; items under the item family. Once deleted, the &#x60;id&#x60; and &#x60;name&#x60; of the item family can be reused to create a new item family.
58
+
59
+ */
60
+
15
61
  delete(item_family_id:string):ChargebeeRequest<DeleteResponse>;
62
+
63
+ /**
64
+ * @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.
65
+
66
+ */
67
+
16
68
  list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
69
+
70
+ /**
71
+ * @description This endpoint creates an item family for your product line or service.
72
+
73
+ */
74
+
17
75
  create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
76
+
77
+ /**
78
+ * @description This endpoint retrieves an item family based on the item family id.
79
+
80
+ */
81
+
18
82
  retrieve(item_family_id:string):ChargebeeRequest<RetrieveResponse>;
83
+
84
+ /**
85
+ * @description This endpoint updates the name and/or description of the item family.
86
+
87
+ */
88
+
19
89
  update(item_family_id:string, input?:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
20
90
  }
21
- export interface DeleteResponse {
22
- item_family:ItemFamily;
91
+ export interface DeleteResponse {
92
+ /**
93
+ * @description Deletes an item family, marking its &#x60;status&#x60; as &#x60;deleted&#x60;. This is not allowed if there are &#x60;active&#x60; items under the item family. Once deleted, the &#x60;id&#x60; and &#x60;name&#x60; of the item family can be reused to create a new item family.
94
+
95
+ */
96
+
97
+ item_family:ItemFamily;
23
98
  }
24
99
 
25
- export interface ListResponse {
26
- list:{item_family:ItemFamily}[];
27
- next_offset?:string;
100
+ export interface ListResponse {
101
+ /**
102
+ * @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.
103
+
104
+ */
105
+
106
+ list:{item_family:ItemFamily}[];
107
+
108
+ /**
109
+ * @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.
110
+
111
+ */
112
+
113
+ next_offset?:string;
28
114
  }
29
115
  export interface ListInputParam {
30
- [key : string]: any;
116
+ [key : string]: any;
117
+ /**
118
+ * @description The number of resources to be returned.
119
+
120
+ */
121
+
31
122
  limit?:number;
123
+
124
+ /**
125
+ * @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.
126
+
127
+ */
128
+
32
129
  offset?:string;
130
+
131
+ /**
132
+ * @description The identifier for the item family. It is unique and immutable.
133
+
134
+ */
135
+
33
136
  id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
137
+
138
+ /**
139
+ * @description A unique display name for the item family. This is visible only in Chargebee and not to customers.
140
+
141
+ */
142
+
34
143
  name?:{is?:string,is_not?:string,starts_with?:string};
144
+
145
+ /**
146
+ * @description When the item family was last updated.
147
+
148
+ */
149
+
35
150
  updated_at?:{after?:string,before?:string,between?:string,on?:string};
36
151
  }
37
- export interface CreateResponse {
38
- item_family:ItemFamily;
152
+ export interface CreateResponse {
153
+ /**
154
+ * @description This endpoint creates an item family for your product line or service.
155
+
156
+ */
157
+
158
+ item_family:ItemFamily;
39
159
  }
40
160
  export interface CreateInputParam {
41
- [key : string] : any;
161
+ [key : string] : any;
162
+ /**
163
+ * @description The identifier for the item family. Must be unique and is immutable.
164
+
165
+ */
166
+
42
167
  id:string;
168
+
169
+ /**
170
+ * @description The display name for the item family. Must be unique. This is visible only in Chargebee and not to customers.
171
+
172
+ */
173
+
43
174
  name:string;
175
+
176
+ /**
177
+ * @description Description of the item family. This is visible only in Chargebee and not to customers.
178
+
179
+ */
180
+
44
181
  description?:string;
45
182
  }
46
- export interface RetrieveResponse {
47
- item_family:ItemFamily;
183
+ export interface RetrieveResponse {
184
+ /**
185
+ * @description This endpoint retrieves an item family based on the item family id.
186
+
187
+ */
188
+
189
+ item_family:ItemFamily;
48
190
  }
49
191
 
50
- export interface UpdateResponse {
51
- item_family:ItemFamily;
192
+ export interface UpdateResponse {
193
+ /**
194
+ * @description This endpoint updates the name and/or description of the item family.
195
+
196
+ */
197
+
198
+ item_family:ItemFamily;
52
199
  }
53
200
  export interface UpdateInputParam {
54
- [key : string] : any;
201
+ [key : string] : any;
202
+ /**
203
+ * @description The display name for the item family. Must be unique. This is visible only in Chargebee and not to customers.
204
+
205
+ */
206
+
55
207
  name?:string;
208
+
209
+ /**
210
+ * @description Description of the item family. This is visible only in Chargebee and not to customers.
211
+
212
+ */
213
+
56
214
  description?:string;
57
215
  }
58
216