chargebee 3.0.2 → 3.1.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 +59 -0
- package/cjs/environment.js +1 -1
- package/cjs/resources/api_endpoints.js +16 -0
- package/esm/environment.js +1 -1
- package/esm/resources/api_endpoints.js +16 -0
- package/package.json +1 -1
- package/types/core.d.ts +15 -1
- package/types/index.d.ts +5 -0
- package/types/resources/AttachedItem.d.ts +2 -0
- package/types/resources/Card.d.ts +1 -0
- package/types/resources/Comment.d.ts +3 -0
- package/types/resources/Coupon.d.ts +19 -4
- package/types/resources/CreditNote.d.ts +2 -1
- package/types/resources/Customer.d.ts +2 -0
- package/types/resources/DifferentialPrice.d.ts +2 -0
- package/types/resources/Export.d.ts +8 -0
- package/types/resources/Invoice.d.ts +7 -3
- package/types/resources/Item.d.ts +4 -0
- package/types/resources/ItemFamily.d.ts +4 -0
- package/types/resources/ItemPrice.d.ts +4 -0
- package/types/resources/OmnichannelSubscription.d.ts +75 -0
- package/types/resources/OmnichannelTransaction.d.ts +16 -0
- package/types/resources/PaymentScheduleScheme.d.ts +6 -1
- package/types/resources/PaymentSource.d.ts +1 -0
- package/types/resources/PriceVariant.d.ts +4 -0
- package/types/resources/RecordedPurchase.d.ts +60 -0
- package/types/resources/Subscription.d.ts +4 -0
- package/types/resources/Transaction.d.ts +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,62 @@
|
|
|
1
|
+
### v3.1.0 (2024-11-14)
|
|
2
|
+
* * *
|
|
3
|
+
|
|
4
|
+
#### New Resource:
|
|
5
|
+
* OmnichannelTransaction has been added.
|
|
6
|
+
* OmnichannelSubscription has been added.
|
|
7
|
+
* RecordedPurchase has been added.
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
#### New Attributes:
|
|
11
|
+
* business_entity_id has been added to AttachedItem.
|
|
12
|
+
* business_entity_id has been added to DifferentialPrice.
|
|
13
|
+
* business_entity_id has been added to Items.
|
|
14
|
+
* business_entity_id has been added to ItemFamily.
|
|
15
|
+
* business_entity_id has been added to ItemPrice.
|
|
16
|
+
* business_entity_id has been added to PriceVariant.
|
|
17
|
+
* valid_from has been added to coupon.
|
|
18
|
+
|
|
19
|
+
#### New Input Parameters:
|
|
20
|
+
* business_entity_id has been added to AttachedItem#CreateRequest.
|
|
21
|
+
* preferred_scheme has been added to Card#UpdateCardForCustomerRequest.
|
|
22
|
+
* valid_from has been added to Coupon#CreateForItem & Coupon#UpdateForItemsRequest.
|
|
23
|
+
* preferred_scheme has been added to Customer#CreateRequest & Customer#CollectPaymentRequest.
|
|
24
|
+
* business_entity_id has been added to DifferentialPrice#CreateRequest.
|
|
25
|
+
* preferred_scheme has been added to Invoice#CreateRequest & Invoice#CreateForChargeItemsAndChargesRequest.
|
|
26
|
+
* business_entity_id has been added to Items#CreateRequest.
|
|
27
|
+
* business_entity_id & include_site_level_resources have been added to Items#ListItemParams.
|
|
28
|
+
* business_entity_id has been added to ItemFamily#CreateRequest.
|
|
29
|
+
* business_entity_id & include_site_level_resources have been added to ItemFamily#ListItemFamilyParams.
|
|
30
|
+
* business_entity_id has been added to ItemPrice#CreateRequest.
|
|
31
|
+
* business_entity_id & include_site_level_resources have been added to ItemPrice#ListItemPriceParams.
|
|
32
|
+
* business_entity_id & include_site_level_resources have been added to PriceVariant#ListItemFamilyParams.
|
|
33
|
+
* business_entity_id has been added to PriceVariant#CreateRequest.
|
|
34
|
+
* business_entity_id & include_site_level_resources have been added to PriceVariant#ListPriceVariantParams.
|
|
35
|
+
* preferred_scheme has been added to Subscription#CreateRequest, Subscription#UpdateRequest.
|
|
36
|
+
* preferred_scheme Subscription#UpdateForItemsRequest, & Subscription#ImportSubscriptionRequest.
|
|
37
|
+
* business_entity_id & include_site_level_resources have been added to Export#ItemFamiliesRequest & Export#ItemsRequest.
|
|
38
|
+
* business_entity_id & include_site_level_resources have been added to Export#ItemPricesRequest Export#PriceVariantsRequest
|
|
39
|
+
* name & flexible_schedules[period] have been added to PaymentScheduleScheme#CreateRequest.
|
|
40
|
+
|
|
41
|
+
#### New Enum Values:
|
|
42
|
+
* FUTURE has been added to Coupon#StatusEnum.
|
|
43
|
+
* EXISTING_CUSTOMER & NEW_CUSTOMER have been added to Coupon#TypeEnum.
|
|
44
|
+
* LATE_FAILURE has added to Transation#LinkedPaymentEnum & Transation#StatusEnum.
|
|
45
|
+
* OMNICHANNEL_SUBSCRIPTION, has been added to EntityTypeEnum.
|
|
46
|
+
* OMNICHANNEL_SUBSCRIPTION_ITEM, has been added to EntityTypeEnum.
|
|
47
|
+
* OMNICHANNEL_TRANSACTION, has been added to EntityTypeEnum.
|
|
48
|
+
* OMNICHANNEL_SUBSCRIPTION_ITEM_RENEWED, has been added to EventTypeEnum.
|
|
49
|
+
* OMNICHANNEL_SUBSCRIPTION_CREATED, has been added to EventTypeEnum.
|
|
50
|
+
* OMNICHANNEL_SUBSCRIPTION_ITEM_DOWNGRADE_SCHEDULED, has been added to EventTypeEnum.
|
|
51
|
+
* OMNICHANNEL_SUBSCRIPTION_ITEM_SCHEDULED_DOWNGRADE_REMOVED, has been added to EventTypeEnum.
|
|
52
|
+
* OMNICHANNEL_SUBSCRIPTION_ITEM_DOWNGRADED, has been added to EventTypeEnum.
|
|
53
|
+
* OMNICHANNEL_SUBSCRIPTION_ITEM_EXPIRED, has been added to EventTypeEnum.
|
|
54
|
+
* OMNICHANNEL_SUBSCRIPTION_ITEM_CANCELLATION_SCHEDULED, has been added to EventTypeEnum.
|
|
55
|
+
* OMNICHANNEL_SUBSCRIPTION_ITEM_SCHEDULED_CANCELLATION_REMOVED, has been added to EventTypeEnum.
|
|
56
|
+
* OMNICHANNEL_SUBSCRIPTION_ITEM_RESUBSCRIBED, has been added to EventTypeEnum.
|
|
57
|
+
* OMNICHANNEL_SUBSCRIPTION_ITEM_UPGRADED, has been added to EventTypeEnum.
|
|
58
|
+
* OMNICHANNEL_SUBSCRIPTION_ITEM_CANCELLED, has been added to EventTypeEnum.
|
|
59
|
+
|
|
1
60
|
## v3.0.2 (2024-11-09)
|
|
2
61
|
|
|
3
62
|
### Bug fixes:
|
package/cjs/environment.js
CHANGED
|
@@ -11,7 +11,7 @@ exports.Environment = {
|
|
|
11
11
|
hostSuffix: '.chargebee.com',
|
|
12
12
|
apiPath: '/api/v2',
|
|
13
13
|
timeout: DEFAULT_TIME_OUT,
|
|
14
|
-
clientVersion: 'v3.0
|
|
14
|
+
clientVersion: 'v3.1.0',
|
|
15
15
|
port: DEFAULT_PORT,
|
|
16
16
|
timemachineWaitInMillis: DEFAULT_TIME_MACHINE_WAIT,
|
|
17
17
|
exportWaitInMillis: DEFAULT_EXPORT_WAIT,
|
|
@@ -1096,4 +1096,20 @@ exports.Endpoints = {
|
|
|
1096
1096
|
false,
|
|
1097
1097
|
],
|
|
1098
1098
|
],
|
|
1099
|
+
omnichannelSubscription: [
|
|
1100
|
+
['retrieve', 'GET', '/omnichannel_subscriptions', null, true],
|
|
1101
|
+
['list', 'GET', '/omnichannel_subscriptions', null, false],
|
|
1102
|
+
[
|
|
1103
|
+
'omnichannel_transactionsForOmnichannelSubscription',
|
|
1104
|
+
'GET',
|
|
1105
|
+
'/omnichannel_subscriptions',
|
|
1106
|
+
'/omnichannel_transactions',
|
|
1107
|
+
true,
|
|
1108
|
+
],
|
|
1109
|
+
],
|
|
1110
|
+
omnichannelTransaction: [],
|
|
1111
|
+
recordedPurchase: [
|
|
1112
|
+
['create', 'POST', '/recorded_purchases', null, false],
|
|
1113
|
+
['retrieve', 'GET', '/recorded_purchases', null, true],
|
|
1114
|
+
],
|
|
1099
1115
|
};
|
package/esm/environment.js
CHANGED
|
@@ -8,7 +8,7 @@ export const Environment = {
|
|
|
8
8
|
hostSuffix: '.chargebee.com',
|
|
9
9
|
apiPath: '/api/v2',
|
|
10
10
|
timeout: DEFAULT_TIME_OUT,
|
|
11
|
-
clientVersion: 'v3.0
|
|
11
|
+
clientVersion: 'v3.1.0',
|
|
12
12
|
port: DEFAULT_PORT,
|
|
13
13
|
timemachineWaitInMillis: DEFAULT_TIME_MACHINE_WAIT,
|
|
14
14
|
exportWaitInMillis: DEFAULT_EXPORT_WAIT,
|
|
@@ -1093,4 +1093,20 @@ export const Endpoints = {
|
|
|
1093
1093
|
false,
|
|
1094
1094
|
],
|
|
1095
1095
|
],
|
|
1096
|
+
omnichannelSubscription: [
|
|
1097
|
+
['retrieve', 'GET', '/omnichannel_subscriptions', null, true],
|
|
1098
|
+
['list', 'GET', '/omnichannel_subscriptions', null, false],
|
|
1099
|
+
[
|
|
1100
|
+
'omnichannel_transactionsForOmnichannelSubscription',
|
|
1101
|
+
'GET',
|
|
1102
|
+
'/omnichannel_subscriptions',
|
|
1103
|
+
'/omnichannel_transactions',
|
|
1104
|
+
true,
|
|
1105
|
+
],
|
|
1106
|
+
],
|
|
1107
|
+
omnichannelTransaction: [],
|
|
1108
|
+
recordedPurchase: [
|
|
1109
|
+
['create', 'POST', '/recorded_purchases', null, false],
|
|
1110
|
+
['retrieve', 'GET', '/recorded_purchases', null, true],
|
|
1111
|
+
],
|
|
1096
1112
|
};
|
package/package.json
CHANGED
package/types/core.d.ts
CHANGED
|
@@ -132,7 +132,10 @@ declare module 'chargebee' {
|
|
|
132
132
|
| 'subscription_entitlement'
|
|
133
133
|
| 'item_entitlement'
|
|
134
134
|
| 'business_entity'
|
|
135
|
-
| 'price_variant'
|
|
135
|
+
| 'price_variant'
|
|
136
|
+
| 'omnichannel_subscription'
|
|
137
|
+
| 'omnichannel_subscription_item'
|
|
138
|
+
| 'omnichannel_transaction';
|
|
136
139
|
type EventNameEnum = 'cancellation_page_loaded';
|
|
137
140
|
type EventTypeEnum =
|
|
138
141
|
| 'coupon_created'
|
|
@@ -310,6 +313,17 @@ declare module 'chargebee' {
|
|
|
310
313
|
| 'subscription_moved_in'
|
|
311
314
|
| 'subscription_moved_out'
|
|
312
315
|
| 'subscription_movement_failed'
|
|
316
|
+
| 'omnichannel_subscription_created'
|
|
317
|
+
| 'omnichannel_subscription_item_renewed'
|
|
318
|
+
| 'omnichannel_subscription_item_downgrade_scheduled'
|
|
319
|
+
| 'omnichannel_subscription_item_scheduled_downgrade_removed'
|
|
320
|
+
| 'omnichannel_subscription_item_downgraded'
|
|
321
|
+
| 'omnichannel_subscription_item_expired'
|
|
322
|
+
| 'omnichannel_subscription_item_cancellation_scheduled'
|
|
323
|
+
| 'omnichannel_subscription_item_scheduled_cancellation_removed'
|
|
324
|
+
| 'omnichannel_subscription_item_resubscribed'
|
|
325
|
+
| 'omnichannel_subscription_item_upgraded'
|
|
326
|
+
| 'omnichannel_subscription_item_cancelled'
|
|
313
327
|
| 'plan_created'
|
|
314
328
|
| 'plan_updated'
|
|
315
329
|
| 'plan_deleted'
|
package/types/index.d.ts
CHANGED
|
@@ -41,6 +41,8 @@
|
|
|
41
41
|
///<reference path='./resources/ItemPrice.d.ts' />
|
|
42
42
|
///<reference path='./resources/Metadata.d.ts' />
|
|
43
43
|
///<reference path='./resources/NonSubscription.d.ts' />
|
|
44
|
+
///<reference path='./resources/OmnichannelSubscription.d.ts' />
|
|
45
|
+
///<reference path='./resources/OmnichannelTransaction.d.ts' />
|
|
44
46
|
///<reference path='./resources/Order.d.ts' />
|
|
45
47
|
///<reference path='./resources/PaymentIntent.d.ts' />
|
|
46
48
|
///<reference path='./resources/PaymentReferenceNumber.d.ts' />
|
|
@@ -59,6 +61,7 @@
|
|
|
59
61
|
///<reference path='./resources/QuotedCharge.d.ts' />
|
|
60
62
|
///<reference path='./resources/QuotedSubscription.d.ts' />
|
|
61
63
|
///<reference path='./resources/Ramp.d.ts' />
|
|
64
|
+
///<reference path='./resources/RecordedPurchase.d.ts' />
|
|
62
65
|
///<reference path='./resources/ResourceMigration.d.ts' />
|
|
63
66
|
///<reference path='./resources/SiteMigrationDetail.d.ts' />
|
|
64
67
|
///<reference path='./resources/Subscription.d.ts' />
|
|
@@ -142,6 +145,7 @@ declare module 'chargebee' {
|
|
|
142
145
|
itemFamily: ItemFamily.ItemFamilyResource;
|
|
143
146
|
itemPrice: ItemPrice.ItemPriceResource;
|
|
144
147
|
nonSubscription: NonSubscription.NonSubscriptionResource;
|
|
148
|
+
omnichannelSubscription: OmnichannelSubscription.OmnichannelSubscriptionResource;
|
|
145
149
|
order: Order.OrderResource;
|
|
146
150
|
paymentIntent: PaymentIntent.PaymentIntentResource;
|
|
147
151
|
paymentScheduleScheme: PaymentScheduleScheme.PaymentScheduleSchemeResource;
|
|
@@ -154,6 +158,7 @@ declare module 'chargebee' {
|
|
|
154
158
|
purchase: Purchase.PurchaseResource;
|
|
155
159
|
quote: Quote.QuoteResource;
|
|
156
160
|
ramp: Ramp.RampResource;
|
|
161
|
+
recordedPurchase: RecordedPurchase.RecordedPurchaseResource;
|
|
157
162
|
resourceMigration: ResourceMigration.ResourceMigrationResource;
|
|
158
163
|
siteMigrationDetail: SiteMigrationDetail.SiteMigrationDetailResource;
|
|
159
164
|
subscription: Subscription.SubscriptionResource;
|
|
@@ -17,6 +17,7 @@ declare module 'chargebee' {
|
|
|
17
17
|
resource_version?: number;
|
|
18
18
|
updated_at?: number;
|
|
19
19
|
channel?: ChannelEnum;
|
|
20
|
+
business_entity_id?: string;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
export namespace AttachedItem {
|
|
@@ -84,6 +85,7 @@ declare module 'chargebee' {
|
|
|
84
85
|
quantity_in_decimal?: string;
|
|
85
86
|
charge_on_event?: ChargeOnEventEnum;
|
|
86
87
|
charge_once?: boolean;
|
|
88
|
+
business_entity_id?: string;
|
|
87
89
|
}
|
|
88
90
|
export interface UpdateInputParam {
|
|
89
91
|
parent_item_id: string;
|
|
@@ -14,9 +14,10 @@ declare module 'chargebee' {
|
|
|
14
14
|
currency_code?: string;
|
|
15
15
|
duration_type: 'one_time' | 'forever' | 'limited_period';
|
|
16
16
|
duration_month?: number;
|
|
17
|
+
valid_from?: number;
|
|
17
18
|
valid_till?: number;
|
|
18
19
|
max_redemptions?: number;
|
|
19
|
-
status?: 'active' | 'expired' | 'archived' | 'deleted';
|
|
20
|
+
status?: 'active' | 'expired' | 'archived' | 'deleted' | 'future';
|
|
20
21
|
apply_discount_on:
|
|
21
22
|
| 'plans'
|
|
22
23
|
| 'plans_and_addons'
|
|
@@ -142,7 +143,11 @@ declare module 'chargebee' {
|
|
|
142
143
|
}
|
|
143
144
|
export interface CouponConstraint {
|
|
144
145
|
entity_type: 'customer';
|
|
145
|
-
type:
|
|
146
|
+
type:
|
|
147
|
+
| 'max_redemptions'
|
|
148
|
+
| 'unique_by'
|
|
149
|
+
| 'existing_customer'
|
|
150
|
+
| 'new_customer';
|
|
146
151
|
value?: string;
|
|
147
152
|
}
|
|
148
153
|
// REQUEST PARAMS
|
|
@@ -191,6 +196,7 @@ declare module 'chargebee' {
|
|
|
191
196
|
apply_on: 'invoice_amount' | 'each_specified_item';
|
|
192
197
|
duration_type?: 'one_time' | 'forever' | 'limited_period';
|
|
193
198
|
duration_month?: number;
|
|
199
|
+
valid_from?: number;
|
|
194
200
|
valid_till?: number;
|
|
195
201
|
max_redemptions?: number;
|
|
196
202
|
invoice_notes?: string;
|
|
@@ -218,6 +224,7 @@ declare module 'chargebee' {
|
|
|
218
224
|
apply_on?: 'invoice_amount' | 'each_specified_item';
|
|
219
225
|
duration_type?: 'one_time' | 'forever' | 'limited_period';
|
|
220
226
|
duration_month?: number;
|
|
227
|
+
valid_from?: number;
|
|
221
228
|
valid_till?: number;
|
|
222
229
|
max_redemptions?: number;
|
|
223
230
|
invoice_notes?: string;
|
|
@@ -286,7 +293,11 @@ declare module 'chargebee' {
|
|
|
286
293
|
}
|
|
287
294
|
export interface CouponConstraintsCreateForItemsInputParam {
|
|
288
295
|
entity_type: 'customer';
|
|
289
|
-
type:
|
|
296
|
+
type:
|
|
297
|
+
| 'max_redemptions'
|
|
298
|
+
| 'unique_by'
|
|
299
|
+
| 'existing_customer'
|
|
300
|
+
| 'new_customer';
|
|
290
301
|
value?: string;
|
|
291
302
|
}
|
|
292
303
|
export interface ItemConstraintsCreateForItemsInputParam {
|
|
@@ -302,7 +313,11 @@ declare module 'chargebee' {
|
|
|
302
313
|
}
|
|
303
314
|
export interface CouponConstraintsUpdateForItemsInputParam {
|
|
304
315
|
entity_type: 'customer';
|
|
305
|
-
type:
|
|
316
|
+
type:
|
|
317
|
+
| 'max_redemptions'
|
|
318
|
+
| 'unique_by'
|
|
319
|
+
| 'existing_customer'
|
|
320
|
+
| 'new_customer';
|
|
306
321
|
value?: string;
|
|
307
322
|
}
|
|
308
323
|
export interface ItemConstraintsUpdateForItemsInputParam {
|
|
@@ -743,6 +743,7 @@ declare module 'chargebee' {
|
|
|
743
743
|
expiry_month?: number;
|
|
744
744
|
expiry_year?: number;
|
|
745
745
|
cvv?: string;
|
|
746
|
+
preferred_scheme?: 'cartes_bancaires' | 'mastercard' | 'visa';
|
|
746
747
|
billing_addr1?: string;
|
|
747
748
|
billing_addr2?: string;
|
|
748
749
|
billing_city?: string;
|
|
@@ -905,6 +906,7 @@ declare module 'chargebee' {
|
|
|
905
906
|
expiry_month?: number;
|
|
906
907
|
expiry_year?: number;
|
|
907
908
|
cvv?: string;
|
|
909
|
+
preferred_scheme?: 'cartes_bancaires' | 'mastercard' | 'visa';
|
|
908
910
|
billing_addr1?: string;
|
|
909
911
|
billing_addr2?: string;
|
|
910
912
|
billing_city?: string;
|
|
@@ -16,6 +16,7 @@ declare module 'chargebee' {
|
|
|
16
16
|
tiers?: DifferentialPrice.Tier[];
|
|
17
17
|
currency_code: string;
|
|
18
18
|
parent_periods?: DifferentialPrice.ParentPeriod[];
|
|
19
|
+
business_entity_id?: string;
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
export namespace DifferentialPrice {
|
|
@@ -90,6 +91,7 @@ declare module 'chargebee' {
|
|
|
90
91
|
parent_item_id: string;
|
|
91
92
|
price?: number;
|
|
92
93
|
price_in_decimal?: string;
|
|
94
|
+
business_entity_id?: string;
|
|
93
95
|
parent_periods?: ParentPeriodsCreateInputParam[];
|
|
94
96
|
tiers?: TiersCreateInputParam[];
|
|
95
97
|
}
|
|
@@ -260,15 +260,21 @@ declare module 'chargebee' {
|
|
|
260
260
|
order?: OrderOrdersInputParam;
|
|
261
261
|
}
|
|
262
262
|
export interface ItemFamiliesInputParam {
|
|
263
|
+
business_entity_id?: filter.String;
|
|
264
|
+
include_site_level_resources?: filter.Boolean;
|
|
263
265
|
item_family?: ItemFamilyItemFamiliesInputParam;
|
|
264
266
|
}
|
|
265
267
|
export interface ItemsInputParam {
|
|
268
|
+
business_entity_id?: filter.String;
|
|
269
|
+
include_site_level_resources?: filter.Boolean;
|
|
266
270
|
item?: ItemItemsInputParam;
|
|
267
271
|
}
|
|
268
272
|
export interface ItemPricesInputParam {
|
|
269
273
|
item_family_id?: filter.String;
|
|
270
274
|
item_type?: filter.Enum;
|
|
271
275
|
currency_code?: filter.String;
|
|
276
|
+
business_entity_id?: filter.String;
|
|
277
|
+
include_site_level_resources?: filter.Boolean;
|
|
272
278
|
item_price?: ItemPriceItemPricesInputParam;
|
|
273
279
|
}
|
|
274
280
|
export interface AttachedItemsInputParam {
|
|
@@ -280,6 +286,8 @@ declare module 'chargebee' {
|
|
|
280
286
|
item_id?: filter.String;
|
|
281
287
|
}
|
|
282
288
|
export interface PriceVariantsInputParam {
|
|
289
|
+
business_entity_id?: filter.String;
|
|
290
|
+
include_site_level_resources?: filter.Boolean;
|
|
283
291
|
price_variant?: PriceVariantPriceVariantsInputParam;
|
|
284
292
|
}
|
|
285
293
|
export interface InvoiceRevenueRecognitionInputParam {
|
|
@@ -586,7 +586,8 @@ declare module 'chargebee' {
|
|
|
586
586
|
| 'voided'
|
|
587
587
|
| 'failure'
|
|
588
588
|
| 'timeout'
|
|
589
|
-
| 'needs_attention'
|
|
589
|
+
| 'needs_attention'
|
|
590
|
+
| 'late_failure';
|
|
590
591
|
txn_date?: number;
|
|
591
592
|
txn_amount?: number;
|
|
592
593
|
}
|
|
@@ -601,7 +602,8 @@ declare module 'chargebee' {
|
|
|
601
602
|
| 'voided'
|
|
602
603
|
| 'failure'
|
|
603
604
|
| 'timeout'
|
|
604
|
-
| 'needs_attention'
|
|
605
|
+
| 'needs_attention'
|
|
606
|
+
| 'late_failure';
|
|
605
607
|
txn_amount?: number;
|
|
606
608
|
}
|
|
607
609
|
export interface AppliedCredit {
|
|
@@ -1173,6 +1175,7 @@ declare module 'chargebee' {
|
|
|
1173
1175
|
expiry_month?: number;
|
|
1174
1176
|
expiry_year?: number;
|
|
1175
1177
|
cvv?: string;
|
|
1178
|
+
preferred_scheme?: 'cartes_bancaires' | 'mastercard' | 'visa';
|
|
1176
1179
|
billing_addr1?: string;
|
|
1177
1180
|
billing_addr2?: string;
|
|
1178
1181
|
billing_city?: string;
|
|
@@ -1318,6 +1321,7 @@ declare module 'chargebee' {
|
|
|
1318
1321
|
expiry_month?: number;
|
|
1319
1322
|
expiry_year?: number;
|
|
1320
1323
|
cvv?: string;
|
|
1324
|
+
preferred_scheme?: 'cartes_bancaires' | 'mastercard' | 'visa';
|
|
1321
1325
|
billing_addr1?: string;
|
|
1322
1326
|
billing_addr2?: string;
|
|
1323
1327
|
billing_city?: string;
|
|
@@ -1597,7 +1601,7 @@ declare module 'chargebee' {
|
|
|
1597
1601
|
reference_number?: string;
|
|
1598
1602
|
custom_payment_method_id?: string;
|
|
1599
1603
|
id_at_gateway?: string;
|
|
1600
|
-
status?: 'success' | 'failure';
|
|
1604
|
+
status?: 'success' | 'failure' | 'late_failure';
|
|
1601
1605
|
date?: number;
|
|
1602
1606
|
error_code?: string;
|
|
1603
1607
|
error_text?: string;
|
|
@@ -30,6 +30,7 @@ declare module 'chargebee' {
|
|
|
30
30
|
bundle_items?: Item.BundleItem[];
|
|
31
31
|
bundle_configuration?: Item.BundleConfiguration;
|
|
32
32
|
metadata?: any;
|
|
33
|
+
business_entity_id?: string;
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
export namespace Item {
|
|
@@ -117,6 +118,7 @@ declare module 'chargebee' {
|
|
|
117
118
|
metered?: boolean;
|
|
118
119
|
usage_calculation?: 'sum_of_usages' | 'last_usage' | 'max_usage';
|
|
119
120
|
metadata?: any;
|
|
121
|
+
business_entity_id?: string;
|
|
120
122
|
bundle_configuration?: BundleConfigurationCreateInputParam;
|
|
121
123
|
bundle_items_to_add?: BundleItemsToAddCreateInputParam[];
|
|
122
124
|
[key: `cf_${string}`]: unknown;
|
|
@@ -164,6 +166,8 @@ declare module 'chargebee' {
|
|
|
164
166
|
metered?: filter.Boolean;
|
|
165
167
|
usage_calculation?: filter.Enum;
|
|
166
168
|
channel?: filter.Enum;
|
|
169
|
+
business_entity_id?: filter.String;
|
|
170
|
+
include_site_level_resources?: filter.Boolean;
|
|
167
171
|
'sort_by[asc]'?: string;
|
|
168
172
|
'sort_by[desc]'?: string;
|
|
169
173
|
}
|
|
@@ -11,6 +11,7 @@ declare module 'chargebee' {
|
|
|
11
11
|
resource_version?: number;
|
|
12
12
|
updated_at?: number;
|
|
13
13
|
channel?: ChannelEnum;
|
|
14
|
+
business_entity_id?: string;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
export namespace ItemFamily {
|
|
@@ -70,6 +71,7 @@ declare module 'chargebee' {
|
|
|
70
71
|
id: string;
|
|
71
72
|
name: string;
|
|
72
73
|
description?: string;
|
|
74
|
+
business_entity_id?: string;
|
|
73
75
|
[key: `cf_${string}`]: unknown;
|
|
74
76
|
}
|
|
75
77
|
export interface ListInputParam {
|
|
@@ -78,6 +80,8 @@ declare module 'chargebee' {
|
|
|
78
80
|
id?: filter.String;
|
|
79
81
|
name?: filter.String;
|
|
80
82
|
updated_at?: filter.Timestamp;
|
|
83
|
+
business_entity_id?: filter.String;
|
|
84
|
+
include_site_level_resources?: filter.Boolean;
|
|
81
85
|
[key: `cf_${string}`]: unknown;
|
|
82
86
|
}
|
|
83
87
|
export interface UpdateInputParam {
|
|
@@ -48,6 +48,7 @@ declare module 'chargebee' {
|
|
|
48
48
|
parent_item_id?: string;
|
|
49
49
|
show_description_in_invoices?: boolean;
|
|
50
50
|
show_description_in_quotes?: boolean;
|
|
51
|
+
business_entity_id?: string;
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
export namespace ItemPrice {
|
|
@@ -172,6 +173,7 @@ declare module 'chargebee' {
|
|
|
172
173
|
show_description_in_invoices?: boolean;
|
|
173
174
|
show_description_in_quotes?: boolean;
|
|
174
175
|
usage_accumulation_reset_frequency?: UsageAccumulationResetFrequencyEnum;
|
|
176
|
+
business_entity_id?: string;
|
|
175
177
|
pricing_model?: PricingModelEnum;
|
|
176
178
|
price?: number;
|
|
177
179
|
price_in_decimal?: string;
|
|
@@ -243,6 +245,8 @@ declare module 'chargebee' {
|
|
|
243
245
|
trial_period_unit?: filter.Enum;
|
|
244
246
|
status?: filter.Enum;
|
|
245
247
|
updated_at?: filter.Timestamp;
|
|
248
|
+
business_entity_id?: filter.String;
|
|
249
|
+
include_site_level_resources?: filter.Boolean;
|
|
246
250
|
period_unit?: filter.Enum;
|
|
247
251
|
period?: filter.Number;
|
|
248
252
|
channel?: filter.Enum;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
///<reference path='./filter.d.ts'/>
|
|
4
|
+
declare module 'chargebee' {
|
|
5
|
+
export interface OmnichannelSubscription {
|
|
6
|
+
id: string;
|
|
7
|
+
id_at_source: string;
|
|
8
|
+
app_id: string;
|
|
9
|
+
source: 'apple_app_store';
|
|
10
|
+
customer_id?: string;
|
|
11
|
+
created_at: number;
|
|
12
|
+
omnichannel_subscription_items: OmnichannelSubscription.OmnichannelSubscriptionItem[];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export namespace OmnichannelSubscription {
|
|
16
|
+
export class OmnichannelSubscriptionResource {
|
|
17
|
+
retrieve(
|
|
18
|
+
omnichannel_subscription_id: string,
|
|
19
|
+
headers?: ChargebeeRequestHeader,
|
|
20
|
+
): Promise<ChargebeeResponse<RetrieveResponse>>;
|
|
21
|
+
|
|
22
|
+
list(
|
|
23
|
+
input?: ListInputParam,
|
|
24
|
+
headers?: ChargebeeRequestHeader,
|
|
25
|
+
): Promise<ChargebeeResponse<ListResponse>>;
|
|
26
|
+
|
|
27
|
+
omnichannelTransactionsForOmnichannelSubscription(
|
|
28
|
+
omnichannel_subscription_id: string,
|
|
29
|
+
input?: OmnichannelTransactionsForOmnichannelSubscriptionInputParam,
|
|
30
|
+
headers?: ChargebeeRequestHeader,
|
|
31
|
+
): Promise<
|
|
32
|
+
ChargebeeResponse<OmnichannelTransactionsForOmnichannelSubscriptionResponse>
|
|
33
|
+
>;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface RetrieveResponse {
|
|
37
|
+
omnichannel_subscription: OmnichannelSubscription;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface ListResponse {
|
|
41
|
+
list: { omnichannel_subscription: OmnichannelSubscription }[];
|
|
42
|
+
next_offset?: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface OmnichannelTransactionsForOmnichannelSubscriptionResponse {
|
|
46
|
+
list: { omnichannel_transaction: OmnichannelTransaction }[];
|
|
47
|
+
next_offset?: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface OmnichannelSubscriptionItem {
|
|
51
|
+
id: string;
|
|
52
|
+
id_at_source: string;
|
|
53
|
+
status: 'active' | 'expired' | 'cancelled';
|
|
54
|
+
current_term_start?: number;
|
|
55
|
+
current_term_end?: number;
|
|
56
|
+
expired_at?: number;
|
|
57
|
+
expiration_reason?: 'billing_error' | 'product_not_available' | 'other';
|
|
58
|
+
cancelled_at?: number;
|
|
59
|
+
cancellation_reason?:
|
|
60
|
+
| 'customer_cancelled'
|
|
61
|
+
| 'customer_did_not_consent_to_price_increase';
|
|
62
|
+
}
|
|
63
|
+
// REQUEST PARAMS
|
|
64
|
+
//---------------
|
|
65
|
+
|
|
66
|
+
export interface ListInputParam {
|
|
67
|
+
limit?: number;
|
|
68
|
+
offset?: string;
|
|
69
|
+
}
|
|
70
|
+
export interface OmnichannelTransactionsForOmnichannelSubscriptionInputParam {
|
|
71
|
+
limit?: number;
|
|
72
|
+
offset?: string;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
|
|
4
|
+
declare module 'chargebee' {
|
|
5
|
+
export interface OmnichannelTransaction {
|
|
6
|
+
id: string;
|
|
7
|
+
id_at_source: string;
|
|
8
|
+
app_id: string;
|
|
9
|
+
price_currency: string;
|
|
10
|
+
price_units: number;
|
|
11
|
+
price_nanos: number;
|
|
12
|
+
type: 'purchase' | 'renewal';
|
|
13
|
+
transacted_at: number;
|
|
14
|
+
created_at: number;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -56,7 +56,12 @@ declare module 'chargebee' {
|
|
|
56
56
|
number_of_schedules: number;
|
|
57
57
|
period_unit: 'day' | 'week' | 'month';
|
|
58
58
|
period?: number;
|
|
59
|
-
|
|
59
|
+
name: string;
|
|
60
|
+
flexible_schedules?: FlexibleSchedulesCreateInputParam[];
|
|
61
|
+
}
|
|
62
|
+
export interface FlexibleSchedulesCreateInputParam {
|
|
63
|
+
period?: number;
|
|
64
|
+
amount_percentage?: number;
|
|
60
65
|
}
|
|
61
66
|
}
|
|
62
67
|
}
|
|
@@ -14,6 +14,7 @@ declare module 'chargebee' {
|
|
|
14
14
|
updated_at?: number;
|
|
15
15
|
archived_at?: number;
|
|
16
16
|
attributes?: PriceVariant.Attribute[];
|
|
17
|
+
business_entity_id?: string;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
export namespace PriceVariant {
|
|
@@ -79,6 +80,7 @@ declare module 'chargebee' {
|
|
|
79
80
|
external_name?: string;
|
|
80
81
|
description?: string;
|
|
81
82
|
variant_group?: string;
|
|
83
|
+
business_entity_id?: string;
|
|
82
84
|
attributes?: AttributesCreateInputParam[];
|
|
83
85
|
}
|
|
84
86
|
export interface UpdateInputParam {
|
|
@@ -97,6 +99,8 @@ declare module 'chargebee' {
|
|
|
97
99
|
status?: filter.Enum;
|
|
98
100
|
updated_at?: filter.Timestamp;
|
|
99
101
|
created_at?: filter.Timestamp;
|
|
102
|
+
business_entity_id?: filter.String;
|
|
103
|
+
include_site_level_resources?: filter.Boolean;
|
|
100
104
|
'sort_by[asc]'?: string;
|
|
101
105
|
'sort_by[desc]'?: string;
|
|
102
106
|
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
|
|
4
|
+
declare module 'chargebee' {
|
|
5
|
+
export interface RecordedPurchase {
|
|
6
|
+
id: string;
|
|
7
|
+
customer_id: string;
|
|
8
|
+
app_id: string;
|
|
9
|
+
source: 'apple_app_store';
|
|
10
|
+
status: 'in_process' | 'completed' | 'failed';
|
|
11
|
+
omnichannel_transaction_id?: string;
|
|
12
|
+
created_at: number;
|
|
13
|
+
linked_omnichannel_subscriptions?: RecordedPurchase.LinkedOmnichannelSubscription[];
|
|
14
|
+
error_detail?: RecordedPurchase.ErrorDetail;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export namespace RecordedPurchase {
|
|
18
|
+
export class RecordedPurchaseResource {
|
|
19
|
+
create(
|
|
20
|
+
input: CreateInputParam,
|
|
21
|
+
headers?: ChargebeeRequestHeader,
|
|
22
|
+
): Promise<ChargebeeResponse<CreateResponse>>;
|
|
23
|
+
|
|
24
|
+
retrieve(
|
|
25
|
+
recorded_purchase_id: string,
|
|
26
|
+
headers?: ChargebeeRequestHeader,
|
|
27
|
+
): Promise<ChargebeeResponse<RetrieveResponse>>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface CreateResponse {
|
|
31
|
+
recorded_purchase: RecordedPurchase;
|
|
32
|
+
customer: Customer;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface RetrieveResponse {
|
|
36
|
+
recorded_purchase: RecordedPurchase;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface LinkedOmnichannelSubscription {
|
|
40
|
+
omnichannel_subscription_id?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface ErrorDetail {
|
|
43
|
+
error_message?: string;
|
|
44
|
+
}
|
|
45
|
+
// REQUEST PARAMS
|
|
46
|
+
//---------------
|
|
47
|
+
|
|
48
|
+
export interface CreateInputParam {
|
|
49
|
+
app_id: string;
|
|
50
|
+
customer?: CustomerCreateInputParam;
|
|
51
|
+
apple_app_store?: AppleAppStoreCreateInputParam;
|
|
52
|
+
}
|
|
53
|
+
export interface CustomerCreateInputParam {
|
|
54
|
+
id: string;
|
|
55
|
+
}
|
|
56
|
+
export interface AppleAppStoreCreateInputParam {
|
|
57
|
+
transaction_id?: string;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -1407,6 +1407,7 @@ declare module 'chargebee' {
|
|
|
1407
1407
|
expiry_month?: number;
|
|
1408
1408
|
expiry_year?: number;
|
|
1409
1409
|
cvv?: string;
|
|
1410
|
+
preferred_scheme?: 'cartes_bancaires' | 'mastercard' | 'visa';
|
|
1410
1411
|
billing_addr1?: string;
|
|
1411
1412
|
billing_addr2?: string;
|
|
1412
1413
|
billing_city?: string;
|
|
@@ -1764,6 +1765,7 @@ declare module 'chargebee' {
|
|
|
1764
1765
|
expiry_month?: number;
|
|
1765
1766
|
expiry_year?: number;
|
|
1766
1767
|
cvv?: string;
|
|
1768
|
+
preferred_scheme?: 'cartes_bancaires' | 'mastercard' | 'visa';
|
|
1767
1769
|
billing_addr1?: string;
|
|
1768
1770
|
billing_addr2?: string;
|
|
1769
1771
|
billing_city?: string;
|
|
@@ -1922,6 +1924,7 @@ declare module 'chargebee' {
|
|
|
1922
1924
|
expiry_month?: number;
|
|
1923
1925
|
expiry_year?: number;
|
|
1924
1926
|
cvv?: string;
|
|
1927
|
+
preferred_scheme?: 'cartes_bancaires' | 'mastercard' | 'visa';
|
|
1925
1928
|
billing_addr1?: string;
|
|
1926
1929
|
billing_addr2?: string;
|
|
1927
1930
|
billing_city?: string;
|
|
@@ -2146,6 +2149,7 @@ declare module 'chargebee' {
|
|
|
2146
2149
|
expiry_month?: number;
|
|
2147
2150
|
expiry_year?: number;
|
|
2148
2151
|
cvv?: string;
|
|
2152
|
+
preferred_scheme?: 'cartes_bancaires' | 'mastercard' | 'visa';
|
|
2149
2153
|
billing_addr1?: string;
|
|
2150
2154
|
billing_addr2?: string;
|
|
2151
2155
|
billing_city?: string;
|
|
@@ -24,7 +24,8 @@ declare module 'chargebee' {
|
|
|
24
24
|
| 'voided'
|
|
25
25
|
| 'failure'
|
|
26
26
|
| 'timeout'
|
|
27
|
-
| 'needs_attention'
|
|
27
|
+
| 'needs_attention'
|
|
28
|
+
| 'late_failure';
|
|
28
29
|
fraud_flag?: 'safe' | 'suspicious' | 'fraudulent';
|
|
29
30
|
initiator_type?: 'customer' | 'merchant';
|
|
30
31
|
three_d_secure?: boolean;
|
|
@@ -205,7 +206,7 @@ declare module 'chargebee' {
|
|
|
205
206
|
cn_date?: number;
|
|
206
207
|
cn_total?: number;
|
|
207
208
|
cn_status: 'adjusted' | 'refunded' | 'refund_due' | 'voided';
|
|
208
|
-
cn_reference_invoice_id
|
|
209
|
+
cn_reference_invoice_id?: string;
|
|
209
210
|
}
|
|
210
211
|
export interface LinkedRefund {
|
|
211
212
|
txn_id: string;
|
|
@@ -215,7 +216,8 @@ declare module 'chargebee' {
|
|
|
215
216
|
| 'voided'
|
|
216
217
|
| 'failure'
|
|
217
218
|
| 'timeout'
|
|
218
|
-
| 'needs_attention'
|
|
219
|
+
| 'needs_attention'
|
|
220
|
+
| 'late_failure';
|
|
219
221
|
txn_date: number;
|
|
220
222
|
txn_amount: number;
|
|
221
223
|
}
|
|
@@ -227,7 +229,8 @@ declare module 'chargebee' {
|
|
|
227
229
|
| 'voided'
|
|
228
230
|
| 'failure'
|
|
229
231
|
| 'timeout'
|
|
230
|
-
| 'needs_attention'
|
|
232
|
+
| 'needs_attention'
|
|
233
|
+
| 'late_failure';
|
|
231
234
|
amount?: number;
|
|
232
235
|
date?: number;
|
|
233
236
|
}
|