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.
Files changed (89) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/lib/chargebee.js +1 -1
  3. package/lib/resources/api_endpoints.js +103 -5
  4. package/package.json +1 -1
  5. package/types/core.d.ts +6 -6
  6. package/types/index.d.ts +10 -0
  7. package/types/resources/Addon.d.ts +3 -3
  8. package/types/resources/Address.d.ts +2 -194
  9. package/types/resources/AdvanceInvoiceSchedule.d.ts +5 -67
  10. package/types/resources/AttachedItem.d.ts +1 -1
  11. package/types/resources/Attribute.d.ts +4 -1
  12. package/types/resources/BillingConfiguration.d.ts +21 -0
  13. package/types/resources/Brand.d.ts +12 -0
  14. package/types/resources/BusinessEntity.d.ts +10 -8
  15. package/types/resources/BusinessEntityTransfer.d.ts +10 -7
  16. package/types/resources/Card.d.ts +11 -311
  17. package/types/resources/Comment.d.ts +10 -125
  18. package/types/resources/Contact.d.ts +2 -44
  19. package/types/resources/ContractTerm.d.ts +4 -72
  20. package/types/resources/Coupon.d.ts +4 -41
  21. package/types/resources/CouponCode.d.ts +67 -35
  22. package/types/resources/CouponSet.d.ts +12 -121
  23. package/types/resources/CreditNote.d.ts +89 -95
  24. package/types/resources/Currency.d.ts +8 -5
  25. package/types/resources/Customer.d.ts +96 -95
  26. package/types/resources/CustomerEntitlement.d.ts +3 -1
  27. package/types/resources/DifferentialPrice.d.ts +1 -1
  28. package/types/resources/Discount.d.ts +5 -90
  29. package/types/resources/Download.d.ts +2 -14
  30. package/types/resources/Entitlement.d.ts +15 -103
  31. package/types/resources/EntitlementOverride.d.ts +4 -89
  32. package/types/resources/Estimate.d.ts +6 -14
  33. package/types/resources/Event.d.ts +24 -109
  34. package/types/resources/Export.d.ts +116 -432
  35. package/types/resources/Feature.d.ts +19 -321
  36. package/types/resources/GatewayErrorDetail.d.ts +6 -48
  37. package/types/resources/Gift.d.ts +34 -294
  38. package/types/resources/Hierarchy.d.ts +4 -24
  39. package/types/resources/HostedPage.d.ts +4 -4
  40. package/types/resources/ImpactedCustomer.d.ts +23 -0
  41. package/types/resources/ImpactedItem.d.ts +4 -36
  42. package/types/resources/ImpactedItemPrice.d.ts +5 -2
  43. package/types/resources/ImpactedSubscription.d.ts +3 -30
  44. package/types/resources/InAppSubscription.d.ts +13 -355
  45. package/types/resources/Invoice.d.ts +112 -126
  46. package/types/resources/InvoiceEstimate.d.ts +1 -1
  47. package/types/resources/Item.d.ts +4 -11
  48. package/types/resources/ItemEntitlement.d.ts +15 -155
  49. package/types/resources/ItemFamily.d.ts +3 -3
  50. package/types/resources/ItemPrice.d.ts +7 -7
  51. package/types/resources/NonSubscription.d.ts +9 -6
  52. package/types/resources/OmnichannelOneTimeOrder.d.ts +90 -0
  53. package/types/resources/OmnichannelOneTimeOrderItem.d.ts +24 -0
  54. package/types/resources/OmnichannelSubscription.d.ts +2 -2
  55. package/types/resources/OmnichannelSubscriptionItem.d.ts +1 -1
  56. package/types/resources/OmnichannelSubscriptionItemScheduledChange.d.ts +1 -1
  57. package/types/resources/Order.d.ts +3 -3
  58. package/types/resources/PaymentIntent.d.ts +9 -255
  59. package/types/resources/PaymentReferenceNumber.d.ts +3 -20
  60. package/types/resources/PaymentSource.d.ts +4 -4
  61. package/types/resources/PaymentVoucher.d.ts +22 -205
  62. package/types/resources/Plan.d.ts +3 -3
  63. package/types/resources/PortalSession.d.ts +4 -146
  64. package/types/resources/PriceVariant.d.ts +2 -2
  65. package/types/resources/PricingPageSession.d.ts +2 -2
  66. package/types/resources/PromotionalCredit.d.ts +12 -215
  67. package/types/resources/Purchase.d.ts +5 -3
  68. package/types/resources/Quote.d.ts +32 -14
  69. package/types/resources/QuotedCharge.d.ts +7 -0
  70. package/types/resources/QuotedRamp.d.ts +11 -16
  71. package/types/resources/Ramp.d.ts +7 -7
  72. package/types/resources/RecordedPurchase.d.ts +8 -1
  73. package/types/resources/ResourceMigration.d.ts +2 -54
  74. package/types/resources/SiteMigrationDetail.d.ts +13 -55
  75. package/types/resources/Subscription.d.ts +33 -29
  76. package/types/resources/SubscriptionEntitlement.d.ts +6 -106
  77. package/types/resources/SubscriptionEntitlementsCreatedDetail.d.ts +12 -0
  78. package/types/resources/SubscriptionEntitlementsUpdatedDetail.d.ts +12 -0
  79. package/types/resources/SubscriptionEstimate.d.ts +14 -11
  80. package/types/resources/TaxWithheld.d.ts +14 -26
  81. package/types/resources/ThirdPartyPaymentMethod.d.ts +2 -19
  82. package/types/resources/TimeMachine.d.ts +3 -64
  83. package/types/resources/Token.d.ts +3 -60
  84. package/types/resources/Transaction.d.ts +8 -8
  85. package/types/resources/UnbilledCharge.d.ts +1 -1
  86. package/types/resources/Usage.d.ts +21 -165
  87. package/types/resources/UsageFile.d.ts +5 -5
  88. package/types/resources/VirtualBankAccount.d.ts +1 -1
  89. package/types/resources/WebhookEndpoint.d.ts +117 -0
