chargebee 2.43.0 → 2.45.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.
- package/CHANGELOG.md +84 -0
- package/README.md +3 -0
- package/lib/chargebee.js +1 -1
- package/lib/resources/api_endpoints.js +41 -0
- package/package.json +1 -1
- package/types/core.d.ts +2 -2
- package/types/index.d.ts +6 -0
- package/types/resources/AttachedItem.d.ts +4 -0
- package/types/resources/Card.d.ts +2 -0
- package/types/resources/Coupon.d.ts +204 -522
- package/types/resources/Customer.d.ts +2 -2
- package/types/resources/DifferentialPrice.d.ts +4 -0
- package/types/resources/Export.d.ts +16 -0
- package/types/resources/Invoice.d.ts +2 -2
- package/types/resources/Item.d.ts +17 -0
- package/types/resources/ItemFamily.d.ts +25 -100
- package/types/resources/ItemPrice.d.ts +17 -0
- package/types/resources/OmnichannelSubscription.d.ts +87 -0
- package/types/resources/OmnichannelSubscriptionItem.d.ts +28 -0
- package/types/resources/OmnichannelTransaction.d.ts +28 -0
- package/types/resources/PaymentScheduleScheme.d.ts +3 -1
- package/types/resources/PaymentSource.d.ts +1 -1
- package/types/resources/PriceVariant.d.ts +6 -0
- package/types/resources/RecordedPurchase.d.ts +58 -0
- package/types/resources/Subscription.d.ts +731 -3249
- package/types/resources/Transaction.d.ts +99 -581
|
@@ -214,7 +214,7 @@ declare module 'chargebee' {
|
|
|
214
214
|
}
|
|
215
215
|
export interface CreateInputParam {
|
|
216
216
|
[key : string] : any;
|
|
217
|
-
card?:{additional_information?:object,billing_addr1?:string,billing_addr2?:string,billing_city?:string,billing_country?:string,billing_state?:string,billing_state_code?:string,billing_zip?:string,cvv?:string,expiry_month?:number,expiry_year?:number,first_name?:string,gateway?:Gateway,gateway_account_id?:string,ip_address?:string,last_name?:string,number?:string,tmp_token?:string};
|
|
217
|
+
card?:{additional_information?:object,billing_addr1?:string,billing_addr2?:string,billing_city?:string,billing_country?:string,billing_state?:string,billing_state_code?:string,billing_zip?:string,cvv?:string,expiry_month?:number,expiry_year?:number,first_name?:string,gateway?:Gateway,gateway_account_id?:string,ip_address?:string,last_name?:string,number?:string,preferred_scheme?:'cartes_bancaires' | 'mastercard' | 'visa',tmp_token?:string};
|
|
218
218
|
|
|
219
219
|
bank_account?:{account_holder_type?:AccountHolderType,account_number?:string,account_type?:AccountType,bank_code?:string,bank_name?:string,billing_address?:object,company?:string,echeck_type?:EcheckType,email?:string,first_name?:string,gateway_account_id?:string,iban?:string,issuing_country?:string,last_name?:string,phone?:string,routing_number?:string,swedish_identity_number?:string};
|
|
220
220
|
|
|
@@ -660,7 +660,7 @@ The ID of the business entity created for the site. For Product Catalog 1.0, all
|
|
|
660
660
|
|
|
661
661
|
payment_method?:{additional_information?:object,gateway_account_id?:string,reference_id?:string,tmp_token?:string,type?:Type};
|
|
662
662
|
|
|
663
|
-
card?:{additional_information?:object,billing_addr1?:string,billing_addr2?:string,billing_city?:string,billing_country?:string,billing_state?:string,billing_state_code?:string,billing_zip?:string,cvv?:string,expiry_month?:number,expiry_year?:number,first_name?:string,gateway_account_id?:string,last_name?:string,number?:string};
|
|
663
|
+
card?:{additional_information?:object,billing_addr1?:string,billing_addr2?:string,billing_city?:string,billing_country?:string,billing_state?:string,billing_state_code?:string,billing_zip?:string,cvv?:string,expiry_month?:number,expiry_year?:number,first_name?:string,gateway_account_id?:string,last_name?:string,number?:string,preferred_scheme?:'cartes_bancaires' | 'mastercard' | 'visa'};
|
|
664
664
|
|
|
665
665
|
payment_intent?:{additional_information?:object,gateway_account_id?:string,gw_payment_method_id?:string,gw_token?:string,id?:string,payment_method_type?:'card' | 'ideal' | 'sofort' | 'bancontact' | 'google_pay' | 'dotpay' | 'giropay' | 'apple_pay' | 'upi' | 'netbanking_emandates' | 'paypal_express_checkout' | 'direct_debit' | 'boleto' | 'venmo' | 'amazon_payments' | 'pay_to' | 'faster_payments' | 'sepa_instant_transfer' | 'klarna_pay_now' | 'online_banking_poland',reference_id?:string};
|
|
666
666
|
|
|
@@ -92,6 +92,8 @@ declare module 'chargebee' {
|
|
|
92
92
|
*/
|
|
93
93
|
|
|
94
94
|
parent_periods?:DifferentialPrice.ParentPeriod[];
|
|
95
|
+
|
|
96
|
+
business_entity_id?:string;
|
|
95
97
|
}
|
|
96
98
|
export namespace DifferentialPrice {
|
|
97
99
|
export class DifferentialPriceResource {
|
|
@@ -169,6 +171,8 @@ declare module 'chargebee' {
|
|
|
169
171
|
*/
|
|
170
172
|
|
|
171
173
|
tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
|
|
174
|
+
|
|
175
|
+
business_entity_id?:string;
|
|
172
176
|
}
|
|
173
177
|
export interface RetrieveResponse {
|
|
174
178
|
differential_price:DifferentialPrice;
|
|
@@ -630,6 +630,10 @@ Total amount charged for the order.
|
|
|
630
630
|
*/
|
|
631
631
|
|
|
632
632
|
item_family?:{id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},name?:{is?:string,is_not?:string,starts_with?:string},updated_at?:{after?:string,before?:string,between?:string,on?:string}};
|
|
633
|
+
|
|
634
|
+
business_entity_id?:{is?:string,is_present?:'true' | 'false'};
|
|
635
|
+
|
|
636
|
+
include_site_level_resources?:{is?:'true' | 'false'};
|
|
633
637
|
}
|
|
634
638
|
export interface ItemsResponse {
|
|
635
639
|
export:Export;
|
|
@@ -642,6 +646,10 @@ Total amount charged for the order.
|
|
|
642
646
|
*/
|
|
643
647
|
|
|
644
648
|
item?:{channel?:{in?:string,is?:'app_store' | 'web' | 'play_store',is_not?:'app_store' | 'web' | 'play_store',not_in?:string},enabled_for_checkout?:{is?:'true' | 'false'},enabled_in_portal?:{is?:'true' | 'false'},id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},is_giftable?:{is?:'true' | 'false'},item_applicability?:{in?:string,is?:'all' | 'restricted',is_not?:'all' | 'restricted',not_in?:string},item_family_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},metered?:{is?:'true' | 'false'},name?:{is?:string,is_not?:string,starts_with?:string},status?:{in?:string,is?:'archived' | 'deleted' | 'active',is_not?:'archived' | 'deleted' | 'active',not_in?:string},type?:{in?:string,is?:'charge' | 'addon' | 'plan',is_not?:'charge' | 'addon' | 'plan',not_in?:string},updated_at?:{after?:string,before?:string,between?:string,on?:string},usage_calculation?:{in?:string,is?:'max_usage' | 'sum_of_usages' | 'last_usage',is_not?:'max_usage' | 'sum_of_usages' | 'last_usage',not_in?:string}};
|
|
649
|
+
|
|
650
|
+
business_entity_id?:{is?:string,is_present?:'true' | 'false'};
|
|
651
|
+
|
|
652
|
+
include_site_level_resources?:{is?:'true' | 'false'};
|
|
645
653
|
}
|
|
646
654
|
export interface ItemPricesResponse {
|
|
647
655
|
export:Export;
|
|
@@ -687,6 +695,10 @@ Filter item prices based on their `currency_code`.
|
|
|
687
695
|
*/
|
|
688
696
|
|
|
689
697
|
item_price?:{channel?:{in?:string,is?:'app_store' | 'web' | 'play_store',is_not?:'app_store' | 'web' | 'play_store',not_in?:string},id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},item_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},name?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},period?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string},period_unit?:{in?:string,is?:'week' | 'month' | 'year' | 'day',is_not?:'week' | 'month' | 'year' | 'day',not_in?:string},pricing_model?:{in?:string,is?:'volume' | 'per_unit' | 'tiered' | 'flat_fee' | 'stairstep',is_not?:'volume' | 'per_unit' | 'tiered' | 'flat_fee' | 'stairstep',not_in?:string},status?:{in?:string,is?:'archived' | 'deleted' | 'active',is_not?:'archived' | 'deleted' | 'active',not_in?:string},trial_period?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string},trial_period_unit?:{in?:string,is?:'month' | 'day',is_not?:'month' | 'day',not_in?:string},updated_at?:{after?:string,before?:string,between?:string,on?:string}};
|
|
698
|
+
|
|
699
|
+
business_entity_id?:{is?:string,is_present?:'true' | 'false'};
|
|
700
|
+
|
|
701
|
+
include_site_level_resources?:{is?:'true' | 'false'};
|
|
690
702
|
}
|
|
691
703
|
export interface AttachedItemsResponse {
|
|
692
704
|
export:Export;
|
|
@@ -740,6 +752,10 @@ Item Id of Addon / Charge item price for which differential pricing is applied t
|
|
|
740
752
|
export interface PriceVariantsInputParam {
|
|
741
753
|
|
|
742
754
|
price_variant?:{created_at?:{after?:string,before?:string,between?:string,on?:string},id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},name?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},status?:{in?:string,is?:'active' | 'archived',is_not?:'active' | 'archived',not_in?:string},updated_at?:{after?:string,before?:string,between?:string,on?:string}};
|
|
755
|
+
|
|
756
|
+
business_entity_id?:{is?:string,is_present?:'true' | 'false'};
|
|
757
|
+
|
|
758
|
+
include_site_level_resources?:{is?:'true' | 'false'};
|
|
743
759
|
}
|
|
744
760
|
export interface Download {
|
|
745
761
|
/**
|
|
@@ -906,7 +906,7 @@ This endpoint schedules e-invoices manually. This operation is not allowed when
|
|
|
906
906
|
|
|
907
907
|
*/
|
|
908
908
|
|
|
909
|
-
card?:{additional_information?:object,billing_addr1?:string,billing_addr2?:string,billing_city?:string,billing_country?:string,billing_state?:string,billing_state_code?:string,billing_zip?:string,cvv?:string,expiry_month?:number,expiry_year?:number,first_name?:string,gateway_account_id?:string,last_name?:string,number?:string};
|
|
909
|
+
card?:{additional_information?:object,billing_addr1?:string,billing_addr2?:string,billing_city?:string,billing_country?:string,billing_state?:string,billing_state_code?:string,billing_zip?:string,cvv?:string,expiry_month?:number,expiry_year?:number,first_name?:string,gateway?:Gateway,gateway_account_id?:string,ip_address?:string,last_name?:string,number?:string,preferred_scheme?:'cartes_bancaires' | 'mastercard' | 'visa',tmp_token?:string};
|
|
910
910
|
|
|
911
911
|
/**
|
|
912
912
|
* @description Parameters for bank_account
|
|
@@ -1088,7 +1088,7 @@ The invoice is [linked](/docs/api?prod_cat_ver=2#mbe-linked-be) to the same
|
|
|
1088
1088
|
|
|
1089
1089
|
*/
|
|
1090
1090
|
|
|
1091
|
-
card?:{additional_information?:object,billing_addr1?:string,billing_addr2?:string,billing_city?:string,billing_country?:string,billing_state?:string,billing_state_code?:string,billing_zip?:string,cvv?:string,expiry_month?:number,expiry_year?:number,first_name?:string,gateway_account_id?:string,last_name?:string,number?:string};
|
|
1091
|
+
card?:{additional_information?:object,billing_addr1?:string,billing_addr2?:string,billing_city?:string,billing_country?:string,billing_state?:string,billing_state_code?:string,billing_zip?:string,cvv?:string,expiry_month?:number,expiry_year?:number,first_name?:string,gateway?:Gateway,gateway_account_id?:string,ip_address?:string,last_name?:string,number?:string,preferred_scheme?:'cartes_bancaires' | 'mastercard' | 'visa',tmp_token?:string};
|
|
1092
1092
|
|
|
1093
1093
|
/**
|
|
1094
1094
|
* @description Parameters for bank_account
|
|
@@ -56,6 +56,8 @@ declare module 'chargebee' {
|
|
|
56
56
|
|
|
57
57
|
metadata?:object;
|
|
58
58
|
|
|
59
|
+
business_entity_id?:string;
|
|
60
|
+
|
|
59
61
|
}
|
|
60
62
|
export namespace Item {
|
|
61
63
|
export class ItemResource {
|
|
@@ -115,6 +117,8 @@ declare module 'chargebee' {
|
|
|
115
117
|
usage_calculation?:'sum_of_usages' | 'last_usage' | 'max_usage';
|
|
116
118
|
|
|
117
119
|
metadata?:object;
|
|
120
|
+
|
|
121
|
+
business_entity_id?:string;
|
|
118
122
|
}
|
|
119
123
|
export interface RetrieveResponse {
|
|
120
124
|
item:Item;
|
|
@@ -292,6 +296,19 @@ declare module 'chargebee' {
|
|
|
292
296
|
|
|
293
297
|
channel?:{in?:string,is?:'web' | 'app_store' | 'play_store',is_not?:'web' | 'app_store' | 'play_store',not_in?:string};
|
|
294
298
|
|
|
299
|
+
/**
|
|
300
|
+
* @description The unique ID of the [business entity](/docs/api?prod_cat_ver=2#mbe) of this subscription. This is always the same as the [business entity](/docs/api/subscriptions?prod_cat_ver=2#subscription_customer_id) of the customer.
|
|
301
|
+
The ID of the business entity created for the site. For Product Catalog 1.0, all the site data is tied to this business entity.
|
|
302
|
+
**Note**
|
|
303
|
+
|
|
304
|
+
[Multiple Business Entities](/docs/api?prod_cat_ver=2#mbe) is a feature available only on Product Catalog 2.0.
|
|
305
|
+
|
|
306
|
+
*/
|
|
307
|
+
|
|
308
|
+
business_entity_id?:{is?:string,is_present?:'true' | 'false'};
|
|
309
|
+
|
|
310
|
+
include_site_level_resources?:{is?:'true' | 'false'};
|
|
311
|
+
|
|
295
312
|
sort_by?:{asc?:'name' | 'id' | 'updated_at',desc?:'name' | 'id' | 'updated_at'};
|
|
296
313
|
}
|
|
297
314
|
export interface DeleteResponse {
|
|
@@ -1,91 +1,36 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
2
3
|
declare module 'chargebee' {
|
|
3
4
|
export interface ItemFamily {
|
|
4
5
|
[key : string] : any;
|
|
5
|
-
/**
|
|
6
|
-
* @description The identifier for the item family. It is unique and immutable.
|
|
7
6
|
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
7
|
id:string;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @description A unique display name for the item family. This is visible only in Chargebee and not to customers.
|
|
14
8
|
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
9
|
name:string;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* @description Description of the item family. This is visible only in Chargebee and not to customers.
|
|
21
10
|
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
11
|
description?:string;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @description Status of the item family. \* active - The item family is active and can be used to create new items. \* deleted - The item family has been deleted and cannot be used to create new items. The `id` and `name` can be reused to create a new item family.
|
|
28
12
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
status?:'deleted' | 'active';
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @description The version number of this resource. For every change made to the resource, `resource_version` is updated with a new timestamp in milliseconds.
|
|
13
|
+
status?:'active' | 'deleted';
|
|
35
14
|
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
15
|
resource_version?:number;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* @description When the item family was last updated.
|
|
42
16
|
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
17
|
updated_at?:number;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* @description The subscription channel this object originated from and is maintained in. \* app_store - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed. \* play_store - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed. \* web - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI.
|
|
49
18
|
|
|
50
|
-
*/
|
|
51
|
-
|
|
52
19
|
channel?:Channel;
|
|
20
|
+
|
|
21
|
+
business_entity_id?:string;
|
|
22
|
+
|
|
53
23
|
}
|
|
54
24
|
export namespace ItemFamily {
|
|
55
25
|
export class ItemFamilyResource {
|
|
56
|
-
/**
|
|
57
|
-
* @description This endpoint creates an item family for your product line or service.
|
|
58
|
-
|
|
59
|
-
*/
|
|
60
|
-
|
|
61
26
|
create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
|
|
62
27
|
|
|
63
|
-
/**
|
|
64
|
-
* @description This endpoint retrieves an item family based on the item family id.
|
|
65
|
-
|
|
66
|
-
*/
|
|
67
|
-
|
|
68
28
|
retrieve(item_family_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
69
29
|
|
|
70
|
-
/**
|
|
71
|
-
* @description Returns a list of item families satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
|
|
72
|
-
|
|
73
|
-
*/
|
|
74
|
-
|
|
75
30
|
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
76
31
|
|
|
77
|
-
/**
|
|
78
|
-
* @description This endpoint updates the name and/or description of the item family.
|
|
79
|
-
|
|
80
|
-
*/
|
|
81
|
-
|
|
82
32
|
update(item_family_id:string, input?:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
|
|
83
33
|
|
|
84
|
-
/**
|
|
85
|
-
* @description Deletes an item family, marking its `status` as `deleted`. This is not allowed if there are `active` items under the item family. Once deleted, the `id` and `name` of the item family can be reused to create a new item family.
|
|
86
|
-
|
|
87
|
-
*/
|
|
88
|
-
|
|
89
34
|
delete(item_family_id:string):ChargebeeRequest<DeleteResponse>;
|
|
90
35
|
}
|
|
91
36
|
export interface CreateResponse {
|
|
@@ -93,100 +38,80 @@ declare module 'chargebee' {
|
|
|
93
38
|
}
|
|
94
39
|
export interface CreateInputParam {
|
|
95
40
|
[key : string] : any;
|
|
96
|
-
/**
|
|
97
|
-
* @description The identifier for the item family. Must be unique and is immutable.
|
|
98
|
-
|
|
99
|
-
*/
|
|
100
|
-
|
|
101
41
|
id:string;
|
|
102
42
|
|
|
103
|
-
/**
|
|
104
|
-
* @description The display name for the item family. Must be unique. This is visible only in Chargebee and not to customers.
|
|
105
|
-
|
|
106
|
-
*/
|
|
107
|
-
|
|
108
43
|
name:string;
|
|
109
44
|
|
|
110
|
-
/**
|
|
111
|
-
* @description Description of the item family. This is visible only in Chargebee and not to customers.
|
|
112
|
-
|
|
113
|
-
*/
|
|
114
|
-
|
|
115
45
|
description?:string;
|
|
46
|
+
|
|
47
|
+
business_entity_id?:string;
|
|
116
48
|
}
|
|
117
49
|
export interface RetrieveResponse {
|
|
118
50
|
item_family:ItemFamily;
|
|
119
51
|
}
|
|
120
52
|
|
|
121
53
|
export interface ListResponse {
|
|
122
|
-
/**
|
|
123
|
-
* @description Returns a list of item families satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
|
|
124
|
-
|
|
125
|
-
*/
|
|
126
|
-
|
|
127
54
|
list:{item_family:ItemFamily}[];
|
|
128
55
|
|
|
129
|
-
/**
|
|
130
|
-
* @description Returns a list of item families satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
|
|
131
|
-
|
|
132
|
-
*/
|
|
133
|
-
|
|
134
56
|
next_offset?:string;
|
|
135
57
|
}
|
|
136
58
|
export interface ListInputParam {
|
|
137
59
|
[key : string]: any;
|
|
138
60
|
/**
|
|
139
|
-
* @description
|
|
61
|
+
* @description The number of resources to be returned.
|
|
140
62
|
|
|
141
63
|
*/
|
|
142
64
|
|
|
143
65
|
limit?:number;
|
|
144
66
|
|
|
145
67
|
/**
|
|
146
|
-
* @description
|
|
68
|
+
* @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set \`offset\` to the value of \`next_offset\` obtained in the previous iteration of the API call.
|
|
147
69
|
|
|
148
70
|
*/
|
|
149
71
|
|
|
150
72
|
offset?:string;
|
|
151
73
|
|
|
152
74
|
/**
|
|
153
|
-
* @description
|
|
75
|
+
* @description The identifier for the item family. It is unique and immutable.
|
|
154
76
|
|
|
155
77
|
*/
|
|
156
78
|
|
|
157
79
|
id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
158
80
|
|
|
159
81
|
/**
|
|
160
|
-
* @description
|
|
82
|
+
* @description A unique display name for the item family. This is visible only in Chargebee and not to customers.
|
|
161
83
|
|
|
162
84
|
*/
|
|
163
85
|
|
|
164
86
|
name?:{is?:string,is_not?:string,starts_with?:string};
|
|
165
87
|
|
|
166
88
|
/**
|
|
167
|
-
* @description
|
|
89
|
+
* @description When the item family was last updated.
|
|
168
90
|
|
|
169
91
|
*/
|
|
170
92
|
|
|
171
93
|
updated_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* @description The unique ID of the [business entity](/docs/api?prod_cat_ver=2#mbe) of this subscription. This is always the same as the [business entity](/docs/api/subscriptions?prod_cat_ver=2#subscription_customer_id) of the customer.
|
|
97
|
+
The ID of the business entity created for the site. For Product Catalog 1.0, all the site data is tied to this business entity.
|
|
98
|
+
**Note**
|
|
99
|
+
|
|
100
|
+
[Multiple Business Entities](/docs/api?prod_cat_ver=2#mbe) is a feature available only on Product Catalog 2.0.
|
|
101
|
+
|
|
102
|
+
*/
|
|
103
|
+
|
|
104
|
+
business_entity_id?:{is?:string,is_present?:'true' | 'false'};
|
|
105
|
+
|
|
106
|
+
include_site_level_resources?:{is?:'true' | 'false'};
|
|
172
107
|
}
|
|
173
108
|
export interface UpdateResponse {
|
|
174
109
|
item_family:ItemFamily;
|
|
175
110
|
}
|
|
176
111
|
export interface UpdateInputParam {
|
|
177
112
|
[key : string] : any;
|
|
178
|
-
/**
|
|
179
|
-
* @description The display name for the item family. Must be unique. This is visible only in Chargebee and not to customers.
|
|
180
|
-
|
|
181
|
-
*/
|
|
182
|
-
|
|
183
113
|
name?:string;
|
|
184
114
|
|
|
185
|
-
/**
|
|
186
|
-
* @description Description of the item family. This is visible only in Chargebee and not to customers.
|
|
187
|
-
|
|
188
|
-
*/
|
|
189
|
-
|
|
190
115
|
description?:string;
|
|
191
116
|
}
|
|
192
117
|
export interface DeleteResponse {
|
|
@@ -86,6 +86,8 @@ declare module 'chargebee' {
|
|
|
86
86
|
|
|
87
87
|
show_description_in_quotes?:boolean;
|
|
88
88
|
|
|
89
|
+
business_entity_id?:string;
|
|
90
|
+
|
|
89
91
|
}
|
|
90
92
|
export namespace ItemPrice {
|
|
91
93
|
export class ItemPriceResource {
|
|
@@ -148,6 +150,8 @@ declare module 'chargebee' {
|
|
|
148
150
|
|
|
149
151
|
usage_accumulation_reset_frequency?:UsageAccumulationResetFrequency;
|
|
150
152
|
|
|
153
|
+
business_entity_id?:string;
|
|
154
|
+
|
|
151
155
|
pricing_model?:PricingModel;
|
|
152
156
|
|
|
153
157
|
price?:number;
|
|
@@ -344,6 +348,19 @@ declare module 'chargebee' {
|
|
|
344
348
|
|
|
345
349
|
updated_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
346
350
|
|
|
351
|
+
/**
|
|
352
|
+
* @description The unique ID of the [business entity](/docs/api?prod_cat_ver=2#mbe) of this subscription. This is always the same as the [business entity](/docs/api/subscriptions?prod_cat_ver=2#subscription_customer_id) of the customer.
|
|
353
|
+
The ID of the business entity created for the site. For Product Catalog 1.0, all the site data is tied to this business entity.
|
|
354
|
+
**Note**
|
|
355
|
+
|
|
356
|
+
[Multiple Business Entities](/docs/api?prod_cat_ver=2#mbe) is a feature available only on Product Catalog 2.0.
|
|
357
|
+
|
|
358
|
+
*/
|
|
359
|
+
|
|
360
|
+
business_entity_id?:{is?:string,is_present?:'true' | 'false'};
|
|
361
|
+
|
|
362
|
+
include_site_level_resources?:{is?:'true' | 'false'};
|
|
363
|
+
|
|
347
364
|
/**
|
|
348
365
|
* @description Filter item prices based on their `period_unit`.
|
|
349
366
|
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
declare module 'chargebee' {
|
|
4
|
+
export interface OmnichannelSubscription {
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
id:string;
|
|
8
|
+
|
|
9
|
+
id_at_source:string;
|
|
10
|
+
|
|
11
|
+
app_id:string;
|
|
12
|
+
|
|
13
|
+
source:'apple_app_store';
|
|
14
|
+
|
|
15
|
+
customer_id?:string;
|
|
16
|
+
|
|
17
|
+
created_at:number;
|
|
18
|
+
|
|
19
|
+
resource_version?:number;
|
|
20
|
+
|
|
21
|
+
omnichannel_subscription_items:OmnichannelSubscriptionItem[];
|
|
22
|
+
|
|
23
|
+
}
|
|
24
|
+
export namespace OmnichannelSubscription {
|
|
25
|
+
export class OmnichannelSubscriptionResource {
|
|
26
|
+
retrieve(omnichannel_subscription_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
27
|
+
|
|
28
|
+
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
29
|
+
|
|
30
|
+
omnichannel_transactions_for_omnichannel_subscription(omnichannel_subscription_id:string, input?:Omnichannel_transactionsForOmnichannelSubscriptionInputParam):ChargebeeRequest<OmnichannelTransactionsForOmnichannelSubscriptionResponse>;
|
|
31
|
+
}
|
|
32
|
+
export interface RetrieveResponse {
|
|
33
|
+
omnichannel_subscription:OmnichannelSubscription;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface ListResponse {
|
|
37
|
+
list:{omnichannel_subscription:OmnichannelSubscription}[];
|
|
38
|
+
|
|
39
|
+
next_offset?:string;
|
|
40
|
+
}
|
|
41
|
+
export interface ListInputParam {
|
|
42
|
+
[key : string]: any;
|
|
43
|
+
/**
|
|
44
|
+
* @description The number of resources to be returned.
|
|
45
|
+
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
limit?:number;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set \`offset\` to the value of \`next_offset\` obtained in the previous iteration of the API call.
|
|
52
|
+
|
|
53
|
+
*/
|
|
54
|
+
|
|
55
|
+
offset?:string;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @description Chargebee Customer External Identifier
|
|
59
|
+
|
|
60
|
+
*/
|
|
61
|
+
|
|
62
|
+
customer_id?:{is?:string,is_not?:string,starts_with?:string};
|
|
63
|
+
}
|
|
64
|
+
export interface OmnichannelTransactionsForOmnichannelSubscriptionResponse {
|
|
65
|
+
list:{omnichannel_transaction:OmnichannelTransaction}[];
|
|
66
|
+
|
|
67
|
+
next_offset?:string;
|
|
68
|
+
}
|
|
69
|
+
export interface Omnichannel_transactionsForOmnichannelSubscriptionInputParam {
|
|
70
|
+
[key : string]: any;
|
|
71
|
+
/**
|
|
72
|
+
* @description The number of resources to be returned.
|
|
73
|
+
|
|
74
|
+
*/
|
|
75
|
+
|
|
76
|
+
limit?:number;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set \`offset\` to the value of \`next_offset\` obtained in the previous iteration of the API call.
|
|
80
|
+
|
|
81
|
+
*/
|
|
82
|
+
|
|
83
|
+
offset?:string;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
declare module 'chargebee' {
|
|
4
|
+
export interface OmnichannelSubscriptionItem {
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
id:string;
|
|
8
|
+
|
|
9
|
+
item_id_at_source:string;
|
|
10
|
+
|
|
11
|
+
status:'active' | 'expired' | 'cancelled';
|
|
12
|
+
|
|
13
|
+
current_term_start?:number;
|
|
14
|
+
|
|
15
|
+
current_term_end?:number;
|
|
16
|
+
|
|
17
|
+
expired_at?:number;
|
|
18
|
+
|
|
19
|
+
expiration_reason?:'billing_error' | 'product_not_available' | 'other';
|
|
20
|
+
|
|
21
|
+
cancelled_at?:number;
|
|
22
|
+
|
|
23
|
+
cancellation_reason?:'customer_cancelled' | 'customer_did_not_consent_to_price_increase';
|
|
24
|
+
|
|
25
|
+
resource_version?:number;
|
|
26
|
+
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
declare module 'chargebee' {
|
|
4
|
+
export interface OmnichannelTransaction {
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
id:string;
|
|
8
|
+
|
|
9
|
+
id_at_source:string;
|
|
10
|
+
|
|
11
|
+
app_id:string;
|
|
12
|
+
|
|
13
|
+
price_currency:string;
|
|
14
|
+
|
|
15
|
+
price_units:number;
|
|
16
|
+
|
|
17
|
+
price_nanos:number;
|
|
18
|
+
|
|
19
|
+
type:'purchase' | 'renewal';
|
|
20
|
+
|
|
21
|
+
transacted_at:number;
|
|
22
|
+
|
|
23
|
+
created_at:number;
|
|
24
|
+
|
|
25
|
+
resource_version?:number;
|
|
26
|
+
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -38,13 +38,15 @@ declare module 'chargebee' {
|
|
|
38
38
|
}
|
|
39
39
|
export interface CreateInputParam {
|
|
40
40
|
|
|
41
|
+
flexible_schedules?:{amount_percentage?:number,period?:number}[];
|
|
42
|
+
|
|
41
43
|
number_of_schedules:number;
|
|
42
44
|
|
|
43
45
|
period_unit:'day' | 'week' | 'month';
|
|
44
46
|
|
|
45
47
|
period?:number;
|
|
46
48
|
|
|
47
|
-
|
|
49
|
+
name:string;
|
|
48
50
|
}
|
|
49
51
|
export interface RetrieveResponse {
|
|
50
52
|
payment_schedule_scheme:PaymentScheduleScheme;
|
|
@@ -187,7 +187,7 @@ declare module 'chargebee' {
|
|
|
187
187
|
}
|
|
188
188
|
export interface CreateCardInputParam {
|
|
189
189
|
|
|
190
|
-
card:{additional_information?:object,billing_addr1?:string,billing_addr2?:string,billing_city?:string,billing_country?:string,billing_state?:string,billing_state_code?:string,billing_zip?:string,cvv?:string,expiry_month:number,expiry_year:number,first_name?:string,gateway_account_id?:string,last_name?:string,number:string};
|
|
190
|
+
card:{additional_information?:object,billing_addr1?:string,billing_addr2?:string,billing_city?:string,billing_country?:string,billing_state?:string,billing_state_code?:string,billing_zip?:string,cvv?:string,expiry_month:number,expiry_year:number,first_name?:string,gateway_account_id?:string,last_name?:string,number:string,preferred_scheme?:'cartes_bancaires' | 'mastercard' | 'visa'};
|
|
191
191
|
|
|
192
192
|
customer_id:string;
|
|
193
193
|
|
|
@@ -74,6 +74,8 @@ Attributes can be used to store additional information about the price variant.
|
|
|
74
74
|
*/
|
|
75
75
|
|
|
76
76
|
attributes?:PriceVariant.Attribute[];
|
|
77
|
+
|
|
78
|
+
business_entity_id?:string;
|
|
77
79
|
}
|
|
78
80
|
export namespace PriceVariant {
|
|
79
81
|
export class PriceVariantResource {
|
|
@@ -155,6 +157,8 @@ Attributes can be used to store additional information about the price variant.
|
|
|
155
157
|
attributes:{name:string,value:string}[];
|
|
156
158
|
|
|
157
159
|
variant_group?:string;
|
|
160
|
+
|
|
161
|
+
business_entity_id?:string;
|
|
158
162
|
}
|
|
159
163
|
export interface RetrieveResponse {
|
|
160
164
|
price_variant:PriceVariant;
|
|
@@ -280,6 +284,8 @@ Attributes can be used to store additional information about the price variant.
|
|
|
280
284
|
*/
|
|
281
285
|
|
|
282
286
|
sort_by?:{asc?:'name' | 'id' | 'status' | 'created_at' | 'updated_at',desc?:'name' | 'id' | 'status' | 'created_at' | 'updated_at'};
|
|
287
|
+
|
|
288
|
+
business_entity_id?:{is?:string,is_present?:'true' | 'false'};
|
|
283
289
|
}
|
|
284
290
|
export interface Attribute {
|
|
285
291
|
/**
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
declare module 'chargebee' {
|
|
4
|
+
export interface RecordedPurchase {
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
id:string;
|
|
8
|
+
|
|
9
|
+
customer_id:string;
|
|
10
|
+
|
|
11
|
+
app_id:string;
|
|
12
|
+
|
|
13
|
+
source:'apple_app_store';
|
|
14
|
+
|
|
15
|
+
status:'in_process' | 'completed' | 'failed';
|
|
16
|
+
|
|
17
|
+
omnichannel_transaction_id?:string;
|
|
18
|
+
|
|
19
|
+
created_at:number;
|
|
20
|
+
|
|
21
|
+
resource_version?:number;
|
|
22
|
+
|
|
23
|
+
linked_omnichannel_subscriptions?:RecordedPurchase.LinkedOmnichannelSubscription[];
|
|
24
|
+
|
|
25
|
+
error_detail?:RecordedPurchase.ErrorDetail;
|
|
26
|
+
|
|
27
|
+
}
|
|
28
|
+
export namespace RecordedPurchase {
|
|
29
|
+
export class RecordedPurchaseResource {
|
|
30
|
+
create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
|
|
31
|
+
|
|
32
|
+
retrieve(recorded_purchase_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
33
|
+
}
|
|
34
|
+
export interface CreateResponse {
|
|
35
|
+
recorded_purchase:RecordedPurchase;
|
|
36
|
+
|
|
37
|
+
customer:Customer;
|
|
38
|
+
}
|
|
39
|
+
export interface CreateInputParam {
|
|
40
|
+
|
|
41
|
+
customer:{id:string};
|
|
42
|
+
|
|
43
|
+
apple_app_store?:{transaction_id?:string};
|
|
44
|
+
|
|
45
|
+
app_id:string;
|
|
46
|
+
}
|
|
47
|
+
export interface RetrieveResponse {
|
|
48
|
+
recorded_purchase:RecordedPurchase;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface LinkedOmnichannelSubscription {
|
|
52
|
+
omnichannel_subscription_id?:string;
|
|
53
|
+
}
|
|
54
|
+
export interface ErrorDetail {
|
|
55
|
+
error_message?:string;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|