chargebee 3.34.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 (118) hide show
  1. package/CHANGELOG.md +172 -0
  2. package/cjs/environment.js +1 -1
  3. package/cjs/resources/api_endpoints.js +174 -2
  4. package/cjs/resources/webhook/eventType.js +23 -1
  5. package/cjs/schema/business_entity.schema.js +28 -2
  6. package/cjs/schema/collections_payment_promise.schema.js +43 -0
  7. package/cjs/schema/comment.schema.js +2 -0
  8. package/cjs/schema/coupon.schema.js +1 -1
  9. package/cjs/schema/credit_note.schema.js +1 -0
  10. package/cjs/schema/credit_unit.schema.js +2 -2
  11. package/cjs/schema/einvoice.schema.js +2 -2
  12. package/cjs/schema/entitlement.schema.js +4 -4
  13. package/cjs/schema/estimate.schema.js +4 -4
  14. package/cjs/schema/event.schema.js +104 -4
  15. package/cjs/schema/export.schema.js +7 -7
  16. package/cjs/schema/hosted_page.schema.js +2 -2
  17. package/cjs/schema/index.js +3 -0
  18. package/cjs/schema/invoice.schema.js +24 -4
  19. package/cjs/schema/item.schema.js +1 -1
  20. package/cjs/schema/item_family.schema.js +1 -1
  21. package/cjs/schema/item_price.schema.js +1 -1
  22. package/cjs/schema/ledger_account_balance.schema.js +11 -2
  23. package/cjs/schema/ledger_operation.schema.js +2 -2
  24. package/cjs/schema/omnichannel_one_time_order.schema.js +12 -4
  25. package/cjs/schema/omnichannel_subscription.schema.js +18 -10
  26. package/cjs/schema/payment_source.schema.js +15 -0
  27. package/cjs/schema/price_ramp.schema.js +88 -0
  28. package/cjs/schema/price_variant.schema.js +1 -1
  29. package/cjs/schema/purchase.schema.js +6 -0
  30. package/cjs/schema/quote.schema.js +6 -6
  31. package/cjs/schema/ramp.schema.js +10 -6
  32. package/cjs/schema/retry_segment.schema.js +12 -0
  33. package/cjs/schema/subscription.schema.js +4 -4
  34. package/cjs/schema/usage.schema.js +5 -0
  35. package/cjs/schema/usage_summary.schema.js +1 -0
  36. package/cjs/schema/webhook_endpoint.schema.js +46 -2
  37. package/esm/environment.js +1 -1
  38. package/esm/resources/api_endpoints.js +174 -2
  39. package/esm/resources/webhook/eventType.js +23 -1
  40. package/esm/schema/business_entity.schema.js +27 -1
  41. package/esm/schema/collections_payment_promise.schema.js +40 -0
  42. package/esm/schema/comment.schema.js +2 -0
  43. package/esm/schema/coupon.schema.js +1 -1
  44. package/esm/schema/credit_note.schema.js +1 -0
  45. package/esm/schema/credit_unit.schema.js +2 -2
  46. package/esm/schema/einvoice.schema.js +2 -2
  47. package/esm/schema/entitlement.schema.js +4 -4
  48. package/esm/schema/estimate.schema.js +4 -4
  49. package/esm/schema/event.schema.js +104 -4
  50. package/esm/schema/export.schema.js +7 -7
  51. package/esm/schema/hosted_page.schema.js +2 -2
  52. package/esm/schema/index.js +3 -0
  53. package/esm/schema/invoice.schema.js +23 -3
  54. package/esm/schema/item.schema.js +1 -1
  55. package/esm/schema/item_family.schema.js +1 -1
  56. package/esm/schema/item_price.schema.js +1 -1
  57. package/esm/schema/ledger_account_balance.schema.js +10 -1
  58. package/esm/schema/ledger_operation.schema.js +2 -2
  59. package/esm/schema/omnichannel_one_time_order.schema.js +12 -4
  60. package/esm/schema/omnichannel_subscription.schema.js +18 -10
  61. package/esm/schema/payment_source.schema.js +15 -0
  62. package/esm/schema/price_ramp.schema.js +85 -0
  63. package/esm/schema/price_variant.schema.js +1 -1
  64. package/esm/schema/purchase.schema.js +6 -0
  65. package/esm/schema/quote.schema.js +6 -6
  66. package/esm/schema/ramp.schema.js +10 -6
  67. package/esm/schema/retry_segment.schema.js +9 -0
  68. package/esm/schema/subscription.schema.js +4 -4
  69. package/esm/schema/usage.schema.js +5 -0
  70. package/esm/schema/usage_summary.schema.js +1 -0
  71. package/esm/schema/webhook_endpoint.schema.js +46 -2
  72. package/package.json +1 -1
  73. package/types/core.d.ts +53 -68
  74. package/types/index.d.ts +22 -1
  75. package/types/resources/BusinessEntity.d.ts +52 -0
  76. package/types/resources/Citation.d.ts +13 -0
  77. package/types/resources/CollectionsDispute.d.ts +24 -0
  78. package/types/resources/CollectionsPaymentPromise.d.ts +93 -0
  79. package/types/resources/CollectionsReminderSequence.d.ts +35 -0
  80. package/types/resources/Comment.d.ts +2 -1
  81. package/types/resources/Content.d.ts +18 -1
  82. package/types/resources/CreditNote.d.ts +1 -0
  83. package/types/resources/CustomData.d.ts +14 -0
  84. package/types/resources/DraftEstimate.d.ts +13 -0
  85. package/types/resources/DraftRequest.d.ts +45 -0
  86. package/types/resources/EmailAttachment.d.ts +16 -0
  87. package/types/resources/EmailConversation.d.ts +18 -0
  88. package/types/resources/EmailLog.d.ts +1 -0
  89. package/types/resources/EmailMessage.d.ts +40 -0
  90. package/types/resources/Event.d.ts +23 -1
  91. package/types/resources/Execution.d.ts +12 -0
  92. package/types/resources/GatewayPaymentMethodToken.d.ts +2 -2
  93. package/types/resources/GroupByAttribute.d.ts +15 -0
  94. package/types/resources/GroupByRecommendation.d.ts +10 -0
  95. package/types/resources/Invoice.d.ts +15 -0
  96. package/types/resources/ItemPrice.d.ts +1 -0
  97. package/types/resources/LedgerAccountBalance.d.ts +19 -0
  98. package/types/resources/Meter.d.ts +1 -0
  99. package/types/resources/MeteredFeature.d.ts +1 -0
  100. package/types/resources/OmnichannelOneTimeOrder.d.ts +5 -1
  101. package/types/resources/OmnichannelSubscription.d.ts +6 -1
  102. package/types/resources/OmnichannelSubscriptionItem.d.ts +4 -1
  103. package/types/resources/PaymentSchedule.d.ts +1 -1
  104. package/types/resources/PaymentScheduleEstimate.d.ts +1 -1
  105. package/types/resources/PaymentSource.d.ts +19 -0
  106. package/types/resources/PreferenceVariant.d.ts +10 -0
  107. package/types/resources/PriceRamp.d.ts +113 -0
  108. package/types/resources/PrivateNote.d.ts +18 -0
  109. package/types/resources/Purchase.d.ts +6 -0
  110. package/types/resources/Ramp.d.ts +6 -0
  111. package/types/resources/RampInterval.d.ts +12 -0
  112. package/types/resources/RecordedPurchase.d.ts +5 -1
  113. package/types/resources/RetrySegment.d.ts +36 -0
  114. package/types/resources/Transaction.d.ts +4 -0
  115. package/types/resources/Usage.d.ts +6 -0
  116. package/types/resources/UsageSummary.d.ts +2 -0
  117. package/types/resources/WebhookEvent.d.ts +149 -5
  118. package/types/resources/AppliedBusinessRule.d.ts +0 -15
