@wix/auto_sdk_ecom_draft-orders 1.0.190 → 1.0.191
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.js +41 -17
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +70 -70
- package/build/cjs/index.typings.js +32 -17
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +70 -70
- package/build/cjs/meta.js +32 -17
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.mjs +41 -17
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +70 -70
- package/build/es/index.typings.mjs +32 -17
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +70 -70
- package/build/es/meta.mjs +32 -17
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +75 -70
- package/build/internal/cjs/meta.d.ts +75 -70
- package/build/internal/es/index.typings.d.mts +75 -70
- package/build/internal/es/meta.d.mts +75 -70
- package/package.json +2 -2
|
@@ -503,6 +503,76 @@ declare enum JurisdictionType {
|
|
|
503
503
|
}
|
|
504
504
|
/** @enumType */
|
|
505
505
|
type JurisdictionTypeWithLiterals = JurisdictionType | 'UNDEFINED' | 'COUNTRY' | 'STATE' | 'COUNTY' | 'CITY' | 'SPECIAL';
|
|
506
|
+
/**
|
|
507
|
+
* Record of the cross-border repricing of a single line item, shipping option or fee on a site whose catalog prices include tax:
|
|
508
|
+
* the catalog price the merchant entered, the base region's tax removed from it per unit, and the rate used.
|
|
509
|
+
*
|
|
510
|
+
* This record describes how the price was reached, not the resulting amount. The repriced figures are on the line itself:
|
|
511
|
+
* `price` and `taxInfo` on an order line item, and their counterparts on a shipping cost or a fee.
|
|
512
|
+
* Written by the calculation that priced the line and carried unchanged onto orders, draft orders and subscription contracts.
|
|
513
|
+
*/
|
|
514
|
+
interface CrossBorderPriceAdjustment {
|
|
515
|
+
/**
|
|
516
|
+
* ID of the tax region whose tax is built into the catalog prices.
|
|
517
|
+
* @format GUID
|
|
518
|
+
*/
|
|
519
|
+
baseTaxRegionId?: string;
|
|
520
|
+
/**
|
|
521
|
+
* ID of the tax region resolved for the destination. Absent when no region matched.
|
|
522
|
+
* @format GUID
|
|
523
|
+
*/
|
|
524
|
+
destinationTaxRegionId?: string | null;
|
|
525
|
+
/** Price per unit as entered by the merchant, with the base region's tax inside it. */
|
|
526
|
+
catalogPrice?: Price;
|
|
527
|
+
/** Base region's tax removed per unit. Zero when `status` is `KEPT`, `SAME_REGION`, `SAME_COUNTRY`, `NOT_APPLICABLE`, `NOT_APPLICABLE_MODIFIERS` or `CONVERTED_CURRENCY_SUBSCRIPTION`, where nothing was removed. */
|
|
528
|
+
baseTaxAmount?: Price;
|
|
529
|
+
/** Outcome of the repricing for this line. */
|
|
530
|
+
status?: RepriceStatusWithLiterals;
|
|
531
|
+
/** Where the base region's rate came from. Meaningful only when a rate was applied, that is when `status` is `APPLIED`, `STRIP_ONLY` or `NO_DESTINATION_REGION`. */
|
|
532
|
+
baseRateSource?: BaseRateSourceWithLiterals;
|
|
533
|
+
/**
|
|
534
|
+
* Base region's rate used to remove the tax, as a decimal numeral between 0 and 1. For example, `"0.22"`. Absent when no rate was applied.
|
|
535
|
+
* @format DECIMAL_VALUE
|
|
536
|
+
* @decimalValue options { gte:0, maxScale:6 }
|
|
537
|
+
*/
|
|
538
|
+
baseRate?: string | null;
|
|
539
|
+
/** When the base region's rate was captured. Set only when `baseRateSource` is `AVALARA_PROBE`. */
|
|
540
|
+
baseRateCapturedDate?: Date | null;
|
|
541
|
+
/** Whether the destination's tax is included in the repriced amount. Reserved for per-region display; not populated. */
|
|
542
|
+
destinationTaxIncluded?: boolean | null;
|
|
543
|
+
}
|
|
544
|
+
/** Outcome of the repricing for one line. */
|
|
545
|
+
declare enum RepriceStatus {
|
|
546
|
+
/** Base tax removed and the destination's tax applied. */
|
|
547
|
+
APPLIED = "APPLIED",
|
|
548
|
+
/** The caller asked for the line to be left at its price. Nothing was removed. */
|
|
549
|
+
KEPT = "KEPT",
|
|
550
|
+
/** Base tax removed and no destination tax applied, as in a tax-exempt calculation. This is the outcome; the mode that asks for it is `CrossBorderRepricingMode.STRIP_ONLY`. */
|
|
551
|
+
STRIP_ONLY = "STRIP_ONLY",
|
|
552
|
+
/** The destination is the base region. Nothing was removed. */
|
|
553
|
+
SAME_REGION = "SAME_REGION",
|
|
554
|
+
/** The destination is in the base region's country, outside the US and Canada, so the catalog price already carries the destination's tax. Nothing was removed. */
|
|
555
|
+
SAME_COUNTRY = "SAME_COUNTRY",
|
|
556
|
+
/** No tax region matched the destination. Base tax removed and no destination tax applied. */
|
|
557
|
+
NO_DESTINATION_REGION = "NO_DESTINATION_REGION",
|
|
558
|
+
/** The calculation didn't reprice this line, for example because the feature was off or a pass failed. Nothing was removed. */
|
|
559
|
+
NOT_APPLICABLE = "NOT_APPLICABLE",
|
|
560
|
+
/** The line's modifiers exceed its price at the destination's rate. Nothing was removed. */
|
|
561
|
+
NOT_APPLICABLE_MODIFIERS = "NOT_APPLICABLE_MODIFIERS",
|
|
562
|
+
/** A subscription line in a checkout whose currency differs from the site currency. Nothing was removed. */
|
|
563
|
+
CONVERTED_CURRENCY_SUBSCRIPTION = "CONVERTED_CURRENCY_SUBSCRIPTION"
|
|
564
|
+
}
|
|
565
|
+
/** @enumType */
|
|
566
|
+
type RepriceStatusWithLiterals = RepriceStatus | 'APPLIED' | 'KEPT' | 'STRIP_ONLY' | 'SAME_REGION' | 'SAME_COUNTRY' | 'NO_DESTINATION_REGION' | 'NOT_APPLICABLE' | 'NOT_APPLICABLE_MODIFIERS' | 'CONVERTED_CURRENCY_SUBSCRIPTION';
|
|
567
|
+
/** Where the base region's rate came from. */
|
|
568
|
+
declare enum BaseRateSource {
|
|
569
|
+
/** The manual tax calculator computed the base tax for this calculation. */
|
|
570
|
+
MANUAL_SPI = "MANUAL_SPI",
|
|
571
|
+
/** The rate captured from Avalara by the embedded-rate probe. */
|
|
572
|
+
AVALARA_PROBE = "AVALARA_PROBE"
|
|
573
|
+
}
|
|
574
|
+
/** @enumType */
|
|
575
|
+
type BaseRateSourceWithLiterals = BaseRateSource | 'MANUAL_SPI' | 'AVALARA_PROBE';
|
|
506
576
|
interface OrderLineItem {
|
|
507
577
|
/**
|
|
508
578
|
* Line item ID.
|
|
@@ -1270,76 +1340,6 @@ interface ServiceProperties {
|
|
|
1270
1340
|
*/
|
|
1271
1341
|
endDate?: Date | null;
|
|
1272
1342
|
}
|
|
1273
|
-
/**
|
|
1274
|
-
* Record of the cross-border repricing of a single line item, shipping option or fee on a site whose catalog prices include tax:
|
|
1275
|
-
* the catalog price the merchant entered, the base region's tax removed from it per unit, and the rate used.
|
|
1276
|
-
*
|
|
1277
|
-
* This record describes how the price was reached, not the resulting amount. The repriced figures are on the line itself:
|
|
1278
|
-
* `price` and `taxInfo` on an order line item, and their counterparts on a shipping cost or a fee.
|
|
1279
|
-
* Written by the calculation that priced the line and carried unchanged onto orders, draft orders and subscription contracts.
|
|
1280
|
-
*/
|
|
1281
|
-
interface CrossBorderPriceAdjustment {
|
|
1282
|
-
/**
|
|
1283
|
-
* ID of the tax region whose tax is built into the catalog prices.
|
|
1284
|
-
* @format GUID
|
|
1285
|
-
*/
|
|
1286
|
-
baseTaxRegionId?: string;
|
|
1287
|
-
/**
|
|
1288
|
-
* ID of the tax region resolved for the destination. Absent when no region matched.
|
|
1289
|
-
* @format GUID
|
|
1290
|
-
*/
|
|
1291
|
-
destinationTaxRegionId?: string | null;
|
|
1292
|
-
/** Price per unit as entered by the merchant, with the base region's tax inside it. */
|
|
1293
|
-
catalogPrice?: Price;
|
|
1294
|
-
/** Base region's tax removed per unit. Zero when `status` is `KEPT`, `SAME_REGION`, `SAME_COUNTRY`, `NOT_APPLICABLE`, `NOT_APPLICABLE_MODIFIERS` or `CONVERTED_CURRENCY_SUBSCRIPTION`, where nothing was removed. */
|
|
1295
|
-
baseTaxAmount?: Price;
|
|
1296
|
-
/** Outcome of the repricing for this line. */
|
|
1297
|
-
status?: RepriceStatusWithLiterals;
|
|
1298
|
-
/** Where the base region's rate came from. Meaningful only when a rate was applied, that is when `status` is `APPLIED`, `STRIP_ONLY` or `NO_DESTINATION_REGION`. */
|
|
1299
|
-
baseRateSource?: BaseRateSourceWithLiterals;
|
|
1300
|
-
/**
|
|
1301
|
-
* Base region's rate used to remove the tax, as a decimal numeral between 0 and 1. For example, `"0.22"`. Absent when no rate was applied.
|
|
1302
|
-
* @format DECIMAL_VALUE
|
|
1303
|
-
* @decimalValue options { gte:0, maxScale:6 }
|
|
1304
|
-
*/
|
|
1305
|
-
baseRate?: string | null;
|
|
1306
|
-
/** When the base region's rate was captured. Set only when `baseRateSource` is `AVALARA_PROBE`. */
|
|
1307
|
-
baseRateCapturedDate?: Date | null;
|
|
1308
|
-
/** Whether the destination's tax is included in the repriced amount. Reserved for per-region display; not populated. */
|
|
1309
|
-
destinationTaxIncluded?: boolean | null;
|
|
1310
|
-
}
|
|
1311
|
-
/** Outcome of the repricing for one line. */
|
|
1312
|
-
declare enum RepriceStatus {
|
|
1313
|
-
/** Base tax removed and the destination's tax applied. */
|
|
1314
|
-
APPLIED = "APPLIED",
|
|
1315
|
-
/** The caller asked for the line to be left at its price. Nothing was removed. */
|
|
1316
|
-
KEPT = "KEPT",
|
|
1317
|
-
/** Base tax removed and no destination tax applied, as in a tax-exempt calculation. This is the outcome; the mode that asks for it is `CrossBorderRepricingMode.STRIP_ONLY`. */
|
|
1318
|
-
STRIP_ONLY = "STRIP_ONLY",
|
|
1319
|
-
/** The destination is the base region. Nothing was removed. */
|
|
1320
|
-
SAME_REGION = "SAME_REGION",
|
|
1321
|
-
/** The destination is in the base region's country, outside the US and Canada, so the catalog price already carries the destination's tax. Nothing was removed. */
|
|
1322
|
-
SAME_COUNTRY = "SAME_COUNTRY",
|
|
1323
|
-
/** No tax region matched the destination. Base tax removed and no destination tax applied. */
|
|
1324
|
-
NO_DESTINATION_REGION = "NO_DESTINATION_REGION",
|
|
1325
|
-
/** The calculation didn't reprice this line, for example because the feature was off or a pass failed. Nothing was removed. */
|
|
1326
|
-
NOT_APPLICABLE = "NOT_APPLICABLE",
|
|
1327
|
-
/** The line's modifiers exceed its price at the destination's rate. Nothing was removed. */
|
|
1328
|
-
NOT_APPLICABLE_MODIFIERS = "NOT_APPLICABLE_MODIFIERS",
|
|
1329
|
-
/** A subscription line in a checkout whose currency differs from the site currency. Nothing was removed. */
|
|
1330
|
-
CONVERTED_CURRENCY_SUBSCRIPTION = "CONVERTED_CURRENCY_SUBSCRIPTION"
|
|
1331
|
-
}
|
|
1332
|
-
/** @enumType */
|
|
1333
|
-
type RepriceStatusWithLiterals = RepriceStatus | 'APPLIED' | 'KEPT' | 'STRIP_ONLY' | 'SAME_REGION' | 'SAME_COUNTRY' | 'NO_DESTINATION_REGION' | 'NOT_APPLICABLE' | 'NOT_APPLICABLE_MODIFIERS' | 'CONVERTED_CURRENCY_SUBSCRIPTION';
|
|
1334
|
-
/** Where the base region's rate came from. */
|
|
1335
|
-
declare enum BaseRateSource {
|
|
1336
|
-
/** The manual tax calculator computed the base tax for this calculation. */
|
|
1337
|
-
MANUAL_SPI = "MANUAL_SPI",
|
|
1338
|
-
/** The rate captured from Avalara by the embedded-rate probe. */
|
|
1339
|
-
AVALARA_PROBE = "AVALARA_PROBE"
|
|
1340
|
-
}
|
|
1341
|
-
/** @enumType */
|
|
1342
|
-
type BaseRateSourceWithLiterals = BaseRateSource | 'MANUAL_SPI' | 'AVALARA_PROBE';
|
|
1343
1343
|
interface ItemChangedDetails {
|
|
1344
1344
|
/**
|
|
1345
1345
|
* Line item quantity before change.
|
|
@@ -1394,6 +1394,11 @@ interface ItemChangedImplicitlyDetails {
|
|
|
1394
1394
|
priceBeforeDiscountsBeforeChange?: Price;
|
|
1395
1395
|
/** Line item price before line-item discounts and tax, before the implicit change. */
|
|
1396
1396
|
priceBeforeDiscountsAndTaxBeforeChange?: Price;
|
|
1397
|
+
/**
|
|
1398
|
+
* Cross-border repricing record of the line item before the implicit change.
|
|
1399
|
+
* @internal
|
|
1400
|
+
*/
|
|
1401
|
+
crossBorderAdjustmentBeforeChange?: CrossBorderPriceAdjustment;
|
|
1397
1402
|
}
|
|
1398
1403
|
interface ShippingDetails extends ShippingDetailsChangeTypeOneOf {
|
|
1399
1404
|
/** Whether shipping info was added as part of the draft. */
|
|
@@ -503,6 +503,76 @@ declare enum JurisdictionType {
|
|
|
503
503
|
}
|
|
504
504
|
/** @enumType */
|
|
505
505
|
type JurisdictionTypeWithLiterals = JurisdictionType | 'UNDEFINED' | 'COUNTRY' | 'STATE' | 'COUNTY' | 'CITY' | 'SPECIAL';
|
|
506
|
+
/**
|
|
507
|
+
* Record of the cross-border repricing of a single line item, shipping option or fee on a site whose catalog prices include tax:
|
|
508
|
+
* the catalog price the merchant entered, the base region's tax removed from it per unit, and the rate used.
|
|
509
|
+
*
|
|
510
|
+
* This record describes how the price was reached, not the resulting amount. The repriced figures are on the line itself:
|
|
511
|
+
* `price` and `taxInfo` on an order line item, and their counterparts on a shipping cost or a fee.
|
|
512
|
+
* Written by the calculation that priced the line and carried unchanged onto orders, draft orders and subscription contracts.
|
|
513
|
+
*/
|
|
514
|
+
interface CrossBorderPriceAdjustment {
|
|
515
|
+
/**
|
|
516
|
+
* ID of the tax region whose tax is built into the catalog prices.
|
|
517
|
+
* @format GUID
|
|
518
|
+
*/
|
|
519
|
+
baseTaxRegionId?: string;
|
|
520
|
+
/**
|
|
521
|
+
* ID of the tax region resolved for the destination. Absent when no region matched.
|
|
522
|
+
* @format GUID
|
|
523
|
+
*/
|
|
524
|
+
destinationTaxRegionId?: string | null;
|
|
525
|
+
/** Price per unit as entered by the merchant, with the base region's tax inside it. */
|
|
526
|
+
catalogPrice?: Price;
|
|
527
|
+
/** Base region's tax removed per unit. Zero when `status` is `KEPT`, `SAME_REGION`, `SAME_COUNTRY`, `NOT_APPLICABLE`, `NOT_APPLICABLE_MODIFIERS` or `CONVERTED_CURRENCY_SUBSCRIPTION`, where nothing was removed. */
|
|
528
|
+
baseTaxAmount?: Price;
|
|
529
|
+
/** Outcome of the repricing for this line. */
|
|
530
|
+
status?: RepriceStatusWithLiterals;
|
|
531
|
+
/** Where the base region's rate came from. Meaningful only when a rate was applied, that is when `status` is `APPLIED`, `STRIP_ONLY` or `NO_DESTINATION_REGION`. */
|
|
532
|
+
baseRateSource?: BaseRateSourceWithLiterals;
|
|
533
|
+
/**
|
|
534
|
+
* Base region's rate used to remove the tax, as a decimal numeral between 0 and 1. For example, `"0.22"`. Absent when no rate was applied.
|
|
535
|
+
* @format DECIMAL_VALUE
|
|
536
|
+
* @decimalValue options { gte:0, maxScale:6 }
|
|
537
|
+
*/
|
|
538
|
+
baseRate?: string | null;
|
|
539
|
+
/** When the base region's rate was captured. Set only when `baseRateSource` is `AVALARA_PROBE`. */
|
|
540
|
+
baseRateCapturedDate?: Date | null;
|
|
541
|
+
/** Whether the destination's tax is included in the repriced amount. Reserved for per-region display; not populated. */
|
|
542
|
+
destinationTaxIncluded?: boolean | null;
|
|
543
|
+
}
|
|
544
|
+
/** Outcome of the repricing for one line. */
|
|
545
|
+
declare enum RepriceStatus {
|
|
546
|
+
/** Base tax removed and the destination's tax applied. */
|
|
547
|
+
APPLIED = "APPLIED",
|
|
548
|
+
/** The caller asked for the line to be left at its price. Nothing was removed. */
|
|
549
|
+
KEPT = "KEPT",
|
|
550
|
+
/** Base tax removed and no destination tax applied, as in a tax-exempt calculation. This is the outcome; the mode that asks for it is `CrossBorderRepricingMode.STRIP_ONLY`. */
|
|
551
|
+
STRIP_ONLY = "STRIP_ONLY",
|
|
552
|
+
/** The destination is the base region. Nothing was removed. */
|
|
553
|
+
SAME_REGION = "SAME_REGION",
|
|
554
|
+
/** The destination is in the base region's country, outside the US and Canada, so the catalog price already carries the destination's tax. Nothing was removed. */
|
|
555
|
+
SAME_COUNTRY = "SAME_COUNTRY",
|
|
556
|
+
/** No tax region matched the destination. Base tax removed and no destination tax applied. */
|
|
557
|
+
NO_DESTINATION_REGION = "NO_DESTINATION_REGION",
|
|
558
|
+
/** The calculation didn't reprice this line, for example because the feature was off or a pass failed. Nothing was removed. */
|
|
559
|
+
NOT_APPLICABLE = "NOT_APPLICABLE",
|
|
560
|
+
/** The line's modifiers exceed its price at the destination's rate. Nothing was removed. */
|
|
561
|
+
NOT_APPLICABLE_MODIFIERS = "NOT_APPLICABLE_MODIFIERS",
|
|
562
|
+
/** A subscription line in a checkout whose currency differs from the site currency. Nothing was removed. */
|
|
563
|
+
CONVERTED_CURRENCY_SUBSCRIPTION = "CONVERTED_CURRENCY_SUBSCRIPTION"
|
|
564
|
+
}
|
|
565
|
+
/** @enumType */
|
|
566
|
+
type RepriceStatusWithLiterals = RepriceStatus | 'APPLIED' | 'KEPT' | 'STRIP_ONLY' | 'SAME_REGION' | 'SAME_COUNTRY' | 'NO_DESTINATION_REGION' | 'NOT_APPLICABLE' | 'NOT_APPLICABLE_MODIFIERS' | 'CONVERTED_CURRENCY_SUBSCRIPTION';
|
|
567
|
+
/** Where the base region's rate came from. */
|
|
568
|
+
declare enum BaseRateSource {
|
|
569
|
+
/** The manual tax calculator computed the base tax for this calculation. */
|
|
570
|
+
MANUAL_SPI = "MANUAL_SPI",
|
|
571
|
+
/** The rate captured from Avalara by the embedded-rate probe. */
|
|
572
|
+
AVALARA_PROBE = "AVALARA_PROBE"
|
|
573
|
+
}
|
|
574
|
+
/** @enumType */
|
|
575
|
+
type BaseRateSourceWithLiterals = BaseRateSource | 'MANUAL_SPI' | 'AVALARA_PROBE';
|
|
506
576
|
interface OrderLineItem {
|
|
507
577
|
/**
|
|
508
578
|
* Line item ID.
|
|
@@ -1311,76 +1381,6 @@ interface ServiceProperties {
|
|
|
1311
1381
|
*/
|
|
1312
1382
|
endDate?: Date | null;
|
|
1313
1383
|
}
|
|
1314
|
-
/**
|
|
1315
|
-
* Record of the cross-border repricing of a single line item, shipping option or fee on a site whose catalog prices include tax:
|
|
1316
|
-
* the catalog price the merchant entered, the base region's tax removed from it per unit, and the rate used.
|
|
1317
|
-
*
|
|
1318
|
-
* This record describes how the price was reached, not the resulting amount. The repriced figures are on the line itself:
|
|
1319
|
-
* `price` and `taxInfo` on an order line item, and their counterparts on a shipping cost or a fee.
|
|
1320
|
-
* Written by the calculation that priced the line and carried unchanged onto orders, draft orders and subscription contracts.
|
|
1321
|
-
*/
|
|
1322
|
-
interface CrossBorderPriceAdjustment {
|
|
1323
|
-
/**
|
|
1324
|
-
* ID of the tax region whose tax is built into the catalog prices.
|
|
1325
|
-
* @format GUID
|
|
1326
|
-
*/
|
|
1327
|
-
baseTaxRegionId?: string;
|
|
1328
|
-
/**
|
|
1329
|
-
* ID of the tax region resolved for the destination. Absent when no region matched.
|
|
1330
|
-
* @format GUID
|
|
1331
|
-
*/
|
|
1332
|
-
destinationTaxRegionId?: string | null;
|
|
1333
|
-
/** Price per unit as entered by the merchant, with the base region's tax inside it. */
|
|
1334
|
-
catalogPrice?: Price;
|
|
1335
|
-
/** Base region's tax removed per unit. Zero when `status` is `KEPT`, `SAME_REGION`, `SAME_COUNTRY`, `NOT_APPLICABLE`, `NOT_APPLICABLE_MODIFIERS` or `CONVERTED_CURRENCY_SUBSCRIPTION`, where nothing was removed. */
|
|
1336
|
-
baseTaxAmount?: Price;
|
|
1337
|
-
/** Outcome of the repricing for this line. */
|
|
1338
|
-
status?: RepriceStatusWithLiterals;
|
|
1339
|
-
/** Where the base region's rate came from. Meaningful only when a rate was applied, that is when `status` is `APPLIED`, `STRIP_ONLY` or `NO_DESTINATION_REGION`. */
|
|
1340
|
-
baseRateSource?: BaseRateSourceWithLiterals;
|
|
1341
|
-
/**
|
|
1342
|
-
* Base region's rate used to remove the tax, as a decimal numeral between 0 and 1. For example, `"0.22"`. Absent when no rate was applied.
|
|
1343
|
-
* @format DECIMAL_VALUE
|
|
1344
|
-
* @decimalValue options { gte:0, maxScale:6 }
|
|
1345
|
-
*/
|
|
1346
|
-
baseRate?: string | null;
|
|
1347
|
-
/** When the base region's rate was captured. Set only when `baseRateSource` is `AVALARA_PROBE`. */
|
|
1348
|
-
baseRateCapturedDate?: Date | null;
|
|
1349
|
-
/** Whether the destination's tax is included in the repriced amount. Reserved for per-region display; not populated. */
|
|
1350
|
-
destinationTaxIncluded?: boolean | null;
|
|
1351
|
-
}
|
|
1352
|
-
/** Outcome of the repricing for one line. */
|
|
1353
|
-
declare enum RepriceStatus {
|
|
1354
|
-
/** Base tax removed and the destination's tax applied. */
|
|
1355
|
-
APPLIED = "APPLIED",
|
|
1356
|
-
/** The caller asked for the line to be left at its price. Nothing was removed. */
|
|
1357
|
-
KEPT = "KEPT",
|
|
1358
|
-
/** Base tax removed and no destination tax applied, as in a tax-exempt calculation. This is the outcome; the mode that asks for it is `CrossBorderRepricingMode.STRIP_ONLY`. */
|
|
1359
|
-
STRIP_ONLY = "STRIP_ONLY",
|
|
1360
|
-
/** The destination is the base region. Nothing was removed. */
|
|
1361
|
-
SAME_REGION = "SAME_REGION",
|
|
1362
|
-
/** The destination is in the base region's country, outside the US and Canada, so the catalog price already carries the destination's tax. Nothing was removed. */
|
|
1363
|
-
SAME_COUNTRY = "SAME_COUNTRY",
|
|
1364
|
-
/** No tax region matched the destination. Base tax removed and no destination tax applied. */
|
|
1365
|
-
NO_DESTINATION_REGION = "NO_DESTINATION_REGION",
|
|
1366
|
-
/** The calculation didn't reprice this line, for example because the feature was off or a pass failed. Nothing was removed. */
|
|
1367
|
-
NOT_APPLICABLE = "NOT_APPLICABLE",
|
|
1368
|
-
/** The line's modifiers exceed its price at the destination's rate. Nothing was removed. */
|
|
1369
|
-
NOT_APPLICABLE_MODIFIERS = "NOT_APPLICABLE_MODIFIERS",
|
|
1370
|
-
/** A subscription line in a checkout whose currency differs from the site currency. Nothing was removed. */
|
|
1371
|
-
CONVERTED_CURRENCY_SUBSCRIPTION = "CONVERTED_CURRENCY_SUBSCRIPTION"
|
|
1372
|
-
}
|
|
1373
|
-
/** @enumType */
|
|
1374
|
-
type RepriceStatusWithLiterals = RepriceStatus | 'APPLIED' | 'KEPT' | 'STRIP_ONLY' | 'SAME_REGION' | 'SAME_COUNTRY' | 'NO_DESTINATION_REGION' | 'NOT_APPLICABLE' | 'NOT_APPLICABLE_MODIFIERS' | 'CONVERTED_CURRENCY_SUBSCRIPTION';
|
|
1375
|
-
/** Where the base region's rate came from. */
|
|
1376
|
-
declare enum BaseRateSource {
|
|
1377
|
-
/** The manual tax calculator computed the base tax for this calculation. */
|
|
1378
|
-
MANUAL_SPI = "MANUAL_SPI",
|
|
1379
|
-
/** The rate captured from Avalara by the embedded-rate probe. */
|
|
1380
|
-
AVALARA_PROBE = "AVALARA_PROBE"
|
|
1381
|
-
}
|
|
1382
|
-
/** @enumType */
|
|
1383
|
-
type BaseRateSourceWithLiterals = BaseRateSource | 'MANUAL_SPI' | 'AVALARA_PROBE';
|
|
1384
1384
|
interface ItemChangedDetails {
|
|
1385
1385
|
/**
|
|
1386
1386
|
* Line item quantity before change.
|
|
@@ -1435,6 +1435,11 @@ interface ItemChangedImplicitlyDetails {
|
|
|
1435
1435
|
priceBeforeDiscountsBeforeChange?: Price;
|
|
1436
1436
|
/** Line item price before line-item discounts and tax, before the implicit change. */
|
|
1437
1437
|
priceBeforeDiscountsAndTaxBeforeChange?: Price;
|
|
1438
|
+
/**
|
|
1439
|
+
* Cross-border repricing record of the line item before the implicit change.
|
|
1440
|
+
* @internal
|
|
1441
|
+
*/
|
|
1442
|
+
crossBorderAdjustmentBeforeChange?: CrossBorderPriceAdjustment;
|
|
1438
1443
|
}
|
|
1439
1444
|
interface ShippingDetails extends ShippingDetailsChangeTypeOneOf {
|
|
1440
1445
|
/** Whether shipping info was added as part of the draft. */
|
|
@@ -503,6 +503,76 @@ declare enum JurisdictionType {
|
|
|
503
503
|
}
|
|
504
504
|
/** @enumType */
|
|
505
505
|
type JurisdictionTypeWithLiterals = JurisdictionType | 'UNDEFINED' | 'COUNTRY' | 'STATE' | 'COUNTY' | 'CITY' | 'SPECIAL';
|
|
506
|
+
/**
|
|
507
|
+
* Record of the cross-border repricing of a single line item, shipping option or fee on a site whose catalog prices include tax:
|
|
508
|
+
* the catalog price the merchant entered, the base region's tax removed from it per unit, and the rate used.
|
|
509
|
+
*
|
|
510
|
+
* This record describes how the price was reached, not the resulting amount. The repriced figures are on the line itself:
|
|
511
|
+
* `price` and `taxInfo` on an order line item, and their counterparts on a shipping cost or a fee.
|
|
512
|
+
* Written by the calculation that priced the line and carried unchanged onto orders, draft orders and subscription contracts.
|
|
513
|
+
*/
|
|
514
|
+
interface CrossBorderPriceAdjustment {
|
|
515
|
+
/**
|
|
516
|
+
* ID of the tax region whose tax is built into the catalog prices.
|
|
517
|
+
* @format GUID
|
|
518
|
+
*/
|
|
519
|
+
baseTaxRegionId?: string;
|
|
520
|
+
/**
|
|
521
|
+
* ID of the tax region resolved for the destination. Absent when no region matched.
|
|
522
|
+
* @format GUID
|
|
523
|
+
*/
|
|
524
|
+
destinationTaxRegionId?: string | null;
|
|
525
|
+
/** Price per unit as entered by the merchant, with the base region's tax inside it. */
|
|
526
|
+
catalogPrice?: Price;
|
|
527
|
+
/** Base region's tax removed per unit. Zero when `status` is `KEPT`, `SAME_REGION`, `SAME_COUNTRY`, `NOT_APPLICABLE`, `NOT_APPLICABLE_MODIFIERS` or `CONVERTED_CURRENCY_SUBSCRIPTION`, where nothing was removed. */
|
|
528
|
+
baseTaxAmount?: Price;
|
|
529
|
+
/** Outcome of the repricing for this line. */
|
|
530
|
+
status?: RepriceStatusWithLiterals;
|
|
531
|
+
/** Where the base region's rate came from. Meaningful only when a rate was applied, that is when `status` is `APPLIED`, `STRIP_ONLY` or `NO_DESTINATION_REGION`. */
|
|
532
|
+
baseRateSource?: BaseRateSourceWithLiterals;
|
|
533
|
+
/**
|
|
534
|
+
* Base region's rate used to remove the tax, as a decimal numeral between 0 and 1. For example, `"0.22"`. Absent when no rate was applied.
|
|
535
|
+
* @format DECIMAL_VALUE
|
|
536
|
+
* @decimalValue options { gte:0, maxScale:6 }
|
|
537
|
+
*/
|
|
538
|
+
baseRate?: string | null;
|
|
539
|
+
/** When the base region's rate was captured. Set only when `baseRateSource` is `AVALARA_PROBE`. */
|
|
540
|
+
baseRateCapturedDate?: Date | null;
|
|
541
|
+
/** Whether the destination's tax is included in the repriced amount. Reserved for per-region display; not populated. */
|
|
542
|
+
destinationTaxIncluded?: boolean | null;
|
|
543
|
+
}
|
|
544
|
+
/** Outcome of the repricing for one line. */
|
|
545
|
+
declare enum RepriceStatus {
|
|
546
|
+
/** Base tax removed and the destination's tax applied. */
|
|
547
|
+
APPLIED = "APPLIED",
|
|
548
|
+
/** The caller asked for the line to be left at its price. Nothing was removed. */
|
|
549
|
+
KEPT = "KEPT",
|
|
550
|
+
/** Base tax removed and no destination tax applied, as in a tax-exempt calculation. This is the outcome; the mode that asks for it is `CrossBorderRepricingMode.STRIP_ONLY`. */
|
|
551
|
+
STRIP_ONLY = "STRIP_ONLY",
|
|
552
|
+
/** The destination is the base region. Nothing was removed. */
|
|
553
|
+
SAME_REGION = "SAME_REGION",
|
|
554
|
+
/** The destination is in the base region's country, outside the US and Canada, so the catalog price already carries the destination's tax. Nothing was removed. */
|
|
555
|
+
SAME_COUNTRY = "SAME_COUNTRY",
|
|
556
|
+
/** No tax region matched the destination. Base tax removed and no destination tax applied. */
|
|
557
|
+
NO_DESTINATION_REGION = "NO_DESTINATION_REGION",
|
|
558
|
+
/** The calculation didn't reprice this line, for example because the feature was off or a pass failed. Nothing was removed. */
|
|
559
|
+
NOT_APPLICABLE = "NOT_APPLICABLE",
|
|
560
|
+
/** The line's modifiers exceed its price at the destination's rate. Nothing was removed. */
|
|
561
|
+
NOT_APPLICABLE_MODIFIERS = "NOT_APPLICABLE_MODIFIERS",
|
|
562
|
+
/** A subscription line in a checkout whose currency differs from the site currency. Nothing was removed. */
|
|
563
|
+
CONVERTED_CURRENCY_SUBSCRIPTION = "CONVERTED_CURRENCY_SUBSCRIPTION"
|
|
564
|
+
}
|
|
565
|
+
/** @enumType */
|
|
566
|
+
type RepriceStatusWithLiterals = RepriceStatus | 'APPLIED' | 'KEPT' | 'STRIP_ONLY' | 'SAME_REGION' | 'SAME_COUNTRY' | 'NO_DESTINATION_REGION' | 'NOT_APPLICABLE' | 'NOT_APPLICABLE_MODIFIERS' | 'CONVERTED_CURRENCY_SUBSCRIPTION';
|
|
567
|
+
/** Where the base region's rate came from. */
|
|
568
|
+
declare enum BaseRateSource {
|
|
569
|
+
/** The manual tax calculator computed the base tax for this calculation. */
|
|
570
|
+
MANUAL_SPI = "MANUAL_SPI",
|
|
571
|
+
/** The rate captured from Avalara by the embedded-rate probe. */
|
|
572
|
+
AVALARA_PROBE = "AVALARA_PROBE"
|
|
573
|
+
}
|
|
574
|
+
/** @enumType */
|
|
575
|
+
type BaseRateSourceWithLiterals = BaseRateSource | 'MANUAL_SPI' | 'AVALARA_PROBE';
|
|
506
576
|
interface OrderLineItem {
|
|
507
577
|
/**
|
|
508
578
|
* Line item ID.
|
|
@@ -1270,76 +1340,6 @@ interface ServiceProperties {
|
|
|
1270
1340
|
*/
|
|
1271
1341
|
endDate?: Date | null;
|
|
1272
1342
|
}
|
|
1273
|
-
/**
|
|
1274
|
-
* Record of the cross-border repricing of a single line item, shipping option or fee on a site whose catalog prices include tax:
|
|
1275
|
-
* the catalog price the merchant entered, the base region's tax removed from it per unit, and the rate used.
|
|
1276
|
-
*
|
|
1277
|
-
* This record describes how the price was reached, not the resulting amount. The repriced figures are on the line itself:
|
|
1278
|
-
* `price` and `taxInfo` on an order line item, and their counterparts on a shipping cost or a fee.
|
|
1279
|
-
* Written by the calculation that priced the line and carried unchanged onto orders, draft orders and subscription contracts.
|
|
1280
|
-
*/
|
|
1281
|
-
interface CrossBorderPriceAdjustment {
|
|
1282
|
-
/**
|
|
1283
|
-
* ID of the tax region whose tax is built into the catalog prices.
|
|
1284
|
-
* @format GUID
|
|
1285
|
-
*/
|
|
1286
|
-
baseTaxRegionId?: string;
|
|
1287
|
-
/**
|
|
1288
|
-
* ID of the tax region resolved for the destination. Absent when no region matched.
|
|
1289
|
-
* @format GUID
|
|
1290
|
-
*/
|
|
1291
|
-
destinationTaxRegionId?: string | null;
|
|
1292
|
-
/** Price per unit as entered by the merchant, with the base region's tax inside it. */
|
|
1293
|
-
catalogPrice?: Price;
|
|
1294
|
-
/** Base region's tax removed per unit. Zero when `status` is `KEPT`, `SAME_REGION`, `SAME_COUNTRY`, `NOT_APPLICABLE`, `NOT_APPLICABLE_MODIFIERS` or `CONVERTED_CURRENCY_SUBSCRIPTION`, where nothing was removed. */
|
|
1295
|
-
baseTaxAmount?: Price;
|
|
1296
|
-
/** Outcome of the repricing for this line. */
|
|
1297
|
-
status?: RepriceStatusWithLiterals;
|
|
1298
|
-
/** Where the base region's rate came from. Meaningful only when a rate was applied, that is when `status` is `APPLIED`, `STRIP_ONLY` or `NO_DESTINATION_REGION`. */
|
|
1299
|
-
baseRateSource?: BaseRateSourceWithLiterals;
|
|
1300
|
-
/**
|
|
1301
|
-
* Base region's rate used to remove the tax, as a decimal numeral between 0 and 1. For example, `"0.22"`. Absent when no rate was applied.
|
|
1302
|
-
* @format DECIMAL_VALUE
|
|
1303
|
-
* @decimalValue options { gte:0, maxScale:6 }
|
|
1304
|
-
*/
|
|
1305
|
-
baseRate?: string | null;
|
|
1306
|
-
/** When the base region's rate was captured. Set only when `baseRateSource` is `AVALARA_PROBE`. */
|
|
1307
|
-
baseRateCapturedDate?: Date | null;
|
|
1308
|
-
/** Whether the destination's tax is included in the repriced amount. Reserved for per-region display; not populated. */
|
|
1309
|
-
destinationTaxIncluded?: boolean | null;
|
|
1310
|
-
}
|
|
1311
|
-
/** Outcome of the repricing for one line. */
|
|
1312
|
-
declare enum RepriceStatus {
|
|
1313
|
-
/** Base tax removed and the destination's tax applied. */
|
|
1314
|
-
APPLIED = "APPLIED",
|
|
1315
|
-
/** The caller asked for the line to be left at its price. Nothing was removed. */
|
|
1316
|
-
KEPT = "KEPT",
|
|
1317
|
-
/** Base tax removed and no destination tax applied, as in a tax-exempt calculation. This is the outcome; the mode that asks for it is `CrossBorderRepricingMode.STRIP_ONLY`. */
|
|
1318
|
-
STRIP_ONLY = "STRIP_ONLY",
|
|
1319
|
-
/** The destination is the base region. Nothing was removed. */
|
|
1320
|
-
SAME_REGION = "SAME_REGION",
|
|
1321
|
-
/** The destination is in the base region's country, outside the US and Canada, so the catalog price already carries the destination's tax. Nothing was removed. */
|
|
1322
|
-
SAME_COUNTRY = "SAME_COUNTRY",
|
|
1323
|
-
/** No tax region matched the destination. Base tax removed and no destination tax applied. */
|
|
1324
|
-
NO_DESTINATION_REGION = "NO_DESTINATION_REGION",
|
|
1325
|
-
/** The calculation didn't reprice this line, for example because the feature was off or a pass failed. Nothing was removed. */
|
|
1326
|
-
NOT_APPLICABLE = "NOT_APPLICABLE",
|
|
1327
|
-
/** The line's modifiers exceed its price at the destination's rate. Nothing was removed. */
|
|
1328
|
-
NOT_APPLICABLE_MODIFIERS = "NOT_APPLICABLE_MODIFIERS",
|
|
1329
|
-
/** A subscription line in a checkout whose currency differs from the site currency. Nothing was removed. */
|
|
1330
|
-
CONVERTED_CURRENCY_SUBSCRIPTION = "CONVERTED_CURRENCY_SUBSCRIPTION"
|
|
1331
|
-
}
|
|
1332
|
-
/** @enumType */
|
|
1333
|
-
type RepriceStatusWithLiterals = RepriceStatus | 'APPLIED' | 'KEPT' | 'STRIP_ONLY' | 'SAME_REGION' | 'SAME_COUNTRY' | 'NO_DESTINATION_REGION' | 'NOT_APPLICABLE' | 'NOT_APPLICABLE_MODIFIERS' | 'CONVERTED_CURRENCY_SUBSCRIPTION';
|
|
1334
|
-
/** Where the base region's rate came from. */
|
|
1335
|
-
declare enum BaseRateSource {
|
|
1336
|
-
/** The manual tax calculator computed the base tax for this calculation. */
|
|
1337
|
-
MANUAL_SPI = "MANUAL_SPI",
|
|
1338
|
-
/** The rate captured from Avalara by the embedded-rate probe. */
|
|
1339
|
-
AVALARA_PROBE = "AVALARA_PROBE"
|
|
1340
|
-
}
|
|
1341
|
-
/** @enumType */
|
|
1342
|
-
type BaseRateSourceWithLiterals = BaseRateSource | 'MANUAL_SPI' | 'AVALARA_PROBE';
|
|
1343
1343
|
interface ItemChangedDetails {
|
|
1344
1344
|
/**
|
|
1345
1345
|
* Line item quantity before change.
|
|
@@ -1394,6 +1394,11 @@ interface ItemChangedImplicitlyDetails {
|
|
|
1394
1394
|
priceBeforeDiscountsBeforeChange?: Price;
|
|
1395
1395
|
/** Line item price before line-item discounts and tax, before the implicit change. */
|
|
1396
1396
|
priceBeforeDiscountsAndTaxBeforeChange?: Price;
|
|
1397
|
+
/**
|
|
1398
|
+
* Cross-border repricing record of the line item before the implicit change.
|
|
1399
|
+
* @internal
|
|
1400
|
+
*/
|
|
1401
|
+
crossBorderAdjustmentBeforeChange?: CrossBorderPriceAdjustment;
|
|
1397
1402
|
}
|
|
1398
1403
|
interface ShippingDetails extends ShippingDetailsChangeTypeOneOf {
|
|
1399
1404
|
/** Whether shipping info was added as part of the draft. */
|