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,75 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
declare module 'chargebee' {
|
|
3
|
+
export interface PaymentVoucher {
|
|
4
|
+
|
|
5
|
+
id:string;
|
|
6
|
+
id_at_gateway?:string;
|
|
7
|
+
payment_voucher_type:PaymentVoucherType;
|
|
8
|
+
expires_at?:number;
|
|
9
|
+
status?:'consumed' | 'expired' | 'failure' | 'active';
|
|
10
|
+
subscription_id?:string;
|
|
11
|
+
currency_code:string;
|
|
12
|
+
amount?:number;
|
|
13
|
+
gateway_account_id?:string;
|
|
14
|
+
payment_source_id?:string;
|
|
15
|
+
gateway:Gateway;
|
|
16
|
+
payload?:string;
|
|
17
|
+
error_code?:string;
|
|
18
|
+
error_text?:string;
|
|
19
|
+
url?:string;
|
|
20
|
+
date?:number;
|
|
21
|
+
resource_version?:number;
|
|
22
|
+
updated_at?:number;
|
|
23
|
+
customer_id:string;
|
|
24
|
+
linked_invoices?:PaymentVoucher.InvoicePaymentVoucher[];
|
|
25
|
+
}
|
|
26
|
+
export namespace PaymentVoucher {
|
|
27
|
+
export class PaymentVoucherResource {
|
|
28
|
+
payment_vouchers_for_customer(customer_id:string, input?:Payment_vouchersForCustomerInputParam):ChargebeeRequest<Payment_vouchersForCustomerResponse>;
|
|
29
|
+
payment_vouchers_for_invoice(invoice_id:string, input?:Payment_vouchersForInvoiceInputParam):ChargebeeRequest<Payment_vouchersForInvoiceResponse>;
|
|
30
|
+
retrieve(payment_voucher_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
31
|
+
create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
|
|
32
|
+
}
|
|
33
|
+
export interface Payment_vouchersForCustomerResponse {
|
|
34
|
+
list:{payment_voucher:PaymentVoucher}[];
|
|
35
|
+
next_offset?:string;
|
|
36
|
+
}
|
|
37
|
+
export interface Payment_vouchersForCustomerInputParam {
|
|
38
|
+
[key: string]: string | number | object | boolean;
|
|
39
|
+
limit?:number;
|
|
40
|
+
offset?:string;
|
|
41
|
+
status?:{in?:string,is?:'consumed' | 'expired' | 'failure' | 'active',is_not?:'consumed' | 'expired' | 'failure' | 'active',not_in?:string};
|
|
42
|
+
sort_by?:{asc?:'date' | 'updated_at',desc?:'date' | 'updated_at'};
|
|
43
|
+
}
|
|
44
|
+
export interface Payment_vouchersForInvoiceResponse {
|
|
45
|
+
list:{payment_voucher:PaymentVoucher}[];
|
|
46
|
+
next_offset?:string;
|
|
47
|
+
}
|
|
48
|
+
export interface Payment_vouchersForInvoiceInputParam {
|
|
49
|
+
[key: string]: string | number | object | boolean;
|
|
50
|
+
limit?:number;
|
|
51
|
+
offset?:string;
|
|
52
|
+
status?:{in?:string,is?:'consumed' | 'expired' | 'failure' | 'active',is_not?:'consumed' | 'expired' | 'failure' | 'active',not_in?:string};
|
|
53
|
+
sort_by?:{asc?:'date' | 'updated_at',desc?:'date' | 'updated_at'};
|
|
54
|
+
}
|
|
55
|
+
export interface RetrieveResponse {
|
|
56
|
+
payment_voucher:PaymentVoucher;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface CreateResponse {
|
|
60
|
+
payment_voucher:PaymentVoucher;
|
|
61
|
+
}
|
|
62
|
+
export interface CreateInputParam {
|
|
63
|
+
|
|
64
|
+
customer_id:string;
|
|
65
|
+
payment_source_id?:string;
|
|
66
|
+
voucher_payment_source?:{voucher_type:VoucherType};
|
|
67
|
+
invoice_allocations?:{invoice_id:string}[];
|
|
68
|
+
}
|
|
69
|
+
export interface InvoicePaymentVoucher {
|
|
70
|
+
invoice_id?:string;
|
|
71
|
+
txn_id?:string;
|
|
72
|
+
applied_at?:number;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
declare module 'chargebee' {
|
|
3
|
+
export interface PortalSession {
|
|
4
|
+
|
|
5
|
+
id:string;
|
|
6
|
+
token:string;
|
|
7
|
+
access_url:string;
|
|
8
|
+
redirect_url?:string;
|
|
9
|
+
status:'not_yet_activated' | 'created' | 'logged_in' | 'logged_out' | 'activated';
|
|
10
|
+
created_at:number;
|
|
11
|
+
expires_at?:number;
|
|
12
|
+
customer_id:string;
|
|
13
|
+
login_at?:number;
|
|
14
|
+
logout_at?:number;
|
|
15
|
+
login_ipaddress?:string;
|
|
16
|
+
logout_ipaddress?:string;
|
|
17
|
+
linked_customers?:PortalSession.LinkedCustomer[];
|
|
18
|
+
}
|
|
19
|
+
export namespace PortalSession {
|
|
20
|
+
export class PortalSessionResource {
|
|
21
|
+
create(input?:CreateInputParam):ChargebeeRequest<CreateResponse>;
|
|
22
|
+
activate(portal_session_id:string, input:ActivateInputParam):ChargebeeRequest<ActivateResponse>;
|
|
23
|
+
logout(portal_session_id:string):ChargebeeRequest<LogoutResponse>;
|
|
24
|
+
retrieve(portal_session_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
25
|
+
}
|
|
26
|
+
export interface CreateResponse {
|
|
27
|
+
portal_session:PortalSession;
|
|
28
|
+
}
|
|
29
|
+
export interface CreateInputParam {
|
|
30
|
+
|
|
31
|
+
redirect_url?:string;
|
|
32
|
+
forward_url?:string;
|
|
33
|
+
customer?:{id:string};
|
|
34
|
+
}
|
|
35
|
+
export interface ActivateResponse {
|
|
36
|
+
portal_session:PortalSession;
|
|
37
|
+
}
|
|
38
|
+
export interface ActivateInputParam {
|
|
39
|
+
|
|
40
|
+
token:string;
|
|
41
|
+
}
|
|
42
|
+
export interface LogoutResponse {
|
|
43
|
+
portal_session:PortalSession;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface RetrieveResponse {
|
|
47
|
+
portal_session:PortalSession;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface LinkedCustomer {
|
|
51
|
+
customer_id?:string;
|
|
52
|
+
email?:string;
|
|
53
|
+
has_billing_address?:boolean;
|
|
54
|
+
has_payment_method?:boolean;
|
|
55
|
+
has_active_subscription?:boolean;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
declare module 'chargebee' {
|
|
3
|
+
export interface PromotionalCredit {
|
|
4
|
+
|
|
5
|
+
id:string;
|
|
6
|
+
customer_id:string;
|
|
7
|
+
type:'decrement' | 'increment';
|
|
8
|
+
amount_in_decimal?:string;
|
|
9
|
+
amount:number;
|
|
10
|
+
currency_code:string;
|
|
11
|
+
description:string;
|
|
12
|
+
credit_type:CreditType;
|
|
13
|
+
reference?:string;
|
|
14
|
+
closing_balance:number;
|
|
15
|
+
done_by?:string;
|
|
16
|
+
created_at:number;
|
|
17
|
+
}
|
|
18
|
+
export namespace PromotionalCredit {
|
|
19
|
+
export class PromotionalCreditResource {
|
|
20
|
+
retrieve(account_credit_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
21
|
+
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
22
|
+
deduct(input:DeductInputParam):ChargebeeRequest<DeductResponse>;
|
|
23
|
+
set(input:SetInputParam):ChargebeeRequest<SetResponse>;
|
|
24
|
+
add(input:AddInputParam):ChargebeeRequest<AddResponse>;
|
|
25
|
+
}
|
|
26
|
+
export interface RetrieveResponse {
|
|
27
|
+
promotional_credit:PromotionalCredit;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface ListResponse {
|
|
31
|
+
list:{promotional_credit:PromotionalCredit}[];
|
|
32
|
+
next_offset?:string;
|
|
33
|
+
}
|
|
34
|
+
export interface ListInputParam {
|
|
35
|
+
[key: string]: string | number | object | boolean;
|
|
36
|
+
limit?:number;
|
|
37
|
+
offset?:string;
|
|
38
|
+
id?:{is?:string,is_not?:string,starts_with?:string};
|
|
39
|
+
created_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
40
|
+
type?:{in?:string,is?:'decrement' | 'increment',is_not?:'decrement' | 'increment',not_in?:string};
|
|
41
|
+
customer_id?:{is?:string,is_not?:string,starts_with?:string};
|
|
42
|
+
}
|
|
43
|
+
export interface DeductResponse {
|
|
44
|
+
customer:Customer;
|
|
45
|
+
promotional_credit:PromotionalCredit;
|
|
46
|
+
}
|
|
47
|
+
export interface DeductInputParam {
|
|
48
|
+
|
|
49
|
+
customer_id:string;
|
|
50
|
+
amount?:number;
|
|
51
|
+
amount_in_decimal?:string;
|
|
52
|
+
currency_code?:string;
|
|
53
|
+
description:string;
|
|
54
|
+
credit_type?:CreditType;
|
|
55
|
+
reference?:string;
|
|
56
|
+
}
|
|
57
|
+
export interface SetResponse {
|
|
58
|
+
customer:Customer;
|
|
59
|
+
promotional_credit:PromotionalCredit;
|
|
60
|
+
}
|
|
61
|
+
export interface SetInputParam {
|
|
62
|
+
|
|
63
|
+
customer_id:string;
|
|
64
|
+
amount?:number;
|
|
65
|
+
amount_in_decimal?:string;
|
|
66
|
+
currency_code?:string;
|
|
67
|
+
description:string;
|
|
68
|
+
credit_type?:CreditType;
|
|
69
|
+
reference?:string;
|
|
70
|
+
}
|
|
71
|
+
export interface AddResponse {
|
|
72
|
+
customer:Customer;
|
|
73
|
+
promotional_credit:PromotionalCredit;
|
|
74
|
+
}
|
|
75
|
+
export interface AddInputParam {
|
|
76
|
+
|
|
77
|
+
customer_id:string;
|
|
78
|
+
amount?:number;
|
|
79
|
+
amount_in_decimal?:string;
|
|
80
|
+
currency_code?:string;
|
|
81
|
+
description:string;
|
|
82
|
+
credit_type?:CreditType;
|
|
83
|
+
reference?:string;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
declare module 'chargebee' {
|
|
3
|
+
export interface Purchase {
|
|
4
|
+
|
|
5
|
+
id?:string;
|
|
6
|
+
customer_id:string;
|
|
7
|
+
created_at?:number;
|
|
8
|
+
modified_at?:number;
|
|
9
|
+
subscription_ids?:string[];
|
|
10
|
+
invoice_ids?:string[];
|
|
11
|
+
}
|
|
12
|
+
export namespace Purchase {
|
|
13
|
+
export class PurchaseResource {
|
|
14
|
+
create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
|
|
15
|
+
estimate(input?:EstimateInputParam):ChargebeeRequest<EstimateResponse>;
|
|
16
|
+
}
|
|
17
|
+
export interface CreateResponse {
|
|
18
|
+
purchase:Purchase;
|
|
19
|
+
}
|
|
20
|
+
export interface CreateInputParam {
|
|
21
|
+
|
|
22
|
+
customer_id:string;
|
|
23
|
+
invoice_info?:{notes?:string,po_number?:string};
|
|
24
|
+
purchase_items?:{index:number,item_price_id:string,quantity?:number,quantity_in_decimal?:string,unit_amount?:number,unit_amount_in_decimal?:string}[];
|
|
25
|
+
item_tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,index:number,item_price_id?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
|
|
26
|
+
shipping_addresses?:{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}[];
|
|
27
|
+
discounts?:{amount?:number,coupon_id?:string,included_in_mrr?:boolean,index?:number,percentage?:number}[];
|
|
28
|
+
subscription_info?:{billing_cycles?:number,index:number,meta_data?:object,subscription_id?:string}[];
|
|
29
|
+
}
|
|
30
|
+
export interface EstimateResponse {
|
|
31
|
+
estimate:Estimate;
|
|
32
|
+
}
|
|
33
|
+
export interface EstimateInputParam {
|
|
34
|
+
|
|
35
|
+
client_profile_id?:string;
|
|
36
|
+
customer_id?:string;
|
|
37
|
+
customer?:{customer_type?:CustomerType,entity_code?:EntityCode,exempt_number?:string,exemption_details?:any[],registered_for_gst?:boolean,taxability?:Taxability,vat_number?:string,vat_number_prefix?:string};
|
|
38
|
+
billing_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
|
|
39
|
+
purchase_items?:{index:number,item_price_id:string,quantity?:number,quantity_in_decimal?:string,unit_amount?:number,unit_amount_in_decimal?:string}[];
|
|
40
|
+
item_tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,index:number,item_price_id?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
|
|
41
|
+
shipping_addresses?:{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}[];
|
|
42
|
+
discounts?:{amount?:number,coupon_id?:string,included_in_mrr?:boolean,index?:number,percentage?:number}[];
|
|
43
|
+
subscription_info?:{billing_cycles?:number,index:number,subscription_id?:string}[];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
declare module 'chargebee' {
|
|
3
|
+
export interface Quote {
|
|
4
|
+
|
|
5
|
+
id:string;
|
|
6
|
+
name?:string;
|
|
7
|
+
po_number?:string;
|
|
8
|
+
customer_id:string;
|
|
9
|
+
subscription_id?:string;
|
|
10
|
+
invoice_id?:string;
|
|
11
|
+
status:'declined' | 'invoiced' | 'accepted' | 'closed' | 'open';
|
|
12
|
+
operation_type:'onetime_invoice' | 'change_subscription' | 'create_subscription_for_customer';
|
|
13
|
+
vat_number?:string;
|
|
14
|
+
price_type:PriceType;
|
|
15
|
+
valid_till:number;
|
|
16
|
+
date:number;
|
|
17
|
+
total_payable?:number;
|
|
18
|
+
charge_on_acceptance?:number;
|
|
19
|
+
sub_total:number;
|
|
20
|
+
total?:number;
|
|
21
|
+
credits_applied?:number;
|
|
22
|
+
amount_paid?:number;
|
|
23
|
+
amount_due?:number;
|
|
24
|
+
version?:number;
|
|
25
|
+
resource_version?:number;
|
|
26
|
+
updated_at?:number;
|
|
27
|
+
vat_number_prefix?:string;
|
|
28
|
+
tax_category?:string;
|
|
29
|
+
currency_code:string;
|
|
30
|
+
notes?:any[];
|
|
31
|
+
contract_term_start?:number;
|
|
32
|
+
contract_term_end?:number;
|
|
33
|
+
contract_term_termination_fee?:number;
|
|
34
|
+
business_entity_id:string;
|
|
35
|
+
line_items?:Quote.LineItem[];
|
|
36
|
+
discounts?:Quote.Discount[];
|
|
37
|
+
line_item_discounts?:Quote.LineItemDiscount[];
|
|
38
|
+
taxes?:Quote.Tax[];
|
|
39
|
+
line_item_taxes?:Quote.LineItemTax[];
|
|
40
|
+
line_item_tiers?:Quote.LineItemTier[];
|
|
41
|
+
shipping_address?:Quote.ShippingAddress;
|
|
42
|
+
billing_address?:Quote.BillingAddress;
|
|
43
|
+
}
|
|
44
|
+
export namespace Quote {
|
|
45
|
+
export class QuoteResource {
|
|
46
|
+
create_sub_items_for_customer_quote(customer_id:string, input?:CreateSubItemsForCustomerQuoteInputParam):ChargebeeRequest<CreateSubItemsForCustomerQuoteResponse>;
|
|
47
|
+
retrieve(quote_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
48
|
+
edit_create_sub_customer_quote_for_items(quote_id:string, input?:EditCreateSubCustomerQuoteForItemsInputParam):ChargebeeRequest<EditCreateSubCustomerQuoteForItemsResponse>;
|
|
49
|
+
update_status(quote_id:string, input:UpdateStatusInputParam):ChargebeeRequest<UpdateStatusResponse>;
|
|
50
|
+
update_subscription_quote_for_items(input?:UpdateSubscriptionQuoteForItemsInputParam):ChargebeeRequest<UpdateSubscriptionQuoteForItemsResponse>;
|
|
51
|
+
quote_line_groups_for_quote(quote_id:string, input?:QuoteLineGroupsForQuoteInputParam):ChargebeeRequest<QuoteLineGroupsForQuoteResponse>;
|
|
52
|
+
extend_expiry_date(quote_id:string, input:ExtendExpiryDateInputParam):ChargebeeRequest<ExtendExpiryDateResponse>;
|
|
53
|
+
edit_for_charge_items_and_charges(quote_id:string, input?:EditForChargeItemsAndChargesInputParam):ChargebeeRequest<EditForChargeItemsAndChargesResponse>;
|
|
54
|
+
edit_update_subscription_quote_for_items(quote_id:string, input?:EditUpdateSubscriptionQuoteForItemsInputParam):ChargebeeRequest<EditUpdateSubscriptionQuoteForItemsResponse>;
|
|
55
|
+
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
56
|
+
pdf(quote_id:string, input?:PdfInputParam):ChargebeeRequest<PdfResponse>;
|
|
57
|
+
convert(quote_id:string, input?:ConvertInputParam):ChargebeeRequest<ConvertResponse>;
|
|
58
|
+
create_for_charge_items_and_charges(input:CreateForChargeItemsAndChargesInputParam):ChargebeeRequest<CreateForChargeItemsAndChargesResponse>;
|
|
59
|
+
delete(quote_id:string, input?:DeleteInputParam):ChargebeeRequest<DeleteResponse>;
|
|
60
|
+
}
|
|
61
|
+
export interface CreateSubItemsForCustomerQuoteResponse {
|
|
62
|
+
quote:Quote;
|
|
63
|
+
quoted_subscription?:QuotedSubscription;
|
|
64
|
+
}
|
|
65
|
+
export interface CreateSubItemsForCustomerQuoteInputParam {
|
|
66
|
+
|
|
67
|
+
name?:string;
|
|
68
|
+
notes?:string;
|
|
69
|
+
expires_at?:number;
|
|
70
|
+
billing_cycles?:number;
|
|
71
|
+
mandatory_items_to_remove?:string[];
|
|
72
|
+
terms_to_charge?:number;
|
|
73
|
+
billing_alignment_mode?:BillingAlignmentMode;
|
|
74
|
+
coupon_ids?:string[];
|
|
75
|
+
subscription?:{contract_term_billing_cycle_on_renewal?:number,id?:string,po_number?:string,start_date?:number,trial_end?:number};
|
|
76
|
+
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};
|
|
77
|
+
contract_term?:{action_at_term_end?:'cancel' | 'renew' | 'evergreen',cancellation_cutoff_period?:number};
|
|
78
|
+
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}[];
|
|
79
|
+
discounts?:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,included_in_mrr?:boolean,item_price_id?:string,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
|
|
80
|
+
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}[];
|
|
81
|
+
}
|
|
82
|
+
export interface RetrieveResponse {
|
|
83
|
+
quote:Quote;
|
|
84
|
+
quoted_subscription?:QuotedSubscription;
|
|
85
|
+
quoted_charge?:QuotedCharge;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface EditCreateSubCustomerQuoteForItemsResponse {
|
|
89
|
+
quote:Quote;
|
|
90
|
+
quoted_subscription?:QuotedSubscription;
|
|
91
|
+
}
|
|
92
|
+
export interface EditCreateSubCustomerQuoteForItemsInputParam {
|
|
93
|
+
|
|
94
|
+
notes?:string;
|
|
95
|
+
expires_at?:number;
|
|
96
|
+
billing_cycles?:number;
|
|
97
|
+
mandatory_items_to_remove?:string[];
|
|
98
|
+
terms_to_charge?:number;
|
|
99
|
+
billing_alignment_mode?:BillingAlignmentMode;
|
|
100
|
+
coupon_ids?:string[];
|
|
101
|
+
subscription?:{contract_term_billing_cycle_on_renewal?:number,id?:string,start_date?:number,trial_end?:number};
|
|
102
|
+
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};
|
|
103
|
+
contract_term?:{action_at_term_end?:'cancel' | 'renew' | 'evergreen',cancellation_cutoff_period?:number};
|
|
104
|
+
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}[];
|
|
105
|
+
discounts?:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,included_in_mrr?:boolean,item_price_id?:string,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
|
|
106
|
+
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}[];
|
|
107
|
+
}
|
|
108
|
+
export interface UpdateStatusResponse {
|
|
109
|
+
quote:Quote;
|
|
110
|
+
quoted_subscription?:QuotedSubscription;
|
|
111
|
+
quoted_charge?:QuotedCharge;
|
|
112
|
+
}
|
|
113
|
+
export interface UpdateStatusInputParam {
|
|
114
|
+
|
|
115
|
+
status:'declined' | 'accepted' | 'closed';
|
|
116
|
+
comment?:string;
|
|
117
|
+
}
|
|
118
|
+
export interface UpdateSubscriptionQuoteForItemsResponse {
|
|
119
|
+
quote:Quote;
|
|
120
|
+
quoted_subscription?:QuotedSubscription;
|
|
121
|
+
}
|
|
122
|
+
export interface UpdateSubscriptionQuoteForItemsInputParam {
|
|
123
|
+
|
|
124
|
+
name?:string;
|
|
125
|
+
notes?:string;
|
|
126
|
+
expires_at?:number;
|
|
127
|
+
mandatory_items_to_remove?:string[];
|
|
128
|
+
replace_items_list?:boolean;
|
|
129
|
+
billing_cycles?:number;
|
|
130
|
+
terms_to_charge?:number;
|
|
131
|
+
reactivate_from?:number;
|
|
132
|
+
billing_alignment_mode?:BillingAlignmentMode;
|
|
133
|
+
coupon_ids?:string[];
|
|
134
|
+
replace_coupon_list?:boolean;
|
|
135
|
+
change_option?:ChangeOption;
|
|
136
|
+
changes_scheduled_at?:number;
|
|
137
|
+
force_term_reset?:boolean;
|
|
138
|
+
reactivate?:boolean;
|
|
139
|
+
subscription?:{auto_collection?:AutoCollection,contract_term_billing_cycle_on_renewal?:number,id:string,offline_payment_method?:OfflinePaymentMethod,start_date?:number,trial_end?:number};
|
|
140
|
+
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};
|
|
141
|
+
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};
|
|
142
|
+
customer?:{registered_for_gst?:boolean,vat_number?:string,vat_number_prefix?:string};
|
|
143
|
+
contract_term?:{action_at_term_end?:'cancel' | 'renew_once' | 'renew' | 'evergreen',cancellation_cutoff_period?:number};
|
|
144
|
+
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}[];
|
|
145
|
+
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}[];
|
|
146
|
+
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}[];
|
|
147
|
+
}
|
|
148
|
+
export interface QuoteLineGroupsForQuoteResponse {
|
|
149
|
+
list:{quote_line_group:QuoteLineGroup}[];
|
|
150
|
+
next_offset?:string;
|
|
151
|
+
}
|
|
152
|
+
export interface QuoteLineGroupsForQuoteInputParam {
|
|
153
|
+
[key: string]: string | number | object | boolean;
|
|
154
|
+
limit?:number;
|
|
155
|
+
offset?:string;
|
|
156
|
+
}
|
|
157
|
+
export interface ExtendExpiryDateResponse {
|
|
158
|
+
quote:Quote;
|
|
159
|
+
quoted_subscription?:QuotedSubscription;
|
|
160
|
+
quoted_charge?:QuotedCharge;
|
|
161
|
+
}
|
|
162
|
+
export interface ExtendExpiryDateInputParam {
|
|
163
|
+
|
|
164
|
+
valid_till:number;
|
|
165
|
+
}
|
|
166
|
+
export interface EditForChargeItemsAndChargesResponse {
|
|
167
|
+
quote:Quote;
|
|
168
|
+
quoted_charge?:QuotedCharge;
|
|
169
|
+
}
|
|
170
|
+
export interface EditForChargeItemsAndChargesInputParam {
|
|
171
|
+
|
|
172
|
+
po_number?:string;
|
|
173
|
+
notes?:string;
|
|
174
|
+
expires_at?:number;
|
|
175
|
+
currency_code?:string;
|
|
176
|
+
coupon?:string;
|
|
177
|
+
coupon_ids?:string[];
|
|
178
|
+
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};
|
|
179
|
+
item_prices?:{item_price_id?:string,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
180
|
+
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}[];
|
|
181
|
+
charges?:{amount?:number,amount_in_decimal?:string,avalara_sale_type?:AvalaraSaleType,avalara_service_type?:number,avalara_transaction_type?:number,description?:string,service_period?:number}[];
|
|
182
|
+
discounts?:{amount?:number,apply_on:ApplyOn,item_price_id?:string,percentage?:number}[];
|
|
183
|
+
}
|
|
184
|
+
export interface EditUpdateSubscriptionQuoteForItemsResponse {
|
|
185
|
+
quote:Quote;
|
|
186
|
+
quoted_subscription?:QuotedSubscription;
|
|
187
|
+
}
|
|
188
|
+
export interface EditUpdateSubscriptionQuoteForItemsInputParam {
|
|
189
|
+
|
|
190
|
+
notes?:string;
|
|
191
|
+
expires_at?:number;
|
|
192
|
+
mandatory_items_to_remove?:string[];
|
|
193
|
+
replace_items_list?:boolean;
|
|
194
|
+
billing_cycles?:number;
|
|
195
|
+
terms_to_charge?:number;
|
|
196
|
+
reactivate_from?:number;
|
|
197
|
+
billing_alignment_mode?:BillingAlignmentMode;
|
|
198
|
+
coupon_ids?:string[];
|
|
199
|
+
replace_coupon_list?:boolean;
|
|
200
|
+
change_option?:ChangeOption;
|
|
201
|
+
changes_scheduled_at?:number;
|
|
202
|
+
force_term_reset?:boolean;
|
|
203
|
+
reactivate?:boolean;
|
|
204
|
+
subscription?:{auto_collection?:AutoCollection,contract_term_billing_cycle_on_renewal?:number,offline_payment_method?:OfflinePaymentMethod,start_date?:number,trial_end?:number};
|
|
205
|
+
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};
|
|
206
|
+
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};
|
|
207
|
+
customer?:{registered_for_gst?:boolean,vat_number?:string,vat_number_prefix?:string};
|
|
208
|
+
contract_term?:{action_at_term_end?:'cancel' | 'renew_once' | 'renew' | 'evergreen',cancellation_cutoff_period?:number};
|
|
209
|
+
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}[];
|
|
210
|
+
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}[];
|
|
211
|
+
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}[];
|
|
212
|
+
}
|
|
213
|
+
export interface ListResponse {
|
|
214
|
+
list:{quote:Quote,quoted_subscription?:QuotedSubscription}[];
|
|
215
|
+
next_offset?:string;
|
|
216
|
+
}
|
|
217
|
+
export interface ListInputParam {
|
|
218
|
+
[key: string]: string | number | object | boolean;
|
|
219
|
+
limit?:number;
|
|
220
|
+
offset?:string;
|
|
221
|
+
include_deleted?:boolean;
|
|
222
|
+
id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
223
|
+
customer_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
224
|
+
subscription_id?:{in?:string,is?:string,is_not?:string,is_present?:'true' | 'false',not_in?:string,starts_with?:string};
|
|
225
|
+
status?:{in?:string,is?:'declined' | 'invoiced' | 'accepted' | 'closed' | 'open',is_not?:'declined' | 'invoiced' | 'accepted' | 'closed' | 'open',not_in?:string};
|
|
226
|
+
date?:{after?:string,before?:string,between?:string,on?:string};
|
|
227
|
+
updated_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
228
|
+
sort_by?:{asc?:'date',desc?:'date'};
|
|
229
|
+
}
|
|
230
|
+
export interface PdfResponse {
|
|
231
|
+
download:Download;
|
|
232
|
+
}
|
|
233
|
+
export interface PdfInputParam {
|
|
234
|
+
|
|
235
|
+
consolidated_view?:boolean;
|
|
236
|
+
disposition_type?:DispositionType;
|
|
237
|
+
}
|
|
238
|
+
export interface ConvertResponse {
|
|
239
|
+
quote:Quote;
|
|
240
|
+
quoted_subscription?:QuotedSubscription;
|
|
241
|
+
quoted_charge?:QuotedCharge;
|
|
242
|
+
customer:Customer;
|
|
243
|
+
subscription?:Subscription;
|
|
244
|
+
invoice?:Invoice;
|
|
245
|
+
credit_note?:CreditNote;
|
|
246
|
+
unbilled_charges?:UnbilledCharge[];
|
|
247
|
+
}
|
|
248
|
+
export interface ConvertInputParam {
|
|
249
|
+
|
|
250
|
+
invoice_date?:number;
|
|
251
|
+
create_pending_invoices?:boolean;
|
|
252
|
+
first_invoice_pending?:boolean;
|
|
253
|
+
subscription?:{auto_close_invoices?:boolean,auto_collection?:AutoCollection,id?:string,po_number?:string};
|
|
254
|
+
}
|
|
255
|
+
export interface CreateForChargeItemsAndChargesResponse {
|
|
256
|
+
quote:Quote;
|
|
257
|
+
quoted_charge?:QuotedCharge;
|
|
258
|
+
}
|
|
259
|
+
export interface CreateForChargeItemsAndChargesInputParam {
|
|
260
|
+
|
|
261
|
+
name?:string;
|
|
262
|
+
customer_id:string;
|
|
263
|
+
po_number?:string;
|
|
264
|
+
notes?:string;
|
|
265
|
+
expires_at?:number;
|
|
266
|
+
currency_code?:string;
|
|
267
|
+
coupon?:string;
|
|
268
|
+
coupon_ids?:string[];
|
|
269
|
+
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};
|
|
270
|
+
item_prices?:{item_price_id?:string,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
271
|
+
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}[];
|
|
272
|
+
charges?:{amount?:number,amount_in_decimal?:string,avalara_sale_type?:AvalaraSaleType,avalara_service_type?:number,avalara_transaction_type?:number,description?:string,service_period?:number}[];
|
|
273
|
+
discounts?:{amount?:number,apply_on:ApplyOn,item_price_id?:string,percentage?:number}[];
|
|
274
|
+
}
|
|
275
|
+
export interface DeleteResponse {
|
|
276
|
+
quote:Quote;
|
|
277
|
+
quoted_subscription?:QuotedSubscription;
|
|
278
|
+
quoted_charge?:QuotedCharge;
|
|
279
|
+
}
|
|
280
|
+
export interface DeleteInputParam {
|
|
281
|
+
|
|
282
|
+
comment?:string;
|
|
283
|
+
}
|
|
284
|
+
export interface LineItem {
|
|
285
|
+
id?:string;
|
|
286
|
+
subscription_id?:string;
|
|
287
|
+
date_from?:number;
|
|
288
|
+
date_to?:number;
|
|
289
|
+
unit_amount?:number;
|
|
290
|
+
quantity?:number;
|
|
291
|
+
amount?:number;
|
|
292
|
+
pricing_model?:'volume' | 'per_unit' | 'tiered' | 'flat_fee' | 'stairstep';
|
|
293
|
+
is_taxed?:boolean;
|
|
294
|
+
tax_amount?:number;
|
|
295
|
+
tax_rate?:number;
|
|
296
|
+
unit_amount_in_decimal?:string;
|
|
297
|
+
quantity_in_decimal?:string;
|
|
298
|
+
amount_in_decimal?:string;
|
|
299
|
+
discount_amount?:number;
|
|
300
|
+
item_level_discount_amount?:number;
|
|
301
|
+
reference_line_item_id?:string;
|
|
302
|
+
description?:string;
|
|
303
|
+
entity_description?:string;
|
|
304
|
+
entity_type?:'addon_item_price' | 'plan_item_price' | 'charge_item_price' | 'adhoc';
|
|
305
|
+
tax_exempt_reason?:'high_value_physical_goods' | 'tax_not_configured' | 'reverse_charge' | 'zero_rated' | 'customer_exempt' | 'region_non_taxable' | 'zero_value_item' | 'export' | 'product_exempt';
|
|
306
|
+
entity_id?:string;
|
|
307
|
+
customer_id?:string;
|
|
308
|
+
}
|
|
309
|
+
export interface Discount {
|
|
310
|
+
amount?:number;
|
|
311
|
+
description?:string;
|
|
312
|
+
line_item_id?:string;
|
|
313
|
+
entity_type?:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'prorated_credits' | 'document_level_discount' | 'document_level_coupon';
|
|
314
|
+
discount_type?:'fixed_amount' | 'percentage';
|
|
315
|
+
entity_id?:string;
|
|
316
|
+
coupon_set_code?:string;
|
|
317
|
+
}
|
|
318
|
+
export interface LineItemDiscount {
|
|
319
|
+
line_item_id?:string;
|
|
320
|
+
discount_type?:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'prorated_credits' | 'document_level_discount' | 'document_level_coupon';
|
|
321
|
+
coupon_id?:string;
|
|
322
|
+
entity_id?:string;
|
|
323
|
+
discount_amount?:number;
|
|
324
|
+
}
|
|
325
|
+
export interface Tax {
|
|
326
|
+
name?:string;
|
|
327
|
+
amount?:number;
|
|
328
|
+
description?:string;
|
|
329
|
+
}
|
|
330
|
+
export interface LineItemTax {
|
|
331
|
+
line_item_id?:string;
|
|
332
|
+
tax_name?:string;
|
|
333
|
+
tax_rate?:number;
|
|
334
|
+
is_partial_tax_applied?:boolean;
|
|
335
|
+
is_non_compliance_tax?:boolean;
|
|
336
|
+
taxable_amount?:number;
|
|
337
|
+
tax_amount?:number;
|
|
338
|
+
tax_juris_type?:'special' | 'country' | 'unincorporated' | 'other' | 'city' | 'federal' | 'county' | 'state';
|
|
339
|
+
tax_juris_name?:string;
|
|
340
|
+
tax_juris_code?:string;
|
|
341
|
+
tax_amount_in_local_currency?:number;
|
|
342
|
+
local_currency_code?:string;
|
|
343
|
+
}
|
|
344
|
+
export interface LineItemTier {
|
|
345
|
+
line_item_id?:string;
|
|
346
|
+
starting_unit?:number;
|
|
347
|
+
ending_unit?:number;
|
|
348
|
+
quantity_used?:number;
|
|
349
|
+
unit_amount?:number;
|
|
350
|
+
starting_unit_in_decimal?:string;
|
|
351
|
+
ending_unit_in_decimal?:string;
|
|
352
|
+
quantity_used_in_decimal?:string;
|
|
353
|
+
unit_amount_in_decimal?:string;
|
|
354
|
+
}
|
|
355
|
+
export interface ShippingAddress {
|
|
356
|
+
first_name?:string;
|
|
357
|
+
last_name?:string;
|
|
358
|
+
email?:string;
|
|
359
|
+
company?:string;
|
|
360
|
+
phone?:string;
|
|
361
|
+
line1?:string;
|
|
362
|
+
line2?:string;
|
|
363
|
+
line3?:string;
|
|
364
|
+
city?:string;
|
|
365
|
+
state_code?:string;
|
|
366
|
+
state?:string;
|
|
367
|
+
country?:string;
|
|
368
|
+
zip?:string;
|
|
369
|
+
validation_status?:ValidationStatus;
|
|
370
|
+
index?:number;
|
|
371
|
+
}
|
|
372
|
+
export interface BillingAddress {
|
|
373
|
+
first_name?:string;
|
|
374
|
+
last_name?:string;
|
|
375
|
+
email?:string;
|
|
376
|
+
company?:string;
|
|
377
|
+
phone?:string;
|
|
378
|
+
line1?:string;
|
|
379
|
+
line2?:string;
|
|
380
|
+
line3?:string;
|
|
381
|
+
city?:string;
|
|
382
|
+
state_code?:string;
|
|
383
|
+
state?:string;
|
|
384
|
+
country?:string;
|
|
385
|
+
zip?:string;
|
|
386
|
+
validation_status?:ValidationStatus;
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
}
|