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.
Files changed (54) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.yml +81 -0
  2. package/.github/ISSUE_TEMPLATE/config.yml +6 -0
  3. package/.github/ISSUE_TEMPLATE/feature_request.yml +34 -0
  4. package/.github/PULL_REQUEST_TEMPLATE.md +8 -0
  5. package/.github/workflows/greeting.yml +47 -0
  6. package/CHANGELOG.md +59 -0
  7. package/SECURITY.md +8 -0
  8. package/lib/chargebee.js +1 -1
  9. package/lib/resources/api_endpoints.js +0 -14
  10. package/package.json +1 -1
  11. package/types/core.d.ts +4 -4
  12. package/types/resources/AttachedItem.d.ts +88 -88
  13. package/types/resources/Card.d.ts +68 -68
  14. package/types/resources/Comment.d.ts +50 -44
  15. package/types/resources/Coupon.d.ts +242 -207
  16. package/types/resources/CouponSet.d.ts +72 -68
  17. package/types/resources/CreditNote.d.ts +612 -236
  18. package/types/resources/Customer.d.ts +655 -513
  19. package/types/resources/DifferentialPrice.d.ts +99 -74
  20. package/types/resources/EntitlementOverride.d.ts +27 -12
  21. package/types/resources/Estimate.d.ts +450 -450
  22. package/types/resources/Event.d.ts +30 -12
  23. package/types/resources/Export.d.ts +200 -200
  24. package/types/resources/Feature.d.ts +66 -35
  25. package/types/resources/Gift.d.ts +54 -44
  26. package/types/resources/HostedPage.d.ts +381 -381
  27. package/types/resources/InAppSubscription.d.ts +94 -90
  28. package/types/resources/Invoice.d.ts +1242 -660
  29. package/types/resources/Item.d.ts +148 -142
  30. package/types/resources/ItemEntitlement.d.ts +36 -36
  31. package/types/resources/ItemFamily.d.ts +45 -45
  32. package/types/resources/ItemPrice.d.ts +317 -273
  33. package/types/resources/PaymentIntent.d.ts +60 -60
  34. package/types/resources/PaymentReferenceNumber.d.ts +1 -1
  35. package/types/resources/PaymentVoucher.d.ts +74 -59
  36. package/types/resources/PortalSession.d.ts +45 -20
  37. package/types/resources/PromotionalCredit.d.ts +68 -68
  38. package/types/resources/Purchase.d.ts +3 -3
  39. package/types/resources/Quote.d.ts +655 -366
  40. package/types/resources/QuoteLineGroup.d.ts +245 -0
  41. package/types/resources/QuotedCharge.d.ts +170 -0
  42. package/types/resources/QuotedSubscription.d.ts +219 -0
  43. package/types/resources/SiteMigrationDetail.d.ts +7 -7
  44. package/types/resources/Subscription.d.ts +1219 -932
  45. package/types/resources/SubscriptionEntitlement.d.ts +33 -12
  46. package/types/resources/ThirdPartyPaymentMethod.d.ts +1 -1
  47. package/types/resources/TimeMachine.d.ts +15 -15
  48. package/types/resources/Token.d.ts +0 -116
  49. package/types/resources/Transaction.d.ts +229 -112
  50. package/types/resources/UnbilledCharge.d.ts +112 -67
  51. package/types/resources/Usage.d.ts +46 -47
  52. package/types/resources/VirtualBankAccount.d.ts +66 -66
  53. package/types/resources/Media.d.ts +0 -33
  54. 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 endpoint retrieves the promotional credit based on the promotional credit id
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&#x27;s credit balance would become $20.
100
95
 
101
96
  */
102
97
 
103
- list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
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 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).
121
+ * @description This endpoint lists the promotional credits set for a customer
127
122
 
128
- For example, if a customer has credits of $10, if you pass the **amount** as $10, then the customer&#x27;s credit balance would become $20.
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
- add(input:AddInputParam):ChargebeeRequest<AddResponse>;
132
+ retrieve(account_credit_id:string):ChargebeeRequest<RetrieveResponse>;
133
133
  }