@@ -30,6 +30,8 @@ declare module 'chargebee' {
30
30
  UnbilledChargesDeletedContent &
31
31
  CouponUpdatedContent &
32
32
  GrantBlocksCreatedContent &
33
+ ChargebackLostContent &
34
+ PriceRampUpdatedContent &
33
35
  OmnichannelSubscriptionItemReactivatedContent &
34
36
  OmnichannelSubscriptionItemRenewedContent &
35
37
  UnbilledChargesCreatedContent &
@@ -48,7 +50,6 @@ declare module 'chargebee' {
48
50
  SubscriptionShippingAddressUpdatedContent &
49
51
  VoucherCreateFailedContent &
50
52
  GiftClaimedContent &
51
- BusinessRulesAppliedContent &
52
53
  CustomerDeletedContent &
53
54
  RefundInitiatedContent &
54
55
  InvoiceGeneratedWithBackdatingContent &
@@ -74,6 +75,7 @@ declare module 'chargebee' {
74
75
  ContractTermTerminatedContent &
75
76
  ItemFamilyUpdatedContent &
76
77
  OrderCreatedContent &
78
+ RefundFailedContent &
77
79
  PriceVariantDeletedContent &
78
80
  AlertStatusChangedContent &
79
81
  SubscriptionMovementFailedContent &
@@ -82,6 +84,7 @@ declare module 'chargebee' {
82
84
  SubscriptionAdvanceInvoiceScheduleUpdatedContent &
83
85
  ItemDeletedContent &
84
86
  SubscriptionRampDraftedContent &
87
+ ChargebackInitiatedContent &
85
88
  BusinessRuleCreatedContent &
86
89
  VaultTokenUpdatedContent &
87
90
  DunningUpdatedContent &
@@ -94,10 +97,12 @@ declare module 'chargebee' {
94
97
  SubscriptionCancellationScheduledContent &
95
98
  SubscriptionRenewedContent &
96
99
  FeatureUpdatedContent &
100
+ CollectionsPaymentPromiseFulfilledContent &
97
101
  FeatureDeletedContent &
98
102
  ItemFamilyCreatedContent &
99
103
  OmnichannelSubscriptionItemScheduledChangeRemovedContent &
100
104
  OmnichannelSubscriptionItemResumedContent &
105
+ CollectionsDisputeResolvedContent &
101
106
  PurchaseCreatedContent &
102
107
  EntitlementOverridesUpdatedContent &
103
108
  ItemFamilyDeletedContent &
@@ -109,6 +114,7 @@ declare module 'chargebee' {
109
114
  OmnichannelSubscriptionItemDowngradedContent &
110
115
  BusinessRulesetDeactivatedContent &
111
116
  PriceVariantUpdatedContent &
117
+ CollectionsDisputeUpdatedContent &
112
118
  PromotionalCreditsDeductedContent &
113
119
  SubscriptionRampAppliedContent &
114
120
  BusinessRulesetDeletedContent &
@@ -122,8 +128,10 @@ declare module 'chargebee' {
122
128
  ItemCreatedContent &
123
129
  BusinessRulesetCreatedContent &
124
130
  TransactionUpdatedContent &
131
+ CollectionsPaymentPromiseUpdatedContent &
125
132
  MrrUpdatedContent &
126
133
  UnbilledChargesInvoicedContent &
134
+ ChargebackWonContent &
127
135
  ItemPriceUpdatedContent &
128
136
  CouponCodesUpdatedContent &
129
137
  VirtualBankAccountUpdatedContent &
@@ -136,6 +144,8 @@ declare module 'chargebee' {
136
144
  PaymentSchedulesUpdatedContent &
137
145
  OmnichannelSubscriptionItemExpiredContent &
138
146
  CardUpdatedContent &
147
+ PriceRampCreatedContent &
148
+ CollectionsReminderSequenceCreatedContent &
139
149
  CustomerCreatedContent &
140
150
  SubscriptionRenewalReminderContent &
141
151
  OmnichannelSubscriptionItemMrrUpdatedContent &
@@ -144,20 +154,25 @@ declare module 'chargebee' {
144
154
  OmnichannelSubscriptionItemCancellationScheduledContent &
145
155
  OmnichannelSubscriptionItemGracePeriodExpiredContent &
146
156
  CouponCodesAddedContent &
157
+ EmailMessageReceivedContent &
147
158
  GiftCancelledContent &
148
159
  OrderCancelledContent &
149
160
  CouponDeletedContent &
150
161
  SubscriptionScheduledChangesRemovedContent &
151
162
  PendingInvoiceCreatedContent &
163
+ CollectionsPaymentPromiseBrokenContent &
152
164
  EntitlementOverridesAutoRemovedContent &
165
+ PriceRampDeletedContent &
153
166
  BusinessRulesetActivatedContent &
154
167
  OmnichannelSubscriptionItemUpgradedContent &
155
168
  SubscriptionBusinessEntityChangedContent &
156
169
  OmnichannelOneTimeOrderCreatedContent &
170
+ CollectionsPaymentPromiseCreatedContent &
157
171
  PaymentSourceDeletedContent &
158
172
  OmnichannelSubscriptionItemCancelledContent &
159
173
  QuoteDeletedContent &
160
174
  InvoiceUpdatedContent &
175
+ PrivateNoteAddedContent &
161
176
  SubscriptionAdvanceInvoiceScheduleRemovedContent &
162
177
  CardDeletedContent &
163
178
  OrderReadyToShipContent &
@@ -173,6 +188,7 @@ declare module 'chargebee' {
173
188
  CardAddedContent &
174
189
  CouponCreatedContent &
175
190
  RuleDeletedContent &
191
+ CollectionsDisputeCreatedContent &
176
192
  ItemPriceEntitlementsUpdatedContent &
177
193
  ItemPriceDeletedContent &
178
194
  VirtualBankAccountDeletedContent &
@@ -184,6 +200,7 @@ declare module 'chargebee' {
184
200
  PaymentSourceAddedContent &
185
201
  SubscriptionMovedInContent &
186
202
  LedgerUpdatedContent &
203
+ CollectionsPaymentPromiseCancelledContent &
187
204
  ItemPriceCreatedContent &
188
205
  SubscriptionScheduledCancellationRemovedContent &
189
206
  PaymentRefundedContent &
@@ -204,6 +221,7 @@ declare module 'chargebee' {
204
221
  PaymentSourceExpiringContent &
205
222
  SubscriptionReactivatedContent &
206
223
  OrderUpdatedContent &
224
+ CollectionsDisputeWithdrawnContent &
207
225
  SubscriptionScheduledPauseRemovedContent &
208
226
  SubscriptionCancellationReminderContent &
209
227
  SubscriptionCreatedWithBackdatingContent &
@@ -215,6 +233,7 @@ declare module 'chargebee' {
215
233
  OmnichannelSubscriptionItemGracePeriodStartedContent &
216
234
  CardExpiryReminderContent &
217
235
  TokenCreatedContent &
236
+ CollectionsReminderSequencePausedContent &
218
237
  PaymentSourceBusinessEntityChangedContent &
219
238
  PromotionalCreditsAddedContent &
220
239
  SubscriptionRampUpdatedContent &
@@ -232,6 +251,7 @@ declare module 'chargebee' {
232
251
  AttachedItemDeletedContent &
233
252
  OmnichannelSubscriptionItemScheduledCancellationRemovedContent &
234
253
  ItemUpdatedContent &
254
+ CollectionsReminderSequenceResumedContent &
235
255
  CouponSetCreatedContent &
236
256
  PaymentIntentUpdatedContent &
237
257
  OrderResentContent &
@@ -241,6 +261,7 @@ declare module 'chargebee' {
241
261
  DifferentialPriceDeletedContent &
242
262
  BusinessRuleActivatedContent &
243
263
  SubscriptionItemsRenewedContent &
264
+ PaymentSchedulesCancelledContent &
244
265
  RuleCreatedContent &
245
266
  ContractTermCancelledContent &
246
267
  ContractTermRenewedContent &
@@ -257,6 +278,7 @@ declare module 'chargebee' {
257
278
  BusinessEntityDeletedContent &
258
279
  GrantBlocksUpdatedContent &
259
280
  AuthorizationVoidedContent &
281
+ CollectionsReminderSequenceCompletedContent &
260
282
  SubscriptionRampDeletedContent &
261
283
  PlanDeletedContent &
262
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
  }
@@ -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
+ }
@@ -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[];
@@ -321,6 +322,12 @@ declare module 'chargebee' {
321
322
  headers?: ChargebeeRequestHeader,
322
323
  ): Promise<ChargebeeResponse<ApplyPaymentScheduleSchemeResponse>>;
323
324
 
325
+ removePaymentScheduleScheme(
326
+ invoice_id: string,
327
+ input?: RemovePaymentScheduleSchemeInputParam,
328
+ headers?: ChargebeeRequestHeader,
329
+ ): Promise<ChargebeeResponse<RemovePaymentScheduleSchemeResponse>>;
330
+
324
331
  paymentSchedules(
325
332
  invoice_id: string,
326
333
  headers?: ChargebeeRequestHeader,
@@ -509,6 +516,10 @@ declare module 'chargebee' {
509
516
  invoice: Invoice;
510
517
  }
511
518
 
519
+ export interface RemovePaymentScheduleSchemeResponse {
520
+ invoice: Invoice;
521
+ }
522
+
512
523
  export interface PaymentSchedulesResponse {
513
524
  payment_schedules: PaymentSchedule[];
514
525
  }
@@ -1237,6 +1248,9 @@ declare module 'chargebee' {
1237
1248
  scheme_id: string;
1238
1249
  amount?: number;
1239
1250
  }
1251
+ export interface RemovePaymentScheduleSchemeInputParam {
1252
+ comment?: string;
1253
+ }
1240
1254
  export interface StatementDescriptorCreateInputParam {
1241
1255
  descriptor?: string;
1242
1256
  }
@@ -1828,6 +1842,7 @@ declare module 'chargebee' {
1828
1842
  tax10_amount?: number;
1829
1843
  is_partial_tax_applied?: boolean;
1830
1844
  taxable_amount?: number;
1845
+ tax_exempt_reason?: TaxExemptReasonEnum;
1831
1846
  proration_mode?:
1832
1847
  | 'reset'
1833
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
  }
@@ -13,6 +13,7 @@ declare module 'chargebee' {
13
13
  updated_at?: number;
14
14
  column_definitions?: ColumnDefinition[];
15
15
  features?: Feature[];
16
+ group_by?: string[];
16
17
  }
17
18
 
18
19
  export namespace Meter {
@@ -10,6 +10,7 @@ declare module 'chargebee' {
10
10
  status?: StatusEnum;
11
11
  query?: string;
12
12
  column_definitions?: ColumnDefinition[];
13
+ group_by?: string[];
13
14
  features?: Feature[];
14
15
  }
15
16
 
@@ -8,7 +8,11 @@ declare module 'chargebee' {
8
8
  customer_id?: string;
9
9
  id_at_source: string;
10
10
  origin?: string;
11
- source: 'apple_app_store' | 'google_play_store';
11
+ source:
12
+ | 'apple_app_store'
13
+ | 'google_play_store'
14
+ | 'roku'
15
+ | 'amazon_app_store';
12
16
  created_at: number;
13
17
  resource_version?: number;
14
18
  omnichannel_one_time_order_items: OmnichannelOneTimeOrderItem[];
@@ -6,8 +6,13 @@ declare module 'chargebee' {
6
6
  id: string;
7
7
  id_at_source: string;
8
8
  app_id: string;
9
- source: 'apple_app_store' | 'google_play_store';
9
+ source:
10
+ | 'apple_app_store'
11
+ | 'google_play_store'
12
+ | 'roku'
13
+ | 'amazon_app_store';
10
14
  customer_id?: string;
15
+ origin?: string;
11
16
  created_at: number;
12
17
  purchased_at?: number;
13
18
  updated_at: number;
@@ -22,13 +22,16 @@ declare module 'chargebee' {
22
22
  | 'product_not_available'
23
23
  | 'other'
24
24
  | 'subscription_not_found_in_source';
25
+ expiration_reason_at_source?: string;
25
26
  cancelled_at?: number;
26
27
  cancellation_reason?:
27
28
  | 'customer_cancelled'
28
29
  | 'customer_did_not_consent_to_price_increase'
29
30
  | 'refunded_due_to_app_issue'
30
31
  | 'refunded_for_other_reason'
31
- | 'merchant_revoked';
32
+ | 'merchant_revoked'
33
+ | 'other';
34
+ cancellation_reason_at_source?: string;
32
35
  grace_period_expires_at?: number;
33
36
  resumes_at?: number;
34
37
  has_scheduled_changes: boolean;
@@ -34,7 +34,7 @@ declare module 'chargebee' {
34
34
  date: number;
35
35
  amount: number;
36
36
  scheduled_amount: number;
37
- status: 'posted' | 'payment_due' | 'paid';
37
+ status: 'posted' | 'payment_due' | 'paid' | 'voided';
38
38
  }
39
39
  export interface ReferenceTransaction {
40
40
  schedule_entry_id: string;
@@ -18,7 +18,7 @@ declare module 'chargebee' {
18
18
  date: number;
19
19
  amount: number;
20
20
  scheduled_amount: number;
21
- status: 'posted' | 'payment_due' | 'paid';
21
+ status: 'posted' | 'payment_due' | 'paid' | 'voided';
22
22
  }
23
23
  // REQUEST PARAMS
24
24
  //---------------
@@ -318,6 +318,7 @@ declare module 'chargebee' {
318
318
  }
319
319
  export interface NetworkTransactionReference {
320
320
  original_network_transaction_id?: string;
321
+ transaction_link_id?: string;
321
322
  }
322
323
  // REQUEST PARAMS
323
324
  //---------------
@@ -347,6 +348,7 @@ declare module 'chargebee' {
347
348
  skip_retrieval?: boolean;
348
349
  additional_information?: any;
349
350
  card?: CardCreateUsingPermanentTokenInputParam;
351
+ bank_account?: BankAccountCreateUsingPermanentTokenInputParam;
350
352
  billing_address?: BillingAddressCreateUsingPermanentTokenInputParam;
351
353
  }
352
354
  export interface CreateUsingTokenInputParam {
@@ -429,6 +431,23 @@ declare module 'chargebee' {
429
431
  zip?: string;
430
432
  country?: string;
431
433
  }
434
+ export interface BankAccountCreateUsingPermanentTokenInputParam {
435
+ account_type?: AccountTypeEnum;
436
+ account_holder_type?: AccountHolderTypeEnum;
437
+ first_name?: string;
438
+ last_name?: string;
439
+ company?: string;
440
+ scheme?:
441
+ | 'ach'
442
+ | 'bacs'
443
+ | 'sepa_core'
444
+ | 'autogiro'
445
+ | 'becs'
446
+ | 'becs_nz'
447
+ | 'pad';
448
+ last4?: string;
449
+ echeck_type?: EcheckTypeEnum;
450
+ }
432
451
  export interface CardCreateUsingPermanentTokenInputParam {
433
452
  last4?: string;
434
453
  iin?: string;
@@ -0,0 +1,10 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
3
+
4
+ declare module 'chargebee' {
5
+ export interface PreferenceVariant {
6
+ value: string;
7
+ allow_override_in_interface?: boolean;
8
+ allow_override_in_api?: boolean;
9
+ }
10
+ }
@@ -0,0 +1,113 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
3
+ ///<reference path='./filter.d.ts'/>
4
+ declare module 'chargebee' {
5
+ export interface PriceRamp {
6
+ id: string;
7
+ item_price_id: string;
8
+ status: 'active' | 'archived' | 'deleted';
9
+ created_at: number;
10
+ resource_version?: number;
11
+ updated_at?: number;
12
+ archived_at?: number;
13
+ ramp_intervals?: PriceRamp.RampInterval[];
14
+ business_entity_id?: string;
15
+ }
16
+
17
+ export namespace PriceRamp {
18
+ export class PriceRampResource {
19
+ create(
20
+ input: CreateInputParam,
21
+ headers?: ChargebeeRequestHeader,
22
+ ): Promise<ChargebeeResponse<CreateResponse>>;
23
+
24
+ retrieve(
25
+ price_ramp_id: string,
26
+ headers?: ChargebeeRequestHeader,
27
+ ): Promise<ChargebeeResponse<RetrieveResponse>>;
28
+
29
+ update(
30
+ price_ramp_id: string,
31
+ input: UpdateInputParam,
32
+ headers?: ChargebeeRequestHeader,
33
+ ): Promise<ChargebeeResponse<UpdateResponse>>;
34
+
35
+ delete(
36
+ price_ramp_id: string,
37
+ headers?: ChargebeeRequestHeader,
38
+ ): Promise<ChargebeeResponse<DeleteResponse>>;
39
+
40
+ list(
41
+ input?: ListInputParam,
42
+ headers?: ChargebeeRequestHeader,
43
+ ): Promise<ChargebeeResponse<ListResponse>>;
44
+ }
45
+
46
+ export interface CreateResponse {
47
+ price_ramp: PriceRamp;
48
+ }
49
+
50
+ export interface RetrieveResponse {
51
+ price_ramp: PriceRamp;
52
+ }
53
+
54
+ export interface UpdateResponse {
55
+ price_ramp: PriceRamp;
56
+ }
57
+
58
+ export interface DeleteResponse {
59
+ price_ramp: PriceRamp;
60
+ }
61
+
62
+ export interface ListResponse {
63
+ list: { price_ramp: PriceRamp }[];
64
+ next_offset?: string;
65
+ }
66
+
67
+ export interface RampInterval {
68
+ starting_billing_cycle: number;
69
+ ending_billing_cycle?: number;
70
+ apply_catalog_price?: boolean;
71
+ price?: number;
72
+ price_in_decimal?: string;
73
+ }
74
+ // REQUEST PARAMS
75
+ //---------------
76
+
77
+ export interface CreateInputParam {
78
+ item_price_id: string;
79
+ business_entity_id?: string;
80
+ ramp_intervals?: RampIntervalsCreateInputParam[];
81
+ }
82
+ export interface UpdateInputParam {
83
+ status?: 'active' | 'archived';
84
+ ramp_intervals?: RampIntervalsUpdateInputParam[];
85
+ }
86
+ export interface ListInputParam {
87
+ limit?: number;
88
+ offset?: string;
89
+ id?: filter.String;
90
+ item_price_id?: filter.String;
91
+ status?: filter.Enum;
92
+ updated_at?: filter.Timestamp;
93
+ business_entity_id?: filter.String;
94
+ include_site_level_resources?: filter.Boolean;
95
+ 'sort_by[asc]'?: string;
96
+ 'sort_by[desc]'?: string;
97
+ }
98
+ export interface RampIntervalsCreateInputParam {
99
+ starting_billing_cycle: number;
100
+ ending_billing_cycle?: number;
101
+ apply_catalog_price?: boolean;
102
+ price?: number;
103
+ price_in_decimal?: string;
104
+ }
105
+ export interface RampIntervalsUpdateInputParam {
106
+ starting_billing_cycle: number;
107
+ ending_billing_cycle?: number;
108
+ apply_catalog_price?: boolean;
109
+ price?: number;
110
+ price_in_decimal?: string;
111
+ }
112
+ }
113
+ }
@@ -0,0 +1,18 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
3
+
4
+ declare module 'chargebee' {
5
+ export interface PrivateNote {
6
+ id: string;
7
+ email_conversation_id: string;
8
+ author_type?: 'site_user' | 'agent' | 'other';
9
+ author_id?: string;
10
+ author_name?: string;
11
+ content_html: string;
12
+ content_text?: string;
13
+ meta_data?: string;
14
+ created_at: number;
15
+ resource_version?: number;
16
+ updated_at: number;
17
+ }
18
+ }
@@ -156,6 +156,8 @@ declare module 'chargebee' {
156
156
  subscription_id?: string;
157
157
  billing_cycles?: number;
158
158
  contract_term_billing_cycle_on_renewal?: number;
159
+ trial_end?: number;
160
+ start_date?: number;
159
161
  meta_data?: any;
160
162
  }
161
163
  export interface PurchaseItemsCreateInputParam {
@@ -165,6 +167,7 @@ declare module 'chargebee' {
165
167
  unit_amount?: number;
166
168
  unit_amount_in_decimal?: string;
167
169
  quantity_in_decimal?: string;
170
+ trial_end?: number;
168
171
  }
169
172
  export interface DiscountsCreateInputParam {
170
173
  index?: number;
@@ -231,6 +234,8 @@ declare module 'chargebee' {
231
234
  subscription_id?: string;
232
235
  billing_cycles?: number;
233
236
  contract_term_billing_cycle_on_renewal?: number;
237
+ trial_end?: number;
238
+ start_date?: number;
234
239
  }
235
240
  export interface PurchaseItemsEstimateInputParam {
236
241
  index: number;
@@ -239,6 +244,7 @@ declare module 'chargebee' {
239
244
  unit_amount?: number;
240
245
  unit_amount_in_decimal?: string;
241
246
  quantity_in_decimal?: string;
247
+ trial_end?: number;
242
248
  }
243
249
  export interface DiscountsEstimateInputParam {
244
250
  index?: number;
@@ -92,6 +92,7 @@ declare module 'chargebee' {
92
92
  metered_quantity?: string;
93
93
  charge_once?: boolean;
94
94
  charge_on_option?: 'immediately' | 'on_event';
95
+ description?: string;
95
96
  charge_on_event?:
96
97
  | 'subscription_trial_start'
97
98
  | 'plan_activation'
@@ -114,6 +115,7 @@ declare module 'chargebee' {
114
115
  metered_quantity?: string;
115
116
  charge_once?: boolean;
116
117
  charge_on_option?: 'immediately' | 'on_event';
118
+ description?: string;
117
119
  charge_on_event?:
118
120
  | 'subscription_trial_start'
119
121
  | 'plan_activation'
@@ -225,6 +227,7 @@ declare module 'chargebee' {
225
227
  charge_on_event?: ChargeOnEventEnum;
226
228
  charge_once?: boolean;
227
229
  charge_on_option?: ChargeOnOptionEnum;
230
+ description?: string;
228
231
  }
229
232
  export interface CouponsToAddCreateForSubscriptionInputParam {
230
233
  coupon_id?: string;
@@ -252,6 +255,7 @@ declare module 'chargebee' {
252
255
  charge_on_event?: ChargeOnEventEnum;
253
256
  charge_once?: boolean;
254
257
  charge_on_option?: ChargeOnOptionEnum;
258
+ description?: string;
255
259
  }
256
260
  export interface DiscountsToAddCreateForSubscriptionInputParam {
257
261
  apply_on: ApplyOnEnum;
@@ -284,6 +288,7 @@ declare module 'chargebee' {
284
288
  charge_on_event?: ChargeOnEventEnum;
285
289
  charge_once?: boolean;
286
290
  charge_on_option?: ChargeOnOptionEnum;
291
+ description?: string;
287
292
  }
288
293
  export interface CouponsToAddUpdateInputParam {
289
294
  coupon_id?: string;
@@ -311,6 +316,7 @@ declare module 'chargebee' {
311
316
  charge_on_event?: ChargeOnEventEnum;
312
317
  charge_once?: boolean;
313
318
  charge_on_option?: ChargeOnOptionEnum;
319
+ description?: string;
314
320
  }
315
321
  export interface DiscountsToAddUpdateInputParam {
316
322
  apply_on: ApplyOnEnum;
@@ -0,0 +1,12 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
3
+
4
+ declare module 'chargebee' {
5
+ export interface RampInterval {
6
+ starting_billing_cycle: number;
7
+ ending_billing_cycle?: number;
8
+ apply_catalog_price?: boolean;
9
+ price?: number;
10
+ price_in_decimal?: string;
11
+ }
12
+ }