chargebee 2.30.0 → 2.32.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 +54 -0
- package/LICENSE +1 -1
- package/lib/chargebee.js +1 -1
- package/lib/resources/api_endpoints.js +16 -0
- package/package.json +1 -1
- package/types/core.d.ts +7 -6
- package/types/index.d.ts +2 -0
- package/types/resources/Card.d.ts +2 -2
- package/types/resources/CreditNote.d.ts +23 -2
- package/types/resources/CreditNoteEstimate.d.ts +2 -2
- package/types/resources/Customer.d.ts +98 -74
- package/types/resources/Entitlement.d.ts +78 -0
- package/types/resources/Event.d.ts +1 -1
- package/types/resources/Export.d.ts +7 -7
- package/types/resources/Feature.d.ts +89 -17
- package/types/resources/Hierarchy.d.ts +5 -5
- package/types/resources/HostedPage.d.ts +7 -0
- package/types/resources/Invoice.d.ts +99 -49
- package/types/resources/InvoiceEstimate.d.ts +26 -20
- package/types/resources/ItemPrice.d.ts +21 -0
- package/types/resources/Order.d.ts +85 -4
- package/types/resources/PaymentSource.d.ts +380 -246
- package/types/resources/Quote.d.ts +46 -25
- package/types/resources/QuoteLineGroup.d.ts +23 -17
- package/types/resources/Subscription.d.ts +29 -17
- package/types/resources/SubscriptionEntitlement.d.ts +1 -1
- package/types/resources/SubscriptionEstimate.d.ts +12 -12
- package/types/resources/ThirdPartyPaymentMethod.d.ts +1 -1
- package/types/resources/Transaction.d.ts +35 -3
- package/types/resources/VirtualBankAccount.d.ts +4 -4
|
@@ -53,7 +53,11 @@ number](https://en.wikipedia.org/wiki/VAT_identification_number) can be overridd
|
|
|
53
53
|
vat_number?:string;
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
|
-
* @description
|
|
56
|
+
* @description When the customer has a [payment_method](customers#customer_payment_method) of `type` `card`, this attribute determines whether to automatically charge the card whenever an invoice [status](invoices#invoice_status) is `payment_due`.
|
|
57
|
+
**Note**
|
|
58
|
+
|
|
59
|
+
This setting can be [overridden](subscriptions#create_subscription_for_items_auto_collection) for individual subscriptions of the customer.
|
|
60
|
+
\* on - Chargebee automatically charges the card for invoices that enter `payment_due` `status`. \* off - Automatic charging is disabled; manual payment is required for due invoices.
|
|
57
61
|
|
|
58
62
|
*/
|
|
59
63
|
|
|
@@ -169,26 +173,33 @@ To know more about what values you need to provide, refer to this [Avalara'
|
|
|
169
173
|
locale?:string;
|
|
170
174
|
|
|
171
175
|
/**
|
|
172
|
-
* @description
|
|
176
|
+
* @description **Note**
|
|
177
|
+
|
|
178
|
+
Applicable only when [Calendar Billing](https://www.chargebee.com/docs/calendar-billing.html) with support for customer-specific billing date is enabled and `billing_date_mode` is `manually_set`.
|
|
179
|
+
Specifies the day of the month for subscription renewals on month-based or year-based plans. Month-based and year-based plans are `item_price` resources where the `item_type` is set to `plan` and `period_unit` is set to `month` and `year` respectively.
|
|
173
180
|
|
|
174
181
|
*/
|
|
175
182
|
|
|
176
183
|
billing_date?:number;
|
|
177
184
|
|
|
178
185
|
/**
|
|
179
|
-
* @description
|
|
186
|
+
* @description **Note**
|
|
180
187
|
|
|
181
|
-
|
|
182
|
-
|
|
188
|
+
Applicable only when [Calendar Billing](https://www.chargebee.com/docs/calendar-billing.htm) with support for customer-specific billing date is enabled and `billing_date_mode` is `manually_set`.
|
|
189
|
+
Specifies the renewal month for subscriptions on year-based plans. Year-based plans are `item_price` resources where `item_type` is set to `plan` and `period_unit` is set to `year`.
|
|
190
|
+
**Example**
|
|
183
191
|
|
|
184
|
-
|
|
192
|
+
The renewal date is 15th July when `billing_date` is `15` and `billing_month` is `7`.
|
|
185
193
|
|
|
186
194
|
*/
|
|
187
195
|
|
|
188
196
|
billing_month?:number;
|
|
189
197
|
|
|
190
198
|
/**
|
|
191
|
-
* @description
|
|
199
|
+
* @description **Note**
|
|
200
|
+
|
|
201
|
+
Applicable only when [Calendar Billing](https://www.chargebee.com/docs/calendar-billing.html) with support for customer-specific billing date is enabled and `billing_date_mode` is `manually_set`.
|
|
202
|
+
Indicates whether this customer's `billing_date` and `billing_month` values can be changed via the [Change billing date API](customers#change_billing_date). \* manually_set - `billing_date` and `billing_month` can be adjusted via API. \* using_defaults - `billing_date` and `billing_month` are fixed as per Chargebee [site settings](https://www.chargebee.com/docs/2.0/calendar-billing-config.html#configuring-calendar-billing_configuring-site-wide-billing) and not modifiable via API.
|
|
192
203
|
|
|
193
204
|
*/
|
|
194
205
|
|
|
@@ -232,6 +243,18 @@ In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](m
|
|
|
232
243
|
|
|
233
244
|
channel?:Channel;
|
|
234
245
|
|
|
246
|
+
/**
|
|
247
|
+
* @description This attribute represents the identifier of the most recent version of the [customers](/docs/api/customers) resource. When interacting with our API, the `active_id` ensures you're always referencing the current and most up-to-date version of the [customers](/docs/api/customers) resource. This mechanism is in place to maintain consistent external references and data integrity across business entity changes and updates. `active_id` is present on the resource after the resource is transferred to the destination business entity and it will refer to the most recent version of the resource. Learn more about the [customer transfer feature](https://www.chargebee.com/docs/2.0/mbe-customer-transfer-overview.html) and [setup](https://www.chargebee.com/docs/2.0/mbe-getting-started-with-customer-transfer.html).
|
|
248
|
+
**Note:**
|
|
249
|
+
|
|
250
|
+
* If `active_id` and `id` of the customer are the same, then it is the most recent version of the resource.
|
|
251
|
+
* If `active_id` and `id` of the customer are different, then it is a transferred resource.
|
|
252
|
+
* If `active_id` is not present, then the resource is not transferred and there are no business entity-related changes.
|
|
253
|
+
|
|
254
|
+
*/
|
|
255
|
+
|
|
256
|
+
active_id?:string;
|
|
257
|
+
|
|
235
258
|
/**
|
|
236
259
|
* @description Indicates whether or not the customer has been identified as fraudulent. \* suspicious - The customer has been identified as potentially fraudulent by the gateway \* safe - The customer has been marked as safe \* fraudulent - The customer has been marked as fraudulent
|
|
237
260
|
|
|
@@ -240,21 +263,21 @@ In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](m
|
|
|
240
263
|
fraud_flag?:'safe' | 'suspicious' | 'fraudulent';
|
|
241
264
|
|
|
242
265
|
/**
|
|
243
|
-
* @description
|
|
266
|
+
* @description The [identifier](payment_sources#payment_source_id) of the customer's [primary payment source](https://www.chargebee.com/docs/2.0/payment-method-overview.html#primary-and-backup-payment-methods)
|
|
244
267
|
|
|
245
268
|
*/
|
|
246
269
|
|
|
247
270
|
primary_payment_source_id?:string;
|
|
248
271
|
|
|
249
272
|
/**
|
|
250
|
-
* @description
|
|
273
|
+
* @description The [identifier](payment_sources#payment_source_id) of the customer's [backup payment source](https://www.chargebee.com/docs/2.0/payment-method-overview.html#primary-and-backup-payment-methods).
|
|
251
274
|
|
|
252
275
|
*/
|
|
253
276
|
|
|
254
277
|
backup_payment_source_id?:string;
|
|
255
278
|
|
|
256
279
|
/**
|
|
257
|
-
* @description A
|
|
280
|
+
* @description A note for the customer that appears on all their invoice PDFs. This is one of [several notes](https://apidocs.chargebee.com/docs/api/invoices#invoice_notes) displayed on the invoice PDF.
|
|
258
281
|
|
|
259
282
|
*/
|
|
260
283
|
|
|
@@ -268,14 +291,17 @@ In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](m
|
|
|
268
291
|
business_entity_id?:string;
|
|
269
292
|
|
|
270
293
|
/**
|
|
271
|
-
* @description
|
|
294
|
+
* @description **Note**
|
|
295
|
+
|
|
296
|
+
Applicable only when the [Multi-Currency](https://www.chargebee.com/docs/2.0/multi-currency-pricing.html) feature is enabled.
|
|
297
|
+
Specifies the customer's preferred currency in [ISO 4217](https://www.chargebee.com/docs/supported-currencies.html) format.
|
|
272
298
|
|
|
273
299
|
*/
|
|
274
300
|
|
|
275
301
|
preferred_currency_code?:string;
|
|
276
302
|
|
|
277
303
|
/**
|
|
278
|
-
* @description
|
|
304
|
+
* @description The balance of [promotional credits](promotional_credits) available to the customer.
|
|
279
305
|
|
|
280
306
|
*/
|
|
281
307
|
|
|
@@ -346,7 +372,10 @@ Any invoices raised when a subscription activates from `in_trial` or &
|
|
|
346
372
|
consolidated_invoicing?:boolean;
|
|
347
373
|
|
|
348
374
|
/**
|
|
349
|
-
* @description
|
|
375
|
+
* @description **Note**
|
|
376
|
+
|
|
377
|
+
Applicable only when the [Chargebee's AvaTax for Communications integration](https://www.chargebee.com/docs/avatax-for-communication.html) is enabled.
|
|
378
|
+
Indicates the [Avalara customer type](https://developer.avalara.com/communications-integration/design-considerations/customer-type/). \* industrial - The customer is an industrial business. \* residential - The customer is an individual user. \* senior_citizen - The customer is an individual that meets the jurisdiction requirements to be considered a senior citizen and qualifies for tax breaks. \* business - The customer represents a business.
|
|
350
379
|
|
|
351
380
|
*/
|
|
352
381
|
|
|
@@ -360,7 +389,10 @@ Any invoices raised when a subscription activates from `in_trial` or &
|
|
|
360
389
|
business_customer_without_vat_number?:boolean;
|
|
361
390
|
|
|
362
391
|
/**
|
|
363
|
-
* @description
|
|
392
|
+
* @description **Note**
|
|
393
|
+
|
|
394
|
+
Applicable only when the [Chargebee's AvaTax for Communications integration](https://www.chargebee.com/docs/avatax-for-communication.html) is enabled.
|
|
395
|
+
The [Avalara client profile ID](https://developer.avalara.com/communications/dev-guide_rest_v2/customizing-transactions/client-profiles/) assigned to the customer.
|
|
364
396
|
|
|
365
397
|
*/
|
|
366
398
|
|
|
@@ -454,22 +486,22 @@ If there are additional entity identifiers for the customer not associated with
|
|
|
454
486
|
entity_identifiers?:Customer.EntityIdentifier[];
|
|
455
487
|
|
|
456
488
|
/**
|
|
457
|
-
* @description The [
|
|
489
|
+
* @description The [account hierarchy](https://www.chargebee.com/docs/account-hierarchy.html) relationship that the customer is part of.
|
|
458
490
|
|
|
459
491
|
*/
|
|
460
492
|
|
|
461
493
|
relationship?:Customer.Relationship;
|
|
462
494
|
|
|
463
495
|
/**
|
|
464
|
-
* @description
|
|
465
|
-
**Note:** the 'parent' is the customer whose id is [payment_owner_id](
|
|
496
|
+
* @description When the customer is part of an [account hierarchy](https://www.chargebee.com/docs/account-hierarchy.html), this attribute defines the level of access that the parent account has to the customer's information.
|
|
497
|
+
**Note:** the 'parent' is the customer whose id is [payment_owner_id](customers#customer_relationship_payment_owner_id). However, if the `payment_owner_id` is the customer itself, then the parent is [parent_id](customers#customer_relationship_parent_id).
|
|
466
498
|
|
|
467
499
|
*/
|
|
468
500
|
|
|
469
501
|
parent_account_access?:Customer.ParentAccountAccess;
|
|
470
502
|
|
|
471
503
|
/**
|
|
472
|
-
* @description
|
|
504
|
+
* @description When the customer is part of an [account hierarchy](https://www.chargebee.com/docs/account-hierarchy.html), this attribute defines the level of access that the customer has to its own information.
|
|
473
505
|
|
|
474
506
|
*/
|
|
475
507
|
|
|
@@ -624,7 +656,7 @@ During this operation, if `billing_address` and `vat_number`
|
|
|
624
656
|
|
|
625
657
|
*/
|
|
626
658
|
|
|
627
|
-
record_excess_payment(customer_id:string, input
|
|
659
|
+
record_excess_payment(customer_id:string, input:RecordExcessPaymentInputParam):ChargebeeRequest<RecordExcessPaymentResponse>;
|
|
628
660
|
|
|
629
661
|
/**
|
|
630
662
|
* @description **Note:** This operation optionally supports 3DS verification flow. To achieve the same, create the [Payment Intent](/docs/api/#3ds_card_payments) and pass it as input parameter to this API.
|
|
@@ -675,43 +707,44 @@ This API can be used to collect the payments for customer's **payment_due**
|
|
|
675
707
|
clear_personal_data(customer_id:string):ChargebeeRequest<ClearPersonalDataResponse>;
|
|
676
708
|
|
|
677
709
|
/**
|
|
678
|
-
* @description
|
|
710
|
+
* @description Establish a [hierarchical relationship](https://www.chargebee.com/docs/account-hierarchy.html) between customers. The path parameter `customer_id` identifies the child in this relationship.
|
|
711
|
+
**Prerequisite**
|
|
712
|
+
|
|
713
|
+
Both parent and child customers must be part of the same [business entity](advanced-features#mbe).
|
|
714
|
+
**Note**
|
|
715
|
+
|
|
716
|
+
* A customer can have a maximum of 250 direct children.
|
|
717
|
+
* The hierarchy allows a maximum of 5 levels from the root node to the lowest child node.
|
|
679
718
|
**Note**
|
|
680
719
|
|
|
681
|
-
|
|
682
|
-
* The parent and the child customers must belong to the same [business entity](/docs/api?prod_cat_ver=2#mbe).
|
|
720
|
+
For the `use_default_hierarchy_settings`, `parent_account_access`, and `child_account_access` parameters below, the term "parent" usually refers to the customer with the ID [payment_owner_id](customers#link_a_customer_payment_owner_id). However, if the `payment_owner_id` is the same as the child's ID (`{customer_id}`), the "parent" is identified by [parent_id](customers#link_a_customer_parent_id).
|
|
683
721
|
|
|
684
722
|
*/
|
|
685
723
|
|
|
686
724
|
relationships(customer_id:string, input?:RelationshipsInputParam):ChargebeeRequest<RelationshipsResponse>;
|
|
687
725
|
|
|
688
726
|
/**
|
|
689
|
-
* @description
|
|
727
|
+
* @description When a customer belongs to an [account hierarchy](https://www.chargebee.com/docs/2.0/account-hierarchy.html), this operation detaches the customer from its parent. The hierarchy, if any, beneath the customer remains unchanged.
|
|
690
728
|
|
|
691
729
|
*/
|
|
692
730
|
|
|
693
731
|
delete_relationship(customer_id:string):ChargebeeRequest<DeleteRelationshipResponse>;
|
|
694
732
|
|
|
695
733
|
/**
|
|
696
|
-
* @description Retrieves the [account hierarchy
|
|
734
|
+
* @description Retrieves the full or partial [account hierarchy](/docs/api/hierarchies) for a customer.
|
|
697
735
|
|
|
698
736
|
*/
|
|
699
737
|
|
|
700
738
|
hierarchy(customer_id:string, input:HierarchyInputParam):ChargebeeRequest<HierarchyResponse>;
|
|
701
739
|
|
|
702
740
|
/**
|
|
703
|
-
* @description
|
|
704
|
-
|
|
705
|
-
This data falls into two categories:
|
|
706
|
-
|
|
707
|
-
* **Self-Serve Portal data:** subscriptions and invoices of the child.
|
|
708
|
-
* **Email Notifications:** subscription-, invoice- and payment-related notifications for the child.
|
|
709
|
-
|
|
710
|
-
The 'parent' is the customer whose id is [payment_owner_id](/docs/api/customers#customer_relationship_payment_owner_id). However, if the `payment_owner_id` is the child itself, then the parent is [parent_id](/docs/api/customers#customer_relationship_parent_id). The path parameter `customer_id` is the [id](/docs/api/customers#customer_id) of the child in the relationship.
|
|
711
|
-
|
|
741
|
+
* @description When the customer is part of an [account hierarchy](https://www.chargebee.com/docs/account-hierarchy.html), this operation updates the access privileges that both the customer and its parent have to the customer's data.
|
|
742
|
+
**Terminology**
|
|
712
743
|
|
|
744
|
+
The term "parent" usually refers to the customer with the ID [payment_owner_id](customers#customer_relationship_payment_owner_id). However, if the `payment_owner_id` is the same as the child's ID (given by the path parameter), the "parent" is identified by [parent_id](customers#customer_relationship_parent_id).
|
|
745
|
+
**Tip**
|
|
713
746
|
|
|
714
|
-
|
|
747
|
+
You cannot use this endpoint to change the `parent_id`, `invoice_owner_id` or `payment_owner_id` for the customer. To change them, [unlink the customer](customers#delink_a_customer) and then call [Link a customer](customers?prod_cat_ver=2#link_a_customer) with the updated values.
|
|
715
748
|
|
|
716
749
|
*/
|
|
717
750
|
|
|
@@ -1152,7 +1185,7 @@ An alternative way of passing this parameter is by means of a [custom HTTP heade
|
|
|
1152
1185
|
|
|
1153
1186
|
*/
|
|
1154
1187
|
|
|
1155
|
-
offline_payment_method?:{in?:string,is?:'bank_transfer' | '
|
|
1188
|
+
offline_payment_method?:{in?:string,is?:'eu_automated_bank_transfer' | 'bank_transfer' | 'mx_automated_bank_transfer' | 'custom' | 'ach_credit' | 'boleto' | 'check' | 'uk_automated_bank_transfer' | 'no_preference' | 'us_automated_bank_transfer' | 'jp_automated_bank_transfer' | 'sepa_credit' | 'cash',is_not?:'eu_automated_bank_transfer' | 'bank_transfer' | 'mx_automated_bank_transfer' | 'custom' | 'ach_credit' | 'boleto' | 'check' | 'uk_automated_bank_transfer' | 'no_preference' | 'us_automated_bank_transfer' | 'jp_automated_bank_transfer' | 'sepa_credit' | 'cash',not_in?:string};
|
|
1156
1189
|
|
|
1157
1190
|
/**
|
|
1158
1191
|
* @description Retrieves a list of customers added to your Chargebee site. The list contains the necessary customer details such as First Name, Last Name and the Customer ID.
|
|
@@ -1378,7 +1411,7 @@ Any invoices raised when a subscription activates from `in_trial` or &
|
|
|
1378
1411
|
|
|
1379
1412
|
*/
|
|
1380
1413
|
|
|
1381
|
-
payment_method
|
|
1414
|
+
payment_method:{additional_information?:object,gateway_account_id?:string,issuing_country?:string,reference_id?:string,tmp_token?:string,type:Type};
|
|
1382
1415
|
}
|
|
1383
1416
|
export interface UpdateBillingInfoResponse {
|
|
1384
1417
|
customer:Customer;
|
|
@@ -1591,7 +1624,7 @@ It is possible to set a value for this flag even when E-Invoicing is disabled. H
|
|
|
1591
1624
|
|
|
1592
1625
|
*/
|
|
1593
1626
|
|
|
1594
|
-
transaction
|
|
1627
|
+
transaction:{amount:number,currency_code?:string,custom_payment_method_id?:string,date:number,payment_method:PaymentMethod,reference_number?:string};
|
|
1595
1628
|
}
|
|
1596
1629
|
export interface CollectPaymentResponse {
|
|
1597
1630
|
customer:Customer;
|
|
@@ -1777,53 +1810,45 @@ Applicable when [Calendar Billing](https://www.chargebee.com/docs/calendar-billi
|
|
|
1777
1810
|
export interface RelationshipsInputParam {
|
|
1778
1811
|
|
|
1779
1812
|
/**
|
|
1780
|
-
* @description
|
|
1813
|
+
* @description ID of the customer intended to be set as the immediate parent of the customer identified by `customer_id`.
|
|
1781
1814
|
|
|
1782
1815
|
*/
|
|
1783
1816
|
|
|
1784
1817
|
parent_id?:string;
|
|
1785
1818
|
|
|
1786
1819
|
/**
|
|
1787
|
-
* @description The `id` of the customer
|
|
1820
|
+
* @description The `id` of the customer responsible for paying the invoices for the customer identified by `customer_id`. This ID must match either `customer_id` or `invoice_owner_id`.
|
|
1788
1821
|
|
|
1789
1822
|
*/
|
|
1790
1823
|
|
|
1791
1824
|
payment_owner_id?:string;
|
|
1792
1825
|
|
|
1793
1826
|
/**
|
|
1794
|
-
* @description The `id` of the customer who
|
|
1827
|
+
* @description The `id` of the customer who receives the invoice for charges incurred by the customer identified by `customer_id`. This ID must match either `customer_id` or one of its ancestors.
|
|
1795
1828
|
|
|
1796
1829
|
*/
|
|
1797
1830
|
|
|
1798
1831
|
invoice_owner_id?:string;
|
|
1799
1832
|
|
|
1800
1833
|
/**
|
|
1801
|
-
* @description
|
|
1834
|
+
* @description Decides if Chargebee should apply settings from the [Chargebee Billing UI](https://www.chargebee.com/docs/2.0/account-hierarchy.html#advanced-mode) or from this API request.
|
|
1802
1835
|
|
|
1803
|
-
*
|
|
1804
|
-
*
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
**Usage:**
|
|
1809
|
-
|
|
1810
|
-
* Value set to `true`: Applies the global access levels defined in the Account Hierarchy settings to this child. These global settings are configured in the admin console
|
|
1811
|
-
* Value set to `false`: Customizes the access levels for this customer. Pass the `parent_account_access` and `child_account_access` parameters to specify the settings. If you skip passing any parameters, the global settings are applied for them.
|
|
1812
|
-
.
|
|
1836
|
+
* If set to `true`: Chargebee uses settings configured in the Chargebee Billing UI.
|
|
1837
|
+
* If set to `false`: Settings provided in the `parent_account_access` and `child_account_access` parameters are applied.
|
|
1813
1838
|
|
|
1814
1839
|
*/
|
|
1815
1840
|
|
|
1816
1841
|
use_default_hierarchy_settings?:boolean;
|
|
1817
1842
|
|
|
1818
1843
|
/**
|
|
1819
|
-
* @description
|
|
1844
|
+
* @description Settings for the parent account's access.
|
|
1820
1845
|
|
|
1821
1846
|
*/
|
|
1822
1847
|
|
|
1823
1848
|
parent_account_access?:{portal_download_child_invoices?:'no' | 'yes' | 'view_only',portal_edit_child_subscriptions?:'no' | 'yes' | 'view_only',send_invoice_emails?:boolean,send_payment_emails?:boolean,send_subscription_emails?:boolean};
|
|
1824
1849
|
|
|
1825
1850
|
/**
|
|
1826
|
-
* @description
|
|
1851
|
+
* @description Settings for the child account's access.
|
|
1827
1852
|
|
|
1828
1853
|
*/
|
|
1829
1854
|
|
|
@@ -1839,7 +1864,7 @@ Applicable when [Calendar Billing](https://www.chargebee.com/docs/calendar-billi
|
|
|
1839
1864
|
export interface HierarchyInputParam {
|
|
1840
1865
|
|
|
1841
1866
|
/**
|
|
1842
|
-
* @description Retrieves the [account hierarchy
|
|
1867
|
+
* @description Retrieves the full or partial [account hierarchy](/docs/api/hierarchies) for a customer.
|
|
1843
1868
|
|
|
1844
1869
|
*/
|
|
1845
1870
|
|
|
@@ -1851,11 +1876,10 @@ Applicable when [Calendar Billing](https://www.chargebee.com/docs/calendar-billi
|
|
|
1851
1876
|
export interface UpdateHierarchySettingsInputParam {
|
|
1852
1877
|
|
|
1853
1878
|
/**
|
|
1854
|
-
* @description
|
|
1879
|
+
* @description Decides if Chargebee should apply settings from the [Chargebee Billing UI](https://www.chargebee.com/docs/2.0/account-hierarchy.html#advanced-mode) or from this API request.
|
|
1855
1880
|
|
|
1856
|
-
*
|
|
1857
|
-
*
|
|
1858
|
-
.
|
|
1881
|
+
* If set to `true`: Chargebee removes existing settings stored in the `parent_account_access` and `child_account_access` attributes of the customer. The settings configured in the Chargebee Billing UI apply for the customer.
|
|
1882
|
+
* If set to `false`: Chargebee replaces existing settings stored in the `parent_account_access` and `child_account_access` parameters with those passed in this API call. If any of those parameters are not passed, they remain unchanged for the customer.
|
|
1859
1883
|
|
|
1860
1884
|
*/
|
|
1861
1885
|
|
|
@@ -1869,7 +1893,7 @@ Applicable when [Calendar Billing](https://www.chargebee.com/docs/calendar-billi
|
|
|
1869
1893
|
parent_account_access?:{portal_download_child_invoices?:'no' | 'yes' | 'view_only',portal_edit_child_subscriptions?:'no' | 'yes' | 'view_only',send_invoice_emails?:boolean,send_payment_emails?:boolean,send_subscription_emails?:boolean};
|
|
1870
1894
|
|
|
1871
1895
|
/**
|
|
1872
|
-
* @description
|
|
1896
|
+
* @description When the customer is part of an [account hierarchy](https://www.chargebee.com/docs/account-hierarchy.html), this attribute defines the level of access that the customer has to its own information.
|
|
1873
1897
|
|
|
1874
1898
|
*/
|
|
1875
1899
|
|
|
@@ -2104,14 +2128,14 @@ If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021
|
|
|
2104
2128
|
}
|
|
2105
2129
|
export interface PaymentMethod {
|
|
2106
2130
|
/**
|
|
2107
|
-
* @description Type of payment source \* google_pay - Payments made via Google Pay. \* sofort - Payments made via Sofort. \* netbanking_emandates - Netbanking (eMandates) Payments. \* apple_pay - Payments made via Apple Pay. \* unionpay - Payments made via UnionPay. \* giropay - Payments made via giropay. \* direct_debit - Represents bank account for which the direct debit or ACH agreement/mandate is created. \* bancontact - Payments made via Bancontact Card. \* upi - UPI Payments. \* alipay - Payments made via Alipay. \* wechat_pay - Payments made via WeChat Pay. \* dotpay - Payments made via Dotpay. \* paypal_express_checkout - Payments made via PayPal Express Checkout. \* ideal - Payments made via iDEAL. \* generic - Payments made via Generic Payment Method. \* amazon_payments - Payments made via Amazon Payments. \* card - Card based payment including credit cards and debit cards. Details about the card can be obtained from the card resource.
|
|
2131
|
+
* @description Type of payment source \* google_pay - Payments made via Google Pay. \* sofort - Payments made via Sofort. \* netbanking_emandates - Netbanking (eMandates) Payments. \* apple_pay - Payments made via Apple Pay. \* unionpay - Payments made via UnionPay. \* giropay - Payments made via giropay. \* direct_debit - Represents bank account for which the direct debit or ACH agreement/mandate is created. \* bancontact - Payments made via Bancontact Card. \* upi - UPI Payments. \* alipay - Payments made via Alipay. \* pay_to - Payments made via PayTo \* wechat_pay - Payments made via WeChat Pay. \* sepa_instant_transfer - Payments made via Sepa Instant Transfer \* dotpay - Payments made via Dotpay. \* paypal_express_checkout - Payments made via PayPal Express Checkout. \* ideal - Payments made via iDEAL. \* generic - Payments made via Generic Payment Method. \* faster_payments - Payments made via Faster Payments \* venmo - Payments made via Venmo \* amazon_payments - Payments made via Amazon Payments. \* card - Card based payment including credit cards and debit cards. Details about the card can be obtained from the card resource.
|
|
2108
2132
|
|
|
2109
2133
|
*/
|
|
2110
2134
|
|
|
2111
2135
|
type:Type;
|
|
2112
2136
|
|
|
2113
2137
|
/**
|
|
2114
|
-
* @description Name of the gateway the payment method is associated with. \* ecentric - Ecentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities. \* paypal_payflow_pro - PayPal Payflow Pro is a payment gateway. \* sage_pay - Sage Pay is a payment gateway. \* wepay - WePay is a payment gateway. \* wirecard - WireCard Account is a payment service provider. \* migs - MasterCard Internet Gateway Service payment gateway. \* beanstream - Bambora(formerly known as Beanstream) is a payment gateway. \* adyen - Adyen is a payment gateway. \* razorpay - Razorpay is a fast growing payment service provider in India working with all leading banks and support for major local payment methods including Netbanking, UPI etc. \* braintree - Braintree is a payment gateway. \* nmi - NMI is a payment gateway. \* chargebee_payments - Chargebee Payments gateway \* bluepay - BluePay is a payment gateway. \* paypal - PayPal Commerce is a payment gateway. \* bank_of_america - Bank of America is a payment gateway. \* paypal_pro - PayPal Pro Account is a payment gateway. \* eway_rapid - eWAY Rapid is a payment gateway. \* windcave - Windcave provides an end to end payment processing solution in ANZ and other leading global markets. \* moneris_us - Moneris USA is a payment gateway. \* exact - Exact Payments is a payment gateway. \* paypal_express_checkout - PayPal Express Checkout is a payment gateway. \* tco - 2Checkout is a payment gateway. \* chargebee - Chargebee test gateway. \* stripe - Stripe is a payment gateway. \* eway - eWAY Account is a payment gateway. \* authorize_net - Authorize.net is a payment gateway \* moneris - Moneris is a payment gateway. \* worldpay - WorldPay is a payment gateway \* pin - Pin is a payment gateway \* gocardless - GoCardless is a payment service provider. \* elavon - Elavon Virtual Merchant is a payment solution. \* cybersource - CyberSource is a payment gateway. \* vantiv - Vantiv is a payment gateway. \* amazon_payments - Amazon Payments is a payment service provider. \* global_payments - Global Payments is a payment service provider. \* first_data_global - First Data Global Gateway Virtual Terminal Account \* orbital - Chase Paymentech(Orbital) is a payment gateway. \* checkout_com - Checkout.com is a payment gateway. \* quickbooks - Intuit QuickBooks Payments gateway \* mollie - Mollie is a payment gateway. \* bluesnap - BlueSnap is a payment gateway. \* paymill - PAYMILL is a payment gateway. \* ogone - Ingenico ePayments (formerly known as Ogone) is a payment gateway. \* not_applicable - Indicates that payment gateway is not applicable for this resource. \* hdfc - HDFC Account is a payment gateway. \* balanced_payments - Balanced is a payment gateway \* ingenico_direct - Worldline Online Payments is a payment gateway. \* metrics_global - Metrics global is a leading payment service provider providing unified payment services in the US.
|
|
2138
|
+
* @description Name of the gateway the payment method is associated with. \* ecentric - Ecentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities. \* paypal_payflow_pro - PayPal Payflow Pro is a payment gateway. \* sage_pay - Sage Pay is a payment gateway. \* wepay - WePay is a payment gateway. \* wirecard - WireCard Account is a payment service provider. \* migs - MasterCard Internet Gateway Service payment gateway. \* ebanx - EBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion. \* beanstream - Bambora(formerly known as Beanstream) is a payment gateway. \* adyen - Adyen is a payment gateway. \* razorpay - Razorpay is a fast growing payment service provider in India working with all leading banks and support for major local payment methods including Netbanking, UPI etc. \* braintree - Braintree is a payment gateway. \* nmi - NMI is a payment gateway. \* chargebee_payments - Chargebee Payments gateway \* bluepay - BluePay is a payment gateway. \* paypal - PayPal Commerce is a payment gateway. \* bank_of_america - Bank of America is a payment gateway. \* paypal_pro - PayPal Pro Account is a payment gateway. \* eway_rapid - eWAY Rapid is a payment gateway. \* windcave - Windcave provides an end to end payment processing solution in ANZ and other leading global markets. \* moneris_us - Moneris USA is a payment gateway. \* exact - Exact Payments is a payment gateway. \* paypal_express_checkout - PayPal Express Checkout is a payment gateway. \* tco - 2Checkout is a payment gateway. \* pay_com - Pay.com provides payment services focused on simplicity and hassle-free operations for businesses of all sizes. \* chargebee - Chargebee test gateway. \* stripe - Stripe is a payment gateway. \* eway - eWAY Account is a payment gateway. \* authorize_net - Authorize.net is a payment gateway \* moneris - Moneris is a payment gateway. \* worldpay - WorldPay is a payment gateway \* pin - Pin is a payment gateway \* gocardless - GoCardless is a payment service provider. \* elavon - Elavon Virtual Merchant is a payment solution. \* cybersource - CyberSource is a payment gateway. \* vantiv - Vantiv is a payment gateway. \* amazon_payments - Amazon Payments is a payment service provider. \* global_payments - Global Payments is a payment service provider. \* first_data_global - First Data Global Gateway Virtual Terminal Account \* orbital - Chase Paymentech(Orbital) is a payment gateway. \* checkout_com - Checkout.com is a payment gateway. \* quickbooks - Intuit QuickBooks Payments gateway \* mollie - Mollie is a payment gateway. \* bluesnap - BlueSnap is a payment gateway. \* paymill - PAYMILL is a payment gateway. \* ogone - Ingenico ePayments (formerly known as Ogone) is a payment gateway. \* not_applicable - Indicates that payment gateway is not applicable for this resource. \* hdfc - HDFC Account is a payment gateway. \* balanced_payments - Balanced is a payment gateway \* ingenico_direct - Worldline Online Payments is a payment gateway. \* metrics_global - Metrics global is a leading payment service provider providing unified payment services in the US.
|
|
2115
2139
|
|
|
2116
2140
|
*/
|
|
2117
2141
|
|
|
@@ -2218,21 +2242,21 @@ If there is only one entity identifier for the customer and the value is the sam
|
|
|
2218
2242
|
}
|
|
2219
2243
|
export interface Relationship {
|
|
2220
2244
|
/**
|
|
2221
|
-
* @description The `id` of the customer
|
|
2245
|
+
* @description The `id` of the immediate parent of this customer under account hierarchy. If the customer is the root of the hierarchy, this attribute isn't returned.
|
|
2222
2246
|
|
|
2223
2247
|
*/
|
|
2224
2248
|
|
|
2225
2249
|
parent_id?:string;
|
|
2226
2250
|
|
|
2227
2251
|
/**
|
|
2228
|
-
* @description The `id` of the customer
|
|
2252
|
+
* @description The `id` of the customer responsible for paying the invoices for this customer. This ID must match either this customer's ID or the `invoice_owner_id`.
|
|
2229
2253
|
|
|
2230
2254
|
*/
|
|
2231
2255
|
|
|
2232
2256
|
payment_owner_id:string;
|
|
2233
2257
|
|
|
2234
2258
|
/**
|
|
2235
|
-
* @description The `id` of the customer who
|
|
2259
|
+
* @description The `id` of the customer who receives the invoice for charges incurred by the customer. This ID must match either this customer or one of its ancestors.
|
|
2236
2260
|
|
|
2237
2261
|
*/
|
|
2238
2262
|
|
|
@@ -2240,35 +2264,35 @@ If there is only one entity identifier for the customer and the value is the sam
|
|
|
2240
2264
|
}
|
|
2241
2265
|
export interface ParentAccountAccess {
|
|
2242
2266
|
/**
|
|
2243
|
-
* @description
|
|
2267
|
+
* @description Determines the parent's access to the child's subscriptions in the Self-Serve Portal. \* no - The parent can't view or edit the child's subscriptions. \* view_only - The parent can only view the child's subscriptions. \* yes - The parent can view and edit the child's subscriptions.
|
|
2244
2268
|
|
|
2245
2269
|
*/
|
|
2246
2270
|
|
|
2247
2271
|
portal_edit_child_subscriptions?:'no' | 'yes' | 'view_only';
|
|
2248
2272
|
|
|
2249
2273
|
/**
|
|
2250
|
-
* @description
|
|
2274
|
+
* @description Determines the parent's access to the child's invoices in the Self-Serve Portal. \* no - The parent can't view or download the child's invoices. \* yes - The parent can both view and download the child's invoices. \* view_only - The parent can view but not download the child's invoices.
|
|
2251
2275
|
|
|
2252
2276
|
*/
|
|
2253
2277
|
|
|
2254
2278
|
portal_download_child_invoices?:'no' | 'yes' | 'view_only';
|
|
2255
2279
|
|
|
2256
2280
|
/**
|
|
2257
|
-
* @description
|
|
2281
|
+
* @description Determines whether the parent receives email notifications for the child's subscriptions.
|
|
2258
2282
|
|
|
2259
2283
|
*/
|
|
2260
2284
|
|
|
2261
2285
|
send_subscription_emails:boolean;
|
|
2262
2286
|
|
|
2263
2287
|
/**
|
|
2264
|
-
* @description
|
|
2288
|
+
* @description Determines whether the parent receives email notifications for the child's invoices.
|
|
2265
2289
|
|
|
2266
2290
|
*/
|
|
2267
2291
|
|
|
2268
2292
|
send_invoice_emails:boolean;
|
|
2269
2293
|
|
|
2270
2294
|
/**
|
|
2271
|
-
* @description
|
|
2295
|
+
* @description Determines whether, the parent receives email notifications for payment-related activities on the child's invoices.
|
|
2272
2296
|
|
|
2273
2297
|
*/
|
|
2274
2298
|
|
|
@@ -2276,35 +2300,35 @@ If there is only one entity identifier for the customer and the value is the sam
|
|
|
2276
2300
|
}
|
|
2277
2301
|
export interface ChildAccountAccess {
|
|
2278
2302
|
/**
|
|
2279
|
-
* @description
|
|
2303
|
+
* @description Determines the child's access to its own subscriptions in the Self-Serve Portal. \* yes - The child account can view and edit its subscriptions. \* view_only - The child account can only view its subscriptions.
|
|
2280
2304
|
|
|
2281
2305
|
*/
|
|
2282
2306
|
|
|
2283
2307
|
portal_edit_subscriptions?:'yes' | 'view_only';
|
|
2284
2308
|
|
|
2285
2309
|
/**
|
|
2286
|
-
* @description
|
|
2310
|
+
* @description Determines the child's access to its own invoices in the Self-Serve Portal. \* view_only - The child account can view but not download its invoices. \* yes - The child account can both view and download its invoices. \* no - The child account cannot view or download its own invoices.
|
|
2287
2311
|
|
|
2288
2312
|
*/
|
|
2289
2313
|
|
|
2290
2314
|
portal_download_invoices?:'no' | 'yes' | 'view_only';
|
|
2291
2315
|
|
|
2292
2316
|
/**
|
|
2293
|
-
* @description
|
|
2317
|
+
* @description Determines whether the child account receives email notifications for its subscriptions.
|
|
2294
2318
|
|
|
2295
2319
|
*/
|
|
2296
2320
|
|
|
2297
2321
|
send_subscription_emails:boolean;
|
|
2298
2322
|
|
|
2299
2323
|
/**
|
|
2300
|
-
* @description
|
|
2324
|
+
* @description Determines whether the child account receives email notifications for its invoices.
|
|
2301
2325
|
|
|
2302
2326
|
*/
|
|
2303
2327
|
|
|
2304
2328
|
send_invoice_emails:boolean;
|
|
2305
2329
|
|
|
2306
2330
|
/**
|
|
2307
|
-
* @description
|
|
2331
|
+
* @description Determines whether the child account receives email notifications for payment-related activities for its invoices.
|
|
2308
2332
|
|
|
2309
2333
|
*/
|
|
2310
2334
|
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
declare module 'chargebee' {
|
|
3
|
+
export interface Entitlement {
|
|
4
|
+
|
|
5
|
+
id:string;
|
|
6
|
+
|
|
7
|
+
entity_id?:string;
|
|
8
|
+
|
|
9
|
+
entity_type?:'charge' | 'addon' | 'addon_price' | 'plan_price' | 'plan';
|
|
10
|
+
|
|
11
|
+
feature_id?:string;
|
|
12
|
+
|
|
13
|
+
feature_name?:string;
|
|
14
|
+
|
|
15
|
+
value?:string;
|
|
16
|
+
|
|
17
|
+
name?:string;
|
|
18
|
+
}
|
|
19
|
+
export namespace Entitlement {
|
|
20
|
+
export class EntitlementResource {
|
|
21
|
+
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
22
|
+
|
|
23
|
+
create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
|
|
24
|
+
}
|
|
25
|
+
export interface ListResponse {
|
|
26
|
+
list:{entitlement:Entitlement}[];
|
|
27
|
+
|
|
28
|
+
next_offset?:string;
|
|
29
|
+
}
|
|
30
|
+
export interface ListInputParam {
|
|
31
|
+
[key : string]: any;
|
|
32
|
+
/**
|
|
33
|
+
* @description The number of resources to be returned.
|
|
34
|
+
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
limit?:number;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @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.
|
|
41
|
+
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
offset?:string;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @description The `id` of the feature towards which this entitlement has been granted.
|
|
48
|
+
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
feature_id?:{in?:string,is?:string};
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @description The `type` of the `entity` to which this entitlement belongs.
|
|
55
|
+
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
entity_type?:{in?:string,is?:'charge' | 'addon' | 'addon_price' | 'plan_price' | 'plan'};
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @description The `id` of the `entity` to which this entitlement belongs.
|
|
62
|
+
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
entity_id?:{in?:string,is?:string};
|
|
66
|
+
}
|
|
67
|
+
export interface CreateResponse {
|
|
68
|
+
entitlement:Entitlement;
|
|
69
|
+
}
|
|
70
|
+
export interface CreateInputParam {
|
|
71
|
+
|
|
72
|
+
action:Action;
|
|
73
|
+
|
|
74
|
+
entitlements:{entity_id:string,entity_type?:'charge' | 'addon' | 'addon_price' | 'plan_price' | 'plan',feature_id:string,value?:string}[];
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
}
|
|
78
|
+
}
|