@@ -3,128 +3,42 @@
3
3
  declare module 'chargebee' {
4
4
  export interface Usage {
5
5
 
6
- /**
7
- * @description A unique and immutable id for the usage. If not provided, it is autogenerated.
8
6
 
9
- */
10
-
11
7
  id?:string;
12
-
13
- /**
14
- * @description The time at which this usage occurred. Chargebee bills only those usages whose `usage_date` falls within a time when the subscription `status` was `active` or `non_renewing`. However, the remaining usage records are still stored and are [retrievable](/docs/api/usages?prod_cat_ver=2#retrieve_a_usage).
15
- **Note:** If `usage_date` corresponds to a time already invoiced, then it is stored but never invoiced unless the [invoice is regenerated](/docs/api/subscriptions?prod_cat_ver=2#regenerate_an_invoice).
16
8
 
17
- */
18
-
19
9
  usage_date:number;
20
-
21
- /**
22
- * @description The id of the [subscription](/docs/api/subscriptions?prod_cat_ver=2) to which this usage record belongs.
23
10
 
24
- */
25
-
26
11
  subscription_id:string;
27
-
28
- /**
29
- * @description The id of the [item price](/docs/api/item_prices?prod_cat_ver=2) to which this usage belongs. The item price must be a part of the subscription or should have been part of it historically.
30
12
 
31
- */
32
-
33
13
  item_price_id:string;
34
-
35
- /**
36
- * @description When the usage has been invoiced, this is the `id` of the [invoice](/docs/api/invoices?prod_cat_ver=2). This is cleared when the invoice is `voided` or deleted.
37
14
 
38
- */
39
-
40
15
  invoice_id?:string;
41
-
42
- /**
43
- * @description When the usage has been invoiced, this is the `id` of the [invoice.line_item](/docs/api/invoices?prod_cat_ver=2#invoice_line_items) that the usage is for. This is cleared when the invoice is [voided](/docs/api/invoices?prod_cat_ver=2#void_an_invoice) or [deleted](/docs/api/invoices?prod_cat_ver=2#delete_an_invoice).
44
16
 
45
- */
46
-
47
17
  line_item_id?:string;
48
-
49
- /**
50
- * @description The quantity specified for this usage record.
51
18
 
52
- */
53
-
54
19
  quantity:string;
55
-
56
- /**
57
- * @description The source from which the usage record was created. \* admin_console - Operation made through the Chargebee admin UI \* api - Operation made through the API \* bulk_operation - Operation that are triggerd through bulk operation.
58
20
 
59
- */
60
-
61
21
  source?:Source;
62
-
63
- /**
64
- * @description A note for this usage record. This appears against the usage on the Chargebee UI. This note is not displayed on any customer-facing document or interface such as [invoice PDFs](/docs/api/invoices?prod_cat_ver=2#retrieve_invoice_as_pdf) or [Hosted Pages](/docs/api/hosted_pages?prod_cat_ver=2).
65
22
 
66
- */
67
-
68
23
  note?:string;
69
-
70
- /**
71
- * @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.
72
24
 
73
- */
74
-
75
25
  resource_version?:number;
76
-
77
- /**
78
- * @description Timestamp indicating when this usage resource was last updated.
79
26
 
80
- */
81
-
82
27
  updated_at?:number;
83
-
84
- /**
85
- * @description Timestamp indicating when the item was created.
86
28
 
87
- */
88
-
89
29
  created_at:number;
30
+
90
31
  }
91
32
  export namespace Usage {
92
33
  export class UsageResource {
93
- /**
94
- * @description Creates a usage record for an item price in a subscription. The item price must belong to a [metered](/docs/api/items?prod_cat_ver=2#item_metered) item.
95
- **Max Usages**
96
- The maximum number of usages that can be recorded for the entire lifetime of a subscription is 5000. [Contact Support](https://chargebee.freshdesk.com/support/home) if you want this limit to be increased for your site.
97
-
98
- */
99
-
100
34
  create(subscription_id:string, input:CreateInputParam):ChargebeeRequest<CreateResponse>;
101
35
 
102
- /**
103
- * @description Retrieves a usage record of a specific subscription.
104
-
105
- */
106
-
107
36
  retrieve(subscription_id:string, input:RetrieveInputParam):ChargebeeRequest<RetrieveResponse>;
108
37
 
109
- /**
110
- * @description Deletes a usage record. This operation cannot be invoked for a usage record that has been [invoiced](usages?prod_cat_ver&#x3D;2#invoicing_usages).
111
-
112
- */
113
-
114
38
  delete(subscription_id:string, input:DeleteInputParam):ChargebeeRequest<DeleteResponse>;
115
39
 
116
- /**
117
- * @description Retrieves the list of usages.
118
-
119
- */
120
-
121
- list(input:ListInputParam):ChargebeeRequest<ListResponse>;
40
+ list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
122
41
 
123
- /**
124
- * @description Retrieves usages record for an invoice in PDF file format.
125
-
126
- */
127
-
128
42
  pdf(input:PdfInputParam):ChargebeeRequest<PdfResponse>;
129
43
  }
130
44
  export interface CreateResponse {
@@ -132,39 +46,15 @@ The maximum number of usages that can be recorded for the entire lifetime of a s
132
46
  }
133
47
  export interface CreateInputParam {
134
48
 
135
- /**
136
- * @description A unique and immutable id for the usage. If not provided, it is autogenerated.
137
-
138
- */
139
-
140
49
  id?:string;
141
50
 
142
- /**
143
- * @description The id of the [item price](/docs/api/item_prices?prod_cat_ver&#x3D;2) to which this usage belongs. The item price must be a part of the subscription or should have been part of it historically.
144
-
145
- */
146
-
147
51
  item_price_id:string;
148
52
 
149
- /**
150
- * @description The quantity specified for this usage record.
151
-
152
- */
153
-
154
53
  quantity:string;
155
54
 
156
- /**
157
- * @description The time at which this usage occurred. Chargebee bills only those usages whose &#x60;usage_date&#x60; falls within a time when the subscription &#x60;status&#x60; was &#x60;active&#x60; or &#x60;non_renewing&#x60;. However, the remaining usage records are still stored and are [retrievable](/docs/api/usages?prod_cat_ver&#x3D;2#retrieve_a_usage).
158
- **Note:** If &#x60;usage_date&#x60; corresponds to a time already invoiced, then it is stored but never invoiced unless the [invoice is regenerated](/docs/api/subscriptions?prod_cat_ver&#x3D;2#regenerate_an_invoice).
159
-
160
- */
161
-
162
55
  usage_date:number;
163
56
 
164
- /**
165
- * @description A note for this usage record. This appears against the usage on the Chargebee UI. This note is not displayed on any customer-facing document or interface such as [invoice PDFs](/docs/api/invoices?prod_cat_ver&#x3D;2#retrieve_invoice_as_pdf) or [Hosted Pages](/docs/api/hosted_pages?prod_cat_ver&#x3D;2).
166
-
167
- */
57
+ dedupe_option?:DedupeOption;
168
58
 
169
59
  note?:string;
170
60
  }
@@ -173,11 +63,6 @@ The maximum number of usages that can be recorded for the entire lifetime of a s
173
63
  }
174
64
  export interface RetrieveInputParam {
175
65
 
176
- /**
177
- * @description Retrieves a usage record of a specific subscription.
178
-
179
- */
180
-
181
66
  id:string;
182
67
  }
183
68
  export interface DeleteResponse {
@@ -185,118 +70,89 @@ The maximum number of usages that can be recorded for the entire lifetime of a s
185
70
  }
186
71
  export interface DeleteInputParam {
187
72
 
188
- /**
189
- * @description A unique and immutable id for the usage. If not provided, it is autogenerated.
190
-
191
- */
192
-
193
73
  id:string;
194
74
  }
195
75
  export interface ListResponse {
196
- /**
197
- * @description Retrieves the list of usages.
198
-
199
- */
200
-
201
76
  list:{usage:Usage}[];
202
77
 
203
- /**
204
- * @description Retrieves the list of usages.
205
-
206
- */
207
-
208
78
  next_offset?:string;
209
79
  }
210
80
  export interface ListInputParam {
211
81
  [key : string]: any;
212
82
  /**
213
- * @description Retrieves the list of usages.
83
+ * @description The number of resources to be returned.
214
84
 
215
85
  */
216
86
 
217
87
  limit?:number;
218
88
 
219
89
  /**
220
- * @description Retrieves the list of usages.
90
+ * @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set &#x27;offset&#x27; to the value of &#x27;next_offset&#x27; obtained in the previous iteration of the API call.
221
91
 
222
92
  */
223
93
 
224
94
  offset?:string;
225
95
 
226
96
  /**
227
- * @description Retrieves the list of usages.
97
+ * @description A unique and immutable id for the usage. If not provided, it is autogenerated.
228
98
 
229
99
  */
230
100
 
231
101
  id?:{is?:string,is_not?:string,starts_with?:string};
232
102
 
233
103
  /**
234
- * @description Retrieves the list of usages.
104
+ * @description The id of the [subscription](/docs/api/subscriptions?prod_cat_ver&#x3D;2) to which this usage record belongs.
235
105
 
236
106
  */
237
107
 
238
- subscription_id:{is?:string,is_not?:string,starts_with?:string};
108
+ subscription_id?:{is?:string,is_not?:string,starts_with?:string};
239
109
 
240
110
  /**
241
- * @description Retrieves the list of usages.
111
+ * @description The time at which this usage occurred. Chargebee bills only those usages whose &#x60;usage_date&#x60; falls within a time when the subscription &#x60;status&#x60; was &#x60;active&#x60; or &#x60;non_renewing&#x60;. However, the remaining usage records are still stored and are [retrievable](/docs/api/usages?prod_cat_ver&#x3D;2#retrieve_a_usage).
112
+ **Note:** If &#x60;usage_date&#x60; corresponds to a time already invoiced, then it is stored but never invoiced unless the [invoice is regenerated](/docs/api/subscriptions?prod_cat_ver&#x3D;2#regenerate_an_invoice).
242
113
 
243
114
  */
244
115
 
245
116
  usage_date?:{after?:string,before?:string,between?:string,on?:string};
246
117
 
247
118
  /**
248
- * @description Retrieves the list of usages.
119
+ * @description Indicates the date at which this credit note is last updated.
249
120
 
250
121
  */
251
122
 
252
- item_price_id?:{is?:string,is_not?:string,starts_with?:string};
123
+ updated_at?:{after?:string,before?:string,between?:string,on?:string};
253
124
 
254
125
  /**
255
- * @description Retrieves the list of usages.
126
+ * @description The id of the [item price](/docs/api/item_prices?prod_cat_ver&#x3D;2) to which this usage belongs. The item price must be a part of the subscription or should have been part of it historically.
256
127
 
257
128
  */
258
129
 
259
- invoice_id?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string};
130
+ item_price_id?:{is?:string,is_not?:string,starts_with?:string};
260
131
 
261
132
  /**
262
- * @description Retrieves the list of usages.
133
+ * @description When the usage has been invoiced, this is the &#x60;id&#x60; of the [invoice](/docs/api/invoices?prod_cat_ver&#x3D;2). This is cleared when the invoice is &#x60;voided&#x60; or deleted.
263
134
 
264
135
  */
265
136
 
266
- source?:{in?:string,is?:'admin_console' | 'bulk_operation' | 'api',is_not?:'admin_console' | 'bulk_operation' | 'api',not_in?:string};
137
+ invoice_id?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string};
267
138
 