134
- export interface RetrieveResponse {
134
+ export interface AddResponse {
135
+ customer:Customer;
136
+
135
137
  promotional_credit:PromotionalCredit;
136
138
  }
137
-
138
- export interface ListResponse {
139
+ export interface AddInputParam {
140
+
139
141
  /**
140
- * @description This endpoint lists the promotional credits set for a customer
142
+ * @description Identifier of the customer.
141
143
 
142
144
  */
143
145
 
144
- list:{promotional_credit:PromotionalCredit}[];
146
+ customer_id:string;
145
147
 
146
148
  /**
147
- * @description This endpoint lists the promotional credits set for a customer
149
+ * @description Promotional credits amount.
148
150
 
149
151
  */
150
152
 
151
- next_offset?:string;
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 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.
156
+ * @description Amount in decimal.
164
157
 
165
158
  */
166
-
167
- offset?:string;
159
+
160
+ amount_in_decimal?:string;
168
161
 
169
162
  /**
170
- * @description Unique reference ID provided for promotional credits
163
+ * @description The currency code (ISO 4217 format) for promotional credit.
171
164
 
172
165
  */
173
-
174
- id?:{is?:string,is_not?:string,starts_with?:string};
166
+
167
+ currency_code?:string;
175
168
 
176
169
  /**
177
- * @description Timestamp indicating when this promotional credit resource is created.
170
+ * @description Detailed description of this promotional credits.
178
171
 
179
172
  */
180
-
181
- created_at?:{after?:string,before?:string,between?:string,on?:string};
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
- type?:{in?:string,is?:'decrement' | 'increment',is_not?:'decrement' | 'increment',not_in?:string};
180
+
181
+ credit_type?:CreditType;
189
182
 
190
183
  /**
191
- * @description Identifier of the customer.
184
+ * @description Describes why promotional credits were provided.
192
185
 
193
186
  */
194
-
195
- customer_id?:{is?:string,is_not?:string,starts_with?:string};
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 AddResponse {
310
- customer:Customer;
311
-
312
- promotional_credit:PromotionalCredit;
313
- }
314
- export interface AddInputParam {
315
-
302
+ export interface ListResponse {
316
303
  /**
317
- * @description Identifier of the customer.
304
+ * @description This endpoint lists the promotional credits set for a customer
318
305
 
319
306
  */
320
307
 
321
- customer_id:string;
308
+ list:{promotional_credit:PromotionalCredit}[];
322
309
 
323
310
  /**
324
- * @description Promotional credits amount.
311
+ * @description This endpoint lists the promotional credits set for a customer
325
312
 
326
313
  */
327
314
 
328
- amount?:number;
329
-
315
+ next_offset?:string;
316
+ }
317
+ export interface ListInputParam {
318
+ [key : string]: any;
330
319
  /**
331
- * @description Amount in decimal.
320
+ * @description This endpoint lists the promotional credits set for a customer
332
321
 
333
322
  */
334
-
335
- amount_in_decimal?:string;
323
+
324
+ limit?:number;
336
325
 
337
326
  /**
338
- * @description The currency code (ISO 4217 format) for promotional credit.
327
+ * @description This endpoint lists the promotional credits set for a customer
339
328
 
340
329
  */
341
-
342
- currency_code?:string;
330
+
331
+ offset?:string;
343
332
 
344
333
  /**
345
- * @description Detailed description of this promotional credits.
334
+ * @description This endpoint lists the promotional credits set for a customer
346
335
 
347
336
  */
348
-
349
- description:string;
337
+
338
+ id?:{is?:string,is_not?:string,starts_with?:string};
350
339
 
351
340
  /**
352
- * @description Type of promotional credits provided to customer. \* general - General \* referral_rewards - Referral \* loyalty_credits - Loyalty Credits
341
+ * @description This endpoint lists the promotional credits set for a customer
353
342
 
354
343
  */
355
-
356
- credit_type?:CreditType;
344
+
345
+ created_at?:{after?:string,before?:string,between?:string,on?:string};
357
346
 
358
347
  /**
359
- * @description Describes why promotional credits were provided.
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
- reference?:string;
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 &#x60;type&#x60; &#x60;plan&#x60;. 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 &#x60;type&#x60; &#x60;charge&#x60;). 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}