@wix/auto_sdk_ecom_totals-calculator 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/src/ecom-v1-totals-calculation-totals-calculator.types.d.ts → ecom-v1-totals-calculation-totals-calculator.universal-CGv32zJf.d.mts} +192 -111
- package/build/{internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.types.d.ts → ecom-v1-totals-calculation-totals-calculator.universal-CGv32zJf.d.ts} +192 -111
- package/build/index.d.mts +15 -0
- package/build/index.d.ts +15 -0
- package/build/index.js +423 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +384 -0
- package/build/index.mjs.map +1 -0
- package/build/{es/src/ecom-v1-totals-calculation-totals-calculator.types.d.ts → internal/ecom-v1-totals-calculation-totals-calculator.universal-C6eqMJH-.d.mts} +267 -111
- package/build/internal/{es/src/ecom-v1-totals-calculation-totals-calculator.types.d.ts → ecom-v1-totals-calculation-totals-calculator.universal-C6eqMJH-.d.ts} +267 -111
- package/build/internal/index.d.mts +15 -0
- package/build/internal/index.d.ts +15 -0
- package/build/internal/index.js +423 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +384 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/internal/meta.d.mts +1177 -0
- package/build/internal/meta.d.ts +1177 -0
- package/build/internal/meta.js +190 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +163 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/meta.d.mts +1177 -0
- package/build/meta.d.ts +1177 -0
- package/build/meta.js +190 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +163 -0
- package/build/meta.mjs.map +1 -0
- package/package.json +13 -12
- package/build/cjs/index.d.ts +0 -1
- package/build/cjs/index.js +0 -18
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/meta.d.ts +0 -1
- package/build/cjs/meta.js +0 -18
- package/build/cjs/meta.js.map +0 -1
- package/build/cjs/src/ecom-v1-totals-calculation-totals-calculator.context.d.ts +0 -5
- package/build/cjs/src/ecom-v1-totals-calculation-totals-calculator.context.js +0 -23
- package/build/cjs/src/ecom-v1-totals-calculation-totals-calculator.context.js.map +0 -1
- package/build/cjs/src/ecom-v1-totals-calculation-totals-calculator.http.d.ts +0 -3
- package/build/cjs/src/ecom-v1-totals-calculation-totals-calculator.http.js +0 -144
- package/build/cjs/src/ecom-v1-totals-calculation-totals-calculator.http.js.map +0 -1
- package/build/cjs/src/ecom-v1-totals-calculation-totals-calculator.meta.d.ts +0 -13
- package/build/cjs/src/ecom-v1-totals-calculation-totals-calculator.meta.js +0 -47
- package/build/cjs/src/ecom-v1-totals-calculation-totals-calculator.meta.js.map +0 -1
- package/build/cjs/src/ecom-v1-totals-calculation-totals-calculator.public.d.ts +0 -13
- package/build/cjs/src/ecom-v1-totals-calculation-totals-calculator.public.js +0 -28
- package/build/cjs/src/ecom-v1-totals-calculation-totals-calculator.public.js.map +0 -1
- package/build/cjs/src/ecom-v1-totals-calculation-totals-calculator.types.js +0 -144
- package/build/cjs/src/ecom-v1-totals-calculation-totals-calculator.types.js.map +0 -1
- package/build/cjs/src/ecom-v1-totals-calculation-totals-calculator.universal.d.ts +0 -1568
- package/build/cjs/src/ecom-v1-totals-calculation-totals-calculator.universal.js +0 -275
- package/build/cjs/src/ecom-v1-totals-calculation-totals-calculator.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/package.json +0 -3
- package/build/es/src/ecom-v1-totals-calculation-totals-calculator.context.d.ts +0 -5
- package/build/es/src/ecom-v1-totals-calculation-totals-calculator.context.js +0 -5
- package/build/es/src/ecom-v1-totals-calculation-totals-calculator.context.js.map +0 -1
- package/build/es/src/ecom-v1-totals-calculation-totals-calculator.http.d.ts +0 -3
- package/build/es/src/ecom-v1-totals-calculation-totals-calculator.http.js +0 -140
- package/build/es/src/ecom-v1-totals-calculation-totals-calculator.http.js.map +0 -1
- package/build/es/src/ecom-v1-totals-calculation-totals-calculator.meta.d.ts +0 -13
- package/build/es/src/ecom-v1-totals-calculation-totals-calculator.meta.js +0 -20
- package/build/es/src/ecom-v1-totals-calculation-totals-calculator.meta.js.map +0 -1
- package/build/es/src/ecom-v1-totals-calculation-totals-calculator.public.d.ts +0 -13
- package/build/es/src/ecom-v1-totals-calculation-totals-calculator.public.js +0 -9
- package/build/es/src/ecom-v1-totals-calculation-totals-calculator.public.js.map +0 -1
- package/build/es/src/ecom-v1-totals-calculation-totals-calculator.types.js +0 -141
- package/build/es/src/ecom-v1-totals-calculation-totals-calculator.types.js.map +0 -1
- package/build/es/src/ecom-v1-totals-calculation-totals-calculator.universal.d.ts +0 -1568
- package/build/es/src/ecom-v1-totals-calculation-totals-calculator.universal.js +0 -248
- package/build/es/src/ecom-v1-totals-calculation-totals-calculator.universal.js.map +0 -1
- package/build/internal/cjs/index.d.ts +0 -1
- package/build/internal/cjs/index.js +0 -18
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -1
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.d.ts +0 -1
- package/build/internal/cjs/meta.js +0 -18
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.context.d.ts +0 -5
- package/build/internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.context.js +0 -23
- package/build/internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.context.js.map +0 -1
- package/build/internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.http.d.ts +0 -3
- package/build/internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.http.js +0 -144
- package/build/internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.http.js.map +0 -1
- package/build/internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.meta.d.ts +0 -13
- package/build/internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.meta.js +0 -47
- package/build/internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.meta.js.map +0 -1
- package/build/internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.public.d.ts +0 -13
- package/build/internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.public.js +0 -28
- package/build/internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.public.js.map +0 -1
- package/build/internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.types.js +0 -144
- package/build/internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.types.js.map +0 -1
- package/build/internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.universal.d.ts +0 -1643
- package/build/internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.universal.js +0 -275
- package/build/internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.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/ecom-v1-totals-calculation-totals-calculator.context.d.ts +0 -5
- package/build/internal/es/src/ecom-v1-totals-calculation-totals-calculator.context.js +0 -5
- package/build/internal/es/src/ecom-v1-totals-calculation-totals-calculator.context.js.map +0 -1
- package/build/internal/es/src/ecom-v1-totals-calculation-totals-calculator.http.d.ts +0 -3
- package/build/internal/es/src/ecom-v1-totals-calculation-totals-calculator.http.js +0 -140
- package/build/internal/es/src/ecom-v1-totals-calculation-totals-calculator.http.js.map +0 -1
- package/build/internal/es/src/ecom-v1-totals-calculation-totals-calculator.meta.d.ts +0 -13
- package/build/internal/es/src/ecom-v1-totals-calculation-totals-calculator.meta.js +0 -20
- package/build/internal/es/src/ecom-v1-totals-calculation-totals-calculator.meta.js.map +0 -1
- package/build/internal/es/src/ecom-v1-totals-calculation-totals-calculator.public.d.ts +0 -13
- package/build/internal/es/src/ecom-v1-totals-calculation-totals-calculator.public.js +0 -9
- package/build/internal/es/src/ecom-v1-totals-calculation-totals-calculator.public.js.map +0 -1
- package/build/internal/es/src/ecom-v1-totals-calculation-totals-calculator.types.js +0 -141
- package/build/internal/es/src/ecom-v1-totals-calculation-totals-calculator.types.js.map +0 -1
- package/build/internal/es/src/ecom-v1-totals-calculation-totals-calculator.universal.d.ts +0 -1643
- package/build/internal/es/src/ecom-v1-totals-calculation-totals-calculator.universal.js +0 -248
- package/build/internal/es/src/ecom-v1-totals-calculation-totals-calculator.universal.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
interface TotalsCalculationEntity {
|
|
2
2
|
}
|
|
3
|
-
|
|
3
|
+
interface CalculateTotalsRequest extends CalculateTotalsRequestCouponOneOf, CalculateTotalsRequestGiftCardOneOf {
|
|
4
4
|
/** Coupon ID. */
|
|
5
5
|
couponId?: string | null;
|
|
6
6
|
/** Coupon code. */
|
|
@@ -63,14 +63,14 @@ export interface CalculateTotalsRequest extends CalculateTotalsRequestCouponOneO
|
|
|
63
63
|
purchaseFlowId?: string | null;
|
|
64
64
|
}
|
|
65
65
|
/** @oneof */
|
|
66
|
-
|
|
66
|
+
interface CalculateTotalsRequestCouponOneOf {
|
|
67
67
|
/** Coupon ID. */
|
|
68
68
|
couponId?: string | null;
|
|
69
69
|
/** Coupon code. */
|
|
70
70
|
couponCode?: string | null;
|
|
71
71
|
}
|
|
72
72
|
/** @oneof */
|
|
73
|
-
|
|
73
|
+
interface CalculateTotalsRequestGiftCardOneOf {
|
|
74
74
|
/**
|
|
75
75
|
* Gift card ID.
|
|
76
76
|
* @format GUID
|
|
@@ -79,13 +79,13 @@ export interface CalculateTotalsRequestGiftCardOneOf {
|
|
|
79
79
|
/** Gift card code. */
|
|
80
80
|
giftCardCode?: string | null;
|
|
81
81
|
}
|
|
82
|
-
|
|
82
|
+
interface LineItem {
|
|
83
83
|
/**
|
|
84
84
|
* Line item ID.
|
|
85
85
|
* @minLength 1
|
|
86
86
|
* @maxLength 100
|
|
87
87
|
*/
|
|
88
|
-
|
|
88
|
+
_id?: string;
|
|
89
89
|
/**
|
|
90
90
|
* Quantity.
|
|
91
91
|
* @max 100000
|
|
@@ -149,7 +149,7 @@ export interface LineItem {
|
|
|
149
149
|
itemType?: ItemType;
|
|
150
150
|
}
|
|
151
151
|
/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
|
|
152
|
-
|
|
152
|
+
interface CatalogReference {
|
|
153
153
|
/**
|
|
154
154
|
* ID of the item within the catalog it belongs to.
|
|
155
155
|
* @minLength 1
|
|
@@ -175,7 +175,7 @@ export interface CatalogReference {
|
|
|
175
175
|
*/
|
|
176
176
|
options?: Record<string, any> | null;
|
|
177
177
|
}
|
|
178
|
-
|
|
178
|
+
interface PhysicalProperties {
|
|
179
179
|
/** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
|
|
180
180
|
weight?: number | null;
|
|
181
181
|
/**
|
|
@@ -186,24 +186,24 @@ export interface PhysicalProperties {
|
|
|
186
186
|
/** Whether this line item is shippable. */
|
|
187
187
|
shippable?: boolean;
|
|
188
188
|
}
|
|
189
|
-
|
|
189
|
+
interface Scope {
|
|
190
190
|
/** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */
|
|
191
191
|
namespace?: string;
|
|
192
192
|
/** Coupon scope's applied group (e.g., event or ticket in Wix Events) */
|
|
193
193
|
group?: Group;
|
|
194
194
|
}
|
|
195
|
-
|
|
195
|
+
interface Group {
|
|
196
196
|
/** Coupon scope's group (e.g., product or collection in Wix Stores). See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */
|
|
197
197
|
name?: string;
|
|
198
198
|
/** Item ID (when the coupon scope is limited to just one item). */
|
|
199
199
|
entityId?: string | null;
|
|
200
200
|
}
|
|
201
|
-
|
|
201
|
+
interface SubscriptionSettings {
|
|
202
202
|
/** Frequency of recurring payment. Every day/week/month/year. */
|
|
203
203
|
frequency?: SubscriptionFrequency;
|
|
204
204
|
}
|
|
205
205
|
/** Frequency unit of recurring payment */
|
|
206
|
-
|
|
206
|
+
declare enum SubscriptionFrequency {
|
|
207
207
|
UNDEFINED = "UNDEFINED",
|
|
208
208
|
DAY = "DAY",
|
|
209
209
|
WEEK = "WEEK",
|
|
@@ -211,7 +211,7 @@ export declare enum SubscriptionFrequency {
|
|
|
211
211
|
YEAR = "YEAR"
|
|
212
212
|
}
|
|
213
213
|
/** Type of selected payment option for catalog item */
|
|
214
|
-
|
|
214
|
+
declare enum PaymentOptionType {
|
|
215
215
|
/** The entire payment for this item happens as part of the checkout. */
|
|
216
216
|
FULL_PAYMENT_ONLINE = "FULL_PAYMENT_ONLINE",
|
|
217
217
|
/** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */
|
|
@@ -223,7 +223,7 @@ export declare enum PaymentOptionType {
|
|
|
223
223
|
/** Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`. */
|
|
224
224
|
MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE"
|
|
225
225
|
}
|
|
226
|
-
|
|
226
|
+
interface ServiceProperties {
|
|
227
227
|
/**
|
|
228
228
|
* Date and time the service is to be provided, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
|
|
229
229
|
* For example, the start time of a class.
|
|
@@ -236,42 +236,42 @@ export interface ServiceProperties {
|
|
|
236
236
|
*/
|
|
237
237
|
numberOfParticipants?: number | null;
|
|
238
238
|
}
|
|
239
|
-
|
|
239
|
+
interface ItemType extends ItemTypeItemTypeDataOneOf {
|
|
240
240
|
/** Preset item type. */
|
|
241
241
|
preset?: ItemTypeItemType;
|
|
242
242
|
/** Custom item type. When none of the preset types are suitable, specifies the custom type. */
|
|
243
243
|
custom?: string;
|
|
244
244
|
}
|
|
245
245
|
/** @oneof */
|
|
246
|
-
|
|
246
|
+
interface ItemTypeItemTypeDataOneOf {
|
|
247
247
|
/** Preset item type. */
|
|
248
248
|
preset?: ItemTypeItemType;
|
|
249
249
|
/** Custom item type. When none of the preset types are suitable, specifies the custom type. */
|
|
250
250
|
custom?: string;
|
|
251
251
|
}
|
|
252
|
-
|
|
252
|
+
declare enum ItemTypeItemType {
|
|
253
253
|
UNRECOGNISED = "UNRECOGNISED",
|
|
254
254
|
PHYSICAL = "PHYSICAL",
|
|
255
255
|
DIGITAL = "DIGITAL",
|
|
256
256
|
GIFT_CARD = "GIFT_CARD",
|
|
257
257
|
SERVICE = "SERVICE"
|
|
258
258
|
}
|
|
259
|
-
|
|
259
|
+
interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf {
|
|
260
260
|
/** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
|
|
261
261
|
addressType?: TaxableAddressType;
|
|
262
262
|
}
|
|
263
263
|
/** @oneof */
|
|
264
|
-
|
|
264
|
+
interface TaxableAddressTaxableAddressDataOneOf {
|
|
265
265
|
/** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
|
|
266
266
|
addressType?: TaxableAddressType;
|
|
267
267
|
}
|
|
268
|
-
|
|
268
|
+
declare enum TaxableAddressType {
|
|
269
269
|
UNKNOWN_TAXABLE_ADDRESS = "UNKNOWN_TAXABLE_ADDRESS",
|
|
270
270
|
BUSINESS = "BUSINESS",
|
|
271
271
|
BILLING = "BILLING",
|
|
272
272
|
SHIPPING = "SHIPPING"
|
|
273
273
|
}
|
|
274
|
-
|
|
274
|
+
interface ApiV1AdditionalFee {
|
|
275
275
|
/**
|
|
276
276
|
* Additional fee's unique code or ID.
|
|
277
277
|
* @minLength 1
|
|
@@ -299,7 +299,7 @@ export interface ApiV1AdditionalFee {
|
|
|
299
299
|
taxDetails?: V1TaxDetails;
|
|
300
300
|
}
|
|
301
301
|
/** Tax details. */
|
|
302
|
-
|
|
302
|
+
interface V1TaxDetails {
|
|
303
303
|
/** Whether additional fee is taxable. */
|
|
304
304
|
taxable?: boolean;
|
|
305
305
|
/**
|
|
@@ -308,13 +308,13 @@ export interface V1TaxDetails {
|
|
|
308
308
|
*/
|
|
309
309
|
taxGroupId?: string | null;
|
|
310
310
|
}
|
|
311
|
-
|
|
311
|
+
interface ModifierGroup {
|
|
312
312
|
/**
|
|
313
313
|
* Modifier group id.
|
|
314
314
|
* @minLength 1
|
|
315
315
|
* @maxLength 36
|
|
316
316
|
*/
|
|
317
|
-
|
|
317
|
+
_id?: string;
|
|
318
318
|
/** Modifier group name. */
|
|
319
319
|
name?: TranslatableString;
|
|
320
320
|
/**
|
|
@@ -324,7 +324,7 @@ export interface ModifierGroup {
|
|
|
324
324
|
*/
|
|
325
325
|
modifiers?: ItemModifier[];
|
|
326
326
|
}
|
|
327
|
-
|
|
327
|
+
interface TranslatableString {
|
|
328
328
|
/**
|
|
329
329
|
* __Required.__ String in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
|
|
330
330
|
*
|
|
@@ -345,13 +345,13 @@ export interface TranslatableString {
|
|
|
345
345
|
*/
|
|
346
346
|
translated?: string | null;
|
|
347
347
|
}
|
|
348
|
-
|
|
348
|
+
interface ItemModifier {
|
|
349
349
|
/**
|
|
350
350
|
* Modifier ID.
|
|
351
351
|
* @minLength 1
|
|
352
352
|
* @maxLength 36
|
|
353
353
|
*/
|
|
354
|
-
|
|
354
|
+
_id?: string;
|
|
355
355
|
/**
|
|
356
356
|
* The quantity of this modifier.
|
|
357
357
|
* @min 1
|
|
@@ -369,7 +369,7 @@ export interface ItemModifier {
|
|
|
369
369
|
price?: string | null;
|
|
370
370
|
}
|
|
371
371
|
/** Physical address */
|
|
372
|
-
|
|
372
|
+
interface Address {
|
|
373
373
|
/**
|
|
374
374
|
* Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
|
|
375
375
|
* @format COUNTRY
|
|
@@ -396,7 +396,7 @@ export interface Address {
|
|
|
396
396
|
* Main address line (usually street name and number).
|
|
397
397
|
* @maxLength 150
|
|
398
398
|
*/
|
|
399
|
-
|
|
399
|
+
addressLine1?: string | null;
|
|
400
400
|
/**
|
|
401
401
|
* Free text providing more detailed address info. Usually contains apt, suite, floor.
|
|
402
402
|
* @maxLength 100
|
|
@@ -413,19 +413,19 @@ export interface Address {
|
|
|
413
413
|
*/
|
|
414
414
|
subdivisionFullname?: string | null;
|
|
415
415
|
}
|
|
416
|
-
|
|
416
|
+
interface StreetAddress {
|
|
417
417
|
/** Street number. */
|
|
418
418
|
number?: string;
|
|
419
419
|
/** Street name. */
|
|
420
420
|
name?: string;
|
|
421
421
|
}
|
|
422
|
-
|
|
422
|
+
interface AddressLocation {
|
|
423
423
|
/** Address latitude. */
|
|
424
424
|
latitude?: number | null;
|
|
425
425
|
/** Address longitude. */
|
|
426
426
|
longitude?: number | null;
|
|
427
427
|
}
|
|
428
|
-
|
|
428
|
+
interface SelectedShippingOption {
|
|
429
429
|
/**
|
|
430
430
|
* Carrier ID.
|
|
431
431
|
* @format GUID
|
|
@@ -438,7 +438,7 @@ export interface SelectedShippingOption {
|
|
|
438
438
|
*/
|
|
439
439
|
code?: string;
|
|
440
440
|
}
|
|
441
|
-
|
|
441
|
+
interface MerchantDiscountInput {
|
|
442
442
|
/**
|
|
443
443
|
* Discount amount.
|
|
444
444
|
* @decimalValue options { gte:0 }
|
|
@@ -451,20 +451,20 @@ export interface MerchantDiscountInput {
|
|
|
451
451
|
*/
|
|
452
452
|
lineItemIds?: string[];
|
|
453
453
|
}
|
|
454
|
-
|
|
454
|
+
interface SelectedMemberships {
|
|
455
455
|
/**
|
|
456
456
|
* Selected memberships.
|
|
457
457
|
* @maxSize 300
|
|
458
458
|
*/
|
|
459
459
|
memberships?: SelectedMembership[];
|
|
460
460
|
}
|
|
461
|
-
|
|
461
|
+
interface SelectedMembership {
|
|
462
462
|
/**
|
|
463
463
|
* Membership ID.
|
|
464
464
|
* @minLength 1
|
|
465
465
|
* @maxLength 100
|
|
466
466
|
*/
|
|
467
|
-
|
|
467
|
+
_id?: string;
|
|
468
468
|
/**
|
|
469
469
|
* ID of the app providing this payment option.
|
|
470
470
|
* @format GUID
|
|
@@ -479,7 +479,7 @@ export interface SelectedMembership {
|
|
|
479
479
|
*/
|
|
480
480
|
lineItemIds?: string[];
|
|
481
481
|
}
|
|
482
|
-
|
|
482
|
+
interface CarrierShippingOption {
|
|
483
483
|
/**
|
|
484
484
|
* This carrier's unique ID
|
|
485
485
|
* @format GUID
|
|
@@ -488,7 +488,7 @@ export interface CarrierShippingOption {
|
|
|
488
488
|
/** Shipping service options offered by this carrier for this request */
|
|
489
489
|
shippingOptions?: ShippingOption;
|
|
490
490
|
}
|
|
491
|
-
|
|
491
|
+
interface ShippingOption {
|
|
492
492
|
/**
|
|
493
493
|
* Unique code of provided shipping option like "usps_std_overnight".
|
|
494
494
|
* For legacy calculators this would be the UUID of the option.
|
|
@@ -513,7 +513,7 @@ export interface ShippingOption {
|
|
|
513
513
|
/** If the delivery solution is a partial and doesn't apply to all items. */
|
|
514
514
|
partial?: boolean | null;
|
|
515
515
|
}
|
|
516
|
-
|
|
516
|
+
interface DeliveryLogistics {
|
|
517
517
|
/**
|
|
518
518
|
* Expected delivery time, in free text. For example, "3-5 business days".
|
|
519
519
|
* @maxLength 500
|
|
@@ -527,7 +527,7 @@ export interface DeliveryLogistics {
|
|
|
527
527
|
/** Pickup details. */
|
|
528
528
|
pickupDetails?: PickupDetails;
|
|
529
529
|
}
|
|
530
|
-
|
|
530
|
+
interface PickupDetails {
|
|
531
531
|
/** Pickup address. */
|
|
532
532
|
address?: Address;
|
|
533
533
|
/**
|
|
@@ -538,24 +538,24 @@ export interface PickupDetails {
|
|
|
538
538
|
/** Pickup method */
|
|
539
539
|
pickupMethod?: PickupMethod;
|
|
540
540
|
}
|
|
541
|
-
|
|
541
|
+
declare enum PickupMethod {
|
|
542
542
|
UNKNOWN_METHOD = "UNKNOWN_METHOD",
|
|
543
543
|
STORE_PICKUP = "STORE_PICKUP",
|
|
544
544
|
PICKUP_POINT = "PICKUP_POINT"
|
|
545
545
|
}
|
|
546
|
-
|
|
546
|
+
interface DeliveryTimeSlot {
|
|
547
547
|
/** starting time of the delivery time slot */
|
|
548
548
|
from?: Date | null;
|
|
549
549
|
/** ending time of the delivery time slot */
|
|
550
550
|
to?: Date | null;
|
|
551
551
|
}
|
|
552
|
-
|
|
552
|
+
interface ShippingPrice {
|
|
553
553
|
/** Shipping price. */
|
|
554
554
|
price?: MultiCurrencyPrice;
|
|
555
555
|
/** Other costs such as insurance, handling & packaging for fragile items, etc. */
|
|
556
556
|
otherCharges?: OtherCharge[];
|
|
557
557
|
}
|
|
558
|
-
|
|
558
|
+
interface MultiCurrencyPrice {
|
|
559
559
|
/**
|
|
560
560
|
* Amount.
|
|
561
561
|
* @decimalValue options { gte:0, lte:1000000000000000 }
|
|
@@ -578,17 +578,17 @@ export interface MultiCurrencyPrice {
|
|
|
578
578
|
*/
|
|
579
579
|
formattedConvertedAmount?: string;
|
|
580
580
|
}
|
|
581
|
-
|
|
581
|
+
interface OtherCharge {
|
|
582
582
|
/** Type of additional cost. */
|
|
583
583
|
type?: ChargeType;
|
|
584
584
|
/** Price of added cost. */
|
|
585
585
|
price?: MultiCurrencyPrice;
|
|
586
586
|
}
|
|
587
|
-
|
|
587
|
+
declare enum ChargeType {
|
|
588
588
|
HANDLING_FEE = "HANDLING_FEE",
|
|
589
589
|
INSURANCE = "INSURANCE"
|
|
590
590
|
}
|
|
591
|
-
|
|
591
|
+
interface DeliveryAllocation {
|
|
592
592
|
/** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */
|
|
593
593
|
deliveryCarrier?: Carrier;
|
|
594
594
|
/** The delivery region that are relevant for this delivery solution. */
|
|
@@ -596,7 +596,7 @@ export interface DeliveryAllocation {
|
|
|
596
596
|
/** Populated if the delivery solution is a partially supplied by this carrier. */
|
|
597
597
|
applicableLineItems?: ApplicableLineItems;
|
|
598
598
|
}
|
|
599
|
-
|
|
599
|
+
interface Carrier {
|
|
600
600
|
/**
|
|
601
601
|
* The carrier app id
|
|
602
602
|
* @format GUID
|
|
@@ -608,19 +608,19 @@ export interface Carrier {
|
|
|
608
608
|
*/
|
|
609
609
|
code?: string;
|
|
610
610
|
}
|
|
611
|
-
|
|
611
|
+
interface Region {
|
|
612
612
|
/**
|
|
613
613
|
* The delivery region id.
|
|
614
614
|
* @format GUID
|
|
615
615
|
*/
|
|
616
|
-
|
|
616
|
+
_id?: string | null;
|
|
617
617
|
/**
|
|
618
618
|
* The delivery region name.
|
|
619
619
|
* @maxLength 100
|
|
620
620
|
*/
|
|
621
621
|
name?: string | null;
|
|
622
622
|
}
|
|
623
|
-
|
|
623
|
+
interface ApplicableLineItems {
|
|
624
624
|
/**
|
|
625
625
|
* Line items that the delivery solution is for.
|
|
626
626
|
* @maxSize 300
|
|
@@ -629,7 +629,7 @@ export interface ApplicableLineItems {
|
|
|
629
629
|
*/
|
|
630
630
|
lineItemIds?: string[];
|
|
631
631
|
}
|
|
632
|
-
|
|
632
|
+
interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
|
|
633
633
|
/** Coupon details. */
|
|
634
634
|
coupon?: Coupon;
|
|
635
635
|
/** Merchant discount. */
|
|
@@ -648,7 +648,7 @@ export interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
|
|
|
648
648
|
lineItemIds?: string[];
|
|
649
649
|
}
|
|
650
650
|
/** @oneof */
|
|
651
|
-
|
|
651
|
+
interface AppliedDiscountDiscountSourceOneOf {
|
|
652
652
|
/** Coupon details. */
|
|
653
653
|
coupon?: Coupon;
|
|
654
654
|
/** Merchant discount. */
|
|
@@ -656,15 +656,15 @@ export interface AppliedDiscountDiscountSourceOneOf {
|
|
|
656
656
|
/** Discount rule */
|
|
657
657
|
discountRule?: DiscountRule;
|
|
658
658
|
}
|
|
659
|
-
|
|
659
|
+
declare enum DiscountType {
|
|
660
660
|
GLOBAL = "GLOBAL",
|
|
661
661
|
SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
|
|
662
662
|
SHIPPING = "SHIPPING"
|
|
663
663
|
}
|
|
664
664
|
/** Coupon */
|
|
665
|
-
|
|
665
|
+
interface Coupon {
|
|
666
666
|
/** Coupon ID. */
|
|
667
|
-
|
|
667
|
+
_id?: string;
|
|
668
668
|
/** Coupon code. */
|
|
669
669
|
code?: string;
|
|
670
670
|
/** Coupon value. */
|
|
@@ -672,7 +672,7 @@ export interface Coupon {
|
|
|
672
672
|
/** Coupon name. */
|
|
673
673
|
name?: string;
|
|
674
674
|
}
|
|
675
|
-
|
|
675
|
+
interface MerchantDiscount {
|
|
676
676
|
/** Discount value. */
|
|
677
677
|
amount?: MultiCurrencyPrice;
|
|
678
678
|
/**
|
|
@@ -682,18 +682,18 @@ export interface MerchantDiscount {
|
|
|
682
682
|
*/
|
|
683
683
|
percentage?: number | null;
|
|
684
684
|
}
|
|
685
|
-
|
|
685
|
+
interface DiscountRule {
|
|
686
686
|
/**
|
|
687
687
|
* Discount rule ID
|
|
688
688
|
* @format GUID
|
|
689
689
|
*/
|
|
690
|
-
|
|
690
|
+
_id?: string;
|
|
691
691
|
/** Discount rule name */
|
|
692
692
|
name?: DiscountRuleName;
|
|
693
693
|
/** Discount value. */
|
|
694
694
|
amount?: MultiCurrencyPrice;
|
|
695
695
|
}
|
|
696
|
-
|
|
696
|
+
interface DiscountRuleName {
|
|
697
697
|
/**
|
|
698
698
|
* Original discount rule name (in site's default language).
|
|
699
699
|
* @minLength 1
|
|
@@ -707,16 +707,16 @@ export interface DiscountRuleName {
|
|
|
707
707
|
*/
|
|
708
708
|
translated?: string | null;
|
|
709
709
|
}
|
|
710
|
-
|
|
710
|
+
interface LineItemDiscount {
|
|
711
711
|
/**
|
|
712
712
|
* ID of line item the discount applies to.
|
|
713
713
|
* @format GUID
|
|
714
714
|
*/
|
|
715
|
-
|
|
715
|
+
_id?: string;
|
|
716
716
|
/** Discount value. */
|
|
717
717
|
totalDiscountAmount?: MultiCurrencyPrice;
|
|
718
718
|
}
|
|
719
|
-
|
|
719
|
+
interface AdditionalFee {
|
|
720
720
|
/**
|
|
721
721
|
* Additional fee's unique code (or ID) for future processing
|
|
722
722
|
* @minLength 1
|
|
@@ -755,7 +755,7 @@ export interface AdditionalFee {
|
|
|
755
755
|
lineItemIds?: string[];
|
|
756
756
|
}
|
|
757
757
|
/** Tax Details. */
|
|
758
|
-
|
|
758
|
+
interface TaxDetails {
|
|
759
759
|
/** Indication if additional fee is taxable or not */
|
|
760
760
|
taxable?: boolean;
|
|
761
761
|
/**
|
|
@@ -764,13 +764,13 @@ export interface TaxDetails {
|
|
|
764
764
|
*/
|
|
765
765
|
taxGroupId?: string | null;
|
|
766
766
|
}
|
|
767
|
-
|
|
767
|
+
declare enum DataFetchType {
|
|
768
768
|
SHIPPING = "SHIPPING",
|
|
769
769
|
DISCOUNT = "DISCOUNT",
|
|
770
770
|
ADDITIONAL_FEES = "ADDITIONAL_FEES",
|
|
771
771
|
ORDER_VALIDATION = "ORDER_VALIDATION"
|
|
772
772
|
}
|
|
773
|
-
|
|
773
|
+
interface ExternalReference {
|
|
774
774
|
/**
|
|
775
775
|
* ID of the app associated with the purchase flow.
|
|
776
776
|
* For example, the Wix Pay Links app ID.
|
|
@@ -787,7 +787,7 @@ export interface ExternalReference {
|
|
|
787
787
|
*/
|
|
788
788
|
resourceId?: string | null;
|
|
789
789
|
}
|
|
790
|
-
|
|
790
|
+
interface CalculateTotalsResponse {
|
|
791
791
|
/** Calculate line items. */
|
|
792
792
|
calculatedLineItems?: CalculatedLineItem[];
|
|
793
793
|
/** Price summary. */
|
|
@@ -860,7 +860,7 @@ export interface CalculateTotalsResponse {
|
|
|
860
860
|
*/
|
|
861
861
|
totalAfterGiftCard?: MultiCurrencyPrice;
|
|
862
862
|
}
|
|
863
|
-
|
|
863
|
+
interface CalculatedLineItem {
|
|
864
864
|
/** Line item ID. */
|
|
865
865
|
lineItemId?: string;
|
|
866
866
|
/** Price breakdown for this line item. */
|
|
@@ -874,7 +874,7 @@ export interface CalculatedLineItem {
|
|
|
874
874
|
*/
|
|
875
875
|
paymentOption?: PaymentOptionType;
|
|
876
876
|
}
|
|
877
|
-
|
|
877
|
+
interface LineItemPricesData {
|
|
878
878
|
/** Total price after discounts, tax, and modifiers. */
|
|
879
879
|
totalPriceAfterTax?: MultiCurrencyPrice;
|
|
880
880
|
/** Total price after discounts and modifiers, and before tax. */
|
|
@@ -900,7 +900,7 @@ export interface LineItemPricesData {
|
|
|
900
900
|
/** Total price of all item modifiers. */
|
|
901
901
|
modifiers?: MultiCurrencyPrice;
|
|
902
902
|
}
|
|
903
|
-
|
|
903
|
+
interface ItemTaxFullDetails {
|
|
904
904
|
/** Amount for which tax is calculated. */
|
|
905
905
|
taxableAmount?: MultiCurrencyPrice;
|
|
906
906
|
/**
|
|
@@ -917,7 +917,7 @@ export interface ItemTaxFullDetails {
|
|
|
917
917
|
*/
|
|
918
918
|
rateBreakdown?: TaxRateBreakdown[];
|
|
919
919
|
}
|
|
920
|
-
|
|
920
|
+
interface TaxRateBreakdown {
|
|
921
921
|
/**
|
|
922
922
|
* Name of tax against which the calculation was performed.
|
|
923
923
|
* @maxLength 100
|
|
@@ -935,7 +935,7 @@ export interface TaxRateBreakdown {
|
|
|
935
935
|
* TaxBreakdown represents tax information for a line item.
|
|
936
936
|
* It holds the tax amount and the tax rate for each tax authority that apply on the line item.
|
|
937
937
|
*/
|
|
938
|
-
|
|
938
|
+
interface TaxBreakdown {
|
|
939
939
|
/**
|
|
940
940
|
* The name of the jurisdiction to which this tax detail applies. For example, "New York" or "Quebec".
|
|
941
941
|
* @maxLength 200
|
|
@@ -967,7 +967,7 @@ export interface TaxBreakdown {
|
|
|
967
967
|
jurisdictionType?: JurisdictionType;
|
|
968
968
|
}
|
|
969
969
|
/** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
|
|
970
|
-
|
|
970
|
+
declare enum JurisdictionType {
|
|
971
971
|
UNDEFINED = "UNDEFINED",
|
|
972
972
|
COUNTRY = "COUNTRY",
|
|
973
973
|
STATE = "STATE",
|
|
@@ -975,7 +975,7 @@ export declare enum JurisdictionType {
|
|
|
975
975
|
CITY = "CITY",
|
|
976
976
|
SPECIAL = "SPECIAL"
|
|
977
977
|
}
|
|
978
|
-
|
|
978
|
+
interface PriceSummary {
|
|
979
979
|
/** Subtotal of all line items, before discounts and before tax. */
|
|
980
980
|
subtotal?: MultiCurrencyPrice;
|
|
981
981
|
/** Total shipping price, before discounts and before tax. */
|
|
@@ -989,12 +989,12 @@ export interface PriceSummary {
|
|
|
989
989
|
/** Total additional fees price before tax. */
|
|
990
990
|
additionalFees?: MultiCurrencyPrice;
|
|
991
991
|
}
|
|
992
|
-
|
|
992
|
+
interface GiftCard {
|
|
993
993
|
/**
|
|
994
994
|
* Gift Card ID.
|
|
995
995
|
* @deprecated
|
|
996
996
|
*/
|
|
997
|
-
|
|
997
|
+
_id?: string;
|
|
998
998
|
/** Gift card obfuscated code. */
|
|
999
999
|
obfuscatedCode?: string;
|
|
1000
1000
|
/** Gift card value. */
|
|
@@ -1012,7 +1012,7 @@ export interface GiftCard {
|
|
|
1012
1012
|
*/
|
|
1013
1013
|
externalId?: string | null;
|
|
1014
1014
|
}
|
|
1015
|
-
|
|
1015
|
+
interface TaxSummary {
|
|
1016
1016
|
/**
|
|
1017
1017
|
* Amount for which tax is calculated, added from line items.
|
|
1018
1018
|
* @readonly
|
|
@@ -1029,7 +1029,7 @@ export interface TaxSummary {
|
|
|
1029
1029
|
*/
|
|
1030
1030
|
calculationDetails?: TaxCalculationDetails;
|
|
1031
1031
|
}
|
|
1032
|
-
|
|
1032
|
+
interface TaxCalculationDetails extends TaxCalculationDetailsCalculationDetailsOneOf {
|
|
1033
1033
|
/** Reason the manual calculation was used. */
|
|
1034
1034
|
manualRateReason?: ManualCalculationReason;
|
|
1035
1035
|
/** Details of the fallback rate calculation. */
|
|
@@ -1038,13 +1038,13 @@ export interface TaxCalculationDetails extends TaxCalculationDetailsCalculationD
|
|
|
1038
1038
|
rateType?: RateType;
|
|
1039
1039
|
}
|
|
1040
1040
|
/** @oneof */
|
|
1041
|
-
|
|
1041
|
+
interface TaxCalculationDetailsCalculationDetailsOneOf {
|
|
1042
1042
|
/** Reason the manual calculation was used. */
|
|
1043
1043
|
manualRateReason?: ManualCalculationReason;
|
|
1044
1044
|
/** Details of the fallback rate calculation. */
|
|
1045
1045
|
autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails;
|
|
1046
1046
|
}
|
|
1047
|
-
|
|
1047
|
+
declare enum RateType {
|
|
1048
1048
|
/** no tax being collected for this request due to location of purchase */
|
|
1049
1049
|
NO_TAX_COLLECTED = "NO_TAX_COLLECTED",
|
|
1050
1050
|
/** manual rate used for calculation */
|
|
@@ -1054,25 +1054,25 @@ export declare enum RateType {
|
|
|
1054
1054
|
/** fallback rate used for calculation */
|
|
1055
1055
|
FALLBACK_RATE = "FALLBACK_RATE"
|
|
1056
1056
|
}
|
|
1057
|
-
|
|
1057
|
+
declare enum ManualCalculationReason {
|
|
1058
1058
|
/** user set calculator in Business Manager to be Manual */
|
|
1059
1059
|
GLOBAL_SETTING_TO_MANUAL = "GLOBAL_SETTING_TO_MANUAL",
|
|
1060
1060
|
/** specific region is on manual even though Global setting is Auto-tax */
|
|
1061
1061
|
REGION_SETTING_TO_MANUAL = "REGION_SETTING_TO_MANUAL"
|
|
1062
1062
|
}
|
|
1063
|
-
|
|
1063
|
+
interface AutoTaxFallbackCalculationDetails {
|
|
1064
1064
|
/** reason for fallback */
|
|
1065
1065
|
fallbackReason?: FallbackReason;
|
|
1066
1066
|
/** invalid request (i.e. address), timeout, internal error, license error, and others will be encoded here */
|
|
1067
1067
|
error?: ApplicationError;
|
|
1068
1068
|
}
|
|
1069
|
-
|
|
1069
|
+
declare enum FallbackReason {
|
|
1070
1070
|
/** auto-tax failed to be calculated */
|
|
1071
1071
|
AUTO_TAX_FAILED = "AUTO_TAX_FAILED",
|
|
1072
1072
|
/** auto-tax was temporarily deactivated on a system-level */
|
|
1073
1073
|
AUTO_TAX_DEACTIVATED = "AUTO_TAX_DEACTIVATED"
|
|
1074
1074
|
}
|
|
1075
|
-
|
|
1075
|
+
interface ApplicationError {
|
|
1076
1076
|
/** Error code. */
|
|
1077
1077
|
code?: string;
|
|
1078
1078
|
/** Description of the error. */
|
|
@@ -1084,7 +1084,7 @@ export interface ApplicationError {
|
|
|
1084
1084
|
* The summary of the tax breakdown for all the line items. It will hold for each tax name, the aggregated tax amount paid for it and the tax rate.
|
|
1085
1085
|
* Tax breakdown is the tax amount split to the tax authorities that applied on the line item.
|
|
1086
1086
|
*/
|
|
1087
|
-
|
|
1087
|
+
interface AggregatedTaxBreakdown {
|
|
1088
1088
|
/**
|
|
1089
1089
|
* The name of the tax against which this tax amount was calculated.
|
|
1090
1090
|
* @maxLength 200
|
|
@@ -1110,7 +1110,7 @@ export interface AggregatedTaxBreakdown {
|
|
|
1110
1110
|
/** The sum of all the tax from line items that calculated by the tax identifiers. */
|
|
1111
1111
|
aggregatedTaxAmount?: MultiCurrencyPrice;
|
|
1112
1112
|
}
|
|
1113
|
-
|
|
1113
|
+
interface ShippingInformation {
|
|
1114
1114
|
/** Shipping region. */
|
|
1115
1115
|
region?: ShippingRegion;
|
|
1116
1116
|
/** Selected shipping option. */
|
|
@@ -1118,20 +1118,20 @@ export interface ShippingInformation {
|
|
|
1118
1118
|
/** All shipping options. */
|
|
1119
1119
|
carrierServiceOptions?: CarrierServiceOption[];
|
|
1120
1120
|
}
|
|
1121
|
-
|
|
1121
|
+
interface ShippingRegion {
|
|
1122
1122
|
/**
|
|
1123
1123
|
* Shipping region ID.
|
|
1124
1124
|
* @format GUID
|
|
1125
1125
|
* @readonly
|
|
1126
1126
|
*/
|
|
1127
|
-
|
|
1127
|
+
_id?: string;
|
|
1128
1128
|
/**
|
|
1129
1129
|
* Shipping region name.
|
|
1130
1130
|
* @maxLength 100
|
|
1131
1131
|
*/
|
|
1132
1132
|
name?: string;
|
|
1133
1133
|
}
|
|
1134
|
-
|
|
1134
|
+
interface SelectedCarrierServiceOption {
|
|
1135
1135
|
/**
|
|
1136
1136
|
* Unique identifier of selected option. For example, "usps_std_overnight".
|
|
1137
1137
|
* @maxLength 100
|
|
@@ -1174,7 +1174,7 @@ export interface SelectedCarrierServiceOption {
|
|
|
1174
1174
|
/** If the delivery solution is a partial and doesn't apply to all items. */
|
|
1175
1175
|
partial?: boolean | null;
|
|
1176
1176
|
}
|
|
1177
|
-
|
|
1177
|
+
interface SelectedCarrierServiceOptionPrices {
|
|
1178
1178
|
/** Total shipping price, after discount and after tax. */
|
|
1179
1179
|
totalPriceAfterTax?: MultiCurrencyPrice;
|
|
1180
1180
|
/** Total price of shipping after discounts (when relevant), and before tax. */
|
|
@@ -1186,7 +1186,7 @@ export interface SelectedCarrierServiceOptionPrices {
|
|
|
1186
1186
|
/** Shipping price before discount and before tax. */
|
|
1187
1187
|
price?: MultiCurrencyPrice;
|
|
1188
1188
|
}
|
|
1189
|
-
|
|
1189
|
+
interface SelectedCarrierServiceOptionOtherCharge {
|
|
1190
1190
|
/** Type of additional cost. */
|
|
1191
1191
|
type?: ChargeType;
|
|
1192
1192
|
/**
|
|
@@ -1197,7 +1197,7 @@ export interface SelectedCarrierServiceOptionOtherCharge {
|
|
|
1197
1197
|
/** Price of added charge. */
|
|
1198
1198
|
cost?: SelectedCarrierServiceOptionPrices;
|
|
1199
1199
|
}
|
|
1200
|
-
|
|
1200
|
+
interface CarrierServiceOption {
|
|
1201
1201
|
/**
|
|
1202
1202
|
* Carrier ID.
|
|
1203
1203
|
* @format GUID
|
|
@@ -1206,7 +1206,7 @@ export interface CarrierServiceOption {
|
|
|
1206
1206
|
/** Shipping options offered by this carrier for this request. */
|
|
1207
1207
|
shippingOptions?: ShippingOption[];
|
|
1208
1208
|
}
|
|
1209
|
-
|
|
1209
|
+
interface CalculationErrors extends CalculationErrorsShippingCalculationErrorOneOf {
|
|
1210
1210
|
/** General shipping calculation error. */
|
|
1211
1211
|
generalShippingCalculationError?: Details;
|
|
1212
1212
|
/** Carrier errors. */
|
|
@@ -1228,13 +1228,13 @@ export interface CalculationErrors extends CalculationErrorsShippingCalculationE
|
|
|
1228
1228
|
discountsCalculationError?: Details;
|
|
1229
1229
|
}
|
|
1230
1230
|
/** @oneof */
|
|
1231
|
-
|
|
1231
|
+
interface CalculationErrorsShippingCalculationErrorOneOf {
|
|
1232
1232
|
/** General shipping calculation error. */
|
|
1233
1233
|
generalShippingCalculationError?: Details;
|
|
1234
1234
|
/** Carrier errors. */
|
|
1235
1235
|
carrierErrors?: CarrierErrors;
|
|
1236
1236
|
}
|
|
1237
|
-
|
|
1237
|
+
interface Details extends DetailsKindOneOf {
|
|
1238
1238
|
applicationError?: ApplicationError;
|
|
1239
1239
|
validationError?: ValidationError;
|
|
1240
1240
|
systemError?: SystemError;
|
|
@@ -1245,7 +1245,7 @@ export interface Details extends DetailsKindOneOf {
|
|
|
1245
1245
|
tracing?: Record<string, string>;
|
|
1246
1246
|
}
|
|
1247
1247
|
/** @oneof */
|
|
1248
|
-
|
|
1248
|
+
interface DetailsKindOneOf {
|
|
1249
1249
|
applicationError?: ApplicationError;
|
|
1250
1250
|
validationError?: ValidationError;
|
|
1251
1251
|
systemError?: SystemError;
|
|
@@ -1282,10 +1282,10 @@ export interface DetailsKindOneOf {
|
|
|
1282
1282
|
* ]
|
|
1283
1283
|
* }
|
|
1284
1284
|
*/
|
|
1285
|
-
|
|
1285
|
+
interface ValidationError {
|
|
1286
1286
|
fieldViolations?: FieldViolation[];
|
|
1287
1287
|
}
|
|
1288
|
-
|
|
1288
|
+
declare enum RuleType {
|
|
1289
1289
|
VALIDATION = "VALIDATION",
|
|
1290
1290
|
OTHER = "OTHER",
|
|
1291
1291
|
MAX = "MAX",
|
|
@@ -1308,7 +1308,7 @@ export declare enum RuleType {
|
|
|
1308
1308
|
EXACT_SIZE = "EXACT_SIZE",
|
|
1309
1309
|
REQUIRED_ONE_OF_FIELD = "REQUIRED_ONE_OF_FIELD"
|
|
1310
1310
|
}
|
|
1311
|
-
|
|
1311
|
+
interface FieldViolation {
|
|
1312
1312
|
field?: string;
|
|
1313
1313
|
description?: string;
|
|
1314
1314
|
violatedRule?: RuleType;
|
|
@@ -1316,21 +1316,21 @@ export interface FieldViolation {
|
|
|
1316
1316
|
ruleName?: string | null;
|
|
1317
1317
|
data?: Record<string, any> | null;
|
|
1318
1318
|
}
|
|
1319
|
-
|
|
1319
|
+
interface SystemError {
|
|
1320
1320
|
/** Error code. */
|
|
1321
1321
|
errorCode?: string | null;
|
|
1322
1322
|
}
|
|
1323
|
-
|
|
1323
|
+
interface CarrierErrors {
|
|
1324
1324
|
/** Carrier errors. */
|
|
1325
1325
|
errors?: CarrierError[];
|
|
1326
1326
|
}
|
|
1327
|
-
|
|
1327
|
+
interface CarrierError {
|
|
1328
1328
|
/** Carrier ID. */
|
|
1329
1329
|
carrierId?: string;
|
|
1330
1330
|
/** Error details. */
|
|
1331
1331
|
error?: Details;
|
|
1332
1332
|
}
|
|
1333
|
-
|
|
1333
|
+
declare enum WeightUnit {
|
|
1334
1334
|
/** Weight unit can't be classified due to an error. */
|
|
1335
1335
|
UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
|
|
1336
1336
|
/** Kilograms. */
|
|
@@ -1338,7 +1338,7 @@ export declare enum WeightUnit {
|
|
|
1338
1338
|
/** Pounds. */
|
|
1339
1339
|
LB = "LB"
|
|
1340
1340
|
}
|
|
1341
|
-
|
|
1341
|
+
interface MembershipOptions {
|
|
1342
1342
|
/**
|
|
1343
1343
|
* List of payment options that can be used.
|
|
1344
1344
|
* @maxSize 300
|
|
@@ -1355,13 +1355,13 @@ export interface MembershipOptions {
|
|
|
1355
1355
|
*/
|
|
1356
1356
|
selectedMemberships?: SelectedMembership[];
|
|
1357
1357
|
}
|
|
1358
|
-
|
|
1358
|
+
interface Membership {
|
|
1359
1359
|
/**
|
|
1360
1360
|
* Membership ID.
|
|
1361
1361
|
* @minLength 1
|
|
1362
1362
|
* @maxLength 100
|
|
1363
1363
|
*/
|
|
1364
|
-
|
|
1364
|
+
_id?: string;
|
|
1365
1365
|
/**
|
|
1366
1366
|
* ID of the application providing this payment option.
|
|
1367
1367
|
* @format GUID
|
|
@@ -1384,7 +1384,7 @@ export interface Membership {
|
|
|
1384
1384
|
/** Additional data about this membership. */
|
|
1385
1385
|
additionalData?: Record<string, any> | null;
|
|
1386
1386
|
}
|
|
1387
|
-
|
|
1387
|
+
interface MembershipName {
|
|
1388
1388
|
/**
|
|
1389
1389
|
* Membership name.
|
|
1390
1390
|
* @maxLength 100
|
|
@@ -1396,7 +1396,7 @@ export interface MembershipName {
|
|
|
1396
1396
|
*/
|
|
1397
1397
|
translated?: string | null;
|
|
1398
1398
|
}
|
|
1399
|
-
|
|
1399
|
+
interface MembershipPaymentCredits {
|
|
1400
1400
|
/**
|
|
1401
1401
|
* Membership's total amount of credits.
|
|
1402
1402
|
* @min 1
|
|
@@ -1405,7 +1405,7 @@ export interface MembershipPaymentCredits {
|
|
|
1405
1405
|
/** Membership's remaining amount of credits. */
|
|
1406
1406
|
remaining?: number;
|
|
1407
1407
|
}
|
|
1408
|
-
|
|
1408
|
+
interface InvalidMembership {
|
|
1409
1409
|
/** Membership details. */
|
|
1410
1410
|
membership?: Membership;
|
|
1411
1411
|
/**
|
|
@@ -1415,7 +1415,7 @@ export interface InvalidMembership {
|
|
|
1415
1415
|
*/
|
|
1416
1416
|
reason?: string;
|
|
1417
1417
|
}
|
|
1418
|
-
|
|
1418
|
+
interface V1AdditionalFee {
|
|
1419
1419
|
/**
|
|
1420
1420
|
* Additional fee's unique code (or ID) for future processing.
|
|
1421
1421
|
* @minLength 1
|
|
@@ -1451,7 +1451,7 @@ export interface V1AdditionalFee {
|
|
|
1451
1451
|
/** the source the additional fee was added from */
|
|
1452
1452
|
source?: AdditionalFeeSource;
|
|
1453
1453
|
}
|
|
1454
|
-
|
|
1454
|
+
declare enum AdditionalFeeSource {
|
|
1455
1455
|
UNKNOWN_ADDITIONAL_FEE_SOURCE = "UNKNOWN_ADDITIONAL_FEE_SOURCE",
|
|
1456
1456
|
/** The additional fee was added by an additional fee service plugin */
|
|
1457
1457
|
SERVICE_PLUGIN = "SERVICE_PLUGIN",
|
|
@@ -1460,3 +1460,84 @@ export declare enum AdditionalFeeSource {
|
|
|
1460
1460
|
/** The additional fee was added manually on the request */
|
|
1461
1461
|
MANUAL = "MANUAL"
|
|
1462
1462
|
}
|
|
1463
|
+
interface CalculateTotalsOptions extends CalculateTotalsOptionsCouponOneOf, CalculateTotalsOptionsGiftCardOneOf {
|
|
1464
|
+
/**
|
|
1465
|
+
* Calculation ID. An identifier of the entity that you are calculating totals for, for example, cart ID or checkout ID.
|
|
1466
|
+
* This value will be used in order to optimise calculations by caching.
|
|
1467
|
+
* If not passed, calculation might be slower in some cases.
|
|
1468
|
+
* @minLength 1
|
|
1469
|
+
* @maxLength 100
|
|
1470
|
+
*/
|
|
1471
|
+
calculationId?: string | null;
|
|
1472
|
+
/**
|
|
1473
|
+
* Line items for calculation.
|
|
1474
|
+
* @maxSize 300
|
|
1475
|
+
*/
|
|
1476
|
+
lineItems?: LineItem[];
|
|
1477
|
+
/** Shipping address for tax and shipping calculation (if applicable). */
|
|
1478
|
+
shippingAddress?: Address;
|
|
1479
|
+
/** Billing address. Used for calculating tax if all the items in the cart are not shippable. */
|
|
1480
|
+
billingAddress?: Address;
|
|
1481
|
+
/** Details about selected shipping option. */
|
|
1482
|
+
selectedShippingOption?: SelectedShippingOption;
|
|
1483
|
+
/** Coupon ID. */
|
|
1484
|
+
couponId?: string | null;
|
|
1485
|
+
/** Coupon code. */
|
|
1486
|
+
couponCode?: string | null;
|
|
1487
|
+
/**
|
|
1488
|
+
* Gift card ID.
|
|
1489
|
+
* @format GUID
|
|
1490
|
+
*/
|
|
1491
|
+
giftCardId?: string | null;
|
|
1492
|
+
/** Gift card code. */
|
|
1493
|
+
giftCardCode?: string | null;
|
|
1494
|
+
/**
|
|
1495
|
+
* Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will be applied to the whole cart/checkout.
|
|
1496
|
+
* @maxSize 100
|
|
1497
|
+
* @deprecated
|
|
1498
|
+
*/
|
|
1499
|
+
merchantDiscounts?: MerchantDiscountInput[];
|
|
1500
|
+
/**
|
|
1501
|
+
* Buyer email. Used to enforce coupon [single-use per customer](https://support.wix.com/en/article/wix-stores-limiting-coupon-usage). If not passed, single coupon usage per customer will not be enforced.
|
|
1502
|
+
* @format EMAIL
|
|
1503
|
+
*/
|
|
1504
|
+
buyerEmail?: string | null;
|
|
1505
|
+
/**
|
|
1506
|
+
* Member id to use for this calculation
|
|
1507
|
+
* When not provided, given that the caller is a member, its member id will be used
|
|
1508
|
+
* Providing this require elevated permissions - ECOM.ADMIN_CALCULATE_TOTALS
|
|
1509
|
+
*/
|
|
1510
|
+
memberId?: string | null;
|
|
1511
|
+
/**
|
|
1512
|
+
* The selected memberships and which line items they apply to
|
|
1513
|
+
* When not provided, default selection will be returned
|
|
1514
|
+
* You can also set it to empty selection
|
|
1515
|
+
*/
|
|
1516
|
+
selectedMemberships?: SelectedMemberships;
|
|
1517
|
+
/** Buyer phone number. Used to get shipping rates. */
|
|
1518
|
+
buyerPhone?: string | null;
|
|
1519
|
+
/**
|
|
1520
|
+
* Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.
|
|
1521
|
+
* @format GUID
|
|
1522
|
+
*/
|
|
1523
|
+
purchaseFlowId?: string | null;
|
|
1524
|
+
}
|
|
1525
|
+
/** @oneof */
|
|
1526
|
+
interface CalculateTotalsOptionsCouponOneOf {
|
|
1527
|
+
/** Coupon ID. */
|
|
1528
|
+
couponId?: string | null;
|
|
1529
|
+
/** Coupon code. */
|
|
1530
|
+
couponCode?: string | null;
|
|
1531
|
+
}
|
|
1532
|
+
/** @oneof */
|
|
1533
|
+
interface CalculateTotalsOptionsGiftCardOneOf {
|
|
1534
|
+
/**
|
|
1535
|
+
* Gift card ID.
|
|
1536
|
+
* @format GUID
|
|
1537
|
+
*/
|
|
1538
|
+
giftCardId?: string | null;
|
|
1539
|
+
/** Gift card code. */
|
|
1540
|
+
giftCardCode?: string | null;
|
|
1541
|
+
}
|
|
1542
|
+
|
|
1543
|
+
export { type Carrier as $, AdditionalFeeSource as A, type MerchantDiscountInput as B, type CalculateTotalsOptions as C, DiscountType as D, type SelectedMemberships as E, FallbackReason as F, type Group as G, type SelectedMembership as H, ItemTypeItemType as I, JurisdictionType as J, type CarrierShippingOption as K, type LineItem as L, ManualCalculationReason as M, type ShippingOption as N, type DeliveryLogistics as O, PaymentOptionType as P, type PickupDetails as Q, RateType as R, SubscriptionFrequency as S, TaxableAddressType as T, type DeliveryTimeSlot as U, type V1TaxDetails as V, WeightUnit as W, type ShippingPrice as X, type MultiCurrencyPrice as Y, type OtherCharge as Z, type DeliveryAllocation as _, type CalculateTotalsResponse as a, type Region as a0, type ApplicableLineItems as a1, type AppliedDiscount as a2, type AppliedDiscountDiscountSourceOneOf as a3, type Coupon as a4, type MerchantDiscount as a5, type DiscountRule as a6, type DiscountRuleName as a7, type LineItemDiscount as a8, type AdditionalFee as a9, type FieldViolation as aA, type SystemError as aB, type CarrierErrors as aC, type CarrierError as aD, type MembershipOptions as aE, type Membership as aF, type MembershipName as aG, type MembershipPaymentCredits as aH, type InvalidMembership as aI, type V1AdditionalFee as aJ, type CalculateTotalsOptionsCouponOneOf as aK, type CalculateTotalsOptionsGiftCardOneOf as aL, type TaxDetails as aa, type ExternalReference as ab, type CalculatedLineItem as ac, type LineItemPricesData as ad, type ItemTaxFullDetails as ae, type TaxRateBreakdown as af, type TaxBreakdown as ag, type PriceSummary as ah, type GiftCard as ai, type TaxSummary as aj, type TaxCalculationDetails as ak, type TaxCalculationDetailsCalculationDetailsOneOf as al, type AutoTaxFallbackCalculationDetails as am, type ApplicationError as an, type AggregatedTaxBreakdown as ao, type ShippingInformation as ap, type ShippingRegion as aq, type SelectedCarrierServiceOption as ar, type SelectedCarrierServiceOptionPrices as as, type SelectedCarrierServiceOptionOtherCharge as at, type CarrierServiceOption as au, type CalculationErrors as av, type CalculationErrorsShippingCalculationErrorOneOf as aw, type Details as ax, type DetailsKindOneOf as ay, type ValidationError as az, PickupMethod as b, ChargeType as c, DataFetchType as d, RuleType as e, type TotalsCalculationEntity as f, type CalculateTotalsRequest as g, type CalculateTotalsRequestCouponOneOf as h, type CalculateTotalsRequestGiftCardOneOf as i, type CatalogReference as j, type PhysicalProperties as k, type Scope as l, type SubscriptionSettings as m, type ServiceProperties as n, type ItemType as o, type ItemTypeItemTypeDataOneOf as p, type TaxableAddress as q, type TaxableAddressTaxableAddressDataOneOf as r, type ApiV1AdditionalFee as s, type ModifierGroup as t, type TranslatableString as u, type ItemModifier as v, type Address as w, type StreetAddress as x, type AddressLocation as y, type SelectedShippingOption as z };
|