chargebee 3.33.0 → 3.35.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 (172) hide show
  1. package/CHANGELOG.md +362 -0
  2. package/cjs/environment.js +1 -1
  3. package/cjs/resources/api_endpoints.js +496 -3
  4. package/cjs/resources/webhook/eventType.js +36 -0
  5. package/cjs/schema/business_entity.schema.js +28 -2
  6. package/cjs/schema/business_rule.schema.js +54 -0
  7. package/cjs/schema/business_ruleset.schema.js +68 -0
  8. package/cjs/schema/card.schema.js +3 -1
  9. package/cjs/schema/collections_payment_promise.schema.js +43 -0
  10. package/cjs/schema/comment.schema.js +2 -0
  11. package/cjs/schema/coupon.schema.js +1 -1
  12. package/cjs/schema/credit_note.schema.js +11 -4
  13. package/cjs/schema/credit_unit.schema.js +2 -2
  14. package/cjs/schema/customer.schema.js +81 -10
  15. package/cjs/schema/dispute.schema.js +104 -0
  16. package/cjs/schema/einvoice.schema.js +37 -0
  17. package/cjs/schema/email_log.schema.js +28 -0
  18. package/cjs/schema/entitlement.schema.js +4 -4
  19. package/cjs/schema/estimate.schema.js +39 -10
  20. package/cjs/schema/event.schema.js +156 -0
  21. package/cjs/schema/export.schema.js +75 -19
  22. package/cjs/schema/feature.schema.js +2 -2
  23. package/cjs/schema/gift.schema.js +26 -0
  24. package/cjs/schema/hosted_page.schema.js +26 -6
  25. package/cjs/schema/index.js +9 -0
  26. package/cjs/schema/invoice.schema.js +98 -14
  27. package/cjs/schema/item.schema.js +1 -1
  28. package/cjs/schema/item_family.schema.js +1 -1
  29. package/cjs/schema/item_price.schema.js +1 -1
  30. package/cjs/schema/ledger_account_balance.schema.js +11 -2
  31. package/cjs/schema/ledger_operation.schema.js +6 -2
  32. package/cjs/schema/meter.schema.js +1 -1
  33. package/cjs/schema/metered_feature.schema.js +1 -1
  34. package/cjs/schema/omnichannel_one_time_order.schema.js +12 -4
  35. package/cjs/schema/omnichannel_subscription.schema.js +16 -8
  36. package/cjs/schema/payment_intent.schema.js +27 -0
  37. package/cjs/schema/payment_schedule.schema.js +36 -0
  38. package/cjs/schema/payment_schedule_scheme.schema.js +23 -2
  39. package/cjs/schema/payment_source.schema.js +118 -1
  40. package/cjs/schema/price_ramp.schema.js +88 -0
  41. package/cjs/schema/price_variant.schema.js +1 -1
  42. package/cjs/schema/pricing_page_session.schema.js +1 -0
  43. package/cjs/schema/promotional_grant.schema.js +2 -0
  44. package/cjs/schema/purchase.schema.js +20 -1
  45. package/cjs/schema/quote.schema.js +6 -6
  46. package/cjs/schema/ramp.schema.js +18 -6
  47. package/cjs/schema/retry_segment.schema.js +12 -0
  48. package/cjs/schema/subscription.schema.js +179 -16
  49. package/cjs/schema/transaction.schema.js +60 -2
  50. package/cjs/schema/usage.schema.js +5 -0
  51. package/cjs/schema/usage_summary.schema.js +1 -0
  52. package/cjs/schema/webhook_endpoint.schema.js +72 -0
  53. package/esm/environment.js +1 -1
  54. package/esm/resources/api_endpoints.js +496 -3
  55. package/esm/resources/webhook/eventType.js +36 -0
  56. package/esm/schema/business_entity.schema.js +27 -1
  57. package/esm/schema/business_rule.schema.js +51 -0
  58. package/esm/schema/business_ruleset.schema.js +65 -0
  59. package/esm/schema/card.schema.js +3 -1
  60. package/esm/schema/collections_payment_promise.schema.js +40 -0
  61. package/esm/schema/comment.schema.js +2 -0
  62. package/esm/schema/coupon.schema.js +1 -1
  63. package/esm/schema/credit_note.schema.js +11 -4
  64. package/esm/schema/credit_unit.schema.js +2 -2
  65. package/esm/schema/customer.schema.js +81 -10
  66. package/esm/schema/dispute.schema.js +101 -0
  67. package/esm/schema/einvoice.schema.js +34 -0
  68. package/esm/schema/email_log.schema.js +25 -0
  69. package/esm/schema/entitlement.schema.js +4 -4
  70. package/esm/schema/estimate.schema.js +39 -10
  71. package/esm/schema/event.schema.js +156 -0
  72. package/esm/schema/export.schema.js +75 -19
  73. package/esm/schema/feature.schema.js +2 -2
  74. package/esm/schema/gift.schema.js +26 -0
  75. package/esm/schema/hosted_page.schema.js +26 -6
  76. package/esm/schema/index.js +9 -0
  77. package/esm/schema/invoice.schema.js +97 -13
  78. package/esm/schema/item.schema.js +1 -1
  79. package/esm/schema/item_family.schema.js +1 -1
  80. package/esm/schema/item_price.schema.js +1 -1
  81. package/esm/schema/ledger_account_balance.schema.js +10 -1
  82. package/esm/schema/ledger_operation.schema.js +6 -2
  83. package/esm/schema/meter.schema.js +1 -1
  84. package/esm/schema/metered_feature.schema.js +1 -1
  85. package/esm/schema/omnichannel_one_time_order.schema.js +12 -4
  86. package/esm/schema/omnichannel_subscription.schema.js +16 -8
  87. package/esm/schema/payment_intent.schema.js +27 -0
  88. package/esm/schema/payment_schedule.schema.js +33 -0
  89. package/esm/schema/payment_schedule_scheme.schema.js +22 -1
  90. package/esm/schema/payment_source.schema.js +118 -1
  91. package/esm/schema/price_ramp.schema.js +85 -0
  92. package/esm/schema/price_variant.schema.js +1 -1
  93. package/esm/schema/pricing_page_session.schema.js +1 -0
  94. package/esm/schema/promotional_grant.schema.js +2 -0
  95. package/esm/schema/purchase.schema.js +20 -1
  96. package/esm/schema/quote.schema.js +6 -6
  97. package/esm/schema/ramp.schema.js +18 -6
  98. package/esm/schema/retry_segment.schema.js +9 -0
  99. package/esm/schema/subscription.schema.js +179 -16
  100. package/esm/schema/transaction.schema.js +60 -2
  101. package/esm/schema/usage.schema.js +5 -0
  102. package/esm/schema/usage_summary.schema.js +1 -0
  103. package/esm/schema/webhook_endpoint.schema.js +72 -0
  104. package/package.json +1 -1
  105. package/types/core.d.ts +135 -72
  106. package/types/index.d.ts +36 -0
  107. package/types/resources/AppliedRule.d.ts +14 -0
  108. package/types/resources/ApplyRule.d.ts +28 -0
  109. package/types/resources/BusinessEntity.d.ts +52 -0
  110. package/types/resources/BusinessRule.d.ts +161 -0
  111. package/types/resources/BusinessRuleset.d.ts +165 -0
  112. package/types/resources/BusinessRulesetRule.d.ts +9 -0
  113. package/types/resources/Card.d.ts +1 -1
  114. package/types/resources/Citation.d.ts +13 -0
  115. package/types/resources/CollectionsDispute.d.ts +24 -0
  116. package/types/resources/CollectionsPaymentPromise.d.ts +93 -0
  117. package/types/resources/CollectionsReminderSequence.d.ts +35 -0
  118. package/types/resources/Comment.d.ts +2 -1
  119. package/types/resources/Content.d.ts +26 -0
  120. package/types/resources/CreditNote.d.ts +13 -0
  121. package/types/resources/CustomData.d.ts +14 -0
  122. package/types/resources/CustomDataSchema.d.ts +15 -0
  123. package/types/resources/Customer.d.ts +42 -5
  124. package/types/resources/Dispute.d.ts +65 -0
  125. package/types/resources/DraftEstimate.d.ts +13 -0
  126. package/types/resources/DraftRequest.d.ts +45 -0
  127. package/types/resources/Einvoice.d.ts +64 -1
  128. package/types/resources/EmailAttachment.d.ts +16 -0
  129. package/types/resources/EmailConversation.d.ts +18 -0
  130. package/types/resources/EmailLog.d.ts +46 -0
  131. package/types/resources/EmailMessage.d.ts +40 -0
  132. package/types/resources/Estimate.d.ts +31 -2
  133. package/types/resources/Event.d.ts +37 -0
  134. package/types/resources/Execution.d.ts +12 -0
  135. package/types/resources/GatewayPaymentMethodToken.d.ts +2 -2
  136. package/types/resources/Gift.d.ts +28 -2
  137. package/types/resources/GrantBlock.d.ts +26 -7
  138. package/types/resources/GroupByAttribute.d.ts +15 -0
  139. package/types/resources/GroupByRecommendation.d.ts +10 -0
  140. package/types/resources/HostedPage.d.ts +11 -0
  141. package/types/resources/Invoice.d.ts +57 -4
  142. package/types/resources/ItemPrice.d.ts +1 -0
  143. package/types/resources/LedgerAccountBalance.d.ts +19 -0
  144. package/types/resources/LedgerEntry.d.ts +4 -4
  145. package/types/resources/LedgerOperation.d.ts +15 -8
  146. package/types/resources/Meter.d.ts +1 -0
  147. package/types/resources/MeteredFeature.d.ts +1 -0
  148. package/types/resources/OmnichannelOneTimeOrder.d.ts +5 -1
  149. package/types/resources/OmnichannelSubscription.d.ts +6 -1
  150. package/types/resources/OmnichannelSubscriptionItem.d.ts +9 -2
  151. package/types/resources/PaymentIntent.d.ts +72 -5
  152. package/types/resources/PaymentSchedule.d.ts +39 -2
  153. package/types/resources/PaymentScheduleEstimate.d.ts +2 -1
  154. package/types/resources/PaymentScheduleScheme.d.ts +17 -1
  155. package/types/resources/PaymentSource.d.ts +50 -2
  156. package/types/resources/PreferenceVariant.d.ts +10 -0
  157. package/types/resources/PriceRamp.d.ts +113 -0
  158. package/types/resources/PricingPageSession.d.ts +1 -0
  159. package/types/resources/PrivateNote.d.ts +18 -0
  160. package/types/resources/PromotionalGrant.d.ts +2 -0
  161. package/types/resources/Purchase.d.ts +20 -1
  162. package/types/resources/QuotedSubscription.d.ts +1 -0
  163. package/types/resources/Ramp.d.ts +18 -0
  164. package/types/resources/RampInterval.d.ts +12 -0
  165. package/types/resources/RecordedPurchase.d.ts +5 -1
  166. package/types/resources/RetrySegment.d.ts +36 -0
  167. package/types/resources/Subscription.d.ts +110 -11
  168. package/types/resources/ThirdPartyPaymentMethod.d.ts +1 -0
  169. package/types/resources/Transaction.d.ts +9 -0
  170. package/types/resources/Usage.d.ts +6 -0
  171. package/types/resources/UsageSummary.d.ts +2 -0
  172. package/types/resources/WebhookEvent.d.ts +214 -0
