@wix/auto_sdk_billing_tax-calculation 1.0.11 → 1.0.12
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/{internal/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.types.d.ts → cjs/gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal-Cina_f0e.d.ts} +50 -23
- package/build/cjs/index.d.ts +41 -1
- package/build/cjs/index.js +208 -15
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/meta.d.ts +407 -1
- package/build/cjs/meta.js +135 -15
- package/build/cjs/meta.js.map +1 -1
- package/build/es/{src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.types.d.ts → gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal-Cina_f0e.d.mts} +50 -23
- package/build/{internal/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.public.d.ts → es/index.d.mts} +11 -8
- package/build/es/index.mjs +185 -0
- package/build/es/index.mjs.map +1 -0
- package/build/{cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.types.d.ts → es/meta.d.mts} +35 -22
- package/build/es/meta.mjs +110 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/internal/cjs/gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal-Cina_f0e.d.ts +421 -0
- package/build/internal/cjs/index.d.ts +41 -1
- package/build/internal/cjs/index.js +208 -15
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +407 -1
- package/build/internal/cjs/meta.js +135 -15
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal-Cina_f0e.d.mts +421 -0
- package/build/internal/es/{src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.public.d.ts → index.d.mts} +11 -8
- package/build/internal/es/index.mjs +185 -0
- package/build/internal/es/index.mjs.map +1 -0
- package/build/internal/{cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.types.d.ts → es/meta.d.mts} +35 -22
- package/build/internal/es/meta.mjs +110 -0
- package/build/internal/es/meta.mjs.map +1 -0
- package/package.json +9 -8
- 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/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.context.d.ts +0 -6
- package/build/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.context.js +0 -10
- package/build/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.context.js.map +0 -1
- package/build/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.http.d.ts +0 -26
- package/build/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.http.js +0 -93
- package/build/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.http.js.map +0 -1
- package/build/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.meta.d.ts +0 -14
- package/build/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.meta.js +0 -66
- package/build/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.meta.js.map +0 -1
- package/build/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.public.d.ts +0 -38
- package/build/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.public.js +0 -20
- package/build/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.public.js.map +0 -1
- package/build/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.types.js +0 -14
- package/build/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.types.js.map +0 -1
- package/build/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.d.ts +0 -480
- package/build/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.js +0 -165
- package/build/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.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/gateways-billing-v1-tax-calculation-gateway-tax-calculation.context.d.ts +0 -6
- package/build/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.context.js +0 -6
- package/build/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.context.js.map +0 -1
- package/build/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.http.d.ts +0 -26
- package/build/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.http.js +0 -88
- package/build/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.http.js.map +0 -1
- package/build/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.meta.d.ts +0 -14
- package/build/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.meta.js +0 -38
- package/build/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.meta.js.map +0 -1
- package/build/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.public.d.ts +0 -38
- package/build/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.public.js +0 -14
- package/build/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.public.js.map +0 -1
- package/build/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.types.js +0 -11
- package/build/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.types.js.map +0 -1
- package/build/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.d.ts +0 -480
- package/build/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.js +0 -137
- package/build/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.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/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.context.d.ts +0 -6
- package/build/internal/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.context.js +0 -10
- package/build/internal/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.context.js.map +0 -1
- package/build/internal/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.http.d.ts +0 -26
- package/build/internal/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.http.js +0 -93
- package/build/internal/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.http.js.map +0 -1
- package/build/internal/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.meta.d.ts +0 -14
- package/build/internal/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.meta.js +0 -66
- package/build/internal/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.meta.js.map +0 -1
- package/build/internal/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.public.js +0 -20
- package/build/internal/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.public.js.map +0 -1
- package/build/internal/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.types.js +0 -14
- package/build/internal/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.types.js.map +0 -1
- package/build/internal/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.d.ts +0 -480
- package/build/internal/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.js +0 -165
- package/build/internal/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.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/gateways-billing-v1-tax-calculation-gateway-tax-calculation.context.d.ts +0 -6
- package/build/internal/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.context.js +0 -6
- package/build/internal/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.context.js.map +0 -1
- package/build/internal/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.http.d.ts +0 -26
- package/build/internal/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.http.js +0 -88
- package/build/internal/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.http.js.map +0 -1
- package/build/internal/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.meta.d.ts +0 -14
- package/build/internal/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.meta.js +0 -38
- package/build/internal/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.meta.js.map +0 -1
- package/build/internal/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.public.js +0 -14
- package/build/internal/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.public.js.map +0 -1
- package/build/internal/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.types.js +0 -11
- package/build/internal/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.types.js.map +0 -1
- package/build/internal/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.d.ts +0 -480
- package/build/internal/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.js +0 -137
- package/build/internal/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.js.map +0 -1
package/build/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.js
DELETED
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.listTaxCalculators = exports.calculateTax = exports.JurisdictionType = void 0;
|
|
27
|
-
const transform_error_1 = require("@wix/sdk-runtime/transform-error");
|
|
28
|
-
const rename_all_nested_keys_1 = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
29
|
-
const ambassadorWixGatewaysBillingV1TaxCalculationGateway = __importStar(require("./gateways-billing-v1-tax-calculation-gateway-tax-calculation.http.js"));
|
|
30
|
-
const address_1 = require("@wix/sdk-runtime/transformations/address");
|
|
31
|
-
const address_2 = require("@wix/sdk-runtime/transformations/address");
|
|
32
|
-
const transform_paths_1 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
33
|
-
/** Type of jurisdiction that taxes were calculated for. For example, `"State"`, `"County"`, `"City"`, `"Special"`, etc. */
|
|
34
|
-
var JurisdictionType;
|
|
35
|
-
(function (JurisdictionType) {
|
|
36
|
-
JurisdictionType["UNDEFINED"] = "UNDEFINED";
|
|
37
|
-
JurisdictionType["COUNTRY"] = "COUNTRY";
|
|
38
|
-
JurisdictionType["STATE"] = "STATE";
|
|
39
|
-
JurisdictionType["COUNTY"] = "COUNTY";
|
|
40
|
-
JurisdictionType["CITY"] = "CITY";
|
|
41
|
-
JurisdictionType["SPECIAL"] = "SPECIAL";
|
|
42
|
-
})(JurisdictionType || (exports.JurisdictionType = JurisdictionType = {}));
|
|
43
|
-
/**
|
|
44
|
-
* Calculates tax for the provided line items.
|
|
45
|
-
*
|
|
46
|
-
* Tax is calculated for each line item based on the tax region
|
|
47
|
-
* that corresponds to the address provided in `lineItems.addressIndex` and the tax group in `taxGroupId`. If no tax region is found for
|
|
48
|
-
* the line item's address then no tax will be calculated for this line item. If no tax group with that `taxGroupId` is found then the
|
|
49
|
-
* default tax group is used to calculate tax. Call List Default Tax Groups to retrieve a site's default tax groups.
|
|
50
|
-
*
|
|
51
|
-
* The tax is calculated by a tax calculator app installed on the site.
|
|
52
|
-
* Call List Tax Calculators to see which tax calculators are available.
|
|
53
|
-
* To provide your own tax calculations, use the Tax Calculation service plugin.
|
|
54
|
-
*
|
|
55
|
-
* The breakdown of calculated tax returned, includes:
|
|
56
|
-
* + `taxSummary`: The overall total tax calculated.
|
|
57
|
-
* + `taxSummary.aggregatedTaxBreakdown`: The total tax calculated for each jurisdiction.
|
|
58
|
-
* + `lineItemTaxDetails.taxSummary`: The total tax calculated for each line item.
|
|
59
|
-
* + `lineItemTaxDetails.taxBreakdown`: The tax calculated for each line item in each jurisdiction.
|
|
60
|
-
* @public
|
|
61
|
-
* @documentationMaturity preview
|
|
62
|
-
* @requiredField options.addresses
|
|
63
|
-
* @requiredField options.lineItems
|
|
64
|
-
* @requiredField options.lineItems._id
|
|
65
|
-
* @requiredField options.lineItems.addressIndex
|
|
66
|
-
* @requiredField options.lineItems.price
|
|
67
|
-
* @param options - Calculate tax options.
|
|
68
|
-
* @permissionId BILLING.CALCULATE_TAX
|
|
69
|
-
* @permissionScope Manage Stores - all permissions
|
|
70
|
-
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
71
|
-
* @permissionScope Manage Stores
|
|
72
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
73
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
74
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
75
|
-
* @permissionScope Manage eCommerce - all permissions
|
|
76
|
-
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
77
|
-
* @permissionScope Manage Orders
|
|
78
|
-
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
79
|
-
* @applicableIdentity APP
|
|
80
|
-
* @applicableIdentity VISITOR
|
|
81
|
-
* @fqn wix.billing.v1.TaxCalculation.CalculateTax
|
|
82
|
-
*/
|
|
83
|
-
async function calculateTax(options) {
|
|
84
|
-
// @ts-ignore
|
|
85
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
86
|
-
const payload = (0, transform_paths_1.transformPaths)((0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({
|
|
87
|
-
externalId: options?.externalId,
|
|
88
|
-
currency: options?.currency,
|
|
89
|
-
addresses: options?.addresses,
|
|
90
|
-
lineItems: options?.lineItems,
|
|
91
|
-
}), [
|
|
92
|
-
{
|
|
93
|
-
transformFn: address_1.transformSDKAddressToRESTAddress,
|
|
94
|
-
paths: [{ path: 'addresses', isRepeated: true }],
|
|
95
|
-
},
|
|
96
|
-
]);
|
|
97
|
-
const reqOpts = ambassadorWixGatewaysBillingV1TaxCalculationGateway.calculateTax(payload);
|
|
98
|
-
sideEffects?.onSiteCall?.();
|
|
99
|
-
try {
|
|
100
|
-
const result = await httpClient.request(reqOpts);
|
|
101
|
-
sideEffects?.onSuccess?.(result);
|
|
102
|
-
return (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)((0, transform_paths_1.transformPaths)(result.data, [
|
|
103
|
-
{
|
|
104
|
-
transformFn: address_2.transformRESTAddressToSDKAddress,
|
|
105
|
-
paths: [{ path: 'addresses', isRepeated: true }],
|
|
106
|
-
},
|
|
107
|
-
]));
|
|
108
|
-
}
|
|
109
|
-
catch (err) {
|
|
110
|
-
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
111
|
-
spreadPathsToArguments: {},
|
|
112
|
-
explicitPathsToArguments: {
|
|
113
|
-
externalId: '$[0].externalId',
|
|
114
|
-
currency: '$[0].currency',
|
|
115
|
-
addresses: '$[0].addresses',
|
|
116
|
-
lineItems: '$[0].lineItems',
|
|
117
|
-
},
|
|
118
|
-
singleArgumentUnchanged: false,
|
|
119
|
-
}, ['options']);
|
|
120
|
-
sideEffects?.onError?.(err);
|
|
121
|
-
throw transformedError;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
exports.calculateTax = calculateTax;
|
|
125
|
-
/**
|
|
126
|
-
* Retrieves a list of installed tax calculators.
|
|
127
|
-
*
|
|
128
|
-
* Wix uses these calculators to calculate tax.
|
|
129
|
-
* @public
|
|
130
|
-
* @documentationMaturity preview
|
|
131
|
-
* @permissionId BILLING.TAX_CALCULATORS_READ
|
|
132
|
-
* @permissionScope Manage Stores - all permissions
|
|
133
|
-
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
134
|
-
* @permissionScope Manage Stores
|
|
135
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
136
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
137
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
138
|
-
* @permissionScope Manage Orders
|
|
139
|
-
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
140
|
-
* @applicableIdentity APP
|
|
141
|
-
* @fqn wix.billing.v1.TaxCalculation.ListTaxCalculators
|
|
142
|
-
*/
|
|
143
|
-
async function listTaxCalculators() {
|
|
144
|
-
// @ts-ignore
|
|
145
|
-
const { httpClient, sideEffects } = arguments[0];
|
|
146
|
-
const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({});
|
|
147
|
-
const reqOpts = ambassadorWixGatewaysBillingV1TaxCalculationGateway.listTaxCalculators(payload);
|
|
148
|
-
sideEffects?.onSiteCall?.();
|
|
149
|
-
try {
|
|
150
|
-
const result = await httpClient.request(reqOpts);
|
|
151
|
-
sideEffects?.onSuccess?.(result);
|
|
152
|
-
return (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
153
|
-
}
|
|
154
|
-
catch (err) {
|
|
155
|
-
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
156
|
-
spreadPathsToArguments: {},
|
|
157
|
-
explicitPathsToArguments: {},
|
|
158
|
-
singleArgumentUnchanged: false,
|
|
159
|
-
}, []);
|
|
160
|
-
sideEffects?.onError?.(err);
|
|
161
|
-
throw transformedError;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
exports.listTaxCalculators = listTaxCalculators;
|
|
165
|
-
//# sourceMappingURL=gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.js.map
|
package/build/cjs/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.js","sourceRoot":"","sources":["../../../src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.ts"],"names":[],"mappings":"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"}
|
package/build/es/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.context.js';
|
package/build/es/index.js
DELETED
package/build/es/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,8EAA8E,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.typings.js","sourceRoot":"","sources":["../../index.typings.ts"],"names":[],"mappings":"AAAA,cAAc,gFAAgF,CAAC"}
|
package/build/es/meta.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.meta.js';
|
package/build/es/meta.js
DELETED
package/build/es/meta.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":"AAAA,cAAc,2EAA2E,CAAC"}
|
package/build/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.context.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { calculateTax as publicCalculateTax, listTaxCalculators as publicListTaxCalculators } from './gateways-billing-v1-tax-calculation-gateway-tax-calculation.public.js';
|
|
2
|
-
import { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';
|
|
3
|
-
export declare const calculateTax: MaybeContext<BuildRESTFunction<typeof publicCalculateTax> & typeof publicCalculateTax>;
|
|
4
|
-
export declare const listTaxCalculators: MaybeContext<BuildRESTFunction<typeof publicListTaxCalculators> & typeof publicListTaxCalculators>;
|
|
5
|
-
export { JurisdictionType } from './gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.js';
|
|
6
|
-
export { TaxCalculationGateway, CalculateTaxRequest, Address, LineItem, AddressIndex, AddressIndexAddressIndexOptionsOneOf, MultipleAddresses, CalculateTaxResponse, TaxSummary, AggregatedTaxBreakdown, LineItemTaxDetails, TaxBreakdown, LineItemTaxSummary, ApplicationError, ListTaxCalculatorsRequest, ListTaxCalculatorsResponse, TaxCalculatorDetails, CalculateTaxOptions, } from './gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.js';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { calculateTax as publicCalculateTax, listTaxCalculators as publicListTaxCalculators, } from './gateways-billing-v1-tax-calculation-gateway-tax-calculation.public.js';
|
|
2
|
-
import { createRESTModule } from '@wix/sdk-runtime/rest-modules';
|
|
3
|
-
export const calculateTax = /*#__PURE__*/ createRESTModule(publicCalculateTax);
|
|
4
|
-
export const listTaxCalculators = /*#__PURE__*/ createRESTModule(publicListTaxCalculators);
|
|
5
|
-
export { JurisdictionType } from './gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.js';
|
|
6
|
-
//# sourceMappingURL=gateways-billing-v1-tax-calculation-gateway-tax-calculation.context.js.map
|
package/build/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.context.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gateways-billing-v1-tax-calculation-gateway-tax-calculation.context.js","sourceRoot":"","sources":["../../../src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.context.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,IAAI,kBAAkB,EAClC,kBAAkB,IAAI,wBAAwB,GAC/C,MAAM,yEAAyE,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,MAAM,CAAC,MAAM,YAAY,GAErB,aAAa,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;AACvD,MAAM,CAAC,MAAM,kBAAkB,GAG3B,aAAa,CAAC,gBAAgB,CAAC,wBAAwB,CAAC,CAAC;AAE7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4EAA4E,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
|
-
/**
|
|
3
|
-
* Calculates tax for the provided line items.
|
|
4
|
-
*
|
|
5
|
-
* Tax is calculated for each line item based on the tax region
|
|
6
|
-
* that corresponds to the address provided in `lineItems.addressIndex` and the tax group in `taxGroupId`. If no tax region is found for
|
|
7
|
-
* the line item's address then no tax will be calculated for this line item. If no tax group with that `taxGroupId` is found then the
|
|
8
|
-
* default tax group is used to calculate tax. Call List Default Tax Groups to retrieve a site's default tax groups.
|
|
9
|
-
*
|
|
10
|
-
* The tax is calculated by a tax calculator app installed on the site.
|
|
11
|
-
* Call List Tax Calculators to see which tax calculators are available.
|
|
12
|
-
* To provide your own tax calculations, use the Tax Calculation service plugin.
|
|
13
|
-
*
|
|
14
|
-
* The breakdown of calculated tax returned, includes:
|
|
15
|
-
* + `taxSummary`: The overall total tax calculated.
|
|
16
|
-
* + `taxSummary.aggregatedTaxBreakdown`: The total tax calculated for each jurisdiction.
|
|
17
|
-
* + `lineItemTaxDetails.taxSummary`: The total tax calculated for each line item.
|
|
18
|
-
* + `lineItemTaxDetails.taxBreakdown`: The tax calculated for each line item in each jurisdiction.
|
|
19
|
-
*/
|
|
20
|
-
export declare function calculateTax(payload: object): RequestOptionsFactory<any>;
|
|
21
|
-
/**
|
|
22
|
-
* Retrieves a list of installed tax calculators.
|
|
23
|
-
*
|
|
24
|
-
* Wix uses these calculators to calculate tax.
|
|
25
|
-
*/
|
|
26
|
-
export declare function listTaxCalculators(payload: object): RequestOptionsFactory<any>;
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';
|
|
2
|
-
import { resolveUrl } from '@wix/sdk-runtime/rest-modules';
|
|
3
|
-
function resolveWixBillingV1TaxCalculationUrl(opts) {
|
|
4
|
-
const domainToMappings = {
|
|
5
|
-
'manage._base_domain_': [
|
|
6
|
-
{
|
|
7
|
-
srcPath: '/billing/v1/calculate-tax',
|
|
8
|
-
destPath: '/v1/calculate-tax',
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
srcPath: '/billing/v1/list-tax-calculators',
|
|
12
|
-
destPath: '/v1/list-tax-calculators',
|
|
13
|
-
},
|
|
14
|
-
],
|
|
15
|
-
'www.wixapis.com': [
|
|
16
|
-
{
|
|
17
|
-
srcPath: '/billing/v1/calculate-tax',
|
|
18
|
-
destPath: '/v1/calculate-tax',
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
srcPath: '/billing/v1/list-tax-calculators',
|
|
22
|
-
destPath: '/v1/list-tax-calculators',
|
|
23
|
-
},
|
|
24
|
-
],
|
|
25
|
-
};
|
|
26
|
-
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
27
|
-
}
|
|
28
|
-
const PACKAGE_NAME = '@wix/auto_sdk_billing_tax-calculation';
|
|
29
|
-
/**
|
|
30
|
-
* Calculates tax for the provided line items.
|
|
31
|
-
*
|
|
32
|
-
* Tax is calculated for each line item based on the tax region
|
|
33
|
-
* that corresponds to the address provided in `lineItems.addressIndex` and the tax group in `taxGroupId`. If no tax region is found for
|
|
34
|
-
* the line item's address then no tax will be calculated for this line item. If no tax group with that `taxGroupId` is found then the
|
|
35
|
-
* default tax group is used to calculate tax. Call List Default Tax Groups to retrieve a site's default tax groups.
|
|
36
|
-
*
|
|
37
|
-
* The tax is calculated by a tax calculator app installed on the site.
|
|
38
|
-
* Call List Tax Calculators to see which tax calculators are available.
|
|
39
|
-
* To provide your own tax calculations, use the Tax Calculation service plugin.
|
|
40
|
-
*
|
|
41
|
-
* The breakdown of calculated tax returned, includes:
|
|
42
|
-
* + `taxSummary`: The overall total tax calculated.
|
|
43
|
-
* + `taxSummary.aggregatedTaxBreakdown`: The total tax calculated for each jurisdiction.
|
|
44
|
-
* + `lineItemTaxDetails.taxSummary`: The total tax calculated for each line item.
|
|
45
|
-
* + `lineItemTaxDetails.taxBreakdown`: The tax calculated for each line item in each jurisdiction.
|
|
46
|
-
*/
|
|
47
|
-
export function calculateTax(payload) {
|
|
48
|
-
function __calculateTax({ host }) {
|
|
49
|
-
const metadata = {
|
|
50
|
-
entityFqdn: 'wix.gateways.billing.v1.tax_calculation_gateway',
|
|
51
|
-
method: 'POST',
|
|
52
|
-
methodFqn: 'wix.billing.v1.TaxCalculation.CalculateTax',
|
|
53
|
-
packageName: PACKAGE_NAME,
|
|
54
|
-
url: resolveWixBillingV1TaxCalculationUrl({
|
|
55
|
-
protoPath: '/v1/calculate-tax',
|
|
56
|
-
data: payload,
|
|
57
|
-
host,
|
|
58
|
-
}),
|
|
59
|
-
data: payload,
|
|
60
|
-
};
|
|
61
|
-
return metadata;
|
|
62
|
-
}
|
|
63
|
-
return __calculateTax;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Retrieves a list of installed tax calculators.
|
|
67
|
-
*
|
|
68
|
-
* Wix uses these calculators to calculate tax.
|
|
69
|
-
*/
|
|
70
|
-
export function listTaxCalculators(payload) {
|
|
71
|
-
function __listTaxCalculators({ host }) {
|
|
72
|
-
const metadata = {
|
|
73
|
-
entityFqdn: 'wix.gateways.billing.v1.tax_calculation_gateway',
|
|
74
|
-
method: 'GET',
|
|
75
|
-
methodFqn: 'wix.billing.v1.TaxCalculation.ListTaxCalculators',
|
|
76
|
-
packageName: PACKAGE_NAME,
|
|
77
|
-
url: resolveWixBillingV1TaxCalculationUrl({
|
|
78
|
-
protoPath: '/v1/list-tax-calculators',
|
|
79
|
-
data: payload,
|
|
80
|
-
host,
|
|
81
|
-
}),
|
|
82
|
-
params: toURLSearchParams(payload),
|
|
83
|
-
};
|
|
84
|
-
return metadata;
|
|
85
|
-
}
|
|
86
|
-
return __listTaxCalculators;
|
|
87
|
-
}
|
|
88
|
-
//# sourceMappingURL=gateways-billing-v1-tax-calculation-gateway-tax-calculation.http.js.map
|
package/build/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.http.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gateways-billing-v1-tax-calculation-gateway-tax-calculation.http.js","sourceRoot":"","sources":["../../../src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAI3D,SAAS,oCAAoC,CAC3C,IAA8C;IAE9C,MAAM,gBAAgB,GAAG;QACvB,sBAAsB,EAAE;YACtB;gBACE,OAAO,EAAE,2BAA2B;gBACpC,QAAQ,EAAE,mBAAmB;aAC9B;YACD;gBACE,OAAO,EAAE,kCAAkC;gBAC3C,QAAQ,EAAE,0BAA0B;aACrC;SACF;QACD,iBAAiB,EAAE;YACjB;gBACE,OAAO,EAAE,2BAA2B;gBACpC,QAAQ,EAAE,mBAAmB;aAC9B;YACD;gBACE,OAAO,EAAE,kCAAkC;gBAC3C,QAAQ,EAAE,0BAA0B;aACrC;SACF;KACF,CAAC;IAEF,OAAO,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED,MAAM,YAAY,GAAG,uCAAuC,CAAC;AAE7D;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,YAAY,CAAC,OAAe;IAC1C,SAAS,cAAc,CAAC,EAAE,IAAI,EAAO;QACnC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,iDAAiD;YAC7D,MAAM,EAAE,MAAa;YACrB,SAAS,EAAE,4CAA4C;YACvD,WAAW,EAAE,YAAY;YACzB,GAAG,EAAE,oCAAoC,CAAC;gBACxC,SAAS,EAAE,mBAAmB;gBAC9B,IAAI,EAAE,OAAO;gBACb,IAAI;aACL,CAAC;YACF,IAAI,EAAE,OAAO;SACd,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO,cAAc,CAAC;AACxB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAChC,OAAe;IAEf,SAAS,oBAAoB,CAAC,EAAE,IAAI,EAAO;QACzC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,iDAAiD;YAC7D,MAAM,EAAE,KAAY;YACpB,SAAS,EAAE,kDAAkD;YAC7D,WAAW,EAAE,YAAY;YACzB,GAAG,EAAE,oCAAoC,CAAC;gBACxC,SAAS,EAAE,0BAA0B;gBACrC,IAAI,EAAE,OAAO;gBACb,IAAI;aACL,CAAC;YACF,MAAM,EAAE,iBAAiB,CAAC,OAAO,CAAC;SACnC,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO,oBAAoB,CAAC;AAC9B,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as ambassadorWixGatewaysBillingV1TaxCalculationGatewayTypes from './gateways-billing-v1-tax-calculation-gateway-tax-calculation.types.js';
|
|
2
|
-
import * as ambassadorWixGatewaysBillingV1TaxCalculationGatewayUniversalTypes from './gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.js';
|
|
3
|
-
export type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
4
|
-
getUrl: (context: any) => string;
|
|
5
|
-
httpMethod: K;
|
|
6
|
-
path: string;
|
|
7
|
-
pathParams: M;
|
|
8
|
-
__requestType: T;
|
|
9
|
-
__originalRequestType: S;
|
|
10
|
-
__responseType: Q;
|
|
11
|
-
__originalResponseType: R;
|
|
12
|
-
};
|
|
13
|
-
export declare function calculateTax(): __PublicMethodMetaInfo<'POST', {}, ambassadorWixGatewaysBillingV1TaxCalculationGatewayUniversalTypes.CalculateTaxRequest, ambassadorWixGatewaysBillingV1TaxCalculationGatewayTypes.CalculateTaxRequest, ambassadorWixGatewaysBillingV1TaxCalculationGatewayUniversalTypes.CalculateTaxResponse, ambassadorWixGatewaysBillingV1TaxCalculationGatewayTypes.CalculateTaxResponse>;
|
|
14
|
-
export declare function listTaxCalculators(): __PublicMethodMetaInfo<'GET', {}, ambassadorWixGatewaysBillingV1TaxCalculationGatewayUniversalTypes.ListTaxCalculatorsRequest, ambassadorWixGatewaysBillingV1TaxCalculationGatewayTypes.ListTaxCalculatorsRequest, ambassadorWixGatewaysBillingV1TaxCalculationGatewayUniversalTypes.ListTaxCalculatorsResponse, ambassadorWixGatewaysBillingV1TaxCalculationGatewayTypes.ListTaxCalculatorsResponse>;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import * as ambassadorWixGatewaysBillingV1TaxCalculationGateway from './gateways-billing-v1-tax-calculation-gateway-tax-calculation.http.js';
|
|
2
|
-
export function calculateTax() {
|
|
3
|
-
const payload = {};
|
|
4
|
-
const getRequestOptions = ambassadorWixGatewaysBillingV1TaxCalculationGateway.calculateTax(payload);
|
|
5
|
-
const getUrl = (context) => {
|
|
6
|
-
const { url } = getRequestOptions(context);
|
|
7
|
-
return url;
|
|
8
|
-
};
|
|
9
|
-
return {
|
|
10
|
-
getUrl,
|
|
11
|
-
httpMethod: 'POST',
|
|
12
|
-
path: '/v1/calculate-tax',
|
|
13
|
-
pathParams: {},
|
|
14
|
-
__requestType: null,
|
|
15
|
-
__originalRequestType: null,
|
|
16
|
-
__responseType: null,
|
|
17
|
-
__originalResponseType: null,
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
export function listTaxCalculators() {
|
|
21
|
-
const payload = {};
|
|
22
|
-
const getRequestOptions = ambassadorWixGatewaysBillingV1TaxCalculationGateway.listTaxCalculators(payload);
|
|
23
|
-
const getUrl = (context) => {
|
|
24
|
-
const { url } = getRequestOptions(context);
|
|
25
|
-
return url;
|
|
26
|
-
};
|
|
27
|
-
return {
|
|
28
|
-
getUrl,
|
|
29
|
-
httpMethod: 'GET',
|
|
30
|
-
path: '/v1/list-tax-calculators',
|
|
31
|
-
pathParams: {},
|
|
32
|
-
__requestType: null,
|
|
33
|
-
__originalRequestType: null,
|
|
34
|
-
__responseType: null,
|
|
35
|
-
__originalResponseType: null,
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=gateways-billing-v1-tax-calculation-gateway-tax-calculation.meta.js.map
|
package/build/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.meta.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gateways-billing-v1-tax-calculation-gateway-tax-calculation.meta.js","sourceRoot":"","sources":["../../../src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,mDAAmD,MAAM,uEAAuE,CAAC;AAsB7I,MAAM,UAAU,YAAY;IAQ1B,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,mDAAmD,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IAE5E,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,MAAM;QAClB,IAAI,EAAE,mBAAmB;QACzB,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,kBAAkB;IAQhC,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,mDAAmD,CAAC,kBAAkB,CACpE,OAAO,CACR,CAAC;IAEJ,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,KAAK;QACjB,IAAI,EAAE,0BAA0B;QAChC,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC"}
|
package/build/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.public.d.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@wix/sdk-types';
|
|
2
|
-
import { CalculateTaxOptions, CalculateTaxResponse, ListTaxCalculatorsResponse } from './gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.js';
|
|
3
|
-
export declare const __metadata: {
|
|
4
|
-
PACKAGE_NAME: string;
|
|
5
|
-
};
|
|
6
|
-
export declare function calculateTax(httpClient: HttpClient): CalculateTaxSignature;
|
|
7
|
-
interface CalculateTaxSignature {
|
|
8
|
-
/**
|
|
9
|
-
* Calculates tax for the provided line items.
|
|
10
|
-
*
|
|
11
|
-
* Tax is calculated for each line item based on the tax region
|
|
12
|
-
* that corresponds to the address provided in `lineItems.addressIndex` and the tax group in `taxGroupId`. If no tax region is found for
|
|
13
|
-
* the line item's address then no tax will be calculated for this line item. If no tax group with that `taxGroupId` is found then the
|
|
14
|
-
* default tax group is used to calculate tax. Call List Default Tax Groups to retrieve a site's default tax groups.
|
|
15
|
-
*
|
|
16
|
-
* The tax is calculated by a tax calculator app installed on the site.
|
|
17
|
-
* Call List Tax Calculators to see which tax calculators are available.
|
|
18
|
-
* To provide your own tax calculations, use the Tax Calculation service plugin.
|
|
19
|
-
*
|
|
20
|
-
* The breakdown of calculated tax returned, includes:
|
|
21
|
-
* + `taxSummary`: The overall total tax calculated.
|
|
22
|
-
* + `taxSummary.aggregatedTaxBreakdown`: The total tax calculated for each jurisdiction.
|
|
23
|
-
* + `lineItemTaxDetails.taxSummary`: The total tax calculated for each line item.
|
|
24
|
-
* + `lineItemTaxDetails.taxBreakdown`: The tax calculated for each line item in each jurisdiction.
|
|
25
|
-
* @param - Calculate tax options.
|
|
26
|
-
*/
|
|
27
|
-
(options?: CalculateTaxOptions | undefined): Promise<CalculateTaxResponse>;
|
|
28
|
-
}
|
|
29
|
-
export declare function listTaxCalculators(httpClient: HttpClient): ListTaxCalculatorsSignature;
|
|
30
|
-
interface ListTaxCalculatorsSignature {
|
|
31
|
-
/**
|
|
32
|
-
* Retrieves a list of installed tax calculators.
|
|
33
|
-
*
|
|
34
|
-
* Wix uses these calculators to calculate tax.
|
|
35
|
-
*/
|
|
36
|
-
(): Promise<ListTaxCalculatorsResponse>;
|
|
37
|
-
}
|
|
38
|
-
export { Address, AddressIndex, AddressIndexAddressIndexOptionsOneOf, AggregatedTaxBreakdown, ApplicationError, CalculateTaxOptions, CalculateTaxRequest, CalculateTaxResponse, JurisdictionType, LineItem, LineItemTaxDetails, LineItemTaxSummary, ListTaxCalculatorsRequest, ListTaxCalculatorsResponse, MultipleAddresses, TaxBreakdown, TaxCalculationGateway, TaxCalculatorDetails, TaxSummary, } from './gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.js';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { calculateTax as universalCalculateTax, listTaxCalculators as universalListTaxCalculators, } from './gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.js';
|
|
2
|
-
export const __metadata = { PACKAGE_NAME: '@wix/billing' };
|
|
3
|
-
export function calculateTax(httpClient) {
|
|
4
|
-
return (options) => universalCalculateTax(options,
|
|
5
|
-
// @ts-ignore
|
|
6
|
-
{ httpClient });
|
|
7
|
-
}
|
|
8
|
-
export function listTaxCalculators(httpClient) {
|
|
9
|
-
return () => universalListTaxCalculators(
|
|
10
|
-
// @ts-ignore
|
|
11
|
-
{ httpClient });
|
|
12
|
-
}
|
|
13
|
-
export { JurisdictionType, } from './gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.js';
|
|
14
|
-
//# sourceMappingURL=gateways-billing-v1-tax-calculation-gateway-tax-calculation.public.js.map
|
package/build/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.public.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gateways-billing-v1-tax-calculation-gateway-tax-calculation.public.js","sourceRoot":"","sources":["../../../src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.public.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,YAAY,IAAI,qBAAqB,EACrC,kBAAkB,IAAI,2BAA2B,GAClD,MAAM,4EAA4E,CAAC;AAEpF,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC;AAE3D,MAAM,UAAU,YAAY,CAAC,UAAsB;IACjD,OAAO,CACL,OAOC,EACD,EAAE,CACF,qBAAqB,CACnB,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAyBD,MAAM,UAAU,kBAAkB,CAChC,UAAsB;IAEtB,OAAO,GAAG,EAAE,CACV,2BAA2B;IACzB,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAWD,OAAO,EASL,gBAAgB,GAWjB,MAAM,4EAA4E,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/** Type of jurisdiction that taxes were calculated for. For example, `"State"`, `"County"`, `"City"`, `"Special"`, etc. */
|
|
2
|
-
export var JurisdictionType;
|
|
3
|
-
(function (JurisdictionType) {
|
|
4
|
-
JurisdictionType["UNDEFINED"] = "UNDEFINED";
|
|
5
|
-
JurisdictionType["COUNTRY"] = "COUNTRY";
|
|
6
|
-
JurisdictionType["STATE"] = "STATE";
|
|
7
|
-
JurisdictionType["COUNTY"] = "COUNTY";
|
|
8
|
-
JurisdictionType["CITY"] = "CITY";
|
|
9
|
-
JurisdictionType["SPECIAL"] = "SPECIAL";
|
|
10
|
-
})(JurisdictionType || (JurisdictionType = {}));
|
|
11
|
-
//# sourceMappingURL=gateways-billing-v1-tax-calculation-gateway-tax-calculation.types.js.map
|
package/build/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gateways-billing-v1-tax-calculation-gateway-tax-calculation.types.js","sourceRoot":"","sources":["../../../src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.types.ts"],"names":[],"mappings":"AAgQA,2HAA2H;AAC3H,MAAM,CAAN,IAAY,gBAOX;AAPD,WAAY,gBAAgB;IAC1B,2CAAuB,CAAA;IACvB,uCAAmB,CAAA;IACnB,mCAAe,CAAA;IACf,qCAAiB,CAAA;IACjB,iCAAa,CAAA;IACb,uCAAmB,CAAA;AACrB,CAAC,EAPW,gBAAgB,KAAhB,gBAAgB,QAO3B"}
|