chargebee 2.24.0 → 2.25.1
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 +8 -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 +59 -0
- package/types/resources/AdvanceInvoiceSchedule.d.ts +27 -0
- package/types/resources/AttachedItem.d.ts +85 -0
- package/types/resources/Card.d.ts +89 -0
- package/types/resources/Comment.d.ts +53 -0
- package/types/resources/Contact.d.ts +16 -0
- package/types/resources/ContractTerm.d.ts +19 -0
- package/types/resources/Coupon.d.ts +151 -0
- package/types/resources/CouponCode.d.ts +26 -0
- package/types/resources/CouponSet.d.ts +76 -0
- package/types/resources/CreditNote.d.ts +338 -0
- package/types/resources/CreditNoteEstimate.d.ts +97 -0
- package/types/resources/Customer.d.ts +441 -0
- package/types/resources/DifferentialPrice.d.ts +89 -0
- package/types/resources/Discount.d.ts +24 -0
- package/types/resources/Download.d.ts +10 -0
- package/types/resources/EntitlementOverride.d.ts +38 -0
- package/types/resources/Estimate.d.ts +215 -0
- package/types/resources/Event.d.ts +43 -0
- package/types/resources/Export.d.ts +183 -0
- package/types/resources/Feature.d.ts +91 -0
- package/types/resources/Gift.d.ts +98 -0
- package/types/resources/Hierarchy.d.ts +12 -0
- package/types/resources/HostedPage.d.ts +243 -0
- package/types/resources/ImpactedItem.d.ts +18 -0
- package/types/resources/ImpactedSubscription.d.ts +18 -0
- package/types/resources/InAppSubscription.d.ts +53 -0
- package/types/resources/Invoice.d.ts +591 -0
- package/types/resources/InvoiceEstimate.d.ts +97 -0
- package/types/resources/Item.d.ts +119 -0
- package/types/resources/ItemEntitlement.d.ts +56 -0
- package/types/resources/ItemFamily.d.ts +60 -0
- package/types/resources/ItemPrice.d.ts +196 -0
- package/types/resources/Media.d.ts +11 -0
- package/types/resources/NonSubscription.d.ts +24 -0
- package/types/resources/Order.d.ts +306 -0
- package/types/resources/PaymentIntent.d.ts +72 -0
- package/types/resources/PaymentReferenceNumber.d.ts +11 -0
- package/types/resources/PaymentSource.d.ts +265 -0
- package/types/resources/PaymentVoucher.d.ts +75 -0
- package/types/resources/PortalSession.d.ts +58 -0
- package/types/resources/PromotionalCredit.d.ts +87 -0
- package/types/resources/Purchase.d.ts +47 -0
- package/types/resources/Quote.d.ts +389 -0
- package/types/resources/QuoteLineGroup.d.ts +84 -0
- package/types/resources/QuotedCharge.d.ts +58 -0
- package/types/resources/QuotedSubscription.d.ts +83 -0
- package/types/resources/ResourceMigration.d.ts +28 -0
- package/types/resources/SiteMigrationDetail.d.ts +32 -0
- package/types/resources/Subscription.d.ts +620 -0
- package/types/resources/SubscriptionEntitlement.d.ts +42 -0
- package/types/resources/SubscriptionEstimate.d.ts +50 -0
- package/types/resources/TaxWithheld.d.ts +14 -0
- package/types/resources/ThirdPartyPaymentMethod.d.ts +11 -0
- package/types/resources/TimeMachine.d.ts +39 -0
- package/types/resources/Token.d.ts +51 -0
- package/types/resources/Transaction.d.ts +171 -0
- package/types/resources/UnbilledCharge.d.ts +92 -0
- package/types/resources/Usage.d.ts +77 -0
- package/types/resources/VirtualBankAccount.d.ts +76 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
declare module 'chargebee' {
|
|
3
|
+
export interface SubscriptionEstimate {
|
|
4
|
+
|
|
5
|
+
id?:string;
|
|
6
|
+
currency_code:string;
|
|
7
|
+
status?:'in_trial' | 'paused' | 'future' | 'active' | 'cancelled' | 'non_renewing';
|
|
8
|
+
trial_end_action?:TrialEndAction;
|
|
9
|
+
next_billing_at?:number;
|
|
10
|
+
pause_date?:number;
|
|
11
|
+
resume_date?:number;
|
|
12
|
+
shipping_address?:SubscriptionEstimate.ShippingAddress;
|
|
13
|
+
contract_term?:SubscriptionEstimate.ContractTerm;
|
|
14
|
+
}
|
|
15
|
+
export namespace SubscriptionEstimate {
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
export interface ShippingAddress {
|
|
19
|
+
first_name?:string;
|
|
20
|
+
last_name?:string;
|
|
21
|
+
email?:string;
|
|
22
|
+
company?:string;
|
|
23
|
+
phone?:string;
|
|
24
|
+
line1?:string;
|
|
25
|
+
line2?:string;
|
|
26
|
+
line3?:string;
|
|
27
|
+
city?:string;
|
|
28
|
+
state_code?:string;
|
|
29
|
+
state?:string;
|
|
30
|
+
country?:string;
|
|
31
|
+
zip?:string;
|
|
32
|
+
validation_status?:ValidationStatus;
|
|
33
|
+
index?:number;
|
|
34
|
+
}
|
|
35
|
+
export interface ContractTerm {
|
|
36
|
+
id?:string;
|
|
37
|
+
status?:'active' | 'cancelled' | 'completed' | 'terminated';
|
|
38
|
+
contract_start?:number;
|
|
39
|
+
contract_end?:number;
|
|
40
|
+
billing_cycle?:number;
|
|
41
|
+
action_at_term_end?:'cancel' | 'renew_once' | 'renew' | 'evergreen';
|
|
42
|
+
total_contract_value?:number;
|
|
43
|
+
total_contract_value_before_tax?:number;
|
|
44
|
+
cancellation_cutoff_period?:number;
|
|
45
|
+
created_at?:number;
|
|
46
|
+
subscription_id?:string;
|
|
47
|
+
remaining_billing_cycles?:number;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
declare module 'chargebee' {
|
|
3
|
+
export interface TaxWithheld {
|
|
4
|
+
|
|
5
|
+
id:string;
|
|
6
|
+
reference_number?:string;
|
|
7
|
+
description?:string;
|
|
8
|
+
date?:number;
|
|
9
|
+
amount?:number;
|
|
10
|
+
resource_version?:number;
|
|
11
|
+
updated_at?:number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
declare module 'chargebee' {
|
|
3
|
+
export interface TimeMachine {
|
|
4
|
+
|
|
5
|
+
name:string;
|
|
6
|
+
time_travel_status:'in_progress' | 'not_enabled' | 'failed' | 'succeeded';
|
|
7
|
+
genesis_time:number;
|
|
8
|
+
destination_time:number;
|
|
9
|
+
failure_code?:string;
|
|
10
|
+
failure_reason?:string;
|
|
11
|
+
error_json?:string;
|
|
12
|
+
}
|
|
13
|
+
export namespace TimeMachine {
|
|
14
|
+
export class TimeMachineResource {
|
|
15
|
+
retrieve(time_machine_name:string):ChargebeeRequest<RetrieveResponse>;
|
|
16
|
+
travel_forward(time_machine_name:string, input?:TravelForwardInputParam):ChargebeeRequest<TravelForwardResponse>;
|
|
17
|
+
start_afresh(time_machine_name:string, input?:StartAfreshInputParam):ChargebeeRequest<StartAfreshResponse>;
|
|
18
|
+
}
|
|
19
|
+
export interface RetrieveResponse {
|
|
20
|
+
time_machine:TimeMachine;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface TravelForwardResponse {
|
|
24
|
+
time_machine:TimeMachine;
|
|
25
|
+
}
|
|
26
|
+
export interface TravelForwardInputParam {
|
|
27
|
+
|
|
28
|
+
destination_time?:number;
|
|
29
|
+
}
|
|
30
|
+
export interface StartAfreshResponse {
|
|
31
|
+
time_machine:TimeMachine;
|
|
32
|
+
}
|
|
33
|
+
export interface StartAfreshInputParam {
|
|
34
|
+
|
|
35
|
+
genesis_time?:number;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
declare module 'chargebee' {
|
|
3
|
+
export interface Token {
|
|
4
|
+
|
|
5
|
+
id:string;
|
|
6
|
+
gateway:Gateway;
|
|
7
|
+
gateway_account_id:string;
|
|
8
|
+
payment_method_type:PaymentMethodType;
|
|
9
|
+
status:'consumed' | 'new' | 'expired';
|
|
10
|
+
id_at_vault:string;
|
|
11
|
+
vault:'spreedly' | 'gateway';
|
|
12
|
+
ip_address?:string;
|
|
13
|
+
resource_version?:number;
|
|
14
|
+
updated_at?:number;
|
|
15
|
+
created_at:number;
|
|
16
|
+
expired_at?:number;
|
|
17
|
+
}
|
|
18
|
+
export namespace Token {
|
|
19
|
+
export class TokenResource {
|
|
20
|
+
create_using_temp_token(input:CreateUsingTempTokenInputParam):ChargebeeRequest<CreateUsingTempTokenResponse>;
|
|
21
|
+
create_for_card(input?:CreateForCardInputParam):ChargebeeRequest<CreateForCardResponse>;
|
|
22
|
+
retrieve(cb_token_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
23
|
+
}
|
|
24
|
+
export interface CreateUsingTempTokenResponse {
|
|
25
|
+
token:Token;
|
|
26
|
+
}
|
|
27
|
+
export interface CreateUsingTempTokenInputParam {
|
|
28
|
+
|
|
29
|
+
gateway_account_id?:string;
|
|
30
|
+
payment_method_type:PaymentMethodType;
|
|
31
|
+
id_at_vault:string;
|
|
32
|
+
gw_obj_type?:string;
|
|
33
|
+
currency_code?:string;
|
|
34
|
+
additional_information?:object;
|
|
35
|
+
token_additional_detail?:{expiry_month?:number,expiry_year?:number,first_name?:string,last_name?:string};
|
|
36
|
+
token_billing_address?:{city?:string,country_code?:string,line1?:string,line2?:string,state?:string,state_code?:string,zip?:string};
|
|
37
|
+
}
|
|
38
|
+
export interface CreateForCardResponse {
|
|
39
|
+
token:Token;
|
|
40
|
+
}
|
|
41
|
+
export interface CreateForCardInputParam {
|
|
42
|
+
|
|
43
|
+
card?:{additional_information?:object,billing_addr1?:string,billing_addr2?:string,billing_city?:string,billing_country?:string,billing_state?:string,billing_state_code?:string,billing_zip?:string,card_type?:'discover' | 'bancontact' | 'other' | 'visa' | 'jcb' | 'diners_club' | 'mastercard' | 'not_applicable' | 'american_express',cvv?:string,expiry_month:number,expiry_year:number,first_name?:string,gateway_account_id?:string,last_name?:string,number:string};
|
|
44
|
+
}
|
|
45
|
+
export interface RetrieveResponse {
|
|
46
|
+
token:Token;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
declare module 'chargebee' {
|
|
3
|
+
export interface Transaction {
|
|
4
|
+
|
|
5
|
+
id:string;
|
|
6
|
+
customer_id?:string;
|
|
7
|
+
subscription_id?:string;
|
|
8
|
+
gateway_account_id?:string;
|
|
9
|
+
payment_source_id?:string;
|
|
10
|
+
payment_method:PaymentMethod;
|
|
11
|
+
reference_number?:string;
|
|
12
|
+
gateway:Gateway;
|
|
13
|
+
type:'authorization' | 'payment_reversal' | 'payment' | 'refund';
|
|
14
|
+
date?:number;
|
|
15
|
+
settled_at?:number;
|
|
16
|
+
exchange_rate?:number;
|
|
17
|
+
currency_code:string;
|
|
18
|
+
amount?:number;
|
|
19
|
+
id_at_gateway?:string;
|
|
20
|
+
status?:'in_progress' | 'success' | 'failure' | 'voided' | 'timeout' | 'needs_attention';
|
|
21
|
+
fraud_flag?:'safe' | 'suspicious' | 'fraudulent';
|
|
22
|
+
initiator_type?:'merchant' | 'customer';
|
|
23
|
+
three_d_secure?:boolean;
|
|
24
|
+
authorization_reason?:'blocking_funds' | 'verification';
|
|
25
|
+
error_code?:string;
|
|
26
|
+
error_text?:string;
|
|
27
|
+
voided_at?:number;
|
|
28
|
+
resource_version?:number;
|
|
29
|
+
updated_at?:number;
|
|
30
|
+
fraud_reason?:string;
|
|
31
|
+
amount_unused?:number;
|
|
32
|
+
masked_card_number?:string;
|
|
33
|
+
reference_transaction_id?:string;
|
|
34
|
+
refunded_txn_id?:string;
|
|
35
|
+
reference_authorization_id?:string;
|
|
36
|
+
amount_capturable?:number;
|
|
37
|
+
reversal_transaction_id?:string;
|
|
38
|
+
deleted:boolean;
|
|
39
|
+
iin?:string;
|
|
40
|
+
last4?:string;
|
|
41
|
+
merchant_reference_id?:string;
|
|
42
|
+
business_entity_id?:string;
|
|
43
|
+
payment_method_details?:string;
|
|
44
|
+
linked_invoices?:Transaction.InvoiceTransaction[];
|
|
45
|
+
linked_credit_notes?:Transaction.CreditNoteTransaction[];
|
|
46
|
+
linked_refunds?:Transaction.TxnRefundsAndReversal[];
|
|
47
|
+
linked_payments?:Transaction.LinkedPayment[];
|
|
48
|
+
}
|
|
49
|
+
export namespace Transaction {
|
|
50
|
+
export class TransactionResource {
|
|
51
|
+
record_refund(transaction_id:string, input:RecordRefundInputParam):ChargebeeRequest<RecordRefundResponse>;
|
|
52
|
+
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
53
|
+
void_transaction(transaction_id:string):ChargebeeRequest<VoidTransactionResponse>;
|
|
54
|
+
create_authorization(input:CreateAuthorizationInputParam):ChargebeeRequest<CreateAuthorizationResponse>;
|
|
55
|
+
retrieve(transaction_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
56
|
+
payments_for_invoice(invoice_id:string, input?:PaymentsForInvoiceInputParam):ChargebeeRequest<PaymentsForInvoiceResponse>;
|
|
57
|
+
delete_offline_transaction(transaction_id:string, input?:DeleteOfflineTransactionInputParam):ChargebeeRequest<DeleteOfflineTransactionResponse>;
|
|
58
|
+
refund(transaction_id:string, input?:RefundInputParam):ChargebeeRequest<RefundResponse>;
|
|
59
|
+
}
|
|
60
|
+
export interface RecordRefundResponse {
|
|
61
|
+
transaction:Transaction;
|
|
62
|
+
}
|
|
63
|
+
export interface RecordRefundInputParam {
|
|
64
|
+
|
|
65
|
+
amount?:number;
|
|
66
|
+
payment_method:PaymentMethod;
|
|
67
|
+
date:number;
|
|
68
|
+
reference_number?:string;
|
|
69
|
+
comment?:string;
|
|
70
|
+
}
|
|
71
|
+
export interface ListResponse {
|
|
72
|
+
list:{transaction:Transaction}[];
|
|
73
|
+
next_offset?:string;
|
|
74
|
+
}
|
|
75
|
+
export interface ListInputParam {
|
|
76
|
+
[key: string]: string | number | object | boolean;
|
|
77
|
+
limit?:number;
|
|
78
|
+
offset?:string;
|
|
79
|
+
include_deleted?:boolean;
|
|
80
|
+
id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
81
|
+
customer_id?:{in?:string,is?:string,is_not?:string,is_present?:'true' | 'false',not_in?:string,starts_with?:string};
|
|
82
|
+
subscription_id?:{in?:string,is?:string,is_not?:string,is_present?:'true' | 'false',not_in?:string,starts_with?:string};
|
|
83
|
+
payment_source_id?:{in?:string,is?:string,is_not?:string,is_present?:'true' | 'false',not_in?:string,starts_with?:string};
|
|
84
|
+
payment_method?:{in?:string,is?:'other' | 'netbanking_emandates' | 'ach_credit' | 'dotpay' | 'boleto' | 'direct_debit' | 'chargeback' | 'wechat_pay' | 'cash' | 'giropay' | 'bank_transfer' | 'alipay' | 'ideal' | 'google_pay' | 'custom' | 'unionpay' | 'check' | 'sofort' | 'amazon_payments' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'sepa_credit' | 'card',is_not?:'other' | 'netbanking_emandates' | 'ach_credit' | 'dotpay' | 'boleto' | 'direct_debit' | 'chargeback' | 'wechat_pay' | 'cash' | 'giropay' | 'bank_transfer' | 'alipay' | 'ideal' | 'google_pay' | 'custom' | 'unionpay' | 'check' | 'sofort' | 'amazon_payments' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'sepa_credit' | 'card',not_in?:string};
|
|
85
|
+
gateway?:{in?:string,is?:'bluepay' | 'beanstream' | 'elavon' | 'orbital' | 'hdfc' | 'nmi' | 'moneris' | 'metrics_global' | 'pin' | 'stripe' | 'quickbooks' | 'razorpay' | 'eway_rapid' | 'balanced_payments' | 'ecentric' | 'wepay' | 'chargebee_payments' | 'bank_of_america' | 'braintree' | 'first_data_global' | 'paypal_express_checkout' | 'ingenico_direct' | 'moneris_us' | 'exact' | 'migs' | 'checkout_com' | 'not_applicable' | 'paypal_pro' | 'ogone' | 'eway' | 'gocardless' | 'global_payments' | 'paymill' | 'adyen' | 'paypal' | 'chargebee' | 'authorize_net' | 'tco' | 'bluesnap' | 'windcave' | 'paypal_payflow_pro' | 'amazon_payments' | 'mollie' | 'cybersource' | 'wirecard' | 'sage_pay' | 'vantiv' | 'worldpay',is_not?:'bluepay' | 'beanstream' | 'elavon' | 'orbital' | 'hdfc' | 'nmi' | 'moneris' | 'metrics_global' | 'pin' | 'stripe' | 'quickbooks' | 'razorpay' | 'eway_rapid' | 'balanced_payments' | 'ecentric' | 'wepay' | 'chargebee_payments' | 'bank_of_america' | 'braintree' | 'first_data_global' | 'paypal_express_checkout' | 'ingenico_direct' | 'moneris_us' | 'exact' | 'migs' | 'checkout_com' | 'not_applicable' | 'paypal_pro' | 'ogone' | 'eway' | 'gocardless' | 'global_payments' | 'paymill' | 'adyen' | 'paypal' | 'chargebee' | 'authorize_net' | 'tco' | 'bluesnap' | 'windcave' | 'paypal_payflow_pro' | 'amazon_payments' | 'mollie' | 'cybersource' | 'wirecard' | 'sage_pay' | 'vantiv' | 'worldpay',not_in?:string};
|
|
86
|
+
gateway_account_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
87
|
+
id_at_gateway?:{is?:string,is_not?:string,starts_with?:string};
|
|
88
|
+
reference_number?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string};
|
|
89
|
+
type?:{in?:string,is?:'authorization' | 'payment_reversal' | 'payment' | 'refund',is_not?:'authorization' | 'payment_reversal' | 'payment' | 'refund',not_in?:string};
|
|
90
|
+
date?:{after?:string,before?:string,between?:string,on?:string};
|
|
91
|
+
amount?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string};
|
|
92
|
+
amount_capturable?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string};
|
|
93
|
+
status?:{in?:string,is?:'in_progress' | 'success' | 'failure' | 'voided' | 'timeout' | 'needs_attention',is_not?:'in_progress' | 'success' | 'failure' | 'voided' | 'timeout' | 'needs_attention',not_in?:string};
|
|
94
|
+
updated_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
95
|
+
sort_by?:{asc?:'date' | 'updated_at',desc?:'date' | 'updated_at'};
|
|
96
|
+
}
|
|
97
|
+
export interface VoidTransactionResponse {
|
|
98
|
+
transaction:Transaction;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export interface CreateAuthorizationResponse {
|
|
102
|
+
transaction:Transaction;
|
|
103
|
+
}
|
|
104
|
+
export interface CreateAuthorizationInputParam {
|
|
105
|
+
|
|
106
|
+
customer_id:string;
|
|
107
|
+
payment_source_id?:string;
|
|
108
|
+
currency_code?:string;
|
|
109
|
+
amount:number;
|
|
110
|
+
}
|
|
111
|
+
export interface RetrieveResponse {
|
|
112
|
+
transaction:Transaction;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export interface PaymentsForInvoiceResponse {
|
|
116
|
+
list:{transaction:Transaction}[];
|
|
117
|
+
next_offset?:string;
|
|
118
|
+
}
|
|
119
|
+
export interface PaymentsForInvoiceInputParam {
|
|
120
|
+
[key: string]: string | number | object | boolean;
|
|
121
|
+
limit?:number;
|
|
122
|
+
offset?:string;
|
|
123
|
+
}
|
|
124
|
+
export interface DeleteOfflineTransactionResponse {
|
|
125
|
+
transaction:Transaction;
|
|
126
|
+
}
|
|
127
|
+
export interface DeleteOfflineTransactionInputParam {
|
|
128
|
+
|
|
129
|
+
comment?:string;
|
|
130
|
+
}
|
|
131
|
+
export interface RefundResponse {
|
|
132
|
+
transaction:Transaction;
|
|
133
|
+
}
|
|
134
|
+
export interface RefundInputParam {
|
|
135
|
+
|
|
136
|
+
amount?:number;
|
|
137
|
+
comment?:string;
|
|
138
|
+
}
|
|
139
|
+
export interface InvoiceTransaction {
|
|
140
|
+
invoice_id?:string;
|
|
141
|
+
applied_amount?:number;
|
|
142
|
+
applied_at?:number;
|
|
143
|
+
invoice_date?:number;
|
|
144
|
+
invoice_total?:number;
|
|
145
|
+
invoice_status?:'pending' | 'paid' | 'voided' | 'not_paid' | 'posted' | 'payment_due';
|
|
146
|
+
}
|
|
147
|
+
export interface CreditNoteTransaction {
|
|
148
|
+
cn_id?:string;
|
|
149
|
+
applied_amount?:number;
|
|
150
|
+
applied_at?:number;
|
|
151
|
+
cn_reason_code?:'other' | 'product_unsatisfactory' | 'subscription_pause' | 'order_cancellation' | 'service_unsatisfactory' | 'subscription_cancellation' | 'chargeback' | 'order_change' | 'write_off' | 'waiver' | 'subscription_change' | 'fraudulent';
|
|
152
|
+
cn_create_reason_code?:string;
|
|
153
|
+
cn_date?:number;
|
|
154
|
+
cn_total?:number;
|
|
155
|
+
cn_status?:'refund_due' | 'adjusted' | 'refunded' | 'voided';
|
|
156
|
+
cn_reference_invoice_id?:string;
|
|
157
|
+
}
|
|
158
|
+
export interface TxnRefundsAndReversal {
|
|
159
|
+
txn_id?:string;
|
|
160
|
+
txn_status?:'in_progress' | 'success' | 'failure' | 'voided' | 'timeout' | 'needs_attention';
|
|
161
|
+
txn_date?:number;
|
|
162
|
+
txn_amount?:number;
|
|
163
|
+
}
|
|
164
|
+
export interface LinkedPayment {
|
|
165
|
+
id?:string;
|
|
166
|
+
status?:'in_progress' | 'success' | 'failure' | 'voided' | 'timeout' | 'needs_attention';
|
|
167
|
+
amount?:number;
|
|
168
|
+
date?:number;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
declare module 'chargebee' {
|
|
3
|
+
export interface UnbilledCharge {
|
|
4
|
+
|
|
5
|
+
id?:string;
|
|
6
|
+
customer_id?:string;
|
|
7
|
+
subscription_id?:string;
|
|
8
|
+
date_from?:number;
|
|
9
|
+
date_to?:number;
|
|
10
|
+
unit_amount?:number;
|
|
11
|
+
pricing_model?:PricingModel;
|
|
12
|
+
quantity?:number;
|
|
13
|
+
amount?:number;
|
|
14
|
+
currency_code:string;
|
|
15
|
+
discount_amount?:number;
|
|
16
|
+
description?:string;
|
|
17
|
+
entity_type:'addon_item_price' | 'plan_item_price' | 'charge_item_price' | 'adhoc';
|
|
18
|
+
entity_id?:string;
|
|
19
|
+
is_voided:boolean;
|
|
20
|
+
voided_at?:number;
|
|
21
|
+
unit_amount_in_decimal?:string;
|
|
22
|
+
quantity_in_decimal?:string;
|
|
23
|
+
amount_in_decimal?:string;
|
|
24
|
+
updated_at:number;
|
|
25
|
+
is_advance_charge?:boolean;
|
|
26
|
+
deleted:boolean;
|
|
27
|
+
tiers?:UnbilledCharge.LineItemTier[];
|
|
28
|
+
}
|
|
29
|
+
export namespace UnbilledCharge {
|
|
30
|
+
export class UnbilledChargeResource {
|
|
31
|
+
delete(unbilled_charge_id:string):ChargebeeRequest<DeleteResponse>;
|
|
32
|
+
invoice_now_estimate(input?:InvoiceNowEstimateInputParam):ChargebeeRequest<InvoiceNowEstimateResponse>;
|
|
33
|
+
invoice_unbilled_charges(input?:InvoiceUnbilledChargesInputParam):ChargebeeRequest<InvoiceUnbilledChargesResponse>;
|
|
34
|
+
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
35
|
+
create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
|
|
36
|
+
}
|
|
37
|
+
export interface DeleteResponse {
|
|
38
|
+
unbilled_charge:UnbilledCharge;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface InvoiceNowEstimateResponse {
|
|
42
|
+
estimate:Estimate;
|
|
43
|
+
}
|
|
44
|
+
export interface InvoiceNowEstimateInputParam {
|
|
45
|
+
|
|
46
|
+
subscription_id?:string;
|
|
47
|
+
customer_id?:string;
|
|
48
|
+
}
|
|
49
|
+
export interface InvoiceUnbilledChargesResponse {
|
|
50
|
+
invoices:Invoice[];
|
|
51
|
+
}
|
|
52
|
+
export interface InvoiceUnbilledChargesInputParam {
|
|
53
|
+
|
|
54
|
+
subscription_id?:string;
|
|
55
|
+
customer_id?:string;
|
|
56
|
+
}
|
|
57
|
+
export interface ListResponse {
|
|
58
|
+
list:{unbilled_charge:UnbilledCharge}[];
|
|
59
|
+
next_offset?:string;
|
|
60
|
+
}
|
|
61
|
+
export interface ListInputParam {
|
|
62
|
+
[key: string]: string | number | object | boolean;
|
|
63
|
+
limit?:number;
|
|
64
|
+
offset?:string;
|
|
65
|
+
include_deleted?:boolean;
|
|
66
|
+
is_voided?:boolean;
|
|
67
|
+
subscription_id?:{in?:string,is?:string,is_not?:string,is_present?:'true' | 'false',not_in?:string,starts_with?:string};
|
|
68
|
+
customer_id?:{in?:string,is?:string,is_not?:string,is_present?:'true' | 'false',not_in?:string,starts_with?:string};
|
|
69
|
+
}
|
|
70
|
+
export interface CreateResponse {
|
|
71
|
+
unbilled_charges:UnbilledCharge[];
|
|
72
|
+
}
|
|
73
|
+
export interface CreateInputParam {
|
|
74
|
+
|
|
75
|
+
subscription_id:string;
|
|
76
|
+
currency_code?:string;
|
|
77
|
+
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}[];
|
|
78
|
+
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}[];
|
|
79
|
+
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}[];
|
|
80
|
+
}
|
|
81
|
+
export interface LineItemTier {
|
|
82
|
+
starting_unit?:number;
|
|
83
|
+
ending_unit?:number;
|
|
84
|
+
quantity_used?:number;
|
|
85
|
+
unit_amount?:number;
|
|
86
|
+
starting_unit_in_decimal?:string;
|
|
87
|
+
ending_unit_in_decimal?:string;
|
|
88
|
+
quantity_used_in_decimal?:string;
|
|
89
|
+
unit_amount_in_decimal?:string;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
declare module 'chargebee' {
|
|
3
|
+
export interface Usage {
|
|
4
|
+
|
|
5
|
+
id?:string;
|
|
6
|
+
usage_date:number;
|
|
7
|
+
subscription_id:string;
|
|
8
|
+
item_price_id:string;
|
|
9
|
+
invoice_id?:string;
|
|
10
|
+
line_item_id?:string;
|
|
11
|
+
quantity:string;
|
|
12
|
+
source?:Source;
|
|
13
|
+
note?:string;
|
|
14
|
+
resource_version?:number;
|
|
15
|
+
updated_at?:number;
|
|
16
|
+
created_at:number;
|
|
17
|
+
}
|
|
18
|
+
export namespace Usage {
|
|
19
|
+
export class UsageResource {
|
|
20
|
+
pdf(input?:PdfInputParam):ChargebeeRequest<PdfResponse>;
|
|
21
|
+
retrieve(subscription_id:string, input:RetrieveInputParam):ChargebeeRequest<RetrieveResponse>;
|
|
22
|
+
create(subscription_id:string, input:CreateInputParam):ChargebeeRequest<CreateResponse>;
|
|
23
|
+
delete(subscription_id:string, input:DeleteInputParam):ChargebeeRequest<DeleteResponse>;
|
|
24
|
+
list(input:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
25
|
+
}
|
|
26
|
+
export interface PdfResponse {
|
|
27
|
+
download:Download;
|
|
28
|
+
}
|
|
29
|
+
export interface PdfInputParam {
|
|
30
|
+
|
|
31
|
+
disposition_type?:DispositionType;
|
|
32
|
+
invoice?:{id:string};
|
|
33
|
+
}
|
|
34
|
+
export interface RetrieveResponse {
|
|
35
|
+
usage:Usage;
|
|
36
|
+
}
|
|
37
|
+
export interface RetrieveInputParam {
|
|
38
|
+
|
|
39
|
+
id:string;
|
|
40
|
+
}
|
|
41
|
+
export interface CreateResponse {
|
|
42
|
+
usage:Usage;
|
|
43
|
+
}
|
|
44
|
+
export interface CreateInputParam {
|
|
45
|
+
|
|
46
|
+
id?:string;
|
|
47
|
+
item_price_id:string;
|
|
48
|
+
quantity:string;
|
|
49
|
+
usage_date:number;
|
|
50
|
+
note?:string;
|
|
51
|
+
}
|
|
52
|
+
export interface DeleteResponse {
|
|
53
|
+
usage:Usage;
|
|
54
|
+
}
|
|
55
|
+
export interface DeleteInputParam {
|
|
56
|
+
|
|
57
|
+
id:string;
|
|
58
|
+
}
|
|
59
|
+
export interface ListResponse {
|
|
60
|
+
list:{usage:Usage}[];
|
|
61
|
+
next_offset?:string;
|
|
62
|
+
}
|
|
63
|
+
export interface ListInputParam {
|
|
64
|
+
[key: string]: string | number | object | boolean;
|
|
65
|
+
limit?:number;
|
|
66
|
+
offset?:string;
|
|
67
|
+
id?:{is?:string,is_not?:string,starts_with?:string};
|
|
68
|
+
subscription_id:{is?:string,is_not?:string,starts_with?:string};
|
|
69
|
+
usage_date?:{after?:string,before?:string,between?:string,on?:string};
|
|
70
|
+
item_price_id?:{is?:string,is_not?:string,starts_with?:string};
|
|
71
|
+
invoice_id?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string};
|
|
72
|
+
source?:{in?:string,is?:'admin_console' | 'bulk_operation' | 'api',is_not?:'admin_console' | 'bulk_operation' | 'api',not_in?:string};
|
|
73
|
+
sort_by?:{asc?:'usage_date',desc?:'usage_date'};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
declare module 'chargebee' {
|
|
3
|
+
export interface VirtualBankAccount {
|
|
4
|
+
|
|
5
|
+
id:string;
|
|
6
|
+
customer_id:string;
|
|
7
|
+
email:string;
|
|
8
|
+
scheme?:'ach_credit' | 'sepa_credit';
|
|
9
|
+
bank_name?:string;
|
|
10
|
+
account_number:string;
|
|
11
|
+
routing_number?:string;
|
|
12
|
+
swift_code:string;
|
|
13
|
+
gateway:Gateway;
|
|
14
|
+
gateway_account_id:string;
|
|
15
|
+
resource_version?:number;
|
|
16
|
+
updated_at?:number;
|
|
17
|
+
created_at:number;
|
|
18
|
+
reference_id:string;
|
|
19
|
+
deleted:boolean;
|
|
20
|
+
}
|
|
21
|
+
export namespace VirtualBankAccount {
|
|
22
|
+
export class VirtualBankAccountResource {
|
|
23
|
+
delete_local(virtual_bank_account_id:string):ChargebeeRequest<DeleteLocalResponse>;
|
|
24
|
+
delete(virtual_bank_account_id:string):ChargebeeRequest<DeleteResponse>;
|
|
25
|
+
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
26
|
+
create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
|
|
27
|
+
retrieve(virtual_bank_account_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
28
|
+
create_using_permanent_token(input:CreateUsingPermanentTokenInputParam):ChargebeeRequest<CreateUsingPermanentTokenResponse>;
|
|
29
|
+
}
|
|
30
|
+
export interface DeleteLocalResponse {
|
|
31
|
+
virtual_bank_account:VirtualBankAccount;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface DeleteResponse {
|
|
35
|
+
virtual_bank_account:VirtualBankAccount;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface ListResponse {
|
|
39
|
+
list:{virtual_bank_account:VirtualBankAccount}[];
|
|
40
|
+
next_offset?:string;
|
|
41
|
+
}
|
|
42
|
+
export interface ListInputParam {
|
|
43
|
+
[key: string]: string | number | object | boolean;
|
|
44
|
+
limit?:number;
|
|
45
|
+
offset?:string;
|
|
46
|
+
customer_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
47
|
+
updated_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
48
|
+
created_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
49
|
+
}
|
|
50
|
+
export interface CreateResponse {
|
|
51
|
+
virtual_bank_account:VirtualBankAccount;
|
|
52
|
+
customer?:Customer;
|
|
53
|
+
}
|
|
54
|
+
export interface CreateInputParam {
|
|
55
|
+
|
|
56
|
+
customer_id:string;
|
|
57
|
+
email?:string;
|
|
58
|
+
scheme?:'ach_credit' | 'sepa_credit';
|
|
59
|
+
}
|
|
60
|
+
export interface RetrieveResponse {
|
|
61
|
+
virtual_bank_account:VirtualBankAccount;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface CreateUsingPermanentTokenResponse {
|
|
65
|
+
virtual_bank_account:VirtualBankAccount;
|
|
66
|
+
customer?:Customer;
|
|
67
|
+
}
|
|
68
|
+
export interface CreateUsingPermanentTokenInputParam {
|
|
69
|
+
|
|
70
|
+
customer_id:string;
|
|
71
|
+
reference_id:string;
|
|
72
|
+
scheme?:'ach_credit' | 'sepa_credit';
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
}
|
|
76
|
+
}
|