@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/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.d.ts
DELETED
|
@@ -1,480 +0,0 @@
|
|
|
1
|
-
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
|
-
export interface TaxCalculationGateway {
|
|
3
|
-
/** @format GUID */
|
|
4
|
-
_id?: string | null;
|
|
5
|
-
}
|
|
6
|
-
export interface CalculateTaxRequest {
|
|
7
|
-
/**
|
|
8
|
-
* Optional ID of the entity that tax is being calculated for. For example, a cart ID.
|
|
9
|
-
* @format GUID
|
|
10
|
-
* @immutable
|
|
11
|
-
*/
|
|
12
|
-
externalId?: string | null;
|
|
13
|
-
/**
|
|
14
|
-
* 3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
|
|
15
|
-
* @format CURRENCY
|
|
16
|
-
*/
|
|
17
|
-
currency?: string;
|
|
18
|
-
/**
|
|
19
|
-
* Array of addresses. Each line item can individually reference the address to apply with `lineItems.addressIndex`.
|
|
20
|
-
* @minSize 1
|
|
21
|
-
* @maxSize 3
|
|
22
|
-
*/
|
|
23
|
-
addresses: Address[];
|
|
24
|
-
/**
|
|
25
|
-
* Line items to calculate tax for.
|
|
26
|
-
* @minSize 1
|
|
27
|
-
* @maxSize 300
|
|
28
|
-
*/
|
|
29
|
-
lineItems: LineItem[];
|
|
30
|
-
}
|
|
31
|
-
/** Wix common address format for physical address to use if you plan to store addresses in your service. */
|
|
32
|
-
export interface Address {
|
|
33
|
-
/**
|
|
34
|
-
* 2-letter country code in [ISO-3166 alpha-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format.
|
|
35
|
-
* @format COUNTRY
|
|
36
|
-
*/
|
|
37
|
-
country?: string | null;
|
|
38
|
-
/**
|
|
39
|
-
* Subdivision (such as state, prefecture, or province) in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-2) format.
|
|
40
|
-
* @maxLength 50
|
|
41
|
-
*/
|
|
42
|
-
subdivision?: string | null;
|
|
43
|
-
/**
|
|
44
|
-
* City name.
|
|
45
|
-
* @maxLength 100
|
|
46
|
-
*/
|
|
47
|
-
city?: string | null;
|
|
48
|
-
/**
|
|
49
|
-
* Postal or zip code.
|
|
50
|
-
* @maxLength 50
|
|
51
|
-
*/
|
|
52
|
-
postalCode?: string | null;
|
|
53
|
-
/**
|
|
54
|
-
* Main address line, usually street and number as free text.
|
|
55
|
-
* @maxLength 200
|
|
56
|
-
*/
|
|
57
|
-
addressLine1?: string | null;
|
|
58
|
-
/**
|
|
59
|
-
* Free text providing more detailed address information, such as apartment, suite, or floor.
|
|
60
|
-
* @maxLength 200
|
|
61
|
-
*/
|
|
62
|
-
addressLine2?: string | null;
|
|
63
|
-
}
|
|
64
|
-
/** Line items to calculate tax for. */
|
|
65
|
-
export interface LineItem {
|
|
66
|
-
/**
|
|
67
|
-
* Line item ID.
|
|
68
|
-
* @minLength 1
|
|
69
|
-
* @maxLength 100
|
|
70
|
-
*/
|
|
71
|
-
_id?: string;
|
|
72
|
-
/**
|
|
73
|
-
* Line item name to display.
|
|
74
|
-
* @maxLength 250
|
|
75
|
-
*/
|
|
76
|
-
itemName?: string | null;
|
|
77
|
-
/**
|
|
78
|
-
* Line item quantity.
|
|
79
|
-
* @min 1
|
|
80
|
-
* @max 100000
|
|
81
|
-
*/
|
|
82
|
-
quantity?: number;
|
|
83
|
-
/**
|
|
84
|
-
* Line item price.
|
|
85
|
-
* @format DECIMAL_VALUE
|
|
86
|
-
* @decimalValue options { lte:1000000000000000 }
|
|
87
|
-
*/
|
|
88
|
-
price?: string;
|
|
89
|
-
/**
|
|
90
|
-
* Stock keeping unit for this line item. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).
|
|
91
|
-
* @maxLength 40
|
|
92
|
-
*/
|
|
93
|
-
itemCode?: string | null;
|
|
94
|
-
/**
|
|
95
|
-
* Tax group ID for this line item. If not provided, the default tax group applies.
|
|
96
|
-
* @format GUID
|
|
97
|
-
*/
|
|
98
|
-
taxGroupId?: string | null;
|
|
99
|
-
/**
|
|
100
|
-
* ID of the app providing the catalog for this line item.
|
|
101
|
-
*
|
|
102
|
-
* You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).
|
|
103
|
-
*
|
|
104
|
-
* For items from Wix catalogs, the following values always apply:
|
|
105
|
-
* + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
|
|
106
|
-
* + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
|
|
107
|
-
* + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
|
|
108
|
-
* @format GUID
|
|
109
|
-
*/
|
|
110
|
-
appId?: string | null;
|
|
111
|
-
/** Whether tax is included in the price. */
|
|
112
|
-
taxIncludedInPrice?: boolean | null;
|
|
113
|
-
/** Index of the address from `addresses` to use to calculate tax for this specific line item. The index is zero-based. */
|
|
114
|
-
addressIndex?: AddressIndex;
|
|
115
|
-
}
|
|
116
|
-
/** Index of the address from `addresses` to use to calculate tax for this specific line item. The index is zero-based. */
|
|
117
|
-
export interface AddressIndex extends AddressIndexAddressIndexOptionsOneOf {
|
|
118
|
-
/** Single address to use for a sale location when only one address is required for tax calculations. The index is zero-based. */
|
|
119
|
-
singleAddress?: number;
|
|
120
|
-
/**
|
|
121
|
-
* Multiple addresses to use for a sale. For example, some tax calculations may require both the address where an item is shipped from,
|
|
122
|
-
* as well as the address the item is shipped to.
|
|
123
|
-
*/
|
|
124
|
-
multipleAddresses?: MultipleAddresses;
|
|
125
|
-
}
|
|
126
|
-
/** @oneof */
|
|
127
|
-
export interface AddressIndexAddressIndexOptionsOneOf {
|
|
128
|
-
/** Single address to use for a sale location when only one address is required for tax calculations. The index is zero-based. */
|
|
129
|
-
singleAddress?: number;
|
|
130
|
-
/**
|
|
131
|
-
* Multiple addresses to use for a sale. For example, some tax calculations may require both the address where an item is shipped from,
|
|
132
|
-
* as well as the address the item is shipped to.
|
|
133
|
-
*/
|
|
134
|
-
multipleAddresses?: MultipleAddresses;
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Multiple addresses to use for a sale. For example, some tax calculations may require both the address where an item
|
|
138
|
-
* is shipped from, as well as the address the item is shipped to.
|
|
139
|
-
*/
|
|
140
|
-
export interface MultipleAddresses {
|
|
141
|
-
/** Index of the origin address. */
|
|
142
|
-
origin?: number;
|
|
143
|
-
/** Index of the destination address. */
|
|
144
|
-
destination?: number;
|
|
145
|
-
}
|
|
146
|
-
export interface CalculateTaxResponse {
|
|
147
|
-
/**
|
|
148
|
-
* Optional ID of the entity that tax is being calculated for. For example, a cart ID.
|
|
149
|
-
* @format GUID
|
|
150
|
-
* @immutable
|
|
151
|
-
*/
|
|
152
|
-
externalId?: string | null;
|
|
153
|
-
/**
|
|
154
|
-
* 3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
|
|
155
|
-
* @format CURRENCY
|
|
156
|
-
*/
|
|
157
|
-
currency?: string;
|
|
158
|
-
/**
|
|
159
|
-
* Array of addresses. Each line item can individually reference the address to apply with `lineItems.addressIndex`.
|
|
160
|
-
* @minSize 1
|
|
161
|
-
* @maxSize 3
|
|
162
|
-
*/
|
|
163
|
-
addresses?: Address[];
|
|
164
|
-
/** Summary of the tax calculated. */
|
|
165
|
-
taxSummary?: TaxSummary;
|
|
166
|
-
/**
|
|
167
|
-
* Details of each tax applied to each line item.
|
|
168
|
-
* @minSize 1
|
|
169
|
-
* @maxSize 300
|
|
170
|
-
*/
|
|
171
|
-
lineItemTaxDetails?: LineItemTaxDetails[];
|
|
172
|
-
/**
|
|
173
|
-
* Errors that occurred during the tax calculation.
|
|
174
|
-
* @maxSize 100
|
|
175
|
-
*/
|
|
176
|
-
errors?: ApplicationError[];
|
|
177
|
-
}
|
|
178
|
-
export interface TaxSummary {
|
|
179
|
-
/**
|
|
180
|
-
* Total price for all line items.
|
|
181
|
-
* @format DECIMAL_VALUE
|
|
182
|
-
* @decimalValue options { maxScale:4 }
|
|
183
|
-
*/
|
|
184
|
-
totalAmount?: string;
|
|
185
|
-
/**
|
|
186
|
-
* Total amount of tax calculated for all line items.
|
|
187
|
-
* Note that due to rounding, `totalTax` may not equal the sum of `lineItemTaxDetails.taxSummary.taxAmount`.
|
|
188
|
-
* @format DECIMAL_VALUE
|
|
189
|
-
* @decimalValue options { maxScale:4 }
|
|
190
|
-
*/
|
|
191
|
-
totalTax?: string;
|
|
192
|
-
/**
|
|
193
|
-
* Total taxable amount for all line items.
|
|
194
|
-
* @format DECIMAL_VALUE
|
|
195
|
-
* @decimalValue options { maxScale:4 }
|
|
196
|
-
*/
|
|
197
|
-
totalTaxableAmount?: string;
|
|
198
|
-
/**
|
|
199
|
-
* Total amount of `totalTax` that is included in price. Applies to line items with `taxIncludedInPrice` set to `true`.
|
|
200
|
-
* @format DECIMAL_VALUE
|
|
201
|
-
* @decimalValue options { maxScale:4 }
|
|
202
|
-
*/
|
|
203
|
-
totalTaxIncludedInPrice?: string;
|
|
204
|
-
/**
|
|
205
|
-
* Array of each tax applied, grouped by `"jurisdiction"`, `"jurisdictionType"`, `"taxType"`, `"taxName"` and `"rate"`.
|
|
206
|
-
* @maxSize 50
|
|
207
|
-
*/
|
|
208
|
-
aggregatedTaxBreakdown?: AggregatedTaxBreakdown[];
|
|
209
|
-
}
|
|
210
|
-
/**
|
|
211
|
-
* 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.
|
|
212
|
-
* Tax breakdown is the tax amount split to the tax authorities that applied on the line item.
|
|
213
|
-
*
|
|
214
|
-
* Note: Because that the tax is calculated only on the taxable amount, the tax amount may be looks strange.
|
|
215
|
-
* e.g. if you pay 100$ and the tax applies only on 50$ from it with tax rate of 10%,
|
|
216
|
-
* then the tax rate will be remain 10% but tax amount in the breakdown will be 5$ instead of 10$.
|
|
217
|
-
*/
|
|
218
|
-
export interface AggregatedTaxBreakdown {
|
|
219
|
-
/**
|
|
220
|
-
* Name of the tax that was calculated.
|
|
221
|
-
* @maxLength 200
|
|
222
|
-
*/
|
|
223
|
-
taxName?: string;
|
|
224
|
-
/**
|
|
225
|
-
* Type of tax that was calculated.
|
|
226
|
-
* @maxLength 200
|
|
227
|
-
*/
|
|
228
|
-
taxType?: string;
|
|
229
|
-
/**
|
|
230
|
-
* Jurisdiction that taxes were calculated for.
|
|
231
|
-
* @maxLength 200
|
|
232
|
-
*/
|
|
233
|
-
jurisdiction?: string;
|
|
234
|
-
/** Type of jurisdiction that taxes were calculated for. */
|
|
235
|
-
jurisdictionType?: JurisdictionTypeWithLiterals;
|
|
236
|
-
/**
|
|
237
|
-
* Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is `"0.1000"` and 200% tax is `"2.0000"`.
|
|
238
|
-
* @decimalValue options { gte:0, maxScale:6 }
|
|
239
|
-
*/
|
|
240
|
-
rate?: string;
|
|
241
|
-
/**
|
|
242
|
-
* Total amount of this tax for this jurisdiction.
|
|
243
|
-
* @format DECIMAL_VALUE
|
|
244
|
-
* @decimalValue options { maxScale:4 }
|
|
245
|
-
*/
|
|
246
|
-
aggregatedTaxAmount?: string;
|
|
247
|
-
}
|
|
248
|
-
/** Type of jurisdiction that taxes were calculated for. For example, `"State"`, `"County"`, `"City"`, `"Special"`, etc. */
|
|
249
|
-
export declare enum JurisdictionType {
|
|
250
|
-
UNDEFINED = "UNDEFINED",
|
|
251
|
-
COUNTRY = "COUNTRY",
|
|
252
|
-
STATE = "STATE",
|
|
253
|
-
COUNTY = "COUNTY",
|
|
254
|
-
CITY = "CITY",
|
|
255
|
-
SPECIAL = "SPECIAL"
|
|
256
|
-
}
|
|
257
|
-
/** @enumType */
|
|
258
|
-
export type JurisdictionTypeWithLiterals = JurisdictionType | 'UNDEFINED' | 'COUNTRY' | 'STATE' | 'COUNTY' | 'CITY' | 'SPECIAL';
|
|
259
|
-
/** Tax details for a specific line item. */
|
|
260
|
-
export interface LineItemTaxDetails {
|
|
261
|
-
/**
|
|
262
|
-
* Line item ID.
|
|
263
|
-
* @minLength 1
|
|
264
|
-
* @maxLength 100
|
|
265
|
-
*/
|
|
266
|
-
_id?: string;
|
|
267
|
-
/**
|
|
268
|
-
* Line item name to display.
|
|
269
|
-
* @maxLength 250
|
|
270
|
-
*/
|
|
271
|
-
itemName?: string | null;
|
|
272
|
-
/**
|
|
273
|
-
* Line item quantity.
|
|
274
|
-
* @min 1
|
|
275
|
-
* @max 100000
|
|
276
|
-
*/
|
|
277
|
-
quantity?: number;
|
|
278
|
-
/**
|
|
279
|
-
* Array of each tax applied, grouped by `jurisdiction`.
|
|
280
|
-
* @maxSize 7
|
|
281
|
-
*/
|
|
282
|
-
taxBreakdown?: TaxBreakdown[];
|
|
283
|
-
/** Summary of this line item's total price and tax. */
|
|
284
|
-
taxSummary?: LineItemTaxSummary;
|
|
285
|
-
/** Index of the address from `addresses` to use to calculate tax for this specific line item. The index is zero-based. */
|
|
286
|
-
addressIndex?: AddressIndex;
|
|
287
|
-
/** Whether tax is included in the price. */
|
|
288
|
-
taxIncludedInPrice?: boolean;
|
|
289
|
-
}
|
|
290
|
-
/** A detailed description of all the tax authorities applied on this item. */
|
|
291
|
-
export interface TaxBreakdown {
|
|
292
|
-
/**
|
|
293
|
-
* Jurisdiction that taxes were calculated for.
|
|
294
|
-
* @maxLength 200
|
|
295
|
-
*/
|
|
296
|
-
jurisdiction?: string | null;
|
|
297
|
-
/**
|
|
298
|
-
* Non-taxable amount of the price.
|
|
299
|
-
* @format DECIMAL_VALUE
|
|
300
|
-
* @decimalValue options { maxScale:4, gte:0 }
|
|
301
|
-
*/
|
|
302
|
-
nonTaxableAmount?: string | null;
|
|
303
|
-
/**
|
|
304
|
-
* Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is `"0.1000"` and 200% tax is `"2.0000"`.
|
|
305
|
-
* @format DECIMAL_VALUE
|
|
306
|
-
* @decimalValue options { maxScale:6, gte:0 }
|
|
307
|
-
*/
|
|
308
|
-
rate?: string | null;
|
|
309
|
-
/**
|
|
310
|
-
* Amount of this tax calculated for this jurisdiction.
|
|
311
|
-
* @format DECIMAL_VALUE
|
|
312
|
-
* @decimalValue options { maxScale:4 }
|
|
313
|
-
*/
|
|
314
|
-
taxAmount?: string | null;
|
|
315
|
-
/**
|
|
316
|
-
* Taxable amount of the price.
|
|
317
|
-
* @format DECIMAL_VALUE
|
|
318
|
-
* @decimalValue options { maxScale:4, gte:0 }
|
|
319
|
-
*/
|
|
320
|
-
taxableAmount?: string | null;
|
|
321
|
-
/**
|
|
322
|
-
* Type of tax that was calculated. For example, `"Sales Tax"`, `"Income Tax"`, `"Value Added Tax"`, etc.
|
|
323
|
-
* @maxLength 200
|
|
324
|
-
*/
|
|
325
|
-
taxType?: string | null;
|
|
326
|
-
/**
|
|
327
|
-
* Name of the tax that was calculated. For example, `"NY State Sales Tax"`, `"Quebec GST"`, etc.
|
|
328
|
-
* @maxLength 200
|
|
329
|
-
*/
|
|
330
|
-
taxName?: string | null;
|
|
331
|
-
/** Type of jurisdiction that taxes were calculated for. For example, `"State"`, `"Çounty"`, `"City"`, `"Special"`, etc. */
|
|
332
|
-
jurisdictionType?: JurisdictionTypeWithLiterals;
|
|
333
|
-
}
|
|
334
|
-
export interface LineItemTaxSummary {
|
|
335
|
-
/**
|
|
336
|
-
* Total price for this line item.
|
|
337
|
-
* To determine the price for each individual unit of this line item, divide by `quantity`.
|
|
338
|
-
* @format DECIMAL_VALUE
|
|
339
|
-
* @decimalValue options { lte:1000000000000000 }
|
|
340
|
-
*/
|
|
341
|
-
fullPrice?: string | null;
|
|
342
|
-
/**
|
|
343
|
-
* Total amount of tax calculated for this line item.
|
|
344
|
-
* @format DECIMAL_VALUE
|
|
345
|
-
* @decimalValue options { maxScale:4 }
|
|
346
|
-
*/
|
|
347
|
-
taxAmount?: string;
|
|
348
|
-
/**
|
|
349
|
-
* Total taxable amount for this line item.
|
|
350
|
-
* @format DECIMAL_VALUE
|
|
351
|
-
* @decimalValue options { maxScale:4 }
|
|
352
|
-
*/
|
|
353
|
-
taxableAmount?: string;
|
|
354
|
-
/**
|
|
355
|
-
* ID of the calculator app that calculated tax for this line item.
|
|
356
|
-
* @maxLength 50
|
|
357
|
-
*/
|
|
358
|
-
appId?: string | null;
|
|
359
|
-
}
|
|
360
|
-
export interface ApplicationError {
|
|
361
|
-
/** Error code. */
|
|
362
|
-
code?: string;
|
|
363
|
-
/** Description of the error. */
|
|
364
|
-
description?: string;
|
|
365
|
-
/** Data related to the error. */
|
|
366
|
-
data?: Record<string, any> | null;
|
|
367
|
-
}
|
|
368
|
-
export interface ListTaxCalculatorsRequest {
|
|
369
|
-
}
|
|
370
|
-
export interface ListTaxCalculatorsResponse {
|
|
371
|
-
/**
|
|
372
|
-
* Retrieved tax calculators.
|
|
373
|
-
* @maxSize 10
|
|
374
|
-
*/
|
|
375
|
-
taxCalculatorDetails?: TaxCalculatorDetails[];
|
|
376
|
-
}
|
|
377
|
-
export interface TaxCalculatorDetails {
|
|
378
|
-
/**
|
|
379
|
-
* ID of the tax calculator.
|
|
380
|
-
* @format GUID
|
|
381
|
-
*/
|
|
382
|
-
appId?: string;
|
|
383
|
-
/**
|
|
384
|
-
* Display name of the tax calculator.
|
|
385
|
-
* @minLength 1
|
|
386
|
-
* @maxLength 200
|
|
387
|
-
*/
|
|
388
|
-
displayName?: string;
|
|
389
|
-
/**
|
|
390
|
-
* List of countries, in [ISO-3166 alpha-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format, that the calculator does not support.
|
|
391
|
-
* @format COUNTRY
|
|
392
|
-
* @maxSize 195
|
|
393
|
-
*/
|
|
394
|
-
unsupportedCountries?: string[];
|
|
395
|
-
}
|
|
396
|
-
/**
|
|
397
|
-
* Calculates tax for the provided line items.
|
|
398
|
-
*
|
|
399
|
-
* Tax is calculated for each line item based on the tax region
|
|
400
|
-
* that corresponds to the address provided in `lineItems.addressIndex` and the tax group in `taxGroupId`. If no tax region is found for
|
|
401
|
-
* 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
|
|
402
|
-
* default tax group is used to calculate tax. Call List Default Tax Groups to retrieve a site's default tax groups.
|
|
403
|
-
*
|
|
404
|
-
* The tax is calculated by a tax calculator app installed on the site.
|
|
405
|
-
* Call List Tax Calculators to see which tax calculators are available.
|
|
406
|
-
* To provide your own tax calculations, use the Tax Calculation service plugin.
|
|
407
|
-
*
|
|
408
|
-
* The breakdown of calculated tax returned, includes:
|
|
409
|
-
* + `taxSummary`: The overall total tax calculated.
|
|
410
|
-
* + `taxSummary.aggregatedTaxBreakdown`: The total tax calculated for each jurisdiction.
|
|
411
|
-
* + `lineItemTaxDetails.taxSummary`: The total tax calculated for each line item.
|
|
412
|
-
* + `lineItemTaxDetails.taxBreakdown`: The tax calculated for each line item in each jurisdiction.
|
|
413
|
-
* @public
|
|
414
|
-
* @documentationMaturity preview
|
|
415
|
-
* @requiredField options.addresses
|
|
416
|
-
* @requiredField options.lineItems
|
|
417
|
-
* @requiredField options.lineItems._id
|
|
418
|
-
* @requiredField options.lineItems.addressIndex
|
|
419
|
-
* @requiredField options.lineItems.price
|
|
420
|
-
* @param options - Calculate tax options.
|
|
421
|
-
* @permissionId BILLING.CALCULATE_TAX
|
|
422
|
-
* @permissionScope Manage Stores - all permissions
|
|
423
|
-
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
424
|
-
* @permissionScope Manage Stores
|
|
425
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
426
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
427
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
428
|
-
* @permissionScope Manage eCommerce - all permissions
|
|
429
|
-
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
430
|
-
* @permissionScope Manage Orders
|
|
431
|
-
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
432
|
-
* @applicableIdentity APP
|
|
433
|
-
* @applicableIdentity VISITOR
|
|
434
|
-
* @fqn wix.billing.v1.TaxCalculation.CalculateTax
|
|
435
|
-
*/
|
|
436
|
-
export declare function calculateTax(options?: NonNullablePaths<CalculateTaxOptions, `addresses` | `lineItems` | `lineItems.${number}._id` | `lineItems.${number}.addressIndex` | `lineItems.${number}.price`>): Promise<NonNullablePaths<CalculateTaxResponse, `currency` | `addresses` | `taxSummary.totalAmount` | `taxSummary.totalTax` | `taxSummary.totalTaxableAmount` | `taxSummary.totalTaxIncludedInPrice` | `taxSummary.aggregatedTaxBreakdown` | `taxSummary.aggregatedTaxBreakdown.${number}.taxName` | `taxSummary.aggregatedTaxBreakdown.${number}.taxType` | `taxSummary.aggregatedTaxBreakdown.${number}.jurisdiction` | `taxSummary.aggregatedTaxBreakdown.${number}.jurisdictionType` | `taxSummary.aggregatedTaxBreakdown.${number}.rate` | `taxSummary.aggregatedTaxBreakdown.${number}.aggregatedTaxAmount` | `lineItemTaxDetails` | `lineItemTaxDetails.${number}._id` | `lineItemTaxDetails.${number}.quantity` | `lineItemTaxDetails.${number}.taxSummary.taxAmount` | `lineItemTaxDetails.${number}.taxSummary.taxableAmount` | `lineItemTaxDetails.${number}.addressIndex.singleAddress` | `lineItemTaxDetails.${number}.addressIndex.multipleAddresses.origin` | `lineItemTaxDetails.${number}.addressIndex.multipleAddresses.destination` | `lineItemTaxDetails.${number}.taxIncludedInPrice` | `errors` | `errors.${number}.code` | `errors.${number}.description`>>;
|
|
437
|
-
export interface CalculateTaxOptions {
|
|
438
|
-
/**
|
|
439
|
-
* Optional ID of the entity that tax is being calculated for. For example, a cart ID.
|
|
440
|
-
* @format GUID
|
|
441
|
-
* @immutable
|
|
442
|
-
*/
|
|
443
|
-
externalId?: string | null;
|
|
444
|
-
/**
|
|
445
|
-
* 3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
|
|
446
|
-
* @format CURRENCY
|
|
447
|
-
*/
|
|
448
|
-
currency?: string;
|
|
449
|
-
/**
|
|
450
|
-
* Array of addresses. Each line item can individually reference the address to apply with `lineItems.addressIndex`.
|
|
451
|
-
* @minSize 1
|
|
452
|
-
* @maxSize 3
|
|
453
|
-
*/
|
|
454
|
-
addresses: Address[];
|
|
455
|
-
/**
|
|
456
|
-
* Line items to calculate tax for.
|
|
457
|
-
* @minSize 1
|
|
458
|
-
* @maxSize 300
|
|
459
|
-
*/
|
|
460
|
-
lineItems: LineItem[];
|
|
461
|
-
}
|
|
462
|
-
/**
|
|
463
|
-
* Retrieves a list of installed tax calculators.
|
|
464
|
-
*
|
|
465
|
-
* Wix uses these calculators to calculate tax.
|
|
466
|
-
* @public
|
|
467
|
-
* @documentationMaturity preview
|
|
468
|
-
* @permissionId BILLING.TAX_CALCULATORS_READ
|
|
469
|
-
* @permissionScope Manage Stores - all permissions
|
|
470
|
-
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
471
|
-
* @permissionScope Manage Stores
|
|
472
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
473
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
474
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
475
|
-
* @permissionScope Manage Orders
|
|
476
|
-
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
477
|
-
* @applicableIdentity APP
|
|
478
|
-
* @fqn wix.billing.v1.TaxCalculation.ListTaxCalculators
|
|
479
|
-
*/
|
|
480
|
-
export declare function listTaxCalculators(): Promise<NonNullablePaths<ListTaxCalculatorsResponse, `taxCalculatorDetails` | `taxCalculatorDetails.${number}.appId` | `taxCalculatorDetails.${number}.displayName`>>;
|
package/build/es/src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.js
DELETED
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';
|
|
2
|
-
import { renameKeysFromSDKRequestToRESTRequest, renameKeysFromRESTResponseToSDKResponse, } from '@wix/sdk-runtime/rename-all-nested-keys';
|
|
3
|
-
import * as ambassadorWixGatewaysBillingV1TaxCalculationGateway from './gateways-billing-v1-tax-calculation-gateway-tax-calculation.http.js';
|
|
4
|
-
import { transformSDKAddressToRESTAddress } from '@wix/sdk-runtime/transformations/address';
|
|
5
|
-
import { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';
|
|
6
|
-
import { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';
|
|
7
|
-
/** Type of jurisdiction that taxes were calculated for. For example, `"State"`, `"County"`, `"City"`, `"Special"`, etc. */
|
|
8
|
-
export var JurisdictionType;
|
|
9
|
-
(function (JurisdictionType) {
|
|
10
|
-
JurisdictionType["UNDEFINED"] = "UNDEFINED";
|
|
11
|
-
JurisdictionType["COUNTRY"] = "COUNTRY";
|
|
12
|
-
JurisdictionType["STATE"] = "STATE";
|
|
13
|
-
JurisdictionType["COUNTY"] = "COUNTY";
|
|
14
|
-
JurisdictionType["CITY"] = "CITY";
|
|
15
|
-
JurisdictionType["SPECIAL"] = "SPECIAL";
|
|
16
|
-
})(JurisdictionType || (JurisdictionType = {}));
|
|
17
|
-
/**
|
|
18
|
-
* Calculates tax for the provided line items.
|
|
19
|
-
*
|
|
20
|
-
* Tax is calculated for each line item based on the tax region
|
|
21
|
-
* that corresponds to the address provided in `lineItems.addressIndex` and the tax group in `taxGroupId`. If no tax region is found for
|
|
22
|
-
* 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
|
|
23
|
-
* default tax group is used to calculate tax. Call List Default Tax Groups to retrieve a site's default tax groups.
|
|
24
|
-
*
|
|
25
|
-
* The tax is calculated by a tax calculator app installed on the site.
|
|
26
|
-
* Call List Tax Calculators to see which tax calculators are available.
|
|
27
|
-
* To provide your own tax calculations, use the Tax Calculation service plugin.
|
|
28
|
-
*
|
|
29
|
-
* The breakdown of calculated tax returned, includes:
|
|
30
|
-
* + `taxSummary`: The overall total tax calculated.
|
|
31
|
-
* + `taxSummary.aggregatedTaxBreakdown`: The total tax calculated for each jurisdiction.
|
|
32
|
-
* + `lineItemTaxDetails.taxSummary`: The total tax calculated for each line item.
|
|
33
|
-
* + `lineItemTaxDetails.taxBreakdown`: The tax calculated for each line item in each jurisdiction.
|
|
34
|
-
* @public
|
|
35
|
-
* @documentationMaturity preview
|
|
36
|
-
* @requiredField options.addresses
|
|
37
|
-
* @requiredField options.lineItems
|
|
38
|
-
* @requiredField options.lineItems._id
|
|
39
|
-
* @requiredField options.lineItems.addressIndex
|
|
40
|
-
* @requiredField options.lineItems.price
|
|
41
|
-
* @param options - Calculate tax options.
|
|
42
|
-
* @permissionId BILLING.CALCULATE_TAX
|
|
43
|
-
* @permissionScope Manage Stores - all permissions
|
|
44
|
-
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
45
|
-
* @permissionScope Manage Stores
|
|
46
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
47
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
48
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
49
|
-
* @permissionScope Manage eCommerce - all permissions
|
|
50
|
-
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
51
|
-
* @permissionScope Manage Orders
|
|
52
|
-
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
53
|
-
* @applicableIdentity APP
|
|
54
|
-
* @applicableIdentity VISITOR
|
|
55
|
-
* @fqn wix.billing.v1.TaxCalculation.CalculateTax
|
|
56
|
-
*/
|
|
57
|
-
export async function calculateTax(options) {
|
|
58
|
-
// @ts-ignore
|
|
59
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
60
|
-
const payload = transformPaths(renameKeysFromSDKRequestToRESTRequest({
|
|
61
|
-
externalId: options?.externalId,
|
|
62
|
-
currency: options?.currency,
|
|
63
|
-
addresses: options?.addresses,
|
|
64
|
-
lineItems: options?.lineItems,
|
|
65
|
-
}), [
|
|
66
|
-
{
|
|
67
|
-
transformFn: transformSDKAddressToRESTAddress,
|
|
68
|
-
paths: [{ path: 'addresses', isRepeated: true }],
|
|
69
|
-
},
|
|
70
|
-
]);
|
|
71
|
-
const reqOpts = ambassadorWixGatewaysBillingV1TaxCalculationGateway.calculateTax(payload);
|
|
72
|
-
sideEffects?.onSiteCall?.();
|
|
73
|
-
try {
|
|
74
|
-
const result = await httpClient.request(reqOpts);
|
|
75
|
-
sideEffects?.onSuccess?.(result);
|
|
76
|
-
return renameKeysFromRESTResponseToSDKResponse(transformPaths(result.data, [
|
|
77
|
-
{
|
|
78
|
-
transformFn: transformRESTAddressToSDKAddress,
|
|
79
|
-
paths: [{ path: 'addresses', isRepeated: true }],
|
|
80
|
-
},
|
|
81
|
-
]));
|
|
82
|
-
}
|
|
83
|
-
catch (err) {
|
|
84
|
-
const transformedError = sdkTransformError(err, {
|
|
85
|
-
spreadPathsToArguments: {},
|
|
86
|
-
explicitPathsToArguments: {
|
|
87
|
-
externalId: '$[0].externalId',
|
|
88
|
-
currency: '$[0].currency',
|
|
89
|
-
addresses: '$[0].addresses',
|
|
90
|
-
lineItems: '$[0].lineItems',
|
|
91
|
-
},
|
|
92
|
-
singleArgumentUnchanged: false,
|
|
93
|
-
}, ['options']);
|
|
94
|
-
sideEffects?.onError?.(err);
|
|
95
|
-
throw transformedError;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Retrieves a list of installed tax calculators.
|
|
100
|
-
*
|
|
101
|
-
* Wix uses these calculators to calculate tax.
|
|
102
|
-
* @public
|
|
103
|
-
* @documentationMaturity preview
|
|
104
|
-
* @permissionId BILLING.TAX_CALCULATORS_READ
|
|
105
|
-
* @permissionScope Manage Stores - all permissions
|
|
106
|
-
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
107
|
-
* @permissionScope Manage Stores
|
|
108
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
109
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
110
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
111
|
-
* @permissionScope Manage Orders
|
|
112
|
-
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
113
|
-
* @applicableIdentity APP
|
|
114
|
-
* @fqn wix.billing.v1.TaxCalculation.ListTaxCalculators
|
|
115
|
-
*/
|
|
116
|
-
export async function listTaxCalculators() {
|
|
117
|
-
// @ts-ignore
|
|
118
|
-
const { httpClient, sideEffects } = arguments[0];
|
|
119
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({});
|
|
120
|
-
const reqOpts = ambassadorWixGatewaysBillingV1TaxCalculationGateway.listTaxCalculators(payload);
|
|
121
|
-
sideEffects?.onSiteCall?.();
|
|
122
|
-
try {
|
|
123
|
-
const result = await httpClient.request(reqOpts);
|
|
124
|
-
sideEffects?.onSuccess?.(result);
|
|
125
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
126
|
-
}
|
|
127
|
-
catch (err) {
|
|
128
|
-
const transformedError = sdkTransformError(err, {
|
|
129
|
-
spreadPathsToArguments: {},
|
|
130
|
-
explicitPathsToArguments: {},
|
|
131
|
-
singleArgumentUnchanged: false,
|
|
132
|
-
}, []);
|
|
133
|
-
sideEffects?.onError?.(err);
|
|
134
|
-
throw transformedError;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
//# sourceMappingURL=gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.js.map
|
package/build/es/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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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.js';
|
|
@@ -1,18 +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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.js"), exports);
|
|
18
|
-
//# sourceMappingURL=index.typings.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.typings.js","sourceRoot":"","sources":["../../../index.typings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iHAA+F"}
|
|
@@ -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,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.JurisdictionType = exports.listTaxCalculators = exports.calculateTax = void 0;
|
|
4
|
-
const gateways_billing_v1_tax_calculation_gateway_tax_calculation_public_js_1 = require("./gateways-billing-v1-tax-calculation-gateway-tax-calculation.public.js");
|
|
5
|
-
const rest_modules_1 = require("@wix/sdk-runtime/rest-modules");
|
|
6
|
-
exports.calculateTax = (0, rest_modules_1.createRESTModule)(gateways_billing_v1_tax_calculation_gateway_tax_calculation_public_js_1.calculateTax);
|
|
7
|
-
exports.listTaxCalculators = (0, rest_modules_1.createRESTModule)(gateways_billing_v1_tax_calculation_gateway_tax_calculation_public_js_1.listTaxCalculators);
|
|
8
|
-
var gateways_billing_v1_tax_calculation_gateway_tax_calculation_universal_js_1 = require("./gateways-billing-v1-tax-calculation-gateway-tax-calculation.universal.js");
|
|
9
|
-
Object.defineProperty(exports, "JurisdictionType", { enumerable: true, get: function () { return gateways_billing_v1_tax_calculation_gateway_tax_calculation_universal_js_1.JurisdictionType; } });
|
|
10
|
-
//# sourceMappingURL=gateways-billing-v1-tax-calculation-gateway-tax-calculation.context.js.map
|
|
@@ -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,mKAGiF;AACjF,gEAAiE;AAGpD,QAAA,YAAY,GAEP,IAAA,+BAAgB,EAAC,oFAAkB,CAAC,CAAC;AAC1C,QAAA,kBAAkB,GAGb,IAAA,+BAAgB,EAAC,0FAAwB,CAAC,CAAC;AAE7D,uKAA8G;AAArG,4KAAA,gBAAgB,OAAA"}
|