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,84 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
declare module 'chargebee' {
|
|
3
|
+
export interface QuoteLineGroup {
|
|
4
|
+
|
|
5
|
+
version?:number;
|
|
6
|
+
id?:string;
|
|
7
|
+
sub_total:number;
|
|
8
|
+
total?:number;
|
|
9
|
+
credits_applied?:number;
|
|
10
|
+
amount_paid?:number;
|
|
11
|
+
amount_due?:number;
|
|
12
|
+
charge_event?:'subscription_cancel' | 'immediate' | 'subscription_creation' | 'trial_start' | 'subscription_renewal' | 'subscription_change';
|
|
13
|
+
billing_cycle_number?:number;
|
|
14
|
+
line_items?:QuoteLineGroup.LineItem[];
|
|
15
|
+
discounts?:QuoteLineGroup.Discount[];
|
|
16
|
+
line_item_discounts?:QuoteLineGroup.LineItemDiscount[];
|
|
17
|
+
taxes?:QuoteLineGroup.Tax[];
|
|
18
|
+
line_item_taxes?:QuoteLineGroup.LineItemTax[];
|
|
19
|
+
}
|
|
20
|
+
export namespace QuoteLineGroup {
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
export interface LineItem {
|
|
24
|
+
id?:string;
|
|
25
|
+
subscription_id?:string;
|
|
26
|
+
date_from?:number;
|
|
27
|
+
date_to?:number;
|
|
28
|
+
unit_amount?:number;
|
|
29
|
+
quantity?:number;
|
|
30
|
+
amount?:number;
|
|
31
|
+
pricing_model?:'volume' | 'per_unit' | 'tiered' | 'flat_fee' | 'stairstep';
|
|
32
|
+
is_taxed?:boolean;
|
|
33
|
+
tax_amount?:number;
|
|
34
|
+
tax_rate?:number;
|
|
35
|
+
unit_amount_in_decimal?:string;
|
|
36
|
+
quantity_in_decimal?:string;
|
|
37
|
+
amount_in_decimal?:string;
|
|
38
|
+
discount_amount?:number;
|
|
39
|
+
item_level_discount_amount?:number;
|
|
40
|
+
reference_line_item_id?:string;
|
|
41
|
+
description?:string;
|
|
42
|
+
entity_description?:string;
|
|
43
|
+
entity_type?:'addon_item_price' | 'plan_item_price' | 'charge_item_price' | 'adhoc';
|
|
44
|
+
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';
|
|
45
|
+
entity_id?:string;
|
|
46
|
+
customer_id?:string;
|
|
47
|
+
}
|
|
48
|
+
export interface Discount {
|
|
49
|
+
amount?:number;
|
|
50
|
+
description?:string;
|
|
51
|
+
line_item_id?:string;
|
|
52
|
+
entity_type?:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'prorated_credits' | 'document_level_discount' | 'document_level_coupon';
|
|
53
|
+
discount_type?:'fixed_amount' | 'percentage';
|
|
54
|
+
entity_id?:string;
|
|
55
|
+
coupon_set_code?:string;
|
|
56
|
+
}
|
|
57
|
+
export interface LineItemDiscount {
|
|
58
|
+
line_item_id?:string;
|
|
59
|
+
discount_type?:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'prorated_credits' | 'document_level_discount' | 'document_level_coupon';
|
|
60
|
+
coupon_id?:string;
|
|
61
|
+
entity_id?:string;
|
|
62
|
+
discount_amount?:number;
|
|
63
|
+
}
|
|
64
|
+
export interface Tax {
|
|
65
|
+
name?:string;
|
|
66
|
+
amount?:number;
|
|
67
|
+
description?:string;
|
|
68
|
+
}
|
|
69
|
+
export interface LineItemTax {
|
|
70
|
+
line_item_id?:string;
|
|
71
|
+
tax_name?:string;
|
|
72
|
+
tax_rate?:number;
|
|
73
|
+
is_partial_tax_applied?:boolean;
|
|
74
|
+
is_non_compliance_tax?:boolean;
|
|
75
|
+
taxable_amount?:number;
|
|
76
|
+
tax_amount?:number;
|
|
77
|
+
tax_juris_type?:'special' | 'country' | 'unincorporated' | 'other' | 'city' | 'federal' | 'county' | 'state';
|
|
78
|
+
tax_juris_name?:string;
|
|
79
|
+
tax_juris_code?:string;
|
|
80
|
+
tax_amount_in_local_currency?:number;
|
|
81
|
+
local_currency_code?:string;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
declare module 'chargebee' {
|
|
3
|
+
export interface QuotedCharge {
|
|
4
|
+
|
|
5
|
+
charges?:QuotedCharge.Charge[];
|
|
6
|
+
invoice_items?:QuotedCharge.ItemPrice[];
|
|
7
|
+
item_tiers?:QuotedCharge.ItemTier[];
|
|
8
|
+
coupons?:QuotedCharge.Coupon[];
|
|
9
|
+
discounts?:QuotedCharge.Discount[];
|
|
10
|
+
}
|
|
11
|
+
export namespace QuotedCharge {
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
export interface Charge {
|
|
15
|
+
amount?:number;
|
|
16
|
+
amount_in_decimal?:string;
|
|
17
|
+
description?:string;
|
|
18
|
+
service_period_in_days?:number;
|
|
19
|
+
avalara_sale_type?:'consumed' | 'wholesale' | 'vendor_use' | 'retail';
|
|
20
|
+
avalara_transaction_type?:number;
|
|
21
|
+
avalara_service_type?:number;
|
|
22
|
+
}
|
|
23
|
+
export interface ItemPrice {
|
|
24
|
+
item_price_id?:string;
|
|
25
|
+
quantity?:number;
|
|
26
|
+
quantity_in_decimal?:string;
|
|
27
|
+
unit_price?:number;
|
|
28
|
+
unit_price_in_decimal?:string;
|
|
29
|
+
service_period_days?:number;
|
|
30
|
+
}
|
|
31
|
+
export interface ItemTier {
|
|
32
|
+
item_price_id?:string;
|
|
33
|
+
starting_unit?:number;
|
|
34
|
+
ending_unit?:number;
|
|
35
|
+
price?:number;
|
|
36
|
+
starting_unit_in_decimal?:string;
|
|
37
|
+
ending_unit_in_decimal?:string;
|
|
38
|
+
price_in_decimal?:string;
|
|
39
|
+
index?:number;
|
|
40
|
+
}
|
|
41
|
+
export interface Coupon {
|
|
42
|
+
coupon_id?:string;
|
|
43
|
+
}
|
|
44
|
+
export interface Discount {
|
|
45
|
+
id?:string;
|
|
46
|
+
invoice_name?:string;
|
|
47
|
+
type?:'fixed_amount' | 'percentage';
|
|
48
|
+
percentage?:number;
|
|
49
|
+
amount?:number;
|
|
50
|
+
currency_code?:string;
|
|
51
|
+
apply_on?:'specific_item_price' | 'invoice_amount';
|
|
52
|
+
item_price_id?:string;
|
|
53
|
+
created_at?:number;
|
|
54
|
+
coupon_id?:string;
|
|
55
|
+
index?:number;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
declare module 'chargebee' {
|
|
3
|
+
export interface QuotedSubscription {
|
|
4
|
+
|
|
5
|
+
id:string;
|
|
6
|
+
start_date?:number;
|
|
7
|
+
trial_end?:number;
|
|
8
|
+
remaining_billing_cycles?:number;
|
|
9
|
+
po_number?:string;
|
|
10
|
+
plan_quantity_in_decimal?:string;
|
|
11
|
+
plan_unit_price_in_decimal?:string;
|
|
12
|
+
changes_scheduled_at?:number;
|
|
13
|
+
change_option?:'end_of_term' | 'immediately' | 'specific_date';
|
|
14
|
+
contract_term_billing_cycle_on_renewal?:number;
|
|
15
|
+
coupons?:QuotedSubscription.Coupon[];
|
|
16
|
+
discounts?:QuotedSubscription.Discount[];
|
|
17
|
+
subscription_items?:QuotedSubscription.SubscriptionItem[];
|
|
18
|
+
item_tiers?:QuotedSubscription.ItemTier[];
|
|
19
|
+
quoted_contract_term?:QuotedSubscription.QuotedContractTerm;
|
|
20
|
+
}
|
|
21
|
+
export namespace QuotedSubscription {
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
export interface Coupon {
|
|
25
|
+
coupon_id?:string;
|
|
26
|
+
}
|
|
27
|
+
export interface Discount {
|
|
28
|
+
id?:string;
|
|
29
|
+
invoice_name?:string;
|
|
30
|
+
type?:'fixed_amount' | 'percentage';
|
|
31
|
+
percentage?:number;
|
|
32
|
+
amount?:number;
|
|
33
|
+
currency_code?:string;
|
|
34
|
+
duration_type?:'limited_period' | 'one_time' | 'forever';
|
|
35
|
+
period?:number;
|
|
36
|
+
period_unit?:'week' | 'month' | 'year' | 'day';
|
|
37
|
+
included_in_mrr?:boolean;
|
|
38
|
+
apply_on?:'specific_item_price' | 'invoice_amount';
|
|
39
|
+
item_price_id?:string;
|
|
40
|
+
created_at?:number;
|
|
41
|
+
apply_till?:number;
|
|
42
|
+
applied_count?:number;
|
|
43
|
+
coupon_id?:string;
|
|
44
|
+
index?:number;
|
|
45
|
+
}
|
|
46
|
+
export interface SubscriptionItem {
|
|
47
|
+
item_price_id?:string;
|
|
48
|
+
item_type?:'charge' | 'addon' | 'plan';
|
|
49
|
+
quantity?:number;
|
|
50
|
+
quantity_in_decimal?:string;
|
|
51
|
+
unit_price?:number;
|
|
52
|
+
unit_price_in_decimal?:string;
|
|
53
|
+
amount?:number;
|
|
54
|
+
amount_in_decimal?:string;
|
|
55
|
+
free_quantity?:number;
|
|
56
|
+
free_quantity_in_decimal?:string;
|
|
57
|
+
trial_end?:number;
|
|
58
|
+
billing_cycles?:number;
|
|
59
|
+
service_period_days?:number;
|
|
60
|
+
charge_on_event?:'subscription_creation' | 'subscription_activation' | 'subscription_trial_start' | 'contract_termination' | 'plan_activation';
|
|
61
|
+
charge_once?:boolean;
|
|
62
|
+
charge_on_option?:'on_event' | 'immediately';
|
|
63
|
+
}
|
|
64
|
+
export interface ItemTier {
|
|
65
|
+
item_price_id?:string;
|
|
66
|
+
starting_unit?:number;
|
|
67
|
+
ending_unit?:number;
|
|
68
|
+
price?:number;
|
|
69
|
+
starting_unit_in_decimal?:string;
|
|
70
|
+
ending_unit_in_decimal?:string;
|
|
71
|
+
price_in_decimal?:string;
|
|
72
|
+
index?:number;
|
|
73
|
+
}
|
|
74
|
+
export interface QuotedContractTerm {
|
|
75
|
+
contract_start?:number;
|
|
76
|
+
contract_end?:number;
|
|
77
|
+
billing_cycle?:number;
|
|
78
|
+
action_at_term_end?:'cancel' | 'renew_once' | 'renew' | 'evergreen';
|
|
79
|
+
total_contract_value?:number;
|
|
80
|
+
cancellation_cutoff_period?:number;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
declare module 'chargebee' {
|
|
3
|
+
export interface ResourceMigration {
|
|
4
|
+
|
|
5
|
+
from_site:string;
|
|
6
|
+
entity_type:'customer';
|
|
7
|
+
entity_id:string;
|
|
8
|
+
status:'scheduled' | 'failed' | 'succeeded';
|
|
9
|
+
errors?:string;
|
|
10
|
+
created_at:number;
|
|
11
|
+
updated_at:number;
|
|
12
|
+
}
|
|
13
|
+
export namespace ResourceMigration {
|
|
14
|
+
export class ResourceMigrationResource {
|
|
15
|
+
retrieve_latest(input:RetrieveLatestInputParam):ChargebeeRequest<RetrieveLatestResponse>;
|
|
16
|
+
}
|
|
17
|
+
export interface RetrieveLatestResponse {
|
|
18
|
+
resource_migration:ResourceMigration;
|
|
19
|
+
}
|
|
20
|
+
export interface RetrieveLatestInputParam {
|
|
21
|
+
|
|
22
|
+
from_site:string;
|
|
23
|
+
entity_type:'customer';
|
|
24
|
+
entity_id:string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
declare module 'chargebee' {
|
|
3
|
+
export interface SiteMigrationDetail {
|
|
4
|
+
|
|
5
|
+
entity_id:string;
|
|
6
|
+
other_site_name:string;
|
|
7
|
+
entity_id_at_other_site:string;
|
|
8
|
+
migrated_at:number;
|
|
9
|
+
entity_type:'credit_note' | 'subscription' | 'invoice' | 'transaction' | 'customer' | 'order';
|
|
10
|
+
status:'moving_out' | 'moved_in' | 'moved_out';
|
|
11
|
+
}
|
|
12
|
+
export namespace SiteMigrationDetail {
|
|
13
|
+
export class SiteMigrationDetailResource {
|
|
14
|
+
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
15
|
+
}
|
|
16
|
+
export interface ListResponse {
|
|
17
|
+
list:{site_migration_detail:SiteMigrationDetail}[];
|
|
18
|
+
next_offset?:string;
|
|
19
|
+
}
|
|
20
|
+
export interface ListInputParam {
|
|
21
|
+
[key: string]: string | number | object | boolean;
|
|
22
|
+
limit?:number;
|
|
23
|
+
offset?:string;
|
|
24
|
+
entity_id_at_other_site?:{is?:string,is_not?:string,starts_with?:string};
|
|
25
|
+
other_site_name?:{is?:string,is_not?:string,starts_with?:string};
|
|
26
|
+
entity_id?:{is?:string,is_not?:string,starts_with?:string};
|
|
27
|
+
entity_type?:{in?:string,is?:'credit_note' | 'subscription' | 'invoice' | 'transaction' | 'customer' | 'order',is_not?:'credit_note' | 'subscription' | 'invoice' | 'transaction' | 'customer' | 'order',not_in?:string};
|
|
28
|
+
status?:{in?:string,is?:'moving_out' | 'moved_in' | 'moved_out',is_not?:'moving_out' | 'moved_in' | 'moved_out',not_in?:string};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
}
|
|
32
|
+
}
|