chargebee 2.40.0 → 3.0.0-beta.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 +10 -1
- package/LICENSE +1 -1
- package/README.md +90 -172
- package/cjs/RequestWrapper.js +81 -0
- package/cjs/asyncApiSupport.js +39 -0
- package/cjs/chargebee.cjs.js +13 -0
- package/cjs/chargebee.cjs.worker.js +9 -0
- package/cjs/chargebeeError.js +17 -0
- package/cjs/coreCommon.js +72 -0
- package/cjs/createChargebee.js +92 -0
- package/cjs/environment.js +18 -0
- package/cjs/filter.js +1 -0
- package/cjs/net/ClientInterface.js +40 -0
- package/cjs/net/FetchClient.js +86 -0
- package/cjs/net/NodeClient.js +61 -0
- package/cjs/package.json +1 -0
- package/cjs/resources/api_endpoints.js +1086 -0
- package/cjs/util.js +218 -0
- package/esm/RequestWrapper.js +77 -0
- package/esm/asyncApiSupport.js +35 -0
- package/esm/chargebee.esm.js +9 -0
- package/esm/chargebee.esm.worker.js +5 -0
- package/esm/chargebeeError.js +13 -0
- package/esm/coreCommon.js +67 -0
- package/esm/createChargebee.js +88 -0
- package/esm/environment.js +15 -0
- package/esm/filter.js +1 -0
- package/esm/net/ClientInterface.js +35 -0
- package/esm/net/FetchClient.js +81 -0
- package/esm/net/NodeClient.js +56 -0
- package/esm/package.json +1 -0
- package/esm/resources/api_endpoints.js +1083 -0
- package/esm/util.js +202 -0
- package/package.json +69 -38
- package/types/core.d.ts +558 -89
- package/types/index.d.ts +91 -54
- package/types/resources/Address.d.ts +57 -272
- package/types/resources/AdvanceInvoiceSchedule.d.ts +21 -94
- package/types/resources/AttachedItem.d.ts +91 -329
- package/types/resources/Attribute.d.ts +5 -5
- package/types/resources/BusinessEntity.d.ts +49 -69
- package/types/resources/BusinessEntityTransfer.d.ts +11 -17
- package/types/resources/Card.d.ts +146 -424
- package/types/resources/Comment.d.ts +72 -189
- package/types/resources/Contact.d.ts +12 -64
- package/types/resources/ContractTerm.d.ts +15 -96
- package/types/resources/Coupon.d.ts +282 -758
- package/types/resources/CouponCode.d.ts +56 -52
- package/types/resources/CouponSet.d.ts +92 -234
- package/types/resources/CreditNote.d.ts +588 -1758
- package/types/resources/CreditNoteEstimate.d.ts +131 -157
- package/types/resources/Currency.d.ts +75 -62
- package/types/resources/Customer.d.ts +892 -835
- package/types/resources/CustomerEntitlement.d.ts +36 -0
- package/types/resources/DifferentialPrice.d.ts +116 -314
- package/types/resources/Discount.d.ts +20 -125
- package/types/resources/Download.d.ts +6 -22
- package/types/resources/Entitlement.d.ts +51 -160
- package/types/resources/EntitlementOverride.d.ts +58 -139
- package/types/resources/Estimate.d.ts +1178 -527
- package/types/resources/Event.d.ts +67 -178
- package/types/resources/Export.d.ts +563 -723
- package/types/resources/Feature.d.ts +117 -433
- package/types/resources/GatewayErrorDetail.d.ts +16 -72
- package/types/resources/Gift.d.ts +265 -432
- package/types/resources/Hierarchy.d.ts +8 -36
- package/types/resources/HostedPage.d.ts +1017 -1153
- package/types/resources/ImpactedItem.d.ts +13 -50
- package/types/resources/ImpactedItemPrice.d.ts +13 -15
- package/types/resources/ImpactedSubscription.d.ts +13 -45
- package/types/resources/InAppSubscription.d.ts +93 -389
- package/types/resources/Installment.d.ts +35 -110
- package/types/resources/InstallmentConfig.d.ts +54 -155
- package/types/resources/InstallmentDetail.d.ts +19 -27
- package/types/resources/Invoice.d.ts +1574 -3157
- package/types/resources/InvoiceEstimate.d.ts +131 -161
- package/types/resources/Item.d.ts +133 -611
- package/types/resources/ItemEntitlement.d.ts +78 -215
- package/types/resources/ItemFamily.d.ts +69 -178
- package/types/resources/ItemPrice.d.ts +291 -1203
- package/types/resources/Metadata.d.ts +3 -5
- package/types/resources/Order.d.ts +538 -1471
- package/types/resources/PaymentIntent.d.ts +163 -347
- package/types/resources/PaymentReferenceNumber.d.ts +7 -29
- package/types/resources/PaymentSource.d.ts +476 -1272
- package/types/resources/PaymentVoucher.d.ts +87 -306
- package/types/resources/PortalSession.d.ts +71 -207
- package/types/resources/PriceVariant.d.ts +91 -279
- package/types/resources/PricingPageSession.d.ts +92 -41
- package/types/resources/PromotionalCredit.d.ts +90 -346
- package/types/resources/Purchase.d.ts +185 -315
- package/types/resources/Quote.d.ts +1406 -887
- package/types/resources/QuoteLineGroup.d.ts +125 -452
- package/types/resources/QuotedCharge.d.ts +45 -274
- package/types/resources/QuotedSubscription.d.ts +100 -488
- package/types/resources/Ramp.d.ts +233 -724
- package/types/resources/ResourceMigration.d.ts +25 -80
- package/types/resources/SiteMigrationDetail.d.ts +34 -112
- package/types/resources/Subscription.d.ts +2390 -4335
- package/types/resources/SubscriptionEntitlement.d.ts +59 -160
- package/types/resources/SubscriptionEstimate.d.ts +51 -75
- package/types/resources/TaxWithheld.d.ts +15 -40
- package/types/resources/ThirdPartyPaymentMethod.d.ts +7 -29
- package/types/resources/TimeMachine.d.ts +43 -97
- package/types/resources/Token.d.ts +15 -85
- package/types/resources/Transaction.d.ts +278 -900
- package/types/resources/UnbilledCharge.d.ts +189 -164
- package/types/resources/Usage.d.ts +89 -279
- package/types/resources/VirtualBankAccount.d.ts +103 -255
- package/types/resources/filter.d.ts +52 -0
- package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -81
- package/.github/ISSUE_TEMPLATE/config.yml +0 -6
- package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -34
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -8
- package/lib/chargebee.js +0 -512
- package/lib/resources/api_endpoints.js +0 -2912
- package/types/resources/NonSubscription.d.ts +0 -30
- package/types/resources/Session.d.ts +0 -41
|
@@ -1,180 +1,79 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
2
|
///<reference path='./../index.d.ts'/>
|
|
3
|
+
///<reference path='./filter.d.ts'/>
|
|
3
4
|
declare module 'chargebee' {
|
|
4
5
|
export interface SubscriptionEntitlement {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
feature_id?:string;
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* @description The [name of the feature](/docs/api/features#feature_name) towards which this subscription entitlement has been granted.
|
|
22
|
-
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
feature_name?:string;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* @description [The unit of measure](/docs/api/features#feature_unit) for the feature when its `type` is either `quantity` or `range`.
|
|
29
|
-
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
feature_unit?:string;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* @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`.
|
|
36
|
-
|
|
37
|
-
*/
|
|
38
|
-
|
|
39
|
-
value?:string;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* @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:
|
|
43
|
-
|
|
44
|
-
* 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`.
|
|
45
|
-
* When `feature.type` is `custom`: the `name` is the same as `inherited_entitlements.value`.
|
|
46
|
-
* When `feature.type` is `switch`: `name` is not applicable.
|
|
47
|
-
|
|
48
|
-
*/
|
|
49
|
-
|
|
50
|
-
name?:string;
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* @description Indicates that `components.entitlement_overrides` exists.
|
|
54
|
-
|
|
55
|
-
*/
|
|
56
|
-
|
|
57
|
-
is_overridden:boolean;
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* @description Indicates that `components.is_enabled` exists.
|
|
61
|
-
|
|
62
|
-
*/
|
|
63
|
-
|
|
64
|
-
is_enabled:boolean;
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* @description Timestamp when the subscription entitlements are going to expire.
|
|
68
|
-
|
|
69
|
-
*/
|
|
70
|
-
effective_from?:number;
|
|
71
|
-
|
|
72
|
-
schedule_status?:'activated' | 'scheduled' | 'failed';
|
|
73
|
-
|
|
74
|
-
expires_at?:number;
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* @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.
|
|
78
|
-
|
|
79
|
-
*/
|
|
80
|
-
|
|
81
|
-
components?:SubscriptionEntitlement.Component;
|
|
82
|
-
feature_type?:string;
|
|
6
|
+
subscription_id: string;
|
|
7
|
+
feature_id?: string;
|
|
8
|
+
feature_name?: string;
|
|
9
|
+
feature_unit?: string;
|
|
10
|
+
feature_type?: string;
|
|
11
|
+
value?: string;
|
|
12
|
+
name?: string;
|
|
13
|
+
is_overridden: boolean;
|
|
14
|
+
is_enabled: boolean;
|
|
15
|
+
effective_from?: number;
|
|
16
|
+
schedule_status?: 'activated' | 'scheduled' | 'failed';
|
|
17
|
+
expires_at?: number;
|
|
18
|
+
components?: SubscriptionEntitlement.Component;
|
|
83
19
|
}
|
|
84
|
-
export namespace SubscriptionEntitlement {
|
|
85
|
-
export class SubscriptionEntitlementResource {
|
|
86
|
-
/**
|
|
87
|
-
* @description Retrieves the list of `subscription_entitlements` for the [subscription](/docs/api/subscriptions).
|
|
88
|
-
**Note:**
|
|
89
|
-
|
|
90
|
-
The `components` attribute is not returned for any of the `subscription_entitlements`. Use the retrieve operation(coming soon) to obtain the `components`.
|
|
91
20
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
21
|
+
export namespace SubscriptionEntitlement {
|
|
22
|
+
export class SubscriptionEntitlementResource {
|
|
23
|
+
subscriptionEntitlementsForSubscription(
|
|
24
|
+
subscription_id: string,
|
|
25
|
+
input?: SubscriptionEntitlementsForSubscriptionInputParam,
|
|
26
|
+
headers?: ChargebeeRequestHeader,
|
|
27
|
+
): Promise<
|
|
28
|
+
ChargebeeResponse<SubscriptionEntitlementsForSubscriptionResponse>
|
|
29
|
+
>;
|
|
30
|
+
|
|
31
|
+
setSubscriptionEntitlementAvailability(
|
|
32
|
+
subscription_id: string,
|
|
33
|
+
input: SetSubscriptionEntitlementAvailabilityInputParam,
|
|
34
|
+
headers?: ChargebeeRequestHeader,
|
|
35
|
+
): Promise<
|
|
36
|
+
ChargebeeResponse<SetSubscriptionEntitlementAvailabilityResponse>
|
|
37
|
+
>;
|
|
102
38
|
}
|
|
103
|
-
export interface SubscriptionEntitlementsForSubscriptionResponse {
|
|
104
|
-
/**
|
|
105
|
-
* @description Retrieves the list of `subscription_entitlements` for the [subscription](/docs/api/subscriptions).
|
|
106
|
-
**Note:**
|
|
107
39
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
list:{subscription_entitlement:SubscriptionEntitlement}[];
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* @description Retrieves the list of `subscription_entitlements` for the [subscription](/docs/api/subscriptions).
|
|
116
|
-
**Note:**
|
|
40
|
+
export interface SubscriptionEntitlementsForSubscriptionResponse {
|
|
41
|
+
list: { subscription_entitlement: SubscriptionEntitlement }[];
|
|
42
|
+
next_offset?: string;
|
|
43
|
+
}
|
|
117
44
|
|
|
118
|
-
|
|
45
|
+
export interface SetSubscriptionEntitlementAvailabilityResponse {
|
|
46
|
+
subscription_entitlement: SubscriptionEntitlement;
|
|
47
|
+
}
|
|
119
48
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
next_offset?:string;
|
|
49
|
+
export interface Component {
|
|
50
|
+
entitlement_overrides?: EntitlementOverride;
|
|
123
51
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* @description Retrieves the list of `subscription_entitlements` for the [subscription](/docs/api/subscriptions).
|
|
128
|
-
**Note:**
|
|
52
|
+
// REQUEST PARAMS
|
|
53
|
+
//---------------
|
|
129
54
|
|
|
130
|
-
|
|
55
|
+
export interface SubscriptionEntitlementsForSubscriptionInputParam {
|
|
56
|
+
limit?: number;
|
|
57
|
+
offset?: string /**
|
|
58
|
+
* @deprecated Please refer API docs to use other attributes
|
|
59
|
+
*/;
|
|
131
60
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* @description Retrieves the list of `subscription_entitlements` for the [subscription](/docs/api/subscriptions).
|
|
138
|
-
**Note:**
|
|
61
|
+
include_drafts?: boolean /**
|
|
62
|
+
* @deprecated Please refer API docs to use other attributes
|
|
63
|
+
*/;
|
|
139
64
|
|
|
140
|
-
|
|
65
|
+
embed?: string /**
|
|
66
|
+
* @deprecated Please refer API docs to use other attributes
|
|
67
|
+
*/;
|
|
141
68
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
offset?:string;
|
|
145
|
-
|
|
146
|
-
include_drafts?:boolean;
|
|
147
|
-
|
|
148
|
-
embed?:string;
|
|
149
|
-
|
|
150
|
-
include_scheduled_overrides?:boolean;
|
|
151
|
-
}
|
|
152
|
-
export interface SetSubscriptionEntitlementAvailabilityResponse {
|
|
153
|
-
subscription_entitlement:SubscriptionEntitlement;
|
|
69
|
+
include_scheduled_overrides?: boolean;
|
|
154
70
|
}
|
|
155
71
|
export interface SetSubscriptionEntitlementAvailabilityInputParam {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
* @description Specifies whether the `subscription_entitlements` are to be enabled or disabled.
|
|
159
|
-
|
|
160
|
-
*/
|
|
161
|
-
|
|
162
|
-
is_enabled:boolean;
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* @description Parameters for subscription_entitlements
|
|
166
|
-
|
|
167
|
-
*/
|
|
168
|
-
|
|
169
|
-
subscription_entitlements:{feature_id:string}[];
|
|
72
|
+
is_enabled: boolean;
|
|
73
|
+
subscription_entitlements?: SubscriptionEntitlementsSetSubscriptionEntitlementAvailabilityInputParam[];
|
|
170
74
|
}
|
|
171
|
-
export interface
|
|
172
|
-
|
|
173
|
-
* @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.
|
|
174
|
-
|
|
175
|
-
*/
|
|
176
|
-
|
|
177
|
-
entitlement_overrides?:EntitlementOverride;
|
|
75
|
+
export interface SubscriptionEntitlementsSetSubscriptionEntitlementAvailabilityInputParam {
|
|
76
|
+
feature_id: string;
|
|
178
77
|
}
|
|
179
78
|
}
|
|
180
|
-
}
|
|
79
|
+
}
|
|
@@ -1,83 +1,59 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
|
|
2
4
|
declare module 'chargebee' {
|
|
3
5
|
export interface SubscriptionEstimate {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
resume_date?:number;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
contract_term?:SubscriptionEstimate.ContractTerm;
|
|
6
|
+
id?: string;
|
|
7
|
+
currency_code: string;
|
|
8
|
+
status?:
|
|
9
|
+
| 'future'
|
|
10
|
+
| 'in_trial'
|
|
11
|
+
| 'active'
|
|
12
|
+
| 'non_renewing'
|
|
13
|
+
| 'paused'
|
|
14
|
+
| 'cancelled'
|
|
15
|
+
| 'transferred';
|
|
16
|
+
trial_end_action?: TrialEndAction;
|
|
17
|
+
next_billing_at?: number;
|
|
18
|
+
pause_date?: number;
|
|
19
|
+
resume_date?: number;
|
|
20
|
+
shipping_address?: SubscriptionEstimate.ShippingAddress;
|
|
21
|
+
contract_term?: SubscriptionEstimate.ContractTerm;
|
|
22
22
|
}
|
|
23
|
+
|
|
23
24
|
export namespace SubscriptionEstimate {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
line3?:string;
|
|
42
|
-
|
|
43
|
-
city?:string;
|
|
44
|
-
|
|
45
|
-
state_code?:string;
|
|
46
|
-
|
|
47
|
-
state?:string;
|
|
48
|
-
|
|
49
|
-
country?:string;
|
|
50
|
-
|
|
51
|
-
zip?:string;
|
|
52
|
-
|
|
53
|
-
validation_status?:ValidationStatus;
|
|
54
|
-
|
|
55
|
-
index:number;
|
|
25
|
+
export interface ShippingAddress {
|
|
26
|
+
first_name?: string;
|
|
27
|
+
last_name?: string;
|
|
28
|
+
email?: string;
|
|
29
|
+
company?: string;
|
|
30
|
+
phone?: string;
|
|
31
|
+
line1?: string;
|
|
32
|
+
line2?: string;
|
|
33
|
+
line3?: string;
|
|
34
|
+
city?: string;
|
|
35
|
+
state_code?: string;
|
|
36
|
+
state?: string;
|
|
37
|
+
country?: string;
|
|
38
|
+
zip?: string;
|
|
39
|
+
validation_status?: ValidationStatus;
|
|
40
|
+
index: number;
|
|
56
41
|
}
|
|
57
|
-
export interface ContractTerm {
|
|
58
|
-
id:string;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
total_contract_value:number;
|
|
71
|
-
|
|
72
|
-
total_contract_value_before_tax:number;
|
|
73
|
-
|
|
74
|
-
cancellation_cutoff_period?:number;
|
|
75
|
-
|
|
76
|
-
created_at:number;
|
|
77
|
-
|
|
78
|
-
subscription_id:string;
|
|
79
|
-
|
|
80
|
-
remaining_billing_cycles?:number;
|
|
42
|
+
export interface ContractTerm {
|
|
43
|
+
id: string;
|
|
44
|
+
status: 'active' | 'completed' | 'cancelled' | 'terminated';
|
|
45
|
+
contract_start: number;
|
|
46
|
+
contract_end: number;
|
|
47
|
+
billing_cycle: number;
|
|
48
|
+
action_at_term_end: 'renew' | 'evergreen' | 'cancel' | 'renew_once';
|
|
49
|
+
total_contract_value: number;
|
|
50
|
+
total_contract_value_before_tax: number;
|
|
51
|
+
cancellation_cutoff_period?: number;
|
|
52
|
+
created_at: number;
|
|
53
|
+
subscription_id: string;
|
|
54
|
+
remaining_billing_cycles?: number;
|
|
81
55
|
}
|
|
56
|
+
// REQUEST PARAMS
|
|
57
|
+
//---------------
|
|
82
58
|
}
|
|
83
|
-
}
|
|
59
|
+
}
|
|
@@ -1,44 +1,19 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
|
|
2
4
|
declare module 'chargebee' {
|
|
3
5
|
export interface TaxWithheld {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
reference_number?:string;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* @description The description for this tax withheld.
|
|
21
|
-
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
description?:string;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @description Date or time associated with the tax withheld.
|
|
28
|
-
|
|
29
|
-
*/
|
|
30
|
-
|
|
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
|
-
|
|
38
|
-
amount?:number;
|
|
39
|
-
|
|
40
|
-
resource_version?:number;
|
|
41
|
-
|
|
42
|
-
updated_at?:number;
|
|
6
|
+
id: string;
|
|
7
|
+
user?: string;
|
|
8
|
+
reference_number?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
type: 'payment' | 'refund';
|
|
11
|
+
payment_method: 'cash' | 'check' | 'chargeback' | 'bank_transfer' | 'other';
|
|
12
|
+
date?: number;
|
|
13
|
+
currency_code: string;
|
|
14
|
+
amount?: number;
|
|
15
|
+
resource_version?: number;
|
|
16
|
+
updated_at?: number;
|
|
17
|
+
exchange_rate?: number;
|
|
43
18
|
}
|
|
44
|
-
}
|
|
19
|
+
}
|
|
@@ -1,33 +1,11 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
|
|
2
4
|
declare module 'chargebee' {
|
|
3
5
|
export interface ThirdPartyPaymentMethod {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
type:Type;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @description Name of the gateway this card is stored with. \* ecentric - Ecentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities. \* 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. \* metrics_global - Metrics global is a leading payment service provider providing unified payment services in the US. \* 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. \* windcave - Windcave provides an end to end payment processing solution in ANZ and other leading global markets. \* 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. \* bank_of_america - Bank of America 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. \* ebanx - EBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion.
|
|
14
|
-
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
gateway:Gateway;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* @description The gateway account this payment method is stored with.
|
|
21
|
-
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
gateway_account_id?:string;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @description Identifier provided by the gateway to reference that specific card.
|
|
28
|
-
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
reference_id:string;
|
|
6
|
+
type: Type;
|
|
7
|
+
gateway: Gateway;
|
|
8
|
+
gateway_account_id?: string;
|
|
9
|
+
reference_id: string;
|
|
32
10
|
}
|
|
33
|
-
}
|
|
11
|
+
}
|
|
@@ -1,111 +1,57 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
|
|
2
4
|
declare module 'chargebee' {
|
|
3
5
|
export interface TimeMachine {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
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
|
-
|
|
25
|
-
genesis_time:number;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* @description The destination time to which the time machine is travelling (or has traveled)
|
|
29
|
-
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
destination_time:number;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* @description The failure code. This will follow the api error code convention
|
|
36
|
-
|
|
37
|
-
*/
|
|
38
|
-
|
|
39
|
-
failure_code?:string;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* @description The more descriptive failure reason.
|
|
43
|
-
|
|
44
|
-
*/
|
|
45
|
-
|
|
46
|
-
failure_reason?:string;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* @description The failure details as error json.
|
|
50
|
-
|
|
51
|
-
*/
|
|
52
|
-
|
|
53
|
-
error_json?:string;
|
|
6
|
+
name: string;
|
|
7
|
+
time_travel_status: 'not_enabled' | 'in_progress' | 'succeeded' | 'failed';
|
|
8
|
+
genesis_time: number;
|
|
9
|
+
destination_time: number;
|
|
10
|
+
failure_code?: string;
|
|
11
|
+
failure_reason?: string;
|
|
12
|
+
error_json?: string;
|
|
54
13
|
}
|
|
55
|
-
export namespace TimeMachine {
|
|
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
|
-
|
|
62
|
-
retrieve(time_machine_name:string):ChargebeeRequest<RetrieveResponse>;
|
|
63
|
-
|
|
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
14
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
15
|
+
export namespace TimeMachine {
|
|
16
|
+
export class TimeMachineResource {
|
|
17
|
+
retrieve(
|
|
18
|
+
time_machine_name: string,
|
|
19
|
+
headers?: ChargebeeRequestHeader,
|
|
20
|
+
): Promise<ChargebeeResponse<RetrieveResponse>>;
|
|
21
|
+
|
|
22
|
+
startAfresh(
|
|
23
|
+
time_machine_name: string,
|
|
24
|
+
input?: StartAfreshInputParam,
|
|
25
|
+
headers?: ChargebeeRequestHeader,
|
|
26
|
+
): Promise<ChargebeeResponse<StartAfreshResponse>>;
|
|
27
|
+
|
|
28
|
+
travelForward(
|
|
29
|
+
time_machine_name: string,
|
|
30
|
+
input?: TravelForwardInputParam,
|
|
31
|
+
headers?: ChargebeeRequestHeader,
|
|
32
|
+
): Promise<ChargebeeResponse<TravelForwardResponse>>;
|
|
79
33
|
}
|
|
80
|
-
|
|
81
|
-
|
|
34
|
+
|
|
35
|
+
export interface RetrieveResponse {
|
|
36
|
+
time_machine: TimeMachine;
|
|
82
37
|
}
|
|
83
|
-
|
|
84
|
-
export interface StartAfreshResponse {
|
|
85
|
-
|
|
38
|
+
|
|
39
|
+
export interface StartAfreshResponse {
|
|
40
|
+
time_machine: TimeMachine;
|
|
86
41
|
}
|
|
87
|
-
export interface StartAfreshInputParam {
|
|
88
|
-
|
|
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
42
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
genesis_time?:number;
|
|
43
|
+
export interface TravelForwardResponse {
|
|
44
|
+
time_machine: TimeMachine;
|
|
96
45
|
}
|
|
97
|
-
|
|
98
|
-
|
|
46
|
+
|
|
47
|
+
// REQUEST PARAMS
|
|
48
|
+
//---------------
|
|
49
|
+
|
|
50
|
+
export interface StartAfreshInputParam {
|
|
51
|
+
genesis_time?: number;
|
|
99
52
|
}
|
|
100
53
|
export interface TravelForwardInputParam {
|
|
101
|
-
|
|
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
|
-
destination_time?:number;
|
|
54
|
+
destination_time?: number;
|
|
108
55
|
}
|
|
109
|
-
|
|
110
56
|
}
|
|
111
|
-
}
|
|
57
|
+
}
|