chargebee 3.0.2 → 3.2.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 CHANGED
@@ -1,3 +1,86 @@
1
+ ### v3.2.0 (2024-11-27)
2
+ * * *
3
+ #### New Resource:
4
+ * OmnichannelSubscriptionItem has been added.
5
+
6
+ #### New Attribute:
7
+ * resource_version has been added to OmnichannelSubscription.
8
+ * resource_version has been added to OmnichannelTransaction.
9
+ * resource_version has been added to RecordedPurchase.
10
+
11
+ #### New Input Parameters:
12
+ * limit has been added to OmnichannelSubscription#ListRequest.
13
+ * offset has been added to OmnichannelSubscription#ListRequest.
14
+ * customer_id has been added to OmnichannelSubscription#ListRequest.
15
+ * replace_coupon_list has been added to HostedPage#CheckoutExistingRequest.
16
+ * replace_coupon_list has been added to HostedPage#CheckoutExistingForItemsRequest.
17
+ * subscription[po_number] has been added to HostedPage#CheckoutNewForItemsRequest.
18
+
19
+ #### Removed Subresource:
20
+ * OmnichannelSubscriptionItem subresource has been removed from OmnichannelSubscription and is now a standalone resource.
21
+
22
+ #### Removed Attribute:
23
+ * metadata has been removed from subscription.
24
+
25
+ ### v3.1.0 (2024-11-14)
26
+ * * *
27
+
28
+ #### New Resource:
29
+ * OmnichannelTransaction has been added.
30
+ * OmnichannelSubscription has been added.
31
+ * RecordedPurchase has been added.
32
+
33
+
34
+ #### New Attributes:
35
+ * business_entity_id has been added to AttachedItem.
36
+ * business_entity_id has been added to DifferentialPrice.
37
+ * business_entity_id has been added to Items.
38
+ * business_entity_id has been added to ItemFamily.
39
+ * business_entity_id has been added to ItemPrice.
40
+ * business_entity_id has been added to PriceVariant.
41
+ * valid_from has been added to coupon.
42
+
43
+ #### New Input Parameters:
44
+ * business_entity_id has been added to AttachedItem#CreateRequest.
45
+ * preferred_scheme has been added to Card#UpdateCardForCustomerRequest.
46
+ * valid_from has been added to Coupon#CreateForItem & Coupon#UpdateForItemsRequest.
47
+ * preferred_scheme has been added to Customer#CreateRequest & Customer#CollectPaymentRequest.
48
+ * business_entity_id has been added to DifferentialPrice#CreateRequest.
49
+ * preferred_scheme has been added to Invoice#CreateRequest & Invoice#CreateForChargeItemsAndChargesRequest.
50
+ * business_entity_id has been added to Items#CreateRequest.
51
+ * business_entity_id & include_site_level_resources have been added to Items#ListItemParams.
52
+ * business_entity_id has been added to ItemFamily#CreateRequest.
53
+ * business_entity_id & include_site_level_resources have been added to ItemFamily#ListItemFamilyParams.
54
+ * business_entity_id has been added to ItemPrice#CreateRequest.
55
+ * business_entity_id & include_site_level_resources have been added to ItemPrice#ListItemPriceParams.
56
+ * business_entity_id & include_site_level_resources have been added to PriceVariant#ListItemFamilyParams.
57
+ * business_entity_id has been added to PriceVariant#CreateRequest.
58
+ * business_entity_id & include_site_level_resources have been added to PriceVariant#ListPriceVariantParams.
59
+ * preferred_scheme has been added to Subscription#CreateRequest, Subscription#UpdateRequest.
60
+ * preferred_scheme Subscription#UpdateForItemsRequest, & Subscription#ImportSubscriptionRequest.
61
+ * business_entity_id & include_site_level_resources have been added to Export#ItemFamiliesRequest & Export#ItemsRequest.
62
+ * business_entity_id & include_site_level_resources have been added to Export#ItemPricesRequest Export#PriceVariantsRequest
63
+ * name & flexible_schedules[period] have been added to PaymentScheduleScheme#CreateRequest.
64
+
65
+ #### New Enum Values:
66
+ * FUTURE has been added to Coupon#StatusEnum.
67
+ * EXISTING_CUSTOMER & NEW_CUSTOMER have been added to Coupon#TypeEnum.
68
+ * LATE_FAILURE has added to Transation#LinkedPaymentEnum & Transation#StatusEnum.
69
+ * OMNICHANNEL_SUBSCRIPTION, has been added to EntityTypeEnum.
70
+ * OMNICHANNEL_SUBSCRIPTION_ITEM, has been added to EntityTypeEnum.
71
+ * OMNICHANNEL_TRANSACTION, has been added to EntityTypeEnum.
72
+ * OMNICHANNEL_SUBSCRIPTION_ITEM_RENEWED, has been added to EventTypeEnum.
73
+ * OMNICHANNEL_SUBSCRIPTION_CREATED, has been added to EventTypeEnum.
74
+ * OMNICHANNEL_SUBSCRIPTION_ITEM_DOWNGRADE_SCHEDULED, has been added to EventTypeEnum.
75
+ * OMNICHANNEL_SUBSCRIPTION_ITEM_SCHEDULED_DOWNGRADE_REMOVED, has been added to EventTypeEnum.
76
+ * OMNICHANNEL_SUBSCRIPTION_ITEM_DOWNGRADED, has been added to EventTypeEnum.
77
+ * OMNICHANNEL_SUBSCRIPTION_ITEM_EXPIRED, has been added to EventTypeEnum.
78
+ * OMNICHANNEL_SUBSCRIPTION_ITEM_CANCELLATION_SCHEDULED, has been added to EventTypeEnum.
79
+ * OMNICHANNEL_SUBSCRIPTION_ITEM_SCHEDULED_CANCELLATION_REMOVED, has been added to EventTypeEnum.
80
+ * OMNICHANNEL_SUBSCRIPTION_ITEM_RESUBSCRIBED, has been added to EventTypeEnum.
81
+ * OMNICHANNEL_SUBSCRIPTION_ITEM_UPGRADED, has been added to EventTypeEnum.
82
+ * OMNICHANNEL_SUBSCRIPTION_ITEM_CANCELLED, has been added to EventTypeEnum.
83
+
1
84
  ## v3.0.2 (2024-11-09)
