@wix/auto_sdk_subscription_subscriptions 1.0.7 → 1.0.8
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/build/cjs/index.d.ts +379 -1
- package/build/cjs/index.js +5651 -15
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +4678 -1
- package/build/cjs/index.typings.js +4714 -15
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +2373 -1
- package/build/cjs/meta.js +3612 -15
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +379 -0
- package/build/es/index.mjs +5549 -0
- package/build/es/index.mjs.map +1 -0
- package/build/{internal/cjs/src/billing-v1-subscription-subscriptions.universal.d.ts → es/index.typings.d.mts} +790 -1149
- package/build/es/index.typings.mjs +4625 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +2373 -0
- package/build/es/meta.mjs +3557 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/internal/cjs/index.d.ts +403 -1
- package/build/internal/cjs/index.js +5651 -15
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +4702 -1
- package/build/internal/cjs/index.typings.js +4714 -15
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +2373 -1
- package/build/internal/cjs/meta.js +3612 -15
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +403 -0
- package/build/internal/es/index.mjs +5549 -0
- package/build/internal/es/index.mjs.map +1 -0
- package/build/internal/es/{src/billing-v1-subscription-subscriptions.universal.d.ts → index.typings.d.mts} +793 -1128
- package/build/internal/es/index.typings.mjs +4625 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +2373 -0
- package/build/internal/es/meta.mjs +3557 -0
- package/build/internal/es/meta.mjs.map +1 -0
- package/package.json +12 -10
- package/build/cjs/src/billing-v1-subscription-subscriptions.context.d.ts +0 -99
- package/build/cjs/src/billing-v1-subscription-subscriptions.context.js +0 -142
- package/build/cjs/src/billing-v1-subscription-subscriptions.context.js.map +0 -1
- package/build/cjs/src/billing-v1-subscription-subscriptions.http.d.ts +0 -134
- package/build/cjs/src/billing-v1-subscription-subscriptions.http.js +0 -3048
- package/build/cjs/src/billing-v1-subscription-subscriptions.http.js.map +0 -1
- package/build/cjs/src/billing-v1-subscription-subscriptions.meta.d.ts +0 -94
- package/build/cjs/src/billing-v1-subscription-subscriptions.meta.js +0 -636
- package/build/cjs/src/billing-v1-subscription-subscriptions.meta.js.map +0 -1
- package/build/cjs/src/billing-v1-subscription-subscriptions.public.d.ts +0 -273
- package/build/cjs/src/billing-v1-subscription-subscriptions.public.js +0 -769
- package/build/cjs/src/billing-v1-subscription-subscriptions.public.js.map +0 -1
- package/build/cjs/src/billing-v1-subscription-subscriptions.types.d.ts +0 -4203
- package/build/cjs/src/billing-v1-subscription-subscriptions.types.js +0 -347
- package/build/cjs/src/billing-v1-subscription-subscriptions.types.js.map +0 -1
- package/build/cjs/src/billing-v1-subscription-subscriptions.universal.d.ts +0 -5013
- package/build/cjs/src/billing-v1-subscription-subscriptions.universal.js +0 -1997
- package/build/cjs/src/billing-v1-subscription-subscriptions.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/src/billing-v1-subscription-subscriptions.context.d.ts +0 -99
- package/build/es/src/billing-v1-subscription-subscriptions.context.js +0 -101
- package/build/es/src/billing-v1-subscription-subscriptions.context.js.map +0 -1
- package/build/es/src/billing-v1-subscription-subscriptions.http.d.ts +0 -134
- package/build/es/src/billing-v1-subscription-subscriptions.http.js +0 -3013
- package/build/es/src/billing-v1-subscription-subscriptions.http.js.map +0 -1
- package/build/es/src/billing-v1-subscription-subscriptions.meta.d.ts +0 -94
- package/build/es/src/billing-v1-subscription-subscriptions.meta.js +0 -578
- package/build/es/src/billing-v1-subscription-subscriptions.meta.js.map +0 -1
- package/build/es/src/billing-v1-subscription-subscriptions.public.d.ts +0 -273
- package/build/es/src/billing-v1-subscription-subscriptions.public.js +0 -696
- package/build/es/src/billing-v1-subscription-subscriptions.public.js.map +0 -1
- package/build/es/src/billing-v1-subscription-subscriptions.types.d.ts +0 -4203
- package/build/es/src/billing-v1-subscription-subscriptions.types.js +0 -344
- package/build/es/src/billing-v1-subscription-subscriptions.types.js.map +0 -1
- package/build/es/src/billing-v1-subscription-subscriptions.universal.d.ts +0 -5013
- package/build/es/src/billing-v1-subscription-subscriptions.universal.js +0 -1938
- package/build/es/src/billing-v1-subscription-subscriptions.universal.js.map +0 -1
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.context.d.ts +0 -101
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.context.js +0 -142
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.context.js.map +0 -1
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.http.d.ts +0 -134
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.http.js +0 -3048
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.http.js.map +0 -1
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.meta.d.ts +0 -94
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.meta.js +0 -636
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.meta.js.map +0 -1
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.public.d.ts +0 -293
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.public.js +0 -769
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.public.js.map +0 -1
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.types.d.ts +0 -4203
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.types.js +0 -347
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.types.js.map +0 -1
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.universal.js +0 -1997
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/billing-v1-subscription-subscriptions.context.d.ts +0 -101
- package/build/internal/es/src/billing-v1-subscription-subscriptions.context.js +0 -101
- package/build/internal/es/src/billing-v1-subscription-subscriptions.context.js.map +0 -1
- package/build/internal/es/src/billing-v1-subscription-subscriptions.http.d.ts +0 -134
- package/build/internal/es/src/billing-v1-subscription-subscriptions.http.js +0 -3013
- package/build/internal/es/src/billing-v1-subscription-subscriptions.http.js.map +0 -1
- package/build/internal/es/src/billing-v1-subscription-subscriptions.meta.d.ts +0 -94
- package/build/internal/es/src/billing-v1-subscription-subscriptions.meta.js +0 -578
- package/build/internal/es/src/billing-v1-subscription-subscriptions.meta.js.map +0 -1
- package/build/internal/es/src/billing-v1-subscription-subscriptions.public.d.ts +0 -293
- package/build/internal/es/src/billing-v1-subscription-subscriptions.public.js +0 -696
- package/build/internal/es/src/billing-v1-subscription-subscriptions.public.js.map +0 -1
- package/build/internal/es/src/billing-v1-subscription-subscriptions.types.d.ts +0 -4203
- package/build/internal/es/src/billing-v1-subscription-subscriptions.types.js +0 -344
- package/build/internal/es/src/billing-v1-subscription-subscriptions.types.js.map +0 -1
- package/build/internal/es/src/billing-v1-subscription-subscriptions.universal.js +0 -1938
- package/build/internal/es/src/billing-v1-subscription-subscriptions.universal.js.map +0 -1
|
@@ -1 +1,2373 @@
|
|
|
1
|
-
|
|
1
|
+
import { GetSubscriptionRequest as GetSubscriptionRequest$1, GetSubscriptionResponse as GetSubscriptionResponse$1, CustomerCancelSubscriptionRequest as CustomerCancelSubscriptionRequest$1, CustomerCancelSubscriptionResponse as CustomerCancelSubscriptionResponse$1, CustomerTurnOnAutoRenewalRequest as CustomerTurnOnAutoRenewalRequest$1, CustomerTurnOnAutoRenewalResponse as CustomerTurnOnAutoRenewalResponse$1, CustomerTurnOffAutoRenewalRequest as CustomerTurnOffAutoRenewalRequest$1, CustomerTurnOffAutoRenewalResponse as CustomerTurnOffAutoRenewalResponse$1, CustomerExtendSubscriptionRequest as CustomerExtendSubscriptionRequest$1, CustomerExtendSubscriptionResponse as CustomerExtendSubscriptionResponse$1, QuerySubscriptionsRequest as QuerySubscriptionsRequest$1, QuerySubscriptionsResponse as QuerySubscriptionsResponse$1, UpdateSubscriptionPaymentMethodRequest as UpdateSubscriptionPaymentMethodRequest$1, UpdateSubscriptionPaymentMethodResponse as UpdateSubscriptionPaymentMethodResponse$1, CustomerAllowedActionsRequest as CustomerAllowedActionsRequest$1, CustomerAllowedActionsResponse as CustomerAllowedActionsResponse$1, CustomerListUpcomingChargesRequest as CustomerListUpcomingChargesRequest$1, CustomerListUpcomingChargesResponse as CustomerListUpcomingChargesResponse$1, InitiatePaymentMethodSetupRequest as InitiatePaymentMethodSetupRequest$1, InitiatePaymentMethodSetupResponse as InitiatePaymentMethodSetupResponse$1, PayCycleRequest as PayCycleRequest$1, PayCycleResponse as PayCycleResponse$1, UpdateSubscriptionBillingDateRequest as UpdateSubscriptionBillingDateRequest$1, UpdateSubscriptionBillingDateResponse as UpdateSubscriptionBillingDateResponse$1, CancelSubscriptionRequest as CancelSubscriptionRequest$1, CancelSubscriptionResponse as CancelSubscriptionResponse$1, PauseSubscriptionRequest as PauseSubscriptionRequest$1, PauseSubscriptionResponse as PauseSubscriptionResponse$1, ResumeSubscriptionRequest as ResumeSubscriptionRequest$1, ResumeSubscriptionResponse as ResumeSubscriptionResponse$1, SearchSubscriptionsRequest as SearchSubscriptionsRequest$1, SearchSubscriptionsResponse as SearchSubscriptionsResponse$1, CountSubscriptionsRequest as CountSubscriptionsRequest$1, CountSubscriptionsResponse as CountSubscriptionsResponse$1, TurnOnSubscriptionAutoRenewalRequest as TurnOnSubscriptionAutoRenewalRequest$1, TurnOnSubscriptionAutoRenewalResponse as TurnOnSubscriptionAutoRenewalResponse$1, TurnOffSubscriptionAutoRenewalRequest as TurnOffSubscriptionAutoRenewalRequest$1, TurnOffSubscriptionAutoRenewalResponse as TurnOffSubscriptionAutoRenewalResponse$1, MarkLatestInvoiceAsPaidRequest as MarkLatestInvoiceAsPaidRequest$1, MarkLatestInvoiceAsPaidResponse as MarkLatestInvoiceAsPaidResponse$1, MarkBillingCycleAsPaidRequest as MarkBillingCycleAsPaidRequest$1, MarkBillingCycleAsPaidResponse as MarkBillingCycleAsPaidResponse$1, GetSubscriptionsStatsRequest as GetSubscriptionsStatsRequest$1, GetSubscriptionsStatsResponse as GetSubscriptionsStatsResponse$1, ExtendSubscriptionRequest as ExtendSubscriptionRequest$1, ExtendSubscriptionResponse as ExtendSubscriptionResponse$1, AllowedActionsRequest as AllowedActionsRequest$1, AllowedActionsResponse as AllowedActionsResponse$1, ListUpcomingChargesRequest as ListUpcomingChargesRequest$1, ListUpcomingChargesResponse as ListUpcomingChargesResponse$1, PreviewSubscriptionChargesRequest as PreviewSubscriptionChargesRequest$1, PreviewSubscriptionChargesResponse as PreviewSubscriptionChargesResponse$1, PreviewSubscriptionsChargesRequest as PreviewSubscriptionsChargesRequest$1, PreviewSubscriptionsChargesResponse as PreviewSubscriptionsChargesResponse$1, ListSubscriptionHistoryRequest as ListSubscriptionHistoryRequest$1, ListSubscriptionHistoryResponse as ListSubscriptionHistoryResponse$1 } from './index.typings.js';
|
|
2
|
+
import '@wix/sdk-types';
|
|
3
|
+
|
|
4
|
+
interface Subscription {
|
|
5
|
+
/**
|
|
6
|
+
* Subscription's unique id. Automatically generated and read-only.
|
|
7
|
+
* @format GUID
|
|
8
|
+
* @readonly
|
|
9
|
+
*/
|
|
10
|
+
id?: string | null;
|
|
11
|
+
/**
|
|
12
|
+
* Date when subscription was created
|
|
13
|
+
* @readonly
|
|
14
|
+
*/
|
|
15
|
+
createdDate?: Date | null;
|
|
16
|
+
/**
|
|
17
|
+
* Date when subscription was updated
|
|
18
|
+
* @readonly
|
|
19
|
+
*/
|
|
20
|
+
updatedDate?: Date | null;
|
|
21
|
+
/**
|
|
22
|
+
* Revision of subscription. Increments upon changes
|
|
23
|
+
* @readonly
|
|
24
|
+
*/
|
|
25
|
+
revision?: string | null;
|
|
26
|
+
/**
|
|
27
|
+
* Subscription name: minLength is 1, maxLength is 150
|
|
28
|
+
* @maxLength 150
|
|
29
|
+
*/
|
|
30
|
+
name?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Subscription description. Optional.
|
|
33
|
+
* @maxLength 500
|
|
34
|
+
*/
|
|
35
|
+
description?: string | null;
|
|
36
|
+
/**
|
|
37
|
+
* 3. No Start Date:
|
|
38
|
+
* - If the start_date is not provided, this field will default to "now",
|
|
39
|
+
* meaning the subscription will start immediately.
|
|
40
|
+
*/
|
|
41
|
+
startDate?: Date | null;
|
|
42
|
+
/**
|
|
43
|
+
* Represents when the subscription will end, relevant for subscriptions with a termed period.
|
|
44
|
+
* If not provided, will be calculated based on billing schedule. Should be empty for evergreen subscription.
|
|
45
|
+
* Note: A 13-hour tolerance is applied when validating the end date to handle for time zone differences and minor discrepancies.
|
|
46
|
+
*/
|
|
47
|
+
endDate?: Date | null;
|
|
48
|
+
/** Business origin subscription is coming from. In site-level subscription it will be vertical app_id and entity_id */
|
|
49
|
+
origin?: BusinessOrigin;
|
|
50
|
+
/** Customer information like id and identity type (member or contact) */
|
|
51
|
+
customer?: Customer;
|
|
52
|
+
/**
|
|
53
|
+
* Status of subscription
|
|
54
|
+
* @readonly
|
|
55
|
+
*/
|
|
56
|
+
status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals;
|
|
57
|
+
/** Billing details parameters including schedule, currency, etc. */
|
|
58
|
+
billingSettings?: BillingSettings;
|
|
59
|
+
/**
|
|
60
|
+
* Includes many attributes about billing status of the subscription
|
|
61
|
+
* @readonly
|
|
62
|
+
*/
|
|
63
|
+
billingStatus?: BillingStatus;
|
|
64
|
+
/** Shipping address associated with subscription. At the moment used only for payments. Optional. */
|
|
65
|
+
shippingAddress?: FullAddressDetails;
|
|
66
|
+
/** Restrictions on possible subscription actions. If not provided, default policies are all restrictions enabled. */
|
|
67
|
+
policies?: SubscriptionPolicies;
|
|
68
|
+
/**
|
|
69
|
+
* Information related to either paused subscription or scheduled for future pause
|
|
70
|
+
* @readonly
|
|
71
|
+
*/
|
|
72
|
+
pauseInfo?: PauseInfo;
|
|
73
|
+
/**
|
|
74
|
+
* Information related to cancellation for already canceled subscription or scheduled for cancel
|
|
75
|
+
* @readonly
|
|
76
|
+
*/
|
|
77
|
+
cancellationInfo?: CancellationInfo;
|
|
78
|
+
/**
|
|
79
|
+
* Pending update for the next billing cycle
|
|
80
|
+
* @readonly
|
|
81
|
+
*/
|
|
82
|
+
pendingUpdateData?: SubscriptionUpdateData;
|
|
83
|
+
/**
|
|
84
|
+
* Key / Value store to keep up to 10 additional values related to the subscription.
|
|
85
|
+
* Key max length = 50, Value max length = 200. Value can not be empty.
|
|
86
|
+
* Should not include any sensitive or PII information.
|
|
87
|
+
* @maxSize 10
|
|
88
|
+
*/
|
|
89
|
+
metadata?: Record<string, string>;
|
|
90
|
+
/**
|
|
91
|
+
* Pending update for a specific date
|
|
92
|
+
* @readonly
|
|
93
|
+
*/
|
|
94
|
+
specificDatePendingUpdateData?: SpecificDateSubscriptionUpdateData;
|
|
95
|
+
/**
|
|
96
|
+
* ChangesCounter of subscription. Increments upon every change to the domain
|
|
97
|
+
* @readonly
|
|
98
|
+
*/
|
|
99
|
+
changesCounter?: string | null;
|
|
100
|
+
/**
|
|
101
|
+
* Billing order id. Optional.
|
|
102
|
+
* @format GUID
|
|
103
|
+
*/
|
|
104
|
+
orderId?: string | null;
|
|
105
|
+
/** Platform origin subscription is coming from. */
|
|
106
|
+
platformOrigin?: PlatformOrigin;
|
|
107
|
+
/**
|
|
108
|
+
* The Business Location ID represents a business location in an external service, which includes the business address.
|
|
109
|
+
* @format GUID
|
|
110
|
+
*/
|
|
111
|
+
businessLocationId?: string | null;
|
|
112
|
+
/**
|
|
113
|
+
* items, minSize is 1, maxSize is 100
|
|
114
|
+
* @maxSize 100
|
|
115
|
+
*/
|
|
116
|
+
items?: Item[];
|
|
117
|
+
}
|
|
118
|
+
interface BusinessOrigin {
|
|
119
|
+
/** @format GUID */
|
|
120
|
+
appId?: string | null;
|
|
121
|
+
/** @format GUID */
|
|
122
|
+
entityId?: string | null;
|
|
123
|
+
}
|
|
124
|
+
interface Customer extends CustomerIdOneOf {
|
|
125
|
+
/**
|
|
126
|
+
* Visitor ID of the customer. Available when the customer is an anonymous
|
|
127
|
+
* site visitor.
|
|
128
|
+
* @format GUID
|
|
129
|
+
*/
|
|
130
|
+
visitorId?: string;
|
|
131
|
+
/**
|
|
132
|
+
* Contact ID of the customer. Available when the customer is a
|
|
133
|
+
* [contact](https://dev.wix.com/docs/rest/api-reference/people-communications/contacts/contacts/contact-v-4#contact-object).
|
|
134
|
+
* @format GUID
|
|
135
|
+
*/
|
|
136
|
+
contactId?: string;
|
|
137
|
+
/**
|
|
138
|
+
* Member ID of the customer. Available when the customer is a
|
|
139
|
+
* [member](https://dev.wix.com/docs/rest/api-reference/people-communications/members/members#member-object).
|
|
140
|
+
* @format GUID
|
|
141
|
+
*/
|
|
142
|
+
memberId?: string;
|
|
143
|
+
/**
|
|
144
|
+
* Wix account ID
|
|
145
|
+
* @format GUID
|
|
146
|
+
*/
|
|
147
|
+
accountId?: string;
|
|
148
|
+
}
|
|
149
|
+
/** @oneof */
|
|
150
|
+
interface CustomerIdOneOf {
|
|
151
|
+
/**
|
|
152
|
+
* Visitor ID of the customer. Available when the customer is an anonymous
|
|
153
|
+
* site visitor.
|
|
154
|
+
* @format GUID
|
|
155
|
+
*/
|
|
156
|
+
visitorId?: string;
|
|
157
|
+
/**
|
|
158
|
+
* Contact ID of the customer. Available when the customer is a
|
|
159
|
+
* [contact](https://dev.wix.com/docs/rest/api-reference/people-communications/contacts/contacts/contact-v-4#contact-object).
|
|
160
|
+
* @format GUID
|
|
161
|
+
*/
|
|
162
|
+
contactId?: string;
|
|
163
|
+
/**
|
|
164
|
+
* Member ID of the customer. Available when the customer is a
|
|
165
|
+
* [member](https://dev.wix.com/docs/rest/api-reference/people-communications/members/members#member-object).
|
|
166
|
+
* @format GUID
|
|
167
|
+
*/
|
|
168
|
+
memberId?: string;
|
|
169
|
+
/**
|
|
170
|
+
* Wix account ID
|
|
171
|
+
* @format GUID
|
|
172
|
+
*/
|
|
173
|
+
accountId?: string;
|
|
174
|
+
}
|
|
175
|
+
declare enum SubscriptionStatusEnumSubscriptionStatus {
|
|
176
|
+
UNKNOWN = "UNKNOWN",
|
|
177
|
+
/** Subscription created in this status, but hasn't been paid for yet. Filtered out from subscriptions querying. */
|
|
178
|
+
DRAFT = "DRAFT",
|
|
179
|
+
/** Subscription that will be active in future. */
|
|
180
|
+
PENDING = "PENDING",
|
|
181
|
+
/** Subscription is active */
|
|
182
|
+
ACTIVE = "ACTIVE",
|
|
183
|
+
/** Subscription is paused */
|
|
184
|
+
PAUSED = "PAUSED",
|
|
185
|
+
/** Subscription was ended */
|
|
186
|
+
ENDED = "ENDED",
|
|
187
|
+
/** Subscription was canceled or auto-renew off. Ended before its time. */
|
|
188
|
+
CANCELED = "CANCELED"
|
|
189
|
+
}
|
|
190
|
+
/** @enumType */
|
|
191
|
+
type SubscriptionStatusEnumSubscriptionStatusWithLiterals = SubscriptionStatusEnumSubscriptionStatus | 'UNKNOWN' | 'DRAFT' | 'PENDING' | 'ACTIVE' | 'PAUSED' | 'ENDED' | 'CANCELED';
|
|
192
|
+
interface BillingSettings {
|
|
193
|
+
/**
|
|
194
|
+
* Currency of all subscription items prices. Three letter ISO currency code. https://en.wikipedia.org/wiki/ISO_4217
|
|
195
|
+
* @format CURRENCY
|
|
196
|
+
*/
|
|
197
|
+
currency?: string;
|
|
198
|
+
/** customer payment source to make recurring payments with */
|
|
199
|
+
paymentMethod?: PaymentMethod;
|
|
200
|
+
/** Instructs how payments will be collected. */
|
|
201
|
+
collectionMethod?: CollectionMethodEnumCollectionMethodWithLiterals;
|
|
202
|
+
/**
|
|
203
|
+
* Duration of cycle. For example, 1 MONTH, 2 WEEKS, 7 DAYS, 1 YEAR etc.
|
|
204
|
+
* Shortest supported cycle duration is 7 days.
|
|
205
|
+
*/
|
|
206
|
+
cycleDuration?: Duration;
|
|
207
|
+
/**
|
|
208
|
+
* Number of billing cycles. If not set subscription auto-renewed until cycle-auto-renew will be disabled.
|
|
209
|
+
* @min 1
|
|
210
|
+
*/
|
|
211
|
+
totalCycles?: number | null;
|
|
212
|
+
/** If set to false, subscription will be canceled at the next billing cycle. */
|
|
213
|
+
cycleAutoRenew?: boolean;
|
|
214
|
+
/** Billing Schedule to be defined in order to override default billing schedule */
|
|
215
|
+
customBillingSchedule?: CustomBillingSchedule;
|
|
216
|
+
/** Definition of trial period */
|
|
217
|
+
freeTrialDuration?: Duration;
|
|
218
|
+
/**
|
|
219
|
+
* Shipping costs collected each cycle
|
|
220
|
+
* @format DECIMAL_VALUE
|
|
221
|
+
* @deprecated
|
|
222
|
+
* @replacedBy shipping_charges
|
|
223
|
+
* @targetRemovalDate 2024-10-31
|
|
224
|
+
*/
|
|
225
|
+
shippingFee?: string | null;
|
|
226
|
+
/** Billing address associated with subscription to be used for payments. */
|
|
227
|
+
billingAddress?: FullAddressDetails;
|
|
228
|
+
taxSettings?: TaxSettings;
|
|
229
|
+
/**
|
|
230
|
+
* Fees that are only added to an invoice when a specific condition is met.
|
|
231
|
+
* For example, a setup fee that only applies to the very first invoice of a
|
|
232
|
+
* subscription.
|
|
233
|
+
*
|
|
234
|
+
* Max: 5 additional fees
|
|
235
|
+
* @maxSize 5
|
|
236
|
+
*/
|
|
237
|
+
additionalFees?: AdditionalFee[];
|
|
238
|
+
/** Shipping fee charges */
|
|
239
|
+
shippingCharges?: ShippingCharges;
|
|
240
|
+
/**
|
|
241
|
+
* General discount that applied to all items in the subscription
|
|
242
|
+
* @maxSize 5
|
|
243
|
+
*/
|
|
244
|
+
discounts?: Discount[];
|
|
245
|
+
/**
|
|
246
|
+
* Details about the external collection service.
|
|
247
|
+
* Only set when the collection_method is EXTERNAL.
|
|
248
|
+
*/
|
|
249
|
+
externalCollectionDetails?: ExternalCollectionDetails;
|
|
250
|
+
}
|
|
251
|
+
interface PaymentMethod {
|
|
252
|
+
/**
|
|
253
|
+
* reference to payment source id stored in payments system
|
|
254
|
+
* @format GUID
|
|
255
|
+
*/
|
|
256
|
+
id?: string;
|
|
257
|
+
}
|
|
258
|
+
declare enum CollectionMethodEnumCollectionMethod {
|
|
259
|
+
UNKNOWN = "UNKNOWN",
|
|
260
|
+
/** Subscriber automatically charged */
|
|
261
|
+
AUTO_CHARGE = "AUTO_CHARGE",
|
|
262
|
+
/** Payments manually collected and managed by owner */
|
|
263
|
+
OFFLINE = "OFFLINE",
|
|
264
|
+
/** Payment will be collected somehow. Billing only issues invoice per cycle. */
|
|
265
|
+
SEND_INVOICE = "SEND_INVOICE",
|
|
266
|
+
/** Payment will be collected externally */
|
|
267
|
+
EXTERNAL = "EXTERNAL",
|
|
268
|
+
/** Indicates the product has a zero amount, meaning its free with no payment required. */
|
|
269
|
+
FREE = "FREE"
|
|
270
|
+
}
|
|
271
|
+
/** @enumType */
|
|
272
|
+
type CollectionMethodEnumCollectionMethodWithLiterals = CollectionMethodEnumCollectionMethod | 'UNKNOWN' | 'AUTO_CHARGE' | 'OFFLINE' | 'SEND_INVOICE' | 'EXTERNAL' | 'FREE';
|
|
273
|
+
interface Duration {
|
|
274
|
+
/** Duration unit: DAY, WEEK, MONTH, YEAR */
|
|
275
|
+
unit?: DurationUnitWithLiterals;
|
|
276
|
+
/**
|
|
277
|
+
* Amount of units. For example, 1 MONTH, 1 YEAR, 2 WEEKS, etc. Optional. Default is 1.
|
|
278
|
+
* @min 1
|
|
279
|
+
*/
|
|
280
|
+
count?: number | null;
|
|
281
|
+
}
|
|
282
|
+
declare enum DurationUnit {
|
|
283
|
+
UNKNOWN = "UNKNOWN",
|
|
284
|
+
DAY = "DAY",
|
|
285
|
+
WEEK = "WEEK",
|
|
286
|
+
MONTH = "MONTH",
|
|
287
|
+
YEAR = "YEAR"
|
|
288
|
+
}
|
|
289
|
+
/** @enumType */
|
|
290
|
+
type DurationUnitWithLiterals = DurationUnit | 'UNKNOWN' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR';
|
|
291
|
+
interface CustomBillingSchedule {
|
|
292
|
+
/**
|
|
293
|
+
* Amount of cycles to be paid on Subscription creation, currently only cycles_to_pay_on_creation equals to 1 is supported
|
|
294
|
+
* When used with Subscription.start_date, Subscription cycles will be paid on creation but Subscription will be activated in the future
|
|
295
|
+
* @min 1
|
|
296
|
+
* @max 1
|
|
297
|
+
*/
|
|
298
|
+
cyclesToPayOnCreation?: number | null;
|
|
299
|
+
}
|
|
300
|
+
interface FullAddressDetails {
|
|
301
|
+
/** Details about the person associated with the address. */
|
|
302
|
+
contactDetails?: FullAddressContactDetails;
|
|
303
|
+
/** Information about the address. */
|
|
304
|
+
address?: Address;
|
|
305
|
+
}
|
|
306
|
+
interface FullAddressContactDetails {
|
|
307
|
+
/** First name of the contact. */
|
|
308
|
+
firstName?: string | null;
|
|
309
|
+
/** Last name of the contact. */
|
|
310
|
+
lastName?: string | null;
|
|
311
|
+
/**
|
|
312
|
+
* Phone number of the contact.
|
|
313
|
+
* @format PHONE
|
|
314
|
+
*/
|
|
315
|
+
phone?: string | null;
|
|
316
|
+
/** Company associated with the contact. */
|
|
317
|
+
company?: string | null;
|
|
318
|
+
/**
|
|
319
|
+
* Email address of the contact.
|
|
320
|
+
* @format EMAIL
|
|
321
|
+
*/
|
|
322
|
+
email?: string | null;
|
|
323
|
+
}
|
|
324
|
+
interface Address extends AddressStreetOneOf {
|
|
325
|
+
/** Street name and number. */
|
|
326
|
+
streetAddress?: StreetAddress;
|
|
327
|
+
/** Main address line, usually street and number as free text. */
|
|
328
|
+
addressLine?: string | null;
|
|
329
|
+
/**
|
|
330
|
+
* 2-letter country code in
|
|
331
|
+
* [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
|
|
332
|
+
* format.
|
|
333
|
+
* @format COUNTRY
|
|
334
|
+
*/
|
|
335
|
+
country?: string | null;
|
|
336
|
+
/**
|
|
337
|
+
* Subdivision. Usually a state, region, prefecture, or province code,
|
|
338
|
+
* according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2).
|
|
339
|
+
*/
|
|
340
|
+
subdivision?: string | null;
|
|
341
|
+
/** City name. */
|
|
342
|
+
city?: string | null;
|
|
343
|
+
/** Zip/postal code. */
|
|
344
|
+
postalCode?: string | null;
|
|
345
|
+
}
|
|
346
|
+
/** @oneof */
|
|
347
|
+
interface AddressStreetOneOf {
|
|
348
|
+
/** Street name and number. */
|
|
349
|
+
streetAddress?: StreetAddress;
|
|
350
|
+
/** Main address line, usually street and number as free text. */
|
|
351
|
+
addressLine?: string | null;
|
|
352
|
+
}
|
|
353
|
+
interface StreetAddress {
|
|
354
|
+
/** Street number. */
|
|
355
|
+
number?: string;
|
|
356
|
+
/** Street name. */
|
|
357
|
+
name?: string;
|
|
358
|
+
}
|
|
359
|
+
interface TaxSettings {
|
|
360
|
+
/** If true then taxes are included in given prices */
|
|
361
|
+
inclusive?: boolean;
|
|
362
|
+
}
|
|
363
|
+
interface AdditionalFee {
|
|
364
|
+
/**
|
|
365
|
+
* Name of the conditional fee.
|
|
366
|
+
*
|
|
367
|
+
* Max: 500 characters
|
|
368
|
+
* @maxLength 500
|
|
369
|
+
*/
|
|
370
|
+
name?: string;
|
|
371
|
+
/**
|
|
372
|
+
* Amount of the conditional fee.
|
|
373
|
+
*
|
|
374
|
+
* Min: `0.01`
|
|
375
|
+
* @decimalValue options { gt:0.00 }
|
|
376
|
+
*/
|
|
377
|
+
amount?: string;
|
|
378
|
+
/**
|
|
379
|
+
* When the fee is added to the invoice.
|
|
380
|
+
*
|
|
381
|
+
* + `UNKNOWN_FEE_TRIGGER`: There is no information about when the fee is added to an invoice.
|
|
382
|
+
* + `FIRST_PAYMENT`: The fee is only added to the very first invoice of a subscription.
|
|
383
|
+
* @deprecated When the fee is added to the invoice.
|
|
384
|
+
*
|
|
385
|
+
* + `UNKNOWN_FEE_TRIGGER`: There is no information about when the fee is added to an invoice.
|
|
386
|
+
* + `FIRST_PAYMENT`: The fee is only added to the very first invoice of a subscription.
|
|
387
|
+
* @replacedBy cycles
|
|
388
|
+
* @targetRemovalDate 2025-12-31
|
|
389
|
+
*/
|
|
390
|
+
trigger?: AdditionalFeeTriggerWithLiterals;
|
|
391
|
+
/** Information about the tax of the conditional fee. */
|
|
392
|
+
tax?: Tax;
|
|
393
|
+
/**
|
|
394
|
+
* Specifies the cycles during which the fee will be applied. If this field is provided,
|
|
395
|
+
* it determines the exact range of cycles the fee applies to. The logic is as follows:
|
|
396
|
+
*
|
|
397
|
+
* - `cycle_from`: The first cycle the fee will be added to. Must be greater than 0.
|
|
398
|
+
* - `number_of_cycles`: The number of consecutive cycles the fee will be applied to,
|
|
399
|
+
* starting from `cycle_from`. If not specified, the fee applies to all cycles starting
|
|
400
|
+
* from `cycle_from`.
|
|
401
|
+
*
|
|
402
|
+
* Example:
|
|
403
|
+
* - `cycle_from = 1, number_of_cycles = 3`: Fee applies to cycles 1, 2, and 3.
|
|
404
|
+
* - `cycle_from = 2, number_of_cycles = None`: Fee applies to cycles 2 and onward indefinitely.
|
|
405
|
+
*
|
|
406
|
+
* If `cycles` is not specified (`None`), the fee will be applied on all cycles.
|
|
407
|
+
*/
|
|
408
|
+
cycles?: Cycles;
|
|
409
|
+
/** Indicates the source of the fee, Contains app_id and entity_id */
|
|
410
|
+
origin?: Origin;
|
|
411
|
+
}
|
|
412
|
+
declare enum AdditionalFeeTrigger {
|
|
413
|
+
UNKNOWN = "UNKNOWN",
|
|
414
|
+
/** Charge upon subscription first payment */
|
|
415
|
+
FIRST_PAYMENT = "FIRST_PAYMENT"
|
|
416
|
+
}
|
|
417
|
+
/** @enumType */
|
|
418
|
+
type AdditionalFeeTriggerWithLiterals = AdditionalFeeTrigger | 'UNKNOWN' | 'FIRST_PAYMENT';
|
|
419
|
+
interface Tax extends TaxValueOneOf {
|
|
420
|
+
/**
|
|
421
|
+
* Tax amount for the invoice's line item. Available when the tax is an
|
|
422
|
+
* amount and not a precentage.
|
|
423
|
+
*
|
|
424
|
+
* Min: `0.01`
|
|
425
|
+
* @decimalValue options { gt:0.00 }
|
|
426
|
+
*/
|
|
427
|
+
amount?: string;
|
|
428
|
+
/**
|
|
429
|
+
* Tax amount for the invoice's line item price and application fee.
|
|
430
|
+
* Can't be combined with `invoiceItems.priceDetails.discount`.
|
|
431
|
+
* Available when the tax is a precentage and not an amount.
|
|
432
|
+
*
|
|
433
|
+
* Min: `0.01`
|
|
434
|
+
* Max: `100`
|
|
435
|
+
* @decimalValue options { gt:0.00, lte:100 }
|
|
436
|
+
*/
|
|
437
|
+
percentage?: string;
|
|
438
|
+
/** Dynamic tax calculation */
|
|
439
|
+
dynamic?: DynamicTax;
|
|
440
|
+
}
|
|
441
|
+
/** @oneof */
|
|
442
|
+
interface TaxValueOneOf {
|
|
443
|
+
/**
|
|
444
|
+
* Tax amount for the invoice's line item. Available when the tax is an
|
|
445
|
+
* amount and not a precentage.
|
|
446
|
+
*
|
|
447
|
+
* Min: `0.01`
|
|
448
|
+
* @decimalValue options { gt:0.00 }
|
|
449
|
+
*/
|
|
450
|
+
amount?: string;
|
|
451
|
+
/**
|
|
452
|
+
* Tax amount for the invoice's line item price and application fee.
|
|
453
|
+
* Can't be combined with `invoiceItems.priceDetails.discount`.
|
|
454
|
+
* Available when the tax is a precentage and not an amount.
|
|
455
|
+
*
|
|
456
|
+
* Min: `0.01`
|
|
457
|
+
* Max: `100`
|
|
458
|
+
* @decimalValue options { gt:0.00, lte:100 }
|
|
459
|
+
*/
|
|
460
|
+
percentage?: string;
|
|
461
|
+
/** Dynamic tax calculation */
|
|
462
|
+
dynamic?: DynamicTax;
|
|
463
|
+
}
|
|
464
|
+
interface DynamicTax {
|
|
465
|
+
/**
|
|
466
|
+
* Tax group ID used to calculate tax, default will be used if not available
|
|
467
|
+
* @format GUID
|
|
468
|
+
*/
|
|
469
|
+
taxGroupId?: string | null;
|
|
470
|
+
/** Taxable address used to calculate tax */
|
|
471
|
+
taxableAddressType?: TaxableAddressTypeWithLiterals;
|
|
472
|
+
}
|
|
473
|
+
declare enum TaxableAddressType {
|
|
474
|
+
UNKNOWN = "UNKNOWN",
|
|
475
|
+
/** Tax will be calculated using a single address */
|
|
476
|
+
BUSINESS = "BUSINESS",
|
|
477
|
+
/** Tax will be calculated using multiple address (from BUSINESS to BILLING) */
|
|
478
|
+
BILLING = "BILLING",
|
|
479
|
+
/** Tax will be calculated using multiple address (from BUSINESS to SHIPPING) */
|
|
480
|
+
SHIPPING = "SHIPPING"
|
|
481
|
+
}
|
|
482
|
+
/** @enumType */
|
|
483
|
+
type TaxableAddressTypeWithLiterals = TaxableAddressType | 'UNKNOWN' | 'BUSINESS' | 'BILLING' | 'SHIPPING';
|
|
484
|
+
interface Cycles {
|
|
485
|
+
/**
|
|
486
|
+
* The cycle will start. Minimum cycle number is 1
|
|
487
|
+
* @min 1
|
|
488
|
+
*/
|
|
489
|
+
cycleFrom?: number;
|
|
490
|
+
/**
|
|
491
|
+
* Number of cycles to be applied on. In order to apply a on all cycles until the end of the subscription, this field should be empty.
|
|
492
|
+
* @min 1
|
|
493
|
+
*/
|
|
494
|
+
numberOfCycles?: number | null;
|
|
495
|
+
}
|
|
496
|
+
interface Origin {
|
|
497
|
+
/** @format GUID */
|
|
498
|
+
appId?: string;
|
|
499
|
+
/** @format GUID */
|
|
500
|
+
entityId?: string;
|
|
501
|
+
}
|
|
502
|
+
interface ShippingCharges {
|
|
503
|
+
/**
|
|
504
|
+
* Amount of the shipping fee in `0.00` format.
|
|
505
|
+
*
|
|
506
|
+
* Min: `0.01`
|
|
507
|
+
* @decimalValue options { gte:0.00, maxScale:2 }
|
|
508
|
+
*/
|
|
509
|
+
amount?: string;
|
|
510
|
+
/** Tax of the shipping fee */
|
|
511
|
+
tax?: Tax;
|
|
512
|
+
/** @maxSize 5 */
|
|
513
|
+
discounts?: Discount[];
|
|
514
|
+
}
|
|
515
|
+
interface Discount extends DiscountValueOneOf {
|
|
516
|
+
/**
|
|
517
|
+
* Discount amount.
|
|
518
|
+
* Available when the discount is an amount.
|
|
519
|
+
*
|
|
520
|
+
* Min: `0.01`
|
|
521
|
+
* @decimalValue options { gt:0.00 }
|
|
522
|
+
*/
|
|
523
|
+
amount?: string;
|
|
524
|
+
/**
|
|
525
|
+
* Discount percentage.
|
|
526
|
+
* Available when the discount is a parcentage value.
|
|
527
|
+
*
|
|
528
|
+
* Min: `0.01`
|
|
529
|
+
* Max: `100`
|
|
530
|
+
* @decimalValue options { gt:0.00, lte:100 }
|
|
531
|
+
*/
|
|
532
|
+
percentage?: string;
|
|
533
|
+
cycles?: DiscountCycles;
|
|
534
|
+
/** Discount origin is coming from. Contains app_id and entity_id */
|
|
535
|
+
origin?: DiscountOrigin;
|
|
536
|
+
}
|
|
537
|
+
/** @oneof */
|
|
538
|
+
interface DiscountValueOneOf {
|
|
539
|
+
/**
|
|
540
|
+
* Discount amount.
|
|
541
|
+
* Available when the discount is an amount.
|
|
542
|
+
*
|
|
543
|
+
* Min: `0.01`
|
|
544
|
+
* @decimalValue options { gt:0.00 }
|
|
545
|
+
*/
|
|
546
|
+
amount?: string;
|
|
547
|
+
/**
|
|
548
|
+
* Discount percentage.
|
|
549
|
+
* Available when the discount is a parcentage value.
|
|
550
|
+
*
|
|
551
|
+
* Min: `0.01`
|
|
552
|
+
* Max: `100`
|
|
553
|
+
* @decimalValue options { gt:0.00, lte:100 }
|
|
554
|
+
*/
|
|
555
|
+
percentage?: string;
|
|
556
|
+
}
|
|
557
|
+
interface DiscountCycles {
|
|
558
|
+
/**
|
|
559
|
+
* The cycle from which the discount will start. Minimum cycle number is 1
|
|
560
|
+
* @min 1
|
|
561
|
+
*/
|
|
562
|
+
cycleFrom?: number;
|
|
563
|
+
/**
|
|
564
|
+
* Number of cycles to be applied on them discount. In order to apply a discount on all cycles until the end of the subscription, this field should be empty.
|
|
565
|
+
* @min 1
|
|
566
|
+
*/
|
|
567
|
+
numberOfCycles?: number | null;
|
|
568
|
+
}
|
|
569
|
+
interface DiscountOrigin {
|
|
570
|
+
/** @format GUID */
|
|
571
|
+
appId?: string;
|
|
572
|
+
/** @format GUID */
|
|
573
|
+
entityId?: string;
|
|
574
|
+
}
|
|
575
|
+
interface ExternalCollectionDetails {
|
|
576
|
+
/** The name of the external collector. */
|
|
577
|
+
collectorName?: string;
|
|
578
|
+
}
|
|
579
|
+
interface BillingStatus {
|
|
580
|
+
/**
|
|
581
|
+
* Current cycle of subscription billing schedule. When billing schedule starts cycles start from 1
|
|
582
|
+
* and incremented each next billing cycle.
|
|
583
|
+
* In case billing schedule not started (free trial, pay later start later) then current_cycle will remain 0
|
|
584
|
+
*/
|
|
585
|
+
currentCycle?: number;
|
|
586
|
+
/** how many cycled are remaining, For auto-renew subscriptions is not set. */
|
|
587
|
+
remainingCycles?: number | null;
|
|
588
|
+
/** Date when charge will be for next billing cycle */
|
|
589
|
+
nextBillingDate?: Date | null;
|
|
590
|
+
/** Previous Date charged for previous billing cycle */
|
|
591
|
+
previousBillingDate?: Date | null;
|
|
592
|
+
/** last payment details */
|
|
593
|
+
latestPaymentData?: PaymentData;
|
|
594
|
+
/** Free trial data */
|
|
595
|
+
freeTrialData?: FreeTrialData;
|
|
596
|
+
/**
|
|
597
|
+
* Grace period information during grace period after payment failure
|
|
598
|
+
* @readonly
|
|
599
|
+
*/
|
|
600
|
+
gracePeriodData?: GracePeriodData;
|
|
601
|
+
}
|
|
602
|
+
/** TODO: fill docs */
|
|
603
|
+
interface PaymentData {
|
|
604
|
+
/** @format GUID */
|
|
605
|
+
invoiceId?: string;
|
|
606
|
+
paymentStatus?: PaymentStatusWithLiterals;
|
|
607
|
+
totals?: Totals;
|
|
608
|
+
initialFailedPaymentDate?: Date | null;
|
|
609
|
+
}
|
|
610
|
+
declare enum PaymentStatus {
|
|
611
|
+
/** Payment status unknown */
|
|
612
|
+
UNKNOWN = "UNKNOWN",
|
|
613
|
+
/** Payment has not been paid */
|
|
614
|
+
UNPAID = "UNPAID",
|
|
615
|
+
/** Payment has been paid // TODO: p13n review: we are not sending event when in SEND_INVOICE mode cycle was paid. should we and which event? */
|
|
616
|
+
PAID = "PAID",
|
|
617
|
+
/** Payment failed */
|
|
618
|
+
FAILED = "FAILED"
|
|
619
|
+
}
|
|
620
|
+
/** @enumType */
|
|
621
|
+
type PaymentStatusWithLiterals = PaymentStatus | 'UNKNOWN' | 'UNPAID' | 'PAID' | 'FAILED';
|
|
622
|
+
interface Totals {
|
|
623
|
+
/**
|
|
624
|
+
* Total price of the subscription that the customer must pay per billing
|
|
625
|
+
* cycle. Calculated as: `subtotal + tax + shippingFee + applicationFee + extraCharge - discount - credit`
|
|
626
|
+
* @format DECIMAL_VALUE
|
|
627
|
+
* @readonly
|
|
628
|
+
*/
|
|
629
|
+
totalPrice?: string;
|
|
630
|
+
/**
|
|
631
|
+
* Subtotal of all line items that belong to the subscription.
|
|
632
|
+
* Calculated as: `sum_{i=1}^{n} (itemPrice[i] * quantity[i])`
|
|
633
|
+
* @format DECIMAL_VALUE
|
|
634
|
+
* @readonly
|
|
635
|
+
*/
|
|
636
|
+
subtotal?: string;
|
|
637
|
+
/**
|
|
638
|
+
* Total tax.
|
|
639
|
+
* @format DECIMAL_VALUE
|
|
640
|
+
* @readonly
|
|
641
|
+
*/
|
|
642
|
+
tax?: string | null;
|
|
643
|
+
/**
|
|
644
|
+
* Total discount.
|
|
645
|
+
* @format DECIMAL_VALUE
|
|
646
|
+
* @readonly
|
|
647
|
+
*/
|
|
648
|
+
discount?: string | null;
|
|
649
|
+
/**
|
|
650
|
+
* Total application fee.
|
|
651
|
+
* @format DECIMAL_VALUE
|
|
652
|
+
* @readonly
|
|
653
|
+
*/
|
|
654
|
+
applicationFee?: string | null;
|
|
655
|
+
/**
|
|
656
|
+
* Total shipping fee.
|
|
657
|
+
* @format DECIMAL_VALUE
|
|
658
|
+
* @readonly
|
|
659
|
+
*/
|
|
660
|
+
shippingFee?: string | null;
|
|
661
|
+
/**
|
|
662
|
+
* Total extra charges without tax.
|
|
663
|
+
* @format DECIMAL_VALUE
|
|
664
|
+
* @readonly
|
|
665
|
+
*/
|
|
666
|
+
extraCharge?: string | null;
|
|
667
|
+
/**
|
|
668
|
+
* Total credits without tax.
|
|
669
|
+
* @format DECIMAL_VALUE
|
|
670
|
+
* @readonly
|
|
671
|
+
*/
|
|
672
|
+
credit?: string | null;
|
|
673
|
+
/**
|
|
674
|
+
* The tax amount for the proration, which is also included in the total tax.
|
|
675
|
+
* @format DECIMAL_VALUE
|
|
676
|
+
* @readonly
|
|
677
|
+
*/
|
|
678
|
+
prorationTax?: string | null;
|
|
679
|
+
}
|
|
680
|
+
interface FreeTrialData {
|
|
681
|
+
/**
|
|
682
|
+
* Date when free trial starts
|
|
683
|
+
* @readonly
|
|
684
|
+
*/
|
|
685
|
+
startDate?: Date | null;
|
|
686
|
+
/**
|
|
687
|
+
* Date when free trial ends
|
|
688
|
+
* @readonly
|
|
689
|
+
*/
|
|
690
|
+
endDate?: Date | null;
|
|
691
|
+
}
|
|
692
|
+
interface Proration extends ProrationTypeOneOf {
|
|
693
|
+
/**
|
|
694
|
+
* BASS automatically calculates the proration amount based on the number
|
|
695
|
+
* of days added to or removed from the current billing cycle. BASS uses
|
|
696
|
+
* this formula to calculate the charge or credit amount:
|
|
697
|
+
* `(Subscription total for the current billing cycle) * (number of days added to or removed from the current billing cycle) / (total number of days for the current billing cycle before the adjustment)`.
|
|
698
|
+
* For example, the customer has paid 100 UDS for the current
|
|
699
|
+
* billing cycle that last 31 days, and you want to extend the cycle by 8
|
|
700
|
+
* days. Then, BASS calculates the proration amount like this:
|
|
701
|
+
* `100 USD * 8 days / 31 days`, which equals `25.81 USD`.
|
|
702
|
+
*/
|
|
703
|
+
timeBased?: TimeBasedProration;
|
|
704
|
+
/** Proration amount that's based on your custom calculation. */
|
|
705
|
+
custom?: CustomProration;
|
|
706
|
+
}
|
|
707
|
+
/** @oneof */
|
|
708
|
+
interface ProrationTypeOneOf {
|
|
709
|
+
/**
|
|
710
|
+
* BASS automatically calculates the proration amount based on the number
|
|
711
|
+
* of days added to or removed from the current billing cycle. BASS uses
|
|
712
|
+
* this formula to calculate the charge or credit amount:
|
|
713
|
+
* `(Subscription total for the current billing cycle) * (number of days added to or removed from the current billing cycle) / (total number of days for the current billing cycle before the adjustment)`.
|
|
714
|
+
* For example, the customer has paid 100 UDS for the current
|
|
715
|
+
* billing cycle that last 31 days, and you want to extend the cycle by 8
|
|
716
|
+
* days. Then, BASS calculates the proration amount like this:
|
|
717
|
+
* `100 USD * 8 days / 31 days`, which equals `25.81 USD`.
|
|
718
|
+
*/
|
|
719
|
+
timeBased?: TimeBasedProration;
|
|
720
|
+
/** Proration amount that's based on your custom calculation. */
|
|
721
|
+
custom?: CustomProration;
|
|
722
|
+
}
|
|
723
|
+
interface TimeBasedProration {
|
|
724
|
+
}
|
|
725
|
+
interface CustomProration extends CustomProrationAmountOneOf {
|
|
726
|
+
/**
|
|
727
|
+
* Proration charge amount that's based on your custom calculation.
|
|
728
|
+
* Increases the total that the customer must pay with the next invoice.
|
|
729
|
+
*
|
|
730
|
+
* Min: `0.01`
|
|
731
|
+
* @decimalValue options { gt:0.00 }
|
|
732
|
+
*/
|
|
733
|
+
charge?: string;
|
|
734
|
+
/**
|
|
735
|
+
* Proration credit amount that's based on your custom calculation.
|
|
736
|
+
* Lowers the total that the customer must pay with the next invoice.
|
|
737
|
+
*
|
|
738
|
+
* Min: `0.01`
|
|
739
|
+
* @decimalValue options { gt:0.00 }
|
|
740
|
+
*/
|
|
741
|
+
credit?: string;
|
|
742
|
+
}
|
|
743
|
+
/** @oneof */
|
|
744
|
+
interface CustomProrationAmountOneOf {
|
|
745
|
+
/**
|
|
746
|
+
* Proration charge amount that's based on your custom calculation.
|
|
747
|
+
* Increases the total that the customer must pay with the next invoice.
|
|
748
|
+
*
|
|
749
|
+
* Min: `0.01`
|
|
750
|
+
* @decimalValue options { gt:0.00 }
|
|
751
|
+
*/
|
|
752
|
+
charge?: string;
|
|
753
|
+
/**
|
|
754
|
+
* Proration credit amount that's based on your custom calculation.
|
|
755
|
+
* Lowers the total that the customer must pay with the next invoice.
|
|
756
|
+
*
|
|
757
|
+
* Min: `0.01`
|
|
758
|
+
* @decimalValue options { gt:0.00 }
|
|
759
|
+
*/
|
|
760
|
+
credit?: string;
|
|
761
|
+
}
|
|
762
|
+
interface GracePeriodData {
|
|
763
|
+
/**
|
|
764
|
+
* Grace period start date
|
|
765
|
+
* @readonly
|
|
766
|
+
*/
|
|
767
|
+
startDate?: Date | null;
|
|
768
|
+
/**
|
|
769
|
+
* Grace period end date
|
|
770
|
+
* @readonly
|
|
771
|
+
*/
|
|
772
|
+
endDate?: Date | null;
|
|
773
|
+
/** Automatic retry data during grade period, if have any. Optional. */
|
|
774
|
+
automaticRetryData?: AutomaticRetryData;
|
|
775
|
+
}
|
|
776
|
+
interface AutomaticRetryData {
|
|
777
|
+
enabled?: boolean;
|
|
778
|
+
}
|
|
779
|
+
interface SubscriptionPolicies {
|
|
780
|
+
/** Subscription can be canceled by the customer who bought it */
|
|
781
|
+
customerCanCancel?: boolean;
|
|
782
|
+
/** Subscription end date can be updated by business */
|
|
783
|
+
businessCanExtend?: boolean;
|
|
784
|
+
/** Subscription can be canceled not only immediately, but also at end of billing cycle by turning off auto-renew */
|
|
785
|
+
allowEndOfCycleCancellation?: boolean;
|
|
786
|
+
}
|
|
787
|
+
interface PauseInfo {
|
|
788
|
+
pausePolicy?: PausePolicyWithLiterals;
|
|
789
|
+
pauseAt?: PauseAtWithLiterals;
|
|
790
|
+
startDate?: Date | null;
|
|
791
|
+
startCycle?: number | null;
|
|
792
|
+
resumeAt?: ResumeAtWithLiterals;
|
|
793
|
+
resumeDate?: Date | null;
|
|
794
|
+
resumeCycle?: number | null;
|
|
795
|
+
}
|
|
796
|
+
declare enum PausePolicy {
|
|
797
|
+
NONE = "NONE",
|
|
798
|
+
/** Pause the payment and the service. When resuming, the subscription end date is extended by the number of cycles postponed, and if the pause happened in a middle of a cycle, the payment date is postponed by the amount of days that already paid. */
|
|
799
|
+
SERVICE_AND_PAYMENTS = "SERVICE_AND_PAYMENTS",
|
|
800
|
+
/** Pause the service and continue the billing. When resuming, extend the service by the time that was paused */
|
|
801
|
+
SERVICE_ONLY = "SERVICE_ONLY"
|
|
802
|
+
}
|
|
803
|
+
/** @enumType */
|
|
804
|
+
type PausePolicyWithLiterals = PausePolicy | 'NONE' | 'SERVICE_AND_PAYMENTS' | 'SERVICE_ONLY';
|
|
805
|
+
declare enum PauseAt {
|
|
806
|
+
/** Cancel scheduled pause */
|
|
807
|
+
NONE = "NONE",
|
|
808
|
+
/** Pause the subscription now */
|
|
809
|
+
IMMEDIATELY = "IMMEDIATELY",
|
|
810
|
+
/** Pause the subscription at the next billing date */
|
|
811
|
+
NEXT_BILLING_DATE = "NEXT_BILLING_DATE",
|
|
812
|
+
/** A specific date must be defined in Schedule.specific_date */
|
|
813
|
+
SPECIFIC_DATE = "SPECIFIC_DATE",
|
|
814
|
+
/** The number of cycles must be defined in Schedule.number_of_cycles */
|
|
815
|
+
NUMBER_OF_CYCLES_FROM_TODAY = "NUMBER_OF_CYCLES_FROM_TODAY"
|
|
816
|
+
}
|
|
817
|
+
/** @enumType */
|
|
818
|
+
type PauseAtWithLiterals = PauseAt | 'NONE' | 'IMMEDIATELY' | 'NEXT_BILLING_DATE' | 'SPECIFIC_DATE' | 'NUMBER_OF_CYCLES_FROM_TODAY';
|
|
819
|
+
declare enum ResumeAt {
|
|
820
|
+
/** Cancel scheduled resume */
|
|
821
|
+
NONE = "NONE",
|
|
822
|
+
/** Resume the subscription now */
|
|
823
|
+
IMMEDIATELY = "IMMEDIATELY",
|
|
824
|
+
/** Resume the subscription at the next billing date */
|
|
825
|
+
NEXT_BILLING_DATE = "NEXT_BILLING_DATE",
|
|
826
|
+
/** A specific date must be defined in Schedule.specific_date */
|
|
827
|
+
SPECIFIC_DATE = "SPECIFIC_DATE"
|
|
828
|
+
}
|
|
829
|
+
/** @enumType */
|
|
830
|
+
type ResumeAtWithLiterals = ResumeAt | 'NONE' | 'IMMEDIATELY' | 'NEXT_BILLING_DATE' | 'SPECIFIC_DATE';
|
|
831
|
+
interface CancellationInfo {
|
|
832
|
+
/** Subscription cancel date. Can contain a future or past date */
|
|
833
|
+
cancellationDate?: Date | null;
|
|
834
|
+
/** Initiator for cancellation */
|
|
835
|
+
initiator?: HistoryActionInitiatorWithLiterals;
|
|
836
|
+
/** Reason for cancellation. Optional. */
|
|
837
|
+
reason?: string | null;
|
|
838
|
+
}
|
|
839
|
+
declare enum HistoryActionInitiator {
|
|
840
|
+
UNDEFINED = "UNDEFINED",
|
|
841
|
+
BUSINESS = "BUSINESS",
|
|
842
|
+
CUSTOMER = "CUSTOMER",
|
|
843
|
+
SYSTEM = "SYSTEM",
|
|
844
|
+
PAYMENT_FAILURE = "PAYMENT_FAILURE"
|
|
845
|
+
}
|
|
846
|
+
/** @enumType */
|
|
847
|
+
type HistoryActionInitiatorWithLiterals = HistoryActionInitiator | 'UNDEFINED' | 'BUSINESS' | 'CUSTOMER' | 'SYSTEM' | 'PAYMENT_FAILURE';
|
|
848
|
+
interface SubscriptionUpdateData {
|
|
849
|
+
/** @maxSize 100 */
|
|
850
|
+
itemsToUpdate?: ItemChange[];
|
|
851
|
+
/** @maxSize 99 */
|
|
852
|
+
itemsToAdd?: Item[];
|
|
853
|
+
/**
|
|
854
|
+
* @format GUID
|
|
855
|
+
* @maxSize 99
|
|
856
|
+
*/
|
|
857
|
+
itemsToDelete?: string[] | null;
|
|
858
|
+
/** @readonly */
|
|
859
|
+
numberOfRequests?: number;
|
|
860
|
+
}
|
|
861
|
+
interface ItemChange {
|
|
862
|
+
/**
|
|
863
|
+
* Item ID
|
|
864
|
+
* @format GUID
|
|
865
|
+
*/
|
|
866
|
+
id?: string;
|
|
867
|
+
pricingModel?: PricingModel;
|
|
868
|
+
/** @min 1 */
|
|
869
|
+
quantity?: number | null;
|
|
870
|
+
tax?: Tax;
|
|
871
|
+
}
|
|
872
|
+
interface PricingModel extends PricingModelModelOneOf {
|
|
873
|
+
/** Details about the fixed item price. */
|
|
874
|
+
fixedPrice?: FixedPrice;
|
|
875
|
+
}
|
|
876
|
+
/** @oneof */
|
|
877
|
+
interface PricingModelModelOneOf {
|
|
878
|
+
/** Details about the fixed item price. */
|
|
879
|
+
fixedPrice?: FixedPrice;
|
|
880
|
+
}
|
|
881
|
+
interface FixedPrice {
|
|
882
|
+
/**
|
|
883
|
+
* Fixed item price with a period as a decimal separator. For example, `3.99`.
|
|
884
|
+
* Price doesn't include tax, discounts, or application fee.
|
|
885
|
+
*
|
|
886
|
+
* Min: `0.01`
|
|
887
|
+
* @decimalValue options { gte:0.00 }
|
|
888
|
+
*/
|
|
889
|
+
itemPrice?: string;
|
|
890
|
+
}
|
|
891
|
+
interface Item {
|
|
892
|
+
/**
|
|
893
|
+
* Unique identifier of subscription item. Automatically generated and read-only.
|
|
894
|
+
* @readonly
|
|
895
|
+
* @format GUID
|
|
896
|
+
*/
|
|
897
|
+
id?: string | null;
|
|
898
|
+
/**
|
|
899
|
+
* Name of the item. Typically product name.
|
|
900
|
+
* @minLength 1
|
|
901
|
+
* @maxLength 200
|
|
902
|
+
*/
|
|
903
|
+
name?: string;
|
|
904
|
+
/**
|
|
905
|
+
* Description of the item.
|
|
906
|
+
* @maxLength 500
|
|
907
|
+
*/
|
|
908
|
+
description?: string | null;
|
|
909
|
+
/** References to external product catalog data known to client. */
|
|
910
|
+
catalogReference?: CatalogReference;
|
|
911
|
+
/** Category of item. Whether it is digital or physical one. */
|
|
912
|
+
category?: ItemCategoryWithLiterals;
|
|
913
|
+
/**
|
|
914
|
+
* Amount of products
|
|
915
|
+
* @min 1
|
|
916
|
+
*/
|
|
917
|
+
quantity?: number;
|
|
918
|
+
/** Pricing model of the item. Whether fixed price or dynamic price models. */
|
|
919
|
+
pricingModel?: PricingModel;
|
|
920
|
+
/** Tax, positive value, optional */
|
|
921
|
+
tax?: Tax;
|
|
922
|
+
/**
|
|
923
|
+
* Discounts applied on item price
|
|
924
|
+
* @maxSize 5
|
|
925
|
+
*/
|
|
926
|
+
discounts?: Discount[];
|
|
927
|
+
/** Application specific fee, positive value, optional (if application_fee == 0, don't include it to request). Only positive values. */
|
|
928
|
+
applicationFee?: ApplicationFee;
|
|
929
|
+
/**
|
|
930
|
+
* External reference identifier for mapping item in consumer's system.
|
|
931
|
+
* This allows the consumer to correlate the item in their system with the item in this API.
|
|
932
|
+
* @format GUID
|
|
933
|
+
*/
|
|
934
|
+
externalId?: string | null;
|
|
935
|
+
/**
|
|
936
|
+
* Key / Value store to keep up to 10 additional values related to the subscription item.
|
|
937
|
+
* Key max length = 50, Value max length = 200. Value can not be empty.
|
|
938
|
+
* Should not include any sensitive or PII information.
|
|
939
|
+
* @maxSize 10
|
|
940
|
+
*/
|
|
941
|
+
metadata?: Record<string, string>;
|
|
942
|
+
}
|
|
943
|
+
interface CatalogReference {
|
|
944
|
+
/**
|
|
945
|
+
* Product ID from the external catalog.
|
|
946
|
+
* @minLength 1
|
|
947
|
+
* @maxLength 50
|
|
948
|
+
*/
|
|
949
|
+
catalogItemId?: string;
|
|
950
|
+
/**
|
|
951
|
+
* ID of the app that the product catalog belongs to.
|
|
952
|
+
* When omitted, BASS assumes that the product belongs to the subscription's
|
|
953
|
+
* `origin.appId`.
|
|
954
|
+
*
|
|
955
|
+
* Min: 1 character
|
|
956
|
+
* Max: 50 characters
|
|
957
|
+
* @minLength 1
|
|
958
|
+
* @maxLength 50
|
|
959
|
+
*/
|
|
960
|
+
appId?: string | null;
|
|
961
|
+
}
|
|
962
|
+
declare enum ItemCategory {
|
|
963
|
+
UNKNOWN = "UNKNOWN",
|
|
964
|
+
PHYSICAL = "PHYSICAL",
|
|
965
|
+
DIGITAL = "DIGITAL"
|
|
966
|
+
}
|
|
967
|
+
/** @enumType */
|
|
968
|
+
type ItemCategoryWithLiterals = ItemCategory | 'UNKNOWN' | 'PHYSICAL' | 'DIGITAL';
|
|
969
|
+
interface ApplicationFee extends ApplicationFeeValueOneOf {
|
|
970
|
+
/**
|
|
971
|
+
* Amount of the application fee in `0.00` format.
|
|
972
|
+
* @format DECIMAL_VALUE
|
|
973
|
+
*/
|
|
974
|
+
amount?: string;
|
|
975
|
+
/**
|
|
976
|
+
* Discounts for the application fee.
|
|
977
|
+
*
|
|
978
|
+
* Max: 5 discounts
|
|
979
|
+
* @maxSize 5
|
|
980
|
+
*/
|
|
981
|
+
discounts?: Discount[];
|
|
982
|
+
}
|
|
983
|
+
/** @oneof */
|
|
984
|
+
interface ApplicationFeeValueOneOf {
|
|
985
|
+
/**
|
|
986
|
+
* Amount of the application fee in `0.00` format.
|
|
987
|
+
* @format DECIMAL_VALUE
|
|
988
|
+
*/
|
|
989
|
+
amount?: string;
|
|
990
|
+
}
|
|
991
|
+
interface SpecificDateSubscriptionUpdateData {
|
|
992
|
+
updateData?: SubscriptionUpdateData;
|
|
993
|
+
executionDate?: Date | null;
|
|
994
|
+
}
|
|
995
|
+
interface PlatformOrigin {
|
|
996
|
+
/** @format GUID */
|
|
997
|
+
appId?: string | null;
|
|
998
|
+
/** @format GUID */
|
|
999
|
+
entityId?: string | null;
|
|
1000
|
+
}
|
|
1001
|
+
interface SubscriptionBillingCyclePaid {
|
|
1002
|
+
/** The subscription for which one of the invoices has been marked as paid */
|
|
1003
|
+
subscription?: Subscription;
|
|
1004
|
+
/** The cycle that has been marked as paid */
|
|
1005
|
+
paidCycle?: number;
|
|
1006
|
+
/**
|
|
1007
|
+
* The invoice ID that has been marked as paid
|
|
1008
|
+
* @format GUID
|
|
1009
|
+
*/
|
|
1010
|
+
invoiceId?: string;
|
|
1011
|
+
/**
|
|
1012
|
+
* The transaction ID of the payment order that has been marked as paid
|
|
1013
|
+
* @format GUID
|
|
1014
|
+
*/
|
|
1015
|
+
paymentTransactionId?: string | null;
|
|
1016
|
+
}
|
|
1017
|
+
interface GetSubscriptionRequest {
|
|
1018
|
+
/** @format GUID */
|
|
1019
|
+
id: string;
|
|
1020
|
+
}
|
|
1021
|
+
interface GetSubscriptionResponse {
|
|
1022
|
+
subscription?: Subscription;
|
|
1023
|
+
}
|
|
1024
|
+
interface CustomerCancelSubscriptionRequest {
|
|
1025
|
+
/** @format GUID */
|
|
1026
|
+
id: string;
|
|
1027
|
+
/** Optional action reason message */
|
|
1028
|
+
reason?: string | null;
|
|
1029
|
+
}
|
|
1030
|
+
interface CustomerCancelSubscriptionResponse {
|
|
1031
|
+
subscription?: Subscription;
|
|
1032
|
+
}
|
|
1033
|
+
/**
|
|
1034
|
+
* Sent each time a subscription status has been set to Canceled
|
|
1035
|
+
* Canceled shows that a subscription was canceled and ended its life cycle as a result of some intervention
|
|
1036
|
+
* For example:
|
|
1037
|
+
* * A user decided to cancel a subscription before the original end date
|
|
1038
|
+
* * A subscription is canceled due to bad payment
|
|
1039
|
+
*/
|
|
1040
|
+
interface SubscriptionCanceled {
|
|
1041
|
+
subscription?: Subscription;
|
|
1042
|
+
actionDetails?: ActionDetails;
|
|
1043
|
+
}
|
|
1044
|
+
interface ActionDetails {
|
|
1045
|
+
initiator?: HistoryActionInitiatorWithLiterals;
|
|
1046
|
+
reason?: string | null;
|
|
1047
|
+
}
|
|
1048
|
+
interface CustomerTurnOnAutoRenewalRequest {
|
|
1049
|
+
/** @format GUID */
|
|
1050
|
+
id: string;
|
|
1051
|
+
/** Optional action reason message */
|
|
1052
|
+
reason?: string | null;
|
|
1053
|
+
}
|
|
1054
|
+
interface CustomerTurnOnAutoRenewalResponse {
|
|
1055
|
+
subscription?: Subscription;
|
|
1056
|
+
}
|
|
1057
|
+
interface CustomerTurnOffAutoRenewalRequest {
|
|
1058
|
+
/** @format GUID */
|
|
1059
|
+
id: string;
|
|
1060
|
+
/** Optional action reason message */
|
|
1061
|
+
reason?: string | null;
|
|
1062
|
+
}
|
|
1063
|
+
interface CustomerTurnOffAutoRenewalResponse {
|
|
1064
|
+
subscription?: Subscription;
|
|
1065
|
+
}
|
|
1066
|
+
interface CustomerExtendSubscriptionRequest {
|
|
1067
|
+
/**
|
|
1068
|
+
* The ID of the subscription to be extended
|
|
1069
|
+
* @format GUID
|
|
1070
|
+
*/
|
|
1071
|
+
id: string;
|
|
1072
|
+
/** Optional action reason message */
|
|
1073
|
+
reason?: string | null;
|
|
1074
|
+
/**
|
|
1075
|
+
* For termed - Subscription end date will be updated with the extension period and number of cycles will be added
|
|
1076
|
+
* @min 1
|
|
1077
|
+
*/
|
|
1078
|
+
billingCyclesToAdd: number | null;
|
|
1079
|
+
}
|
|
1080
|
+
interface CustomerExtendSubscriptionResponse {
|
|
1081
|
+
/** The now extended subscription */
|
|
1082
|
+
subscription?: Subscription;
|
|
1083
|
+
}
|
|
1084
|
+
interface SubscriptionExtended extends SubscriptionExtendedExtendPolicyOneOf {
|
|
1085
|
+
extensionPeriod?: Duration;
|
|
1086
|
+
extensionBillingCycles?: number;
|
|
1087
|
+
subscription?: Subscription;
|
|
1088
|
+
actionDetails?: ActionDetails;
|
|
1089
|
+
}
|
|
1090
|
+
/** @oneof */
|
|
1091
|
+
interface SubscriptionExtendedExtendPolicyOneOf {
|
|
1092
|
+
extensionPeriod?: Duration;
|
|
1093
|
+
extensionBillingCycles?: number;
|
|
1094
|
+
}
|
|
1095
|
+
interface QuerySubscriptionsRequest {
|
|
1096
|
+
query?: QueryV2;
|
|
1097
|
+
}
|
|
1098
|
+
interface QueryV2 extends QueryV2PagingMethodOneOf {
|
|
1099
|
+
/** Paging options to limit and offset the number of items. */
|
|
1100
|
+
paging?: Paging;
|
|
1101
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
1102
|
+
cursorPaging?: CursorPaging;
|
|
1103
|
+
/**
|
|
1104
|
+
* Filter object.
|
|
1105
|
+
*
|
|
1106
|
+
* Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).
|
|
1107
|
+
*/
|
|
1108
|
+
filter?: Record<string, any> | null;
|
|
1109
|
+
/**
|
|
1110
|
+
* Sort object.
|
|
1111
|
+
*
|
|
1112
|
+
* Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).
|
|
1113
|
+
*/
|
|
1114
|
+
sort?: Sorting[];
|
|
1115
|
+
/** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
|
|
1116
|
+
fields?: string[];
|
|
1117
|
+
/** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */
|
|
1118
|
+
fieldsets?: string[];
|
|
1119
|
+
}
|
|
1120
|
+
/** @oneof */
|
|
1121
|
+
interface QueryV2PagingMethodOneOf {
|
|
1122
|
+
/** Paging options to limit and offset the number of items. */
|
|
1123
|
+
paging?: Paging;
|
|
1124
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
1125
|
+
cursorPaging?: CursorPaging;
|
|
1126
|
+
}
|
|
1127
|
+
interface Sorting {
|
|
1128
|
+
/**
|
|
1129
|
+
* Name of the field to sort by.
|
|
1130
|
+
* @maxLength 512
|
|
1131
|
+
*/
|
|
1132
|
+
fieldName?: string;
|
|
1133
|
+
/** Sort order. */
|
|
1134
|
+
order?: SortOrderWithLiterals;
|
|
1135
|
+
}
|
|
1136
|
+
declare enum SortOrder {
|
|
1137
|
+
ASC = "ASC",
|
|
1138
|
+
DESC = "DESC"
|
|
1139
|
+
}
|
|
1140
|
+
/** @enumType */
|
|
1141
|
+
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
1142
|
+
interface Paging {
|
|
1143
|
+
/** Number of items to load. */
|
|
1144
|
+
limit?: number | null;
|
|
1145
|
+
/** Number of items to skip in the current sort order. */
|
|
1146
|
+
offset?: number | null;
|
|
1147
|
+
}
|
|
1148
|
+
interface CursorPaging {
|
|
1149
|
+
/**
|
|
1150
|
+
* Maximum number of items to return in the results.
|
|
1151
|
+
* @max 100
|
|
1152
|
+
*/
|
|
1153
|
+
limit?: number | null;
|
|
1154
|
+
/**
|
|
1155
|
+
* Pointer to the next or previous page in the list of results.
|
|
1156
|
+
*
|
|
1157
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
1158
|
+
* Not relevant for the first request.
|
|
1159
|
+
* @maxLength 16000
|
|
1160
|
+
*/
|
|
1161
|
+
cursor?: string | null;
|
|
1162
|
+
}
|
|
1163
|
+
interface QuerySubscriptionsResponse {
|
|
1164
|
+
subscriptions?: Subscription[];
|
|
1165
|
+
metadata?: PagingMetadataV2;
|
|
1166
|
+
}
|
|
1167
|
+
interface PagingMetadataV2 {
|
|
1168
|
+
/** Number of items returned in the response. */
|
|
1169
|
+
count?: number | null;
|
|
1170
|
+
/** Offset that was requested. */
|
|
1171
|
+
offset?: number | null;
|
|
1172
|
+
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
|
1173
|
+
total?: number | null;
|
|
1174
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
1175
|
+
tooManyToCount?: boolean | null;
|
|
1176
|
+
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
1177
|
+
cursors?: Cursors;
|
|
1178
|
+
}
|
|
1179
|
+
interface Cursors {
|
|
1180
|
+
/**
|
|
1181
|
+
* Cursor string pointing to the next page in the list of results.
|
|
1182
|
+
* @maxLength 16000
|
|
1183
|
+
*/
|
|
1184
|
+
next?: string | null;
|
|
1185
|
+
/**
|
|
1186
|
+
* Cursor pointing to the previous page in the list of results.
|
|
1187
|
+
* @maxLength 16000
|
|
1188
|
+
*/
|
|
1189
|
+
prev?: string | null;
|
|
1190
|
+
}
|
|
1191
|
+
interface CountSubscriptionsRequest {
|
|
1192
|
+
/** Filters to specify which subscriptions are counted. */
|
|
1193
|
+
filter?: CountSubscriptionFilter;
|
|
1194
|
+
}
|
|
1195
|
+
interface CountSubscriptionFilter extends CountSubscriptionFilterStatusOneOf {
|
|
1196
|
+
/** List of statuses to filter the counted subscriptions by. */
|
|
1197
|
+
statuses?: SubscriptionStatus;
|
|
1198
|
+
/**
|
|
1199
|
+
* Predefined status combination to filter the counted subscriptions by.
|
|
1200
|
+
* + `ALL`: Includes these subscription statuses: `"DRAFT"`, `"PENDING"`, `"ACTIVE"`, `"PAUSED"`, `"ENDED"`, and `"CANCELED"`.
|
|
1201
|
+
* + `LIVE`: Includes these subscription statuses: `"PENDING"`, `"ACTIVE"`, and `"PAUSED"`.
|
|
1202
|
+
*/
|
|
1203
|
+
statusGroup?: SubscriptionStatusGroupWithLiterals;
|
|
1204
|
+
/**
|
|
1205
|
+
* Customer ID to filter the counted subscriptions by. You can pass a
|
|
1206
|
+
* [member ID](https://bo.wix.com/wix-docs/rest/members/members/member-object),
|
|
1207
|
+
* [contact ID](https://bo.wix.com/wix-docs/rest/crm/contacts/contacts-v4/contact-object),
|
|
1208
|
+
* or the ID of an anonymous site visitor as `customerId`. When providing a
|
|
1209
|
+
* `customerId` you must also specify a `paymentMethodId`.
|
|
1210
|
+
* @format GUID
|
|
1211
|
+
*/
|
|
1212
|
+
customerId?: string | null;
|
|
1213
|
+
/**
|
|
1214
|
+
* ID of the payment method to filter the counted subscriptions by.
|
|
1215
|
+
* You must provide a `paymentMethodId` when passing a `customerId`.
|
|
1216
|
+
* @format GUID
|
|
1217
|
+
*/
|
|
1218
|
+
paymentMethodId?: string | null;
|
|
1219
|
+
}
|
|
1220
|
+
/** @oneof */
|
|
1221
|
+
interface CountSubscriptionFilterStatusOneOf {
|
|
1222
|
+
/** List of statuses to filter the counted subscriptions by. */
|
|
1223
|
+
statuses?: SubscriptionStatus;
|
|
1224
|
+
/**
|
|
1225
|
+
* Predefined status combination to filter the counted subscriptions by.
|
|
1226
|
+
* + `ALL`: Includes these subscription statuses: `"DRAFT"`, `"PENDING"`, `"ACTIVE"`, `"PAUSED"`, `"ENDED"`, and `"CANCELED"`.
|
|
1227
|
+
* + `LIVE`: Includes these subscription statuses: `"PENDING"`, `"ACTIVE"`, and `"PAUSED"`.
|
|
1228
|
+
*/
|
|
1229
|
+
statusGroup?: SubscriptionStatusGroupWithLiterals;
|
|
1230
|
+
}
|
|
1231
|
+
interface SubscriptionStatus {
|
|
1232
|
+
/**
|
|
1233
|
+
* Statuses to filter the counted subscriptions by.
|
|
1234
|
+
*
|
|
1235
|
+
* Max: 6 statuses
|
|
1236
|
+
* @maxSize 6
|
|
1237
|
+
*/
|
|
1238
|
+
statuses?: SubscriptionStatusEnumSubscriptionStatusWithLiterals[];
|
|
1239
|
+
}
|
|
1240
|
+
declare enum SubscriptionStatusGroup {
|
|
1241
|
+
ALL = "ALL",
|
|
1242
|
+
/** Union of ACTIVE, PAUSED and PENDING */
|
|
1243
|
+
LIVE = "LIVE"
|
|
1244
|
+
}
|
|
1245
|
+
/** @enumType */
|
|
1246
|
+
type SubscriptionStatusGroupWithLiterals = SubscriptionStatusGroup | 'ALL' | 'LIVE';
|
|
1247
|
+
interface CountSubscriptionsResponse {
|
|
1248
|
+
/**
|
|
1249
|
+
* List of statuses and the corresponding number of subscriptions that match
|
|
1250
|
+
* the filters.
|
|
1251
|
+
*/
|
|
1252
|
+
countByStatus?: CountByStatus[];
|
|
1253
|
+
/** Total number of subscriptions that match the filters. */
|
|
1254
|
+
total?: number;
|
|
1255
|
+
}
|
|
1256
|
+
interface CountByStatus {
|
|
1257
|
+
/** Subscription status. */
|
|
1258
|
+
status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals;
|
|
1259
|
+
/** Number of subscriptions with the status that match the filters. */
|
|
1260
|
+
count?: number;
|
|
1261
|
+
}
|
|
1262
|
+
interface UpdateSubscriptionPaymentMethodRequest {
|
|
1263
|
+
/**
|
|
1264
|
+
* Subscription ID
|
|
1265
|
+
* @format GUID
|
|
1266
|
+
*/
|
|
1267
|
+
id: string;
|
|
1268
|
+
/** @format GUID */
|
|
1269
|
+
paymentMethodId: string;
|
|
1270
|
+
}
|
|
1271
|
+
interface UpdateSubscriptionPaymentMethodResponse {
|
|
1272
|
+
subscription?: Subscription;
|
|
1273
|
+
}
|
|
1274
|
+
interface CustomerAllowedActionsRequest {
|
|
1275
|
+
/** @format GUID */
|
|
1276
|
+
id: string;
|
|
1277
|
+
}
|
|
1278
|
+
interface CustomerAllowedActionsResponse {
|
|
1279
|
+
actions?: Action[];
|
|
1280
|
+
}
|
|
1281
|
+
interface Action {
|
|
1282
|
+
actionType?: ActionTypeWithLiterals;
|
|
1283
|
+
pausePolicies?: PausePolicyWithLiterals[];
|
|
1284
|
+
pauseAt?: PauseAtWithLiterals[];
|
|
1285
|
+
resumeAt?: ResumeAtWithLiterals[];
|
|
1286
|
+
extendPolicies?: ExtendPolicyTypeWithLiterals[];
|
|
1287
|
+
}
|
|
1288
|
+
declare enum ActionType {
|
|
1289
|
+
NONE = "NONE",
|
|
1290
|
+
CREATION = "CREATION",
|
|
1291
|
+
CANCEL = "CANCEL",
|
|
1292
|
+
CYCLE_AUTO_RENEW_ON = "CYCLE_AUTO_RENEW_ON",
|
|
1293
|
+
CYCLE_AUTO_RENEW_OFF = "CYCLE_AUTO_RENEW_OFF",
|
|
1294
|
+
PAUSE = "PAUSE",
|
|
1295
|
+
RESUME = "RESUME",
|
|
1296
|
+
MARK_AS_PAID = "MARK_AS_PAID",
|
|
1297
|
+
EXTEND = "EXTEND",
|
|
1298
|
+
UPDATE = "UPDATE",
|
|
1299
|
+
UPDATE_START_DATE = "UPDATE_START_DATE",
|
|
1300
|
+
UPM = "UPM",
|
|
1301
|
+
UPDATE_BILLING_DATE = "UPDATE_BILLING_DATE",
|
|
1302
|
+
UPDATE_COLLECTION_METHOD = "UPDATE_COLLECTION_METHOD"
|
|
1303
|
+
}
|
|
1304
|
+
/** @enumType */
|
|
1305
|
+
type ActionTypeWithLiterals = ActionType | 'NONE' | 'CREATION' | 'CANCEL' | 'CYCLE_AUTO_RENEW_ON' | 'CYCLE_AUTO_RENEW_OFF' | 'PAUSE' | 'RESUME' | 'MARK_AS_PAID' | 'EXTEND' | 'UPDATE' | 'UPDATE_START_DATE' | 'UPM' | 'UPDATE_BILLING_DATE' | 'UPDATE_COLLECTION_METHOD';
|
|
1306
|
+
declare enum ExtendPolicyType {
|
|
1307
|
+
PERIOD = "PERIOD",
|
|
1308
|
+
BILLING_CYCLE = "BILLING_CYCLE"
|
|
1309
|
+
}
|
|
1310
|
+
/** @enumType */
|
|
1311
|
+
type ExtendPolicyTypeWithLiterals = ExtendPolicyType | 'PERIOD' | 'BILLING_CYCLE';
|
|
1312
|
+
interface CustomerListUpcomingChargesRequest {
|
|
1313
|
+
/**
|
|
1314
|
+
* Subscription id upcoming charge to be previewed for
|
|
1315
|
+
* @format GUID
|
|
1316
|
+
*/
|
|
1317
|
+
id: string;
|
|
1318
|
+
}
|
|
1319
|
+
interface CustomerListUpcomingChargesResponse {
|
|
1320
|
+
/** Subscription upcoming charge. Will be empty if no more billing scheduled. */
|
|
1321
|
+
upcomingCharge?: SubscriptionCharge;
|
|
1322
|
+
}
|
|
1323
|
+
interface SubscriptionCharge {
|
|
1324
|
+
/** cycle of future charge */
|
|
1325
|
+
cycle?: number;
|
|
1326
|
+
/** date of the charge */
|
|
1327
|
+
billingDate?: Date | null;
|
|
1328
|
+
/** breakdown of charge */
|
|
1329
|
+
totals?: Totals;
|
|
1330
|
+
/** List of items in the invoice */
|
|
1331
|
+
invoiceItems?: InvoiceItem[];
|
|
1332
|
+
/** Discount details for the invoice */
|
|
1333
|
+
discount?: InvoiceDiscount;
|
|
1334
|
+
}
|
|
1335
|
+
interface InvoiceItem extends InvoiceItemPaymentTypeOneOf {
|
|
1336
|
+
/** Information about a line item that's purchased on a recurring basis. */
|
|
1337
|
+
recurring?: Recurring;
|
|
1338
|
+
/**
|
|
1339
|
+
* Empty object that's available when the line item is purchased a single
|
|
1340
|
+
* time, not on a recurring basis.
|
|
1341
|
+
*/
|
|
1342
|
+
oneTime?: OneTime;
|
|
1343
|
+
/**
|
|
1344
|
+
* ID of the invoice line item.
|
|
1345
|
+
* @format GUID
|
|
1346
|
+
*/
|
|
1347
|
+
id?: string;
|
|
1348
|
+
/**
|
|
1349
|
+
* ID of the [subscription](https://bo.wix.com/wix-docs/rest/premium/premium-subscriptions-manager/subscription-object)
|
|
1350
|
+
* that belongs to the invoice line item.
|
|
1351
|
+
* @format GUID
|
|
1352
|
+
*/
|
|
1353
|
+
subscriptionId?: string | null;
|
|
1354
|
+
/**
|
|
1355
|
+
* Name of the invoice line item.
|
|
1356
|
+
* Typically the product name.
|
|
1357
|
+
*
|
|
1358
|
+
* Max: 200 characters
|
|
1359
|
+
* @minLength 1
|
|
1360
|
+
* @maxLength 200
|
|
1361
|
+
*/
|
|
1362
|
+
name?: string;
|
|
1363
|
+
/**
|
|
1364
|
+
* Description of the invoice line item.
|
|
1365
|
+
*
|
|
1366
|
+
* Max: 500 characters
|
|
1367
|
+
* @maxLength 500
|
|
1368
|
+
*/
|
|
1369
|
+
description?: string | null;
|
|
1370
|
+
/** Information about the product from the external product catalog. */
|
|
1371
|
+
catalogReference?: CatalogReference;
|
|
1372
|
+
/**
|
|
1373
|
+
* Product category.
|
|
1374
|
+
*
|
|
1375
|
+
* + `"UNKNOWN"`: There is no information about the product category.
|
|
1376
|
+
* + `"PHYSICAL"`: A physical product that's shipped to the shipping address.
|
|
1377
|
+
* + `"DIGITAL"`: A digital product that doesn't require shipping.
|
|
1378
|
+
*/
|
|
1379
|
+
category?: ItemCategoryWithLiterals;
|
|
1380
|
+
/** Quantity of the invoice line item. */
|
|
1381
|
+
quantity?: number;
|
|
1382
|
+
/** Information about the invoice line item's price. */
|
|
1383
|
+
priceDetails?: PriceDetails;
|
|
1384
|
+
/** Information about the invoice line item's totals */
|
|
1385
|
+
totals?: Totals;
|
|
1386
|
+
/**
|
|
1387
|
+
* Information about the invoice line item's tax data
|
|
1388
|
+
* @readonly
|
|
1389
|
+
*/
|
|
1390
|
+
taxData?: ItemTaxData;
|
|
1391
|
+
/**
|
|
1392
|
+
* ID of the [one time] that belongs to the invoice line item.
|
|
1393
|
+
* @format GUID
|
|
1394
|
+
*/
|
|
1395
|
+
oneTimeItemId?: string | null;
|
|
1396
|
+
/**
|
|
1397
|
+
* Key / Value store to keep up to 10 additional values related to the invoice item.
|
|
1398
|
+
* Key max length = 50, Value max length = 200. Value can not be empty.
|
|
1399
|
+
* Should not include any sensitive or PII information.
|
|
1400
|
+
* @maxSize 10
|
|
1401
|
+
*/
|
|
1402
|
+
metadata?: Record<string, string>;
|
|
1403
|
+
}
|
|
1404
|
+
/** @oneof */
|
|
1405
|
+
interface InvoiceItemPaymentTypeOneOf {
|
|
1406
|
+
/** Information about a line item that's purchased on a recurring basis. */
|
|
1407
|
+
recurring?: Recurring;
|
|
1408
|
+
/**
|
|
1409
|
+
* Empty object that's available when the line item is purchased a single
|
|
1410
|
+
* time, not on a recurring basis.
|
|
1411
|
+
*/
|
|
1412
|
+
oneTime?: OneTime;
|
|
1413
|
+
}
|
|
1414
|
+
interface Recurring {
|
|
1415
|
+
/**
|
|
1416
|
+
* Number of cycles. Describes how many times a customer purchases the line item
|
|
1417
|
+
* on a recurring basis.
|
|
1418
|
+
*/
|
|
1419
|
+
cycleNumber?: number;
|
|
1420
|
+
}
|
|
1421
|
+
interface OneTime {
|
|
1422
|
+
}
|
|
1423
|
+
interface PriceDetails {
|
|
1424
|
+
/**
|
|
1425
|
+
* Price of the invoice line item in `0.00` format.
|
|
1426
|
+
* A minus sign (-) indicates that the amount is negative.
|
|
1427
|
+
* @format DECIMAL_VALUE
|
|
1428
|
+
*/
|
|
1429
|
+
price?: string;
|
|
1430
|
+
/** Information about the invoice line item's tax. */
|
|
1431
|
+
tax?: Tax;
|
|
1432
|
+
/** Discount that's applied to a specicific invoice line item. */
|
|
1433
|
+
discount?: InvoiceDiscount;
|
|
1434
|
+
/**
|
|
1435
|
+
* Application fee. Set by the origin app, and not by BASS. Wix receives the
|
|
1436
|
+
* full `applicationFee`, while the merchant doesn't receive any portion of it.
|
|
1437
|
+
*/
|
|
1438
|
+
applicationFeeDetails?: InvoiceApplicationFee;
|
|
1439
|
+
}
|
|
1440
|
+
interface InvoiceDiscount extends InvoiceDiscountValueOneOf {
|
|
1441
|
+
/**
|
|
1442
|
+
* Discount amount.
|
|
1443
|
+
* Available when the discount is an amount.
|
|
1444
|
+
*
|
|
1445
|
+
* Min: `0.01`
|
|
1446
|
+
* @decimalValue options { gt:0.00 }
|
|
1447
|
+
*/
|
|
1448
|
+
amount?: string;
|
|
1449
|
+
/**
|
|
1450
|
+
* Discount percentage.
|
|
1451
|
+
* Available when the discount is a percentage value.
|
|
1452
|
+
*
|
|
1453
|
+
* Min: `0.01`
|
|
1454
|
+
* Max: `100`
|
|
1455
|
+
* @decimalValue options { gt:0.00, lte:100 }
|
|
1456
|
+
*/
|
|
1457
|
+
percentage?: string;
|
|
1458
|
+
/** Indicates the source of the discount. . Contains app_id and entity_id */
|
|
1459
|
+
origin?: DiscountOrigin;
|
|
1460
|
+
}
|
|
1461
|
+
/** @oneof */
|
|
1462
|
+
interface InvoiceDiscountValueOneOf {
|
|
1463
|
+
/**
|
|
1464
|
+
* Discount amount.
|
|
1465
|
+
* Available when the discount is an amount.
|
|
1466
|
+
*
|
|
1467
|
+
* Min: `0.01`
|
|
1468
|
+
* @decimalValue options { gt:0.00 }
|
|
1469
|
+
*/
|
|
1470
|
+
amount?: string;
|
|
1471
|
+
/**
|
|
1472
|
+
* Discount percentage.
|
|
1473
|
+
* Available when the discount is a percentage value.
|
|
1474
|
+
*
|
|
1475
|
+
* Min: `0.01`
|
|
1476
|
+
* Max: `100`
|
|
1477
|
+
* @decimalValue options { gt:0.00, lte:100 }
|
|
1478
|
+
*/
|
|
1479
|
+
percentage?: string;
|
|
1480
|
+
}
|
|
1481
|
+
interface InvoiceApplicationFee extends InvoiceApplicationFeeValueOneOf {
|
|
1482
|
+
/**
|
|
1483
|
+
* Application fee amount. Set by the origin app, and not by BASS. Wix
|
|
1484
|
+
* receives the full `applicationFee`, while the merchant doesn't receive
|
|
1485
|
+
* any portion of it.
|
|
1486
|
+
* @format DECIMAL_VALUE
|
|
1487
|
+
*/
|
|
1488
|
+
amount?: string;
|
|
1489
|
+
/** Information about the discount for the invoice line item's application fee. */
|
|
1490
|
+
discount?: InvoiceDiscount;
|
|
1491
|
+
}
|
|
1492
|
+
/** @oneof */
|
|
1493
|
+
interface InvoiceApplicationFeeValueOneOf {
|
|
1494
|
+
/**
|
|
1495
|
+
* Application fee amount. Set by the origin app, and not by BASS. Wix
|
|
1496
|
+
* receives the full `applicationFee`, while the merchant doesn't receive
|
|
1497
|
+
* any portion of it.
|
|
1498
|
+
* @format DECIMAL_VALUE
|
|
1499
|
+
*/
|
|
1500
|
+
amount?: string;
|
|
1501
|
+
}
|
|
1502
|
+
interface ItemTaxData {
|
|
1503
|
+
/** Aggregated tax from tax_breakdowns */
|
|
1504
|
+
lineItemTaxSummary?: LineItemTaxSummary;
|
|
1505
|
+
/**
|
|
1506
|
+
* A detailed description of all the tax authorities applied on this item.
|
|
1507
|
+
* @minSize 1
|
|
1508
|
+
* @maxSize 100
|
|
1509
|
+
*/
|
|
1510
|
+
taxBreakdowns?: TaxBreakdown[];
|
|
1511
|
+
}
|
|
1512
|
+
interface LineItemTaxSummary {
|
|
1513
|
+
/**
|
|
1514
|
+
* Calculated from external tax summary
|
|
1515
|
+
* @format DECIMAL_VALUE
|
|
1516
|
+
*/
|
|
1517
|
+
aggregatedTaxAmount?: string;
|
|
1518
|
+
/**
|
|
1519
|
+
* Aggregated from tax_breakdowns
|
|
1520
|
+
* @decimalValue options { gte:0, maxScale:6 }
|
|
1521
|
+
*/
|
|
1522
|
+
aggregatedTaxRate?: string;
|
|
1523
|
+
/**
|
|
1524
|
+
* Total taxable amount for this line item.
|
|
1525
|
+
* @format DECIMAL_VALUE
|
|
1526
|
+
* @decimalValue options { maxScale:4 }
|
|
1527
|
+
*/
|
|
1528
|
+
taxableAmount?: string;
|
|
1529
|
+
/**
|
|
1530
|
+
* Aggregated from tax_breakdowns after applying exemptions
|
|
1531
|
+
* @format DECIMAL_VALUE
|
|
1532
|
+
* @decimalValue options { maxScale:4 }
|
|
1533
|
+
*/
|
|
1534
|
+
finalTaxAmount?: string | null;
|
|
1535
|
+
}
|
|
1536
|
+
interface TaxBreakdown {
|
|
1537
|
+
taxType?: string;
|
|
1538
|
+
/** @decimalValue options { maxScale:4 } */
|
|
1539
|
+
taxRate?: string;
|
|
1540
|
+
/** @format DECIMAL_VALUE */
|
|
1541
|
+
taxAmount?: string | null;
|
|
1542
|
+
/** @format DECIMAL_VALUE */
|
|
1543
|
+
taxableAmount?: string | null;
|
|
1544
|
+
/** @format DECIMAL_VALUE */
|
|
1545
|
+
nonTaxableAmount?: string | null;
|
|
1546
|
+
/**
|
|
1547
|
+
* Name of the tax that was calculated. For example, "NY State Sales Tax", "Quebec GST", etc.
|
|
1548
|
+
* @maxLength 200
|
|
1549
|
+
*/
|
|
1550
|
+
taxName?: string | null;
|
|
1551
|
+
/**
|
|
1552
|
+
* Jurisdiction that taxes were calculated for.
|
|
1553
|
+
* @maxLength 200
|
|
1554
|
+
*/
|
|
1555
|
+
jurisdiction?: string | null;
|
|
1556
|
+
/** Type of jurisdiction that taxes were calculated for. */
|
|
1557
|
+
jurisdictionType?: string;
|
|
1558
|
+
}
|
|
1559
|
+
interface InitiatePaymentMethodSetupRequest {
|
|
1560
|
+
id: string;
|
|
1561
|
+
paymentMode?: PaymentModeWithLiterals;
|
|
1562
|
+
paymentSettings?: PaymentSettings;
|
|
1563
|
+
}
|
|
1564
|
+
declare enum PaymentMode {
|
|
1565
|
+
NONE = "NONE",
|
|
1566
|
+
/** The latest invoice of the subscription will be charged. */
|
|
1567
|
+
CHARGE = "CHARGE",
|
|
1568
|
+
/** An authorization invoice with zero amount will be created. */
|
|
1569
|
+
AUTHORIZATION = "AUTHORIZATION"
|
|
1570
|
+
}
|
|
1571
|
+
/** @enumType */
|
|
1572
|
+
type PaymentModeWithLiterals = PaymentMode | 'NONE' | 'CHARGE' | 'AUTHORIZATION';
|
|
1573
|
+
interface PaymentSettings {
|
|
1574
|
+
/** Allowed payment providers for Subscriptions, for example to limit subscriptions to be created only with "Wix Payments" provider. */
|
|
1575
|
+
allowedProviderIds?: string[];
|
|
1576
|
+
/** payment order method, define how the order was applied */
|
|
1577
|
+
orderMethod?: OrderMethodWithLiterals;
|
|
1578
|
+
/** Wix Pay callback url(s) to return buyer to a third party system */
|
|
1579
|
+
redirectUrls?: RedirectUrls;
|
|
1580
|
+
/** @format GUID */
|
|
1581
|
+
paymentMethodId?: string | null;
|
|
1582
|
+
/**
|
|
1583
|
+
* Specifies an alternative origin for processing the payment.
|
|
1584
|
+
* When set, the payment order will be created with the specified origin
|
|
1585
|
+
* instead of the default origin.
|
|
1586
|
+
*/
|
|
1587
|
+
paymentOrigin?: PaymentOrigin;
|
|
1588
|
+
}
|
|
1589
|
+
declare enum OrderMethod {
|
|
1590
|
+
UNKNOWN = "UNKNOWN",
|
|
1591
|
+
MOTO = "MOTO",
|
|
1592
|
+
NOT_MOTO = "NOT_MOTO"
|
|
1593
|
+
}
|
|
1594
|
+
/** @enumType */
|
|
1595
|
+
type OrderMethodWithLiterals = OrderMethod | 'UNKNOWN' | 'MOTO' | 'NOT_MOTO';
|
|
1596
|
+
interface RedirectUrls {
|
|
1597
|
+
/** URL to redirect buyer in case of approved (successful) transaction (required) */
|
|
1598
|
+
successUrl?: string;
|
|
1599
|
+
/** URL to redirect buyer in case of failed/rejected transaction (required) */
|
|
1600
|
+
errorUrl?: string;
|
|
1601
|
+
/** URL to redirect buyer in case of buyer canceled the transaction (optional, default: `{error_url}`) */
|
|
1602
|
+
cancelUrl?: string;
|
|
1603
|
+
/**
|
|
1604
|
+
* URL to redirect buyer in case of pending transaction (that might take some time to process) (optional, default:
|
|
1605
|
+
* `{success_url}`)
|
|
1606
|
+
*/
|
|
1607
|
+
pendingUrl?: string;
|
|
1608
|
+
}
|
|
1609
|
+
interface PaymentOrigin {
|
|
1610
|
+
/**
|
|
1611
|
+
* ID of the app for which the Payment will create the order on. For example, Paypal.
|
|
1612
|
+
* @format GUID
|
|
1613
|
+
*/
|
|
1614
|
+
appId?: string;
|
|
1615
|
+
/**
|
|
1616
|
+
* Id of the entity that order will be created on
|
|
1617
|
+
* @format GUID
|
|
1618
|
+
*/
|
|
1619
|
+
instanceId?: string;
|
|
1620
|
+
}
|
|
1621
|
+
interface InitiatePaymentMethodSetupResponse {
|
|
1622
|
+
/** @format GUID */
|
|
1623
|
+
paymentOrderId?: string;
|
|
1624
|
+
}
|
|
1625
|
+
interface PayCycleRequest {
|
|
1626
|
+
/** @format GUID */
|
|
1627
|
+
subscriptionId: string;
|
|
1628
|
+
paymentTestMode?: PaymentTestModeWithLiterals;
|
|
1629
|
+
/** @format GUID */
|
|
1630
|
+
tenantId: string;
|
|
1631
|
+
}
|
|
1632
|
+
declare enum PaymentTestMode {
|
|
1633
|
+
REGULAR = "REGULAR",
|
|
1634
|
+
FAIL_TECHNICAL = "FAIL_TECHNICAL",
|
|
1635
|
+
FAIL_DECLINE = "FAIL_DECLINE",
|
|
1636
|
+
FAIL_RETRYABLE_DECLINE = "FAIL_RETRYABLE_DECLINE"
|
|
1637
|
+
}
|
|
1638
|
+
/** @enumType */
|
|
1639
|
+
type PaymentTestModeWithLiterals = PaymentTestMode | 'REGULAR' | 'FAIL_TECHNICAL' | 'FAIL_DECLINE' | 'FAIL_RETRYABLE_DECLINE';
|
|
1640
|
+
interface PayCycleResponse {
|
|
1641
|
+
/** @format GUID */
|
|
1642
|
+
invoiceId?: string;
|
|
1643
|
+
/** @format GUID */
|
|
1644
|
+
paymentOrderId?: string | null;
|
|
1645
|
+
subscription?: Subscription;
|
|
1646
|
+
}
|
|
1647
|
+
declare enum ActionInitiator {
|
|
1648
|
+
UNDEFINED = "UNDEFINED",
|
|
1649
|
+
BUSINESS = "BUSINESS",
|
|
1650
|
+
CUSTOMER = "CUSTOMER",
|
|
1651
|
+
SYSTEM = "SYSTEM"
|
|
1652
|
+
}
|
|
1653
|
+
/** @enumType */
|
|
1654
|
+
type ActionInitiatorWithLiterals = ActionInitiator | 'UNDEFINED' | 'BUSINESS' | 'CUSTOMER' | 'SYSTEM';
|
|
1655
|
+
interface SubscriptionBillingCycleStarted {
|
|
1656
|
+
subscription?: Subscription;
|
|
1657
|
+
/**
|
|
1658
|
+
* Wix Pay transaction id, optional. Exists if event was triggered by a payment.
|
|
1659
|
+
* @format GUID
|
|
1660
|
+
*/
|
|
1661
|
+
paymentTransactionId?: string | null;
|
|
1662
|
+
}
|
|
1663
|
+
/**
|
|
1664
|
+
* Sent each time a subscription status has been set to Active
|
|
1665
|
+
* Active shows that a subscription is live and operational.
|
|
1666
|
+
* For example:
|
|
1667
|
+
* * For subscription with free trial, free trial start date is also the activation date.
|
|
1668
|
+
* * For a subscription with future start date, the start date is also the activation date.
|
|
1669
|
+
* * When a subscription is resumed from a pause status, the resume date is also the activation date.
|
|
1670
|
+
*/
|
|
1671
|
+
interface SubscriptionActivated {
|
|
1672
|
+
subscription?: Subscription;
|
|
1673
|
+
}
|
|
1674
|
+
/**
|
|
1675
|
+
* Sent each time a subscription status has been set to Ended
|
|
1676
|
+
* Ended shows that a subscription reached its end date and ended its life cycle as a result of the agreement.
|
|
1677
|
+
* This is different from a Canceled subscription which ends the subscription before a designated end date.
|
|
1678
|
+
* Therefore, Ended and Canceled are mutually exclusive.
|
|
1679
|
+
*/
|
|
1680
|
+
interface SubscriptionEnded {
|
|
1681
|
+
subscription?: Subscription;
|
|
1682
|
+
}
|
|
1683
|
+
interface SubscriptionInitialPurchaseCompleted {
|
|
1684
|
+
subscription?: Subscription;
|
|
1685
|
+
actionDetails?: ActionDetails;
|
|
1686
|
+
/** @format GUID */
|
|
1687
|
+
paymentTransactionId?: string | null;
|
|
1688
|
+
}
|
|
1689
|
+
interface SubscriptionCycleReadyToPay {
|
|
1690
|
+
subscription?: Subscription;
|
|
1691
|
+
}
|
|
1692
|
+
interface SubscriptionRevived {
|
|
1693
|
+
subscription?: Subscription;
|
|
1694
|
+
}
|
|
1695
|
+
interface UpdateSubscriptionBillingDateRequest {
|
|
1696
|
+
/**
|
|
1697
|
+
* ID of the subscription to update the billing date for.
|
|
1698
|
+
* @format GUID
|
|
1699
|
+
*/
|
|
1700
|
+
id: string;
|
|
1701
|
+
/** New billing date in `YYYY-MM-DDThh:mm:ss:sssZ` format. */
|
|
1702
|
+
billingDate: Date | null;
|
|
1703
|
+
/**
|
|
1704
|
+
* Information about how BASS adjusts the total of the next invoice. Extending
|
|
1705
|
+
* the current billing cycle results in a higher payment, while shortening it
|
|
1706
|
+
* leads to a lower payment. BASS offers automatic calculation of the proration
|
|
1707
|
+
* amount based on the number of days added to or removed from the current billing
|
|
1708
|
+
* cycle. Alternatively, you can use your own custom method to calculate the
|
|
1709
|
+
* proration amount. The custom proration amount can't exceed the total of the
|
|
1710
|
+
* current billing cycle.
|
|
1711
|
+
*/
|
|
1712
|
+
proration?: Proration;
|
|
1713
|
+
}
|
|
1714
|
+
interface UpdateSubscriptionBillingDateResponse {
|
|
1715
|
+
/** Updated subscription. */
|
|
1716
|
+
subscription?: Subscription;
|
|
1717
|
+
}
|
|
1718
|
+
interface SubscriptionBillingDateUpdated {
|
|
1719
|
+
subscription?: Subscription;
|
|
1720
|
+
billingDate?: Date | null;
|
|
1721
|
+
proration?: Proration;
|
|
1722
|
+
}
|
|
1723
|
+
declare enum UpdateAction {
|
|
1724
|
+
NONE = "NONE",
|
|
1725
|
+
/** Update subscription immediately, please note proration for updates changing price are not yet supported */
|
|
1726
|
+
IMMEDIATELY = "IMMEDIATELY",
|
|
1727
|
+
/** Request updates that will take affect only at the start of the next billing cycle. */
|
|
1728
|
+
NEXT_BILLING_CYCLE = "NEXT_BILLING_CYCLE",
|
|
1729
|
+
/** Reset all pending updates */
|
|
1730
|
+
RESET_PENDING_UPDATES = "RESET_PENDING_UPDATES",
|
|
1731
|
+
/** Request updates that will take affect only at a specific date. */
|
|
1732
|
+
SPECIFIC_DATE = "SPECIFIC_DATE"
|
|
1733
|
+
}
|
|
1734
|
+
/** @enumType */
|
|
1735
|
+
type UpdateActionWithLiterals = UpdateAction | 'NONE' | 'IMMEDIATELY' | 'NEXT_BILLING_CYCLE' | 'RESET_PENDING_UPDATES' | 'SPECIFIC_DATE';
|
|
1736
|
+
interface ScheduleAdditionalInfo extends ScheduleAdditionalInfoParamOneOf {
|
|
1737
|
+
/**
|
|
1738
|
+
* Future date when the update becomes effective in `YYYY-MM-DDThh:mm:ss.sssZ`
|
|
1739
|
+
* format. The use of this field may be restricted in various BASS endpoints.
|
|
1740
|
+
* For example, in _Bulk Update Subscription Items_ it's only available in
|
|
1741
|
+
* combination with `{"updateAction": "SPECIFIC_DATE"}`, in _Resume Subscription_
|
|
1742
|
+
* only in combination with `{"resumeAt": "SPECIFIC_DATE"}`, and in
|
|
1743
|
+
* _Pause Subscription_ only in combination with `{"pauseAt": "SPECIFIC_DATE"}`.
|
|
1744
|
+
*/
|
|
1745
|
+
specificDate?: Date | null;
|
|
1746
|
+
/**
|
|
1747
|
+
* When the update becomes effective, as number of billing cycles from now.
|
|
1748
|
+
* The use of this field may be restricted in various BASS endpoints.
|
|
1749
|
+
* For example, in _Pause Subscription_ it's only available in
|
|
1750
|
+
* combination with `{"pauseAt": "NUMBER_OF_CYCLES_FROM_TODAY"}`.
|
|
1751
|
+
* __Note__: Currently not supported in _Bulk Update Subscription Items by Filter_.
|
|
1752
|
+
* @min 1
|
|
1753
|
+
*/
|
|
1754
|
+
numberOfCycles?: number;
|
|
1755
|
+
}
|
|
1756
|
+
/** @oneof */
|
|
1757
|
+
interface ScheduleAdditionalInfoParamOneOf {
|
|
1758
|
+
/**
|
|
1759
|
+
* Future date when the update becomes effective in `YYYY-MM-DDThh:mm:ss.sssZ`
|
|
1760
|
+
* format. The use of this field may be restricted in various BASS endpoints.
|
|
1761
|
+
* For example, in _Bulk Update Subscription Items_ it's only available in
|
|
1762
|
+
* combination with `{"updateAction": "SPECIFIC_DATE"}`, in _Resume Subscription_
|
|
1763
|
+
* only in combination with `{"resumeAt": "SPECIFIC_DATE"}`, and in
|
|
1764
|
+
* _Pause Subscription_ only in combination with `{"pauseAt": "SPECIFIC_DATE"}`.
|
|
1765
|
+
*/
|
|
1766
|
+
specificDate?: Date | null;
|
|
1767
|
+
/**
|
|
1768
|
+
* When the update becomes effective, as number of billing cycles from now.
|
|
1769
|
+
* The use of this field may be restricted in various BASS endpoints.
|
|
1770
|
+
* For example, in _Pause Subscription_ it's only available in
|
|
1771
|
+
* combination with `{"pauseAt": "NUMBER_OF_CYCLES_FROM_TODAY"}`.
|
|
1772
|
+
* __Note__: Currently not supported in _Bulk Update Subscription Items by Filter_.
|
|
1773
|
+
* @min 1
|
|
1774
|
+
*/
|
|
1775
|
+
numberOfCycles?: number;
|
|
1776
|
+
}
|
|
1777
|
+
interface CancelSubscriptionRequest {
|
|
1778
|
+
/** @format GUID */
|
|
1779
|
+
id: string;
|
|
1780
|
+
actionContext: ActionContext;
|
|
1781
|
+
}
|
|
1782
|
+
interface ActionContext {
|
|
1783
|
+
initiator?: ActionInitiatorWithLiterals;
|
|
1784
|
+
/** Optional action reason message */
|
|
1785
|
+
reason?: string | null;
|
|
1786
|
+
}
|
|
1787
|
+
interface CancelSubscriptionResponse {
|
|
1788
|
+
subscription?: Subscription;
|
|
1789
|
+
}
|
|
1790
|
+
interface PauseSubscriptionRequest {
|
|
1791
|
+
/** @format GUID */
|
|
1792
|
+
id: string;
|
|
1793
|
+
pausePolicy?: PausePolicyWithLiterals;
|
|
1794
|
+
pauseAt?: PauseAtWithLiterals;
|
|
1795
|
+
/** contains additional scheduling information for certain pause_at options (for example: SPECIFIC_DATE & NUMBER_OF_CYCLES_FROM_TODAY) */
|
|
1796
|
+
pauseAtSchedule?: ScheduleAdditionalInfo;
|
|
1797
|
+
/** contains additional scheduling information for certain auto_resume_at either specific date */
|
|
1798
|
+
autoResumeAtSchedule?: ScheduleAdditionalInfo;
|
|
1799
|
+
actionContext: ActionContext;
|
|
1800
|
+
}
|
|
1801
|
+
interface PauseSubscriptionResponse {
|
|
1802
|
+
subscription?: Subscription;
|
|
1803
|
+
}
|
|
1804
|
+
interface SubscriptionPaused {
|
|
1805
|
+
subscription?: Subscription;
|
|
1806
|
+
pausePolicy?: PausePolicyWithLiterals;
|
|
1807
|
+
actionDetails?: ActionDetails;
|
|
1808
|
+
}
|
|
1809
|
+
interface PauseSubscriptionRequested {
|
|
1810
|
+
subscription?: Subscription;
|
|
1811
|
+
pauseAt?: PauseAtWithLiterals;
|
|
1812
|
+
pausePolicy?: PausePolicyWithLiterals;
|
|
1813
|
+
actionDetails?: ActionDetails;
|
|
1814
|
+
}
|
|
1815
|
+
interface ScheduledPauseCanceled {
|
|
1816
|
+
subscription?: Subscription;
|
|
1817
|
+
actionDetails?: ActionDetails;
|
|
1818
|
+
}
|
|
1819
|
+
interface ResumeSubscriptionRequest {
|
|
1820
|
+
/** @format GUID */
|
|
1821
|
+
id: string;
|
|
1822
|
+
resumeAt?: ResumeAtWithLiterals;
|
|
1823
|
+
/** contains additional scheduling information for certain resume_at options (for example: SPECIFIC_DATE) */
|
|
1824
|
+
resumeAtSchedule?: ScheduleAdditionalInfo;
|
|
1825
|
+
actionContext: ActionContext;
|
|
1826
|
+
}
|
|
1827
|
+
interface ResumeSubscriptionResponse {
|
|
1828
|
+
subscription?: Subscription;
|
|
1829
|
+
}
|
|
1830
|
+
interface SubscriptionResumed {
|
|
1831
|
+
subscription?: Subscription;
|
|
1832
|
+
actionDetails?: ActionDetails;
|
|
1833
|
+
}
|
|
1834
|
+
interface ResumeSubscriptionRequested {
|
|
1835
|
+
subscription?: Subscription;
|
|
1836
|
+
resumeAt?: ResumeAtWithLiterals;
|
|
1837
|
+
actionDetails?: ActionDetails;
|
|
1838
|
+
}
|
|
1839
|
+
interface ScheduledResumeCanceled {
|
|
1840
|
+
subscription?: Subscription;
|
|
1841
|
+
actionDetails?: ActionDetails;
|
|
1842
|
+
}
|
|
1843
|
+
interface SearchSubscriptionsRequest extends SearchSubscriptionsRequestPagingMethodOneOf {
|
|
1844
|
+
/** Limit number of results and enable to skip rows. The default limit is 25. */
|
|
1845
|
+
paging?: Paging;
|
|
1846
|
+
/** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */
|
|
1847
|
+
cursor?: CursorPaging;
|
|
1848
|
+
/** A filter object */
|
|
1849
|
+
filter?: any;
|
|
1850
|
+
/** A Sorting option by field name and order. */
|
|
1851
|
+
sorting?: SortingClauses;
|
|
1852
|
+
}
|
|
1853
|
+
/** @oneof */
|
|
1854
|
+
interface SearchSubscriptionsRequestPagingMethodOneOf {
|
|
1855
|
+
/** Limit number of results and enable to skip rows. The default limit is 25. */
|
|
1856
|
+
paging?: Paging;
|
|
1857
|
+
/** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */
|
|
1858
|
+
cursor?: CursorPaging;
|
|
1859
|
+
}
|
|
1860
|
+
interface SortingClauses {
|
|
1861
|
+
sorting?: Sorting[];
|
|
1862
|
+
}
|
|
1863
|
+
interface SearchSubscriptionsResponse {
|
|
1864
|
+
subscriptions?: Subscription[];
|
|
1865
|
+
cursor?: CursorPaging;
|
|
1866
|
+
}
|
|
1867
|
+
interface TurnOnSubscriptionAutoRenewalRequest {
|
|
1868
|
+
/** @format GUID */
|
|
1869
|
+
id: string;
|
|
1870
|
+
actionContext: ActionContext;
|
|
1871
|
+
}
|
|
1872
|
+
interface TurnOnSubscriptionAutoRenewalResponse {
|
|
1873
|
+
subscription?: Subscription;
|
|
1874
|
+
}
|
|
1875
|
+
interface SubscriptionAutoRenewalTurnedOn {
|
|
1876
|
+
subscription?: Subscription;
|
|
1877
|
+
actionDetails?: ActionDetails;
|
|
1878
|
+
}
|
|
1879
|
+
interface TurnOffSubscriptionAutoRenewalRequest {
|
|
1880
|
+
/** @format GUID */
|
|
1881
|
+
id: string;
|
|
1882
|
+
actionContext: ActionContext;
|
|
1883
|
+
}
|
|
1884
|
+
interface TurnOffSubscriptionAutoRenewalResponse {
|
|
1885
|
+
subscription?: Subscription;
|
|
1886
|
+
}
|
|
1887
|
+
interface SubscriptionAutoRenewalTurnedOff {
|
|
1888
|
+
subscription?: Subscription;
|
|
1889
|
+
actionDetails?: ActionDetails;
|
|
1890
|
+
}
|
|
1891
|
+
interface MarkLatestInvoiceAsPaidRequest {
|
|
1892
|
+
/**
|
|
1893
|
+
* The ID of the offline subscription to mark as paid its latest invoice
|
|
1894
|
+
* @format GUID
|
|
1895
|
+
*/
|
|
1896
|
+
subscriptionId: string;
|
|
1897
|
+
}
|
|
1898
|
+
interface MarkLatestInvoiceAsPaidResponse {
|
|
1899
|
+
subscription?: Subscription;
|
|
1900
|
+
}
|
|
1901
|
+
interface LatestInvoiceMarkedAsPaid {
|
|
1902
|
+
subscription?: Subscription;
|
|
1903
|
+
}
|
|
1904
|
+
interface MarkBillingCycleAsPaidRequest {
|
|
1905
|
+
/**
|
|
1906
|
+
* The ID of the subscription to mark as paid its invoice.
|
|
1907
|
+
* @format GUID
|
|
1908
|
+
*/
|
|
1909
|
+
subscriptionId: string;
|
|
1910
|
+
/**
|
|
1911
|
+
* The subscription cycle for which the invoice is to be marked as paid.
|
|
1912
|
+
* If left empty, the most recent cycle will be selected.
|
|
1913
|
+
* @min 1
|
|
1914
|
+
*/
|
|
1915
|
+
paidCycle?: number | null;
|
|
1916
|
+
}
|
|
1917
|
+
interface MarkBillingCycleAsPaidResponse {
|
|
1918
|
+
subscription?: Subscription;
|
|
1919
|
+
}
|
|
1920
|
+
interface GetSubscriptionsStatsRequest {
|
|
1921
|
+
}
|
|
1922
|
+
interface GetSubscriptionsStatsResponse {
|
|
1923
|
+
amountByStatuses?: AmountByStatus[];
|
|
1924
|
+
total?: number;
|
|
1925
|
+
}
|
|
1926
|
+
interface AmountByStatus {
|
|
1927
|
+
status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals;
|
|
1928
|
+
amount?: number;
|
|
1929
|
+
}
|
|
1930
|
+
interface ExtendSubscriptionRequest extends ExtendSubscriptionRequestExtendPolicyOneOf {
|
|
1931
|
+
/** User won't be charged for additional period added on top of subscription end date. */
|
|
1932
|
+
extensionPeriod?: Duration;
|
|
1933
|
+
/**
|
|
1934
|
+
* user will be charged for billing cycles added
|
|
1935
|
+
* @min 1
|
|
1936
|
+
*/
|
|
1937
|
+
extensionBillingCycles?: number;
|
|
1938
|
+
/**
|
|
1939
|
+
* The ID of the subscription to be extended
|
|
1940
|
+
* @format GUID
|
|
1941
|
+
*/
|
|
1942
|
+
id: string;
|
|
1943
|
+
actionContext: ActionContext;
|
|
1944
|
+
}
|
|
1945
|
+
/** @oneof */
|
|
1946
|
+
interface ExtendSubscriptionRequestExtendPolicyOneOf {
|
|
1947
|
+
/** User won't be charged for additional period added on top of subscription end date. */
|
|
1948
|
+
extensionPeriod?: Duration;
|
|
1949
|
+
/**
|
|
1950
|
+
* user will be charged for billing cycles added
|
|
1951
|
+
* @min 1
|
|
1952
|
+
*/
|
|
1953
|
+
extensionBillingCycles?: number;
|
|
1954
|
+
}
|
|
1955
|
+
interface ExtendSubscriptionResponse {
|
|
1956
|
+
/** The now extended subscription */
|
|
1957
|
+
subscription?: Subscription;
|
|
1958
|
+
}
|
|
1959
|
+
interface AllowedActionsRequest {
|
|
1960
|
+
/** @format GUID */
|
|
1961
|
+
id: string;
|
|
1962
|
+
/**
|
|
1963
|
+
* List of additional fields to be included in the response.
|
|
1964
|
+
* @maxSize 1
|
|
1965
|
+
*/
|
|
1966
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
1967
|
+
}
|
|
1968
|
+
declare enum RequestedFields {
|
|
1969
|
+
UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
|
|
1970
|
+
/** Include unsupported action list, including the reasons for the lack of support */
|
|
1971
|
+
UNSUPPORTED_ACTION = "UNSUPPORTED_ACTION"
|
|
1972
|
+
}
|
|
1973
|
+
/** @enumType */
|
|
1974
|
+
type RequestedFieldsWithLiterals = RequestedFields | 'UNKNOWN_REQUESTED_FIELD' | 'UNSUPPORTED_ACTION';
|
|
1975
|
+
interface AllowedActionsResponse {
|
|
1976
|
+
/** List of actions that are allowed. */
|
|
1977
|
+
actions?: Action[];
|
|
1978
|
+
/**
|
|
1979
|
+
* List of actions that are not supported, included only if requested. Provides reasons for each unsupported action.
|
|
1980
|
+
* @maxSize 20
|
|
1981
|
+
*/
|
|
1982
|
+
unsupportedActions?: UnsupportedAction[];
|
|
1983
|
+
}
|
|
1984
|
+
interface UnsupportedAction {
|
|
1985
|
+
actionType?: ActionTypeWithLiterals;
|
|
1986
|
+
/**
|
|
1987
|
+
* Provides detailed reasons for the unsupported action. Each `UnsupportedReason` includes a code and a message explaining why the action is not allowed.
|
|
1988
|
+
* @maxSize 20
|
|
1989
|
+
*/
|
|
1990
|
+
reasons?: UnsupportedReason[];
|
|
1991
|
+
}
|
|
1992
|
+
interface UnsupportedReason {
|
|
1993
|
+
code?: string;
|
|
1994
|
+
description?: string | null;
|
|
1995
|
+
}
|
|
1996
|
+
interface ListUpcomingChargesRequest {
|
|
1997
|
+
/**
|
|
1998
|
+
* Subscription id charges to be previewed for
|
|
1999
|
+
* @format GUID
|
|
2000
|
+
*/
|
|
2001
|
+
subscriptionId: string;
|
|
2002
|
+
/** Period of time to provide charged for. If not provided,then only next charge will be returned. */
|
|
2003
|
+
customDuration?: Duration;
|
|
2004
|
+
/**
|
|
2005
|
+
* Date of the next billing cycle so that the upcoming charges will be calculated accordingly.
|
|
2006
|
+
* If not provided, the upcoming charges will be calculated according to the existing next billing date.
|
|
2007
|
+
*/
|
|
2008
|
+
nextBillingDate?: Date | null;
|
|
2009
|
+
}
|
|
2010
|
+
interface ListUpcomingChargesResponse {
|
|
2011
|
+
upcomingCharges?: SubscriptionCharge[];
|
|
2012
|
+
}
|
|
2013
|
+
interface PreviewSubscriptionChargesRequest extends PreviewSubscriptionChargesRequestSubscriptionOneOf {
|
|
2014
|
+
/** Information about a non-existing subscription. */
|
|
2015
|
+
subscriptionInfo?: SubscriptionInfo;
|
|
2016
|
+
}
|
|
2017
|
+
/** @oneof */
|
|
2018
|
+
interface PreviewSubscriptionChargesRequestSubscriptionOneOf {
|
|
2019
|
+
/** Information about a non-existing subscription. */
|
|
2020
|
+
subscriptionInfo?: SubscriptionInfo;
|
|
2021
|
+
}
|
|
2022
|
+
/** Subscription information to use for calculating the preview of charges for a subscription. */
|
|
2023
|
+
interface SubscriptionInfo {
|
|
2024
|
+
billingSettings?: BillingSettings;
|
|
2025
|
+
items?: Item[];
|
|
2026
|
+
startDate?: Date | null;
|
|
2027
|
+
}
|
|
2028
|
+
interface PreviewSubscriptionChargesResponse {
|
|
2029
|
+
/** Charges for subscription. */
|
|
2030
|
+
charges?: Charge[];
|
|
2031
|
+
}
|
|
2032
|
+
/** Represents a charge applicable to a subscription. */
|
|
2033
|
+
interface Charge {
|
|
2034
|
+
/** The cycle number from which the charge starts. */
|
|
2035
|
+
cycleFrom?: number;
|
|
2036
|
+
/** The number of cycles for which the charge is applicable. */
|
|
2037
|
+
cycleCount?: number | null;
|
|
2038
|
+
/** The breakdown of the charge */
|
|
2039
|
+
totals?: Totals;
|
|
2040
|
+
/** The billing date from which the charge starts */
|
|
2041
|
+
cycleBillingDate?: Date | null;
|
|
2042
|
+
}
|
|
2043
|
+
interface PreviewSubscriptionsChargesRequest {
|
|
2044
|
+
/**
|
|
2045
|
+
* Information required to calculate the preview charges for the subscriptions, including an identifier.
|
|
2046
|
+
* @minSize 1
|
|
2047
|
+
* @maxSize 10
|
|
2048
|
+
*/
|
|
2049
|
+
subscriptionsBillingDetails?: SubscriptionBillingDetails[];
|
|
2050
|
+
/**
|
|
2051
|
+
* Specifies the number of upcoming billing charges to preview for all subscriptions in the order.
|
|
2052
|
+
* For instance, if a subscription costs $10 for the first 3 cycles, $12 for cycles 4 through 7,
|
|
2053
|
+
* $15 for cycles 8 through 10, and $20 for cycle 11 onwards:
|
|
2054
|
+
* - Sending "1" will calculate and return charges for cycles 4 through 7 since it's the first charge in the future.
|
|
2055
|
+
* - Sending "2" will provide a response with charges for cycles 4 through 7 and cycles 8 through 10.
|
|
2056
|
+
* - Sending "3" or more will include totals for cycles 4 through 7, cycles 8 through 10, and from cycle 11 onwards.
|
|
2057
|
+
* If no value is provided, the response will include charges for all upcoming cycles, including the existing one,
|
|
2058
|
+
* in this case, charges for cycle 1 through 3.
|
|
2059
|
+
* If there is a single charge for a subscription, meaning that subscription price remains consistent across all cycles,
|
|
2060
|
+
* then even if future_charges_count is set, it will be ignored and the only charge this subscription has will be returned.
|
|
2061
|
+
* @min 1
|
|
2062
|
+
* @max 10
|
|
2063
|
+
*/
|
|
2064
|
+
numberOfNextRecurringCharges?: number | null;
|
|
2065
|
+
}
|
|
2066
|
+
interface SubscriptionBillingDetails {
|
|
2067
|
+
/**
|
|
2068
|
+
* External identifier of the subscription
|
|
2069
|
+
* @format GUID
|
|
2070
|
+
*/
|
|
2071
|
+
externalId?: string | null;
|
|
2072
|
+
/** Billing details parameters including schedule, currency, etc. */
|
|
2073
|
+
billingSettings?: BillingSettings;
|
|
2074
|
+
/**
|
|
2075
|
+
* Items, minSize is 1, maxSize is 100
|
|
2076
|
+
* @minSize 1
|
|
2077
|
+
* @maxSize 100
|
|
2078
|
+
*/
|
|
2079
|
+
items?: Item[];
|
|
2080
|
+
/** Subscription start date, now if not set */
|
|
2081
|
+
startDate?: Date | null;
|
|
2082
|
+
/** Shipping address associated with subscription. At the moment used only for payments. Optional. */
|
|
2083
|
+
shippingAddress?: FullAddressDetails;
|
|
2084
|
+
}
|
|
2085
|
+
interface PreviewSubscriptionsChargesResponse {
|
|
2086
|
+
/** Charges for the subscriptions, including an identifier. */
|
|
2087
|
+
subscriptionsCharges?: SubscriptionCharges[];
|
|
2088
|
+
}
|
|
2089
|
+
interface SubscriptionCharges {
|
|
2090
|
+
/**
|
|
2091
|
+
* External identifier of the subscription
|
|
2092
|
+
* @format GUID
|
|
2093
|
+
*/
|
|
2094
|
+
externalId?: string | null;
|
|
2095
|
+
/** Charges for subscription. */
|
|
2096
|
+
charges?: Charge[];
|
|
2097
|
+
}
|
|
2098
|
+
interface ListSubscriptionHistoryRequest {
|
|
2099
|
+
/** @format GUID */
|
|
2100
|
+
subscriptionId: string;
|
|
2101
|
+
/** Determines the type of view for the history: either a comprehensive backoffice view or a user-centric view. */
|
|
2102
|
+
mode?: HistoryViewModeWithLiterals;
|
|
2103
|
+
/** Cursor for efficient paging. If paging through results, pass this field from the previous search response to continue to the next page. */
|
|
2104
|
+
cursor?: CursorPaging;
|
|
2105
|
+
}
|
|
2106
|
+
declare enum HistoryViewMode {
|
|
2107
|
+
UNKNOWN = "UNKNOWN",
|
|
2108
|
+
/** Comprehensive view including all history events. */
|
|
2109
|
+
BACKOFFICE = "BACKOFFICE",
|
|
2110
|
+
/** User-centric view of the history. */
|
|
2111
|
+
USER = "USER"
|
|
2112
|
+
}
|
|
2113
|
+
/** @enumType */
|
|
2114
|
+
type HistoryViewModeWithLiterals = HistoryViewMode | 'UNKNOWN' | 'BACKOFFICE' | 'USER';
|
|
2115
|
+
interface ListSubscriptionHistoryResponse {
|
|
2116
|
+
/** List of history entries for the subscription. */
|
|
2117
|
+
historyEntries?: SubscriptionHistoryEntry[];
|
|
2118
|
+
/** Paging metadata. A `next` cursor is returned if there are more results. */
|
|
2119
|
+
pagingMetadata?: PagingMetadataV2;
|
|
2120
|
+
}
|
|
2121
|
+
interface SubscriptionHistoryEntry {
|
|
2122
|
+
/** @format GUID */
|
|
2123
|
+
entryId?: string;
|
|
2124
|
+
/** TODO: add max length? it is not defined in domainevents, so should we? */
|
|
2125
|
+
slug?: string;
|
|
2126
|
+
entryTime?: Date | null;
|
|
2127
|
+
event?: SubscriptionEvent;
|
|
2128
|
+
}
|
|
2129
|
+
interface SubscriptionEvent extends SubscriptionEventPayloadOneOf {
|
|
2130
|
+
created?: SubscriptionCreated;
|
|
2131
|
+
updated?: SubscriptionUpdated;
|
|
2132
|
+
deleted?: SubscriptionDeleted;
|
|
2133
|
+
activated?: SubscriptionActivated;
|
|
2134
|
+
ended?: SubscriptionEnded;
|
|
2135
|
+
canceled?: SubscriptionCanceled;
|
|
2136
|
+
paused?: SubscriptionPaused;
|
|
2137
|
+
resumed?: SubscriptionResumed;
|
|
2138
|
+
pauseRequested?: PauseSubscriptionRequested;
|
|
2139
|
+
resumeRequested?: ResumeSubscriptionRequested;
|
|
2140
|
+
scheduledPauseCanceled?: ScheduledPauseCanceled;
|
|
2141
|
+
scheduledResumeCanceled?: ScheduledResumeCanceled;
|
|
2142
|
+
billingCycleStarted?: SubscriptionBillingCycleStarted;
|
|
2143
|
+
autoRenewalTurnedOn?: SubscriptionAutoRenewalTurnedOn;
|
|
2144
|
+
autoRenewalTurnedOff?: SubscriptionAutoRenewalTurnedOff;
|
|
2145
|
+
cycleReadyToPay?: SubscriptionCycleReadyToPay;
|
|
2146
|
+
extended?: SubscriptionExtended;
|
|
2147
|
+
initialPurchaseCompleted?: SubscriptionInitialPurchaseCompleted;
|
|
2148
|
+
latestInvoiceMarkedAsPaid?: LatestInvoiceMarkedAsPaid;
|
|
2149
|
+
revived?: SubscriptionRevived;
|
|
2150
|
+
billingDateUpdated?: SubscriptionBillingDateUpdated;
|
|
2151
|
+
futureUpdatesRequested?: FutureUpdatesRequested;
|
|
2152
|
+
updatesApplied?: UpdatesApplied;
|
|
2153
|
+
resetPendingUpdates?: ResetPendingUpdates;
|
|
2154
|
+
gracePeriodStarted?: GracePeriodStarted;
|
|
2155
|
+
gracePeriodEnded?: GracePeriodEnded;
|
|
2156
|
+
paymentMethodUpdated?: PaymentMethodUpdated;
|
|
2157
|
+
collectionMethodUpdated?: SubscriptionCollectionMethodUpdated;
|
|
2158
|
+
freeTrailStarted?: FreeTrailStarted;
|
|
2159
|
+
freeTrailEnded?: FreeTrailEnded;
|
|
2160
|
+
billingCyclePaid?: SubscriptionBillingCyclePaid;
|
|
2161
|
+
initiatePaymentMethodSetup?: InitiatedPaymentMethodSetup;
|
|
2162
|
+
subscriptionBoAction?: SubscriptionBackOfficeAction;
|
|
2163
|
+
unknown?: UnknownSubscriptionEvent;
|
|
2164
|
+
}
|
|
2165
|
+
/** @oneof */
|
|
2166
|
+
interface SubscriptionEventPayloadOneOf {
|
|
2167
|
+
created?: SubscriptionCreated;
|
|
2168
|
+
updated?: SubscriptionUpdated;
|
|
2169
|
+
deleted?: SubscriptionDeleted;
|
|
2170
|
+
activated?: SubscriptionActivated;
|
|
2171
|
+
ended?: SubscriptionEnded;
|
|
2172
|
+
canceled?: SubscriptionCanceled;
|
|
2173
|
+
paused?: SubscriptionPaused;
|
|
2174
|
+
resumed?: SubscriptionResumed;
|
|
2175
|
+
pauseRequested?: PauseSubscriptionRequested;
|
|
2176
|
+
resumeRequested?: ResumeSubscriptionRequested;
|
|
2177
|
+
scheduledPauseCanceled?: ScheduledPauseCanceled;
|
|
2178
|
+
scheduledResumeCanceled?: ScheduledResumeCanceled;
|
|
2179
|
+
billingCycleStarted?: SubscriptionBillingCycleStarted;
|
|
2180
|
+
autoRenewalTurnedOn?: SubscriptionAutoRenewalTurnedOn;
|
|
2181
|
+
autoRenewalTurnedOff?: SubscriptionAutoRenewalTurnedOff;
|
|
2182
|
+
cycleReadyToPay?: SubscriptionCycleReadyToPay;
|
|
2183
|
+
extended?: SubscriptionExtended;
|
|
2184
|
+
initialPurchaseCompleted?: SubscriptionInitialPurchaseCompleted;
|
|
2185
|
+
latestInvoiceMarkedAsPaid?: LatestInvoiceMarkedAsPaid;
|
|
2186
|
+
revived?: SubscriptionRevived;
|
|
2187
|
+
billingDateUpdated?: SubscriptionBillingDateUpdated;
|
|
2188
|
+
futureUpdatesRequested?: FutureUpdatesRequested;
|
|
2189
|
+
updatesApplied?: UpdatesApplied;
|
|
2190
|
+
resetPendingUpdates?: ResetPendingUpdates;
|
|
2191
|
+
gracePeriodStarted?: GracePeriodStarted;
|
|
2192
|
+
gracePeriodEnded?: GracePeriodEnded;
|
|
2193
|
+
paymentMethodUpdated?: PaymentMethodUpdated;
|
|
2194
|
+
collectionMethodUpdated?: SubscriptionCollectionMethodUpdated;
|
|
2195
|
+
freeTrailStarted?: FreeTrailStarted;
|
|
2196
|
+
freeTrailEnded?: FreeTrailEnded;
|
|
2197
|
+
billingCyclePaid?: SubscriptionBillingCyclePaid;
|
|
2198
|
+
initiatePaymentMethodSetup?: InitiatedPaymentMethodSetup;
|
|
2199
|
+
subscriptionBoAction?: SubscriptionBackOfficeAction;
|
|
2200
|
+
unknown?: UnknownSubscriptionEvent;
|
|
2201
|
+
}
|
|
2202
|
+
interface SubscriptionCreated {
|
|
2203
|
+
subscription?: Subscription;
|
|
2204
|
+
}
|
|
2205
|
+
interface SubscriptionUpdated {
|
|
2206
|
+
current?: Subscription;
|
|
2207
|
+
previous?: Subscription;
|
|
2208
|
+
diff?: SubscriptionDiff;
|
|
2209
|
+
}
|
|
2210
|
+
interface SubscriptionDiff {
|
|
2211
|
+
added?: string | null;
|
|
2212
|
+
changed?: string | null;
|
|
2213
|
+
deleted?: string | null;
|
|
2214
|
+
}
|
|
2215
|
+
interface SubscriptionDeleted {
|
|
2216
|
+
subscriptionId?: string;
|
|
2217
|
+
}
|
|
2218
|
+
interface FutureUpdatesRequested {
|
|
2219
|
+
subscription?: Subscription;
|
|
2220
|
+
requestedUpdateData?: SubscriptionUpdateData;
|
|
2221
|
+
}
|
|
2222
|
+
interface UpdatesApplied {
|
|
2223
|
+
subscription?: Subscription;
|
|
2224
|
+
updateAction?: UpdateActionWithLiterals;
|
|
2225
|
+
appliedUpdateData?: SubscriptionUpdateData;
|
|
2226
|
+
}
|
|
2227
|
+
interface ResetPendingUpdates {
|
|
2228
|
+
subscription?: Subscription;
|
|
2229
|
+
}
|
|
2230
|
+
interface GracePeriodStarted {
|
|
2231
|
+
subscription?: Subscription;
|
|
2232
|
+
}
|
|
2233
|
+
interface GracePeriodEnded {
|
|
2234
|
+
subscription?: Subscription;
|
|
2235
|
+
/** Indication for the payment settlement method. */
|
|
2236
|
+
paymentSettlementMethod?: PaymentSettlementMethodWithLiterals;
|
|
2237
|
+
}
|
|
2238
|
+
declare enum PaymentSettlementMethod {
|
|
2239
|
+
UNKNOWN = "UNKNOWN",
|
|
2240
|
+
/** System-defined payment settlement. */
|
|
2241
|
+
SYSTEM = "SYSTEM",
|
|
2242
|
+
/** Manually mark the payment as paid. */
|
|
2243
|
+
MARK_AS_PAID = "MARK_AS_PAID",
|
|
2244
|
+
/** Require the customer to pay immediately, by insert a new payment method. */
|
|
2245
|
+
CUSTOMER_PAY_NOW = "CUSTOMER_PAY_NOW"
|
|
2246
|
+
}
|
|
2247
|
+
/** @enumType */
|
|
2248
|
+
type PaymentSettlementMethodWithLiterals = PaymentSettlementMethod | 'UNKNOWN' | 'SYSTEM' | 'MARK_AS_PAID' | 'CUSTOMER_PAY_NOW';
|
|
2249
|
+
interface PaymentMethodUpdated {
|
|
2250
|
+
subscription?: Subscription;
|
|
2251
|
+
initiator?: HistoryActionInitiatorWithLiterals;
|
|
2252
|
+
paymentMode?: PaymentModeWithLiterals;
|
|
2253
|
+
}
|
|
2254
|
+
interface SubscriptionCollectionMethodUpdated {
|
|
2255
|
+
subscription?: Subscription;
|
|
2256
|
+
newCollectionMethod?: CollectionMethodEnumCollectionMethodWithLiterals;
|
|
2257
|
+
previousCollectionMethod?: CollectionMethodEnumCollectionMethodWithLiterals;
|
|
2258
|
+
}
|
|
2259
|
+
interface FreeTrailStarted {
|
|
2260
|
+
subscription?: Subscription;
|
|
2261
|
+
}
|
|
2262
|
+
interface FreeTrailEnded {
|
|
2263
|
+
subscription?: Subscription;
|
|
2264
|
+
}
|
|
2265
|
+
interface InitiatedPaymentMethodSetup {
|
|
2266
|
+
subscription?: Subscription;
|
|
2267
|
+
}
|
|
2268
|
+
interface SubscriptionBackOfficeAction {
|
|
2269
|
+
subscription?: Subscription;
|
|
2270
|
+
/** The backoffice method name */
|
|
2271
|
+
name?: string;
|
|
2272
|
+
/** json as string format, to store the flatted request object */
|
|
2273
|
+
params?: string;
|
|
2274
|
+
}
|
|
2275
|
+
/** Defines unknown events restored from the logs */
|
|
2276
|
+
interface UnknownSubscriptionEvent {
|
|
2277
|
+
subscriptionAsString?: string | null;
|
|
2278
|
+
}
|
|
2279
|
+
|
|
2280
|
+
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
2281
|
+
getUrl: (context: any) => string;
|
|
2282
|
+
httpMethod: K;
|
|
2283
|
+
path: string;
|
|
2284
|
+
pathParams: M;
|
|
2285
|
+
__requestType: T;
|
|
2286
|
+
__originalRequestType: S;
|
|
2287
|
+
__responseType: Q;
|
|
2288
|
+
__originalResponseType: R;
|
|
2289
|
+
};
|
|
2290
|
+
declare function customerGetSubscription(): __PublicMethodMetaInfo<'GET', {
|
|
2291
|
+
id: string;
|
|
2292
|
+
}, GetSubscriptionRequest$1, GetSubscriptionRequest, GetSubscriptionResponse$1, GetSubscriptionResponse>;
|
|
2293
|
+
declare function customerCancelSubscription(): __PublicMethodMetaInfo<'POST', {
|
|
2294
|
+
id: string;
|
|
2295
|
+
}, CustomerCancelSubscriptionRequest$1, CustomerCancelSubscriptionRequest, CustomerCancelSubscriptionResponse$1, CustomerCancelSubscriptionResponse>;
|
|
2296
|
+
declare function customerTurnOnSubscriptionAutoRenewal(): __PublicMethodMetaInfo<'POST', {
|
|
2297
|
+
id: string;
|
|
2298
|
+
}, CustomerTurnOnAutoRenewalRequest$1, CustomerTurnOnAutoRenewalRequest, CustomerTurnOnAutoRenewalResponse$1, CustomerTurnOnAutoRenewalResponse>;
|
|
2299
|
+
declare function customerTurnOffSubscriptionAutoRenewal(): __PublicMethodMetaInfo<'POST', {
|
|
2300
|
+
id: string;
|
|
2301
|
+
}, CustomerTurnOffAutoRenewalRequest$1, CustomerTurnOffAutoRenewalRequest, CustomerTurnOffAutoRenewalResponse$1, CustomerTurnOffAutoRenewalResponse>;
|
|
2302
|
+
declare function customerExtendSubscription(): __PublicMethodMetaInfo<'PATCH', {
|
|
2303
|
+
id: string;
|
|
2304
|
+
}, CustomerExtendSubscriptionRequest$1, CustomerExtendSubscriptionRequest, CustomerExtendSubscriptionResponse$1, CustomerExtendSubscriptionResponse>;
|
|
2305
|
+
declare function customerQuerySubscriptions(): __PublicMethodMetaInfo<'POST', {}, QuerySubscriptionsRequest$1, QuerySubscriptionsRequest, QuerySubscriptionsResponse$1, QuerySubscriptionsResponse>;
|
|
2306
|
+
declare function customerUpdateSubscriptionPaymentMethod(): __PublicMethodMetaInfo<'PATCH', {
|
|
2307
|
+
id: string;
|
|
2308
|
+
}, UpdateSubscriptionPaymentMethodRequest$1, UpdateSubscriptionPaymentMethodRequest, UpdateSubscriptionPaymentMethodResponse$1, UpdateSubscriptionPaymentMethodResponse>;
|
|
2309
|
+
declare function customerAllowedActions(): __PublicMethodMetaInfo<'GET', {
|
|
2310
|
+
id: string;
|
|
2311
|
+
}, CustomerAllowedActionsRequest$1, CustomerAllowedActionsRequest, CustomerAllowedActionsResponse$1, CustomerAllowedActionsResponse>;
|
|
2312
|
+
declare function customerListUpcomingCharges(): __PublicMethodMetaInfo<'GET', {
|
|
2313
|
+
id: string;
|
|
2314
|
+
}, CustomerListUpcomingChargesRequest$1, CustomerListUpcomingChargesRequest, CustomerListUpcomingChargesResponse$1, CustomerListUpcomingChargesResponse>;
|
|
2315
|
+
declare function customerInitiatePaymentMethodSetup(): __PublicMethodMetaInfo<'POST', {
|
|
2316
|
+
id: string;
|
|
2317
|
+
}, InitiatePaymentMethodSetupRequest$1, InitiatePaymentMethodSetupRequest, InitiatePaymentMethodSetupResponse$1, InitiatePaymentMethodSetupResponse>;
|
|
2318
|
+
declare function payCycle(): __PublicMethodMetaInfo<'POST', {
|
|
2319
|
+
subscriptionId: string;
|
|
2320
|
+
}, PayCycleRequest$1, PayCycleRequest, PayCycleResponse$1, PayCycleResponse>;
|
|
2321
|
+
declare function getSubscription(): __PublicMethodMetaInfo<'GET', {
|
|
2322
|
+
id: string;
|
|
2323
|
+
}, GetSubscriptionRequest$1, GetSubscriptionRequest, GetSubscriptionResponse$1, GetSubscriptionResponse>;
|
|
2324
|
+
declare function updateSubscriptionPaymentMethod(): __PublicMethodMetaInfo<'PATCH', {
|
|
2325
|
+
id: string;
|
|
2326
|
+
}, UpdateSubscriptionPaymentMethodRequest$1, UpdateSubscriptionPaymentMethodRequest, UpdateSubscriptionPaymentMethodResponse$1, UpdateSubscriptionPaymentMethodResponse>;
|
|
2327
|
+
declare function updateSubscriptionBillingDate(): __PublicMethodMetaInfo<'PATCH', {
|
|
2328
|
+
id: string;
|
|
2329
|
+
}, UpdateSubscriptionBillingDateRequest$1, UpdateSubscriptionBillingDateRequest, UpdateSubscriptionBillingDateResponse$1, UpdateSubscriptionBillingDateResponse>;
|
|
2330
|
+
declare function cancelSubscription(): __PublicMethodMetaInfo<'POST', {
|
|
2331
|
+
id: string;
|
|
2332
|
+
}, CancelSubscriptionRequest$1, CancelSubscriptionRequest, CancelSubscriptionResponse$1, CancelSubscriptionResponse>;
|
|
2333
|
+
declare function pauseSubscription(): __PublicMethodMetaInfo<'POST', {
|
|
2334
|
+
id: string;
|
|
2335
|
+
}, PauseSubscriptionRequest$1, PauseSubscriptionRequest, PauseSubscriptionResponse$1, PauseSubscriptionResponse>;
|
|
2336
|
+
declare function resumeSubscription(): __PublicMethodMetaInfo<'POST', {
|
|
2337
|
+
id: string;
|
|
2338
|
+
}, ResumeSubscriptionRequest$1, ResumeSubscriptionRequest, ResumeSubscriptionResponse$1, ResumeSubscriptionResponse>;
|
|
2339
|
+
declare function querySubscriptions(): __PublicMethodMetaInfo<'POST', {}, QuerySubscriptionsRequest$1, QuerySubscriptionsRequest, QuerySubscriptionsResponse$1, QuerySubscriptionsResponse>;
|
|
2340
|
+
declare function searchSubscriptions(): __PublicMethodMetaInfo<'POST', {}, SearchSubscriptionsRequest$1, SearchSubscriptionsRequest, SearchSubscriptionsResponse$1, SearchSubscriptionsResponse>;
|
|
2341
|
+
declare function countSubscriptions(): __PublicMethodMetaInfo<'POST', {}, CountSubscriptionsRequest$1, CountSubscriptionsRequest, CountSubscriptionsResponse$1, CountSubscriptionsResponse>;
|
|
2342
|
+
declare function turnOnSubscriptionAutoRenewal(): __PublicMethodMetaInfo<'PATCH', {
|
|
2343
|
+
id: string;
|
|
2344
|
+
}, TurnOnSubscriptionAutoRenewalRequest$1, TurnOnSubscriptionAutoRenewalRequest, TurnOnSubscriptionAutoRenewalResponse$1, TurnOnSubscriptionAutoRenewalResponse>;
|
|
2345
|
+
declare function turnOffSubscriptionAutoRenewal(): __PublicMethodMetaInfo<'PATCH', {
|
|
2346
|
+
id: string;
|
|
2347
|
+
}, TurnOffSubscriptionAutoRenewalRequest$1, TurnOffSubscriptionAutoRenewalRequest, TurnOffSubscriptionAutoRenewalResponse$1, TurnOffSubscriptionAutoRenewalResponse>;
|
|
2348
|
+
declare function markLatestInvoiceAsPaid(): __PublicMethodMetaInfo<'POST', {
|
|
2349
|
+
subscriptionId: string;
|
|
2350
|
+
}, MarkLatestInvoiceAsPaidRequest$1, MarkLatestInvoiceAsPaidRequest, MarkLatestInvoiceAsPaidResponse$1, MarkLatestInvoiceAsPaidResponse>;
|
|
2351
|
+
declare function markBillingCycleAsPaid(): __PublicMethodMetaInfo<'POST', {
|
|
2352
|
+
subscriptionId: string;
|
|
2353
|
+
}, MarkBillingCycleAsPaidRequest$1, MarkBillingCycleAsPaidRequest, MarkBillingCycleAsPaidResponse$1, MarkBillingCycleAsPaidResponse>;
|
|
2354
|
+
declare function getSubscriptionsStats(): __PublicMethodMetaInfo<'GET', {}, GetSubscriptionsStatsRequest$1, GetSubscriptionsStatsRequest, GetSubscriptionsStatsResponse$1, GetSubscriptionsStatsResponse>;
|
|
2355
|
+
declare function extendSubscription(): __PublicMethodMetaInfo<'PATCH', {
|
|
2356
|
+
id: string;
|
|
2357
|
+
}, ExtendSubscriptionRequest$1, ExtendSubscriptionRequest, ExtendSubscriptionResponse$1, ExtendSubscriptionResponse>;
|
|
2358
|
+
declare function allowedActions(): __PublicMethodMetaInfo<'GET', {
|
|
2359
|
+
id: string;
|
|
2360
|
+
}, AllowedActionsRequest$1, AllowedActionsRequest, AllowedActionsResponse$1, AllowedActionsResponse>;
|
|
2361
|
+
declare function listUpcomingCharges(): __PublicMethodMetaInfo<'GET', {
|
|
2362
|
+
subscriptionId: string;
|
|
2363
|
+
}, ListUpcomingChargesRequest$1, ListUpcomingChargesRequest, ListUpcomingChargesResponse$1, ListUpcomingChargesResponse>;
|
|
2364
|
+
declare function previewSubscriptionCharges(): __PublicMethodMetaInfo<'GET', {}, PreviewSubscriptionChargesRequest$1, PreviewSubscriptionChargesRequest, PreviewSubscriptionChargesResponse$1, PreviewSubscriptionChargesResponse>;
|
|
2365
|
+
declare function previewSubscriptionsCharges(): __PublicMethodMetaInfo<'GET', {}, PreviewSubscriptionsChargesRequest$1, PreviewSubscriptionsChargesRequest, PreviewSubscriptionsChargesResponse$1, PreviewSubscriptionsChargesResponse>;
|
|
2366
|
+
declare function initiatePaymentMethodSetup(): __PublicMethodMetaInfo<'POST', {
|
|
2367
|
+
id: string;
|
|
2368
|
+
}, InitiatePaymentMethodSetupRequest$1, InitiatePaymentMethodSetupRequest, InitiatePaymentMethodSetupResponse$1, InitiatePaymentMethodSetupResponse>;
|
|
2369
|
+
declare function listSubscriptionHistory(): __PublicMethodMetaInfo<'GET', {
|
|
2370
|
+
subscriptionId: string;
|
|
2371
|
+
}, ListSubscriptionHistoryRequest$1, ListSubscriptionHistoryRequest, ListSubscriptionHistoryResponse$1, ListSubscriptionHistoryResponse>;
|
|
2372
|
+
|
|
2373
|
+
export { type __PublicMethodMetaInfo, allowedActions, cancelSubscription, countSubscriptions, customerAllowedActions, customerCancelSubscription, customerExtendSubscription, customerGetSubscription, customerInitiatePaymentMethodSetup, customerListUpcomingCharges, customerQuerySubscriptions, customerTurnOffSubscriptionAutoRenewal, customerTurnOnSubscriptionAutoRenewal, customerUpdateSubscriptionPaymentMethod, extendSubscription, getSubscription, getSubscriptionsStats, initiatePaymentMethodSetup, listSubscriptionHistory, listUpcomingCharges, markBillingCycleAsPaid, markLatestInvoiceAsPaid, pauseSubscription, payCycle, previewSubscriptionCharges, previewSubscriptionsCharges, querySubscriptions, resumeSubscription, searchSubscriptions, turnOffSubscriptionAutoRenewal, turnOnSubscriptionAutoRenewal, updateSubscriptionBillingDate, updateSubscriptionPaymentMethod };
|