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
package/types/index.d.ts
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
///<reference path='./resources/AdvanceInvoiceSchedule.d.ts' />
|
|
4
4
|
///<reference path='./resources/Alert.d.ts' />
|
|
5
5
|
///<reference path='./resources/AlertStatus.d.ts' />
|
|
6
|
+
///<reference path='./resources/AsyncResponse.d.ts' />
|
|
7
|
+
///<reference path='./resources/AsyncResponseList.d.ts' />
|
|
6
8
|
///<reference path='./resources/AttachedItem.d.ts' />
|
|
7
9
|
///<reference path='./resources/Attribute.d.ts' />
|
|
8
10
|
///<reference path='./resources/BillingConfiguration.d.ts' />
|
|
@@ -10,6 +12,7 @@
|
|
|
10
12
|
///<reference path='./resources/BusinessEntity.d.ts' />
|
|
11
13
|
///<reference path='./resources/BusinessEntityTransfer.d.ts' />
|
|
12
14
|
///<reference path='./resources/Card.d.ts' />
|
|
15
|
+
///<reference path='./resources/ColumnDefinition.d.ts' />
|
|
13
16
|
///<reference path='./resources/Comment.d.ts' />
|
|
14
17
|
///<reference path='./resources/Configuration.d.ts' />
|
|
15
18
|
///<reference path='./resources/Contact.d.ts' />
|
|
@@ -20,6 +23,7 @@
|
|
|
20
23
|
///<reference path='./resources/CpqQuoteSignature.d.ts' />
|
|
21
24
|
///<reference path='./resources/CreditNote.d.ts' />
|
|
22
25
|
///<reference path='./resources/CreditNoteEstimate.d.ts' />
|
|
26
|
+
///<reference path='./resources/CreditUnit.d.ts' />
|
|
23
27
|
///<reference path='./resources/Currency.d.ts' />
|
|
24
28
|
///<reference path='./resources/Customer.d.ts' />
|
|
25
29
|
///<reference path='./resources/CustomerEntitlement.d.ts' />
|
|
@@ -51,8 +55,11 @@
|
|
|
51
55
|
///<reference path='./resources/ItemFamily.d.ts' />
|
|
52
56
|
///<reference path='./resources/ItemPrice.d.ts' />
|
|
53
57
|
///<reference path='./resources/LedgerAccountBalance.d.ts' />
|
|
58
|
+
///<reference path='./resources/LedgerEntry.d.ts' />
|
|
54
59
|
///<reference path='./resources/LedgerOperation.d.ts' />
|
|
55
60
|
///<reference path='./resources/Metadata.d.ts' />
|
|
61
|
+
///<reference path='./resources/Meter.d.ts' />
|
|
62
|
+
///<reference path='./resources/MeteredFeature.d.ts' />
|
|
56
63
|
///<reference path='./resources/NonSubscription.d.ts' />
|
|
57
64
|
///<reference path='./resources/OfferEvent.d.ts' />
|
|
58
65
|
///<reference path='./resources/OfferFulfillment.d.ts' />
|
|
@@ -170,14 +177,14 @@ declare module 'chargebee' {
|
|
|
170
177
|
httpClient?: HttpClientInterface;
|
|
171
178
|
|
|
172
179
|
/**
|
|
173
|
-
* @
|
|
180
|
+
* @enableValidation When true, every request's parameters are validated against each endpoint's generated Zod schema before the HTTP request is sent. Violations throw `ChargebeeZodValidationError` with structured Zod issues. Calls with no params argument are validated as `{}`. Required resource ids in the URL path are still checked separately.
|
|
174
181
|
*/
|
|
175
|
-
|
|
182
|
+
enableValidation?: boolean;
|
|
176
183
|
|
|
177
184
|
/**
|
|
178
|
-
* @
|
|
185
|
+
* @telemetryAdapter optional telemetry adapter for observability (e.g. OpenTelemetry)
|
|
179
186
|
*/
|
|
180
|
-
|
|
187
|
+
telemetryAdapter?: TelemetryAdapter;
|
|
181
188
|
};
|
|
182
189
|
|
|
183
190
|
export interface HttpClientInterface {
|
|
@@ -214,10 +221,7 @@ declare module 'chargebee' {
|
|
|
214
221
|
chargebeeApiVersion: 'v1' | 'v2';
|
|
215
222
|
sdkName: string;
|
|
216
223
|
sdkVersion: string;
|
|
217
|
-
/**
|
|
218
|
-
* Prebuilt span attributes — pass these to your tracer. Captured `chargebee-*` request
|
|
219
|
-
* headers appear as `http.request.header.<name>` with string[] values per OTel semconv.
|
|
220
|
-
*/
|
|
224
|
+
/** Prebuilt span attributes — pass these to your tracer. */
|
|
221
225
|
startAttributes: Record<string, string | string[]>;
|
|
222
226
|
};
|
|
223
227
|
|
|
@@ -276,6 +280,7 @@ declare module 'chargebee' {
|
|
|
276
280
|
couponCode: CouponCode.CouponCodeResource;
|
|
277
281
|
couponSet: CouponSet.CouponSetResource;
|
|
278
282
|
creditNote: CreditNote.CreditNoteResource;
|
|
283
|
+
creditUnit: CreditUnit.CreditUnitResource;
|
|
279
284
|
currency: Currency.CurrencyResource;
|
|
280
285
|
customer: Customer.CustomerResource;
|
|
281
286
|
customerEntitlement: CustomerEntitlement.CustomerEntitlementResource;
|
|
@@ -297,6 +302,8 @@ declare module 'chargebee' {
|
|
|
297
302
|
itemPrice: ItemPrice.ItemPriceResource;
|
|
298
303
|
ledgerAccountBalance: LedgerAccountBalance.LedgerAccountBalanceResource;
|
|
299
304
|
ledgerOperation: LedgerOperation.LedgerOperationResource;
|
|
305
|
+
meter: Meter.MeterResource;
|
|
306
|
+
meteredFeature: MeteredFeature.MeteredFeatureResource;
|
|
300
307
|
nonSubscription: NonSubscription.NonSubscriptionResource;
|
|
301
308
|
offerEvent: OfferEvent.OfferEventResource;
|
|
302
309
|
offerFulfillment: OfferFulfillment.OfferFulfillmentResource;
|
|
@@ -7,12 +7,16 @@ declare module 'chargebee' {
|
|
|
7
7
|
type: TypeEnum;
|
|
8
8
|
name: string;
|
|
9
9
|
description?: string;
|
|
10
|
-
metered_feature_id
|
|
10
|
+
metered_feature_id?: string;
|
|
11
|
+
currency_code?: string;
|
|
12
|
+
unit_id?: string;
|
|
11
13
|
subscription_id?: string;
|
|
12
14
|
status?: 'enabled' | 'disabled';
|
|
13
15
|
meta?: string;
|
|
14
16
|
created_at: number;
|
|
15
17
|
updated_at: number;
|
|
18
|
+
threshold?: Alert.Threshold;
|
|
19
|
+
filter_conditions?: Alert.FilterCondition[];
|
|
16
20
|
}
|
|
17
21
|
|
|
18
22
|
export namespace Alert {
|
|
@@ -76,6 +80,15 @@ declare module 'chargebee' {
|
|
|
76
80
|
next_offset?: string;
|
|
77
81
|
}
|
|
78
82
|
|
|
83
|
+
export interface Threshold {
|
|
84
|
+
mode: ModeEnum;
|
|
85
|
+
value: number;
|
|
86
|
+
}
|
|
87
|
+
export interface FilterCondition {
|
|
88
|
+
field: 'plan_price_id';
|
|
89
|
+
operator: 'equals' | 'not_equals';
|
|
90
|
+
value: string;
|
|
91
|
+
}
|
|
79
92
|
// REQUEST PARAMS
|
|
80
93
|
//---------------
|
|
81
94
|
|
|
@@ -83,7 +96,9 @@ declare module 'chargebee' {
|
|
|
83
96
|
type: TypeEnum;
|
|
84
97
|
name: string;
|
|
85
98
|
description?: string;
|
|
86
|
-
metered_feature_id
|
|
99
|
+
metered_feature_id?: string;
|
|
100
|
+
currency_code?: string;
|
|
101
|
+
unit_id?: string;
|
|
87
102
|
subscription_id?: string;
|
|
88
103
|
meta?: string;
|
|
89
104
|
threshold?: ThresholdCreateInputParam;
|
|
@@ -108,7 +123,7 @@ declare module 'chargebee' {
|
|
|
108
123
|
type?: filter.Enum;
|
|
109
124
|
}
|
|
110
125
|
export interface ThresholdCreateInputParam {
|
|
111
|
-
mode
|
|
126
|
+
mode?: ModeEnum;
|
|
112
127
|
value: number;
|
|
113
128
|
}
|
|
114
129
|
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
|
|
4
|
+
declare module 'chargebee' {
|
|
5
|
+
export interface AsyncResponse {
|
|
6
|
+
api_version?: string;
|
|
7
|
+
created_at?: number;
|
|
8
|
+
completed_at?: number;
|
|
9
|
+
status: 'success' | 'failed';
|
|
10
|
+
request?: AsyncResponse.RequestAsyncApi;
|
|
11
|
+
error_detail?: AsyncResponse.Error;
|
|
12
|
+
result?: any;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export namespace AsyncResponse {
|
|
16
|
+
export interface RequestAsyncApi {
|
|
17
|
+
id: string;
|
|
18
|
+
resource?: string;
|
|
19
|
+
operation_type?: string;
|
|
20
|
+
method?: string;
|
|
21
|
+
uri?: string;
|
|
22
|
+
idempotency_key?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface Error {
|
|
25
|
+
message?: string;
|
|
26
|
+
type?: string;
|
|
27
|
+
api_error_code?: string;
|
|
28
|
+
error_code?: string;
|
|
29
|
+
error_msg?: string;
|
|
30
|
+
http_status_code?: string;
|
|
31
|
+
}
|
|
32
|
+
// REQUEST PARAMS
|
|
33
|
+
//---------------
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -11,8 +11,8 @@ declare module 'chargebee' {
|
|
|
11
11
|
quantity?: number;
|
|
12
12
|
quantity_in_decimal?: string;
|
|
13
13
|
billing_cycles?: number;
|
|
14
|
-
charge_on_event
|
|
15
|
-
charge_once
|
|
14
|
+
charge_on_event?: ChargeOnEventEnum;
|
|
15
|
+
charge_once?: boolean;
|
|
16
16
|
created_at: number;
|
|
17
17
|
resource_version?: number;
|
|
18
18
|
updated_at?: number;
|
|
@@ -8,6 +8,8 @@ declare module 'chargebee' {
|
|
|
8
8
|
advance_invoice_schedule: AdvanceInvoiceSchedule;
|
|
9
9
|
alert: Alert;
|
|
10
10
|
alert_status: AlertStatus;
|
|
11
|
+
async_response: AsyncResponse;
|
|
12
|
+
async_response_list: AsyncResponseList;
|
|
11
13
|
attached_item: AttachedItem;
|
|
12
14
|
attribute: Attribute;
|
|
13
15
|
billing_configuration: BillingConfiguration;
|
|
@@ -15,6 +17,7 @@ declare module 'chargebee' {
|
|
|
15
17
|
business_entity: BusinessEntity;
|
|
16
18
|
business_entity_transfer: BusinessEntityTransfer;
|
|
17
19
|
card: Card;
|
|
20
|
+
column_definition: ColumnDefinition;
|
|
18
21
|
comment: Comment;
|
|
19
22
|
configuration: Configuration;
|
|
20
23
|
contact: Contact;
|
|
@@ -25,6 +28,7 @@ declare module 'chargebee' {
|
|
|
25
28
|
cpq_quote_signature: CpqQuoteSignature;
|
|
26
29
|
credit_note: CreditNote;
|
|
27
30
|
credit_note_estimate: CreditNoteEstimate;
|
|
31
|
+
credit_unit: CreditUnit;
|
|
28
32
|
currency: Currency;
|
|
29
33
|
customer: Customer;
|
|
30
34
|
customer_entitlement: CustomerEntitlement;
|
|
@@ -56,8 +60,11 @@ declare module 'chargebee' {
|
|
|
56
60
|
item_family: ItemFamily;
|
|
57
61
|
item_price: ItemPrice;
|
|
58
62
|
ledger_account_balance: LedgerAccountBalance;
|
|
63
|
+
ledger_entry: LedgerEntry;
|
|
59
64
|
ledger_operation: LedgerOperation;
|
|
60
65
|
metadata: Metadata;
|
|
66
|
+
meter: Meter;
|
|
67
|
+
metered_feature: MeteredFeature;
|
|
61
68
|
non_subscription: NonSubscription;
|
|
62
69
|
offer_event: OfferEvent;
|
|
63
70
|
offer_fulfillment: OfferFulfillment;
|
|
@@ -58,6 +58,7 @@ declare module 'chargebee' {
|
|
|
58
58
|
deleted: boolean;
|
|
59
59
|
tax_category?: string;
|
|
60
60
|
local_currency_exchange_rate?: number;
|
|
61
|
+
exchange_rates?: CreditNote.ExchangeRate[];
|
|
61
62
|
create_reason_code?: string;
|
|
62
63
|
vat_number_prefix?: string;
|
|
63
64
|
business_entity_id?: string;
|
|
@@ -261,6 +262,11 @@ declare module 'chargebee' {
|
|
|
261
262
|
| 'tax_not_configured_external_provider';
|
|
262
263
|
entity_id?: string;
|
|
263
264
|
customer_id?: string;
|
|
265
|
+
proration_mode?:
|
|
266
|
+
| 'reset'
|
|
267
|
+
| 'delta'
|
|
268
|
+
| 'service_period_revision'
|
|
269
|
+
| 'adjusted_term';
|
|
264
270
|
}
|
|
265
271
|
export interface LineItemTier {
|
|
266
272
|
line_item_id?: string;
|
|
@@ -388,6 +394,10 @@ declare module 'chargebee' {
|
|
|
388
394
|
| 'pending';
|
|
389
395
|
tax_application?: 'pre_tax' | 'post_tax';
|
|
390
396
|
}
|
|
397
|
+
export interface ExchangeRate {
|
|
398
|
+
currency_code: string;
|
|
399
|
+
rate: number;
|
|
400
|
+
}
|
|
391
401
|
export interface ShippingAddress {
|
|
392
402
|
first_name?: string;
|
|
393
403
|
last_name?: string;
|
|
@@ -694,6 +704,11 @@ declare module 'chargebee' {
|
|
|
694
704
|
tax9_amount?: number;
|
|
695
705
|
tax10_name?: string;
|
|
696
706
|
tax10_amount?: number;
|
|
707
|
+
proration_mode?:
|
|
708
|
+
| 'reset'
|
|
709
|
+
| 'delta'
|
|
710
|
+
| 'service_period_revision'
|
|
711
|
+
| 'adjusted_term';
|
|
697
712
|
}
|
|
698
713
|
}
|
|
699
714
|
}
|
|
@@ -70,6 +70,11 @@ declare module 'chargebee' {
|
|
|
70
70
|
| 'tax_not_configured_external_provider';
|
|
71
71
|
entity_id?: string;
|
|
72
72
|
customer_id?: string;
|
|
73
|
+
proration_mode?:
|
|
74
|
+
| 'reset'
|
|
75
|
+
| 'delta'
|
|
76
|
+
| 'service_period_revision'
|
|
77
|
+
| 'adjusted_term';
|
|
73
78
|
}
|
|
74
79
|
export interface LineItemTier {
|
|
75
80
|
line_item_id?: string;
|
|
@@ -0,0 +1,90 @@
|
|
|
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 CreditUnit {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
external_name: string;
|
|
9
|
+
status?: 'active' | 'archived';
|
|
10
|
+
resource_version?: number;
|
|
11
|
+
updated_at?: number;
|
|
12
|
+
created_at: number;
|
|
13
|
+
created_by?: string;
|
|
14
|
+
updated_by?: string;
|
|
15
|
+
is_unlimited: boolean;
|
|
16
|
+
overdraft_amount?: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export namespace CreditUnit {
|
|
20
|
+
export class CreditUnitResource {
|
|
21
|
+
list(
|
|
22
|
+
input?: ListInputParam,
|
|
23
|
+
headers?: ChargebeeRequestHeader,
|
|
24
|
+
): Promise<ChargebeeResponse<ListResponse>>;
|
|
25
|
+
|
|
26
|
+
create(
|
|
27
|
+
input: CreateInputParam,
|
|
28
|
+
headers?: ChargebeeRequestHeader,
|
|
29
|
+
): Promise<ChargebeeResponse<CreateResponse>>;
|
|
30
|
+
|
|
31
|
+
update(
|
|
32
|
+
credit_unit_id: string,
|
|
33
|
+
input?: UpdateInputParam,
|
|
34
|
+
headers?: ChargebeeRequestHeader,
|
|
35
|
+
): Promise<ChargebeeResponse<UpdateResponse>>;
|
|
36
|
+
|
|
37
|
+
archive(
|
|
38
|
+
credit_unit_id: string,
|
|
39
|
+
headers?: ChargebeeRequestHeader,
|
|
40
|
+
): Promise<ChargebeeResponse<ArchiveResponse>>;
|
|
41
|
+
|
|
42
|
+
reactivate(
|
|
43
|
+
credit_unit_id: string,
|
|
44
|
+
headers?: ChargebeeRequestHeader,
|
|
45
|
+
): Promise<ChargebeeResponse<ReactivateResponse>>;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface ListResponse {
|
|
49
|
+
list: { credit_unit: CreditUnit }[];
|
|
50
|
+
next_offset?: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface CreateResponse {
|
|
54
|
+
credit_unit: CreditUnit;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface UpdateResponse {
|
|
58
|
+
credit_unit: CreditUnit;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface ArchiveResponse {
|
|
62
|
+
credit_unit: CreditUnit;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface ReactivateResponse {
|
|
66
|
+
credit_unit: CreditUnit;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// REQUEST PARAMS
|
|
70
|
+
//---------------
|
|
71
|
+
|
|
72
|
+
export interface ListInputParam {
|
|
73
|
+
limit?: number;
|
|
74
|
+
offset?: string;
|
|
75
|
+
status?: filter.Enum;
|
|
76
|
+
id?: filter.String;
|
|
77
|
+
}
|
|
78
|
+
export interface CreateInputParam {
|
|
79
|
+
id: string;
|
|
80
|
+
name: string;
|
|
81
|
+
is_unlimited: boolean;
|
|
82
|
+
overdraft_amount?: string;
|
|
83
|
+
external_name?: string;
|
|
84
|
+
}
|
|
85
|
+
export interface UpdateInputParam {
|
|
86
|
+
name?: string;
|
|
87
|
+
external_name?: string;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -774,7 +774,14 @@ declare module 'chargebee' {
|
|
|
774
774
|
| 'alipay_hk'
|
|
775
775
|
| 'paypay'
|
|
776
776
|
| 'gcash'
|
|
777
|
-
| 'south_korean_cards'
|
|
777
|
+
| 'south_korean_cards'
|
|
778
|
+
| 'paynow'
|
|
779
|
+
| 'bizum'
|
|
780
|
+
| 'promptpay'
|
|
781
|
+
| 'dana'
|
|
782
|
+
| 'touch_n_go'
|
|
783
|
+
| 'tamara'
|
|
784
|
+
| 'qpay';
|
|
778
785
|
reference_id?: string;
|
|
779
786
|
/**
|
|
780
787
|
* @deprecated Please refer API docs to use other attributes
|
|
@@ -971,7 +978,14 @@ declare module 'chargebee' {
|
|
|
971
978
|
| 'alipay_hk'
|
|
972
979
|
| 'paypay'
|
|
973
980
|
| 'gcash'
|
|
974
|
-
| 'south_korean_cards'
|
|
981
|
+
| 'south_korean_cards'
|
|
982
|
+
| 'paynow'
|
|
983
|
+
| 'bizum'
|
|
984
|
+
| 'promptpay'
|
|
985
|
+
| 'dana'
|
|
986
|
+
| 'touch_n_go'
|
|
987
|
+
| 'tamara'
|
|
988
|
+
| 'qpay';
|
|
975
989
|
/**
|
|
976
990
|
* @deprecated Please refer API docs to use other attributes
|
|
977
991
|
*/
|
|
@@ -387,6 +387,7 @@ declare module 'chargebee' {
|
|
|
387
387
|
refundable_credits_handling?: RefundableCreditsHandlingEnum;
|
|
388
388
|
contract_term_cancel_option?: ContractTermCancelOptionEnum;
|
|
389
389
|
invoice_date?: number;
|
|
390
|
+
include_cancellation_day_in_billing?: boolean;
|
|
390
391
|
cancel_reason_code?: string;
|
|
391
392
|
subscription_items?: SubscriptionItemsCancelSubscriptionForItemsInputParam[];
|
|
392
393
|
}
|
|
@@ -1070,7 +1071,14 @@ declare module 'chargebee' {
|
|
|
1070
1071
|
| 'alipay_hk'
|
|
1071
1072
|
| 'paypay'
|
|
1072
1073
|
| 'gcash'
|
|
1073
|
-
| 'south_korean_cards'
|
|
1074
|
+
| 'south_korean_cards'
|
|
1075
|
+
| 'paynow'
|
|
1076
|
+
| 'bizum'
|
|
1077
|
+
| 'promptpay'
|
|
1078
|
+
| 'dana'
|
|
1079
|
+
| 'touch_n_go'
|
|
1080
|
+
| 'tamara'
|
|
1081
|
+
| 'qpay';
|
|
1074
1082
|
reference_id?: string;
|
|
1075
1083
|
/**
|
|
1076
1084
|
* @deprecated Please refer API docs to use other attributes
|
|
@@ -1172,7 +1180,14 @@ declare module 'chargebee' {
|
|
|
1172
1180
|
| 'alipay_hk'
|
|
1173
1181
|
| 'paypay'
|
|
1174
1182
|
| 'gcash'
|
|
1175
|
-
| 'south_korean_cards'
|
|
1183
|
+
| 'south_korean_cards'
|
|
1184
|
+
| 'paynow'
|
|
1185
|
+
| 'bizum'
|
|
1186
|
+
| 'promptpay'
|
|
1187
|
+
| 'dana'
|
|
1188
|
+
| 'touch_n_go'
|
|
1189
|
+
| 'tamara'
|
|
1190
|
+
| 'qpay';
|
|
1176
1191
|
reference_id?: string;
|
|
1177
1192
|
/**
|
|
1178
1193
|
* @deprecated Please refer API docs to use other attributes
|
|
@@ -1298,6 +1313,7 @@ declare module 'chargebee' {
|
|
|
1298
1313
|
avalara_service_type?: number;
|
|
1299
1314
|
date_from?: number;
|
|
1300
1315
|
date_to?: number;
|
|
1316
|
+
entity_description?: string;
|
|
1301
1317
|
}
|
|
1302
1318
|
export interface DiscountsCreateInvoiceForItemsInputParam {
|
|
1303
1319
|
percentage?: number;
|
|
@@ -1325,6 +1341,8 @@ declare module 'chargebee' {
|
|
|
1325
1341
|
unit_price_in_decimal?: string;
|
|
1326
1342
|
date_from?: number;
|
|
1327
1343
|
date_to?: number;
|
|
1344
|
+
description?: string;
|
|
1345
|
+
entity_description?: string;
|
|
1328
1346
|
}
|
|
1329
1347
|
export interface TaxProvidersFieldsCreateInvoiceForItemsInputParam {
|
|
1330
1348
|
provider_name?: string;
|
|
@@ -28,6 +28,7 @@ declare module 'chargebee' {
|
|
|
28
28
|
TaxWithheldDeletedContent &
|
|
29
29
|
UnbilledChargesDeletedContent &
|
|
30
30
|
CouponUpdatedContent &
|
|
31
|
+
GrantBlocksCreatedContent &
|
|
31
32
|
OmnichannelSubscriptionItemReactivatedContent &
|
|
32
33
|
OmnichannelSubscriptionItemRenewedContent &
|
|
33
34
|
UnbilledChargesCreatedContent &
|
|
@@ -169,6 +170,7 @@ declare module 'chargebee' {
|
|
|
169
170
|
SubscriptionDeletedContent &
|
|
170
171
|
PaymentSourceAddedContent &
|
|
171
172
|
SubscriptionMovedInContent &
|
|
173
|
+
LedgerUpdatedContent &
|
|
172
174
|
ItemPriceCreatedContent &
|
|
173
175
|
SubscriptionScheduledCancellationRemovedContent &
|
|
174
176
|
PaymentRefundedContent &
|
|
@@ -200,8 +202,10 @@ declare module 'chargebee' {
|
|
|
200
202
|
OmnichannelSubscriptionItemGracePeriodStartedContent &
|
|
201
203
|
CardExpiryReminderContent &
|
|
202
204
|
TokenCreatedContent &
|
|
205
|
+
PaymentSourceBusinessEntityChangedContent &
|
|
203
206
|
PromotionalCreditsAddedContent &
|
|
204
207
|
SubscriptionRampUpdatedContent &
|
|
208
|
+
LedgerAccountBalanceUpdatedContent &
|
|
205
209
|
CustomerEntitlementsUpdatedContent &
|
|
206
210
|
PaymentSourceExpiredContent &
|
|
207
211
|
CustomerMovedOutContent &
|
|
@@ -232,6 +236,7 @@ declare module 'chargebee' {
|
|
|
232
236
|
AttachedItemUpdatedContent &
|
|
233
237
|
PaymentSourceUpdatedContent &
|
|
234
238
|
BusinessEntityDeletedContent &
|
|
239
|
+
GrantBlocksUpdatedContent &
|
|
235
240
|
AuthorizationVoidedContent &
|
|
236
241
|
SubscriptionRampDeletedContent &
|
|
237
242
|
PlanDeletedContent &
|
|
@@ -13,6 +13,7 @@ declare module 'chargebee' {
|
|
|
13
13
|
resource_version?: number;
|
|
14
14
|
updated_at?: number;
|
|
15
15
|
created_at: number;
|
|
16
|
+
metered: boolean;
|
|
16
17
|
levels?: Feature.Level[];
|
|
17
18
|
}
|
|
18
19
|
|
|
@@ -109,6 +110,7 @@ declare module 'chargebee' {
|
|
|
109
110
|
id?: filter.String;
|
|
110
111
|
status?: filter.Enum;
|
|
111
112
|
type?: filter.Enum;
|
|
113
|
+
metered?: filter.Boolean;
|
|
112
114
|
[key: `cf_${string}`]: unknown;
|
|
113
115
|
}
|
|
114
116
|
export interface CreateInputParam {
|
|
@@ -228,7 +228,14 @@ declare module 'chargebee' {
|
|
|
228
228
|
| 'alipay_hk'
|
|
229
229
|
| 'paypay'
|
|
230
230
|
| 'gcash'
|
|
231
|
-
| 'south_korean_cards'
|
|
231
|
+
| 'south_korean_cards'
|
|
232
|
+
| 'paynow'
|
|
233
|
+
| 'bizum'
|
|
234
|
+
| 'promptpay'
|
|
235
|
+
| 'dana'
|
|
236
|
+
| 'touch_n_go'
|
|
237
|
+
| 'tamara'
|
|
238
|
+
| 'qpay';
|
|
232
239
|
reference_id?: string;
|
|
233
240
|
/**
|
|
234
241
|
* @deprecated Please refer API docs to use other attributes
|
|
@@ -324,7 +331,14 @@ declare module 'chargebee' {
|
|
|
324
331
|
| 'alipay_hk'
|
|
325
332
|
| 'paypay'
|
|
326
333
|
| 'gcash'
|
|
327
|
-
| 'south_korean_cards'
|
|
334
|
+
| 'south_korean_cards'
|
|
335
|
+
| 'paynow'
|
|
336
|
+
| 'bizum'
|
|
337
|
+
| 'promptpay'
|
|
338
|
+
| 'dana'
|
|
339
|
+
| 'touch_n_go'
|
|
340
|
+
| 'tamara'
|
|
341
|
+
| 'qpay';
|
|
328
342
|
reference_id?: string;
|
|
329
343
|
/**
|
|
330
344
|
* @deprecated Please refer API docs to use other attributes
|
|
@@ -4,6 +4,10 @@
|
|
|
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
11
|
granted_amount: string;
|
|
8
12
|
effective_from: number;
|
|
9
13
|
expires_at: number;
|
|
@@ -15,17 +19,18 @@ declare module 'chargebee' {
|
|
|
15
19
|
voided_amount: string;
|
|
16
20
|
origin_grant_block_id?: string;
|
|
17
21
|
status: StatusEnum;
|
|
18
|
-
metadata?: string;
|
|
19
22
|
grant_source:
|
|
20
23
|
| 'subscription_created'
|
|
21
24
|
| 'subscription_changed'
|
|
22
25
|
| 'top_up'
|
|
23
26
|
| 'promotional_grants'
|
|
24
|
-
| 'rollover'
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
| 'rollover'
|
|
28
|
+
| 'grant_renewal'
|
|
29
|
+
| 'subscription_renewed';
|
|
30
|
+
created_at: number;
|
|
31
|
+
modified_at: number;
|
|
32
|
+
resource_version?: number;
|
|
33
|
+
metadata?: any;
|
|
29
34
|
}
|
|
30
35
|
|
|
31
36
|
export namespace GrantBlock {
|
|
@@ -49,6 +54,7 @@ declare module 'chargebee' {
|
|
|
49
54
|
offset?: string;
|
|
50
55
|
subscription_id: filter.String;
|
|
51
56
|
unit_id?: filter.String;
|
|
57
|
+
account_type?: filter.Enum;
|
|
52
58
|
effective_from?: filter.Timestamp;
|
|
53
59
|
expires_at?: filter.Timestamp;
|
|
54
60
|
created_at?: filter.Timestamp;
|