chargebee 2.25.3 → 2.26.1
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 +35 -0
- package/README.md +55 -49
- package/lib/chargebee.js +1 -1
- package/package.json +1 -1
- package/types/core.d.ts +1 -0
- package/types/resources/Address.d.ts +245 -5
- package/types/resources/AdvanceInvoiceSchedule.d.ts +78 -2
- package/types/resources/AttachedItem.d.ts +305 -13
- package/types/resources/Card.d.ts +485 -13
- package/types/resources/Comment.d.ts +177 -11
- package/types/resources/Contact.d.ts +54 -0
- package/types/resources/ContractTerm.d.ts +83 -0
- package/types/resources/Coupon.d.ts +665 -20
- package/types/resources/CouponCode.d.ts +56 -5
- package/types/resources/CouponSet.d.ts +224 -17
- package/types/resources/CreditNote.d.ts +1202 -44
- package/types/resources/CreditNoteEstimate.d.ts +75 -6
- package/types/resources/Customer.d.ts +2132 -73
- package/types/resources/DifferentialPrice.d.ts +266 -15
- package/types/resources/Discount.d.ts +107 -0
- package/types/resources/Download.d.ts +18 -0
- package/types/resources/EntitlementOverride.d.ts +101 -7
- package/types/resources/Estimate.d.ts +1181 -27
- package/types/resources/Event.d.ts +145 -8
- package/types/resources/Export.d.ts +703 -32
- package/types/resources/Feature.d.ts +356 -22
- package/types/resources/Gift.d.ts +351 -24
- package/types/resources/Hierarchy.d.ts +30 -0
- package/types/resources/HostedPage.d.ts +1212 -37
- package/types/resources/ImpactedItem.d.ts +41 -1
- package/types/resources/ImpactedSubscription.d.ts +36 -1
- package/types/resources/InAppSubscription.d.ts +636 -9
- package/types/resources/Invoice.d.ts +2293 -93
- package/types/resources/InvoiceEstimate.d.ts +75 -6
- package/types/resources/Item.d.ts +542 -16
- package/types/resources/ItemEntitlement.d.ts +172 -13
- package/types/resources/ItemFamily.d.ts +173 -15
- package/types/resources/ItemPrice.d.ts +971 -26
- package/types/resources/Media.d.ts +24 -0
- package/types/resources/NonSubscription.d.ts +51 -3
- package/types/resources/Order.d.ts +1224 -32
- package/types/resources/PaymentIntent.d.ts +318 -8
- package/types/resources/PaymentReferenceNumber.d.ts +24 -0
- package/types/resources/PaymentSource.d.ts +1259 -55
- package/types/resources/PaymentVoucher.d.ts +262 -14
- package/types/resources/PortalSession.d.ts +187 -10
- package/types/resources/PromotionalCredit.d.ts +351 -16
- package/types/resources/Purchase.d.ts +274 -5
- package/types/resources/Quote.d.ts +1595 -62
- package/types/resources/QuoteLineGroup.d.ts +134 -5
- package/types/resources/QuotedCharge.d.ts +63 -5
- package/types/resources/QuotedSubscription.d.ts +192 -5
- package/types/resources/ResourceMigration.d.ts +73 -3
- package/types/resources/SiteMigrationDetail.d.ts +98 -5
- package/types/resources/Subscription.d.ts +3462 -137
- package/types/resources/SubscriptionEntitlement.d.ts +116 -8
- package/types/resources/SubscriptionEstimate.d.ts +36 -2
- package/types/resources/TaxWithheld.d.ts +32 -0
- package/types/resources/ThirdPartyPaymentMethod.d.ts +24 -0
- package/types/resources/TimeMachine.d.ts +99 -7
- package/types/resources/Token.d.ts +179 -7
- package/types/resources/Transaction.d.ts +597 -25
- package/types/resources/UnbilledCharge.d.ts +355 -14
- package/types/resources/Usage.d.ts +259 -13
- package/types/resources/VirtualBankAccount.d.ts +255 -17
|
@@ -1,39 +1,147 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
2
|
declare module 'chargebee' {
|
|
3
3
|
export interface SubscriptionEntitlement {
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @description The `id` of the [subscription](/docs/api/subscriptions) to which this entitlement belongs.
|
|
7
|
+
|
|
8
|
+
*/
|
|
9
|
+
|
|
4
10
|
subscription_id:string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @description The `id` of the [feature](/docs/api/features) towards which this subscription entitlement has been granted.
|
|
14
|
+
|
|
15
|
+
*/
|
|
16
|
+
|
|
5
17
|
feature_id?:string;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @description The [name of the feature](/docs/api/features#feature_name) towards which this subscription entitlement has been granted.
|
|
21
|
+
|
|
22
|
+
*/
|
|
23
|
+
|
|
6
24
|
feature_name?:string;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @description [The unit of measure](/docs/api/features#feature_unit) for the feature when its `type` is either `quantity` or `range`.
|
|
28
|
+
|
|
29
|
+
*/
|
|
30
|
+
|
|
7
31
|
feature_unit?:string;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @description The value denoting the effective entitlement level that the subscription has towards the feature. When `components.entitlement_override` is present, then this is the same as `components.entitlement_override.value`. Otherwise, it is `components.inherited_entitlements.value`.
|
|
35
|
+
|
|
36
|
+
*/
|
|
37
|
+
|
|
8
38
|
value?:string;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @description The display name of the effective entitlement level. When `components.entitlement_override` is present, then this is the same as `components.entitlement_override.name`. Otherwise, it is derived based on the `type` of feature as follows:
|
|
42
|
+
|
|
43
|
+
* When `feature.type` is `range` or `quantity`: the `name` is the space-separated concatenation of `inherited_entitlements.value` and the pluralized form of `feature_unit`. For example, if `value` is `20` and `feature_unit` is `user`, then `name` becomes `20 users`.
|
|
44
|
+
* When `feature.type` is `custom`: the `name` is the same as `inherited_entitlements.value`.
|
|
45
|
+
* When `feature.type` is `switch`: `name` is not applicable.
|
|
46
|
+
|
|
47
|
+
*/
|
|
48
|
+
|
|
9
49
|
name?:string;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @description Indicates that `components.entitlement_overrides` exists.
|
|
53
|
+
|
|
54
|
+
*/
|
|
55
|
+
|
|
10
56
|
is_overridden:boolean;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* @description Indicates that `components.is_enabled` exists.
|
|
60
|
+
|
|
61
|
+
*/
|
|
62
|
+
|
|
11
63
|
is_enabled:boolean;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @description Timestamp when the subscription entitlements are going to expire.
|
|
67
|
+
|
|
68
|
+
*/
|
|
69
|
+
|
|
12
70
|
expires_at?:number;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @description The component entitlements that constitute this `subscription_entitlement`. The effective entitlement [value](/docs/api/subscription_entitlements#subscription_entitlement_value) and [name](/docs/api/subscription_entitlements#subscription_entitlement_name) are determined from these component entitlements.
|
|
74
|
+
|
|
75
|
+
*/
|
|
76
|
+
|
|
13
77
|
components?:SubscriptionEntitlement.Component;
|
|
14
78
|
}
|
|
15
79
|
export namespace SubscriptionEntitlement {
|
|
16
|
-
export class SubscriptionEntitlementResource {
|
|
80
|
+
export class SubscriptionEntitlementResource {
|
|
17
81
|
set_subscription_entitlement_availability(subscription_id:string, input:SetSubscriptionEntitlementAvailabilityInputParam):ChargebeeRequest<SetSubscriptionEntitlementAvailabilityResponse>;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* @description Retrieves the list of `subscription_entitlements` for the [subscription](/docs/api/subscriptions).
|
|
85
|
+
**Note:**
|
|
86
|
+
|
|
87
|
+
The `components` attribute is not returned for any of the `subscription_entitlements`. Use the retrieve operation(coming soon) to obtain the `components`.
|
|
88
|
+
|
|
89
|
+
*/
|
|
90
|
+
|
|
18
91
|
subscription_entitlements_for_subscription(subscription_id:string, input?:SubscriptionEntitlementsForSubscriptionInputParam):ChargebeeRequest<SubscriptionEntitlementsForSubscriptionResponse>;
|
|
19
92
|
}
|
|
20
|
-
export interface SetSubscriptionEntitlementAvailabilityResponse {
|
|
21
|
-
|
|
93
|
+
export interface SetSubscriptionEntitlementAvailabilityResponse {
|
|
94
|
+
subscription_entitlement:SubscriptionEntitlement;
|
|
22
95
|
}
|
|
23
96
|
export interface SetSubscriptionEntitlementAvailabilityInputParam {
|
|
97
|
+
|
|
24
98
|
is_enabled:boolean;
|
|
99
|
+
|
|
25
100
|
subscription_entitlements?:{feature_id:string}[];
|
|
26
101
|
}
|
|
27
|
-
export interface SubscriptionEntitlementsForSubscriptionResponse {
|
|
28
|
-
|
|
29
|
-
|
|
102
|
+
export interface SubscriptionEntitlementsForSubscriptionResponse {
|
|
103
|
+
/**
|
|
104
|
+
* @description Retrieves the list of `subscription_entitlements` for the [subscription](/docs/api/subscriptions).
|
|
105
|
+
**Note:**
|
|
106
|
+
|
|
107
|
+
The `components` attribute is not returned for any of the `subscription_entitlements`. Use the retrieve operation(coming soon) to obtain the `components`.
|
|
108
|
+
|
|
109
|
+
*/
|
|
110
|
+
|
|
111
|
+
list:{subscription_entitlement:SubscriptionEntitlement}[];
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* @description Retrieves the list of `subscription_entitlements` for the [subscription](/docs/api/subscriptions).
|
|
115
|
+
**Note:**
|
|
116
|
+
|
|
117
|
+
The `components` attribute is not returned for any of the `subscription_entitlements`. Use the retrieve operation(coming soon) to obtain the `components`.
|
|
118
|
+
|
|
119
|
+
*/
|
|
120
|
+
|
|
121
|
+
next_offset?:string;
|
|
30
122
|
}
|
|
31
123
|
export interface SubscriptionEntitlementsForSubscriptionInputParam {
|
|
32
|
-
[key : string]: any;
|
|
124
|
+
[key : string]: any;
|
|
125
|
+
/**
|
|
126
|
+
* @description The number of resources to be returned.
|
|
127
|
+
|
|
128
|
+
*/
|
|
129
|
+
|
|
33
130
|
limit?:number;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* @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.
|
|
134
|
+
|
|
135
|
+
*/
|
|
136
|
+
|
|
34
137
|
offset?:string;
|
|
35
138
|
}
|
|
36
|
-
export interface Component {
|
|
139
|
+
export interface Component {
|
|
140
|
+
/**
|
|
141
|
+
* @description When a subscription entitlement has been explicitly overridden, this object contains the details of said override. An `entitlement_override` can be [temporary](/docs/api/entitlement_overrides#entitlement_override_expires_at) such that it expires at some point in time and is no longer returned.
|
|
142
|
+
|
|
143
|
+
*/
|
|
144
|
+
|
|
37
145
|
entitlement_overrides?:EntitlementOverride;
|
|
38
146
|
}
|
|
39
147
|
}
|
|
@@ -1,48 +1,82 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
2
|
declare module 'chargebee' {
|
|
3
3
|
export interface SubscriptionEstimate {
|
|
4
|
+
|
|
4
5
|
id?:string;
|
|
6
|
+
|
|
5
7
|
currency_code:string;
|
|
8
|
+
|
|
6
9
|
status?:'in_trial' | 'paused' | 'future' | 'active' | 'cancelled' | 'non_renewing';
|
|
10
|
+
|
|
7
11
|
trial_end_action?:TrialEndAction;
|
|
12
|
+
|
|
8
13
|
next_billing_at?:number;
|
|
14
|
+
|
|
9
15
|
pause_date?:number;
|
|
16
|
+
|
|
10
17
|
resume_date?:number;
|
|
18
|
+
|
|
11
19
|
shipping_address?:SubscriptionEstimate.ShippingAddress;
|
|
20
|
+
|
|
12
21
|
contract_term?:SubscriptionEstimate.ContractTerm;
|
|
13
22
|
}
|
|
14
23
|
export namespace SubscriptionEstimate {
|
|
15
24
|
|
|
16
25
|
|
|
17
|
-
export interface ShippingAddress {
|
|
26
|
+
export interface ShippingAddress {
|
|
18
27
|
first_name?:string;
|
|
28
|
+
|
|
19
29
|
last_name?:string;
|
|
30
|
+
|
|
20
31
|
email?:string;
|
|
32
|
+
|
|
21
33
|
company?:string;
|
|
34
|
+
|
|
22
35
|
phone?:string;
|
|
36
|
+
|
|
23
37
|
line1?:string;
|
|
38
|
+
|
|
24
39
|
line2?:string;
|
|
40
|
+
|
|
25
41
|
line3?:string;
|
|
42
|
+
|
|
26
43
|
city?:string;
|
|
44
|
+
|
|
27
45
|
state_code?:string;
|
|
46
|
+
|
|
28
47
|
state?:string;
|
|
48
|
+
|
|
29
49
|
country?:string;
|
|
50
|
+
|
|
30
51
|
zip?:string;
|
|
52
|
+
|
|
31
53
|
validation_status?:ValidationStatus;
|
|
54
|
+
|
|
32
55
|
index?:number;
|
|
33
56
|
}
|
|
34
|
-
export interface ContractTerm {
|
|
57
|
+
export interface ContractTerm {
|
|
35
58
|
id?:string;
|
|
59
|
+
|
|
36
60
|
status?:'active' | 'cancelled' | 'completed' | 'terminated';
|
|
61
|
+
|
|
37
62
|
contract_start?:number;
|
|
63
|
+
|
|
38
64
|
contract_end?:number;
|
|
65
|
+
|
|
39
66
|
billing_cycle?:number;
|
|
67
|
+
|
|
40
68
|
action_at_term_end?:'cancel' | 'renew_once' | 'renew' | 'evergreen';
|
|
69
|
+
|
|
41
70
|
total_contract_value?:number;
|
|
71
|
+
|
|
42
72
|
total_contract_value_before_tax?:number;
|
|
73
|
+
|
|
43
74
|
cancellation_cutoff_period?:number;
|
|
75
|
+
|
|
44
76
|
created_at?:number;
|
|
77
|
+
|
|
45
78
|
subscription_id?:string;
|
|
79
|
+
|
|
46
80
|
remaining_billing_cycles?:number;
|
|
47
81
|
}
|
|
48
82
|
}
|
|
@@ -1,12 +1,44 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
2
|
declare module 'chargebee' {
|
|
3
3
|
export interface TaxWithheld {
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @description An auto-generated unique identifier for the tax withheld. The value starts with the prefix `tax_wh_`. For example, `tax_wh_16BdDXSlbu4uV1Ee6`.
|
|
7
|
+
|
|
8
|
+
*/
|
|
9
|
+
|
|
4
10
|
id:string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @description A unique external reference number for the tax withheld. Typically, this is the reference number used by the system you are integrating the API with. Depending on your integration, this could be the reference number issued by the taxation authority to identify the customer or the specific tax transaction.
|
|
14
|
+
|
|
15
|
+
*/
|
|
16
|
+
|
|
5
17
|
reference_number?:string;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @description The description for this tax withheld.
|
|
21
|
+
|
|
22
|
+
*/
|
|
23
|
+
|
|
6
24
|
description?:string;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @description Date or time associated with the tax withheld.
|
|
28
|
+
|
|
29
|
+
*/
|
|
30
|
+
|
|
7
31
|
date?:number;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @description The amount withheld by the customer as tax from the invoice. The unit depends on the [type of currency](/docs/api#md_disabled).
|
|
35
|
+
|
|
36
|
+
*/
|
|
37
|
+
|
|
8
38
|
amount?:number;
|
|
39
|
+
|
|
9
40
|
resource_version?:number;
|
|
41
|
+
|
|
10
42
|
updated_at?:number;
|
|
11
43
|
}
|
|
12
44
|
}
|
|
@@ -1,9 +1,33 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
2
|
declare module 'chargebee' {
|
|
3
3
|
export interface ThirdPartyPaymentMethod {
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @description Type of the payment method. \* direct_debit - Represents bank account for which the direct debit or ACH agreement/mandate is created. \* unionpay - Payments made via UnionPay. \* google_pay - Payments made via Google Pay. \* dotpay - Payments made via Dotpay. \* generic - Payments made via Generic Payment Method. \* giropay - Payments made via giropay. \* paypal_express_checkout - Payments made via PayPal Express Checkout. \* alipay - Payments made via Alipay. \* sofort - Payments made via Sofort. \* wechat_pay - Payments made via WeChat Pay. \* ideal - Payments made via iDEAL. \* netbanking_emandates - Netbanking (eMandates) Payments. \* upi - UPI Payments. \* bancontact - Payments made via Bancontact Card. \* card - Card based payment including credit cards and debit cards. Details about the card can be obtained from the card resource. \* amazon_payments - Payments made via Amazon Payments. \* apple_pay - Payments made via Apple Pay.
|
|
7
|
+
|
|
8
|
+
*/
|
|
9
|
+
|
|
4
10
|
type:Type;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @description Name of the gateway this card is stored with. \* 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
|
+
|
|
15
|
+
*/
|
|
16
|
+
|
|
5
17
|
gateway:Gateway;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @description The gateway account this payment method is stored with.
|
|
21
|
+
|
|
22
|
+
*/
|
|
23
|
+
|
|
6
24
|
gateway_account_id?:string;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @description Identifier provided by the gateway to reference that specific card.
|
|
28
|
+
|
|
29
|
+
*/
|
|
30
|
+
|
|
7
31
|
reference_id:string;
|
|
8
32
|
}
|
|
9
33
|
}
|
|
@@ -1,34 +1,126 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
2
|
declare module 'chargebee' {
|
|
3
3
|
export interface TimeMachine {
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @description The name of the time machine. Currently only **delorean** is allowed
|
|
7
|
+
|
|
8
|
+
*/
|
|
9
|
+
|
|
4
10
|
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
|
+
|
|
16
|
+
*/
|
|
17
|
+
|
|
5
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'
|
|
22
|
+
|
|
23
|
+
*/
|
|
24
|
+
|
|
6
25
|
genesis_time:number;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @description The destination time to which the time machine is travelling (or has traveled)
|
|
29
|
+
|
|
30
|
+
*/
|
|
31
|
+
|
|
7
32
|
destination_time:number;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @description The failure code. This will follow the api error code convention
|
|
36
|
+
|
|
37
|
+
*/
|
|
38
|
+
|
|
8
39
|
failure_code?:string;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @description The more descriptive failure reason.
|
|
43
|
+
|
|
44
|
+
*/
|
|
45
|
+
|
|
9
46
|
failure_reason?:string;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @description The failure details as error json.
|
|
50
|
+
|
|
51
|
+
*/
|
|
52
|
+
|
|
10
53
|
error_json?:string;
|
|
11
54
|
}
|
|
12
55
|
export namespace TimeMachine {
|
|
13
|
-
export class TimeMachineResource {
|
|
56
|
+
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
|
+
|
|
14
62
|
retrieve(time_machine_name:string):ChargebeeRequest<RetrieveResponse>;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @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.
|
|
66
|
+
|
|
67
|
+
*/
|
|
68
|
+
|
|
15
69
|
travel_forward(time_machine_name:string, input?:TravelForwardInputParam):ChargebeeRequest<TravelForwardResponse>;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* @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.
|
|
73
|
+
|
|
74
|
+
**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.
|
|
75
|
+
|
|
76
|
+
*/
|
|
77
|
+
|
|
16
78
|
start_afresh(time_machine_name:string, input?:StartAfreshInputParam):ChargebeeRequest<StartAfreshResponse>;
|
|
17
79
|
}
|
|
18
|
-
export interface RetrieveResponse {
|
|
19
|
-
|
|
80
|
+
export interface RetrieveResponse {
|
|
81
|
+
/**
|
|
82
|
+
* @description Retrieves the time machine. Currently only one time machine is available per site and is named 'delorean'.
|
|
83
|
+
|
|
84
|
+
*/
|
|
85
|
+
|
|
86
|
+
time_machine:TimeMachine;
|
|
20
87
|
}
|
|
21
88
|
|
|
22
|
-
export interface TravelForwardResponse {
|
|
23
|
-
|
|
89
|
+
export interface TravelForwardResponse {
|
|
90
|
+
/**
|
|
91
|
+
* @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.
|
|
92
|
+
|
|
93
|
+
*/
|
|
94
|
+
|
|
95
|
+
time_machine:TimeMachine;
|
|
24
96
|
}
|
|
25
97
|
export interface TravelForwardInputParam {
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @description The **time** to travel to. Should be between the 'current' destination time of the time machine and present time.
|
|
101
|
+
|
|
102
|
+
*/
|
|
103
|
+
|
|
26
104
|
destination_time?:number;
|
|
27
105
|
}
|
|
28
|
-
export interface StartAfreshResponse {
|
|
29
|
-
|
|
106
|
+
export interface StartAfreshResponse {
|
|
107
|
+
/**
|
|
108
|
+
* @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.
|
|
109
|
+
|
|
110
|
+
**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.
|
|
111
|
+
|
|
112
|
+
*/
|
|
113
|
+
|
|
114
|
+
time_machine:TimeMachine;
|
|
30
115
|
}
|
|
31
116
|
export interface StartAfreshInputParam {
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* @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.
|
|
120
|
+
**Note:** Can only be in the past.
|
|
121
|
+
|
|
122
|
+
*/
|
|
123
|
+
|
|
32
124
|
genesis_time?:number;
|
|
33
125
|
}
|
|
34
126
|
|