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.
- package/CHANGELOG.md +362 -0
- package/cjs/environment.js +1 -1
- package/cjs/resources/api_endpoints.js +496 -3
- package/cjs/resources/webhook/eventType.js +36 -0
- package/cjs/schema/business_entity.schema.js +28 -2
- package/cjs/schema/business_rule.schema.js +54 -0
- package/cjs/schema/business_ruleset.schema.js +68 -0
- package/cjs/schema/card.schema.js +3 -1
- package/cjs/schema/collections_payment_promise.schema.js +43 -0
- package/cjs/schema/comment.schema.js +2 -0
- package/cjs/schema/coupon.schema.js +1 -1
- package/cjs/schema/credit_note.schema.js +11 -4
- package/cjs/schema/credit_unit.schema.js +2 -2
- package/cjs/schema/customer.schema.js +81 -10
- package/cjs/schema/dispute.schema.js +104 -0
- package/cjs/schema/einvoice.schema.js +37 -0
- package/cjs/schema/email_log.schema.js +28 -0
- package/cjs/schema/entitlement.schema.js +4 -4
- package/cjs/schema/estimate.schema.js +39 -10
- package/cjs/schema/event.schema.js +156 -0
- package/cjs/schema/export.schema.js +75 -19
- package/cjs/schema/feature.schema.js +2 -2
- package/cjs/schema/gift.schema.js +26 -0
- package/cjs/schema/hosted_page.schema.js +26 -6
- package/cjs/schema/index.js +9 -0
- package/cjs/schema/invoice.schema.js +98 -14
- package/cjs/schema/item.schema.js +1 -1
- package/cjs/schema/item_family.schema.js +1 -1
- package/cjs/schema/item_price.schema.js +1 -1
- package/cjs/schema/ledger_account_balance.schema.js +11 -2
- package/cjs/schema/ledger_operation.schema.js +6 -2
- package/cjs/schema/meter.schema.js +1 -1
- package/cjs/schema/metered_feature.schema.js +1 -1
- package/cjs/schema/omnichannel_one_time_order.schema.js +12 -4
- package/cjs/schema/omnichannel_subscription.schema.js +16 -8
- package/cjs/schema/payment_intent.schema.js +27 -0
- package/cjs/schema/payment_schedule.schema.js +36 -0
- package/cjs/schema/payment_schedule_scheme.schema.js +23 -2
- package/cjs/schema/payment_source.schema.js +118 -1
- package/cjs/schema/price_ramp.schema.js +88 -0
- package/cjs/schema/price_variant.schema.js +1 -1
- package/cjs/schema/pricing_page_session.schema.js +1 -0
- package/cjs/schema/promotional_grant.schema.js +2 -0
- package/cjs/schema/purchase.schema.js +20 -1
- package/cjs/schema/quote.schema.js +6 -6
- package/cjs/schema/ramp.schema.js +18 -6
- package/cjs/schema/retry_segment.schema.js +12 -0
- package/cjs/schema/subscription.schema.js +179 -16
- package/cjs/schema/transaction.schema.js +60 -2
- package/cjs/schema/usage.schema.js +5 -0
- package/cjs/schema/usage_summary.schema.js +1 -0
- package/cjs/schema/webhook_endpoint.schema.js +72 -0
- package/esm/environment.js +1 -1
- package/esm/resources/api_endpoints.js +496 -3
- package/esm/resources/webhook/eventType.js +36 -0
- package/esm/schema/business_entity.schema.js +27 -1
- package/esm/schema/business_rule.schema.js +51 -0
- package/esm/schema/business_ruleset.schema.js +65 -0
- package/esm/schema/card.schema.js +3 -1
- package/esm/schema/collections_payment_promise.schema.js +40 -0
- package/esm/schema/comment.schema.js +2 -0
- package/esm/schema/coupon.schema.js +1 -1
- package/esm/schema/credit_note.schema.js +11 -4
- package/esm/schema/credit_unit.schema.js +2 -2
- package/esm/schema/customer.schema.js +81 -10
- package/esm/schema/dispute.schema.js +101 -0
- package/esm/schema/einvoice.schema.js +34 -0
- package/esm/schema/email_log.schema.js +25 -0
- package/esm/schema/entitlement.schema.js +4 -4
- package/esm/schema/estimate.schema.js +39 -10
- package/esm/schema/event.schema.js +156 -0
- package/esm/schema/export.schema.js +75 -19
- package/esm/schema/feature.schema.js +2 -2
- package/esm/schema/gift.schema.js +26 -0
- package/esm/schema/hosted_page.schema.js +26 -6
- package/esm/schema/index.js +9 -0
- package/esm/schema/invoice.schema.js +97 -13
- package/esm/schema/item.schema.js +1 -1
- package/esm/schema/item_family.schema.js +1 -1
- package/esm/schema/item_price.schema.js +1 -1
- package/esm/schema/ledger_account_balance.schema.js +10 -1
- package/esm/schema/ledger_operation.schema.js +6 -2
- package/esm/schema/meter.schema.js +1 -1
- package/esm/schema/metered_feature.schema.js +1 -1
- package/esm/schema/omnichannel_one_time_order.schema.js +12 -4
- package/esm/schema/omnichannel_subscription.schema.js +16 -8
- package/esm/schema/payment_intent.schema.js +27 -0
- package/esm/schema/payment_schedule.schema.js +33 -0
- package/esm/schema/payment_schedule_scheme.schema.js +22 -1
- package/esm/schema/payment_source.schema.js +118 -1
- package/esm/schema/price_ramp.schema.js +85 -0
- package/esm/schema/price_variant.schema.js +1 -1
- package/esm/schema/pricing_page_session.schema.js +1 -0
- package/esm/schema/promotional_grant.schema.js +2 -0
- package/esm/schema/purchase.schema.js +20 -1
- package/esm/schema/quote.schema.js +6 -6
- package/esm/schema/ramp.schema.js +18 -6
- package/esm/schema/retry_segment.schema.js +9 -0
- package/esm/schema/subscription.schema.js +179 -16
- package/esm/schema/transaction.schema.js +60 -2
- package/esm/schema/usage.schema.js +5 -0
- package/esm/schema/usage_summary.schema.js +1 -0
- package/esm/schema/webhook_endpoint.schema.js +72 -0
- package/package.json +1 -1
- package/types/core.d.ts +135 -72
- package/types/index.d.ts +36 -0
- package/types/resources/AppliedRule.d.ts +14 -0
- package/types/resources/ApplyRule.d.ts +28 -0
- package/types/resources/BusinessEntity.d.ts +52 -0
- package/types/resources/BusinessRule.d.ts +161 -0
- package/types/resources/BusinessRuleset.d.ts +165 -0
- package/types/resources/BusinessRulesetRule.d.ts +9 -0
- package/types/resources/Card.d.ts +1 -1
- package/types/resources/Citation.d.ts +13 -0
- package/types/resources/CollectionsDispute.d.ts +24 -0
- package/types/resources/CollectionsPaymentPromise.d.ts +93 -0
- package/types/resources/CollectionsReminderSequence.d.ts +35 -0
- package/types/resources/Comment.d.ts +2 -1
- package/types/resources/Content.d.ts +26 -0
- package/types/resources/CreditNote.d.ts +13 -0
- package/types/resources/CustomData.d.ts +14 -0
- package/types/resources/CustomDataSchema.d.ts +15 -0
- package/types/resources/Customer.d.ts +42 -5
- package/types/resources/Dispute.d.ts +65 -0
- package/types/resources/DraftEstimate.d.ts +13 -0
- package/types/resources/DraftRequest.d.ts +45 -0
- package/types/resources/Einvoice.d.ts +64 -1
- package/types/resources/EmailAttachment.d.ts +16 -0
- package/types/resources/EmailConversation.d.ts +18 -0
- package/types/resources/EmailLog.d.ts +46 -0
- package/types/resources/EmailMessage.d.ts +40 -0
- package/types/resources/Estimate.d.ts +31 -2
- package/types/resources/Event.d.ts +37 -0
- package/types/resources/Execution.d.ts +12 -0
- package/types/resources/GatewayPaymentMethodToken.d.ts +2 -2
- package/types/resources/Gift.d.ts +28 -2
- package/types/resources/GrantBlock.d.ts +26 -7
- package/types/resources/GroupByAttribute.d.ts +15 -0
- package/types/resources/GroupByRecommendation.d.ts +10 -0
- package/types/resources/HostedPage.d.ts +11 -0
- package/types/resources/Invoice.d.ts +57 -4
- package/types/resources/ItemPrice.d.ts +1 -0
- package/types/resources/LedgerAccountBalance.d.ts +19 -0
- package/types/resources/LedgerEntry.d.ts +4 -4
- package/types/resources/LedgerOperation.d.ts +15 -8
- package/types/resources/Meter.d.ts +1 -0
- package/types/resources/MeteredFeature.d.ts +1 -0
- package/types/resources/OmnichannelOneTimeOrder.d.ts +5 -1
- package/types/resources/OmnichannelSubscription.d.ts +6 -1
- package/types/resources/OmnichannelSubscriptionItem.d.ts +9 -2
- package/types/resources/PaymentIntent.d.ts +72 -5
- package/types/resources/PaymentSchedule.d.ts +39 -2
- package/types/resources/PaymentScheduleEstimate.d.ts +2 -1
- package/types/resources/PaymentScheduleScheme.d.ts +17 -1
- package/types/resources/PaymentSource.d.ts +50 -2
- package/types/resources/PreferenceVariant.d.ts +10 -0
- package/types/resources/PriceRamp.d.ts +113 -0
- package/types/resources/PricingPageSession.d.ts +1 -0
- package/types/resources/PrivateNote.d.ts +18 -0
- package/types/resources/PromotionalGrant.d.ts +2 -0
- package/types/resources/Purchase.d.ts +20 -1
- package/types/resources/QuotedSubscription.d.ts +1 -0
- package/types/resources/Ramp.d.ts +18 -0
- package/types/resources/RampInterval.d.ts +12 -0
- package/types/resources/RecordedPurchase.d.ts +5 -1
- package/types/resources/RetrySegment.d.ts +36 -0
- package/types/resources/Subscription.d.ts +110 -11
- package/types/resources/ThirdPartyPaymentMethod.d.ts +1 -0
- package/types/resources/Transaction.d.ts +9 -0
- package/types/resources/Usage.d.ts +6 -0
- package/types/resources/UsageSummary.d.ts +2 -0
- package/types/resources/WebhookEvent.d.ts +214 -0
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
declare module 'chargebee' {
|
|
5
5
|
export interface LedgerOperation {
|
|
6
6
|
id: string;
|
|
7
|
-
subscription_id
|
|
8
|
-
unit_id
|
|
9
|
-
unit_type
|
|
7
|
+
subscription_id: string;
|
|
8
|
+
unit_id: string;
|
|
9
|
+
unit_type: 'credit_unit';
|
|
10
10
|
type:
|
|
11
11
|
| 'allocation'
|
|
12
12
|
| 'capture'
|
|
@@ -16,7 +16,8 @@ declare module 'chargebee' {
|
|
|
16
16
|
| 'expiry'
|
|
17
17
|
| 'void'
|
|
18
18
|
| 'rollover'
|
|
19
|
-
| 'adjustment'
|
|
19
|
+
| 'adjustment'
|
|
20
|
+
| 'overdraft_settlement';
|
|
20
21
|
amount: string;
|
|
21
22
|
provisioned_start_balance: string;
|
|
22
23
|
provisioned_end_balance: string;
|
|
@@ -78,28 +79,32 @@ declare module 'chargebee' {
|
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
export interface CaptureResponse {
|
|
81
|
-
ledger_operation
|
|
82
|
+
ledger_operation?: LedgerOperation;
|
|
83
|
+
ledger_operations: LedgerOperation[];
|
|
82
84
|
ledger_account_balance: LedgerAccountBalance;
|
|
83
85
|
grant_blocks: GrantBlock[];
|
|
84
86
|
ledger_entries: LedgerEntry[];
|
|
85
87
|
}
|
|
86
88
|
|
|
87
89
|
export interface AuthorizeResponse {
|
|
88
|
-
ledger_operation
|
|
90
|
+
ledger_operation?: LedgerOperation;
|
|
91
|
+
ledger_operations: LedgerOperation[];
|
|
89
92
|
ledger_account_balance: LedgerAccountBalance;
|
|
90
93
|
grant_blocks: GrantBlock[];
|
|
91
94
|
ledger_entries: LedgerEntry[];
|
|
92
95
|
}
|
|
93
96
|
|
|
94
97
|
export interface CaptureAuthorizationResponse {
|
|
95
|
-
ledger_operation
|
|
98
|
+
ledger_operation?: LedgerOperation;
|
|
99
|
+
ledger_operations: LedgerOperation[];
|
|
96
100
|
ledger_account_balance: LedgerAccountBalance;
|
|
97
101
|
grant_blocks: GrantBlock[];
|
|
98
102
|
ledger_entries: LedgerEntry[];
|
|
99
103
|
}
|
|
100
104
|
|
|
101
105
|
export interface ReleaseAuthorizationResponse {
|
|
102
|
-
ledger_operation
|
|
106
|
+
ledger_operation?: LedgerOperation;
|
|
107
|
+
ledger_operations: LedgerOperation[];
|
|
103
108
|
ledger_account_balance: LedgerAccountBalance;
|
|
104
109
|
grant_blocks: GrantBlock[];
|
|
105
110
|
ledger_entries: LedgerEntry[];
|
|
@@ -158,7 +163,9 @@ declare module 'chargebee' {
|
|
|
158
163
|
export interface AllocateInputParam {
|
|
159
164
|
subscription_id: string;
|
|
160
165
|
unit_id: string;
|
|
166
|
+
id?: string;
|
|
161
167
|
amount: string;
|
|
168
|
+
effective_from?: number;
|
|
162
169
|
expires_at: number;
|
|
163
170
|
metadata?: any;
|
|
164
171
|
}
|
|
@@ -8,7 +8,11 @@ declare module 'chargebee' {
|
|
|
8
8
|
customer_id?: string;
|
|
9
9
|
id_at_source: string;
|
|
10
10
|
origin?: string;
|
|
11
|
-
source:
|
|
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:
|
|
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;
|
|
@@ -17,14 +17,21 @@ declare module 'chargebee' {
|
|
|
17
17
|
current_term_start?: number;
|
|
18
18
|
current_term_end?: number;
|
|
19
19
|
expired_at?: number;
|
|
20
|
-
expiration_reason?:
|
|
20
|
+
expiration_reason?:
|
|
21
|
+
| 'billing_error'
|
|
22
|
+
| 'product_not_available'
|
|
23
|
+
| 'other'
|
|
24
|
+
| 'subscription_not_found_in_source';
|
|
25
|
+
expiration_reason_at_source?: string;
|
|
21
26
|
cancelled_at?: number;
|
|
22
27
|
cancellation_reason?:
|
|
23
28
|
| 'customer_cancelled'
|
|
24
29
|
| 'customer_did_not_consent_to_price_increase'
|
|
25
30
|
| 'refunded_due_to_app_issue'
|
|
26
31
|
| 'refunded_for_other_reason'
|
|
27
|
-
| 'merchant_revoked'
|
|
32
|
+
| 'merchant_revoked'
|
|
33
|
+
| 'other';
|
|
34
|
+
cancellation_reason_at_source?: string;
|
|
28
35
|
grace_period_expires_at?: number;
|
|
29
36
|
resumes_at?: number;
|
|
30
37
|
has_scheduled_changes: boolean;
|
|
@@ -62,7 +62,20 @@ declare module 'chargebee' {
|
|
|
62
62
|
| 'dana'
|
|
63
63
|
| 'touch_n_go'
|
|
64
64
|
| 'tamara'
|
|
65
|
-
| 'qpay'
|
|
65
|
+
| 'qpay'
|
|
66
|
+
| 'ovo'
|
|
67
|
+
| 'momo'
|
|
68
|
+
| 'mercado_pago'
|
|
69
|
+
| 'nequi'
|
|
70
|
+
| 'nupay'
|
|
71
|
+
| 'picpay'
|
|
72
|
+
| 'thai_qr'
|
|
73
|
+
| 'blik'
|
|
74
|
+
| 'fpx'
|
|
75
|
+
| 'wero'
|
|
76
|
+
| 'p24'
|
|
77
|
+
| 'affirm_pay'
|
|
78
|
+
| 'rakuten_pay';
|
|
66
79
|
success_url?: string;
|
|
67
80
|
failure_url?: string;
|
|
68
81
|
created_at: number;
|
|
@@ -76,6 +89,7 @@ declare module 'chargebee' {
|
|
|
76
89
|
payment_attempts?: PaymentIntent.PaymentAttempt[];
|
|
77
90
|
payment_intent_metadata?: PaymentIntent.PaymentIntentMetadata;
|
|
78
91
|
business_entity_id?: string;
|
|
92
|
+
brand_id?: string;
|
|
79
93
|
}
|
|
80
94
|
|
|
81
95
|
export namespace PaymentIntent {
|
|
@@ -171,7 +185,20 @@ declare module 'chargebee' {
|
|
|
171
185
|
| 'dana'
|
|
172
186
|
| 'touch_n_go'
|
|
173
187
|
| 'tamara'
|
|
174
|
-
| 'qpay'
|
|
188
|
+
| 'qpay'
|
|
189
|
+
| 'ovo'
|
|
190
|
+
| 'momo'
|
|
191
|
+
| 'mercado_pago'
|
|
192
|
+
| 'nequi'
|
|
193
|
+
| 'nupay'
|
|
194
|
+
| 'picpay'
|
|
195
|
+
| 'thai_qr'
|
|
196
|
+
| 'blik'
|
|
197
|
+
| 'fpx'
|
|
198
|
+
| 'wero'
|
|
199
|
+
| 'p24'
|
|
200
|
+
| 'affirm_pay'
|
|
201
|
+
| 'rakuten_pay';
|
|
175
202
|
id_at_gateway?: string;
|
|
176
203
|
error_code?: string;
|
|
177
204
|
error_text?: string;
|
|
@@ -244,7 +271,20 @@ declare module 'chargebee' {
|
|
|
244
271
|
| 'dana'
|
|
245
272
|
| 'touch_n_go'
|
|
246
273
|
| 'tamara'
|
|
247
|
-
| 'qpay'
|
|
274
|
+
| 'qpay'
|
|
275
|
+
| 'ovo'
|
|
276
|
+
| 'momo'
|
|
277
|
+
| 'mercado_pago'
|
|
278
|
+
| 'nequi'
|
|
279
|
+
| 'nupay'
|
|
280
|
+
| 'picpay'
|
|
281
|
+
| 'thai_qr'
|
|
282
|
+
| 'blik'
|
|
283
|
+
| 'fpx'
|
|
284
|
+
| 'wero'
|
|
285
|
+
| 'p24'
|
|
286
|
+
| 'affirm_pay'
|
|
287
|
+
| 'rakuten_pay';
|
|
248
288
|
id_at_gateway?: string;
|
|
249
289
|
error_code?: string;
|
|
250
290
|
error_text?: string;
|
|
@@ -272,6 +312,7 @@ declare module 'chargebee' {
|
|
|
272
312
|
|
|
273
313
|
export interface CreateInputParam {
|
|
274
314
|
business_entity_id?: string;
|
|
315
|
+
brand_id?: string;
|
|
275
316
|
customer_id?: string;
|
|
276
317
|
amount: number;
|
|
277
318
|
currency_code: string;
|
|
@@ -330,7 +371,20 @@ declare module 'chargebee' {
|
|
|
330
371
|
| 'dana'
|
|
331
372
|
| 'touch_n_go'
|
|
332
373
|
| 'tamara'
|
|
333
|
-
| 'qpay'
|
|
374
|
+
| 'qpay'
|
|
375
|
+
| 'ovo'
|
|
376
|
+
| 'momo'
|
|
377
|
+
| 'mercado_pago'
|
|
378
|
+
| 'nequi'
|
|
379
|
+
| 'nupay'
|
|
380
|
+
| 'picpay'
|
|
381
|
+
| 'thai_qr'
|
|
382
|
+
| 'blik'
|
|
383
|
+
| 'fpx'
|
|
384
|
+
| 'wero'
|
|
385
|
+
| 'p24'
|
|
386
|
+
| 'affirm_pay'
|
|
387
|
+
| 'rakuten_pay';
|
|
334
388
|
success_url?: string;
|
|
335
389
|
failure_url?: string;
|
|
336
390
|
payment_method_options?: any;
|
|
@@ -391,7 +445,20 @@ declare module 'chargebee' {
|
|
|
391
445
|
| 'dana'
|
|
392
446
|
| 'touch_n_go'
|
|
393
447
|
| 'tamara'
|
|
394
|
-
| 'qpay'
|
|
448
|
+
| 'qpay'
|
|
449
|
+
| 'ovo'
|
|
450
|
+
| 'momo'
|
|
451
|
+
| 'mercado_pago'
|
|
452
|
+
| 'nequi'
|
|
453
|
+
| 'nupay'
|
|
454
|
+
| 'picpay'
|
|
455
|
+
| 'thai_qr'
|
|
456
|
+
| 'blik'
|
|
457
|
+
| 'fpx'
|
|
458
|
+
| 'wero'
|
|
459
|
+
| 'p24'
|
|
460
|
+
| 'affirm_pay'
|
|
461
|
+
| 'rakuten_pay';
|
|
395
462
|
success_url?: string;
|
|
396
463
|
failure_url?: string;
|
|
397
464
|
payment_method_options?: any;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
2
|
///<reference path='./../index.d.ts'/>
|
|
3
|
-
|
|
3
|
+
///<reference path='./filter.d.ts'/>
|
|
4
4
|
declare module 'chargebee' {
|
|
5
5
|
export interface PaymentSchedule {
|
|
6
6
|
id: string;
|
|
@@ -13,16 +13,53 @@ declare module 'chargebee' {
|
|
|
13
13
|
updated_at?: number;
|
|
14
14
|
currency_code?: string;
|
|
15
15
|
schedule_entries?: PaymentSchedule.ScheduleEntry[];
|
|
16
|
+
reference_transactions?: PaymentSchedule.ReferenceTransaction[];
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
export namespace PaymentSchedule {
|
|
20
|
+
export class PaymentScheduleResource {
|
|
21
|
+
list(
|
|
22
|
+
input?: ListInputParam,
|
|
23
|
+
headers?: ChargebeeRequestHeader,
|
|
24
|
+
): Promise<ChargebeeResponse<ListResponse>>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface ListResponse {
|
|
28
|
+
list: { payment_schedule: PaymentSchedule }[];
|
|
29
|
+
next_offset?: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
19
32
|
export interface ScheduleEntry {
|
|
20
33
|
id: string;
|
|
21
34
|
date: number;
|
|
22
35
|
amount: number;
|
|
23
|
-
|
|
36
|
+
scheduled_amount: number;
|
|
37
|
+
status: 'posted' | 'payment_due' | 'paid' | 'voided';
|
|
38
|
+
}
|
|
39
|
+
export interface ReferenceTransaction {
|
|
40
|
+
schedule_entry_id: string;
|
|
41
|
+
applied_amount?: number;
|
|
42
|
+
txn_id: string;
|
|
43
|
+
txn_status?:
|
|
44
|
+
| 'in_progress'
|
|
45
|
+
| 'success'
|
|
46
|
+
| 'voided'
|
|
47
|
+
| 'failure'
|
|
48
|
+
| 'timeout'
|
|
49
|
+
| 'needs_attention'
|
|
50
|
+
| 'late_failure';
|
|
51
|
+
txn_date?: number;
|
|
52
|
+
txn_amount?: number;
|
|
24
53
|
}
|
|
25
54
|
// REQUEST PARAMS
|
|
26
55
|
//---------------
|
|
56
|
+
|
|
57
|
+
export interface ListInputParam {
|
|
58
|
+
limit?: number;
|
|
59
|
+
offset?: string;
|
|
60
|
+
invoice_id?: filter.String;
|
|
61
|
+
id?: filter.String;
|
|
62
|
+
updated_at?: filter.Timestamp;
|
|
63
|
+
}
|
|
27
64
|
}
|
|
28
65
|
}
|
|
@@ -17,7 +17,8 @@ declare module 'chargebee' {
|
|
|
17
17
|
id: string;
|
|
18
18
|
date: number;
|
|
19
19
|
amount: number;
|
|
20
|
-
|
|
20
|
+
scheduled_amount: number;
|
|
21
|
+
status: 'posted' | 'payment_due' | 'paid' | 'voided';
|
|
21
22
|
}
|
|
22
23
|
// REQUEST PARAMS
|
|
23
24
|
//---------------
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
2
|
///<reference path='./../index.d.ts'/>
|
|
3
|
-
|
|
3
|
+
///<reference path='./filter.d.ts'/>
|
|
4
4
|
declare module 'chargebee' {
|
|
5
5
|
export interface PaymentScheduleScheme {
|
|
6
6
|
id: string;
|
|
@@ -27,6 +27,11 @@ declare module 'chargebee' {
|
|
|
27
27
|
headers?: ChargebeeRequestHeader,
|
|
28
28
|
): Promise<ChargebeeResponse<RetrieveResponse>>;
|
|
29
29
|
|
|
30
|
+
list(
|
|
31
|
+
input?: ListInputParam,
|
|
32
|
+
headers?: ChargebeeRequestHeader,
|
|
33
|
+
): Promise<ChargebeeResponse<ListResponse>>;
|
|
34
|
+
|
|
30
35
|
delete(
|
|
31
36
|
payment_schedule_scheme_id: string,
|
|
32
37
|
headers?: ChargebeeRequestHeader,
|
|
@@ -41,6 +46,11 @@ declare module 'chargebee' {
|
|
|
41
46
|
payment_schedule_scheme: PaymentScheduleScheme;
|
|
42
47
|
}
|
|
43
48
|
|
|
49
|
+
export interface ListResponse {
|
|
50
|
+
list: { payment_schedule_scheme: PaymentScheduleScheme }[];
|
|
51
|
+
next_offset?: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
44
54
|
export interface DeleteResponse {
|
|
45
55
|
payment_schedule_scheme: PaymentScheduleScheme;
|
|
46
56
|
}
|
|
@@ -59,6 +69,12 @@ declare module 'chargebee' {
|
|
|
59
69
|
name: string;
|
|
60
70
|
flexible_schedules?: FlexibleSchedulesCreateInputParam[];
|
|
61
71
|
}
|
|
72
|
+
export interface ListInputParam {
|
|
73
|
+
limit?: number;
|
|
74
|
+
offset?: string;
|
|
75
|
+
id?: filter.String;
|
|
76
|
+
updated_at?: filter.Timestamp;
|
|
77
|
+
}
|
|
62
78
|
export interface FlexibleSchedulesCreateInputParam {
|
|
63
79
|
period?: number;
|
|
64
80
|
amount_percentage?: number;
|
|
@@ -31,8 +31,10 @@ declare module 'chargebee' {
|
|
|
31
31
|
klarna_pay_now?: PaymentSource.KlarnaPayNow;
|
|
32
32
|
mandates?: PaymentSource.Mandate[];
|
|
33
33
|
vault_token?: any;
|
|
34
|
+
network_transaction_reference?: PaymentSource.NetworkTransactionReference;
|
|
34
35
|
deleted: boolean;
|
|
35
36
|
business_entity_id?: string;
|
|
37
|
+
brand_id?: string;
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
export namespace PaymentSource {
|
|
@@ -314,6 +316,10 @@ declare module 'chargebee' {
|
|
|
314
316
|
subscription_id: string;
|
|
315
317
|
created_at: number;
|
|
316
318
|
}
|
|
319
|
+
export interface NetworkTransactionReference {
|
|
320
|
+
original_network_transaction_id?: string;
|
|
321
|
+
transaction_link_id?: string;
|
|
322
|
+
}
|
|
317
323
|
// REQUEST PARAMS
|
|
318
324
|
//---------------
|
|
319
325
|
|
|
@@ -323,11 +329,13 @@ declare module 'chargebee' {
|
|
|
323
329
|
type: TypeEnum;
|
|
324
330
|
tmp_token: string;
|
|
325
331
|
issuing_country?: string;
|
|
332
|
+
brand_id?: string;
|
|
326
333
|
replace_primary_payment_source?: boolean;
|
|
327
334
|
additional_information?: any;
|
|
328
335
|
}
|
|
329
336
|
export interface CreateUsingPermanentTokenInputParam {
|
|
330
337
|
customer_id: string;
|
|
338
|
+
brand_id?: string;
|
|
331
339
|
type: TypeEnum;
|
|
332
340
|
gateway_account_id?: string;
|
|
333
341
|
reference_id?: string;
|
|
@@ -340,29 +348,35 @@ declare module 'chargebee' {
|
|
|
340
348
|
skip_retrieval?: boolean;
|
|
341
349
|
additional_information?: any;
|
|
342
350
|
card?: CardCreateUsingPermanentTokenInputParam;
|
|
351
|
+
bank_account?: BankAccountCreateUsingPermanentTokenInputParam;
|
|
343
352
|
billing_address?: BillingAddressCreateUsingPermanentTokenInputParam;
|
|
344
353
|
}
|
|
345
354
|
export interface CreateUsingTokenInputParam {
|
|
346
355
|
customer_id: string;
|
|
356
|
+
brand_id?: string;
|
|
347
357
|
replace_primary_payment_source?: boolean;
|
|
348
358
|
token_id: string;
|
|
349
359
|
}
|
|
350
360
|
export interface CreateUsingPaymentIntentInputParam {
|
|
351
361
|
customer_id: string;
|
|
362
|
+
brand_id?: string;
|
|
352
363
|
replace_primary_payment_source?: boolean;
|
|
353
364
|
payment_intent?: PaymentIntentCreateUsingPaymentIntentInputParam;
|
|
354
365
|
}
|
|
355
366
|
export interface CreateVoucherPaymentSourceInputParam {
|
|
356
367
|
customer_id: string;
|
|
368
|
+
brand_id?: string;
|
|
357
369
|
voucher_payment_source?: VoucherPaymentSourceCreateVoucherPaymentSourceInputParam;
|
|
358
370
|
}
|
|
359
371
|
export interface CreateCardInputParam {
|
|
360
372
|
customer_id: string;
|
|
373
|
+
brand_id?: string;
|
|
361
374
|
replace_primary_payment_source?: boolean;
|
|
362
375
|
card?: CardCreateCardInputParam;
|
|
363
376
|
}
|
|
364
377
|
export interface CreateBankAccountInputParam {
|
|
365
378
|
customer_id: string;
|
|
379
|
+
brand_id?: string;
|
|
366
380
|
issuing_country?: string;
|
|
367
381
|
replace_primary_payment_source?: boolean;
|
|
368
382
|
bank_account?: BankAccountCreateBankAccountInputParam;
|
|
@@ -371,6 +385,7 @@ declare module 'chargebee' {
|
|
|
371
385
|
gateway_meta_data?: any;
|
|
372
386
|
reference_transaction?: string;
|
|
373
387
|
card?: CardUpdateCardInputParam;
|
|
388
|
+
network_transaction_reference?: NetworkTransactionReferenceUpdateCardInputParam;
|
|
374
389
|
}
|
|
375
390
|
export interface UpdateBankAccountInputParam {
|
|
376
391
|
bank_account?: BankAccountUpdateBankAccountInputParam;
|
|
@@ -416,6 +431,23 @@ declare module 'chargebee' {
|
|
|
416
431
|
zip?: string;
|
|
417
432
|
country?: string;
|
|
418
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
|
+
}
|
|
419
451
|
export interface CardCreateUsingPermanentTokenInputParam {
|
|
420
452
|
last4?: string;
|
|
421
453
|
iin?: string;
|
|
@@ -503,7 +535,20 @@ declare module 'chargebee' {
|
|
|
503
535
|
| 'dana'
|
|
504
536
|
| 'touch_n_go'
|
|
505
537
|
| 'tamara'
|
|
506
|
-
| 'qpay'
|
|
538
|
+
| 'qpay'
|
|
539
|
+
| 'ovo'
|
|
540
|
+
| 'momo'
|
|
541
|
+
| 'mercado_pago'
|
|
542
|
+
| 'nequi'
|
|
543
|
+
| 'nupay'
|
|
544
|
+
| 'picpay'
|
|
545
|
+
| 'thai_qr'
|
|
546
|
+
| 'blik'
|
|
547
|
+
| 'fpx'
|
|
548
|
+
| 'wero'
|
|
549
|
+
| 'p24'
|
|
550
|
+
| 'affirm_pay'
|
|
551
|
+
| 'rakuten_pay';
|
|
507
552
|
reference_id?: string;
|
|
508
553
|
/**
|
|
509
554
|
* @deprecated Please refer API docs to use other attributes
|
|
@@ -528,7 +573,7 @@ declare module 'chargebee' {
|
|
|
528
573
|
expiry_month: number;
|
|
529
574
|
expiry_year: number;
|
|
530
575
|
cvv?: string;
|
|
531
|
-
preferred_scheme?: 'cartes_bancaires' | 'mastercard' | 'visa';
|
|
576
|
+
preferred_scheme?: 'cartes_bancaires' | 'mastercard' | 'visa' | 'dankort';
|
|
532
577
|
billing_addr1?: string;
|
|
533
578
|
billing_addr2?: string;
|
|
534
579
|
billing_city?: string;
|
|
@@ -558,6 +603,9 @@ declare module 'chargebee' {
|
|
|
558
603
|
billing_address?: any;
|
|
559
604
|
}
|
|
560
605
|
|
|
606
|
+
export interface NetworkTransactionReferenceUpdateCardInputParam {
|
|
607
|
+
original_network_transaction_id?: string;
|
|
608
|
+
}
|
|
561
609
|
export interface CardUpdateCardInputParam {
|
|
562
610
|
first_name?: string;
|
|
563
611
|
last_name?: string;
|
|
@@ -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
|
+
}
|
|
@@ -36,6 +36,7 @@ declare module 'chargebee' {
|
|
|
36
36
|
export interface CreateForNewSubscriptionInputParam {
|
|
37
37
|
redirect_url?: string;
|
|
38
38
|
business_entity_id?: string;
|
|
39
|
+
brand_id?: string;
|
|
39
40
|
auto_select_local_currency?: boolean;
|
|
40
41
|
custom?: any;
|
|
41
42
|
pricing_page?: PricingPageCreateForNewSubscriptionInputParam;
|
|
@@ -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
|
+
}
|