chargebee 2.26.0 → 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.
- package/CHANGELOG.md +4 -0
- package/lib/chargebee.js +1 -1
- package/package.json +1 -1
- package/types/core.d.ts +1 -0
- package/types/resources/Address.d.ts +245 -5
- package/types/resources/AdvanceInvoiceSchedule.d.ts +78 -2
- package/types/resources/AttachedItem.d.ts +305 -13
- package/types/resources/Card.d.ts +485 -13
- package/types/resources/Comment.d.ts +177 -11
- package/types/resources/Contact.d.ts +54 -0
- package/types/resources/ContractTerm.d.ts +83 -0
- package/types/resources/Coupon.d.ts +665 -20
- package/types/resources/CouponCode.d.ts +56 -5
- package/types/resources/CouponSet.d.ts +224 -17
- package/types/resources/CreditNote.d.ts +1202 -44
- package/types/resources/CreditNoteEstimate.d.ts +75 -6
- package/types/resources/Customer.d.ts +2132 -73
- package/types/resources/DifferentialPrice.d.ts +266 -15
- package/types/resources/Discount.d.ts +107 -0
- package/types/resources/Download.d.ts +18 -0
- package/types/resources/EntitlementOverride.d.ts +101 -7
- package/types/resources/Estimate.d.ts +1181 -27
- package/types/resources/Event.d.ts +145 -8
- package/types/resources/Export.d.ts +703 -32
- package/types/resources/Feature.d.ts +356 -22
- package/types/resources/Gift.d.ts +351 -24
- package/types/resources/Hierarchy.d.ts +30 -0
- package/types/resources/HostedPage.d.ts +1212 -37
- package/types/resources/ImpactedItem.d.ts +41 -1
- package/types/resources/ImpactedSubscription.d.ts +36 -1
- package/types/resources/InAppSubscription.d.ts +636 -9
- package/types/resources/Invoice.d.ts +2293 -93
- package/types/resources/InvoiceEstimate.d.ts +75 -6
- package/types/resources/Item.d.ts +542 -16
- package/types/resources/ItemEntitlement.d.ts +172 -13
- package/types/resources/ItemFamily.d.ts +173 -15
- package/types/resources/ItemPrice.d.ts +971 -26
- package/types/resources/Media.d.ts +24 -0
- package/types/resources/NonSubscription.d.ts +51 -3
- package/types/resources/Order.d.ts +1224 -32
- package/types/resources/PaymentIntent.d.ts +318 -8
- package/types/resources/PaymentReferenceNumber.d.ts +24 -0
- package/types/resources/PaymentSource.d.ts +1259 -55
- package/types/resources/PaymentVoucher.d.ts +262 -14
- package/types/resources/PortalSession.d.ts +187 -10
- package/types/resources/PromotionalCredit.d.ts +351 -16
- package/types/resources/Purchase.d.ts +274 -5
- package/types/resources/Quote.d.ts +1595 -62
- package/types/resources/QuoteLineGroup.d.ts +134 -5
- package/types/resources/QuotedCharge.d.ts +63 -5
- package/types/resources/QuotedSubscription.d.ts +192 -5
- package/types/resources/ResourceMigration.d.ts +73 -3
- package/types/resources/SiteMigrationDetail.d.ts +98 -5
- package/types/resources/Subscription.d.ts +3462 -137
- package/types/resources/SubscriptionEntitlement.d.ts +116 -8
- package/types/resources/SubscriptionEstimate.d.ts +36 -2
- package/types/resources/TaxWithheld.d.ts +32 -0
- package/types/resources/ThirdPartyPaymentMethod.d.ts +24 -0
- package/types/resources/TimeMachine.d.ts +99 -7
- package/types/resources/Token.d.ts +179 -7
- package/types/resources/Transaction.d.ts +597 -25
- package/types/resources/UnbilledCharge.d.ts +355 -14
- package/types/resources/Usage.d.ts +259 -13
- package/types/resources/VirtualBankAccount.d.ts +255 -17
|
@@ -1,23 +1,74 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
2
|
declare module 'chargebee' {
|
|
3
3
|
export interface CouponCode {
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @description Unique coupon code that can be redeemed only once.
|
|
7
|
+
|
|
8
|
+
*/
|
|
9
|
+
|
|
4
10
|
code:string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @description Status of the coupon code. \* not_redeemed - Can be applied to a subscription. \* redeemed - Cannot be applied to a subscription as the coupon code has been already used. \* archived - Cannot be applied to a subscription as it has been made inactive.
|
|
14
|
+
|
|
15
|
+
*/
|
|
16
|
+
|
|
5
17
|
status:'archived' | 'redeemed' | 'not_redeemed';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @description Id of the main coupon resource.
|
|
21
|
+
|
|
22
|
+
*/
|
|
23
|
+
|
|
6
24
|
coupon_id:string;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @description Uniquely identifies a coupon_set
|
|
28
|
+
|
|
29
|
+
*/
|
|
30
|
+
|
|
7
31
|
coupon_set_id:string;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @description Coupon set name to which this coupon code would be grouped under. If the coupon set with the passed name is not present, a new coupon set will be created.
|
|
35
|
+
|
|
36
|
+
*/
|
|
37
|
+
|
|
8
38
|
coupon_set_name:string;
|
|
9
39
|
}
|
|
10
40
|
export namespace CouponCode {
|
|
11
|
-
export class CouponCodeResource {
|
|
41
|
+
export class CouponCodeResource {
|
|
42
|
+
/**
|
|
43
|
+
* @description Retrieves a specific coupon code details.
|
|
44
|
+
|
|
45
|
+
*/
|
|
46
|
+
|
|
12
47
|
retrieve(coupon_code_code:string):ChargebeeRequest<RetrieveResponse>;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @description Archives a coupon code thereby making it inactive. The archived coupon code cannot be applied to any subscription.
|
|
51
|
+
|
|
52
|
+
*/
|
|
53
|
+
|
|
13
54
|
archive(coupon_code_code:string):ChargebeeRequest<ArchiveResponse>;
|
|
14
55
|
}
|
|
15
|
-
export interface RetrieveResponse {
|
|
16
|
-
|
|
56
|
+
export interface RetrieveResponse {
|
|
57
|
+
/**
|
|
58
|
+
* @description Retrieves a specific coupon code details.
|
|
59
|
+
|
|
60
|
+
*/
|
|
61
|
+
|
|
62
|
+
coupon_code:CouponCode;
|
|
17
63
|
}
|
|
18
64
|
|
|
19
|
-
export interface ArchiveResponse {
|
|
20
|
-
|
|
65
|
+
export interface ArchiveResponse {
|
|
66
|
+
/**
|
|
67
|
+
* @description Archives a coupon code thereby making it inactive. The archived coupon code cannot be applied to any subscription.
|
|
68
|
+
|
|
69
|
+
*/
|
|
70
|
+
|
|
71
|
+
coupon_code:CouponCode;
|
|
21
72
|
}
|
|
22
73
|
|
|
23
74
|
|
|
@@ -1,70 +1,277 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
2
|
declare module 'chargebee' {
|
|
3
3
|
export interface CouponSet {
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @description Uniquely identifies a coupon_set
|
|
7
|
+
|
|
8
|
+
*/
|
|
9
|
+
|
|
4
10
|
id:string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @description Coupon id linked to coupon set
|
|
14
|
+
|
|
15
|
+
*/
|
|
16
|
+
|
|
5
17
|
coupon_id:string;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @description Name of the coupon set
|
|
21
|
+
|
|
22
|
+
*/
|
|
23
|
+
|
|
6
24
|
name:string;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @description No of coupon codes present in coupon set
|
|
28
|
+
|
|
29
|
+
*/
|
|
30
|
+
|
|
7
31
|
total_count?:number;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @description No of redeemed codes
|
|
35
|
+
|
|
36
|
+
*/
|
|
37
|
+
|
|
8
38
|
redeemed_count?:number;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @description No of archived codes
|
|
42
|
+
|
|
43
|
+
*/
|
|
44
|
+
|
|
9
45
|
archived_count?:number;
|
|
10
46
|
}
|
|
11
47
|
export namespace CouponSet {
|
|
12
|
-
export class CouponSetResource {
|
|
48
|
+
export class CouponSetResource {
|
|
49
|
+
/**
|
|
50
|
+
* @description Use this API to get the list of all the coupon sets.
|
|
51
|
+
|
|
52
|
+
*/
|
|
53
|
+
|
|
13
54
|
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @description Create a coupon set with a coupon code compatible to your product offers and promotional discounts
|
|
58
|
+
|
|
59
|
+
*/
|
|
60
|
+
|
|
14
61
|
create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @description Use this API to update a specific coupon set by updating its `name` and the `meta_data`.
|
|
65
|
+
|
|
66
|
+
*/
|
|
67
|
+
|
|
15
68
|
update(coupon_set_id:string, input?:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @description Use this API to retrieve a specific coupon set.
|
|
72
|
+
|
|
73
|
+
*/
|
|
74
|
+
|
|
16
75
|
retrieve(coupon_set_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @description This API add coupon codes to an existing coupon set.
|
|
79
|
+
|
|
80
|
+
*/
|
|
81
|
+
|
|
17
82
|
add_coupon_codes(coupon_set_id:string, input?:AddCouponCodesInputParam):ChargebeeRequest<AddCouponCodesResponse>;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* @description Use this API to delete all the unutilised coupon codes from a specific coupon set.
|
|
86
|
+
|
|
87
|
+
*/
|
|
88
|
+
|
|
18
89
|
delete_unused_coupon_codes(coupon_set_id:string):ChargebeeRequest<DeleteUnusedCouponCodesResponse>;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* @description Use this endpoint to delete a specific coupon set
|
|
93
|
+
|
|
94
|
+
*/
|
|
95
|
+
|
|
19
96
|
delete(coupon_set_id:string):ChargebeeRequest<DeleteResponse>;
|
|
20
97
|
}
|
|
21
|
-
export interface ListResponse {
|
|
22
|
-
|
|
23
|
-
|
|
98
|
+
export interface ListResponse {
|
|
99
|
+
/**
|
|
100
|
+
* @description Use this API to get the list of all the coupon sets.
|
|
101
|
+
|
|
102
|
+
*/
|
|
103
|
+
|
|
104
|
+
list:{coupon_set:CouponSet}[];
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* @description Use this API to get the list of all the coupon sets.
|
|
108
|
+
|
|
109
|
+
*/
|
|
110
|
+
|
|
111
|
+
next_offset?:string;
|
|
24
112
|
}
|
|
25
113
|
export interface ListInputParam {
|
|
26
|
-
[key : string]: any;
|
|
114
|
+
[key : string]: any;
|
|
115
|
+
/**
|
|
116
|
+
* @description The number of resources to be returned.
|
|
117
|
+
|
|
118
|
+
*/
|
|
119
|
+
|
|
27
120
|
limit?:number;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set \`offset\` to the value of \`next_offset\` obtained in the previous iteration of the API call.
|
|
124
|
+
|
|
125
|
+
*/
|
|
126
|
+
|
|
28
127
|
offset?:string;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* @description Uniquely identifies a coupon_set
|
|
131
|
+
|
|
132
|
+
*/
|
|
133
|
+
|
|
29
134
|
id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* @description Name of the coupon set
|
|
138
|
+
|
|
139
|
+
*/
|
|
140
|
+
|
|
30
141
|
name?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* @description Coupon id linked to coupon set
|
|
145
|
+
|
|
146
|
+
*/
|
|
147
|
+
|
|
31
148
|
coupon_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* @description No of coupon codes present in coupon set
|
|
152
|
+
|
|
153
|
+
*/
|
|
154
|
+
|
|
32
155
|
total_count?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string};
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* @description No of redeemed codes
|
|
159
|
+
|
|
160
|
+
*/
|
|
161
|
+
|
|
33
162
|
redeemed_count?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string};
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* @description No of archived codes
|
|
166
|
+
|
|
167
|
+
*/
|
|
168
|
+
|
|
34
169
|
archived_count?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string};
|
|
35
170
|
}
|
|
36
|
-
export interface CreateResponse {
|
|
37
|
-
|
|
171
|
+
export interface CreateResponse {
|
|
172
|
+
/**
|
|
173
|
+
* @description Create a coupon set with a coupon code compatible to your product offers and promotional discounts
|
|
174
|
+
|
|
175
|
+
*/
|
|
176
|
+
|
|
177
|
+
coupon_set:CouponSet;
|
|
38
178
|
}
|
|
39
179
|
export interface CreateInputParam {
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* @description Coupon id linked to coupon set.
|
|
183
|
+
|
|
184
|
+
*/
|
|
185
|
+
|
|
40
186
|
coupon_id:string;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* @description Name of the coupon set.
|
|
190
|
+
|
|
191
|
+
*/
|
|
192
|
+
|
|
41
193
|
name:string;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* @description Uniquely identifies a coupon_set.
|
|
197
|
+
|
|
198
|
+
*/
|
|
199
|
+
|
|
42
200
|
id:string;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* @description A set of key-value pairs stored as additional information for the coupon set. [Learn more](./#meta_data).
|
|
204
|
+
|
|
205
|
+
*/
|
|
206
|
+
|
|
43
207
|
meta_data?:object;
|
|
44
208
|
}
|
|
45
|
-
export interface UpdateResponse {
|
|
46
|
-
|
|
209
|
+
export interface UpdateResponse {
|
|
210
|
+
/**
|
|
211
|
+
* @description Use this API to update a specific coupon set by updating its `name` and the `meta_data`.
|
|
212
|
+
|
|
213
|
+
*/
|
|
214
|
+
|
|
215
|
+
coupon_set:CouponSet;
|
|
47
216
|
}
|
|
48
217
|
export interface UpdateInputParam {
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* @description Name of the coupon set.
|
|
221
|
+
|
|
222
|
+
*/
|
|
223
|
+
|
|
49
224
|
name?:string;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* @description A set of key-value pairs stored as additional information for the coupon set. [Learn more](./#meta_data).
|
|
228
|
+
|
|
229
|
+
*/
|
|
230
|
+
|
|
50
231
|
meta_data?:object;
|
|
51
232
|
}
|
|
52
|
-
export interface RetrieveResponse {
|
|
53
|
-
|
|
233
|
+
export interface RetrieveResponse {
|
|
234
|
+
/**
|
|
235
|
+
* @description Use this API to retrieve a specific coupon set.
|
|
236
|
+
|
|
237
|
+
*/
|
|
238
|
+
|
|
239
|
+
coupon_set:CouponSet;
|
|
54
240
|
}
|
|
55
241
|
|
|
56
|
-
export interface AddCouponCodesResponse {
|
|
57
|
-
|
|
242
|
+
export interface AddCouponCodesResponse {
|
|
243
|
+
/**
|
|
244
|
+
* @description This API add coupon codes to an existing coupon set.
|
|
245
|
+
|
|
246
|
+
*/
|
|
247
|
+
|
|
248
|
+
coupon_set:CouponSet;
|
|
58
249
|
}
|
|
59
250
|
export interface AddCouponCodesInputParam {
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* @description You can pass up to 100 values per API call. You can also use the Chargebee UI to pass up to 1000 codes per operation. There is no limit on the total number of coupon codes that can be included in a coupon set.
|
|
254
|
+
|
|
255
|
+
*/
|
|
256
|
+
|
|
60
257
|
code?:string[];
|
|
61
258
|
}
|
|
62
|
-
export interface DeleteUnusedCouponCodesResponse {
|
|
63
|
-
|
|
259
|
+
export interface DeleteUnusedCouponCodesResponse {
|
|
260
|
+
/**
|
|
261
|
+
* @description Use this API to delete all the unutilised coupon codes from a specific coupon set.
|
|
262
|
+
|
|
263
|
+
*/
|
|
264
|
+
|
|
265
|
+
coupon_set:CouponSet;
|
|
64
266
|
}
|
|
65
267
|
|
|
66
|
-
export interface DeleteResponse {
|
|
67
|
-
|
|
268
|
+
export interface DeleteResponse {
|
|
269
|
+
/**
|
|
270
|
+
* @description Use this endpoint to delete a specific coupon set
|
|
271
|
+
|
|
272
|
+
*/
|
|
273
|
+
|
|
274
|
+
coupon_set:CouponSet;
|
|
68
275
|
}
|
|
69
276
|
|
|
70
277
|
|