268
139
  /**
269
- * @description Retrieves the list of usages.
270
-
271
- */
272
-
273
- sort_by?:{asc?:'usage_date',desc?:'usage_date'};
274
-
275
- /**
276
- * @description Indicates the date at which this credit note is last updated.
140
+ * @description The source from which the usage record was created.
277
141
 
278
142
  */
279
143
 
280
- updated_at?:{after?:string,before?:string,between?:string,on?:string};
144
+ source?:{in?:string,is?:'admin_console' | 'api' | 'bulk_operation',is_not?:'admin_console' | 'api' | 'bulk_operation',not_in?:string};
145
+
146
+ sort_by?:object;
281
147
  }
282
148
  export interface PdfResponse {
283
149
  download:Download;
284
150
  }
285
151
  export interface PdfInputParam {
286
152
 
287
- /**
288
- * @description Determines the pdf should be rendered as inline or attachment in the browser. \* attachment - PDF is rendered as attachment in the browser \* inline - PDF is rendered as inline in the browser
289
-
290
- */
153
+ invoice:{id:string};
291
154
 
292
155
  disposition_type?:DispositionType;
293
-
294
- /**
295
- * @description Parameters for invoice
296
-
297
- */
298
-
299
- invoice:{id:string};
300
156
  }
301
157
 
