chargebee 2.24.0 → 2.25.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 +4 -0
- package/lib/chargebee.js +1 -1
- package/package.json +2 -1
- package/types/core.d.ts +80 -0
- package/types/index.d.ts +92 -0
- package/types/resources/Address.d.ts +58 -0
- package/types/resources/AdvanceInvoiceSchedule.d.ts +26 -0
- package/types/resources/AttachedItem.d.ts +84 -0
- package/types/resources/Card.d.ts +88 -0
- package/types/resources/Comment.d.ts +52 -0
- package/types/resources/Contact.d.ts +15 -0
- package/types/resources/ContractTerm.d.ts +18 -0
- package/types/resources/Coupon.d.ts +150 -0
- package/types/resources/CouponCode.d.ts +25 -0
- package/types/resources/CouponSet.d.ts +75 -0
- package/types/resources/CreditNote.d.ts +337 -0
- package/types/resources/CreditNoteEstimate.d.ts +96 -0
- package/types/resources/Customer.d.ts +440 -0
- package/types/resources/DifferentialPrice.d.ts +88 -0
- package/types/resources/Discount.d.ts +23 -0
- package/types/resources/Download.d.ts +9 -0
- package/types/resources/EntitlementOverride.d.ts +37 -0
- package/types/resources/Estimate.d.ts +214 -0
- package/types/resources/Event.d.ts +42 -0
- package/types/resources/Export.d.ts +182 -0
- package/types/resources/Feature.d.ts +90 -0
- package/types/resources/Gift.d.ts +97 -0
- package/types/resources/Hierarchy.d.ts +11 -0
- package/types/resources/HostedPage.d.ts +242 -0
- package/types/resources/ImpactedItem.d.ts +17 -0
- package/types/resources/ImpactedSubscription.d.ts +17 -0
- package/types/resources/InAppSubscription.d.ts +52 -0
- package/types/resources/Invoice.d.ts +590 -0
- package/types/resources/InvoiceEstimate.d.ts +96 -0
- package/types/resources/Item.d.ts +118 -0
- package/types/resources/ItemEntitlement.d.ts +55 -0
- package/types/resources/ItemFamily.d.ts +59 -0
- package/types/resources/ItemPrice.d.ts +195 -0
- package/types/resources/Media.d.ts +10 -0
- package/types/resources/NonSubscription.d.ts +23 -0
- package/types/resources/Order.d.ts +305 -0
- package/types/resources/PaymentIntent.d.ts +71 -0
- package/types/resources/PaymentReferenceNumber.d.ts +10 -0
- package/types/resources/PaymentSource.d.ts +264 -0
- package/types/resources/PaymentVoucher.d.ts +74 -0
- package/types/resources/PortalSession.d.ts +57 -0
- package/types/resources/PromotionalCredit.d.ts +86 -0
- package/types/resources/Purchase.d.ts +46 -0
- package/types/resources/Quote.d.ts +388 -0
- package/types/resources/QuoteLineGroup.d.ts +83 -0
- package/types/resources/QuotedCharge.d.ts +57 -0
- package/types/resources/QuotedSubscription.d.ts +82 -0
- package/types/resources/ResourceMigration.d.ts +27 -0
- package/types/resources/SiteMigrationDetail.d.ts +31 -0
- package/types/resources/Subscription.d.ts +619 -0
- package/types/resources/SubscriptionEntitlement.d.ts +41 -0
- package/types/resources/SubscriptionEstimate.d.ts +49 -0
- package/types/resources/TaxWithheld.d.ts +13 -0
- package/types/resources/ThirdPartyPaymentMethod.d.ts +10 -0
- package/types/resources/TimeMachine.d.ts +38 -0
- package/types/resources/Token.d.ts +50 -0
- package/types/resources/Transaction.d.ts +170 -0
- package/types/resources/UnbilledCharge.d.ts +91 -0
- package/types/resources/Usage.d.ts +76 -0
- package/types/resources/VirtualBankAccount.d.ts +75 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
declare module 'chargebee' {
|
|
2
|
+
export interface Gift {
|
|
3
|
+
|
|
4
|
+
id:string;
|
|
5
|
+
status:'expired' | 'scheduled' | 'unclaimed' | 'claimed' | 'cancelled';
|
|
6
|
+
scheduled_at?:number;
|
|
7
|
+
auto_claim:boolean;
|
|
8
|
+
no_expiry:boolean;
|
|
9
|
+
claim_expiry_date?:number;
|
|
10
|
+
resource_version?:number;
|
|
11
|
+
updated_at?:number;
|
|
12
|
+
gifter:Gift.Gifter;
|
|
13
|
+
gift_receiver:Gift.GiftReceiver;
|
|
14
|
+
gift_timelines?:Gift.GiftTimeline[];
|
|
15
|
+
}
|
|
16
|
+
export namespace Gift {
|
|
17
|
+
export class GiftResource {
|
|
18
|
+
create_for_items(input?:CreateForItemsInputParam):ChargebeeRequest<CreateForItemsResponse>;
|
|
19
|
+
cancel(gift_id:string):ChargebeeRequest<CancelResponse>;
|
|
20
|
+
update_gift(gift_id:string, input:UpdateGiftInputParam):ChargebeeRequest<UpdateGiftResponse>;
|
|
21
|
+
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
22
|
+
retrieve(gift_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
23
|
+
claim(gift_id:string):ChargebeeRequest<ClaimResponse>;
|
|
24
|
+
}
|
|
25
|
+
export interface CreateForItemsResponse {
|
|
26
|
+
gift:Gift;
|
|
27
|
+
subscription:Subscription;
|
|
28
|
+
invoice?:Invoice;
|
|
29
|
+
}
|
|
30
|
+
export interface CreateForItemsInputParam {
|
|
31
|
+
|
|
32
|
+
scheduled_at?:number;
|
|
33
|
+
auto_claim?:boolean;
|
|
34
|
+
no_expiry?:boolean;
|
|
35
|
+
claim_expiry_date?:number;
|
|
36
|
+
coupon_ids?:string[];
|
|
37
|
+
gifter?:{customer_id:string,note?:string,payment_src_id?:string,signature:string};
|
|
38
|
+
gift_receiver?:{customer_id:string,email:string,first_name:string,last_name:string};
|
|
39
|
+
payment_intent?:{additional_information?:object,gateway_account_id?:string,gw_token?:string,id?:string,payment_method_type?:'giropay' | 'ideal' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'boleto' | 'direct_debit' | 'sofort' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'card',reference_id?:string};
|
|
40
|
+
shipping_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
|
|
41
|
+
subscription_items?:{item_price_id?:string,quantity?:number,quantity_in_decimal?:string}[];
|
|
42
|
+
}
|
|
43
|
+
export interface CancelResponse {
|
|
44
|
+
gift:Gift;
|
|
45
|
+
subscription:Subscription;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface UpdateGiftResponse {
|
|
49
|
+
gift:Gift;
|
|
50
|
+
subscription:Subscription;
|
|
51
|
+
}
|
|
52
|
+
export interface UpdateGiftInputParam {
|
|
53
|
+
|
|
54
|
+
scheduled_at:number;
|
|
55
|
+
comment?:string;
|
|
56
|
+
}
|
|
57
|
+
export interface ListResponse {
|
|
58
|
+
list:{gift:Gift,subscription:Subscription}[];
|
|
59
|
+
next_offset?:string;
|
|
60
|
+
}
|
|
61
|
+
export interface ListInputParam {
|
|
62
|
+
[key: string]: string | number | object | boolean;
|
|
63
|
+
limit?:number;
|
|
64
|
+
offset?:string;
|
|
65
|
+
status?:{in?:string,is?:'expired' | 'scheduled' | 'unclaimed' | 'claimed' | 'cancelled',is_not?:'expired' | 'scheduled' | 'unclaimed' | 'claimed' | 'cancelled',not_in?:string};
|
|
66
|
+
gift_receiver?:{customer_id?:{is?:string,is_not?:string,starts_with?:string},email?:{is?:string,is_not?:string,starts_with?:string}};
|
|
67
|
+
gifter?:{customer_id?:{is?:string,is_not?:string,starts_with?:string}};
|
|
68
|
+
}
|
|
69
|
+
export interface RetrieveResponse {
|
|
70
|
+
gift:Gift;
|
|
71
|
+
subscription:Subscription;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface ClaimResponse {
|
|
75
|
+
gift:Gift;
|
|
76
|
+
subscription:Subscription;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface Gifter {
|
|
80
|
+
customer_id?:string;
|
|
81
|
+
invoice_id?:string;
|
|
82
|
+
signature?:string;
|
|
83
|
+
note?:string;
|
|
84
|
+
}
|
|
85
|
+
export interface GiftReceiver {
|
|
86
|
+
customer_id?:string;
|
|
87
|
+
subscription_id?:string;
|
|
88
|
+
first_name?:string;
|
|
89
|
+
last_name?:string;
|
|
90
|
+
email?:string;
|
|
91
|
+
}
|
|
92
|
+
export interface GiftTimeline {
|
|
93
|
+
status?:'expired' | 'scheduled' | 'unclaimed' | 'claimed' | 'cancelled';
|
|
94
|
+
occurred_at?:number;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
declare module 'chargebee' {
|
|
2
|
+
export interface HostedPage {
|
|
3
|
+
|
|
4
|
+
id?:string;
|
|
5
|
+
type?:'update_payment_method' | 'checkout_one_time' | 'manage_payment_sources' | 'checkout_new' | 'view_voucher' | 'collect_now' | 'checkout_existing' | 'extend_subscription' | 'pre_cancel';
|
|
6
|
+
url?:string;
|
|
7
|
+
state?:'requested' | 'acknowledged' | 'created' | 'cancelled' | 'succeeded';
|
|
8
|
+
pass_thru_content?:string;
|
|
9
|
+
created_at?:number;
|
|
10
|
+
expires_at?:number;
|
|
11
|
+
content:object;
|
|
12
|
+
updated_at?:number;
|
|
13
|
+
resource_version?:number;
|
|
14
|
+
checkout_info?:object;
|
|
15
|
+
business_entity_id?:string;
|
|
16
|
+
}
|
|
17
|
+
export namespace HostedPage {
|
|
18
|
+
export class HostedPageResource {
|
|
19
|
+
checkout_one_time_for_items(input?:CheckoutOneTimeForItemsInputParam):ChargebeeRequest<CheckoutOneTimeForItemsResponse>;
|
|
20
|
+
update_payment_method(input?:UpdatePaymentMethodInputParam):ChargebeeRequest<UpdatePaymentMethodResponse>;
|
|
21
|
+
extend_subscription(input?:ExtendSubscriptionInputParam):ChargebeeRequest<ExtendSubscriptionResponse>;
|
|
22
|
+
events(input:EventsInputParam):ChargebeeRequest<EventsResponse>;
|
|
23
|
+
checkout_gift_for_items(input?:CheckoutGiftForItemsInputParam):ChargebeeRequest<CheckoutGiftForItemsResponse>;
|
|
24
|
+
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
25
|
+
view_voucher(input?:ViewVoucherInputParam):ChargebeeRequest<ViewVoucherResponse>;
|
|
26
|
+
collect_now(input?:CollectNowInputParam):ChargebeeRequest<CollectNowResponse>;
|
|
27
|
+
accept_quote(input?:AcceptQuoteInputParam):ChargebeeRequest<AcceptQuoteResponse>;
|
|
28
|
+
checkout_new_for_items(input?:CheckoutNewForItemsInputParam):ChargebeeRequest<CheckoutNewForItemsResponse>;
|
|
29
|
+
claim_gift(input?:ClaimGiftInputParam):ChargebeeRequest<ClaimGiftResponse>;
|
|
30
|
+
checkout_existing_for_items(input?:CheckoutExistingForItemsInputParam):ChargebeeRequest<CheckoutExistingForItemsResponse>;
|
|
31
|
+
pre_cancel(input?:PreCancelInputParam):ChargebeeRequest<PreCancelResponse>;
|
|
32
|
+
acknowledge(hosted_page_id:string):ChargebeeRequest<AcknowledgeResponse>;
|
|
33
|
+
retrieve_agreement_pdf(input:RetrieveAgreementPdfInputParam):ChargebeeRequest<RetrieveAgreementPdfResponse>;
|
|
34
|
+
retrieve(hosted_page_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
35
|
+
manage_payment_sources(input?:ManagePaymentSourcesInputParam):ChargebeeRequest<ManagePaymentSourcesResponse>;
|
|
36
|
+
}
|
|
37
|
+
export interface CheckoutOneTimeForItemsResponse {
|
|
38
|
+
hosted_page:HostedPage;
|
|
39
|
+
}
|
|
40
|
+
export interface CheckoutOneTimeForItemsInputParam {
|
|
41
|
+
|
|
42
|
+
business_entity_id?:string;
|
|
43
|
+
layout?:Layout;
|
|
44
|
+
invoice_note?:string;
|
|
45
|
+
coupon_ids?:string[];
|
|
46
|
+
currency_code?:string;
|
|
47
|
+
redirect_url?:string;
|
|
48
|
+
cancel_url?:string;
|
|
49
|
+
pass_thru_content?:string;
|
|
50
|
+
customer?:object;
|
|
51
|
+
invoice?:{po_number?:string};
|
|
52
|
+
card?:{gateway_account_id?:string};
|
|
53
|
+
billing_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
|
|
54
|
+
shipping_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
|
|
55
|
+
item_prices?:{date_from?:number,date_to?:number,item_price_id?:string,quantity?:number,quantity_in_decimal?:string,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
56
|
+
item_tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,item_price_id?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
|
|
57
|
+
charges?:{amount?:number,amount_in_decimal?:string,avalara_sale_type?:AvalaraSaleType,avalara_service_type?:number,avalara_tax_code?:string,avalara_transaction_type?:number,date_from?:number,date_to?:number,description?:string,hsn_code?:string,tax_profile_id?:string,taxable?:boolean,taxjar_product_code?:string}[];
|
|
58
|
+
discounts?:{amount?:number,apply_on:ApplyOn,item_price_id?:string,percentage?:number}[];
|
|
59
|
+
entity_identifiers?:{id?:string,operation?:Operation,scheme?:string,standard?:string,value?:string}[];
|
|
60
|
+
}
|
|
61
|
+
export interface UpdatePaymentMethodResponse {
|
|
62
|
+
hosted_page:HostedPage;
|
|
63
|
+
}
|
|
64
|
+
export interface UpdatePaymentMethodInputParam {
|
|
65
|
+
|
|
66
|
+
redirect_url?:string;
|
|
67
|
+
cancel_url?:string;
|
|
68
|
+
pass_thru_content?:string;
|
|
69
|
+
iframe_messaging?:boolean;
|
|
70
|
+
customer?:{id:string};
|
|
71
|
+
card?:{gateway_account_id?:string};
|
|
72
|
+
}
|
|
73
|
+
export interface ExtendSubscriptionResponse {
|
|
74
|
+
hosted_page:HostedPage;
|
|
75
|
+
}
|
|
76
|
+
export interface ExtendSubscriptionInputParam {
|
|
77
|
+
|
|
78
|
+
expiry?:number;
|
|
79
|
+
billing_cycle?:number;
|
|
80
|
+
subscription?:{id:string};
|
|
81
|
+
}
|
|
82
|
+
export interface EventsResponse {
|
|
83
|
+
success:boolean;
|
|
84
|
+
}
|
|
85
|
+
export interface EventsInputParam {
|
|
86
|
+
|
|
87
|
+
event_name:EventName;
|
|
88
|
+
occurred_at?:number;
|
|
89
|
+
event_data:object;
|
|
90
|
+
}
|
|
91
|
+
export interface CheckoutGiftForItemsResponse {
|
|
92
|
+
hosted_page:HostedPage;
|
|
93
|
+
}
|
|
94
|
+
export interface CheckoutGiftForItemsInputParam {
|
|
95
|
+
|
|
96
|
+
business_entity_id?:string;
|
|
97
|
+
redirect_url?:string;
|
|
98
|
+
coupon_ids?:string[];
|
|
99
|
+
gifter?:{customer_id?:string,locale?:string};
|
|
100
|
+
subscription_items?:{item_price_id?:string,quantity?:number,quantity_in_decimal?:string}[];
|
|
101
|
+
}
|
|
102
|
+
export interface ListResponse {
|
|
103
|
+
list:{hosted_page:HostedPage}[];
|
|
104
|
+
next_offset?:string;
|
|
105
|
+
}
|
|
106
|
+
export interface ListInputParam {
|
|
107
|
+
[key: string]: string | number | object | boolean;
|
|
108
|
+
limit?:number;
|
|
109
|
+
offset?:string;
|
|
110
|
+
id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
111
|
+
type?:{in?:string,is?:'update_payment_method' | 'checkout_one_time' | 'manage_payment_sources' | 'checkout_new' | 'view_voucher' | 'collect_now' | 'checkout_existing' | 'extend_subscription' | 'pre_cancel',is_not?:'update_payment_method' | 'checkout_one_time' | 'manage_payment_sources' | 'checkout_new' | 'view_voucher' | 'collect_now' | 'checkout_existing' | 'extend_subscription' | 'pre_cancel',not_in?:string};
|
|
112
|
+
state?:{in?:string,is?:'requested' | 'acknowledged' | 'created' | 'cancelled' | 'succeeded',is_not?:'requested' | 'acknowledged' | 'created' | 'cancelled' | 'succeeded',not_in?:string};
|
|
113
|
+
updated_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
114
|
+
}
|
|
115
|
+
export interface ViewVoucherResponse {
|
|
116
|
+
hosted_page:HostedPage;
|
|
117
|
+
}
|
|
118
|
+
export interface ViewVoucherInputParam {
|
|
119
|
+
|
|
120
|
+
payment_voucher?:{id:string};
|
|
121
|
+
customer?:{locale?:string};
|
|
122
|
+
}
|
|
123
|
+
export interface CollectNowResponse {
|
|
124
|
+
hosted_page:HostedPage;
|
|
125
|
+
}
|
|
126
|
+
export interface CollectNowInputParam {
|
|
127
|
+
|
|
128
|
+
redirect_url?:string;
|
|
129
|
+
currency_code?:string;
|
|
130
|
+
customer?:{id:string};
|
|
131
|
+
card?:{gateway_account_id?:string};
|
|
132
|
+
}
|
|
133
|
+
export interface AcceptQuoteResponse {
|
|
134
|
+
hosted_page:HostedPage;
|
|
135
|
+
}
|
|
136
|
+
export interface AcceptQuoteInputParam {
|
|
137
|
+
|
|
138
|
+
redirect_url?:string;
|
|
139
|
+
quote?:{id:string};
|
|
140
|
+
}
|
|
141
|
+
export interface CheckoutNewForItemsResponse {
|
|
142
|
+
hosted_page:HostedPage;
|
|
143
|
+
}
|
|
144
|
+
export interface CheckoutNewForItemsInputParam {
|
|
145
|
+
|
|
146
|
+
layout?:Layout;
|
|
147
|
+
business_entity_id?:string;
|
|
148
|
+
billing_cycles?:number;
|
|
149
|
+
mandatory_items_to_remove?:string[];
|
|
150
|
+
terms_to_charge?:number;
|
|
151
|
+
billing_alignment_mode?:BillingAlignmentMode;
|
|
152
|
+
coupon_ids?:string[];
|
|
153
|
+
redirect_url?:string;
|
|
154
|
+
cancel_url?:string;
|
|
155
|
+
pass_thru_content?:string;
|
|
156
|
+
allow_offline_payment_methods?:boolean;
|
|
157
|
+
subscription?:object;
|
|
158
|
+
customer?:object;
|
|
159
|
+
card?:{gateway_account_id?:string};
|
|
160
|
+
billing_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
|
|
161
|
+
shipping_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
|
|
162
|
+
contract_term?:{action_at_term_end?:'cancel' | 'renew' | 'evergreen',cancellation_cutoff_period?:number};
|
|
163
|
+
subscription_items?:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
164
|
+
discounts?:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,included_in_mrr?:boolean,item_price_id?:string,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
|
|
165
|
+
item_tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,item_price_id?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
|
|
166
|
+
entity_identifiers?:{id?:string,operation?:Operation,scheme?:string,standard?:string,value?:string}[];
|
|
167
|
+
}
|
|
168
|
+
export interface ClaimGiftResponse {
|
|
169
|
+
hosted_page:HostedPage;
|
|
170
|
+
}
|
|
171
|
+
export interface ClaimGiftInputParam {
|
|
172
|
+
|
|
173
|
+
redirect_url?:string;
|
|
174
|
+
gift?:{id:string};
|
|
175
|
+
customer?:{locale?:string};
|
|
176
|
+
}
|
|
177
|
+
export interface CheckoutExistingForItemsResponse {
|
|
178
|
+
hosted_page:HostedPage;
|
|
179
|
+
}
|
|
180
|
+
export interface CheckoutExistingForItemsInputParam {
|
|
181
|
+
|
|
182
|
+
layout?:Layout;
|
|
183
|
+
mandatory_items_to_remove?:string[];
|
|
184
|
+
replace_items_list?:boolean;
|
|
185
|
+
invoice_date?:number;
|
|
186
|
+
billing_cycles?:number;
|
|
187
|
+
terms_to_charge?:number;
|
|
188
|
+
reactivate_from?:number;
|
|
189
|
+
billing_alignment_mode?:BillingAlignmentMode;
|
|
190
|
+
coupon_ids?:string[];
|
|
191
|
+
reactivate?:boolean;
|
|
192
|
+
force_term_reset?:boolean;
|
|
193
|
+
redirect_url?:string;
|
|
194
|
+
cancel_url?:string;
|
|
195
|
+
pass_thru_content?:string;
|
|
196
|
+
allow_offline_payment_methods?:boolean;
|
|
197
|
+
subscription?:object;
|
|
198
|
+
customer?:object;
|
|
199
|
+
card?:{gateway_account_id?:string};
|
|
200
|
+
contract_term?:{action_at_term_end?:'cancel' | 'renew' | 'evergreen',cancellation_cutoff_period?:number};
|
|
201
|
+
subscription_items?:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
202
|
+
discounts?:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,id?:string,included_in_mrr?:boolean,item_price_id?:string,operation_type:OperationType,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
|
|
203
|
+
item_tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,item_price_id?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
|
|
204
|
+
entity_identifiers?:{id?:string,operation?:Operation,scheme?:string,standard?:string,value?:string}[];
|
|
205
|
+
}
|
|
206
|
+
export interface PreCancelResponse {
|
|
207
|
+
hosted_page:HostedPage;
|
|
208
|
+
}
|
|
209
|
+
export interface PreCancelInputParam {
|
|
210
|
+
|
|
211
|
+
pass_thru_content?:string;
|
|
212
|
+
cancel_url?:string;
|
|
213
|
+
redirect_url?:string;
|
|
214
|
+
subscription?:{id:string};
|
|
215
|
+
}
|
|
216
|
+
export interface AcknowledgeResponse {
|
|
217
|
+
hosted_page:HostedPage;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export interface RetrieveAgreementPdfResponse {
|
|
221
|
+
hosted_page:HostedPage;
|
|
222
|
+
}
|
|
223
|
+
export interface RetrieveAgreementPdfInputParam {
|
|
224
|
+
|
|
225
|
+
payment_source_id:string;
|
|
226
|
+
}
|
|
227
|
+
export interface RetrieveResponse {
|
|
228
|
+
hosted_page:HostedPage;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export interface ManagePaymentSourcesResponse {
|
|
232
|
+
hosted_page:HostedPage;
|
|
233
|
+
}
|
|
234
|
+
export interface ManagePaymentSourcesInputParam {
|
|
235
|
+
|
|
236
|
+
redirect_url?:string;
|
|
237
|
+
customer?:{id:string};
|
|
238
|
+
card?:{gateway_account_id?:string};
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
}
|
|
242
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare module 'chargebee' {
|
|
2
|
+
export interface ImpactedItem {
|
|
3
|
+
|
|
4
|
+
count?:number;
|
|
5
|
+
items?:any[];
|
|
6
|
+
download?:ImpactedItem.Download;
|
|
7
|
+
}
|
|
8
|
+
export namespace ImpactedItem {
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
export interface Download {
|
|
12
|
+
download_url?:string;
|
|
13
|
+
valid_till?:number;
|
|
14
|
+
mime_type?:string;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare module 'chargebee' {
|
|
2
|
+
export interface ImpactedSubscription {
|
|
3
|
+
|
|
4
|
+
count?:number;
|
|
5
|
+
subscription_ids?:any[];
|
|
6
|
+
download?:ImpactedSubscription.Download;
|
|
7
|
+
}
|
|
8
|
+
export namespace ImpactedSubscription {
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
export interface Download {
|
|
12
|
+
download_url?:string;
|
|
13
|
+
valid_till?:number;
|
|
14
|
+
mime_type?:string;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
declare module 'chargebee' {
|
|
2
|
+
export interface InAppSubscription {
|
|
3
|
+
|
|
4
|
+
subscription_id:string;
|
|
5
|
+
customer_id?:string;
|
|
6
|
+
plan_id?:string;
|
|
7
|
+
store_status?:'in_trial' | 'paused' | 'active' | 'cancelled';
|
|
8
|
+
invoice_id?:string;
|
|
9
|
+
}
|
|
10
|
+
export namespace InAppSubscription {
|
|
11
|
+
export class InAppSubscriptionResource {
|
|
12
|
+
retrieve_store_subs(in_app_subscription_app_id:string, input:RetrieveStoreSubsInputParam):ChargebeeRequest<RetrieveStoreSubsResponse>;
|
|
13
|
+
import_receipt(in_app_subscription_app_id:string, input:ImportReceiptInputParam):ChargebeeRequest<ImportReceiptResponse>;
|
|
14
|
+
import_subscription(in_app_subscription_app_id:string, input?:ImportSubscriptionInputParam):ChargebeeRequest<ImportSubscriptionResponse>;
|
|
15
|
+
process_receipt(in_app_subscription_app_id:string, input:ProcessReceiptInputParam):ChargebeeRequest<ProcessReceiptResponse>;
|
|
16
|
+
}
|
|
17
|
+
export interface RetrieveStoreSubsResponse {
|
|
18
|
+
in_app_subscriptions:InAppSubscription[];
|
|
19
|
+
}
|
|
20
|
+
export interface RetrieveStoreSubsInputParam {
|
|
21
|
+
|
|
22
|
+
receipt:string;
|
|
23
|
+
}
|
|
24
|
+
export interface ImportReceiptResponse {
|
|
25
|
+
in_app_subscriptions:InAppSubscription[];
|
|
26
|
+
}
|
|
27
|
+
export interface ImportReceiptInputParam {
|
|
28
|
+
|
|
29
|
+
receipt:string;
|
|
30
|
+
product?:{currency_code:string};
|
|
31
|
+
customer?:{email?:string,id?:string};
|
|
32
|
+
}
|
|
33
|
+
export interface ImportSubscriptionResponse {
|
|
34
|
+
in_app_subscription:InAppSubscription;
|
|
35
|
+
}
|
|
36
|
+
export interface ImportSubscriptionInputParam {
|
|
37
|
+
|
|
38
|
+
subscription?:{currency_code:string,id:string,is_trial?:boolean,product_id:string,started_at:number,term_end:number,term_start:number,transaction_id:string};
|
|
39
|
+
customer?:{email?:string,id?:string};
|
|
40
|
+
}
|
|
41
|
+
export interface ProcessReceiptResponse {
|
|
42
|
+
in_app_subscription:InAppSubscription;
|
|
43
|
+
}
|
|
44
|
+
export interface ProcessReceiptInputParam {
|
|
45
|
+
|
|
46
|
+
receipt:string;
|
|
47
|
+
product?:{currency_code:string,id:string,name?:string,period?:string,period_unit?:string,price:number,price_in_decimal?:string};
|
|
48
|
+
customer?:{email?:string,first_name?:string,id?:string,last_name?:string};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
}
|
|
52
|
+
}
|