chargebee 3.28.1 → 3.30.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 +140 -0
- package/cjs/chargebee.cjs.js +1 -1
- package/cjs/environment.js +1 -1
- package/cjs/resources/api_endpoints.js +126 -0
- package/cjs/resources/webhook/eventType.js +5 -0
- package/cjs/schema/alert.schema.js +11 -5
- package/cjs/schema/coupon.schema.js +1 -1
- package/cjs/schema/credit_note.schema.js +13 -0
- package/cjs/schema/credit_unit.schema.js +38 -0
- package/cjs/schema/customer.schema.js +39 -0
- package/cjs/schema/entitlement.schema.js +4 -4
- package/cjs/schema/estimate.schema.js +18 -0
- package/cjs/schema/event.schema.js +20 -0
- package/cjs/schema/export.schema.js +33 -1
- package/cjs/schema/feature.schema.js +0 -1
- package/cjs/schema/gift.schema.js +14 -0
- package/cjs/schema/grant_block.schema.js +4 -0
- package/cjs/schema/index.js +1 -0
- package/cjs/schema/invoice.schema.js +63 -3
- package/cjs/schema/ledger_operation.schema.js +14 -4
- package/cjs/schema/meter.schema.js +10 -0
- package/cjs/schema/omnichannel_subscription.schema.js +2 -2
- package/cjs/schema/payment_intent.schema.js +14 -0
- package/cjs/schema/payment_source.schema.js +49 -0
- package/cjs/schema/purchase.schema.js +7 -0
- package/cjs/schema/ramp.schema.js +4 -2
- package/cjs/schema/recorded_purchase.schema.js +3 -0
- package/cjs/schema/subscription.schema.js +94 -0
- package/cjs/schema/transaction.schema.js +32 -0
- package/cjs/schema/webhook_endpoint.schema.js +10 -0
- package/cjs/telemetry/TelemetryAdapter.js +12 -7
- package/esm/environment.js +1 -1
- package/esm/resources/api_endpoints.js +126 -0
- package/esm/resources/webhook/eventType.js +5 -0
- package/esm/schema/alert.schema.js +11 -5
- package/esm/schema/coupon.schema.js +1 -1
- package/esm/schema/credit_note.schema.js +13 -0
- package/esm/schema/credit_unit.schema.js +35 -0
- package/esm/schema/customer.schema.js +39 -0
- package/esm/schema/entitlement.schema.js +4 -4
- package/esm/schema/estimate.schema.js +18 -0
- package/esm/schema/event.schema.js +20 -0
- package/esm/schema/export.schema.js +33 -1
- package/esm/schema/feature.schema.js +0 -1
- package/esm/schema/gift.schema.js +14 -0
- package/esm/schema/grant_block.schema.js +4 -0
- package/esm/schema/index.js +1 -0
- package/esm/schema/invoice.schema.js +63 -3
- package/esm/schema/ledger_operation.schema.js +13 -3
- package/esm/schema/meter.schema.js +10 -0
- package/esm/schema/omnichannel_subscription.schema.js +2 -2
- package/esm/schema/payment_intent.schema.js +14 -0
- package/esm/schema/payment_source.schema.js +49 -0
- package/esm/schema/purchase.schema.js +7 -0
- package/esm/schema/ramp.schema.js +4 -2
- package/esm/schema/recorded_purchase.schema.js +3 -0
- package/esm/schema/subscription.schema.js +94 -0
- package/esm/schema/transaction.schema.js +32 -0
- package/esm/schema/webhook_endpoint.schema.js +10 -0
- package/esm/telemetry/TelemetryAdapter.js +12 -7
- package/package.json +1 -1
- package/types/core.d.ts +65 -6
- package/types/index.d.ts +15 -8
- package/types/resources/Alert.d.ts +18 -3
- package/types/resources/AsyncResponse.d.ts +35 -0
- package/types/resources/AsyncResponseList.d.ts +8 -0
- package/types/resources/AttachedItem.d.ts +2 -2
- package/types/resources/ColumnDefinition.d.ts +9 -0
- package/types/resources/Content.d.ts +7 -0
- package/types/resources/CreditNote.d.ts +15 -0
- package/types/resources/CreditNoteEstimate.d.ts +5 -0
- package/types/resources/CreditUnit.d.ts +90 -0
- package/types/resources/Customer.d.ts +16 -2
- package/types/resources/Estimate.d.ts +20 -2
- package/types/resources/Event.d.ts +5 -0
- package/types/resources/Export.d.ts +1 -0
- package/types/resources/Feature.d.ts +2 -0
- package/types/resources/Gift.d.ts +16 -2
- package/types/resources/GrantBlock.d.ts +12 -6
- package/types/resources/Invoice.d.ts +41 -3
- package/types/resources/InvoiceEstimate.d.ts +5 -0
- package/types/resources/LedgerAccountBalance.d.ts +3 -1
- package/types/resources/LedgerEntry.d.ts +22 -0
- package/types/resources/LedgerOperation.d.ts +34 -9
- package/types/resources/Meter.d.ts +42 -0
- package/types/resources/MeteredFeature.d.ts +70 -0
- package/types/resources/PaymentIntent.d.ts +57 -5
- package/types/resources/PaymentSource.d.ts +8 -1
- package/types/resources/PromotionalGrant.d.ts +1 -1
- package/types/resources/Purchase.d.ts +8 -1
- package/types/resources/Quote.d.ts +5 -0
- package/types/resources/QuoteLineGroup.d.ts +5 -0
- package/types/resources/QuotedCharge.d.ts +3 -0
- package/types/resources/Ramp.d.ts +4 -1
- package/types/resources/RecordedPurchase.d.ts +3 -0
- package/types/resources/Subscription.d.ts +58 -7
- package/types/resources/WebhookEvent.d.ts +33 -0
|
@@ -43,6 +43,7 @@ declare module 'chargebee' {
|
|
|
43
43
|
resource_version?: number;
|
|
44
44
|
updated_at?: number;
|
|
45
45
|
line_items_next_offset?: string;
|
|
46
|
+
exchange_rates?: Invoice.ExchangeRate[];
|
|
46
47
|
first_invoice?: boolean;
|
|
47
48
|
new_sales_amount?: number;
|
|
48
49
|
has_advance_charges?: boolean;
|
|
@@ -499,6 +500,10 @@ declare module 'chargebee' {
|
|
|
499
500
|
invoice: Invoice;
|
|
500
501
|
}
|
|
501
502
|
|
|
503
|
+
export interface ExchangeRate {
|
|
504
|
+
currency_code: string;
|
|
505
|
+
rate: number;
|
|
506
|
+
}
|
|
502
507
|
export interface LineItem {
|
|
503
508
|
id?: string;
|
|
504
509
|
subscription_id?: string;
|
|
@@ -547,6 +552,11 @@ declare module 'chargebee' {
|
|
|
547
552
|
| 'tax_not_configured_external_provider';
|
|
548
553
|
entity_id?: string;
|
|
549
554
|
customer_id?: string;
|
|
555
|
+
proration_mode?:
|
|
556
|
+
| 'reset'
|
|
557
|
+
| 'delta'
|
|
558
|
+
| 'service_period_revision'
|
|
559
|
+
| 'adjusted_term';
|
|
550
560
|
}
|
|
551
561
|
export interface LineItemTier {
|
|
552
562
|
line_item_id?: string;
|
|
@@ -688,7 +698,11 @@ declare module 'chargebee' {
|
|
|
688
698
|
export interface DunningAttempt {
|
|
689
699
|
attempt: number;
|
|
690
700
|
transaction_id?: string;
|
|
691
|
-
dunning_type:
|
|
701
|
+
dunning_type:
|
|
702
|
+
| 'auto_collect'
|
|
703
|
+
| 'offline'
|
|
704
|
+
| 'direct_debit'
|
|
705
|
+
| 'real_time_payments';
|
|
692
706
|
created_at?: number;
|
|
693
707
|
txn_status?:
|
|
694
708
|
| 'in_progress'
|
|
@@ -911,6 +925,7 @@ declare module 'chargebee' {
|
|
|
911
925
|
auto_collection?: AutoCollectionEnum;
|
|
912
926
|
net_term_days?: number;
|
|
913
927
|
invoice_date?: number;
|
|
928
|
+
create_pending_invoice?: boolean;
|
|
914
929
|
token_id?: string;
|
|
915
930
|
replace_primary_payment_source?: boolean;
|
|
916
931
|
retain_payment_source?: boolean;
|
|
@@ -1022,6 +1037,7 @@ declare module 'chargebee' {
|
|
|
1022
1037
|
net_term_days?: number;
|
|
1023
1038
|
has_advance_charges?: boolean;
|
|
1024
1039
|
use_for_proration?: boolean;
|
|
1040
|
+
paid_at?: number;
|
|
1025
1041
|
credit_note?: CreditNoteImportInvoiceInputParam;
|
|
1026
1042
|
billing_address?: BillingAddressImportInvoiceInputParam;
|
|
1027
1043
|
shipping_address?: ShippingAddressImportInvoiceInputParam;
|
|
@@ -1294,7 +1310,14 @@ declare module 'chargebee' {
|
|
|
1294
1310
|
| 'alipay_hk'
|
|
1295
1311
|
| 'paypay'
|
|
1296
1312
|
| 'gcash'
|
|
1297
|
-
| 'south_korean_cards'
|
|
1313
|
+
| 'south_korean_cards'
|
|
1314
|
+
| 'paynow'
|
|
1315
|
+
| 'bizum'
|
|
1316
|
+
| 'promptpay'
|
|
1317
|
+
| 'dana'
|
|
1318
|
+
| 'touch_n_go'
|
|
1319
|
+
| 'tamara'
|
|
1320
|
+
| 'qpay';
|
|
1298
1321
|
reference_id?: string;
|
|
1299
1322
|
/**
|
|
1300
1323
|
* @deprecated Please refer API docs to use other attributes
|
|
@@ -1465,7 +1488,14 @@ declare module 'chargebee' {
|
|
|
1465
1488
|
| 'alipay_hk'
|
|
1466
1489
|
| 'paypay'
|
|
1467
1490
|
| 'gcash'
|
|
1468
|
-
| 'south_korean_cards'
|
|
1491
|
+
| 'south_korean_cards'
|
|
1492
|
+
| 'paynow'
|
|
1493
|
+
| 'bizum'
|
|
1494
|
+
| 'promptpay'
|
|
1495
|
+
| 'dana'
|
|
1496
|
+
| 'touch_n_go'
|
|
1497
|
+
| 'tamara'
|
|
1498
|
+
| 'qpay';
|
|
1469
1499
|
reference_id?: string;
|
|
1470
1500
|
/**
|
|
1471
1501
|
* @deprecated Please refer API docs to use other attributes
|
|
@@ -1505,6 +1535,7 @@ declare module 'chargebee' {
|
|
|
1505
1535
|
}
|
|
1506
1536
|
|
|
1507
1537
|
export interface ChargesCreateForChargeItemsAndChargesInputParam {
|
|
1538
|
+
entity_description?: string;
|
|
1508
1539
|
amount?: number;
|
|
1509
1540
|
amount_in_decimal?: string;
|
|
1510
1541
|
description?: string;
|
|
@@ -1545,6 +1576,8 @@ declare module 'chargebee' {
|
|
|
1545
1576
|
unit_price_in_decimal?: string;
|
|
1546
1577
|
date_from?: number;
|
|
1547
1578
|
date_to?: number;
|
|
1579
|
+
description?: string;
|
|
1580
|
+
entity_description?: string;
|
|
1548
1581
|
}
|
|
1549
1582
|
export interface TaxProvidersFieldsCreateForChargeItemsAndChargesInputParam {
|
|
1550
1583
|
provider_name?: string;
|
|
@@ -1741,6 +1774,11 @@ declare module 'chargebee' {
|
|
|
1741
1774
|
tax9_amount?: number;
|
|
1742
1775
|
tax10_name?: string;
|
|
1743
1776
|
tax10_amount?: number;
|
|
1777
|
+
proration_mode?:
|
|
1778
|
+
| 'reset'
|
|
1779
|
+
| 'delta'
|
|
1780
|
+
| 'service_period_revision'
|
|
1781
|
+
| 'adjusted_term';
|
|
1744
1782
|
created_at?: number;
|
|
1745
1783
|
}
|
|
1746
1784
|
export interface TransactionsApplyPaymentsInputParam {
|
|
@@ -72,6 +72,11 @@ declare module 'chargebee' {
|
|
|
72
72
|
| 'tax_not_configured_external_provider';
|
|
73
73
|
entity_id?: string;
|
|
74
74
|
customer_id?: string;
|
|
75
|
+
proration_mode?:
|
|
76
|
+
| 'reset'
|
|
77
|
+
| 'delta'
|
|
78
|
+
| 'service_period_revision'
|
|
79
|
+
| 'adjusted_term';
|
|
75
80
|
}
|
|
76
81
|
export interface LineItemTier {
|
|
77
82
|
line_item_id?: string;
|
|
@@ -6,7 +6,9 @@ declare module 'chargebee' {
|
|
|
6
6
|
subscription_id: string;
|
|
7
7
|
unit_id: string;
|
|
8
8
|
unit_type: 'credit_unit';
|
|
9
|
-
|
|
9
|
+
created_at: number;
|
|
10
|
+
modified_at: number;
|
|
11
|
+
resource_version?: number;
|
|
10
12
|
provisioned_balance?: LedgerAccountBalance.ProvisionedBalance;
|
|
11
13
|
overdraft_balance?: LedgerAccountBalance.OverdraftBalance;
|
|
12
14
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
|
|
4
|
+
declare module 'chargebee' {
|
|
5
|
+
export interface LedgerEntry {
|
|
6
|
+
id: string;
|
|
7
|
+
subscription_id?: string;
|
|
8
|
+
account_type?: 'provisioned' | 'overdraft';
|
|
9
|
+
unit_id?: string;
|
|
10
|
+
unit_type?: 'credit_unit';
|
|
11
|
+
amount: string;
|
|
12
|
+
grant_block_start_balance: string;
|
|
13
|
+
grant_block_end_balance: string;
|
|
14
|
+
account_start_balance: string;
|
|
15
|
+
account_end_balance: string;
|
|
16
|
+
type: TypeEnum;
|
|
17
|
+
ledger_operation_id: string;
|
|
18
|
+
grant_block_id: string;
|
|
19
|
+
created_at: number;
|
|
20
|
+
modified_at: number;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
declare module 'chargebee' {
|
|
5
5
|
export interface LedgerOperation {
|
|
6
6
|
id: string;
|
|
7
|
+
subscription_id?: string;
|
|
8
|
+
unit_id?: string;
|
|
9
|
+
unit_type?: 'credit_unit';
|
|
7
10
|
type:
|
|
8
11
|
| 'allocation'
|
|
9
12
|
| 'capture'
|
|
@@ -15,21 +18,16 @@ declare module 'chargebee' {
|
|
|
15
18
|
| 'rollover'
|
|
16
19
|
| 'adjustment';
|
|
17
20
|
amount: string;
|
|
18
|
-
start_balance: string;
|
|
19
|
-
end_balance: string;
|
|
20
21
|
provisioned_start_balance: string;
|
|
21
22
|
provisioned_end_balance: string;
|
|
22
23
|
overdraft_start_balance: string;
|
|
23
24
|
overdraft_end_balance: string;
|
|
24
25
|
parent_ledger_operation_id?: string;
|
|
25
|
-
ledger_operation_timestamp
|
|
26
|
+
ledger_operation_timestamp: number;
|
|
26
27
|
auto_release_timestamp?: number;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
subscription_id?: string;
|
|
31
|
-
unit_id?: string;
|
|
32
|
-
unit_type?: 'credit_unit';
|
|
28
|
+
created_at: number;
|
|
29
|
+
modified_at: number;
|
|
30
|
+
metadata?: any;
|
|
33
31
|
}
|
|
34
32
|
|
|
35
33
|
export namespace LedgerOperation {
|
|
@@ -63,6 +61,11 @@ declare module 'chargebee' {
|
|
|
63
61
|
input: ReleaseAuthorizationInputParam,
|
|
64
62
|
headers?: ChargebeeRequestHeader,
|
|
65
63
|
): Promise<ChargebeeResponse<ReleaseAuthorizationResponse>>;
|
|
64
|
+
|
|
65
|
+
allocate(
|
|
66
|
+
input: AllocateInputParam,
|
|
67
|
+
headers?: ChargebeeRequestHeader,
|
|
68
|
+
): Promise<ChargebeeResponse<AllocateResponse>>;
|
|
66
69
|
}
|
|
67
70
|
|
|
68
71
|
export interface RetrieveLedgerOperationResponse {
|
|
@@ -77,21 +80,36 @@ declare module 'chargebee' {
|
|
|
77
80
|
export interface CaptureResponse {
|
|
78
81
|
ledger_operation: LedgerOperation;
|
|
79
82
|
ledger_account_balance: LedgerAccountBalance;
|
|
83
|
+
grant_blocks: GrantBlock[];
|
|
84
|
+
ledger_entries: LedgerEntry[];
|
|
80
85
|
}
|
|
81
86
|
|
|
82
87
|
export interface AuthorizeResponse {
|
|
83
88
|
ledger_operation: LedgerOperation;
|
|
84
89
|
ledger_account_balance: LedgerAccountBalance;
|
|
90
|
+
grant_blocks: GrantBlock[];
|
|
91
|
+
ledger_entries: LedgerEntry[];
|
|
85
92
|
}
|
|
86
93
|
|
|
87
94
|
export interface CaptureAuthorizationResponse {
|
|
88
95
|
ledger_operation: LedgerOperation;
|
|
89
96
|
ledger_account_balance: LedgerAccountBalance;
|
|
97
|
+
grant_blocks: GrantBlock[];
|
|
98
|
+
ledger_entries: LedgerEntry[];
|
|
90
99
|
}
|
|
91
100
|
|
|
92
101
|
export interface ReleaseAuthorizationResponse {
|
|
93
102
|
ledger_operation: LedgerOperation;
|
|
94
103
|
ledger_account_balance: LedgerAccountBalance;
|
|
104
|
+
grant_blocks: GrantBlock[];
|
|
105
|
+
ledger_entries: LedgerEntry[];
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export interface AllocateResponse {
|
|
109
|
+
ledger_account_balance: LedgerAccountBalance;
|
|
110
|
+
ledger_operations: LedgerOperation[];
|
|
111
|
+
grant_blocks: GrantBlock[];
|
|
112
|
+
ledger_entries: LedgerEntry[];
|
|
95
113
|
}
|
|
96
114
|
|
|
97
115
|
// REQUEST PARAMS
|
|
@@ -137,5 +155,12 @@ declare module 'chargebee' {
|
|
|
137
155
|
ledger_operation_timestamp: number;
|
|
138
156
|
metadata?: any;
|
|
139
157
|
}
|
|
158
|
+
export interface AllocateInputParam {
|
|
159
|
+
subscription_id: string;
|
|
160
|
+
unit_id: string;
|
|
161
|
+
amount: string;
|
|
162
|
+
expires_at: number;
|
|
163
|
+
metadata?: any;
|
|
164
|
+
}
|
|
140
165
|
}
|
|
141
166
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
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 Meter {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
type: 'simple' | 'compound';
|
|
10
|
+
status?: 'active' | 'archived' | 'deleted';
|
|
11
|
+
query: string;
|
|
12
|
+
created_at: number;
|
|
13
|
+
updated_at?: number;
|
|
14
|
+
column_definitions?: ColumnDefinition[];
|
|
15
|
+
features?: Feature[];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export namespace Meter {
|
|
19
|
+
export class MeterResource {
|
|
20
|
+
list(
|
|
21
|
+
input?: ListInputParam,
|
|
22
|
+
headers?: ChargebeeRequestHeader,
|
|
23
|
+
): Promise<ChargebeeResponse<ListResponse>>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface ListResponse {
|
|
27
|
+
list: { meter: Meter }[];
|
|
28
|
+
next_offset?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// REQUEST PARAMS
|
|
32
|
+
//---------------
|
|
33
|
+
|
|
34
|
+
export interface ListInputParam {
|
|
35
|
+
limit?: number;
|
|
36
|
+
offset?: string;
|
|
37
|
+
name?: filter.String;
|
|
38
|
+
'sort_by[asc]'?: string;
|
|
39
|
+
'sort_by[desc]'?: string;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
|
|
4
|
+
declare module 'chargebee' {
|
|
5
|
+
export interface MeteredFeature {
|
|
6
|
+
id: string;
|
|
7
|
+
name?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
type?: TypeEnum;
|
|
10
|
+
status?: StatusEnum;
|
|
11
|
+
query?: string;
|
|
12
|
+
column_definitions?: ColumnDefinition[];
|
|
13
|
+
features?: Feature[];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export namespace MeteredFeature {
|
|
17
|
+
export class MeteredFeatureResource {
|
|
18
|
+
create(
|
|
19
|
+
input: CreateInputParam,
|
|
20
|
+
headers?: ChargebeeRequestHeader,
|
|
21
|
+
): Promise<ChargebeeResponse<CreateResponse>>;
|
|
22
|
+
|
|
23
|
+
archive(
|
|
24
|
+
metered_feature_id: string,
|
|
25
|
+
headers?: ChargebeeRequestHeader,
|
|
26
|
+
): Promise<ChargebeeResponse<ArchiveResponse>>;
|
|
27
|
+
|
|
28
|
+
reactivate(
|
|
29
|
+
metered_feature_id: string,
|
|
30
|
+
headers?: ChargebeeRequestHeader,
|
|
31
|
+
): Promise<ChargebeeResponse<ReactivateResponse>>;
|
|
32
|
+
|
|
33
|
+
delete(
|
|
34
|
+
metered_feature_id: string,
|
|
35
|
+
headers?: ChargebeeRequestHeader,
|
|
36
|
+
): Promise<ChargebeeResponse<DeleteResponse>>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface CreateResponse {
|
|
40
|
+
meter: Meter;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface ArchiveResponse {
|
|
44
|
+
meter: Meter;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface ReactivateResponse {
|
|
48
|
+
meter: Meter;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface DeleteResponse {
|
|
52
|
+
meter: Meter;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// REQUEST PARAMS
|
|
56
|
+
//---------------
|
|
57
|
+
|
|
58
|
+
export interface CreateInputParam {
|
|
59
|
+
name: string;
|
|
60
|
+
description?: string;
|
|
61
|
+
feature_unit: string;
|
|
62
|
+
query: string;
|
|
63
|
+
column_definitions?: ColumnDefinitionsCreateInputParam[];
|
|
64
|
+
}
|
|
65
|
+
export interface ColumnDefinitionsCreateInputParam {
|
|
66
|
+
column_name: string;
|
|
67
|
+
data_type: 'number' | 'string';
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -55,7 +55,14 @@ declare module 'chargebee' {
|
|
|
55
55
|
| 'alipay_hk'
|
|
56
56
|
| 'paypay'
|
|
57
57
|
| 'gcash'
|
|
58
|
-
| 'south_korean_cards'
|
|
58
|
+
| 'south_korean_cards'
|
|
59
|
+
| 'paynow'
|
|
60
|
+
| 'bizum'
|
|
61
|
+
| 'promptpay'
|
|
62
|
+
| 'dana'
|
|
63
|
+
| 'touch_n_go'
|
|
64
|
+
| 'tamara'
|
|
65
|
+
| 'qpay';
|
|
59
66
|
success_url?: string;
|
|
60
67
|
failure_url?: string;
|
|
61
68
|
created_at: number;
|
|
@@ -66,6 +73,7 @@ declare module 'chargebee' {
|
|
|
66
73
|
gateway?: string;
|
|
67
74
|
active_payment_attempt?: PaymentIntent.PaymentAttempt;
|
|
68
75
|
payment_attempts?: PaymentIntent.PaymentAttempt[];
|
|
76
|
+
payment_intent_metadata?: PaymentIntent.PaymentIntentMetadata;
|
|
69
77
|
business_entity_id?: string;
|
|
70
78
|
}
|
|
71
79
|
|
|
@@ -155,7 +163,14 @@ declare module 'chargebee' {
|
|
|
155
163
|
| 'alipay_hk'
|
|
156
164
|
| 'paypay'
|
|
157
165
|
| 'gcash'
|
|
158
|
-
| 'south_korean_cards'
|
|
166
|
+
| 'south_korean_cards'
|
|
167
|
+
| 'paynow'
|
|
168
|
+
| 'bizum'
|
|
169
|
+
| 'promptpay'
|
|
170
|
+
| 'dana'
|
|
171
|
+
| 'touch_n_go'
|
|
172
|
+
| 'tamara'
|
|
173
|
+
| 'qpay';
|
|
159
174
|
id_at_gateway?: string;
|
|
160
175
|
error_code?: string;
|
|
161
176
|
error_text?: string;
|
|
@@ -219,7 +234,14 @@ declare module 'chargebee' {
|
|
|
219
234
|
| 'alipay_hk'
|
|
220
235
|
| 'paypay'
|
|
221
236
|
| 'gcash'
|
|
222
|
-
| 'south_korean_cards'
|
|
237
|
+
| 'south_korean_cards'
|
|
238
|
+
| 'paynow'
|
|
239
|
+
| 'bizum'
|
|
240
|
+
| 'promptpay'
|
|
241
|
+
| 'dana'
|
|
242
|
+
| 'touch_n_go'
|
|
243
|
+
| 'tamara'
|
|
244
|
+
| 'qpay';
|
|
223
245
|
id_at_gateway?: string;
|
|
224
246
|
error_code?: string;
|
|
225
247
|
error_text?: string;
|
|
@@ -228,6 +250,22 @@ declare module 'chargebee' {
|
|
|
228
250
|
modified_at: number;
|
|
229
251
|
error_detail?: GatewayErrorDetail;
|
|
230
252
|
}
|
|
253
|
+
export interface PaymentIntentMetadata {
|
|
254
|
+
source:
|
|
255
|
+
| 'cb_js'
|
|
256
|
+
| 'components_fields'
|
|
257
|
+
| 'checkout_v3'
|
|
258
|
+
| 'paynow_v3'
|
|
259
|
+
| 'portal_v3'
|
|
260
|
+
| 'gift_v3'
|
|
261
|
+
| 'checkout_v4'
|
|
262
|
+
| 'payment_component'
|
|
263
|
+
| 'pc_inapp_v4'
|
|
264
|
+
| 'pc_fpc_v4';
|
|
265
|
+
client_ip_address?: string;
|
|
266
|
+
user_agent?: string;
|
|
267
|
+
created_at?: number;
|
|
268
|
+
}
|
|
231
269
|
// REQUEST PARAMS
|
|
232
270
|
//---------------
|
|
233
271
|
|
|
@@ -284,7 +322,14 @@ declare module 'chargebee' {
|
|
|
284
322
|
| 'alipay_hk'
|
|
285
323
|
| 'paypay'
|
|
286
324
|
| 'gcash'
|
|
287
|
-
| 'south_korean_cards'
|
|
325
|
+
| 'south_korean_cards'
|
|
326
|
+
| 'paynow'
|
|
327
|
+
| 'bizum'
|
|
328
|
+
| 'promptpay'
|
|
329
|
+
| 'dana'
|
|
330
|
+
| 'touch_n_go'
|
|
331
|
+
| 'tamara'
|
|
332
|
+
| 'qpay';
|
|
288
333
|
success_url?: string;
|
|
289
334
|
failure_url?: string;
|
|
290
335
|
}
|
|
@@ -337,7 +382,14 @@ declare module 'chargebee' {
|
|
|
337
382
|
| 'alipay_hk'
|
|
338
383
|
| 'paypay'
|
|
339
384
|
| 'gcash'
|
|
340
|
-
| 'south_korean_cards'
|
|
385
|
+
| 'south_korean_cards'
|
|
386
|
+
| 'paynow'
|
|
387
|
+
| 'bizum'
|
|
388
|
+
| 'promptpay'
|
|
389
|
+
| 'dana'
|
|
390
|
+
| 'touch_n_go'
|
|
391
|
+
| 'tamara'
|
|
392
|
+
| 'qpay';
|
|
341
393
|
success_url?: string;
|
|
342
394
|
failure_url?: string;
|
|
343
395
|
}
|
|
@@ -479,7 +479,14 @@ declare module 'chargebee' {
|
|
|
479
479
|
| 'alipay_hk'
|
|
480
480
|
| 'paypay'
|
|
481
481
|
| 'gcash'
|
|
482
|
-
| 'south_korean_cards'
|
|
482
|
+
| 'south_korean_cards'
|
|
483
|
+
| 'paynow'
|
|
484
|
+
| 'bizum'
|
|
485
|
+
| 'promptpay'
|
|
486
|
+
| 'dana'
|
|
487
|
+
| 'touch_n_go'
|
|
488
|
+
| 'tamara'
|
|
489
|
+
| 'qpay';
|
|
483
490
|
reference_id?: string;
|
|
484
491
|
/**
|
|
485
492
|
* @deprecated Please refer API docs to use other attributes
|
|
@@ -122,7 +122,14 @@ declare module 'chargebee' {
|
|
|
122
122
|
| 'alipay_hk'
|
|
123
123
|
| 'paypay'
|
|
124
124
|
| 'gcash'
|
|
125
|
-
| 'south_korean_cards'
|
|
125
|
+
| 'south_korean_cards'
|
|
126
|
+
| 'paynow'
|
|
127
|
+
| 'bizum'
|
|
128
|
+
| 'promptpay'
|
|
129
|
+
| 'dana'
|
|
130
|
+
| 'touch_n_go'
|
|
131
|
+
| 'tamara'
|
|
132
|
+
| 'qpay';
|
|
126
133
|
reference_id?: string;
|
|
127
134
|
/**
|
|
128
135
|
* @deprecated Please refer API docs to use other attributes
|
|
@@ -429,6 +429,11 @@ declare module 'chargebee' {
|
|
|
429
429
|
| 'tax_not_configured_external_provider';
|
|
430
430
|
entity_id?: string;
|
|
431
431
|
customer_id?: string;
|
|
432
|
+
proration_mode?:
|
|
433
|
+
| 'reset'
|
|
434
|
+
| 'delta'
|
|
435
|
+
| 'service_period_revision'
|
|
436
|
+
| 'adjusted_term';
|
|
432
437
|
}
|
|
433
438
|
export interface LineItemTier {
|
|
434
439
|
line_item_id?: string;
|
|
@@ -74,6 +74,11 @@ declare module 'chargebee' {
|
|
|
74
74
|
| 'tax_not_configured_external_provider';
|
|
75
75
|
entity_id?: string;
|
|
76
76
|
customer_id?: string;
|
|
77
|
+
proration_mode?:
|
|
78
|
+
| 'reset'
|
|
79
|
+
| 'delta'
|
|
80
|
+
| 'service_period_revision'
|
|
81
|
+
| 'adjusted_term';
|
|
77
82
|
}
|
|
78
83
|
export interface LineItemDiscount {
|
|
79
84
|
line_item_id: string;
|
|
@@ -16,6 +16,7 @@ declare module 'chargebee' {
|
|
|
16
16
|
amount?: number;
|
|
17
17
|
amount_in_decimal?: string;
|
|
18
18
|
description?: string;
|
|
19
|
+
entity_description?: string;
|
|
19
20
|
service_period_in_days?: number;
|
|
20
21
|
avalara_sale_type?: 'wholesale' | 'retail' | 'consumed' | 'vendor_use';
|
|
21
22
|
avalara_transaction_type?: number;
|
|
@@ -36,6 +37,8 @@ declare module 'chargebee' {
|
|
|
36
37
|
quantity_in_decimal?: string;
|
|
37
38
|
unit_price?: number;
|
|
38
39
|
unit_price_in_decimal?: string;
|
|
40
|
+
description?: string;
|
|
41
|
+
entity_description?: string;
|
|
39
42
|
service_period_days?: number;
|
|
40
43
|
}
|
|
41
44
|
export interface ItemTier {
|
|
@@ -126,9 +126,10 @@ declare module 'chargebee' {
|
|
|
126
126
|
export interface DiscountsToAdd {
|
|
127
127
|
id: string;
|
|
128
128
|
invoice_name?: string;
|
|
129
|
-
type: 'fixed_amount' | 'percentage';
|
|
129
|
+
type: 'fixed_amount' | 'percentage' | 'offer_quantity';
|
|
130
130
|
percentage?: number;
|
|
131
131
|
amount?: number;
|
|
132
|
+
quantity?: number;
|
|
132
133
|
duration_type: 'one_time' | 'forever' | 'limited_period';
|
|
133
134
|
period?: number;
|
|
134
135
|
period_unit?: 'day' | 'week' | 'month' | 'year';
|
|
@@ -248,6 +249,7 @@ declare module 'chargebee' {
|
|
|
248
249
|
duration_type: DurationTypeEnum;
|
|
249
250
|
percentage?: number;
|
|
250
251
|
amount?: number;
|
|
252
|
+
quantity?: number;
|
|
251
253
|
period?: number;
|
|
252
254
|
period_unit?: PeriodUnitEnum;
|
|
253
255
|
included_in_mrr?: boolean;
|
|
@@ -303,6 +305,7 @@ declare module 'chargebee' {
|
|
|
303
305
|
duration_type: DurationTypeEnum;
|
|
304
306
|
percentage?: number;
|
|
305
307
|
amount?: number;
|
|
308
|
+
quantity?: number;
|
|
306
309
|
period?: number;
|
|
307
310
|
period_unit?: PeriodUnitEnum;
|
|
308
311
|
included_in_mrr?: boolean;
|