chargebee 3.2.1 → 3.4.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 +81 -0
- package/cjs/RequestWrapper.js +9 -3
- package/cjs/coreCommon.js +1 -0
- package/cjs/createChargebee.js +3 -0
- package/cjs/environment.js +1 -1
- package/cjs/resources/api_endpoints.js +2099 -365
- package/cjs/util.js +22 -17
- package/esm/RequestWrapper.js +9 -3
- package/esm/coreCommon.js +1 -0
- package/esm/createChargebee.js +3 -0
- package/esm/environment.js +1 -1
- package/esm/resources/api_endpoints.js +2099 -365
- package/esm/util.js +22 -17
- package/package.json +1 -1
- package/types/core.d.ts +13 -1
- package/types/index.d.ts +6 -0
- package/types/resources/AttachedItem.d.ts +1 -0
- package/types/resources/Comment.d.ts +1 -0
- package/types/resources/Configuration.d.ts +24 -0
- package/types/resources/Coupon.d.ts +5 -16
- package/types/resources/CreditNote.d.ts +5 -3
- package/types/resources/CreditNoteEstimate.d.ts +2 -1
- package/types/resources/Customer.d.ts +0 -12
- package/types/resources/DifferentialPrice.d.ts +1 -0
- package/types/resources/Event.d.ts +4 -2
- package/types/resources/Feature.d.ts +1 -0
- package/types/resources/GatewayErrorDetail.d.ts +1 -0
- package/types/resources/Invoice.d.ts +8 -0
- package/types/resources/InvoiceEstimate.d.ts +7 -0
- package/types/resources/Item.d.ts +1 -0
- package/types/resources/ItemFamily.d.ts +1 -0
- package/types/resources/ItemPrice.d.ts +1 -0
- package/types/resources/OmnichannelSubscription.d.ts +13 -0
- package/types/resources/OmnichannelSubscriptionItem.d.ts +7 -1
- package/types/resources/Order.d.ts +1 -1
- package/types/resources/PriceVariant.d.ts +1 -0
- package/types/resources/Quote.d.ts +2 -0
- package/types/resources/QuoteLineGroup.d.ts +1 -0
- package/types/resources/QuotedSubscription.d.ts +3 -0
- package/types/resources/RecordedPurchase.d.ts +1 -1
- package/types/resources/Rule.d.ts +33 -0
- package/types/resources/Subscription.d.ts +19 -0
- package/types/resources/Transaction.d.ts +1 -0
- package/types/resources/UsageEvent.d.ts +53 -0
|
@@ -83,6 +83,7 @@ declare module 'chargebee' {
|
|
|
83
83
|
coupons?: Subscription.Coupon[];
|
|
84
84
|
shipping_address?: Subscription.ShippingAddress;
|
|
85
85
|
referral_info?: Subscription.ReferralInfo;
|
|
86
|
+
billing_override?: Subscription.BillingOverride;
|
|
86
87
|
invoice_notes?: string;
|
|
87
88
|
meta_data?: any;
|
|
88
89
|
deleted: boolean;
|
|
@@ -557,6 +558,9 @@ declare module 'chargebee' {
|
|
|
557
558
|
unit_price?: number;
|
|
558
559
|
unit_price_in_decimal?: string;
|
|
559
560
|
amount?: number;
|
|
561
|
+
current_term_start?: number;
|
|
562
|
+
current_term_end?: number;
|
|
563
|
+
next_billing_at?: number;
|
|
560
564
|
amount_in_decimal?: string;
|
|
561
565
|
billing_period?: number;
|
|
562
566
|
billing_period_unit?: 'day' | 'week' | 'month' | 'year';
|
|
@@ -662,6 +666,10 @@ declare module 'chargebee' {
|
|
|
662
666
|
destination_url?: string;
|
|
663
667
|
post_purchase_widget_enabled: boolean;
|
|
664
668
|
}
|
|
669
|
+
export interface BillingOverride {
|
|
670
|
+
max_excess_payment_usage?: number;
|
|
671
|
+
max_refundable_credits_usage?: number;
|
|
672
|
+
}
|
|
665
673
|
export interface ContractTerm {
|
|
666
674
|
id: string;
|
|
667
675
|
status: 'active' | 'completed' | 'cancelled' | 'terminated';
|
|
@@ -835,6 +843,7 @@ declare module 'chargebee' {
|
|
|
835
843
|
statement_descriptor?: StatementDescriptorCreateWithItemsInputParam;
|
|
836
844
|
payment_intent?: PaymentIntentCreateWithItemsInputParam;
|
|
837
845
|
contract_term?: ContractTermCreateWithItemsInputParam;
|
|
846
|
+
billing_override?: BillingOverrideCreateWithItemsInputParam;
|
|
838
847
|
subscription_items?: SubscriptionItemsCreateWithItemsInputParam[];
|
|
839
848
|
discounts?: DiscountsCreateWithItemsInputParam[];
|
|
840
849
|
item_tiers?: ItemTiersCreateWithItemsInputParam[];
|
|
@@ -991,6 +1000,7 @@ declare module 'chargebee' {
|
|
|
991
1000
|
statement_descriptor?: StatementDescriptorUpdateForItemsInputParam;
|
|
992
1001
|
customer?: CustomerUpdateForItemsInputParam;
|
|
993
1002
|
contract_term?: ContractTermUpdateForItemsInputParam;
|
|
1003
|
+
billing_override?: BillingOverrideUpdateForItemsInputParam;
|
|
994
1004
|
subscription_items?: SubscriptionItemsUpdateForItemsInputParam[];
|
|
995
1005
|
discounts?: DiscountsUpdateForItemsInputParam[];
|
|
996
1006
|
item_tiers?: ItemTiersUpdateForItemsInputParam[];
|
|
@@ -1164,6 +1174,7 @@ declare module 'chargebee' {
|
|
|
1164
1174
|
tiers?: TiersImportUnbilledChargesInputParam[];
|
|
1165
1175
|
}
|
|
1166
1176
|
export interface ImportForItemsInputParam {
|
|
1177
|
+
exhausted_coupon_ids?: string[];
|
|
1167
1178
|
id?: string;
|
|
1168
1179
|
trial_end?: number;
|
|
1169
1180
|
billing_cycles?: number /**
|
|
@@ -1548,6 +1559,10 @@ declare module 'chargebee' {
|
|
|
1548
1559
|
billing_cycles?: number;
|
|
1549
1560
|
trial_end?: number;
|
|
1550
1561
|
}
|
|
1562
|
+
export interface BillingOverrideCreateWithItemsInputParam {
|
|
1563
|
+
max_excess_payment_usage?: number;
|
|
1564
|
+
max_refundable_credits_usage?: number;
|
|
1565
|
+
}
|
|
1551
1566
|
export interface StatementDescriptorCreateWithItemsInputParam {
|
|
1552
1567
|
descriptor?: string;
|
|
1553
1568
|
}
|
|
@@ -1810,6 +1825,10 @@ declare module 'chargebee' {
|
|
|
1810
1825
|
trial_end?: number;
|
|
1811
1826
|
proration_type?: ProrationTypeEnum;
|
|
1812
1827
|
}
|
|
1828
|
+
export interface BillingOverrideUpdateForItemsInputParam {
|
|
1829
|
+
max_excess_payment_usage?: number;
|
|
1830
|
+
max_refundable_credits_usage?: number;
|
|
1831
|
+
}
|
|
1813
1832
|
export interface BillingAddressUpdateForItemsInputParam {
|
|
1814
1833
|
first_name?: string;
|
|
1815
1834
|
last_name?: string;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
|
|
4
|
+
declare module 'chargebee' {
|
|
5
|
+
export interface UsageEvent {
|
|
6
|
+
subscription_id: string;
|
|
7
|
+
deduplication_id: string;
|
|
8
|
+
usage_timestamp: number;
|
|
9
|
+
properties: any;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export namespace UsageEvent {
|
|
13
|
+
export class UsageEventResource {
|
|
14
|
+
create(
|
|
15
|
+
input: CreateInputParam,
|
|
16
|
+
headers?: ChargebeeRequestHeader,
|
|
17
|
+
): Promise<ChargebeeResponse<CreateResponse>>;
|
|
18
|
+
|
|
19
|
+
batchIngest(
|
|
20
|
+
input: BatchIngestInputParam,
|
|
21
|
+
headers?: ChargebeeRequestHeader,
|
|
22
|
+
): Promise<ChargebeeResponse<BatchIngestResponse>>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface CreateResponse {
|
|
26
|
+
usage_event: UsageEvent;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface BatchIngestResponse {
|
|
30
|
+
batch_id: string;
|
|
31
|
+
failed_events: any[];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// REQUEST PARAMS
|
|
35
|
+
//---------------
|
|
36
|
+
|
|
37
|
+
export interface CreateInputParam {
|
|
38
|
+
deduplication_id: string;
|
|
39
|
+
subscription_id: string;
|
|
40
|
+
usage_timestamp: number;
|
|
41
|
+
properties: any;
|
|
42
|
+
}
|
|
43
|
+
export interface BatchIngestInputParam {
|
|
44
|
+
events?: EventsBatchIngestInputParam[];
|
|
45
|
+
}
|
|
46
|
+
export interface EventsBatchIngestInputParam {
|
|
47
|
+
deduplication_id: string;
|
|
48
|
+
subscription_id: string;
|
|
49
|
+
usage_timestamp: number;
|
|
50
|
+
properties: any;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|