2
85
 
3
86
  ### Bug fixes:
@@ -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.2',
14
+ clientVersion: 'v3.2.0',
15
15
  port: DEFAULT_PORT,
16
16
  timemachineWaitInMillis: DEFAULT_TIME_MACHINE_WAIT,
17
17
  exportWaitInMillis: DEFAULT_EXPORT_WAIT,
@@ -1096,4 +1096,21 @@ 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
+ omnichannelSubscriptionItem: [],
1112
+ recordedPurchase: [
1113
+ ['create', 'POST', '/recorded_purchases', null, false],
1114
+ ['retrieve', 'GET', '/recorded_purchases', null, true],
1115
+ ],
1099
1116
  };
@@ -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.2',
11
+ clientVersion: 'v3.2.0',
12
12
  port: DEFAULT_PORT,
13
13
  timemachineWaitInMillis: DEFAULT_TIME_MACHINE_WAIT,
14
14
  exportWaitInMillis: DEFAULT_EXPORT_WAIT,
@@ -1093,4 +1093,21 @@ 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
+ omnichannelSubscriptionItem: [],
1109
+ recordedPurchase: [
1110
+ ['create', 'POST', '/recorded_purchases', null, false],
1111
+ ['retrieve', 'GET', '/recorded_purchases', null, true],
1112
+ ],
1096
1113
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chargebee",
3
- "version": "3.0.2",
3
+ "version": "3.2.0",
4
4
  "description": "A library for integrating with Chargebee.",