@@ -20,6 +20,7 @@ declare module 'chargebee' {
20
20
  webhook_failure_reason?: string;
21
21
  webhooks?: Event.Webhook[];
22
22
  event_type?: EventTypeEnum;
23
+ site_id?: string;
23
24
  api_version?: ApiVersionEnum;
24
25
  content: SubscriptionPauseScheduledContent &
25
26
  CustomerBusinessEntityChangedContent &
@@ -29,12 +30,15 @@ declare module 'chargebee' {
29
30
  UnbilledChargesDeletedContent &
30
31
  CouponUpdatedContent &
31
32
  GrantBlocksCreatedContent &
33
+ ChargebackLostContent &
34
+ PriceRampUpdatedContent &
32
35
  OmnichannelSubscriptionItemReactivatedContent &
33
36
  OmnichannelSubscriptionItemRenewedContent &
34
37
  UnbilledChargesCreatedContent &
35
38
  SubscriptionResumedContent &
36
39
  OmnichannelOneTimeOrderItemCancelledContent &
37
40
  SubscriptionCancelledContent &
41
+ BusinessRuleDeletedContent &
38
42
  ItemEntitlementsRemovedContent &
39
43
  BusinessEntityCreatedContent &
40
44
  CouponSetUpdatedContent &
@@ -71,15 +75,20 @@ declare module 'chargebee' {
71
75
  ContractTermTerminatedContent &
72
76
  ItemFamilyUpdatedContent &
73
77
  OrderCreatedContent &
78
+ RefundFailedContent &
74
79
  PriceVariantDeletedContent &
75
80
  AlertStatusChangedContent &
76
81
  SubscriptionMovementFailedContent &
82
+ BusinessRulesetUpdatedContent &
77
83
  CustomerMovedInContent &
78
84
  SubscriptionAdvanceInvoiceScheduleUpdatedContent &
79
85
  ItemDeletedContent &
80
86
  SubscriptionRampDraftedContent &
87
+ ChargebackInitiatedContent &
88
+ BusinessRuleCreatedContent &
81
89
  VaultTokenUpdatedContent &
82
90
  DunningUpdatedContent &
91
+ EinvoiceCreatedContent &
83
92
  OmnichannelSubscriptionItemRecoveredContent &
84
93
  ItemEntitlementsUpdatedContent &
85
94
  TokenConsumedContent &
@@ -88,10 +97,12 @@ declare module 'chargebee' {
88
97
  SubscriptionCancellationScheduledContent &
89
98
  SubscriptionRenewedContent &
90
99
  FeatureUpdatedContent &
100
+ CollectionsPaymentPromiseFulfilledContent &
91
101
  FeatureDeletedContent &
92
102
  ItemFamilyCreatedContent &
93
103
  OmnichannelSubscriptionItemScheduledChangeRemovedContent &
94
104
  OmnichannelSubscriptionItemResumedContent &
105
+ CollectionsDisputeResolvedContent &
95
106
  PurchaseCreatedContent &
96
107
  EntitlementOverridesUpdatedContent &
97
108
  ItemFamilyDeletedContent &
@@ -101,9 +112,12 @@ declare module 'chargebee' {
101
112
  CardExpiredContent &
102
113
  CreditNoteUpdatedContent &
103
114
  OmnichannelSubscriptionItemDowngradedContent &
115
+ BusinessRulesetDeactivatedContent &
104
116
  PriceVariantUpdatedContent &
117
+ CollectionsDisputeUpdatedContent &
105
118
  PromotionalCreditsDeductedContent &
106
119
  SubscriptionRampAppliedContent &
120
+ BusinessRulesetDeletedContent &
107
121
  SubscriptionPausedContent &
108
122
  OrderReadyToProcessContent &
109
123
  FeatureCreatedContent &
@@ -112,9 +126,12 @@ declare module 'chargebee' {
112
126
  OmnichannelSubscriptionItemResubscribedContent &
113
127
  RecordPurchaseFailedContent &
114
128
  ItemCreatedContent &
129
+ BusinessRulesetCreatedContent &
115
130
  TransactionUpdatedContent &
131
+ CollectionsPaymentPromiseUpdatedContent &
116
132
  MrrUpdatedContent &
117
133
  UnbilledChargesInvoicedContent &
134
+ ChargebackWonContent &
118
135
  ItemPriceUpdatedContent &
119
136
  CouponCodesUpdatedContent &
120
137
  VirtualBankAccountUpdatedContent &
@@ -127,6 +144,8 @@ declare module 'chargebee' {
127
144
  PaymentSchedulesUpdatedContent &
128
145
  OmnichannelSubscriptionItemExpiredContent &
129
146
  CardUpdatedContent &
147
+ PriceRampCreatedContent &
148
+ CollectionsReminderSequenceCreatedContent &
130
149
  CustomerCreatedContent &
131
150
  SubscriptionRenewalReminderContent &
132
151
  OmnichannelSubscriptionItemMrrUpdatedContent &
@@ -135,19 +154,25 @@ declare module 'chargebee' {
135
154
  OmnichannelSubscriptionItemCancellationScheduledContent &
136
155
  OmnichannelSubscriptionItemGracePeriodExpiredContent &
137
156
  CouponCodesAddedContent &
157
+ EmailMessageReceivedContent &
138
158
  GiftCancelledContent &
139
159
  OrderCancelledContent &
140
160
  CouponDeletedContent &
141
161
  SubscriptionScheduledChangesRemovedContent &
142
162
  PendingInvoiceCreatedContent &
163
+ CollectionsPaymentPromiseBrokenContent &
143
164
  EntitlementOverridesAutoRemovedContent &
165
+ PriceRampDeletedContent &
166
+ BusinessRulesetActivatedContent &
144
167
  OmnichannelSubscriptionItemUpgradedContent &
145
168
  SubscriptionBusinessEntityChangedContent &
146
169
  OmnichannelOneTimeOrderCreatedContent &
170
+ CollectionsPaymentPromiseCreatedContent &
147
171
  PaymentSourceDeletedContent &
148
172
  OmnichannelSubscriptionItemCancelledContent &
149
173
  QuoteDeletedContent &
150
174
  InvoiceUpdatedContent &
175
+ PrivateNoteAddedContent &
151
176
  SubscriptionAdvanceInvoiceScheduleRemovedContent &
152
177
  CardDeletedContent &
153
178
  OrderReadyToShipContent &
@@ -163,6 +188,7 @@ declare module 'chargebee' {
163
188
  CardAddedContent &
164
189
  CouponCreatedContent &
165
190
  RuleDeletedContent &
191
+ CollectionsDisputeCreatedContent &
166
192
  ItemPriceEntitlementsUpdatedContent &
167
193
  ItemPriceDeletedContent &
168
194
  VirtualBankAccountDeletedContent &
@@ -174,6 +200,7 @@ declare module 'chargebee' {
174
200
  PaymentSourceAddedContent &
175
201
  SubscriptionMovedInContent &
176
202
  LedgerUpdatedContent &
203
+ CollectionsPaymentPromiseCancelledContent &
177
204
  ItemPriceCreatedContent &
178
205
  SubscriptionScheduledCancellationRemovedContent &
179
206
  PaymentRefundedContent &
@@ -194,6 +221,7 @@ declare module 'chargebee' {
194
221
  PaymentSourceExpiringContent &
195
222
  SubscriptionReactivatedContent &
196
223
  OrderUpdatedContent &
224
+ CollectionsDisputeWithdrawnContent &
197
225
  SubscriptionScheduledPauseRemovedContent &
198
226
  SubscriptionCancellationReminderContent &
199
227
  SubscriptionCreatedWithBackdatingContent &
@@ -205,20 +233,25 @@ declare module 'chargebee' {
205
233
  OmnichannelSubscriptionItemGracePeriodStartedContent &
206
234
  CardExpiryReminderContent &
207
235
  TokenCreatedContent &
236
+ CollectionsReminderSequencePausedContent &
208
237
  PaymentSourceBusinessEntityChangedContent &
209
238
  PromotionalCreditsAddedContent &
210
239
  SubscriptionRampUpdatedContent &
240
+ BusinessRuleDeactivatedContent &
211
241
  LedgerAccountBalanceUpdatedContent &
212
242
  VaultTokenCreatedContent &
243
+ EinvoiceUpdatedContent &
213
244
  CustomerEntitlementsUpdatedContent &
214
245
  PaymentSourceExpiredContent &
215
246
  CustomerMovedOutContent &
247
+ BusinessRuleReleasedContent &
216
248
  SubscriptionEntitlementsUpdatedContent &
217
249
  OmnichannelSubscriptionItemDunningExpiredContent &
218
250
  HierarchyCreatedContent &
219
251
  AttachedItemDeletedContent &
220
252
  OmnichannelSubscriptionItemScheduledCancellationRemovedContent &
221
253
  ItemUpdatedContent &
254
+ CollectionsReminderSequenceResumedContent &
222
255
  CouponSetCreatedContent &
223
256
  PaymentIntentUpdatedContent &
224
257
  OrderResentContent &
@@ -226,11 +259,14 @@ declare module 'chargebee' {
226
259
  TaxWithheldRecordedContent &
227
260
  PriceVariantCreatedContent &
228
261
  DifferentialPriceDeletedContent &
262
+ BusinessRuleActivatedContent &
229
263
  SubscriptionItemsRenewedContent &
264
+ PaymentSchedulesCancelledContent &
230
265
  RuleCreatedContent &
231
266
  ContractTermCancelledContent &
232
267
  ContractTermRenewedContent &
233
268
  InvoiceDeletedContent &
269
+ BusinessRuleUpdatedContent &
234
270
  ItemPriceEntitlementsRemovedContent &
235
271
  SalesOrderUpdatedContent &
236
272
  OmnichannelSubscriptionItemDunningStartedContent &
@@ -242,6 +278,7 @@ declare module 'chargebee' {
242
278
  BusinessEntityDeletedContent &
243
279
  GrantBlocksUpdatedContent &
244
280
  AuthorizationVoidedContent &
281
+ CollectionsReminderSequenceCompletedContent &
245
282
  SubscriptionRampDeletedContent &
246
283
  PlanDeletedContent &
247
284
  AddonDeletedContent &
@@ -0,0 +1,12 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
3
+
4
+ declare module 'chargebee' {
5
+ export interface Execution {
6
+ status: 'success' | 'failed';
7
+ created_at: number;
8
+ result?: any;
9
+ error_detail?: any;
10
+ revision_version?: number;
11
+ }
12
+ }
@@ -5,10 +5,10 @@ declare module 'chargebee' {
5
5
  export interface GatewayPaymentMethodToken {
6
6
  id: string;
7
7
  gateway_account_id: string;
8
- gateway_name: GatewayNameEnum;
8
+ gateway: GatewayEnum;
9
9
  gateway_customer_id?: string;
10
10
  gateway_token: string;
11
- status: 'active' | 'inactive' | 'pending_verification';
11
+ status: 'valid' | 'invalid' | 'pending_verification';
12
12
  created_at: number;
13
13
  updated_at?: number;
14
14
  }
@@ -235,7 +235,20 @@ declare module 'chargebee' {
235
235
  | 'dana'
236
236
  | 'touch_n_go'
237
237
  | 'tamara'
238
- | 'qpay';
238
+ | 'qpay'
239
+ | 'ovo'
240
+ | 'momo'
241
+ | 'mercado_pago'
242
+ | 'nequi'
243
+ | 'nupay'
244
+ | 'picpay'
245
+ | 'thai_qr'
246
+ | 'blik'
247
+ | 'fpx'
248
+ | 'wero'
249
+ | 'p24'
250
+ | 'affirm_pay'
251
+ | 'rakuten_pay';
239
252
  reference_id?: string;
240
253
  /**
241
254
  * @deprecated Please refer API docs to use other attributes
@@ -338,7 +351,20 @@ declare module 'chargebee' {
338
351
  | 'dana'
339
352
  | 'touch_n_go'
340
353
  | 'tamara'
341
- | 'qpay';
354
+ | 'qpay'
355
+ | 'ovo'
356
+ | 'momo'
357
+ | 'mercado_pago'
358
+ | 'nequi'
359
+ | 'nupay'
360
+ | 'picpay'
361
+ | 'thai_qr'
362
+ | 'blik'
363
+ | 'fpx'
364
+ | 'wero'
365
+ | 'p24'
366
+ | 'affirm_pay'
367
+ | 'rakuten_pay';
342
368
  reference_id?: string;
343
369
  /**
344
370
  * @deprecated Please refer API docs to use other attributes
@@ -4,19 +4,19 @@
4
4
  declare module 'chargebee' {
5
5
  export interface GrantBlock {
6
6
  id: string;
7
- subscription_id?: string;
8
- account_type?: 'provisioned' | 'overdraft';
9
- unit_id?: string;
10
- unit_type?: 'credit_unit';
7
+ subscription_id: string;
8
+ unit_id: string;
9
+ unit_type: 'credit_unit';
10
+ account_type: 'provisioned' | 'overdraft';
11
11
  granted_amount: string;
12
12
  effective_from: number;
13
13
  expires_at: number;
14
14
  balance: string;
15
15
  hold_amount: string;
16
16
  used_amount: string;
17
- expired_amount: string;
18
- rolled_over_amount: string;
19
- voided_amount: string;
17
+ expired_amount?: string;
18
+ rolled_over_amount?: string;
19
+ voided_amount?: string;
20
20
  origin_grant_block_id?: string;
21
21
  status: StatusEnum;
22
22
  grant_source:
@@ -30,6 +30,8 @@ declare module 'chargebee' {
30
30
  created_at: number;
31
31
  modified_at: number;
32
32
  resource_version?: number;
33
+ provisioned_block_balance?: GrantBlock.ProvisionedBlockBalance;
34
+ overdraft_block_balance?: GrantBlock.OverdraftBlockBalance;
33
35
  metadata?: any;
34
36
  }
35
37
 
@@ -46,6 +48,23 @@ declare module 'chargebee' {
46
48
  next_offset?: string;
47
49
  }
48
50
 
51
+ export interface ProvisionedBlockBalance {
52
+ granted_amount?: string;
53
+ total_balance?: string;
54
+ usable_balance?: string;
55
+ hold_amount?: string;
56
+ used_amount?: string;
57
+ expired_amount?: string;
58
+ rolled_over_amount?: string;
59
+ voided_amount?: string;
60
+ }
61
+ export interface OverdraftBlockBalance {
62
+ is_unlimited: boolean;
63
+ limit?: string;
64
+ total_balance?: string;
65
+ usable_balance?: string;
66
+ used_amount?: string;
67
+ }
49
68
  // REQUEST PARAMS
50
69
  //---------------
51
70
 
@@ -0,0 +1,15 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
3
+
4
+ declare module 'chargebee' {
5
+ export interface GroupByAttribute {
6
+ attribute_name: string;
7
+ rank: number;
8
+ coverage_percent: number;
9
+ cardinality: number;
10
+ remaining_value_count: number;
11
+ warning: boolean;
12
+ sample_values?: string[];
13
+ warning_reasons?: WarningReasonEnum[];
14
+ }
15
+ }
@@ -0,0 +1,10 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
3
+
4
+ declare module 'chargebee' {
5
+ export interface GroupByRecommendation {
6
+ attribute_name: string;
7
+ rank: number;
8
+ reason: string;
9
+ }
10
+ }
@@ -34,6 +34,7 @@ declare module 'chargebee' {
34
34
  resource_version?: number;
35
35
  checkout_info?: any;
36
36
  business_entity_id?: string;
37
+ brand_id?: string;
37
38
  }
38
39
 
39
40
  export namespace HostedPage {
@@ -293,6 +294,7 @@ declare module 'chargebee' {
293
294
  }
294
295
  export interface CheckoutOneTimeForItemsInputParam {
295
296
  business_entity_id?: string;
297
+ brand_id?: string;
296
298
  layout?: LayoutEnum;
297
299
  invoice_note?: string /**
298
300
  * @deprecated Please refer API docs to use other attributes
@@ -318,6 +320,7 @@ declare module 'chargebee' {
318
320
  export interface CheckoutNewForItemsInputParam {
319
321
  layout?: LayoutEnum;
320
322
  business_entity_id?: string;
323
+ brand_id?: string;
321
324
  billing_cycles?: number;
322
325
  mandatory_items_to_remove?: string[];
323
326
  terms_to_charge?: number;
@@ -365,6 +368,7 @@ declare module 'chargebee' {
365
368
  }
366
369
  export interface CheckoutExistingForItemsInputParam {
367
370
  layout?: LayoutEnum;
371
+ brand_id?: string;
368
372
  mandatory_items_to_remove?: string[];
369
373
  replace_items_list?: boolean;
370
374
  invoice_date?: number;
@@ -412,11 +416,13 @@ declare module 'chargebee' {
412
416
  }
413
417
  export interface ManagePaymentSourcesInputParam {
414
418
  business_entity_id?: string;
419
+ brand_id?: string;
415
420
  redirect_url?: string;
416
421
  customer?: CustomerManagePaymentSourcesInputParam;
417
422
  card?: CardManagePaymentSourcesInputParam;
418
423
  }
419
424
  export interface CollectNowInputParam {
425
+ brand_id?: string;
420
426
  redirect_url?: string;
421
427
  currency_code?: string;
422
428
  payment_method_save_policy?: PaymentMethodSavePolicyEnum;
@@ -424,11 +430,13 @@ declare module 'chargebee' {
424
430
  card?: CardCollectNowInputParam;
425
431
  }
426
432
  export interface AcceptQuoteInputParam {
433
+ brand_id?: string;
427
434
  redirect_url?: string;
428
435
  layout?: LayoutEnum;
429
436
  quote?: QuoteAcceptQuoteInputParam;
430
437
  }
431
438
  export interface ExtendSubscriptionInputParam {
439
+ brand_id?: string;
432
440
  expiry?: number;
433
441
  billing_cycle?: number;
434
442
  subscription?: SubscriptionExtendSubscriptionInputParam;
@@ -443,6 +451,7 @@ declare module 'chargebee' {
443
451
  export interface CheckoutGiftForItemsInputParam {
444
452
  layout?: LayoutEnum;
445
453
  business_entity_id?: string;
454
+ brand_id?: string;
446
455
  redirect_url?: string;
447
456
  coupon_ids?: string[];
448
457
  gifter?: GifterCheckoutGiftForItemsInputParam;
@@ -450,6 +459,7 @@ declare module 'chargebee' {
450
459
  item_tiers?: ItemTiersCheckoutGiftForItemsInputParam[];
451
460
  }
452
461
  export interface ClaimGiftInputParam {
462
+ brand_id?: string;
453
463
  redirect_url?: string;
454
464
  gift?: GiftClaimGiftInputParam;
455
465
  customer?: CustomerClaimGiftInputParam;
@@ -466,6 +476,7 @@ declare module 'chargebee' {
466
476
  updated_at?: filter.Timestamp;
467
477
  }
468
478
  export interface PreCancelInputParam {
479
+ brand_id?: string;
469
480
  pass_thru_content?: string;
470
481
  cancel_url?: string;
471
482
  redirect_url?: string;
@@ -64,6 +64,7 @@ declare module 'chargebee' {
64
64
  tax_origin?: Invoice.TaxOrigin;
65
65
  linked_payments?: Invoice.LinkedPayment[];
66
66
  reference_transactions?: Invoice.ReferenceTransaction[];
67
+ retry_segment_id?: string;
67
68
  dunning_attempts?: Invoice.DunningAttempt[];
68
69
  applied_credits?: Invoice.AppliedCredit[];
69
70
  adjustment_credit_notes?: Invoice.AdjustmentCreditNote[];
@@ -80,6 +81,7 @@ declare module 'chargebee' {
80
81
  vat_number_prefix?: string;
81
82
  channel?: ChannelEnum;
82
83
  business_entity_id?: string;
84
+ brand_id?: string;
83
85
  site_details_at_creation?: Invoice.SiteDetailsAtCreation;
84
86
  }
85
87
 
@@ -297,6 +299,11 @@ declare module 'chargebee' {
297
299
  headers?: ChargebeeRequestHeader,
298
300
  ): Promise<ChargebeeResponse<VoidBeforeCaptureResponse>>;
299
301
 
302
+ sendEmail(
303
+ invoice_id: string,
304
+ headers?: ChargebeeRequestHeader,
305
+ ): Promise<ChargebeeResponse<SendEmailResponse>>;
306
+
300
307
  delete(
301
308
  invoice_id: string,
302
309
  input?: DeleteInputParam,
@@ -315,6 +322,12 @@ declare module 'chargebee' {
315
322
  headers?: ChargebeeRequestHeader,
316
323
  ): Promise<ChargebeeResponse<ApplyPaymentScheduleSchemeResponse>>;
317
324
 
325
+ removePaymentScheduleScheme(
326
+ invoice_id: string,
327
+ input?: RemovePaymentScheduleSchemeInputParam,
328
+ headers?: ChargebeeRequestHeader,
329
+ ): Promise<ChargebeeResponse<RemovePaymentScheduleSchemeResponse>>;
330
+
318
331
  paymentSchedules(
319
332
  invoice_id: string,
320
333
  headers?: ChargebeeRequestHeader,
@@ -487,6 +500,10 @@ declare module 'chargebee' {
487
500
  credit_note?: CreditNote;
488
501
  }
489
502
 
503
+ export interface SendEmailResponse {
504
+ email_logs: EmailLog[];
505
+ }
506
+
490
507
  export interface DeleteResponse {
491
508
  invoice: Invoice;
492
509
  }
@@ -499,6 +516,10 @@ declare module 'chargebee' {
499
516
  invoice: Invoice;
500
517
  }
501
518
 
519
+ export interface RemovePaymentScheduleSchemeResponse {
520
+ invoice: Invoice;
521
+ }
522
+
502
523
  export interface PaymentSchedulesResponse {
503
524
  payment_schedules: PaymentSchedule[];
504
525
  }
@@ -1227,6 +1248,9 @@ declare module 'chargebee' {
1227
1248
  scheme_id: string;
1228
1249
  amount?: number;
1229
1250
  }
1251
+ export interface RemovePaymentScheduleSchemeInputParam {
1252
+ comment?: string;
1253
+ }
1230
1254
  export interface StatementDescriptorCreateInputParam {
1231
1255
  descriptor?: string;
1232
1256
  }
@@ -1333,7 +1357,20 @@ declare module 'chargebee' {
1333
1357
  | 'dana'
1334
1358
  | 'touch_n_go'
1335
1359
  | 'tamara'
1336
- | 'qpay';
1360
+ | 'qpay'
1361
+ | 'ovo'
1362
+ | 'momo'
1363
+ | 'mercado_pago'
1364
+ | 'nequi'
1365
+ | 'nupay'
1366
+ | 'picpay'
1367
+ | 'thai_qr'
1368
+ | 'blik'
1369
+ | 'fpx'
1370
+ | 'wero'
1371
+ | 'p24'
1372
+ | 'affirm_pay'
1373
+ | 'rakuten_pay';
1337
1374
  reference_id?: string;
1338
1375
  /**
1339
1376
  * @deprecated Please refer API docs to use other attributes
@@ -1357,7 +1394,7 @@ declare module 'chargebee' {
1357
1394
  expiry_month?: number;
1358
1395
  expiry_year?: number;
1359
1396
  cvv?: string;
1360
- preferred_scheme?: 'cartes_bancaires' | 'mastercard' | 'visa';
1397
+ preferred_scheme?: 'cartes_bancaires' | 'mastercard' | 'visa' | 'dankort';
1361
1398
  billing_addr1?: string;
1362
1399
  billing_addr2?: string;
1363
1400
  billing_city?: string;
@@ -1511,7 +1548,20 @@ declare module 'chargebee' {
1511
1548
  | 'dana'
1512
1549
  | 'touch_n_go'
1513
1550
  | 'tamara'
1514
- | 'qpay';
1551
+ | 'qpay'
1552
+ | 'ovo'
1553
+ | 'momo'
1554
+ | 'mercado_pago'
1555
+ | 'nequi'
1556
+ | 'nupay'
1557
+ | 'picpay'
1558
+ | 'thai_qr'
1559
+ | 'blik'
1560
+ | 'fpx'
1561
+ | 'wero'
1562
+ | 'p24'
1563
+ | 'affirm_pay'
1564
+ | 'rakuten_pay';
1515
1565
  reference_id?: string;
1516
1566
  /**
1517
1567
  * @deprecated Please refer API docs to use other attributes
@@ -1535,7 +1585,7 @@ declare module 'chargebee' {
1535
1585
  expiry_month?: number;
1536
1586
  expiry_year?: number;
1537
1587
  cvv?: string;
1538
- preferred_scheme?: 'cartes_bancaires' | 'mastercard' | 'visa';
1588
+ preferred_scheme?: 'cartes_bancaires' | 'mastercard' | 'visa' | 'dankort';
1539
1589
  billing_addr1?: string;
1540
1590
  billing_addr2?: string;
1541
1591
  billing_city?: string;
@@ -1790,6 +1840,9 @@ declare module 'chargebee' {
1790
1840
  tax9_amount?: number;
1791
1841
  tax10_name?: string;
1792
1842
  tax10_amount?: number;
1843
+ is_partial_tax_applied?: boolean;
1844
+ taxable_amount?: number;
1845
+ tax_exempt_reason?: TaxExemptReasonEnum;
1793
1846
  proration_mode?:
1794
1847
  | 'reset'
1795
1848
  | 'delta'
@@ -12,6 +12,7 @@ declare module 'chargebee' {
12
12
  status?: 'active' | 'archived' | 'deleted';
13
13
  external_name?: string;
14
14
  price_variant_id?: string;
15
+ price_ramp_id?: string;
15
16
  proration_type?: 'site_default' | 'partial_term' | 'full_term';
16
17
  pricing_model: PricingModelEnum;
17
18
  price?: number;
@@ -19,6 +19,11 @@ declare module 'chargebee' {
19
19
  input: ListLedgerAccountBalancesInputParam,
20
20
  headers?: ChargebeeRequestHeader,
21
21
  ): Promise<ChargebeeResponse<ListLedgerAccountBalancesResponse>>;
22
+
23
+ updateOverdraftLimit(
24
+ input: UpdateOverdraftLimitInputParam,
25
+ headers?: ChargebeeRequestHeader,
26
+ ): Promise<ChargebeeResponse<UpdateOverdraftLimitResponse>>;
22
27
  }
23
28
 
24
29
  export interface ListLedgerAccountBalancesResponse {
@@ -26,6 +31,13 @@ declare module 'chargebee' {
26
31
  next_offset?: string;
27
32
  }
28
33
 
34
+ export interface UpdateOverdraftLimitResponse {
35
+ subscription_id: string;
36
+ unit_id: string;
37
+ change_reason?: string;
38
+ overdraft_balance: object;
39
+ }
40
+
29
41
  export interface ProvisionedBalance {
30
42
  total_balance: string;
31
43
  usable_balance: string;
@@ -48,5 +60,12 @@ declare module 'chargebee' {
48
60
  subscription_id: filter.String;
49
61
  unit_id?: filter.String;
50
62
  }
63
+ export interface UpdateOverdraftLimitInputParam {
64
+ subscription_id: string;
65
+ unit_id: string;
66
+ is_unlimited: boolean;
67
+ limit?: string;
68
+ change_reason?: string;
69
+ }
51
70
  }
52
71
  }
@@ -4,10 +4,10 @@
4
4
  declare module 'chargebee' {
5
5
  export interface LedgerEntry {
6
6
  id: string;
7
- subscription_id?: string;
8
- account_type?: 'provisioned' | 'overdraft';
9
- unit_id?: string;
10
- unit_type?: 'credit_unit';
7
+ subscription_id: string;
8
+ unit_id: string;
9
+ unit_type: 'credit_unit';
10
+ account_type: 'provisioned' | 'overdraft';
11
11
  amount: string;
12
12
  grant_block_start_balance: string;
13
13
  grant_block_end_balance: string;