chargebee 2.28.0 → 2.30.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/.github/ISSUE_TEMPLATE/bug_report.yml +81 -0
- package/.github/ISSUE_TEMPLATE/config.yml +6 -0
- package/.github/ISSUE_TEMPLATE/feature_request.yml +34 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +8 -0
- package/.github/workflows/greeting.yml +47 -0
- package/CHANGELOG.md +59 -0
- package/SECURITY.md +8 -0
- package/lib/chargebee.js +1 -1
- package/lib/resources/api_endpoints.js +0 -14
- package/package.json +1 -1
- package/types/core.d.ts +4 -4
- package/types/resources/AttachedItem.d.ts +88 -88
- package/types/resources/Card.d.ts +68 -68
- package/types/resources/Comment.d.ts +50 -44
- package/types/resources/Coupon.d.ts +242 -207
- package/types/resources/CouponSet.d.ts +72 -68
- package/types/resources/CreditNote.d.ts +612 -236
- package/types/resources/Customer.d.ts +655 -513
- package/types/resources/DifferentialPrice.d.ts +99 -74
- package/types/resources/EntitlementOverride.d.ts +27 -12
- package/types/resources/Estimate.d.ts +450 -450
- package/types/resources/Event.d.ts +30 -12
- package/types/resources/Export.d.ts +200 -200
- package/types/resources/Feature.d.ts +66 -35
- package/types/resources/Gift.d.ts +54 -44
- package/types/resources/HostedPage.d.ts +381 -381
- package/types/resources/InAppSubscription.d.ts +94 -90
- package/types/resources/Invoice.d.ts +1242 -660
- package/types/resources/Item.d.ts +148 -142
- package/types/resources/ItemEntitlement.d.ts +36 -36
- package/types/resources/ItemFamily.d.ts +45 -45
- package/types/resources/ItemPrice.d.ts +317 -273
- package/types/resources/PaymentIntent.d.ts +60 -60
- package/types/resources/PaymentReferenceNumber.d.ts +1 -1
- package/types/resources/PaymentVoucher.d.ts +74 -59
- package/types/resources/PortalSession.d.ts +45 -20
- package/types/resources/PromotionalCredit.d.ts +68 -68
- package/types/resources/Purchase.d.ts +3 -3
- package/types/resources/Quote.d.ts +655 -366
- package/types/resources/QuoteLineGroup.d.ts +245 -0
- package/types/resources/QuotedCharge.d.ts +170 -0
- package/types/resources/QuotedSubscription.d.ts +219 -0
- package/types/resources/SiteMigrationDetail.d.ts +7 -7
- package/types/resources/Subscription.d.ts +1219 -932
- package/types/resources/SubscriptionEntitlement.d.ts +33 -12
- package/types/resources/ThirdPartyPaymentMethod.d.ts +1 -1
- package/types/resources/TimeMachine.d.ts +15 -15
- package/types/resources/Token.d.ts +0 -116
- package/types/resources/Transaction.d.ts +229 -112
- package/types/resources/UnbilledCharge.d.ts +112 -67
- package/types/resources/Usage.d.ts +46 -47
- package/types/resources/VirtualBankAccount.d.ts +66 -66
- package/types/resources/Media.d.ts +0 -33
- package/types/resources/NonSubscription.d.ts +0 -65
|
@@ -89,18 +89,13 @@ declare module 'chargebee' {
|
|
|
89
89
|
export namespace PromotionalCredit {
|
|
90
90
|
export class PromotionalCreditResource {
|
|
91
91
|
/**
|
|
92
|
-
* @description This
|
|
92
|
+
* @description This API call can be used to add promotional credits to a customer. [Learn more about Promotional Credits](https://www.chargebee.com/docs/2.0/credit-notes.html#creating-promotional-credits).
|
|
93
93
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
retrieve(account_credit_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* @description This endpoint lists the promotional credits set for a customer
|
|
94
|
+
For example, if a customer has credits of $10, if you pass the **amount** as $10, then the customer's credit balance would become $20.
|
|
100
95
|
|
|
101
96
|
*/
|
|
102
97
|
|
|
103
|
-
|
|
98
|
+
add(input:AddInputParam):ChargebeeRequest<AddResponse>;
|
|
104
99
|
|
|
105
100
|
/**
|
|
106
101
|
* @description This API call can be used to deduct promotional credits for a customer. [Learn more about Promotional Credits](https://www.chargebee.com/docs/2.0/credit-notes.html#creating-promotional-credits).
|
|
@@ -123,76 +118,74 @@ For example, if a customer has a credit balance of $10 and if you would like to
|
|
|
123
118
|
set(input:SetInputParam):ChargebeeRequest<SetResponse>;
|
|
124
119
|
|
|
125
120
|
/**
|
|
126
|
-
* @description This
|
|
121
|
+
* @description This endpoint lists the promotional credits set for a customer
|
|
127
122
|
|
|
128
|
-
|
|
123
|
+
*/
|
|
124
|
+
|
|
125
|
+
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* @description This endpoint retrieves the promotional credit based on the promotional credit id
|
|
129
129
|
|
|
130
130
|
*/
|
|
131
131
|
|
|
132
|
-
|
|
132
|
+
retrieve(account_credit_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
133
133
|
}
|
|
134
|
-
export interface
|
|
134
|
+
export interface AddResponse {
|
|
135
|
+
customer:Customer;
|
|
136
|
+
|
|
135
137
|
promotional_credit:PromotionalCredit;
|
|
136
138
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
+
export interface AddInputParam {
|
|
140
|
+
|
|
139
141
|
/**
|
|
140
|
-
* @description
|
|
142
|
+
* @description Identifier of the customer.
|
|
141
143
|
|
|
142
144
|
*/
|
|
143
145
|
|
|
144
|
-
|
|
146
|
+
customer_id:string;
|
|
145
147
|
|
|
146
148
|
/**
|
|
147
|
-
* @description
|
|
149
|
+
* @description Promotional credits amount.
|
|
148
150
|
|
|
149
151
|
*/
|
|
150
152
|
|
|
151
|
-
|
|
152
|
-
}
|
|
153
|
-
export interface ListInputParam {
|
|
154
|
-
[key : string]: any;
|
|
155
|
-
/**
|
|
156
|
-
* @description The number of resources to be returned.
|
|
157
|
-
|
|
158
|
-
*/
|
|
159
|
-
|
|
160
|
-
limit?:number;
|
|
153
|
+
amount?:number;
|
|
161
154
|
|
|
162
155
|
/**
|
|
163
|
-
* @description
|
|
156
|
+
* @description Amount in decimal.
|
|
164
157
|
|
|
165
158
|
*/
|
|
166
|
-
|
|
167
|
-
|
|
159
|
+
|
|
160
|
+
amount_in_decimal?:string;
|
|
168
161
|
|
|
169
162
|
/**
|
|
170
|
-
* @description
|
|
163
|
+
* @description The currency code (ISO 4217 format) for promotional credit.
|
|
171
164
|
|
|
172
165
|
*/
|
|
173
|
-
|
|
174
|
-
|
|
166
|
+
|
|
167
|
+
currency_code?:string;
|
|
175
168
|
|
|
176
169
|
/**
|
|
177
|
-
* @description
|
|
170
|
+
* @description Detailed description of this promotional credits.
|
|
178
171
|
|
|
179
172
|
*/
|
|
180
|
-
|
|
181
|
-
|
|
173
|
+
|
|
174
|
+
description:string;
|
|
182
175
|
|
|
183
176
|
/**
|
|
184
|
-
* @description Type of promotional credits
|
|
177
|
+
* @description Type of promotional credits provided to customer. \* general - General \* referral_rewards - Referral \* loyalty_credits - Loyalty Credits
|
|
185
178
|
|
|
186
179
|
*/
|
|
187
|
-
|
|
188
|
-
|
|
180
|
+
|
|
181
|
+
credit_type?:CreditType;
|
|
189
182
|
|
|
190
183
|
/**
|
|
191
|
-
* @description
|
|
184
|
+
* @description Describes why promotional credits were provided.
|
|
192
185
|
|
|
193
186
|
*/
|
|
194
|
-
|
|
195
|
-
|
|
187
|
+
|
|
188
|
+
reference?:string;
|
|
196
189
|
}
|
|
197
190
|
export interface DeductResponse {
|
|
198
191
|
customer:Customer;
|
|
@@ -306,62 +299,69 @@ For example, if a customer has credits of $10, if you pass the **amount** as $10
|
|
|
306
299
|
|
|
307
300
|
reference?:string;
|
|
308
301
|
}
|
|
309
|
-
export interface
|
|
310
|
-
customer:Customer;
|
|
311
|
-
|
|
312
|
-
promotional_credit:PromotionalCredit;
|
|
313
|
-
}
|
|
314
|
-
export interface AddInputParam {
|
|
315
|
-
|
|
302
|
+
export interface ListResponse {
|
|
316
303
|
/**
|
|
317
|
-
* @description
|
|
304
|
+
* @description This endpoint lists the promotional credits set for a customer
|
|
318
305
|
|
|
319
306
|
*/
|
|
320
307
|
|
|
321
|
-
|
|
308
|
+
list:{promotional_credit:PromotionalCredit}[];
|
|
322
309
|
|
|
323
310
|
/**
|
|
324
|
-
* @description
|
|
311
|
+
* @description This endpoint lists the promotional credits set for a customer
|
|
325
312
|
|
|
326
313
|
*/
|
|
327
314
|
|
|
328
|
-
|
|
329
|
-
|
|
315
|
+
next_offset?:string;
|
|
316
|
+
}
|
|
317
|
+
export interface ListInputParam {
|
|
318
|
+
[key : string]: any;
|
|
330
319
|
/**
|
|
331
|
-
* @description
|
|
320
|
+
* @description This endpoint lists the promotional credits set for a customer
|
|
332
321
|
|
|
333
322
|
*/
|
|
334
|
-
|
|
335
|
-
|
|
323
|
+
|
|
324
|
+
limit?:number;
|
|
336
325
|
|
|
337
326
|
/**
|
|
338
|
-
* @description
|
|
327
|
+
* @description This endpoint lists the promotional credits set for a customer
|
|
339
328
|
|
|
340
329
|
*/
|
|
341
|
-
|
|
342
|
-
|
|
330
|
+
|
|
331
|
+
offset?:string;
|
|
343
332
|
|
|
344
333
|
/**
|
|
345
|
-
* @description
|
|
334
|
+
* @description This endpoint lists the promotional credits set for a customer
|
|
346
335
|
|
|
347
336
|
*/
|
|
348
|
-
|
|
349
|
-
|
|
337
|
+
|
|
338
|
+
id?:{is?:string,is_not?:string,starts_with?:string};
|
|
350
339
|
|
|
351
340
|
/**
|
|
352
|
-
* @description
|
|
341
|
+
* @description This endpoint lists the promotional credits set for a customer
|
|
353
342
|
|
|
354
343
|
*/
|
|
355
|
-
|
|
356
|
-
|
|
344
|
+
|
|
345
|
+
created_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
357
346
|
|
|
358
347
|
/**
|
|
359
|
-
* @description
|
|
348
|
+
* @description This endpoint lists the promotional credits set for a customer
|
|
360
349
|
|
|
361
350
|
*/
|
|
351
|
+
|
|
352
|
+
type?:{in?:string,is?:'decrement' | 'increment',is_not?:'decrement' | 'increment',not_in?:string};
|
|
362
353
|
|
|
363
|
-
|
|
354
|
+
/**
|
|
355
|
+
* @description This endpoint lists the promotional credits set for a customer
|
|
356
|
+
|
|
357
|
+
*/
|
|
358
|
+
|
|
359
|
+
customer_id?:{is?:string,is_not?:string,starts_with?:string};
|
|
364
360
|
}
|
|
361
|
+
export interface RetrieveResponse {
|
|
362
|
+
promotional_credit:PromotionalCredit;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
365
|
|
|
366
366
|
}
|
|
367
367
|
}
|
|
@@ -73,7 +73,7 @@ The following subsections describe the types of groups in detail.
|
|
|
73
73
|
|
|
74
74
|
You can specify up to 10 groups,
|
|
75
75
|
|
|
76
|
-
* with a recommended subscription group of 5. To increase this limit to a maximum of 8, contact [Chargebee Support](https://support.chargebee.com).
|
|
76
|
+
* with a recommended subscription group of 5. To increase this limit to a maximum of 8, contact [Chargebee Support](https://support.chargebee.com/support/home).
|
|
77
77
|
* with a maximum of 10 one-time charge groups by default.
|
|
78
78
|
|
|
79
79
|
The total limit for group items for a single purchase is 60.
|
|
@@ -83,7 +83,7 @@ The total limit for group items for a single purchase is 60.
|
|
|
83
83
|
To create a subscription, specify a *subscription group* . A subscription [group](#groups) is a group of item prices that contains exactly one item price of `type` `plan`. To create multiple subscriptions, provide multiple subscription groups.
|
|
84
84
|
**Note**
|
|
85
85
|
|
|
86
|
-
A subscription group can have up to 20 non-plan item prices. To increase this limit to a maximum of 60, contact [Chargebee Support](https://support.chargebee.com).
|
|
86
|
+
A subscription group can have up to 20 non-plan item prices. To increase this limit to a maximum of 60, contact [Chargebee Support](https://support.chargebee.com/support/home).
|
|
87
87
|
|
|
88
88
|
#### Custom Fields {#custom-fields}
|
|
89
89
|
|
|
@@ -94,7 +94,7 @@ Purchase API supports custom fields of Subscriptions, use the following format t
|
|
|
94
94
|
A one-time charge [group](#groups) is a group of charge item prices (i.e. item prices belonging to items of `type` `charge`). Charge item prices can be added to subscription groups as well. The charges within and across each one-time group must be unique.
|
|
95
95
|
**Note**
|
|
96
96
|
|
|
97
|
-
* A one-time charge group can have up to 20 item prices. To increase this limit to a maximum of 60, contact [Chargebee Support](https://support.chargebee.com).
|
|
97
|
+
* A one-time charge group can have up to 20 item prices. To increase this limit to a maximum of 60, contact [Chargebee Support](https://support.chargebee.com/support/home).
|
|
98
98
|
* A charge item price can only be added to a single one-time charge group. However, it can be part of multiple [subscription groups](#subscription).
|
|
99
99
|
|
|
100
100
|
### Applying discounts {#discounts}
|