5
5
  "scripts": {
6
6
  "prepack": "npm install && npm run build",
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,9 @@
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/OmnichannelSubscriptionItem.d.ts' />
46
+ ///<reference path='./resources/OmnichannelTransaction.d.ts' />
44
47
  ///<reference path='./resources/Order.d.ts' />
45
48
  ///<reference path='./resources/PaymentIntent.d.ts' />
46
49
  ///<reference path='./resources/PaymentReferenceNumber.d.ts' />
@@ -59,6 +62,7 @@
59
62
  ///<reference path='./resources/QuotedCharge.d.ts' />
60
63
  ///<reference path='./resources/QuotedSubscription.d.ts' />
61
64
  ///<reference path='./resources/Ramp.d.ts' />
65
+ ///<reference path='./resources/RecordedPurchase.d.ts' />
62
66
  ///<reference path='./resources/ResourceMigration.d.ts' />
63
67
  ///<reference path='./resources/SiteMigrationDetail.d.ts' />
64
68
  ///<reference path='./resources/Subscription.d.ts' />
@@ -142,6 +146,7 @@ declare module 'chargebee' {
142
146
  itemFamily: ItemFamily.ItemFamilyResource;
143
147
  itemPrice: ItemPrice.ItemPriceResource;
144
148
  nonSubscription: NonSubscription.NonSubscriptionResource;
149
+ omnichannelSubscription: OmnichannelSubscription.OmnichannelSubscriptionResource;
145
150
  order: Order.OrderResource;
146
151
  paymentIntent: PaymentIntent.PaymentIntentResource;
147
152
  paymentScheduleScheme: PaymentScheduleScheme.PaymentScheduleSchemeResource;
@@ -154,6 +159,7 @@ declare module 'chargebee' {
154
159
  purchase: Purchase.PurchaseResource;
155
160
  quote: Quote.QuoteResource;
156
161
  ramp: Ramp.RampResource;
162
+ recordedPurchase: RecordedPurchase.RecordedPurchaseResource;
157
163
  resourceMigration: ResourceMigration.ResourceMigrationResource;
158
164
  siteMigrationDetail: SiteMigrationDetail.SiteMigrationDetailResource;
159
165
  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;
@@ -137,6 +137,7 @@ declare module 'chargebee' {
137
137
  expiry_month: number;
138
138
  expiry_year: number;
139
139
  cvv?: string;
140
+ preferred_scheme?: 'cartes_bancaires' | 'mastercard' | 'visa';
140
141
  billing_addr1?: string;
141
142
  billing_addr2?: string;
142
143
  billing_city?: string;
@@ -76,6 +76,9 @@ declare module 'chargebee' {
76
76
  | 'coupon'
77
77
  | 'order'
78
78
  | 'business_entity'
79
+ | 'omnichannel_subscription'
80
+ | 'omnichannel_subscription_item'
81
+ | 'omnichannel_transaction'
79
82
  | 'item_family'
80
83
  | 'item'
81
84
  | 'item_price'
@@ -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: 'max_redemptions' | 'unique_by';
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: 'max_redemptions' | 'unique_by';
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: 'max_redemptions' | 'unique_by';
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 {
@@ -341,7 +341,8 @@ declare module 'chargebee' {
341
341
  | 'voided'
342
342
  | 'failure'
343
343
  | 'timeout'
344
- | 'needs_attention';
344
+ | 'needs_attention'
345
+ | 'late_failure';
345
346
  txn_date?: number;
346
347
  txn_amount?: number;
347
348
  refund_reason_code?: string;
@@ -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 {
@@ -337,6 +337,7 @@ declare module 'chargebee' {
337
337
  reactivate_from?: number;
338
338
  billing_alignment_mode?: BillingAlignmentModeEnum;
339
339
  coupon_ids?: string[];
340
+ replace_coupon_list?: boolean;
340
341
  reactivate?: boolean;
341
342
  force_term_reset?: boolean;
342
343
  redirect_url?: string;
@@ -362,6 +363,7 @@ declare module 'chargebee' {
362
363
  reactivate_from?: number;
363
364
  billing_alignment_mode?: BillingAlignmentModeEnum;
364
365
  coupon_ids?: string[];
366
+ replace_coupon_list?: boolean;
365
367
  reactivate?: boolean;
366
368
  force_term_reset?: boolean;
367
369
  change_option?: ChangeOptionEnum;
@@ -808,6 +810,7 @@ declare module 'chargebee' {
808
810
  coupon?: string;
809
811
  auto_collection?: AutoCollectionEnum;
810
812
  invoice_notes?: string;
813
+ po_number?: string;
811
814
  contract_term_billing_cycle_on_renewal?: number;
812
815
  }
813
816
  export interface CardCheckoutNewForItemsInputParam {
@@ -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,64 @@
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
+ resource_version?: number;
13
+ omnichannel_subscription_items: OmnichannelSubscriptionItem[];
14
+ }
15
+
16
+ export namespace OmnichannelSubscription {
17
+ export class OmnichannelSubscriptionResource {
18
+ retrieve(
19
+ omnichannel_subscription_id: string,
20
+ headers?: ChargebeeRequestHeader,
21
+ ): Promise<ChargebeeResponse<RetrieveResponse>>;
22
+
23
+ list(
24
+ input?: ListInputParam,
25
+ headers?: ChargebeeRequestHeader,
26
+ ): Promise<ChargebeeResponse<ListResponse>>;
27
+
28
+ omnichannelTransactionsForOmnichannelSubscription(
29
+ omnichannel_subscription_id: string,
30
+ input?: OmnichannelTransactionsForOmnichannelSubscriptionInputParam,
31
+ headers?: ChargebeeRequestHeader,
32
+ ): Promise<
33
+ ChargebeeResponse<OmnichannelTransactionsForOmnichannelSubscriptionResponse>
34
+ >;
35
+ }
36
+
37
+ export interface RetrieveResponse {
38
+ omnichannel_subscription: OmnichannelSubscription;
39
+ }
40
+
41
+ export interface ListResponse {
42
+ list: { omnichannel_subscription: OmnichannelSubscription }[];
43
+ next_offset?: string;
44
+ }
45
+
46
+ export interface OmnichannelTransactionsForOmnichannelSubscriptionResponse {
47
+ list: { omnichannel_transaction: OmnichannelTransaction }[];
48
+ next_offset?: string;
49
+ }
50
+
51
+ // REQUEST PARAMS
52
+ //---------------
53
+
54
+ export interface ListInputParam {
55
+ limit?: number;
56
+ offset?: string;
57
+ customer_id?: filter.String;
58
+ }
59
+ export interface OmnichannelTransactionsForOmnichannelSubscriptionInputParam {
60
+ limit?: number;
61
+ offset?: string;
62
+ }
63
+ }
64
+ }
@@ -0,0 +1,19 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
3
+
4
+ declare module 'chargebee' {
5
+ export interface OmnichannelSubscriptionItem {
6
+ id: string;
7
+ item_id_at_source: string;
8
+ status: 'active' | 'expired' | 'cancelled';
9
+ current_term_start?: number;
10
+ current_term_end?: number;
11
+ expired_at?: number;
12
+ expiration_reason?: 'billing_error' | 'product_not_available' | 'other';
13
+ cancelled_at?: number;
14
+ cancellation_reason?:
15
+ | 'customer_cancelled'
16
+ | 'customer_did_not_consent_to_price_increase';
17
+ resource_version?: number;
18
+ }
19
+ }
@@ -0,0 +1,17 @@
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
+ resource_version?: number;
16
+ }
17
+ }
@@ -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
- description?: string;
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
  }
@@ -476,6 +476,7 @@ declare module 'chargebee' {
476
476
  expiry_month: number;
477
477
  expiry_year: number;
478
478
  cvv?: string;
479
+ preferred_scheme?: 'cartes_bancaires' | 'mastercard' | 'visa';
479
480
  billing_addr1?: string;
480
481
  billing_addr2?: string;
481
482
  billing_city?: string;
@@ -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,61 @@
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
+ resource_version?: number;
14
+ linked_omnichannel_subscriptions?: RecordedPurchase.LinkedOmnichannelSubscription[];
15
+ error_detail?: RecordedPurchase.ErrorDetail;
16
+ }
17
+
18
+ export namespace RecordedPurchase {
19
+ export class RecordedPurchaseResource {
20
+ create(
21
+ input: CreateInputParam,
22
+ headers?: ChargebeeRequestHeader,
23
+ ): Promise<ChargebeeResponse<CreateResponse>>;
24
+
25
+ retrieve(
26
+ recorded_purchase_id: string,
27
+ headers?: ChargebeeRequestHeader,
28
+ ): Promise<ChargebeeResponse<RetrieveResponse>>;
29
+ }
30
+
31
+ export interface CreateResponse {
32
+ recorded_purchase: RecordedPurchase;
33
+ customer: Customer;
34
+ }
35
+
36
+ export interface RetrieveResponse {
37
+ recorded_purchase: RecordedPurchase;
38
+ }
39
+
40
+ export interface LinkedOmnichannelSubscription {
41
+ omnichannel_subscription_id?: string;
42
+ }
43
+ export interface ErrorDetail {
44
+ error_message?: string;
45
+ }
46
+ // REQUEST PARAMS
47
+ //---------------
48
+
49
+ export interface CreateInputParam {
50
+ app_id: string;
51
+ customer?: CustomerCreateInputParam;
52
+ apple_app_store?: AppleAppStoreCreateInputParam;
53
+ }
54
+ export interface CustomerCreateInputParam {
55
+ id: string;
56
+ }
57
+ export interface AppleAppStoreCreateInputParam {
58
+ transaction_id?: string;
59
+ }
60
+ }
61
+ }
@@ -85,7 +85,6 @@ declare module 'chargebee' {
85
85
  referral_info?: Subscription.ReferralInfo;
86
86
  invoice_notes?: string;
87
87
  meta_data?: any;
88
- metadata?: any;
89
88
  deleted: boolean;
90
89
  changes_scheduled_at?: number;
91
90
  contract_term?: Subscription.ContractTerm;
@@ -1407,6 +1406,7 @@ declare module 'chargebee' {
1407
1406
  expiry_month?: number;
1408
1407
  expiry_year?: number;
1409
1408
  cvv?: string;
1409
+ preferred_scheme?: 'cartes_bancaires' | 'mastercard' | 'visa';
1410
1410
  billing_addr1?: string;
1411
1411
  billing_addr2?: string;
1412
1412
  billing_city?: string;
@@ -1764,6 +1764,7 @@ declare module 'chargebee' {
1764
1764
  expiry_month?: number;
1765
1765
  expiry_year?: number;
1766
1766
  cvv?: string;
1767
+ preferred_scheme?: 'cartes_bancaires' | 'mastercard' | 'visa';
1767
1768
  billing_addr1?: string;
1768
1769
  billing_addr2?: string;
1769
1770
  billing_city?: string;
@@ -1922,6 +1923,7 @@ declare module 'chargebee' {
1922
1923
  expiry_month?: number;
1923
1924
  expiry_year?: number;
1924
1925
  cvv?: string;
1926
+ preferred_scheme?: 'cartes_bancaires' | 'mastercard' | 'visa';
1925
1927
  billing_addr1?: string;
1926
1928
  billing_addr2?: string;
1927
1929
  billing_city?: string;
@@ -2146,6 +2148,7 @@ declare module 'chargebee' {
2146
2148
  expiry_month?: number;
2147
2149
  expiry_year?: number;
2148
2150
  cvv?: string;
2151
+ preferred_scheme?: 'cartes_bancaires' | 'mastercard' | 'visa';
2149
2152
  billing_addr1?: string;
2150
2153
  billing_addr2?: string;
2151
2154
  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: string;
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
  }