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,49 +1,215 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
2
  declare module 'chargebee' {
3
3
  export interface Comment {
4
+
5
+ /**
6
+ * @description Unique identifier for the comment.
7
+
8
+ */
9
+
4
10
  id:string;
11
+
12
+ /**
13
+ * @description Type of the entity this comment generated for \* item - Entity that represents item \* order - Entity that represents an order \* item_price - Entity that represents item price \* customer - Entity that represents a customer \* invoice - Invoice description \* business_entity - Entity that represents item of type business entity \* plan - Entity that represents a subscription plan \* coupon - Entity that represents a discount coupon \* subscription - Entity that represents a subscription of a customer \* item_family - Entity that represents item family \* transaction - Entity that represents a transaction. \* addon - Entity that represents an addon \* credit_note - Credit note description \* quote - Entity that represents a quote
14
+
15
+ */
16
+
5
17
  entity_type:EntityType;
18
+
19
+ /**
20
+ * @description The user who created the comment. If created via API, this contains the name given for the API key used.
21
+
22
+ */
23
+
6
24
  added_by?:string;
25
+
26
+ /**
27
+ * @description Actual notes for the comment.
28
+
29
+ */
30
+
7
31
  notes:string;
32
+
33
+ /**
34
+ * @description The time at which this comment was created
35
+
36
+ */
37
+
8
38
  created_at:number;
39
+
40
+ /**
41
+ * @description Type of comment this is. \* user - Comment generated by user either via API or Admin console. \* system - Comment generated by Chargebee when any backend changes happen for an entity
42
+
43
+ */
44
+
9
45
  type:'system' | 'user';
46
+
47
+ /**
48
+ * @description Unique identifier of the entity.
49
+
50
+ */
51
+
10
52
  entity_id:string;
11
53
  }
12
54
  export namespace Comment {
13
- export class CommentResource {
55
+ export class CommentResource {
56
+ /**
57
+ * @description Delete a comment for an [entity](https://apidocs.chargebee.com/docs/api/v1/comments?prod_cat_ver&#x3D;1#create_a_comment_entity_type) identified by comment ID.
58
+
59
+ Only the comments that are added via Admin console and API can be deleted. Chargebee generated &quot;System&quot; comments cannot be deleted.
60
+
61
+ */
62
+
14
63
  delete(comment_id:string):ChargebeeRequest<DeleteResponse>;
64
+
65
+ /**
66
+ * @description Retrieve a comment for an entity identified by comment ID.
67
+
68
+ */
69
+
15
70
  retrieve(comment_id:string):ChargebeeRequest<RetrieveResponse>;
71
+
72
+ /**
73
+ * @description Retrieve the list of comments sorted by the recent ones on the top.
74
+
75
+ If you want to retrieve the list of comments for an [entity](https://apidocs.chargebee.com/docs/api/v1/comments?prod_cat_ver&#x3D;1#list_comments_entity_type), for example, subscription you can filter them by passing the entity type and unique identifier for that entity, for example, subscription ID.
76
+
77
+ */
78
+
16
79
  list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
80
+
81
+ /**
82
+ * @description Create a new comment for an entity. The newly added comment will be shown in the web interface as well.
83
+
84
+ */
85
+
17
86
  create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
18
87
  }
19
- export interface DeleteResponse {
20
- comment:Comment;
88
+ export interface DeleteResponse {
89
+ /**
90
+ * @description Delete a comment for an [entity](https://apidocs.chargebee.com/docs/api/v1/comments?prod_cat_ver&#x3D;1#create_a_comment_entity_type) identified by comment ID.
91
+
92
+ Only the comments that are added via Admin console and API can be deleted. Chargebee generated &quot;System&quot; comments cannot be deleted.
93
+
94
+ */
95
+
96
+ comment:Comment;
21
97
  }
22
98
 
23
- export interface RetrieveResponse {
24
- comment:Comment;
99
+ export interface RetrieveResponse {
100
+ /**
101
+ * @description Retrieve a comment for an entity identified by comment ID.
102
+
103
+ */
104
+
105
+ comment:Comment;
25
106
  }
26
107
 
27
- export interface ListResponse {
28
- list:{comment:Comment}[];
29
- next_offset?:string;
108
+ export interface ListResponse {
109
+ /**
110
+ * @description Retrieve the list of comments sorted by the recent ones on the top.
111
+
112
+ If you want to retrieve the list of comments for an [entity](https://apidocs.chargebee.com/docs/api/v1/comments?prod_cat_ver&#x3D;1#list_comments_entity_type), for example, subscription you can filter them by passing the entity type and unique identifier for that entity, for example, subscription ID.
113
+
114
+ */
115
+
116
+ list:{comment:Comment}[];
117
+
118
+ /**
119
+ * @description Retrieve the list of comments sorted by the recent ones on the top.
120
+
121
+ If you want to retrieve the list of comments for an [entity](https://apidocs.chargebee.com/docs/api/v1/comments?prod_cat_ver&#x3D;1#list_comments_entity_type), for example, subscription you can filter them by passing the entity type and unique identifier for that entity, for example, subscription ID.
122
+
123
+ */
124
+
125
+ next_offset?:string;
30
126
  }
31
127
  export interface ListInputParam {
32
- [key : string]: any;
128
+ [key : string]: any;
129
+ /**
130
+ * @description The number of resources to be returned.
131
+
132
+ */
133
+
33
134
  limit?:number;
135
+
136
+ /**
137
+ * @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.
138
+
139
+ */
140
+
34
141
  offset?:string;
142
+
143
+ /**
144
+ * @description Retrieve the list of comments sorted by the recent ones on the top.
145
+
146
+ If you want to retrieve the list of comments for an [entity](https://apidocs.chargebee.com/docs/api/v1/comments?prod_cat_ver&#x3D;1#list_comments_entity_type), for example, subscription you can filter them by passing the entity type and unique identifier for that entity, for example, subscription ID.
147
+
148
+ */
149
+
35
150
  entity_type?:'item' | 'product' | 'coupon' | 'addon' | 'item_price' | 'business_entity' | 'subscription' | 'item_family' | 'credit_note' | 'quote' | 'variant' | 'invoice' | 'plan' | 'transaction' | 'customer' | 'order';
151
+
152
+ /**
153
+ * @description Retrieve the list of comments sorted by the recent ones on the top.
154
+
155
+ If you want to retrieve the list of comments for an [entity](https://apidocs.chargebee.com/docs/api/v1/comments?prod_cat_ver&#x3D;1#list_comments_entity_type), for example, subscription you can filter them by passing the entity type and unique identifier for that entity, for example, subscription ID.
156
+
157
+ */
158
+
36
159
  entity_id?:string;
160
+
161
+ /**
162
+ * @description The time at which this comment was created
163
+
164
+ */
165
+
37
166
  created_at?:{after?:string,before?:string,between?:string,on?:string};
167
+
168
+ /**
169
+ * @description Retrieve the list of comments sorted by the recent ones on the top.
170
+
171
+ If you want to retrieve the list of comments for an [entity](https://apidocs.chargebee.com/docs/api/v1/comments?prod_cat_ver&#x3D;1#list_comments_entity_type), for example, subscription you can filter them by passing the entity type and unique identifier for that entity, for example, subscription ID.
172
+
173
+ */
174
+
38
175
  sort_by?:{asc?:'created_at',desc?:'created_at'};
39
176
  }
40
- export interface CreateResponse {
41
- comment:Comment;
177
+ export interface CreateResponse {
178
+ /**
179
+ * @description Create a new comment for an entity. The newly added comment will be shown in the web interface as well.
180
+
181
+ */
182
+
183
+ comment:Comment;
42
184
  }
43
185
  export interface CreateInputParam {
186
+
187
+ /**
188
+ * @description Type of the entity to create the comment for. \* item - Entity that represents item \* order - Entity that represents an order \* item_price - Entity that represents item price \* customer - Entity that represents a customer \* invoice - Invoice description \* business_entity - Entity that represents item of type business entity \* plan - Entity that represents a subscription plan \* coupon - Entity that represents a discount coupon \* subscription - Entity that represents a subscription of a customer \* item_family - Entity that represents item family \* transaction - Entity that represents a transaction. \* addon - Entity that represents an addon \* credit_note - Credit note description \* quote - Entity that represents a quote
189
+
190
+ */
191
+
44
192
  entity_type:EntityType;
193
+
194
+ /**
195
+ * @description Unique identifier of the entity.
196
+
197
+ */
198
+
45
199
  entity_id:string;
200
+
201
+ /**
202
+ * @description Actual notes for the comment.
203
+
204
+ */
205
+
46
206
  notes:string;
207
+
208
+ /**
209
+ * @description The user who created the comment. If created via API, this contains the name given for the API key used.
210
+
211
+ */
212
+
47
213
  added_by?:string;
48
214
  }
49
215
 
@@ -1,14 +1,68 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
2
  declare module 'chargebee' {
3
3
  export interface Contact {
4
+
5
+ /**
6
+ * @description Unique reference ID provided for the contact.
7
+
8
+ */
9
+
4
10
  id:string;
11
+
12
+ /**
13
+ * @description First name of the contact.
14
+
15
+ */
16
+
5
17
  first_name?:string;
18
+
19
+ /**
20
+ * @description Last name of the contact.
21
+
22
+ */
23
+
6
24
  last_name?:string;
25
+
26
+ /**
27
+ * @description Email of the contact.
28
+
29
+ */
30
+
7
31
  email:string;
32
+
33
+ /**
34
+ * @description Phone number of the contact.
35
+
36
+ */
37
+
8
38
  phone?:string;
39
+
40
+ /**
41
+ * @description Label/Tag provided for contact.
42
+
43
+ */
44
+
9
45
  label?:string;
46
+
47
+ /**
48
+ * @description Contact enabled / disabled
49
+
50
+ */
51
+
10
52
  enabled:boolean;
53
+
54
+ /**
55
+ * @description Whether Account Emails option is enabled for the contact.
56
+
57
+ */
58
+
11
59
  send_account_email:boolean;
60
+
61
+ /**
62
+ * @description Whether Billing Emails option is enabled for the contact.
63
+
64
+ */
65
+
12
66
  send_billing_email:boolean;
13
67
  }
14
68
  }
@@ -1,17 +1,100 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
2
  declare module 'chargebee' {
3
3
  export interface ContractTerm {
4
+
5
+ /**
6
+ * @description Id that uniquely identifies the contract term in the site.
7
+
8
+ */
9
+
4
10
  id:string;
11
+
12
+ /**
13
+ * @description Current status of contract \* active - An actively running contract term. \* cancelled - The contract term was ended because:
14
+
15
+ * a change in the subscription caused a [subscription term reset](subscriptions#update_a_subscription_force_term_reset).
16
+ * the subscription was cancelled due to non-payment.
17
+ \* terminated - The contract term was terminated ahead of completion. \* completed - The contract term has run its full duration.
18
+
19
+ */
20
+
5
21
  status:'active' | 'cancelled' | 'completed' | 'terminated';
22
+
23
+ /**
24
+ * @description The start date of the contract term
25
+
26
+ */
27
+
6
28
  contract_start:number;
29
+
30
+ /**
31
+ * @description The end date of the contract term
32
+
33
+ */
34
+
7
35
  contract_end:number;
36
+
37
+ /**
38
+ * @description The number of billing cycles of the subscription that the contract term is for.
39
+
40
+ */
41
+
8
42
  billing_cycle:number;
43
+
44
+ /**
45
+ * @description Action to be taken when the contract term completes. \* renew -
46
+ * Contract term completes and a new contract term is started for the number of billing cycles specified in [&#x60;contract_billing_cycle_on_renewal&#x60;](subscriptions#create_subscription_for_customer_contract_term_billing_cycle_on_renewal).
47
+ * The &#x60;action_at_term_end&#x60; for the new contract term is set to &#x60;renew&#x60;.
48
+ \* evergreen - Contract term completes and the subscription renews. \* renew_once - Used when you want to renew the contract term just once. Does the following:
49
+ * Contract term completes and a new contract term is started for the number of billing cycles specified in [&#x60;contract_billing_cycle_on_renewal&#x60;](subscriptions#create_subscription_for_customer_contract_term_billing_cycle_on_renewal).
50
+ * The &#x60;action_at_term_end&#x60; for the new contract term is set to &#x60;cancel&#x60;.
51
+ \* cancel - Contract term completes and subscription is canceled.
52
+
53
+
54
+ */
55
+
9
56
  action_at_term_end:'cancel' | 'renew_once' | 'renew' | 'evergreen';
57
+
58
+ /**
59
+ * @description The sum of the [totals](invoices#invoice_total) of all the invoices raised as part of the contract term. For &#x60;active&#x60; contract terms, this is a predicted value. The value depends on the [type of currency](./#handling_currency_units). If the subscription was [imported](#import_a_subscription) with the contract term, then this value includes the value passed for &#x60;total_amount_raised&#x60;.
60
+
61
+ */
62
+
10
63
  total_contract_value:number;
64
+
65
+ /**
66
+ * @description It refers to the total amount of revenue that is expected to be generated from a specific contract term, calculated as the sum of all invoices raised during the term, regardless of payment status. It is based on past performance and the specified currency in the contract. If the subscription was imported, the value for &#x60;total_amount_raised_before_tax&#x60; is included in the calculation of the total contract value before tax. It&#x27;s important to note that this value excludes any applicable taxes.
67
+
68
+ */
69
+
11
70
  total_contract_value_before_tax:number;
71
+
72
+ /**
73
+ * @description The number of days before [&#x60;contract_end&#x60;](contract_terms#contract_term_contract_end), during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure
74
+
75
+ */
76
+
12
77
  cancellation_cutoff_period?:number;
78
+
79
+ /**
80
+ * @description The date when the contract term was created.
81
+
82
+ */
83
+
13
84
  created_at:number;
85
+
86
+ /**
87
+ * @description The [Id](subscriptions#subscription_id) of the subscription that this contract term is for.
88
+
89
+ */
90
+
14
91
  subscription_id:string;
92
+
93
+ /**
94
+ * @description The number of subscription billing cycles remaining after the current one for the contract term. This attribute is only returned for &#x60;active&#x60; contract terms.
95
+
96
+ */
97
+
15
98
  remaining_billing_cycles?:number;
16
99
  }
17
100
  }