302
158
  }
@@ -37,20 +37,20 @@ declare module 'chargebee' {
37
37
  }
38
38
  export namespace UsageFile {
39
39
  export class UsageFileResource {
40
- upload(input:UploadInputParam):ChargebeeRequest<UploadResponse>;
40
+ upload_url(input:UploadUrlInputParam):ChargebeeRequest<UploadUrlResponse>;
41
41
 
42
- status(usage_file_id:string):ChargebeeRequest<StatusResponse>;
42
+ processing_status(usage_file_id:string):ChargebeeRequest<ProcessingStatusResponse>;
43
43
  }
44
- export interface UploadResponse {
44
+ export interface UploadUrlResponse {
45
45
  usage_file:UsageFile;
46
46
  }
47
- export interface UploadInputParam {
47
+ export interface UploadUrlInputParam {
48
48
 
49
49
  file_name:string;
50
50
 
51
51
  mime_type:string;
52
52
  }
53
- export interface StatusResponse {
53
+ export interface ProcessingStatusResponse {
54
54
  usage_file:UsageFile;
55
55
  }
56
56
 
@@ -94,7 +94,7 @@ declare module 'chargebee' {
94
94
  limit?:number;
95
95
 
96
96
  /**
97
- * @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.
97
+ * @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set &#x27;offset&#x27; to the value of &#x27;next_offset&#x27; obtained in the previous iteration of the API call.
98
98
 
99
99
  */
100
100
 
@@ -0,0 +1,117 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
3
+ declare module 'chargebee' {
4
+ export interface WebhookEndpoint {
5
+
6
+
7
+ id:string;
8
+
9
+ name:string;
10
+
11
+ url:string;
12
+
13
+ send_card_resource?:boolean;
14
+
15
+ disabled:boolean;
16
+
17
+ primary_url:boolean;
18
+
19
+ api_version:'v1' | 'v2';
20
+
21
+ chargebee_response_schema_type?:ChargebeeResponseSchemaType;
22
+
23
+ enabled_events?:'coupon_created' | 'coupon_updated' | 'coupon_deleted' | 'coupon_set_created' | 'coupon_set_updated' | 'coupon_set_deleted' | 'coupon_codes_added' | 'coupon_codes_deleted' | 'coupon_codes_updated' | 'customer_created' | 'customer_changed' | 'customer_deleted' | 'customer_moved_out' | 'customer_moved_in' | 'promotional_credits_added' | 'promotional_credits_deducted' | 'subscription_created' | 'subscription_created_with_backdating' | 'subscription_started' | 'subscription_trial_end_reminder' | 'subscription_activated' | 'subscription_activated_with_backdating' | 'subscription_changed' | 'subscription_trial_extended' | 'mrr_updated' | 'subscription_changed_with_backdating' | 'subscription_cancellation_scheduled' | 'subscription_cancellation_reminder' | 'subscription_cancelled' | 'subscription_canceled_with_backdating' | 'subscription_reactivated' | 'subscription_reactivated_with_backdating' | 'subscription_renewed' | 'subscription_items_renewed' | 'subscription_scheduled_cancellation_removed' | 'subscription_changes_scheduled' | 'subscription_scheduled_changes_removed' | 'subscription_shipping_address_updated' | 'subscription_deleted' | 'subscription_paused' | 'subscription_pause_scheduled' | 'subscription_scheduled_pause_removed' | 'subscription_resumed' | 'subscription_resumption_scheduled' | 'subscription_scheduled_resumption_removed' | 'subscription_advance_invoice_schedule_added' | 'subscription_advance_invoice_schedule_updated' | 'subscription_advance_invoice_schedule_removed' | 'pending_invoice_created' | 'pending_invoice_updated' | 'invoice_generated' | 'invoice_generated_with_backdating' | 'invoice_updated' | 'invoice_deleted' | 'credit_note_created' | 'credit_note_created_with_backdating' | 'credit_note_updated' | 'credit_note_deleted' | 'payment_schedules_created' | 'payment_schedules_updated' | 'payment_schedule_scheme_created' | 'payment_schedule_scheme_deleted' | 'subscription_renewal_reminder' | 'add_usages_reminder' | 'transaction_created' | 'transaction_updated' | 'transaction_deleted' | 'payment_succeeded' | 'payment_failed' | 'payment_refunded' | 'payment_initiated' | 'refund_initiated' | 'authorization_succeeded' | 'authorization_voided' | 'card_added' | 'card_updated' | 'card_expiry_reminder' | 'card_expired' | 'card_deleted' | 'payment_source_added' | 'payment_source_updated' | 'payment_source_deleted' | 'payment_source_expiring' | 'payment_source_expired' | 'payment_source_locally_deleted' | 'virtual_bank_account_added' | 'virtual_bank_account_updated' | 'virtual_bank_account_deleted' | 'token_created' | 'token_consumed' | 'token_expired' | 'unbilled_charges_created' | 'unbilled_charges_voided' | 'unbilled_charges_deleted' | 'unbilled_charges_invoiced' | 'order_created' | 'order_updated' | 'order_cancelled' | 'order_delivered' | 'order_returned' | 'order_ready_to_process' | 'order_ready_to_ship' | 'order_deleted' | 'order_resent' | 'quote_created' | 'quote_updated' | 'quote_deleted' | 'tax_withheld_recorded' | 'tax_withheld_deleted' | 'tax_withheld_refunded' | 'gift_scheduled' | 'gift_unclaimed' | 'gift_claimed' | 'gift_expired' | 'gift_cancelled' | 'gift_updated' | 'hierarchy_created' | 'hierarchy_deleted' | 'payment_intent_created' | 'payment_intent_updated' | 'contract_term_created' | 'contract_term_renewed' | 'contract_term_terminated' | 'contract_term_completed' | 'contract_term_cancelled' | 'item_family_created' | 'item_family_updated' | 'item_family_deleted' | 'item_created' | 'item_updated' | 'item_deleted' | 'item_price_created' | 'item_price_updated' | 'item_price_deleted' | 'attached_item_created' | 'attached_item_updated' | 'attached_item_deleted' | 'differential_price_created' | 'differential_price_updated' | 'differential_price_deleted' | 'feature_created' | 'feature_updated' | 'feature_deleted' | 'feature_activated' | 'feature_reactivated' | 'feature_archived' | 'item_entitlements_updated' | 'entitlement_overrides_updated' | 'entitlement_overrides_removed' | 'item_entitlements_removed' | 'entitlement_overrides_auto_removed' | 'subscription_entitlements_created' | 'subscription_entitlements_updated' | 'business_entity_created' | 'business_entity_updated' | 'business_entity_deleted' | 'customer_business_entity_changed' | 'subscription_business_entity_changed' | 'purchase_created' | 'voucher_created' | 'voucher_expired' | 'voucher_create_failed' | 'item_price_entitlements_updated' | 'item_price_entitlements_removed' | 'subscription_ramp_created' | 'subscription_ramp_deleted' | 'subscription_ramp_applied' | 'subscription_ramp_drafted' | 'subscription_ramp_updated' | 'price_variant_created' | 'price_variant_updated' | 'price_variant_deleted' | 'customer_entitlements_updated' | 'subscription_moved_in' | 'subscription_moved_out' | 'subscription_movement_failed' | 'omnichannel_subscription_created' | 'omnichannel_subscription_item_renewed' | 'omnichannel_subscription_item_downgraded' | 'omnichannel_subscription_item_expired' | 'omnichannel_subscription_item_cancellation_scheduled' | 'omnichannel_subscription_item_scheduled_cancellation_removed' | 'omnichannel_subscription_item_resubscribed' | 'omnichannel_subscription_item_upgraded' | 'omnichannel_subscription_item_cancelled' | 'omnichannel_subscription_imported' | 'omnichannel_subscription_item_grace_period_started' | 'omnichannel_subscription_item_grace_period_expired' | 'omnichannel_subscription_item_dunning_started' | 'omnichannel_subscription_item_dunning_expired' | 'rule_created' | 'rule_updated' | 'rule_deleted' | 'record_purchase_failed' | 'omnichannel_subscription_item_change_scheduled' | 'omnichannel_subscription_item_scheduled_change_removed' | 'omnichannel_subscription_item_reactivated' | 'sales_order_created' | 'sales_order_updated' | 'omnichannel_subscription_item_changed' | 'omnichannel_subscription_item_paused' | 'omnichannel_subscription_item_resumed' | 'omnichannel_one_time_order_created' | 'omnichannel_one_time_order_item_cancelled' | 'usage_file_ingested' | 'omnichannel_subscription_item_pause_scheduled' | 'plan_created' | 'plan_updated' | 'plan_deleted' | 'addon_created' | 'addon_updated' | 'addon_deleted'[];
24
+
25
+ }
26
+ export namespace WebhookEndpoint {
27
+ export class WebhookEndpointResource {
28
+ create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
29
+
30
+ update(webhook_endpoint_id:string, input?:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
31
+
32
+ retrieve(webhook_endpoint_id:string):ChargebeeRequest<RetrieveResponse>;
33
+
34
+ delete(webhook_endpoint_id:string):ChargebeeRequest<DeleteResponse>;
35
+
36
+ list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
37
+ }
38
+ export interface CreateResponse {
39
+ webhook_endpoint:WebhookEndpoint;
40
+ }
41
+ export interface CreateInputParam {
42
+
43
+ name:string;
44
+
45
+ api_version?:'v1' | 'v2';
46
+
47
+ url:string;
48
+
49
+ primary_url?:boolean;
50
+
51
+ disabled?:boolean;
52
+
53
+ basic_auth_password?:string;
54
+
55
+ basic_auth_username?:string;
56
+
57
+ send_card_resource?:boolean;
58
+
59
+ chargebee_response_schema_type?:ChargebeeResponseSchemaType;
60
+
61
+ enabled_events?:'coupon_created' | 'coupon_updated' | 'coupon_deleted' | 'coupon_set_created' | 'coupon_set_updated' | 'coupon_set_deleted' | 'coupon_codes_added' | 'coupon_codes_deleted' | 'coupon_codes_updated' | 'customer_created' | 'customer_changed' | 'customer_deleted' | 'customer_moved_out' | 'customer_moved_in' | 'promotional_credits_added' | 'promotional_credits_deducted' | 'subscription_created' | 'subscription_created_with_backdating' | 'subscription_started' | 'subscription_trial_end_reminder' | 'subscription_activated' | 'subscription_activated_with_backdating' | 'subscription_changed' | 'subscription_trial_extended' | 'mrr_updated' | 'subscription_changed_with_backdating' | 'subscription_cancellation_scheduled' | 'subscription_cancellation_reminder' | 'subscription_cancelled' | 'subscription_canceled_with_backdating' | 'subscription_reactivated' | 'subscription_reactivated_with_backdating' | 'subscription_renewed' | 'subscription_items_renewed' | 'subscription_scheduled_cancellation_removed' | 'subscription_changes_scheduled' | 'subscription_scheduled_changes_removed' | 'subscription_shipping_address_updated' | 'subscription_deleted' | 'subscription_paused' | 'subscription_pause_scheduled' | 'subscription_scheduled_pause_removed' | 'subscription_resumed' | 'subscription_resumption_scheduled' | 'subscription_scheduled_resumption_removed' | 'subscription_advance_invoice_schedule_added' | 'subscription_advance_invoice_schedule_updated' | 'subscription_advance_invoice_schedule_removed' | 'pending_invoice_created' | 'pending_invoice_updated' | 'invoice_generated' | 'invoice_generated_with_backdating' | 'invoice_updated' | 'invoice_deleted' | 'credit_note_created' | 'credit_note_created_with_backdating' | 'credit_note_updated' | 'credit_note_deleted' | 'payment_schedules_created' | 'payment_schedules_updated' | 'payment_schedule_scheme_created' | 'payment_schedule_scheme_deleted' | 'subscription_renewal_reminder' | 'add_usages_reminder' | 'transaction_created' | 'transaction_updated' | 'transaction_deleted' | 'payment_succeeded' | 'payment_failed' | 'payment_refunded' | 'payment_initiated' | 'refund_initiated' | 'authorization_succeeded' | 'authorization_voided' | 'card_added' | 'card_updated' | 'card_expiry_reminder' | 'card_expired' | 'card_deleted' | 'payment_source_added' | 'payment_source_updated' | 'payment_source_deleted' | 'payment_source_expiring' | 'payment_source_expired' | 'payment_source_locally_deleted' | 'virtual_bank_account_added' | 'virtual_bank_account_updated' | 'virtual_bank_account_deleted' | 'token_created' | 'token_consumed' | 'token_expired' | 'unbilled_charges_created' | 'unbilled_charges_voided' | 'unbilled_charges_deleted' | 'unbilled_charges_invoiced' | 'order_created' | 'order_updated' | 'order_cancelled' | 'order_delivered' | 'order_returned' | 'order_ready_to_process' | 'order_ready_to_ship' | 'order_deleted' | 'order_resent' | 'quote_created' | 'quote_updated' | 'quote_deleted' | 'tax_withheld_recorded' | 'tax_withheld_deleted' | 'tax_withheld_refunded' | 'gift_scheduled' | 'gift_unclaimed' | 'gift_claimed' | 'gift_expired' | 'gift_cancelled' | 'gift_updated' | 'hierarchy_created' | 'hierarchy_deleted' | 'payment_intent_created' | 'payment_intent_updated' | 'contract_term_created' | 'contract_term_renewed' | 'contract_term_terminated' | 'contract_term_completed' | 'contract_term_cancelled' | 'item_family_created' | 'item_family_updated' | 'item_family_deleted' | 'item_created' | 'item_updated' | 'item_deleted' | 'item_price_created' | 'item_price_updated' | 'item_price_deleted' | 'attached_item_created' | 'attached_item_updated' | 'attached_item_deleted' | 'differential_price_created' | 'differential_price_updated' | 'differential_price_deleted' | 'feature_created' | 'feature_updated' | 'feature_deleted' | 'feature_activated' | 'feature_reactivated' | 'feature_archived' | 'item_entitlements_updated' | 'entitlement_overrides_updated' | 'entitlement_overrides_removed' | 'item_entitlements_removed' | 'entitlement_overrides_auto_removed' | 'subscription_entitlements_created' | 'subscription_entitlements_updated' | 'business_entity_created' | 'business_entity_updated' | 'business_entity_deleted' | 'customer_business_entity_changed' | 'subscription_business_entity_changed' | 'purchase_created' | 'voucher_created' | 'voucher_expired' | 'voucher_create_failed' | 'item_price_entitlements_updated' | 'item_price_entitlements_removed' | 'subscription_ramp_created' | 'subscription_ramp_deleted' | 'subscription_ramp_applied' | 'subscription_ramp_drafted' | 'subscription_ramp_updated' | 'price_variant_created' | 'price_variant_updated' | 'price_variant_deleted' | 'customer_entitlements_updated' | 'subscription_moved_in' | 'subscription_moved_out' | 'subscription_movement_failed' | 'omnichannel_subscription_created' | 'omnichannel_subscription_item_renewed' | 'omnichannel_subscription_item_downgraded' | 'omnichannel_subscription_item_expired' | 'omnichannel_subscription_item_cancellation_scheduled' | 'omnichannel_subscription_item_scheduled_cancellation_removed' | 'omnichannel_subscription_item_resubscribed' | 'omnichannel_subscription_item_upgraded' | 'omnichannel_subscription_item_cancelled' | 'omnichannel_subscription_imported' | 'omnichannel_subscription_item_grace_period_started' | 'omnichannel_subscription_item_grace_period_expired' | 'omnichannel_subscription_item_dunning_started' | 'omnichannel_subscription_item_dunning_expired' | 'rule_created' | 'rule_updated' | 'rule_deleted' | 'record_purchase_failed' | 'omnichannel_subscription_item_change_scheduled' | 'omnichannel_subscription_item_scheduled_change_removed' | 'omnichannel_subscription_item_reactivated' | 'sales_order_created' | 'sales_order_updated' | 'omnichannel_subscription_item_changed' | 'omnichannel_subscription_item_paused' | 'omnichannel_subscription_item_resumed' | 'omnichannel_one_time_order_created' | 'omnichannel_one_time_order_item_cancelled' | 'usage_file_ingested' | 'omnichannel_subscription_item_pause_scheduled' | 'plan_created' | 'plan_updated' | 'plan_deleted' | 'addon_created' | 'addon_updated' | 'addon_deleted'[];
62
+ }
63
+ export interface UpdateResponse {
64
+ webhook_endpoint:WebhookEndpoint;
65
+ }
66
+ export interface UpdateInputParam {
67
+
68
+ name?:string;
69
+
70
+ api_version?:'v1' | 'v2';
71
+
72
+ url?:string;
73
+
74
+ primary_url?:boolean;
75
+
76
+ send_card_resource?:boolean;
77
+
78
+ basic_auth_password?:string;
79
+
80
+ basic_auth_username?:string;
81
+
82
+ disabled?:boolean;
83
+
84
+ enabled_events?:'coupon_created' | 'coupon_updated' | 'coupon_deleted' | 'coupon_set_created' | 'coupon_set_updated' | 'coupon_set_deleted' | 'coupon_codes_added' | 'coupon_codes_deleted' | 'coupon_codes_updated' | 'customer_created' | 'customer_changed' | 'customer_deleted' | 'customer_moved_out' | 'customer_moved_in' | 'promotional_credits_added' | 'promotional_credits_deducted' | 'subscription_created' | 'subscription_created_with_backdating' | 'subscription_started' | 'subscription_trial_end_reminder' | 'subscription_activated' | 'subscription_activated_with_backdating' | 'subscription_changed' | 'subscription_trial_extended' | 'mrr_updated' | 'subscription_changed_with_backdating' | 'subscription_cancellation_scheduled' | 'subscription_cancellation_reminder' | 'subscription_cancelled' | 'subscription_canceled_with_backdating' | 'subscription_reactivated' | 'subscription_reactivated_with_backdating' | 'subscription_renewed' | 'subscription_items_renewed' | 'subscription_scheduled_cancellation_removed' | 'subscription_changes_scheduled' | 'subscription_scheduled_changes_removed' | 'subscription_shipping_address_updated' | 'subscription_deleted' | 'subscription_paused' | 'subscription_pause_scheduled' | 'subscription_scheduled_pause_removed' | 'subscription_resumed' | 'subscription_resumption_scheduled' | 'subscription_scheduled_resumption_removed' | 'subscription_advance_invoice_schedule_added' | 'subscription_advance_invoice_schedule_updated' | 'subscription_advance_invoice_schedule_removed' | 'pending_invoice_created' | 'pending_invoice_updated' | 'invoice_generated' | 'invoice_generated_with_backdating' | 'invoice_updated' | 'invoice_deleted' | 'credit_note_created' | 'credit_note_created_with_backdating' | 'credit_note_updated' | 'credit_note_deleted' | 'payment_schedules_created' | 'payment_schedules_updated' | 'payment_schedule_scheme_created' | 'payment_schedule_scheme_deleted' | 'subscription_renewal_reminder' | 'add_usages_reminder' | 'transaction_created' | 'transaction_updated' | 'transaction_deleted' | 'payment_succeeded' | 'payment_failed' | 'payment_refunded' | 'payment_initiated' | 'refund_initiated' | 'authorization_succeeded' | 'authorization_voided' | 'card_added' | 'card_updated' | 'card_expiry_reminder' | 'card_expired' | 'card_deleted' | 'payment_source_added' | 'payment_source_updated' | 'payment_source_deleted' | 'payment_source_expiring' | 'payment_source_expired' | 'payment_source_locally_deleted' | 'virtual_bank_account_added' | 'virtual_bank_account_updated' | 'virtual_bank_account_deleted' | 'token_created' | 'token_consumed' | 'token_expired' | 'unbilled_charges_created' | 'unbilled_charges_voided' | 'unbilled_charges_deleted' | 'unbilled_charges_invoiced' | 'order_created' | 'order_updated' | 'order_cancelled' | 'order_delivered' | 'order_returned' | 'order_ready_to_process' | 'order_ready_to_ship' | 'order_deleted' | 'order_resent' | 'quote_created' | 'quote_updated' | 'quote_deleted' | 'tax_withheld_recorded' | 'tax_withheld_deleted' | 'tax_withheld_refunded' | 'gift_scheduled' | 'gift_unclaimed' | 'gift_claimed' | 'gift_expired' | 'gift_cancelled' | 'gift_updated' | 'hierarchy_created' | 'hierarchy_deleted' | 'payment_intent_created' | 'payment_intent_updated' | 'contract_term_created' | 'contract_term_renewed' | 'contract_term_terminated' | 'contract_term_completed' | 'contract_term_cancelled' | 'item_family_created' | 'item_family_updated' | 'item_family_deleted' | 'item_created' | 'item_updated' | 'item_deleted' | 'item_price_created' | 'item_price_updated' | 'item_price_deleted' | 'attached_item_created' | 'attached_item_updated' | 'attached_item_deleted' | 'differential_price_created' | 'differential_price_updated' | 'differential_price_deleted' | 'feature_created' | 'feature_updated' | 'feature_deleted' | 'feature_activated' | 'feature_reactivated' | 'feature_archived' | 'item_entitlements_updated' | 'entitlement_overrides_updated' | 'entitlement_overrides_removed' | 'item_entitlements_removed' | 'entitlement_overrides_auto_removed' | 'subscription_entitlements_created' | 'subscription_entitlements_updated' | 'business_entity_created' | 'business_entity_updated' | 'business_entity_deleted' | 'customer_business_entity_changed' | 'subscription_business_entity_changed' | 'purchase_created' | 'voucher_created' | 'voucher_expired' | 'voucher_create_failed' | 'item_price_entitlements_updated' | 'item_price_entitlements_removed' | 'subscription_ramp_created' | 'subscription_ramp_deleted' | 'subscription_ramp_applied' | 'subscription_ramp_drafted' | 'subscription_ramp_updated' | 'price_variant_created' | 'price_variant_updated' | 'price_variant_deleted' | 'customer_entitlements_updated' | 'subscription_moved_in' | 'subscription_moved_out' | 'subscription_movement_failed' | 'omnichannel_subscription_created' | 'omnichannel_subscription_item_renewed' | 'omnichannel_subscription_item_downgraded' | 'omnichannel_subscription_item_expired' | 'omnichannel_subscription_item_cancellation_scheduled' | 'omnichannel_subscription_item_scheduled_cancellation_removed' | 'omnichannel_subscription_item_resubscribed' | 'omnichannel_subscription_item_upgraded' | 'omnichannel_subscription_item_cancelled' | 'omnichannel_subscription_imported' | 'omnichannel_subscription_item_grace_period_started' | 'omnichannel_subscription_item_grace_period_expired' | 'omnichannel_subscription_item_dunning_started' | 'omnichannel_subscription_item_dunning_expired' | 'rule_created' | 'rule_updated' | 'rule_deleted' | 'record_purchase_failed' | 'omnichannel_subscription_item_change_scheduled' | 'omnichannel_subscription_item_scheduled_change_removed' | 'omnichannel_subscription_item_reactivated' | 'sales_order_created' | 'sales_order_updated' | 'omnichannel_subscription_item_changed' | 'omnichannel_subscription_item_paused' | 'omnichannel_subscription_item_resumed' | 'omnichannel_one_time_order_created' | 'omnichannel_one_time_order_item_cancelled' | 'usage_file_ingested' | 'omnichannel_subscription_item_pause_scheduled' | 'plan_created' | 'plan_updated' | 'plan_deleted' | 'addon_created' | 'addon_updated' | 'addon_deleted'[];
85
+ }
86
+ export interface RetrieveResponse {
87
+ webhook_endpoint:WebhookEndpoint;
88
+ }
89
+
90
+ export interface DeleteResponse {
91
+ webhook_endpoint:WebhookEndpoint;
92
+ }
93
+
94
+ export interface ListResponse {
95
+ list:{webhook_endpoint:WebhookEndpoint}[];
96
+
97
+ next_offset?:string;
98
+ }
99
+ export interface ListInputParam {
100
+ [key : string]: any;
101
+ /**
102
+ * @description The number of resources to be returned.
103
+
104
+ */
105
+
106
+ limit?:number;
107
+
108
+ /**
109
+ * @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set &#x27;offset&#x27; to the value of &#x27;next_offset&#x27; obtained in the previous iteration of the API call.
110
+
111
+ */
112
+
113
+ offset?:string;
114
+ }
115
+
116
+ }
117
+ }