chargebee 2.51.0 → 2.52.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 +27 -0
- package/lib/chargebee.js +1 -1
- package/lib/resources/api_endpoints.js +14 -1
- package/package.json +1 -1
- package/types/core.d.ts +4 -4
- package/types/index.d.ts +2 -0
- package/types/resources/Address.d.ts +2 -194
- package/types/resources/AdvanceInvoiceSchedule.d.ts +5 -67
- package/types/resources/Attribute.d.ts +4 -1
- package/types/resources/BillingConfiguration.d.ts +21 -0
- package/types/resources/Brand.d.ts +12 -0
- package/types/resources/BusinessEntity.d.ts +8 -6
- package/types/resources/BusinessEntityTransfer.d.ts +10 -7
- package/types/resources/Card.d.ts +11 -311
- package/types/resources/Comment.d.ts +7 -124
- package/types/resources/Contact.d.ts +2 -44
- package/types/resources/ContractTerm.d.ts +4 -72
- package/types/resources/Coupon.d.ts +0 -37
- package/types/resources/CouponCode.d.ts +67 -35
- package/types/resources/CouponSet.d.ts +12 -121
- package/types/resources/CreditNote.d.ts +0 -6
- package/types/resources/Currency.d.ts +8 -5
- package/types/resources/Customer.d.ts +90 -89
- package/types/resources/Discount.d.ts +2 -89
- package/types/resources/Download.d.ts +2 -14
- package/types/resources/Entitlement.d.ts +15 -103
- package/types/resources/EntitlementOverride.d.ts +4 -89
- package/types/resources/Estimate.d.ts +2 -10
- package/types/resources/Event.d.ts +23 -108
- package/types/resources/Export.d.ts +116 -432
- package/types/resources/Feature.d.ts +17 -319
- package/types/resources/GatewayErrorDetail.d.ts +6 -48
- package/types/resources/Gift.d.ts +34 -294
- package/types/resources/Hierarchy.d.ts +4 -24
- package/types/resources/ImpactedItem.d.ts +4 -36
- package/types/resources/ImpactedItemPrice.d.ts +5 -2
- package/types/resources/ImpactedSubscription.d.ts +3 -30
- package/types/resources/InAppSubscription.d.ts +13 -355
- package/types/resources/Invoice.d.ts +2 -16
- package/types/resources/InvoiceEstimate.d.ts +1 -1
- package/types/resources/Item.d.ts +0 -7
- package/types/resources/ItemEntitlement.d.ts +15 -155
- package/types/resources/NonSubscription.d.ts +9 -6
- package/types/resources/PaymentIntent.d.ts +9 -255
- package/types/resources/PaymentReferenceNumber.d.ts +3 -20
- package/types/resources/PaymentSource.d.ts +2 -2
- package/types/resources/PaymentVoucher.d.ts +20 -203
- package/types/resources/PortalSession.d.ts +4 -146
- package/types/resources/PromotionalCredit.d.ts +10 -215
- package/types/resources/Purchase.d.ts +3 -1
- package/types/resources/Quote.d.ts +19 -1
- package/types/resources/QuotedRamp.d.ts +11 -16
- package/types/resources/RecordedPurchase.d.ts +2 -0
- package/types/resources/ResourceMigration.d.ts +2 -54
- package/types/resources/SiteMigrationDetail.d.ts +13 -55
- package/types/resources/Subscription.d.ts +11 -9
- package/types/resources/SubscriptionEntitlement.d.ts +6 -106
- package/types/resources/SubscriptionEstimate.d.ts +14 -11
- package/types/resources/TaxWithheld.d.ts +14 -26
- package/types/resources/ThirdPartyPaymentMethod.d.ts +2 -19
- package/types/resources/TimeMachine.d.ts +3 -64
- package/types/resources/Token.d.ts +3 -60
- package/types/resources/Transaction.d.ts +2 -2
- package/types/resources/Usage.d.ts +21 -165
|
@@ -1,80 +1,30 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
2
3
|
declare module 'chargebee' {
|
|
3
4
|
export interface TimeMachine {
|
|
4
5
|
|
|
5
|
-
/**
|
|
6
|
-
* @description The name of the time machine. Currently only **delorean** is allowed
|
|
7
6
|
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
7
|
name:string;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @description The current status of time travel \* succeeded - Time travel has succeeded. \* not_enabled - Time travel has not been enabled for the site \* failed - Time travel has failed. Check the failure code and failure reason attributes for further details.
|
|
14
|
-
**Note:** The time machine needs to be reset by starting afresh again. \* in_progress - Time travel is in progress
|
|
15
8
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
time_travel_status:'in_progress' | 'not_enabled' | 'failed' | 'succeeded';
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* @description The start time of the time machine. Specified when 'starting afresh'
|
|
9
|
+
time_travel_status:'not_enabled' | 'in_progress' | 'succeeded' | 'failed';
|
|
22
10
|
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
11
|
genesis_time:number;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* @description The destination time to which the time machine is travelling (or has traveled)
|
|
29
12
|
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
13
|
destination_time:number;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* @description The failure code. This will follow the api error code convention
|
|
36
14
|
|
|
37
|
-
*/
|
|
38
|
-
|
|
39
15
|
failure_code?:string;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* @description The more descriptive failure reason.
|
|
43
16
|
|
|
44
|
-
*/
|
|
45
|
-
|
|
46
17
|
failure_reason?:string;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* @description The failure details as error json.
|
|
50
18
|
|
|
51
|
-
*/
|
|
52
|
-
|
|
53
19
|
error_json?:string;
|
|
20
|
+
|
|
54
21
|
}
|
|
55
22
|
export namespace TimeMachine {
|
|
56
23
|
export class TimeMachineResource {
|
|
57
|
-
/**
|
|
58
|
-
* @description Retrieves the time machine. Currently only one time machine is available per site and is named 'delorean'.
|
|
59
|
-
|
|
60
|
-
*/
|
|
61
|
-
|
|
62
24
|
retrieve(time_machine_name:string):ChargebeeRequest<RetrieveResponse>;
|
|
63
25
|
|
|
64
|
-
/**
|
|
65
|
-
* @description Restart the time machine. This will clear the "customer" data like customer details, subscriptions, invoices, transactions. Also a time travel is initiated to travel back to specified genesis time.
|
|
66
|
-
|
|
67
|
-
**Note:** This API call is asynchronous. You need to check if the "start afresh" operation has completed by checking if the time travel status is **successful** by retrieving the time machine in a loop with a minimum delay of 3 secs between two retrieve requests. In case you are using any of the client libraries, use the **wait for time travel completion** function provided as a instance method in the library. Use method **waitForTimeTravelCompletion()** on the returned **time_machine** resource which will block until the time travel completes. Use method **waitForTimeTravelCompletion()** on the returned **time_machine** resource which will block until the time travel completes. Use method **wait_for_time_travel_completion** on the returned **time_machine** resource which will block until the time travel completes. Use method **wait_for_time_travel_completion** on the returned **time_machine** resource which will block until the time travel completes. Use method **WaitForTimeTravelCompletion** on the returned **time_machine** resource which will block until the time travel completes. Use method **wait_for_time_travel_completion** on the returned **time_machine** resource which will block until the time travel completes. Use method **waitForTimeTravelCompletion** on the returned **time_machine** resource which will block until the time travel completes. Use method **wait_for_time_travel_completion** on the returned **time_machine** resource which will block until the time travel completes.
|
|
68
|
-
|
|
69
|
-
*/
|
|
70
|
-
|
|
71
26
|
start_afresh(time_machine_name:string, input?:StartAfreshInputParam):ChargebeeRequest<StartAfreshResponse>;
|
|
72
27
|
|
|
73
|
-
/**
|
|
74
|
-
* @description Travel forward in time. This operation is **asynchronous** . You need to check if the "start afresh" operation has completed by checking if the time travel status is **successful** by retrieving the time machine in a loop with a minimum delay of 3 secs between two retrieve requests. Use method **waitForTimeTravelCompletion()** on the returned time_machine resource which will block until the time travel completes.
|
|
75
|
-
|
|
76
|
-
*/
|
|
77
|
-
|
|
78
28
|
travel_forward(time_machine_name:string, input?:TravelForwardInputParam):ChargebeeRequest<TravelForwardResponse>;
|
|
79
29
|
}
|
|
80
30
|
export interface RetrieveResponse {
|
|
@@ -86,12 +36,6 @@ declare module 'chargebee' {
|
|
|
86
36
|
}
|
|
87
37
|
export interface StartAfreshInputParam {
|
|
88
38
|
|
|
89
|
-
/**
|
|
90
|
-
* @description The genesis time to travel back as part of the reset operation. If not provided, then the travel is set to 6 months in the past.
|
|
91
|
-
**Note:** Can only be in the past.
|
|
92
|
-
|
|
93
|
-
*/
|
|
94
|
-
|
|
95
39
|
genesis_time?:number;
|
|
96
40
|
}
|
|
97
41
|
export interface TravelForwardResponse {
|
|
@@ -99,11 +43,6 @@ declare module 'chargebee' {
|
|
|
99
43
|
}
|
|
100
44
|
export interface TravelForwardInputParam {
|
|
101
45
|
|
|
102
|
-
/**
|
|
103
|
-
* @description The **time** to travel to. Should be between the 'current' destination time of the time machine and present time.
|
|
104
|
-
|
|
105
|
-
*/
|
|
106
|
-
|
|
107
46
|
destination_time?:number;
|
|
108
47
|
}
|
|
109
48
|
|
|
@@ -1,89 +1,32 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
2
3
|
declare module 'chargebee' {
|
|
3
4
|
export interface Token {
|
|
4
5
|
|
|
5
|
-
/**
|
|
6
|
-
* @description Identifier of the Chargebee Token
|
|
7
6
|
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
7
|
id:string;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @description Name of the gateway this token is stored in. \* bluesnap - BlueSnap is a payment gateway. \* tco - 2Checkout is a payment gateway. \* first_data_global - First Data Global Gateway Virtual Terminal Account \* exact - Exact Payments is a payment gateway. \* bluepay - BluePay is a payment gateway. \* paypal_express_checkout - PayPal Express Checkout is a payment gateway. \* eway - eWAY Account is a payment gateway. \* paypal_payflow_pro - PayPal Payflow Pro 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. \* global_payments - Global Payments is a payment service provider. \* amazon_payments - Amazon Payments is a payment service provider. \* not_applicable - Indicates that payment gateway is not applicable for this resource. \* checkout_com - Checkout.com is a payment gateway. \* adyen - Adyen is a payment gateway. \* braintree - Braintree is a payment gateway. \* nmi - NMI is a payment gateway. \* quickbooks - Intuit QuickBooks Payments gateway \* wepay - WePay is a payment gateway. \* worldpay - WorldPay is a payment gateway \* wirecard - WireCard Account is a payment service provider. \* chargebee_payments - Chargebee Payments gateway \* sage_pay - Sage Pay is a payment gateway. \* moneris_us - Moneris USA is a payment gateway. \* pin - Pin is a payment gateway \* authorize_net - Authorize.net is a payment gateway \* elavon - Elavon Virtual Merchant is a payment solution. \* paypal_pro - PayPal Pro Account is a payment gateway. \* orbital - Chase Paymentech(Orbital) is a payment gateway. \* paypal - PayPal Commerce is a payment gateway. \* beanstream - Bambora(formerly known as Beanstream) is a payment gateway. \* hdfc - HDFC Account is a payment gateway. \* ingenico_direct - Worldline Online Payments is a payment gateway. \* ogone - Ingenico ePayments (formerly known as Ogone) is a payment gateway. \* migs - MasterCard Internet Gateway Service payment gateway. \* stripe - Stripe is a payment gateway. \* vantiv - Vantiv is a payment gateway. \* moneris - Moneris is a payment gateway. \* chargebee - Chargebee test gateway. \* eway_rapid - eWAY Rapid is a payment gateway. \* gocardless - GoCardless is a payment service provider. \* mollie - Mollie is a payment gateway. \* paymill - PAYMILL is a payment gateway. \* balanced_payments - Balanced is a payment gateway \* cybersource - CyberSource is a payment gateway.
|
|
14
8
|
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
9
|
gateway:Gateway;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* @description The gateway account in which this token is stored.
|
|
21
10
|
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
11
|
gateway_account_id:string;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @description Type of payment method of the token. \* google_pay - Payments made via Google Pay. \* apple_pay - Payments made via Apple Pay. \* unionpay - Payments made via UnionPay. \* ideal - Payments made via iDEAL. \* bancontact - Payments made via Bancontact Card. \* netbanking_emandates - Netbanking (eMandates) Payments. \* alipay - Payments made via Alipay. \* dotpay - Payments made via Dotpay. \* giropay - Payments made via giropay. \* sofort - Payments made via Sofort. \* direct_debit - Represents bank account for which the direct debit or ACH agreement/mandate is created. \* paypal_express_checkout - Payments made via PayPal Express Checkout. \* 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. \* upi - UPI Payments. \* generic - Payments made via Generic Payment Method. \* wechat_pay - Payments made via WeChat Pay.
|
|
28
12
|
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
13
|
payment_method_type:PaymentMethodType;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @description Status of the token \* new - new \* consumed - The token is already used \* expired - expired
|
|
35
14
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
status:'consumed' | 'new' | 'expired';
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* @description The id with which this token is referred in gateway
|
|
15
|
+
status:'new' | 'expired' | 'consumed';
|
|
42
16
|
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
17
|
id_at_vault:string;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* @description Name of the gateway/vault provider where the payment method is tokenized \* gateway - gateway \* spreedly - spreedly
|
|
49
18
|
|
|
50
|
-
*/
|
|
51
|
-
|
|
52
19
|
vault:'spreedly' | 'gateway';
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* @description The IP address from where the token is created. Used primarily for EU VAT validation.
|
|
56
20
|
|
|
57
|
-
*/
|
|
58
|
-
|
|
59
21
|
ip_address?:string;
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* @description Version number of this resource. The `resource_version` is updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.
|
|
63
22
|
|
|
64
|
-
*/
|
|
65
|
-
|
|
66
23
|
resource_version?:number;
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* @description Timestamp indicating when this token resource was last updated.
|
|
70
24
|
|
|
71
|
-
*/
|
|
72
|
-
|
|
73
25
|
updated_at?:number;
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* @description Timestamp indicating when this token resource is created.
|
|
77
26
|
|
|
78
|
-
*/
|
|
79
|
-
|
|
80
27
|
created_at:number;
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* @description Timestamp indicating when this token is expired
|
|
84
28
|
|
|
85
|
-
*/
|
|
86
|
-
|
|
87
29
|
expired_at?:number;
|
|
30
|
+
|
|
88
31
|
}
|
|
89
32
|
}
|
|
@@ -236,14 +236,14 @@ declare module 'chargebee' {
|
|
|
236
236
|
|
|
237
237
|
*/
|
|
238
238
|
|
|
239
|
-
payment_method?:{in?:string,is?:'card' | 'cash' | 'check' | 'chargeback' | 'bank_transfer' | 'amazon_payments' | 'paypal_express_checkout' | 'direct_debit' | 'alipay' | 'unionpay' | 'apple_pay' | 'wechat_pay' | 'ach_credit' | 'sepa_credit' | 'ideal' | 'google_pay' | 'sofort' | 'bancontact' | 'giropay' | 'dotpay' | 'other' | 'upi' | 'netbanking_emandates' | 'custom' | 'boleto' | 'venmo' | 'pay_to' | 'faster_payments' | 'sepa_instant_transfer' | 'automated_bank_transfer' | 'klarna_pay_now' | 'online_banking_poland',is_not?:'card' | 'cash' | 'check' | 'chargeback' | 'bank_transfer' | 'amazon_payments' | 'paypal_express_checkout' | 'direct_debit' | 'alipay' | 'unionpay' | 'apple_pay' | 'wechat_pay' | 'ach_credit' | 'sepa_credit' | 'ideal' | 'google_pay' | 'sofort' | 'bancontact' | 'giropay' | 'dotpay' | 'other' | 'upi' | 'netbanking_emandates' | 'custom' | 'boleto' | 'venmo' | 'pay_to' | 'faster_payments' | 'sepa_instant_transfer' | 'automated_bank_transfer' | 'klarna_pay_now' | 'online_banking_poland',not_in?:string};
|
|
239
|
+
payment_method?:{in?:string,is?:'card' | 'cash' | 'check' | 'chargeback' | 'bank_transfer' | 'amazon_payments' | 'paypal_express_checkout' | 'direct_debit' | 'alipay' | 'unionpay' | 'apple_pay' | 'wechat_pay' | 'ach_credit' | 'sepa_credit' | 'ideal' | 'google_pay' | 'sofort' | 'bancontact' | 'giropay' | 'dotpay' | 'other' | 'upi' | 'netbanking_emandates' | 'custom' | 'boleto' | 'venmo' | 'pay_to' | 'faster_payments' | 'sepa_instant_transfer' | 'automated_bank_transfer' | 'klarna_pay_now' | 'online_banking_poland' | 'payconiq_by_bancontact',is_not?:'card' | 'cash' | 'check' | 'chargeback' | 'bank_transfer' | 'amazon_payments' | 'paypal_express_checkout' | 'direct_debit' | 'alipay' | 'unionpay' | 'apple_pay' | 'wechat_pay' | 'ach_credit' | 'sepa_credit' | 'ideal' | 'google_pay' | 'sofort' | 'bancontact' | 'giropay' | 'dotpay' | 'other' | 'upi' | 'netbanking_emandates' | 'custom' | 'boleto' | 'venmo' | 'pay_to' | 'faster_payments' | 'sepa_instant_transfer' | 'automated_bank_transfer' | 'klarna_pay_now' | 'online_banking_poland' | 'payconiq_by_bancontact',not_in?:string};
|
|
240
240
|
|
|
241
241
|
/**
|
|
242
242
|
* @description Gateway through which this transaction was done. Applicable only for 'Card' Payment Method
|
|
243
243
|
|
|
244
244
|
*/
|
|
245
245
|
|
|
246
|
-
gateway?:{in?:string,is?:'chargebee' | 'chargebee_payments' | 'adyen' | 'stripe' | 'wepay' | 'braintree' | 'authorize_net' | 'paypal_pro' | 'pin' | 'eway' | 'eway_rapid' | 'worldpay' | 'balanced_payments' | 'beanstream' | 'bluepay' | 'elavon' | 'first_data_global' | 'hdfc' | 'migs' | 'nmi' | 'ogone' | 'paymill' | 'paypal_payflow_pro' | 'sage_pay' | 'tco' | 'wirecard' | 'amazon_payments' | 'paypal_express_checkout' | 'gocardless' | 'orbital' | 'moneris_us' | 'moneris' | 'bluesnap' | 'cybersource' | 'vantiv' | 'checkout_com' | 'paypal' | 'ingenico_direct' | 'exact' | 'mollie' | 'quickbooks' | 'razorpay' | 'global_payments' | 'bank_of_america' | 'ecentric' | 'metrics_global' | 'windcave' | 'pay_com' | 'ebanx' | 'dlocal' | 'nuvei' | 'paystack' | 'jp_morgan' | 'not_applicable',is_not?:'chargebee' | 'chargebee_payments' | 'adyen' | 'stripe' | 'wepay' | 'braintree' | 'authorize_net' | 'paypal_pro' | 'pin' | 'eway' | 'eway_rapid' | 'worldpay' | 'balanced_payments' | 'beanstream' | 'bluepay' | 'elavon' | 'first_data_global' | 'hdfc' | 'migs' | 'nmi' | 'ogone' | 'paymill' | 'paypal_payflow_pro' | 'sage_pay' | 'tco' | 'wirecard' | 'amazon_payments' | 'paypal_express_checkout' | 'gocardless' | 'orbital' | 'moneris_us' | 'moneris' | 'bluesnap' | 'cybersource' | 'vantiv' | 'checkout_com' | 'paypal' | 'ingenico_direct' | 'exact' | 'mollie' | 'quickbooks' | 'razorpay' | 'global_payments' | 'bank_of_america' | 'ecentric' | 'metrics_global' | 'windcave' | 'pay_com' | 'ebanx' | 'dlocal' | 'nuvei' | 'paystack' | 'jp_morgan' | 'not_applicable',not_in?:string};
|
|
246
|
+
gateway?:{in?:string,is?:'chargebee' | 'chargebee_payments' | 'adyen' | 'stripe' | 'wepay' | 'braintree' | 'authorize_net' | 'paypal_pro' | 'pin' | 'eway' | 'eway_rapid' | 'worldpay' | 'balanced_payments' | 'beanstream' | 'bluepay' | 'elavon' | 'first_data_global' | 'hdfc' | 'migs' | 'nmi' | 'ogone' | 'paymill' | 'paypal_payflow_pro' | 'sage_pay' | 'tco' | 'wirecard' | 'amazon_payments' | 'paypal_express_checkout' | 'gocardless' | 'orbital' | 'moneris_us' | 'moneris' | 'bluesnap' | 'cybersource' | 'vantiv' | 'checkout_com' | 'paypal' | 'ingenico_direct' | 'exact' | 'mollie' | 'quickbooks' | 'razorpay' | 'global_payments' | 'bank_of_america' | 'ecentric' | 'metrics_global' | 'windcave' | 'pay_com' | 'ebanx' | 'dlocal' | 'nuvei' | 'solidgate' | 'paystack' | 'jp_morgan' | 'not_applicable',is_not?:'chargebee' | 'chargebee_payments' | 'adyen' | 'stripe' | 'wepay' | 'braintree' | 'authorize_net' | 'paypal_pro' | 'pin' | 'eway' | 'eway_rapid' | 'worldpay' | 'balanced_payments' | 'beanstream' | 'bluepay' | 'elavon' | 'first_data_global' | 'hdfc' | 'migs' | 'nmi' | 'ogone' | 'paymill' | 'paypal_payflow_pro' | 'sage_pay' | 'tco' | 'wirecard' | 'amazon_payments' | 'paypal_express_checkout' | 'gocardless' | 'orbital' | 'moneris_us' | 'moneris' | 'bluesnap' | 'cybersource' | 'vantiv' | 'checkout_com' | 'paypal' | 'ingenico_direct' | 'exact' | 'mollie' | 'quickbooks' | 'razorpay' | 'global_payments' | 'bank_of_america' | 'ecentric' | 'metrics_global' | 'windcave' | 'pay_com' | 'ebanx' | 'dlocal' | 'nuvei' | 'solidgate' | 'paystack' | 'jp_morgan' | 'not_applicable',not_in?:string};
|
|
247
247
|
|
|
248
248
|
/**
|
|
249
249
|
* @description The gateway account used for this transaction
|
|
@@ -3,128 +3,42 @@
|
|
|
3
3
|
declare module 'chargebee' {
|
|
4
4
|
export interface Usage {
|
|
5
5
|
|
|
6
|
-
/**
|
|
7
|
-
* @description A unique and immutable id for the usage. If not provided, it is autogenerated.
|
|
8
6
|
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
7
|
id?:string;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @description The time at which this usage occurred. Chargebee bills only those usages whose `usage_date` falls within a time when the subscription `status` was `active` or `non_renewing`. However, the remaining usage records are still stored and are [retrievable](/docs/api/usages?prod_cat_ver=2#retrieve_a_usage).
|
|
15
|
-
**Note:** If `usage_date` corresponds to a time already invoiced, then it is stored but never invoiced unless the [invoice is regenerated](/docs/api/subscriptions?prod_cat_ver=2#regenerate_an_invoice).
|
|
16
8
|
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
9
|
usage_date:number;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* @description The id of the [subscription](/docs/api/subscriptions?prod_cat_ver=2) to which this usage record belongs.
|
|
23
10
|
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
11
|
subscription_id:string;
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* @description The id of the [item price](/docs/api/item_prices?prod_cat_ver=2) to which this usage belongs. The item price must be a part of the subscription or should have been part of it historically.
|
|
30
12
|
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
13
|
item_price_id:string;
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* @description When the usage has been invoiced, this is the `id` of the [invoice](/docs/api/invoices?prod_cat_ver=2). This is cleared when the invoice is `voided` or deleted.
|
|
37
14
|
|
|
38
|
-
*/
|
|
39
|
-
|
|
40
15
|
invoice_id?:string;
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* @description When the usage has been invoiced, this is the `id` of the [invoice.line_item](/docs/api/invoices?prod_cat_ver=2#invoice_line_items) that the usage is for. This is cleared when the invoice is [voided](/docs/api/invoices?prod_cat_ver=2#void_an_invoice) or [deleted](/docs/api/invoices?prod_cat_ver=2#delete_an_invoice).
|
|
44
16
|
|
|
45
|
-
*/
|
|
46
|
-
|
|
47
17
|
line_item_id?:string;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* @description The quantity specified for this usage record.
|
|
51
18
|
|
|
52
|
-
*/
|
|
53
|
-
|
|
54
19
|
quantity:string;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* @description The source from which the usage record was created. \* admin_console - Operation made through the Chargebee admin UI \* api - Operation made through the API \* bulk_operation - Operation that are triggerd through bulk operation.
|
|
58
20
|
|
|
59
|
-
*/
|
|
60
|
-
|
|
61
21
|
source?:Source;
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* @description A note for this usage record. This appears against the usage on the Chargebee UI. This note is not displayed on any customer-facing document or interface such as [invoice PDFs](/docs/api/invoices?prod_cat_ver=2#retrieve_invoice_as_pdf) or [Hosted Pages](/docs/api/hosted_pages?prod_cat_ver=2).
|
|
65
22
|
|
|
66
|
-
*/
|
|
67
|
-
|
|
68
23
|
note?:string;
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* @description Version number of this resource. The `resource_version` is updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.
|
|
72
24
|
|
|
73
|
-
*/
|
|
74
|
-
|
|
75
25
|
resource_version?:number;
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* @description Timestamp indicating when this usage resource was last updated.
|
|
79
26
|
|
|
80
|
-
*/
|
|
81
|
-
|
|
82
27
|
updated_at?:number;
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* @description Timestamp indicating when the item was created.
|
|
86
28
|
|
|
87
|
-
*/
|
|
88
|
-
|
|
89
29
|
created_at:number;
|
|
30
|
+
|
|
90
31
|
}
|
|
91
32
|
export namespace Usage {
|
|
92
33
|
export class UsageResource {
|
|
93
|
-
/**
|
|
94
|
-
* @description Creates a usage record for an item price in a subscription. The item price must belong to a [metered](/docs/api/items?prod_cat_ver=2#item_metered) item.
|
|
95
|
-
**Max Usages**
|
|
96
|
-
The maximum number of usages that can be recorded for the entire lifetime of a subscription is 5000. [Contact Support](https://chargebee.freshdesk.com/support/home) if you want this limit to be increased for your site.
|
|
97
|
-
|
|
98
|
-
*/
|
|
99
|
-
|
|
100
34
|
create(subscription_id:string, input:CreateInputParam):ChargebeeRequest<CreateResponse>;
|
|
101
35
|
|
|
102
|
-
/**
|
|
103
|
-
* @description Retrieves a usage record of a specific subscription.
|
|
104
|
-
|
|
105
|
-
*/
|
|
106
|
-
|
|
107
36
|
retrieve(subscription_id:string, input:RetrieveInputParam):ChargebeeRequest<RetrieveResponse>;
|
|
108
37
|
|
|
109
|
-
/**
|
|
110
|
-
* @description Deletes a usage record. This operation cannot be invoked for a usage record that has been [invoiced](usages?prod_cat_ver=2#invoicing_usages).
|
|
111
|
-
|
|
112
|
-
*/
|
|
113
|
-
|
|
114
38
|
delete(subscription_id:string, input:DeleteInputParam):ChargebeeRequest<DeleteResponse>;
|
|
115
39
|
|
|
116
|
-
|
|
117
|
-
* @description Retrieves the list of usages.
|
|
118
|
-
|
|
119
|
-
*/
|
|
120
|
-
|
|
121
|
-
list(input:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
40
|
+
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
122
41
|
|
|
123
|
-
/**
|
|
124
|
-
* @description Retrieves usages record for an invoice in PDF file format.
|
|
125
|
-
|
|
126
|
-
*/
|
|
127
|
-
|
|
128
42
|
pdf(input:PdfInputParam):ChargebeeRequest<PdfResponse>;
|
|
129
43
|
}
|
|
130
44
|
export interface CreateResponse {
|
|
@@ -132,39 +46,15 @@ The maximum number of usages that can be recorded for the entire lifetime of a s
|
|
|
132
46
|
}
|
|
133
47
|
export interface CreateInputParam {
|
|
134
48
|
|
|
135
|
-
/**
|
|
136
|
-
* @description A unique and immutable id for the usage. If not provided, it is autogenerated.
|
|
137
|
-
|
|
138
|
-
*/
|
|
139
|
-
|
|
140
49
|
id?:string;
|
|
141
50
|
|
|
142
|
-
/**
|
|
143
|
-
* @description The id of the [item price](/docs/api/item_prices?prod_cat_ver=2) to which this usage belongs. The item price must be a part of the subscription or should have been part of it historically.
|
|
144
|
-
|
|
145
|
-
*/
|
|
146
|
-
|
|
147
51
|
item_price_id:string;
|
|
148
52
|
|
|
149
|
-
/**
|
|
150
|
-
* @description The quantity specified for this usage record.
|
|
151
|
-
|
|
152
|
-
*/
|
|
153
|
-
|
|
154
53
|
quantity:string;
|
|
155
54
|
|
|
156
|
-
/**
|
|
157
|
-
* @description The time at which this usage occurred. Chargebee bills only those usages whose `usage_date` falls within a time when the subscription `status` was `active` or `non_renewing`. However, the remaining usage records are still stored and are [retrievable](/docs/api/usages?prod_cat_ver=2#retrieve_a_usage).
|
|
158
|
-
**Note:** If `usage_date` corresponds to a time already invoiced, then it is stored but never invoiced unless the [invoice is regenerated](/docs/api/subscriptions?prod_cat_ver=2#regenerate_an_invoice).
|
|
159
|
-
|
|
160
|
-
*/
|
|
161
|
-
|
|
162
55
|
usage_date:number;
|
|
163
56
|
|
|
164
|
-
|
|
165
|
-
* @description A note for this usage record. This appears against the usage on the Chargebee UI. This note is not displayed on any customer-facing document or interface such as [invoice PDFs](/docs/api/invoices?prod_cat_ver=2#retrieve_invoice_as_pdf) or [Hosted Pages](/docs/api/hosted_pages?prod_cat_ver=2).
|
|
166
|
-
|
|
167
|
-
*/
|
|
57
|
+
dedupe_option?:DedupeOption;
|
|
168
58
|
|
|
169
59
|
note?:string;
|
|
170
60
|
}
|
|
@@ -173,11 +63,6 @@ The maximum number of usages that can be recorded for the entire lifetime of a s
|
|
|
173
63
|
}
|
|
174
64
|
export interface RetrieveInputParam {
|
|
175
65
|
|
|
176
|
-
/**
|
|
177
|
-
* @description Retrieves a usage record of a specific subscription.
|
|
178
|
-
|
|
179
|
-
*/
|
|
180
|
-
|
|
181
66
|
id:string;
|
|
182
67
|
}
|
|
183
68
|
export interface DeleteResponse {
|
|
@@ -185,118 +70,89 @@ The maximum number of usages that can be recorded for the entire lifetime of a s
|
|
|
185
70
|
}
|
|
186
71
|
export interface DeleteInputParam {
|
|
187
72
|
|
|
188
|
-
/**
|
|
189
|
-
* @description A unique and immutable id for the usage. If not provided, it is autogenerated.
|
|
190
|
-
|
|
191
|
-
*/
|
|
192
|
-
|
|
193
73
|
id:string;
|
|
194
74
|
}
|
|
195
75
|
export interface ListResponse {
|
|
196
|
-
/**
|
|
197
|
-
* @description Retrieves the list of usages.
|
|
198
|
-
|
|
199
|
-
*/
|
|
200
|
-
|
|
201
76
|
list:{usage:Usage}[];
|
|
202
77
|
|
|
203
|
-
/**
|
|
204
|
-
* @description Retrieves the list of usages.
|
|
205
|
-
|
|
206
|
-
*/
|
|
207
|
-
|
|
208
78
|
next_offset?:string;
|
|
209
79
|
}
|
|
210
80
|
export interface ListInputParam {
|
|
211
81
|
[key : string]: any;
|
|
212
82
|
/**
|
|
213
|
-
* @description
|
|
83
|
+
* @description The number of resources to be returned.
|
|
214
84
|
|
|
215
85
|
*/
|
|
216
86
|
|
|
217
87
|
limit?:number;
|
|
218
88
|
|
|
219
89
|
/**
|
|
220
|
-
* @description
|
|
90
|
+
* @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.
|
|
221
91
|
|
|
222
92
|
*/
|
|
223
93
|
|
|
224
94
|
offset?:string;
|
|
225
95
|
|
|
226
96
|
/**
|
|
227
|
-
* @description
|
|
97
|
+
* @description A unique and immutable id for the usage. If not provided, it is autogenerated.
|
|
228
98
|
|
|
229
99
|
*/
|
|
230
100
|
|
|
231
101
|
id?:{is?:string,is_not?:string,starts_with?:string};
|
|
232
102
|
|
|
233
103
|
/**
|
|
234
|
-
* @description
|
|
104
|
+
* @description The id of the [subscription](/docs/api/subscriptions?prod_cat_ver=2) to which this usage record belongs.
|
|
235
105
|
|
|
236
106
|
*/
|
|
237
107
|
|
|
238
|
-
subscription_id
|
|
108
|
+
subscription_id?:{is?:string,is_not?:string,starts_with?:string};
|
|
239
109
|
|
|
240
110
|
/**
|
|
241
|
-
* @description
|
|
111
|
+
* @description The time at which this usage occurred. Chargebee bills only those usages whose `usage_date` falls within a time when the subscription `status` was `active` or `non_renewing`. However, the remaining usage records are still stored and are [retrievable](/docs/api/usages?prod_cat_ver=2#retrieve_a_usage).
|
|
112
|
+
**Note:** If `usage_date` corresponds to a time already invoiced, then it is stored but never invoiced unless the [invoice is regenerated](/docs/api/subscriptions?prod_cat_ver=2#regenerate_an_invoice).
|
|
242
113
|
|
|
243
114
|
*/
|
|
244
115
|
|
|
245
116
|
usage_date?:{after?:string,before?:string,between?:string,on?:string};
|
|
246
117
|
|
|
247
118
|
/**
|
|
248
|
-
* @description
|
|
119
|
+
* @description Indicates the date at which this credit note is last updated.
|
|
249
120
|
|
|
250
121
|
*/
|
|
251
122
|
|
|
252
|
-
|
|
123
|
+
updated_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
253
124
|
|
|
254
125
|
/**
|
|
255
|
-
* @description
|
|
126
|
+
* @description The id of the [item price](/docs/api/item_prices?prod_cat_ver=2) to which this usage belongs. The item price must be a part of the subscription or should have been part of it historically.
|
|
256
127
|
|
|
257
128
|
*/
|
|
258
129
|
|
|
259
|
-
|
|
130
|
+
item_price_id?:{is?:string,is_not?:string,starts_with?:string};
|
|
260
131
|
|
|
261
132
|
/**
|
|
262
|
-
* @description
|
|
133
|
+
* @description When the usage has been invoiced, this is the `id` of the [invoice](/docs/api/invoices?prod_cat_ver=2). This is cleared when the invoice is `voided` or deleted.
|
|
263
134
|
|
|
264
135
|
*/
|
|
265
136
|
|
|
266
|
-
|
|
137
|
+
invoice_id?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string};
|
|
267
138
|
|
|
268
139
|
/**
|
|
269
|
-
* @description
|
|
270
|
-
|
|
271
|
-
*/
|
|
272
|
-
|
|
273
|
-
sort_by?:{asc?:'usage_date',desc?:'usage_date'};
|
|
274
|
-
|
|
275
|
-
/**
|
|
276
|
-
* @description Indicates the date at which this credit note is last updated.
|
|
140
|
+
* @description The source from which the usage record was created.
|
|
277
141
|
|
|
278
142
|
*/
|
|
279
143
|
|
|
280
|
-
|
|
144
|
+
source?:{in?:string,is?:'admin_console' | 'api' | 'bulk_operation',is_not?:'admin_console' | 'api' | 'bulk_operation',not_in?:string};
|
|
145
|
+
|
|
146
|
+
sort_by?:{asc?:'usage_date' | 'updated_at',desc?:'usage_date' | 'updated_at'};
|
|
281
147
|
}
|
|
282
148
|
export interface PdfResponse {
|
|
283
149
|
download:Download;
|
|
284
150
|
}
|
|
285
151
|
export interface PdfInputParam {
|
|
286
152
|
|
|
287
|
-
|
|
288
|
-
* @description Determines the pdf should be rendered as inline or attachment in the browser. \* attachment - PDF is rendered as attachment in the browser \* inline - PDF is rendered as inline in the browser
|
|
289
|
-
|
|
290
|
-
*/
|
|
153
|
+
invoice:{id:string};
|
|
291
154
|
|
|
292
155
|
disposition_type?:DispositionType;
|
|
293
|
-
|
|
294
|
-
/**
|
|
295
|
-
* @description Parameters for invoice
|
|
296
|
-
|
|
297
|
-
*/
|
|
298
|
-
|
|
299
|
-
invoice:{id:string};
|
|
300
156
|
}
|
|
301
157
|
|
|
302
158
|
}
|