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,119 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
declare module 'chargebee' {
|
|
3
|
+
export interface Item {
|
|
4
|
+
[key : string] : any;
|
|
5
|
+
id:string;
|
|
6
|
+
name:string;
|
|
7
|
+
external_name?:string;
|
|
8
|
+
description?:string;
|
|
9
|
+
status?:'archived' | 'deleted' | 'active';
|
|
10
|
+
resource_version?:number;
|
|
11
|
+
updated_at?:number;
|
|
12
|
+
item_family_id?:string;
|
|
13
|
+
type:'charge' | 'addon' | 'plan';
|
|
14
|
+
is_shippable?:boolean;
|
|
15
|
+
is_giftable:boolean;
|
|
16
|
+
redirect_url?:string;
|
|
17
|
+
enabled_for_checkout:boolean;
|
|
18
|
+
enabled_in_portal:boolean;
|
|
19
|
+
included_in_mrr?:boolean;
|
|
20
|
+
item_applicability:'all' | 'restricted';
|
|
21
|
+
gift_claim_redirect_url?:string;
|
|
22
|
+
unit?:string;
|
|
23
|
+
metered:boolean;
|
|
24
|
+
usage_calculation?:'max_usage' | 'sum_of_usages' | 'last_usage';
|
|
25
|
+
archived_at?:number;
|
|
26
|
+
channel?:Channel;
|
|
27
|
+
metadata?:object;
|
|
28
|
+
applicable_items?:Item.ApplicableItem[];
|
|
29
|
+
}
|
|
30
|
+
export namespace Item {
|
|
31
|
+
export class ItemResource {
|
|
32
|
+
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
33
|
+
create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
|
|
34
|
+
delete(item_id:string):ChargebeeRequest<DeleteResponse>;
|
|
35
|
+
retrieve(item_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
36
|
+
update(item_id:string, input?:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
|
|
37
|
+
}
|
|
38
|
+
export interface ListResponse {
|
|
39
|
+
list:{item:Item}[];
|
|
40
|
+
next_offset?:string;
|
|
41
|
+
}
|
|
42
|
+
export interface ListInputParam {
|
|
43
|
+
[key: string]: string | number | object | boolean;
|
|
44
|
+
limit?:number;
|
|
45
|
+
offset?:string;
|
|
46
|
+
id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
47
|
+
item_family_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
48
|
+
type?:{in?:string,is?:'charge' | 'addon' | 'plan',is_not?:'charge' | 'addon' | 'plan',not_in?:string};
|
|
49
|
+
name?:{is?:string,is_not?:string,starts_with?:string};
|
|
50
|
+
item_applicability?:{in?:string,is?:'all' | 'restricted',is_not?:'all' | 'restricted',not_in?:string};
|
|
51
|
+
status?:{in?:string,is?:'archived' | 'deleted' | 'active',is_not?:'archived' | 'deleted' | 'active',not_in?:string};
|
|
52
|
+
is_giftable?:{is?:'true' | 'false'};
|
|
53
|
+
updated_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
54
|
+
enabled_for_checkout?:{is?:'true' | 'false'};
|
|
55
|
+
enabled_in_portal?:{is?:'true' | 'false'};
|
|
56
|
+
metered?:{is?:'true' | 'false'};
|
|
57
|
+
usage_calculation?:{in?:string,is?:'max_usage' | 'sum_of_usages' | 'last_usage',is_not?:'max_usage' | 'sum_of_usages' | 'last_usage',not_in?:string};
|
|
58
|
+
channel?:{in?:string,is?:'app_store' | 'web' | 'play_store',is_not?:'app_store' | 'web' | 'play_store',not_in?:string};
|
|
59
|
+
sort_by?:{asc?:'updated_at' | 'name' | 'id',desc?:'updated_at' | 'name' | 'id'};
|
|
60
|
+
}
|
|
61
|
+
export interface CreateResponse {
|
|
62
|
+
item:Item;
|
|
63
|
+
}
|
|
64
|
+
export interface CreateInputParam {
|
|
65
|
+
[key : string] : any;
|
|
66
|
+
id:string;
|
|
67
|
+
name:string;
|
|
68
|
+
type:'charge' | 'addon' | 'plan';
|
|
69
|
+
description?:string;
|
|
70
|
+
item_family_id:string;
|
|
71
|
+
is_giftable?:boolean;
|
|
72
|
+
is_shippable?:boolean;
|
|
73
|
+
external_name?:string;
|
|
74
|
+
enabled_in_portal?:boolean;
|
|
75
|
+
redirect_url?:string;
|
|
76
|
+
enabled_for_checkout?:boolean;
|
|
77
|
+
item_applicability?:'all' | 'restricted';
|
|
78
|
+
applicable_items?:string[];
|
|
79
|
+
unit?:string;
|
|
80
|
+
gift_claim_redirect_url?:string;
|
|
81
|
+
included_in_mrr?:boolean;
|
|
82
|
+
metered?:boolean;
|
|
83
|
+
usage_calculation?:'max_usage' | 'sum_of_usages' | 'last_usage';
|
|
84
|
+
metadata?:object;
|
|
85
|
+
}
|
|
86
|
+
export interface DeleteResponse {
|
|
87
|
+
item:Item;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface RetrieveResponse {
|
|
91
|
+
item:Item;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface UpdateResponse {
|
|
95
|
+
item:Item;
|
|
96
|
+
}
|
|
97
|
+
export interface UpdateInputParam {
|
|
98
|
+
[key : string] : any;
|
|
99
|
+
name?:string;
|
|
100
|
+
description?:string;
|
|
101
|
+
is_shippable?:boolean;
|
|
102
|
+
external_name?:string;
|
|
103
|
+
item_family_id?:string;
|
|
104
|
+
enabled_in_portal?:boolean;
|
|
105
|
+
redirect_url?:string;
|
|
106
|
+
enabled_for_checkout?:boolean;
|
|
107
|
+
item_applicability?:'all' | 'restricted';
|
|
108
|
+
applicable_items?:string[];
|
|
109
|
+
unit?:string;
|
|
110
|
+
gift_claim_redirect_url?:string;
|
|
111
|
+
metadata?:object;
|
|
112
|
+
included_in_mrr?:boolean;
|
|
113
|
+
status?:'archived' | 'active';
|
|
114
|
+
}
|
|
115
|
+
export interface ApplicableItem {
|
|
116
|
+
id?:string;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
declare module 'chargebee' {
|
|
3
|
+
export interface ItemEntitlement {
|
|
4
|
+
|
|
5
|
+
id:string;
|
|
6
|
+
item_id?:string;
|
|
7
|
+
item_type?:'item' | 'charge' | 'addon' | 'subscription' | 'plan';
|
|
8
|
+
feature_id?:string;
|
|
9
|
+
feature_name?:string;
|
|
10
|
+
value?:string;
|
|
11
|
+
name?:string;
|
|
12
|
+
}
|
|
13
|
+
export namespace ItemEntitlement {
|
|
14
|
+
export class ItemEntitlementResource {
|
|
15
|
+
item_entitlements_for_feature(feature_id:string, input?:ItemEntitlementsForFeatureInputParam):ChargebeeRequest<ItemEntitlementsForFeatureResponse>;
|
|
16
|
+
add_item_entitlements(feature_id:string, input:AddItemEntitlementsInputParam):ChargebeeRequest<AddItemEntitlementsResponse>;
|
|
17
|
+
item_entitlements_for_item(item_id:string, input?:ItemEntitlementsForItemInputParam):ChargebeeRequest<ItemEntitlementsForItemResponse>;
|
|
18
|
+
upsert_or_remove_item_entitlements_for_item(item_id:string, input:UpsertOrRemoveItemEntitlementsForItemInputParam):ChargebeeRequest<UpsertOrRemoveItemEntitlementsForItemResponse>;
|
|
19
|
+
}
|
|
20
|
+
export interface ItemEntitlementsForFeatureResponse {
|
|
21
|
+
list:{item_entitlement:ItemEntitlement}[];
|
|
22
|
+
next_offset?:string;
|
|
23
|
+
}
|
|
24
|
+
export interface ItemEntitlementsForFeatureInputParam {
|
|
25
|
+
[key: string]: string | number | object | boolean;
|
|
26
|
+
limit?:number;
|
|
27
|
+
offset?:string;
|
|
28
|
+
}
|
|
29
|
+
export interface AddItemEntitlementsResponse {
|
|
30
|
+
item_entitlement:ItemEntitlement;
|
|
31
|
+
}
|
|
32
|
+
export interface AddItemEntitlementsInputParam {
|
|
33
|
+
|
|
34
|
+
action:Action;
|
|
35
|
+
item_entitlements?:{item_id:string,item_type?:'item' | 'charge' | 'addon' | 'subscription' | 'plan',value?:string}[];
|
|
36
|
+
}
|
|
37
|
+
export interface ItemEntitlementsForItemResponse {
|
|
38
|
+
list:{item_entitlement:ItemEntitlement}[];
|
|
39
|
+
next_offset?:string;
|
|
40
|
+
}
|
|
41
|
+
export interface ItemEntitlementsForItemInputParam {
|
|
42
|
+
[key: string]: string | number | object | boolean;
|
|
43
|
+
limit?:number;
|
|
44
|
+
offset?:string;
|
|
45
|
+
}
|
|
46
|
+
export interface UpsertOrRemoveItemEntitlementsForItemResponse {
|
|
47
|
+
item_entitlement:ItemEntitlement;
|
|
48
|
+
}
|
|
49
|
+
export interface UpsertOrRemoveItemEntitlementsForItemInputParam {
|
|
50
|
+
|
|
51
|
+
action:Action;
|
|
52
|
+
item_entitlements?:{feature_id:string,value?:string}[];
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
declare module 'chargebee' {
|
|
3
|
+
export interface ItemFamily {
|
|
4
|
+
[key : string] : any;
|
|
5
|
+
id:string;
|
|
6
|
+
name:string;
|
|
7
|
+
description?:string;
|
|
8
|
+
status?:'deleted' | 'active';
|
|
9
|
+
resource_version?:number;
|
|
10
|
+
updated_at?:number;
|
|
11
|
+
channel?:Channel;
|
|
12
|
+
}
|
|
13
|
+
export namespace ItemFamily {
|
|
14
|
+
export class ItemFamilyResource {
|
|
15
|
+
delete(item_family_id:string):ChargebeeRequest<DeleteResponse>;
|
|
16
|
+
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
17
|
+
create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
|
|
18
|
+
retrieve(item_family_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
19
|
+
update(item_family_id:string, input?:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
|
|
20
|
+
}
|
|
21
|
+
export interface DeleteResponse {
|
|
22
|
+
item_family:ItemFamily;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface ListResponse {
|
|
26
|
+
list:{item_family:ItemFamily}[];
|
|
27
|
+
next_offset?:string;
|
|
28
|
+
}
|
|
29
|
+
export interface ListInputParam {
|
|
30
|
+
[key: string]: string | number | object | boolean;
|
|
31
|
+
limit?:number;
|
|
32
|
+
offset?:string;
|
|
33
|
+
id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
34
|
+
name?:{is?:string,is_not?:string,starts_with?:string};
|
|
35
|
+
updated_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
36
|
+
}
|
|
37
|
+
export interface CreateResponse {
|
|
38
|
+
item_family:ItemFamily;
|
|
39
|
+
}
|
|
40
|
+
export interface CreateInputParam {
|
|
41
|
+
[key : string] : any;
|
|
42
|
+
id:string;
|
|
43
|
+
name:string;
|
|
44
|
+
description?:string;
|
|
45
|
+
}
|
|
46
|
+
export interface RetrieveResponse {
|
|
47
|
+
item_family:ItemFamily;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface UpdateResponse {
|
|
51
|
+
item_family:ItemFamily;
|
|
52
|
+
}
|
|
53
|
+
export interface UpdateInputParam {
|
|
54
|
+
[key : string] : any;
|
|
55
|
+
name?:string;
|
|
56
|
+
description?:string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
declare module 'chargebee' {
|
|
3
|
+
export interface ItemPrice {
|
|
4
|
+
[key : string] : any;
|
|
5
|
+
id:string;
|
|
6
|
+
name:string;
|
|
7
|
+
item_family_id?:string;
|
|
8
|
+
product_id?:string;
|
|
9
|
+
item_id?:string;
|
|
10
|
+
description?:string;
|
|
11
|
+
status?:'archived' | 'deleted' | 'active';
|
|
12
|
+
external_name?:string;
|
|
13
|
+
pricing_model:PricingModel;
|
|
14
|
+
price?:number;
|
|
15
|
+
price_in_decimal?:string;
|
|
16
|
+
period?:number;
|
|
17
|
+
currency_code:string;
|
|
18
|
+
period_unit?:'week' | 'month' | 'year' | 'day';
|
|
19
|
+
trial_period?:number;
|
|
20
|
+
trial_period_unit?:'month' | 'day';
|
|
21
|
+
trial_end_action?:'activate_subscription' | 'cancel_subscription' | 'site_default';
|
|
22
|
+
shipping_period?:number;
|
|
23
|
+
shipping_period_unit?:'week' | 'month' | 'year' | 'day';
|
|
24
|
+
billing_cycles?:number;
|
|
25
|
+
free_quantity:number;
|
|
26
|
+
free_quantity_in_decimal?:string;
|
|
27
|
+
channel?:Channel;
|
|
28
|
+
resource_version?:number;
|
|
29
|
+
updated_at?:number;
|
|
30
|
+
created_at:number;
|
|
31
|
+
archived_at?:number;
|
|
32
|
+
invoice_notes?:string;
|
|
33
|
+
is_taxable?:boolean;
|
|
34
|
+
metadata?:object;
|
|
35
|
+
item_type?:ItemType;
|
|
36
|
+
show_description_in_invoices?:boolean;
|
|
37
|
+
show_description_in_quotes?:boolean;
|
|
38
|
+
tiers?:ItemPrice.Tier[];
|
|
39
|
+
tax_detail?:ItemPrice.TaxDetail;
|
|
40
|
+
accounting_detail?:ItemPrice.AccountingDetail;
|
|
41
|
+
}
|
|
42
|
+
export namespace ItemPrice {
|
|
43
|
+
export class ItemPriceResource {
|
|
44
|
+
find_applicable_items(item_price_id:string, input?:FindApplicableItemsInputParam):ChargebeeRequest<FindApplicableItemsResponse>;
|
|
45
|
+
retrieve(item_price_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
46
|
+
update(item_price_id:string, input?:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
|
|
47
|
+
delete(item_price_id:string):ChargebeeRequest<DeleteResponse>;
|
|
48
|
+
find_applicable_item_prices(item_price_id:string, input?:FindApplicableItemPricesInputParam):ChargebeeRequest<FindApplicableItemPricesResponse>;
|
|
49
|
+
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
50
|
+
create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
|
|
51
|
+
}
|
|
52
|
+
export interface FindApplicableItemsResponse {
|
|
53
|
+
list:{item:Item}[];
|
|
54
|
+
next_offset?:string;
|
|
55
|
+
}
|
|
56
|
+
export interface FindApplicableItemsInputParam {
|
|
57
|
+
[key: string]: string | number | object | boolean;
|
|
58
|
+
limit?:number;
|
|
59
|
+
offset?:string;
|
|
60
|
+
sort_by?:{asc?:'updated_at' | 'name' | 'id',desc?:'updated_at' | 'name' | 'id'};
|
|
61
|
+
}
|
|
62
|
+
export interface RetrieveResponse {
|
|
63
|
+
item_price:ItemPrice;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface UpdateResponse {
|
|
67
|
+
item_price:ItemPrice;
|
|
68
|
+
}
|
|
69
|
+
export interface UpdateInputParam {
|
|
70
|
+
[key : string] : any;
|
|
71
|
+
name?:string;
|
|
72
|
+
description?:string;
|
|
73
|
+
status?:'archived' | 'active';
|
|
74
|
+
external_name?:string;
|
|
75
|
+
currency_code?:string;
|
|
76
|
+
invoice_notes?:string;
|
|
77
|
+
is_taxable?:boolean;
|
|
78
|
+
free_quantity?:number;
|
|
79
|
+
free_quantity_in_decimal?:string;
|
|
80
|
+
metadata?:object;
|
|
81
|
+
pricing_model?:PricingModel;
|
|
82
|
+
price?:number;
|
|
83
|
+
price_in_decimal?:string;
|
|
84
|
+
period_unit?:'week' | 'month' | 'year' | 'day';
|
|
85
|
+
period?:number;
|
|
86
|
+
trial_period_unit?:'month' | 'day';
|
|
87
|
+
trial_period?:number;
|
|
88
|
+
shipping_period?:number;
|
|
89
|
+
shipping_period_unit?:'week' | 'month' | 'year' | 'day';
|
|
90
|
+
billing_cycles?:number;
|
|
91
|
+
trial_end_action?:'activate_subscription' | 'cancel_subscription' | 'site_default';
|
|
92
|
+
show_description_in_invoices?:boolean;
|
|
93
|
+
show_description_in_quotes?:boolean;
|
|
94
|
+
tax_detail?:{avalara_sale_type?:AvalaraSaleType,avalara_service_type?:number,avalara_tax_code?:string,avalara_transaction_type?:number,hsn_code?:string,tax_profile_id?:string,taxjar_product_code?:string};
|
|
95
|
+
accounting_detail?:{accounting_category1?:string,accounting_category2?:string,accounting_category3?:string,accounting_category4?:string,accounting_code?:string,sku?:string};
|
|
96
|
+
tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
|
|
97
|
+
}
|
|
98
|
+
export interface DeleteResponse {
|
|
99
|
+
item_price:ItemPrice;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface FindApplicableItemPricesResponse {
|
|
103
|
+
list:{item_price:ItemPrice}[];
|
|
104
|
+
next_offset?:string;
|
|
105
|
+
}
|
|
106
|
+
export interface FindApplicableItemPricesInputParam {
|
|
107
|
+
[key: string]: string | number | object | boolean;
|
|
108
|
+
limit?:number;
|
|
109
|
+
offset?:string;
|
|
110
|
+
item_id?:string;
|
|
111
|
+
sort_by?:{asc?:'updated_at' | 'name' | 'id',desc?:'updated_at' | 'name' | 'id'};
|
|
112
|
+
}
|
|
113
|
+
export interface ListResponse {
|
|
114
|
+
list:{item_price:ItemPrice}[];
|
|
115
|
+
next_offset?:string;
|
|
116
|
+
}
|
|
117
|
+
export interface ListInputParam {
|
|
118
|
+
[key: string]: string | number | object | boolean;
|
|
119
|
+
limit?:number;
|
|
120
|
+
offset?:string;
|
|
121
|
+
id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
122
|
+
name?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
123
|
+
pricing_model?:{in?:string,is?:'volume' | 'per_unit' | 'tiered' | 'flat_fee' | 'stairstep',is_not?:'volume' | 'per_unit' | 'tiered' | 'flat_fee' | 'stairstep',not_in?:string};
|
|
124
|
+
item_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
125
|
+
item_family_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
126
|
+
item_type?:{in?:string,is?:'charge' | 'addon' | 'plan',is_not?:'charge' | 'addon' | 'plan',not_in?:string};
|
|
127
|
+
currency_code?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
128
|
+
trial_period?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string};
|
|
129
|
+
trial_period_unit?:{in?:string,is?:'month' | 'day',is_not?:'month' | 'day',not_in?:string};
|
|
130
|
+
status?:{in?:string,is?:'archived' | 'deleted' | 'active',is_not?:'archived' | 'deleted' | 'active',not_in?:string};
|
|
131
|
+
updated_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
132
|
+
period_unit?:{in?:string,is?:'week' | 'month' | 'year' | 'day',is_not?:'week' | 'month' | 'year' | 'day',not_in?:string};
|
|
133
|
+
period?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string};
|
|
134
|
+
channel?:{in?:string,is?:'app_store' | 'web' | 'play_store',is_not?:'app_store' | 'web' | 'play_store',not_in?:string};
|
|
135
|
+
sort_by?:{asc?:'updated_at' | 'name' | 'id',desc?:'updated_at' | 'name' | 'id'};
|
|
136
|
+
}
|
|
137
|
+
export interface CreateResponse {
|
|
138
|
+
item_price:ItemPrice;
|
|
139
|
+
}
|
|
140
|
+
export interface CreateInputParam {
|
|
141
|
+
[key : string] : any;
|
|
142
|
+
id:string;
|
|
143
|
+
name:string;
|
|
144
|
+
description?:string;
|
|
145
|
+
item_id:string;
|
|
146
|
+
invoice_notes?:string;
|
|
147
|
+
external_name?:string;
|
|
148
|
+
currency_code?:string;
|
|
149
|
+
is_taxable?:boolean;
|
|
150
|
+
free_quantity?:number;
|
|
151
|
+
free_quantity_in_decimal?:string;
|
|
152
|
+
metadata?:object;
|
|
153
|
+
show_description_in_invoices?:boolean;
|
|
154
|
+
show_description_in_quotes?:boolean;
|
|
155
|
+
pricing_model?:PricingModel;
|
|
156
|
+
price?:number;
|
|
157
|
+
price_in_decimal?:string;
|
|
158
|
+
period_unit?:'week' | 'month' | 'year' | 'day';
|
|
159
|
+
period?:number;
|
|
160
|
+
trial_period_unit?:'month' | 'day';
|
|
161
|
+
trial_period?:number;
|
|
162
|
+
shipping_period?:number;
|
|
163
|
+
shipping_period_unit?:'week' | 'month' | 'year' | 'day';
|
|
164
|
+
billing_cycles?:number;
|
|
165
|
+
trial_end_action?:'activate_subscription' | 'cancel_subscription' | 'site_default';
|
|
166
|
+
tax_detail?:{avalara_sale_type?:AvalaraSaleType,avalara_service_type?:number,avalara_tax_code?:string,avalara_transaction_type?:number,hsn_code?:string,tax_profile_id?:string,taxjar_product_code?:string};
|
|
167
|
+
accounting_detail?:{accounting_category1?:string,accounting_category2?:string,accounting_category3?:string,accounting_category4?:string,accounting_code?:string,sku?:string};
|
|
168
|
+
tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
|
|
169
|
+
}
|
|
170
|
+
export interface Tier {
|
|
171
|
+
starting_unit?:number;
|
|
172
|
+
ending_unit?:number;
|
|
173
|
+
price?:number;
|
|
174
|
+
starting_unit_in_decimal?:string;
|
|
175
|
+
ending_unit_in_decimal?:string;
|
|
176
|
+
price_in_decimal?:string;
|
|
177
|
+
}
|
|
178
|
+
export interface TaxDetail {
|
|
179
|
+
tax_profile_id?:string;
|
|
180
|
+
avalara_sale_type?:AvalaraSaleType;
|
|
181
|
+
avalara_transaction_type?:number;
|
|
182
|
+
avalara_service_type?:number;
|
|
183
|
+
avalara_tax_code?:string;
|
|
184
|
+
hsn_code?:string;
|
|
185
|
+
taxjar_product_code?:string;
|
|
186
|
+
}
|
|
187
|
+
export interface AccountingDetail {
|
|
188
|
+
sku?:string;
|
|
189
|
+
accounting_code?:string;
|
|
190
|
+
accounting_category1?:string;
|
|
191
|
+
accounting_category2?:string;
|
|
192
|
+
accounting_category3?:string;
|
|
193
|
+
accounting_category4?:string;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
declare module 'chargebee' {
|
|
3
|
+
export interface NonSubscription {
|
|
4
|
+
|
|
5
|
+
invoice_id:string;
|
|
6
|
+
customer_id?:string;
|
|
7
|
+
charge_id:string;
|
|
8
|
+
}
|
|
9
|
+
export namespace NonSubscription {
|
|
10
|
+
export class NonSubscriptionResource {
|
|
11
|
+
process_receipt(non_subscription_app_id:string, input:ProcessReceiptInputParam):ChargebeeRequest<ProcessReceiptResponse>;
|
|
12
|
+
}
|
|
13
|
+
export interface ProcessReceiptResponse {
|
|
14
|
+
non_subscription:NonSubscription;
|
|
15
|
+
}
|
|
16
|
+
export interface ProcessReceiptInputParam {
|
|
17
|
+
|
|
18
|
+
receipt:string;
|
|
19
|
+
product?:{currency_code:string,id:string,name?:string,price:number,price_in_decimal?:string,type:'non_consumable' | 'consumable' | 'non_renewing_subscription'};
|
|
20
|
+
customer?:{email?:string,first_name?:string,id?:string,last_name?:string};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
}
|
|
24
|
+
}
|