chargebee 2.51.0 → 2.53.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/CHANGELOG.md +83 -0
- package/lib/chargebee.js +1 -1
- package/lib/resources/api_endpoints.js +103 -5
- package/package.json +1 -1
- package/types/core.d.ts +6 -6
- package/types/index.d.ts +10 -0
- package/types/resources/Addon.d.ts +3 -3
- package/types/resources/Address.d.ts +2 -194
- package/types/resources/AdvanceInvoiceSchedule.d.ts +5 -67
- package/types/resources/AttachedItem.d.ts +1 -1
- package/types/resources/Attribute.d.ts +4 -1
- package/types/resources/BillingConfiguration.d.ts +21 -0
- package/types/resources/Brand.d.ts +12 -0
- package/types/resources/BusinessEntity.d.ts +10 -8
- package/types/resources/BusinessEntityTransfer.d.ts +10 -7
- package/types/resources/Card.d.ts +11 -311
- package/types/resources/Comment.d.ts +10 -125
- package/types/resources/Contact.d.ts +2 -44
- package/types/resources/ContractTerm.d.ts +4 -72
- package/types/resources/Coupon.d.ts +4 -41
- package/types/resources/CouponCode.d.ts +67 -35
- package/types/resources/CouponSet.d.ts +12 -121
- package/types/resources/CreditNote.d.ts +89 -95
- package/types/resources/Currency.d.ts +8 -5
- package/types/resources/Customer.d.ts +96 -95
- package/types/resources/CustomerEntitlement.d.ts +3 -1
- package/types/resources/DifferentialPrice.d.ts +1 -1
- package/types/resources/Discount.d.ts +5 -90
- package/types/resources/Download.d.ts +2 -14
- package/types/resources/Entitlement.d.ts +15 -103
- package/types/resources/EntitlementOverride.d.ts +4 -89
- package/types/resources/Estimate.d.ts +6 -14
- package/types/resources/Event.d.ts +24 -109
- package/types/resources/Export.d.ts +116 -432
- package/types/resources/Feature.d.ts +19 -321
- package/types/resources/GatewayErrorDetail.d.ts +6 -48
- package/types/resources/Gift.d.ts +34 -294
- package/types/resources/Hierarchy.d.ts +4 -24
- package/types/resources/HostedPage.d.ts +4 -4
- package/types/resources/ImpactedCustomer.d.ts +23 -0
- package/types/resources/ImpactedItem.d.ts +4 -36
- package/types/resources/ImpactedItemPrice.d.ts +5 -2
- package/types/resources/ImpactedSubscription.d.ts +3 -30
- package/types/resources/InAppSubscription.d.ts +13 -355
- package/types/resources/Invoice.d.ts +112 -126
- package/types/resources/InvoiceEstimate.d.ts +1 -1
- package/types/resources/Item.d.ts +4 -11
- package/types/resources/ItemEntitlement.d.ts +15 -155
- package/types/resources/ItemFamily.d.ts +3 -3
- package/types/resources/ItemPrice.d.ts +7 -7
- package/types/resources/NonSubscription.d.ts +9 -6
- package/types/resources/OmnichannelOneTimeOrder.d.ts +90 -0
- package/types/resources/OmnichannelOneTimeOrderItem.d.ts +24 -0
- package/types/resources/OmnichannelSubscription.d.ts +2 -2
- package/types/resources/OmnichannelSubscriptionItem.d.ts +1 -1
- package/types/resources/OmnichannelSubscriptionItemScheduledChange.d.ts +1 -1
- package/types/resources/Order.d.ts +3 -3
- package/types/resources/PaymentIntent.d.ts +9 -255
- package/types/resources/PaymentReferenceNumber.d.ts +3 -20
- package/types/resources/PaymentSource.d.ts +4 -4
- package/types/resources/PaymentVoucher.d.ts +22 -205
- package/types/resources/Plan.d.ts +3 -3
- package/types/resources/PortalSession.d.ts +4 -146
- package/types/resources/PriceVariant.d.ts +2 -2
- package/types/resources/PricingPageSession.d.ts +2 -2
- package/types/resources/PromotionalCredit.d.ts +12 -215
- package/types/resources/Purchase.d.ts +5 -3
- package/types/resources/Quote.d.ts +32 -14
- package/types/resources/QuotedCharge.d.ts +7 -0
- package/types/resources/QuotedRamp.d.ts +11 -16
- package/types/resources/Ramp.d.ts +7 -7
- package/types/resources/RecordedPurchase.d.ts +8 -1
- package/types/resources/ResourceMigration.d.ts +2 -54
- package/types/resources/SiteMigrationDetail.d.ts +13 -55
- package/types/resources/Subscription.d.ts +33 -29
- package/types/resources/SubscriptionEntitlement.d.ts +6 -106
- package/types/resources/SubscriptionEntitlementsCreatedDetail.d.ts +12 -0
- package/types/resources/SubscriptionEntitlementsUpdatedDetail.d.ts +12 -0
- package/types/resources/SubscriptionEstimate.d.ts +14 -11
- package/types/resources/TaxWithheld.d.ts +14 -26
- package/types/resources/ThirdPartyPaymentMethod.d.ts +2 -19
- package/types/resources/TimeMachine.d.ts +3 -64
- package/types/resources/Token.d.ts +3 -60
- package/types/resources/Transaction.d.ts +8 -8
- package/types/resources/UnbilledCharge.d.ts +1 -1
- package/types/resources/Usage.d.ts +21 -165
- package/types/resources/UsageFile.d.ts +5 -5
- package/types/resources/VirtualBankAccount.d.ts +1 -1
- package/types/resources/WebhookEndpoint.d.ts +117 -0
|
@@ -1,126 +1,46 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
2
3
|
declare module 'chargebee' {
|
|
3
4
|
export interface Gift {
|
|
4
5
|
|
|
5
|
-
/**
|
|
6
|
-
* @description Uniquely identifies a gift
|
|
7
6
|
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
7
|
id:string;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @description Status of the gift. \* claimed - Gift is claimed. \* cancelled - Gift is cancelled. \* unclaimed - Gift is not yet claimed and is ready to be claimed. \* scheduled - Gift has been scheduled. \* expired - Gift is expired.
|
|
14
8
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
status:'expired' | 'scheduled' | 'unclaimed' | 'claimed' | 'cancelled';
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* @description Indicates the date on which the gift notification is sent to the receiver. If not passed, the receiver is notified immediately.
|
|
9
|
+
status:'scheduled' | 'unclaimed' | 'claimed' | 'cancelled' | 'expired';
|
|
21
10
|
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
11
|
scheduled_at?:number;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @description When `true`, the claim happens automatically. When not passed, the default value in the site settings is used.
|
|
28
12
|
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
13
|
auto_claim:boolean;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @description When `true`, indicates that the gift does not expire. Do not pass or pass as `false` when `auto_claim` is set.
|
|
35
14
|
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
15
|
no_expiry:boolean;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* @description The date until which the gift can be claimed. Must be set to a value after `scheduled_at`. If the gift is not claimed within `claim_expiry_date`, it will expire and the subscription will move to `cancelled` state. When not passed, the value specified in the site settings will be used. Pass as `NULL` or do not pass when `auto_claim` or `no_expiry` are set.
|
|
42
16
|
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
17
|
claim_expiry_date?:number;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* @description Version number of this resource. The `resource_version` 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.
|
|
49
18
|
|
|
50
|
-
*/
|
|
51
|
-
|
|
52
19
|
resource_version?:number;
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* @description Timestamp indicating when this gift resource was last updated.
|
|
56
20
|
|
|
57
|
-
*/
|
|
58
|
-
|
|
59
21
|
updated_at?:number;
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* @description Gifter details
|
|
63
22
|
|
|
64
|
-
*/
|
|
65
|
-
|
|
66
23
|
gifter:Gift.Gifter;
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* @description Receiver details
|
|
70
24
|
|
|
71
|
-
*/
|
|
72
|
-
|
|
73
25
|
gift_receiver:Gift.GiftReceiver;
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* @description Gift timeline details
|
|
77
26
|
|
|
78
|
-
*/
|
|
79
|
-
|
|
80
27
|
gift_timelines?:Gift.GiftTimeline[];
|
|
28
|
+
|
|
81
29
|
}
|
|
82
30
|
export namespace Gift {
|
|
83
31
|
export class GiftResource {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
*/
|
|
88
|
-
|
|
89
|
-
create_for_items(input?:CreateForItemsInputParam):ChargebeeRequest<CreateForItemsResponse>;
|
|
32
|
+
create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
|
|
33
|
+
|
|
34
|
+
create_for_items(input:CreateForItemsInputParam):ChargebeeRequest<CreateForItemsResponse>;
|
|
90
35
|
|
|
91
|
-
/**
|
|
92
|
-
* @description Retrieves a gift subscription. This API accepts the gift 'id' and returns the gift along with the subscription.
|
|
93
|
-
|
|
94
|
-
*/
|
|
95
|
-
|
|
96
36
|
retrieve(gift_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
97
37
|
|
|
98
|
-
/**
|
|
99
|
-
* @description Retrieves the list of gifts.
|
|
100
|
-
|
|
101
|
-
*/
|
|
102
|
-
|
|
103
38
|
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
104
39
|
|
|
105
|
-
/**
|
|
106
|
-
* @description Claiming a gift will move the status to 'claimed'. Only gifts in 'unclaimed' state can be claimed.
|
|
107
|
-
|
|
108
|
-
*/
|
|
109
|
-
|
|
110
40
|
claim(gift_id:string):ChargebeeRequest<ClaimResponse>;
|
|
111
41
|
|
|
112
|
-
/**
|
|
113
|
-
* @description This API allows to cancel gifts. Only gift in 'scheduled' and 'unclaimed' states can be cancelled.
|
|
114
|
-
|
|
115
|
-
*/
|
|
116
|
-
|
|
117
42
|
cancel(gift_id:string):ChargebeeRequest<CancelResponse>;
|
|
118
43
|
|
|
119
|
-
/**
|
|
120
|
-
* @description Change the date/time at which the gift notification email is to be sent. This only applies to gifts in the scheduled [status](https://apidocs.chargebee.com/docs/api/gifts#gift_status).
|
|
121
|
-
|
|
122
|
-
*/
|
|
123
|
-
|
|
124
44
|
update_gift(gift_id:string, input:UpdateGiftInputParam):ChargebeeRequest<UpdateGiftResponse>;
|
|
125
45
|
}
|
|
126
46
|
export interface CreateResponse {
|
|
@@ -132,82 +52,27 @@ declare module 'chargebee' {
|
|
|
132
52
|
}
|
|
133
53
|
export interface CreateInputParam {
|
|
134
54
|
|
|
135
|
-
/**
|
|
136
|
-
* @description Indicates the date on which the gift notification is sent to the receiver. If not passed, the receiver is notified immediately.
|
|
137
|
-
|
|
138
|
-
*/
|
|
139
|
-
|
|
140
|
-
scheduled_at?:number;
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* @description When `true`, the claim happens automatically. When not passed, the default value in the site settings is used.
|
|
144
|
-
|
|
145
|
-
*/
|
|
146
|
-
|
|
147
|
-
auto_claim?:boolean;
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* @description When `true`, indicates that the gift does not expire. Do not pass or pass as `false` when `auto_claim` is set. .
|
|
151
|
-
|
|
152
|
-
*/
|
|
153
|
-
|
|
154
|
-
no_expiry?:boolean;
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* @description The date until which the gift can be claimed. Must be set to a value after `scheduled_at`. If the gift is not claimed within `claim_expiry_date`, it will expire and the subscription will move to `cancelled` state. When not passed, the value specified in the site settings will be used. Pass as `NULL` or do not pass when `auto_claim` or `no_expiry` are set.
|
|
158
|
-
|
|
159
|
-
*/
|
|
160
|
-
|
|
161
|
-
claim_expiry_date?:number;
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* @description List of coupons to be applied to this subscription. You can provide coupon ids or coupon codes.
|
|
165
|
-
|
|
166
|
-
*/
|
|
167
|
-
|
|
168
|
-
coupon_ids?:string[];
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* @description Parameters for gifter
|
|
172
|
-
|
|
173
|
-
*/
|
|
174
|
-
|
|
175
55
|
gifter:{customer_id:string,note?:string,payment_src_id?:string,signature:string};
|
|
176
56
|
|
|
177
|
-
/**
|
|
178
|
-
* @description Parameters for gift_receiver
|
|
179
|
-
|
|
180
|
-
*/
|
|
181
|
-
|
|
182
57
|
gift_receiver:{customer_id:string,email:string,first_name:string,last_name:string};
|
|
183
58
|
|
|
184
|
-
|
|
185
|
-
* @description Parameters for payment_intent
|
|
186
|
-
|
|
187
|
-
*/
|
|
59
|
+
payment_intent?:{additional_information?:object,gateway_account_id?:string,gw_payment_method_id?:string,gw_token?:string,id?:string,payment_method_type?:'card' | 'ideal' | 'sofort' | 'bancontact' | 'google_pay' | 'dotpay' | 'giropay' | 'apple_pay' | 'upi' | 'netbanking_emandates' | 'paypal_express_checkout' | 'direct_debit' | 'boleto' | 'venmo' | 'amazon_payments' | 'pay_to' | 'faster_payments' | 'sepa_instant_transfer' | 'klarna_pay_now' | 'online_banking_poland' | 'payconiq_by_bancontact',reference_id?:string};
|
|
188
60
|
|
|
189
|
-
|
|
61
|
+
shipping_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
|
|
190
62
|
|
|
191
|
-
|
|
192
|
-
* @description Parameters for shipping_address
|
|
193
|
-
|
|
194
|
-
*/
|
|
63
|
+
subscription:object;
|
|
195
64
|
|
|
196
|
-
|
|
65
|
+
addons?:{id?:string,quantity?:number,quantity_in_decimal?:string}[];
|
|
197
66
|
|
|
198
|
-
|
|
199
|
-
* @description Parameters for subscription
|
|
200
|
-
|
|
201
|
-
*/
|
|
67
|
+
scheduled_at?:number;
|
|
202
68
|
|
|
203
|
-
|
|
69
|
+
auto_claim?:boolean;
|
|
204
70
|
|
|
205
|
-
|
|
206
|
-
* @description Parameters for addons
|
|
207
|
-
|
|
208
|
-
*/
|
|
71
|
+
no_expiry?:boolean;
|
|
209
72
|
|
|
210
|
-
|
|
73
|
+
claim_expiry_date?:number;
|
|
74
|
+
|
|
75
|
+
coupon_ids?:string[];
|
|
211
76
|
}
|
|
212
77
|
export interface CreateForItemsResponse {
|
|
213
78
|
gift:Gift;
|
|
@@ -218,75 +83,25 @@ declare module 'chargebee' {
|
|
|
218
83
|
}
|
|
219
84
|
export interface CreateForItemsInputParam {
|
|
220
85
|
|
|
221
|
-
|
|
222
|
-
* @description Indicates the date on which the gift notification is sent to the receiver. If not passed, the receiver is notified immediately.
|
|
223
|
-
|
|
224
|
-
*/
|
|
86
|
+
gifter:{customer_id:string,note?:string,payment_src_id?:string,signature:string};
|
|
225
87
|
|
|
226
|
-
|
|
88
|
+
gift_receiver:{customer_id:string,email:string,first_name:string,last_name:string};
|
|
227
89
|
|
|
228
|
-
|
|
229
|
-
* @description When `true`, the claim happens automatically. When not passed, the default value in the site settings is used.
|
|
230
|
-
|
|
231
|
-
*/
|
|
90
|
+
payment_intent?:{additional_information?:object,gateway_account_id?:string,gw_payment_method_id?:string,gw_token?:string,id?:string,payment_method_type?:'card' | 'ideal' | 'sofort' | 'bancontact' | 'google_pay' | 'dotpay' | 'giropay' | 'apple_pay' | 'upi' | 'netbanking_emandates' | 'paypal_express_checkout' | 'direct_debit' | 'boleto' | 'venmo' | 'amazon_payments' | 'pay_to' | 'faster_payments' | 'sepa_instant_transfer' | 'klarna_pay_now' | 'online_banking_poland' | 'payconiq_by_bancontact',reference_id?:string};
|
|
232
91
|
|
|
233
|
-
|
|
92
|
+
shipping_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
|
|
234
93
|
|
|
235
|
-
|
|
236
|
-
* @description When `true`, indicates that the gift does not expire. Do not pass or pass as `false` when `auto_claim` is set. .
|
|
237
|
-
|
|
238
|
-
*/
|
|
94
|
+
subscription_items?:{item_price_id?:string,quantity?:number,quantity_in_decimal?:string}[];
|
|
239
95
|
|
|
240
|
-
|
|
96
|
+
scheduled_at?:number;
|
|
241
97
|
|
|
242
|
-
|
|
243
|
-
* @description The date until which the gift can be claimed. Must be set to a value after `scheduled_at`. If the gift is not claimed within `claim_expiry_date`, it will expire and the subscription will move to `cancelled` state. When not passed, the value specified in the site settings will be used. Pass as `NULL` or do not pass when `auto_claim` or `no_expiry` are set.
|
|
244
|
-
|
|
245
|
-
*/
|
|
98
|
+
auto_claim?:boolean;
|
|
246
99
|
|
|
247
|
-
|
|
100
|
+
no_expiry?:boolean;
|
|
248
101
|
|
|
249
|
-
|
|
250
|
-
* @description List of coupons to be applied to this subscription. You can provide coupon ids or coupon codes.
|
|
251
|
-
|
|
252
|
-
*/
|
|
102
|
+
claim_expiry_date?:number;
|
|
253
103
|
|
|
254
104
|
coupon_ids?:string[];
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* @description Parameters for gifter
|
|
258
|
-
|
|
259
|
-
*/
|
|
260
|
-
|
|
261
|
-
gifter?:{customer_id:string,note?:string,payment_src_id?:string,signature:string};
|
|
262
|
-
|
|
263
|
-
/**
|
|
264
|
-
* @description Parameters for gift_receiver
|
|
265
|
-
|
|
266
|
-
*/
|
|
267
|
-
|
|
268
|
-
gift_receiver?:{customer_id:string,email:string,first_name:string,last_name:string};
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* @description Parameters for payment_intent
|
|
272
|
-
|
|
273
|
-
*/
|
|
274
|
-
|
|
275
|
-
payment_intent?:{additional_information?:object,gateway_account_id?:string,gw_token?:string,id?:string,payment_method_type?:'giropay' | 'ideal' | 'sepa_instant_transfer' | 'google_pay' | 'netbanking_emandates' | 'klarna_pay_now' | 'dotpay' | 'boleto' | 'direct_debit' | 'faster_payments' | 'sofort' | 'upi' | 'venmo' | 'amazon_payments' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'pay_to' | 'card',reference_id?:string};
|
|
276
|
-
|
|
277
|
-
/**
|
|
278
|
-
* @description Parameters for shipping_address
|
|
279
|
-
|
|
280
|
-
*/
|
|
281
|
-
|
|
282
|
-
shipping_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
|
|
283
|
-
|
|
284
|
-
/**
|
|
285
|
-
* @description Parameters for subscription_items
|
|
286
|
-
|
|
287
|
-
*/
|
|
288
|
-
|
|
289
|
-
subscription_items?:{item_price_id?:string,quantity?:number,quantity_in_decimal?:string}[];
|
|
290
105
|
}
|
|
291
106
|
export interface RetrieveResponse {
|
|
292
107
|
gift:Gift;
|
|
@@ -295,56 +110,46 @@ declare module 'chargebee' {
|
|
|
295
110
|
}
|
|
296
111
|
|
|
297
112
|
export interface ListResponse {
|
|
298
|
-
/**
|
|
299
|
-
* @description Retrieves the list of gifts.
|
|
300
|
-
|
|
301
|
-
*/
|
|
302
|
-
|
|
303
113
|
list:{gift:Gift,subscription:Subscription}[];
|
|
304
114
|
|
|
305
|
-
/**
|
|
306
|
-
* @description Retrieves the list of gifts.
|
|
307
|
-
|
|
308
|
-
*/
|
|
309
|
-
|
|
310
115
|
next_offset?:string;
|
|
311
116
|
}
|
|
312
117
|
export interface ListInputParam {
|
|
313
118
|
[key : string]: any;
|
|
314
119
|
/**
|
|
315
|
-
* @description
|
|
120
|
+
* @description The number of resources to be returned.
|
|
316
121
|
|
|
317
122
|
*/
|
|
318
123
|
|
|
319
124
|
limit?:number;
|
|
320
125
|
|
|
321
126
|
/**
|
|
322
|
-
* @description
|
|
127
|
+
* @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.
|
|
323
128
|
|
|
324
129
|
*/
|
|
325
130
|
|
|
326
131
|
offset?:string;
|
|
327
132
|
|
|
328
133
|
/**
|
|
329
|
-
* @description
|
|
134
|
+
* @description Parameters for gift_receiver
|
|
330
135
|
|
|
331
136
|
*/
|
|
332
137
|
|
|
333
|
-
|
|
138
|
+
gift_receiver?:{customer_id?:{is?:string,is_not?:string,starts_with?:string},email?:{is?:string,is_not?:string,starts_with?:string}};
|
|
334
139
|
|
|
335
140
|
/**
|
|
336
|
-
* @description
|
|
141
|
+
* @description Parameters for gifter
|
|
337
142
|
|
|
338
143
|
*/
|
|
339
144
|
|
|
340
|
-
|
|
145
|
+
gifter?:{customer_id?:{is?:string,is_not?:string,starts_with?:string}};
|
|
341
146
|
|
|
342
147
|
/**
|
|
343
|
-
* @description
|
|
148
|
+
* @description Status of the gift.
|
|
344
149
|
|
|
345
150
|
*/
|
|
346
151
|
|
|
347
|
-
|
|
152
|
+
status?:{in?:string,is?:'scheduled' | 'unclaimed' | 'claimed' | 'cancelled' | 'expired',is_not?:'scheduled' | 'unclaimed' | 'claimed' | 'cancelled' | 'expired',not_in?:string};
|
|
348
153
|
}
|
|
349
154
|
export interface ClaimResponse {
|
|
350
155
|
gift:Gift;
|
|
@@ -365,97 +170,32 @@ declare module 'chargebee' {
|
|
|
365
170
|
}
|
|
366
171
|
export interface UpdateGiftInputParam {
|
|
367
172
|
|
|
368
|
-
/**
|
|
369
|
-
* @description The new date/time at which the gift notification email is to be sent. The value must be greater than current time. If [no_expiry](https://apidocs.chargebee.com/docs/api/gifts#gift_no_expiry) is false then the value must also be less than [claim_expiry_date](https://apidocs.chargebee.com/docs/api/gifts#gift_claim_expiry_date).
|
|
370
|
-
|
|
371
|
-
*/
|
|
372
|
-
|
|
373
173
|
scheduled_at:number;
|
|
374
174
|
|
|
375
|
-
/**
|
|
376
|
-
* @description An internal comment for this action. The comments are not retrievable via API and are only available on request via [Chargebee Support](https://chargebee.freshdesk.com/support/home).
|
|
377
|
-
|
|
378
|
-
*/
|
|
379
|
-
|
|
380
175
|
comment?:string;
|
|
381
176
|
}
|
|
382
177
|
export interface Gifter {
|
|
383
|
-
/**
|
|
384
|
-
* @description Gifter customer id.
|
|
385
|
-
|
|
386
|
-
*/
|
|
387
|
-
|
|
388
178
|
customer_id:string;
|
|
389
179
|
|
|
390
|
-
/**
|
|
391
|
-
* @description Invoice raised on the gifter.
|
|
392
|
-
|
|
393
|
-
*/
|
|
394
|
-
|
|
395
180
|
invoice_id?:string;
|
|
396
181
|
|
|
397
|
-
/**
|
|
398
|
-
* @description Gifter sign-off name
|
|
399
|
-
|
|
400
|
-
*/
|
|
401
|
-
|
|
402
182
|
signature?:string;
|
|
403
183
|
|
|
404
|
-
/**
|
|
405
|
-
* @description Personalized message for the gift.
|
|
406
|
-
|
|
407
|
-
*/
|
|
408
|
-
|
|
409
184
|
note?:string;
|
|
410
185
|
}
|
|
411
186
|
export interface GiftReceiver {
|
|
412
|
-
/**
|
|
413
|
-
* @description Receiver customer id.
|
|
414
|
-
|
|
415
|
-
*/
|
|
416
|
-
|
|
417
187
|
customer_id:string;
|
|
418
188
|
|
|
419
|
-
/**
|
|
420
|
-
* @description Subscription created for the gift.
|
|
421
|
-
|
|
422
|
-
*/
|
|
423
|
-
|
|
424
189
|
subscription_id:string;
|
|
425
190
|
|
|
426
|
-
/**
|
|
427
|
-
* @description First name of the receiver as given by the gifter.
|
|
428
|
-
|
|
429
|
-
*/
|
|
430
|
-
|
|
431
191
|
first_name?:string;
|
|
432
192
|
|
|
433
|
-
/**
|
|
434
|
-
* @description Last name of the receiver as given by the gifter,
|
|
435
|
-
|
|
436
|
-
*/
|
|
437
|
-
|
|
438
193
|
last_name?:string;
|
|
439
194
|
|
|
440
|
-
/**
|
|
441
|
-
* @description Email of the receiver. All gift related emails are sent to this email.
|
|
442
|
-
|
|
443
|
-
*/
|
|
444
|
-
|
|
445
195
|
email?:string;
|
|
446
196
|
}
|
|
447
197
|
export interface GiftTimeline {
|
|
448
|
-
|
|
449
|
-
* @description Status of the gift. \* cancelled - Gift is cancelled. \* expired - Gift is expired. \* scheduled - Gift has been scheduled. \* claimed - Gift is claimed. \* unclaimed - Gift is not yet claimed and is ready to be claimed.
|
|
450
|
-
|
|
451
|
-
*/
|
|
452
|
-
|
|
453
|
-
status:'expired' | 'scheduled' | 'unclaimed' | 'claimed' | 'cancelled';
|
|
454
|
-
|
|
455
|
-
/**
|
|
456
|
-
* @description Timestamp indicating when this event occurred.
|
|
457
|
-
|
|
458
|
-
*/
|
|
198
|
+
status:'scheduled' | 'unclaimed' | 'claimed' | 'cancelled' | 'expired';
|
|
459
199
|
|
|
460
200
|
occurred_at?:number;
|
|
461
201
|
}
|
|
@@ -1,40 +1,20 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
2
3
|
declare module 'chargebee' {
|
|
3
4
|
export interface Hierarchy {
|
|
4
5
|
|
|
5
|
-
/**
|
|
6
|
-
* @description The `id` of the customer associated with this `hierarchy` resource.
|
|
7
6
|
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
7
|
customer_id:string;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @description The `id` of the immediate parent for the customer identified by `customer_id`. If the customer is the root of the hierarchy, this attribute isn't returned.
|
|
14
8
|
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
9
|
parent_id?:string;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* @description The `id` of the customer responsible for paying the invoices for the customer identified by `customer_id`. This ID must match either `customer_id` or `invoice_owner_id`.
|
|
21
10
|
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
11
|
payment_owner_id:string;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @description The `id` of the customer who receives the invoice for charges incurred by the customer identified by `customer_id`. This ID must match either `customer_id` or one of its ancestors.
|
|
28
12
|
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
13
|
invoice_owner_id:string;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @description A list of `id`s representing the immediate children, if any exist, for the customer identified by `customer_id`.
|
|
35
14
|
|
|
36
|
-
|
|
37
|
-
|
|
15
|
+
has_children?:boolean;
|
|
16
|
+
|
|
38
17
|
children_ids?:string[];
|
|
18
|
+
|
|
39
19
|
}
|
|
40
20
|
}
|
|
@@ -178,7 +178,7 @@ declare module 'chargebee' {
|
|
|
178
178
|
|
|
179
179
|
charges?:{amount?:number,amount_in_decimal?:string,avalara_sale_type?:AvalaraSaleType,avalara_service_type?:number,avalara_tax_code?:string,avalara_transaction_type?:number,date_from?:number,date_to?:number,description?:string,hsn_code?:string,tax_profile_id?:string,taxable?:boolean,taxjar_product_code?:string}[];
|
|
180
180
|
|
|
181
|
-
discounts:{amount?:number,apply_on:ApplyOn,item_price_id?:string,percentage?:number}[];
|
|
181
|
+
discounts:{amount?:number,apply_on:ApplyOn,item_price_id?:string,percentage?:number,quantity?:number}[];
|
|
182
182
|
|
|
183
183
|
entity_identifiers?:{id?:string,operation?:Operation,scheme?:string,standard?:string,value?:string}[];
|
|
184
184
|
|
|
@@ -219,7 +219,7 @@ declare module 'chargebee' {
|
|
|
219
219
|
|
|
220
220
|
subscription_items:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,item_type?:ItemType,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
221
221
|
|
|
222
|
-
discounts:{amount?:number,apply_on?:ApplyOn,duration_type:DurationType,included_in_mrr?:boolean,item_price_id?:string,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
|
|
222
|
+
discounts:{amount?:number,apply_on?:ApplyOn,duration_type:DurationType,included_in_mrr?:boolean,item_price_id?:string,percentage?:number,period?:number,period_unit?:PeriodUnit,quantity?:number}[];
|
|
223
223
|
|
|
224
224
|
item_tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,item_price_id?:string,package_size?:number,price?:number,price_in_decimal?:string,pricing_type?:PricingType,starting_unit?:number,starting_unit_in_decimal?:string}[];
|
|
225
225
|
|
|
@@ -313,7 +313,7 @@ declare module 'chargebee' {
|
|
|
313
313
|
|
|
314
314
|
subscription_items:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,item_type?:ItemType,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
315
315
|
|
|
316
|
-
discounts:{amount?:number,apply_on?:ApplyOn,duration_type:DurationType,id?:string,included_in_mrr?:boolean,item_price_id?:string,operation_type:OperationType,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
|
|
316
|
+
discounts:{amount?:number,apply_on?:ApplyOn,duration_type:DurationType,id?:string,included_in_mrr?:boolean,item_price_id?:string,operation_type:OperationType,percentage?:number,period?:number,period_unit?:PeriodUnit,quantity?:number}[];
|
|
317
317
|
|
|
318
318
|
item_tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,item_price_id?:string,package_size?:number,price?:number,price_in_decimal?:string,pricing_type?:PricingType,starting_unit?:number,starting_unit_in_decimal?:string}[];
|
|
319
319
|
|
|
@@ -510,7 +510,7 @@ declare module 'chargebee' {
|
|
|
510
510
|
limit?:number;
|
|
511
511
|
|
|
512
512
|
/**
|
|
513
|
-
* @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set
|
|
513
|
+
* @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.
|
|
514
514
|
|
|
515
515
|
*/
|
|
516
516
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
declare module 'chargebee' {
|
|
4
|
+
export interface ImpactedCustomer {
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
action_type?:string;
|
|
8
|
+
|
|
9
|
+
download?:ImpactedCustomer.Download;
|
|
10
|
+
|
|
11
|
+
}
|
|
12
|
+
export namespace ImpactedCustomer {
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
export interface Download {
|
|
16
|
+
download_url:string;
|
|
17
|
+
|
|
18
|
+
valid_till:number;
|
|
19
|
+
|
|
20
|
+
mime_type?:string;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -1,55 +1,23 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
2
3
|
declare module 'chargebee' {
|
|
3
4
|
export interface ImpactedItem {
|
|
4
5
|
|
|
5
|
-
/**
|
|
6
|
-
* @description The total number of items that have been impacted.
|
|
7
6
|
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
7
|
count?:number;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @description The list of items that have been impacted. The objects in this array have the following keys:
|
|
14
8
|
|
|
15
|
-
|
|
16
|
-
* `type`: (enumerated string) The [type](/docs/api/items#item_type) of the item.
|
|
17
|
-
|
|
18
|
-
This list can contain a maximum of 1,000 items. The full list of items is available in `download`.
|
|
9
|
+
download?:ImpactedItem.Download;
|
|
19
10
|
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
11
|
items?:any[];
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* @description The [download](/docs/api/downloads) resource containing all the impacted items. The list of items is available as a JSON array in the file at `download.url` until `download.valid_till`.
|
|
26
12
|
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
|
-
download?:ImpactedItem.Download;
|
|
30
13
|
}
|
|
31
14
|
export namespace ImpactedItem {
|
|
32
15
|
|
|
33
16
|
|
|
34
17
|
export interface Download {
|
|
35
|
-
|
|
36
|
-
* @description The URL at which the file is available for download.
|
|
37
|
-
|
|
38
|
-
*/
|
|
18
|
+
download_url:string;
|
|
39
19
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* @description The time until which the `download_url` is valid.
|
|
44
|
-
|
|
45
|
-
*/
|
|
46
|
-
|
|
47
|
-
valid_till?:number;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* @description The [media type](https://en.wikipedia.org/wiki/Media_type) of the file.
|
|
51
|
-
|
|
52
|
-
*/
|
|
20
|
+
valid_till:number;
|
|
53
21
|
|
|
54
22
|
mime_type?:string;
|
|
55
23
|
}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
2
3
|
declare module 'chargebee' {
|
|
3
4
|
export interface ImpactedItemPrice {
|
|
4
5
|
|
|
6
|
+
|
|
5
7
|
count?:number;
|
|
6
|
-
|
|
8
|
+
|
|
7
9
|
download?:ImpactedItemPrice.Download;
|
|
8
|
-
|
|
10
|
+
|
|
9
11
|
item_prices?:any[];
|
|
12
|
+
|
|
10
13
|
}
|
|
11
14
|
export namespace ImpactedItemPrice {
|
|
12
15
|
|