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