@augno/sdk 0.17.0 → 0.18.0
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/CHANGELOG.md +7 -3
- package/package.json +1 -1
- package/resources/finance/payment-terms.d.mts +5 -5
- package/resources/finance/payment-terms.d.mts.map +1 -1
- package/resources/finance/payment-terms.d.ts +5 -5
- package/resources/finance/payment-terms.d.ts.map +1 -1
- package/resources/finance/payment-terms.js.map +1 -1
- package/resources/finance/payment-terms.mjs.map +1 -1
- package/resources/operations/carriers/carriers.d.mts +5 -5
- package/resources/operations/carriers/carriers.d.mts.map +1 -1
- package/resources/operations/carriers/carriers.d.ts +5 -5
- package/resources/operations/carriers/carriers.d.ts.map +1 -1
- package/resources/operations/carriers/service-levels.d.mts +5 -5
- package/resources/operations/carriers/service-levels.d.mts.map +1 -1
- package/resources/operations/carriers/service-levels.d.ts +5 -5
- package/resources/operations/carriers/service-levels.d.ts.map +1 -1
- package/resources/operations/shipments/actions.d.mts +3 -3
- package/resources/operations/shipments/actions.d.mts.map +1 -1
- package/resources/operations/shipments/actions.d.ts +3 -3
- package/resources/operations/shipments/actions.d.ts.map +1 -1
- package/resources/operations/shipping-terms.d.mts +5 -5
- package/resources/operations/shipping-terms.d.mts.map +1 -1
- package/resources/operations/shipping-terms.d.ts +5 -5
- package/resources/operations/shipping-terms.d.ts.map +1 -1
- package/resources/operations/shipping-terms.js.map +1 -1
- package/resources/operations/shipping-terms.mjs.map +1 -1
- package/resources/sales/account-prices/account-prices.d.mts +999 -0
- package/resources/sales/account-prices/account-prices.d.mts.map +1 -0
- package/resources/sales/account-prices/account-prices.d.ts +999 -0
- package/resources/sales/account-prices/account-prices.d.ts.map +1 -0
- package/resources/sales/account-prices/account-prices.js +143 -0
- package/resources/sales/account-prices/account-prices.js.map +1 -0
- package/resources/sales/account-prices/account-prices.mjs +138 -0
- package/resources/sales/account-prices/account-prices.mjs.map +1 -0
- package/resources/sales/account-prices/actions.d.mts +58 -0
- package/resources/sales/account-prices/actions.d.mts.map +1 -0
- package/resources/sales/account-prices/actions.d.ts +58 -0
- package/resources/sales/account-prices/actions.d.ts.map +1 -0
- package/resources/sales/account-prices/actions.js +44 -0
- package/resources/sales/account-prices/actions.js.map +1 -0
- package/resources/sales/account-prices/actions.mjs +40 -0
- package/resources/sales/account-prices/actions.mjs.map +1 -0
- package/resources/sales/account-prices/index.d.mts +3 -0
- package/resources/sales/account-prices/index.d.mts.map +1 -0
- package/resources/sales/account-prices/index.d.ts +3 -0
- package/resources/sales/account-prices/index.d.ts.map +1 -0
- package/resources/sales/account-prices/index.js +9 -0
- package/resources/sales/account-prices/index.js.map +1 -0
- package/resources/sales/account-prices/index.mjs +4 -0
- package/resources/sales/account-prices/index.mjs.map +1 -0
- package/resources/sales/account-prices.d.mts +2 -0
- package/resources/sales/account-prices.d.mts.map +1 -0
- package/resources/sales/account-prices.d.ts +2 -0
- package/resources/sales/account-prices.d.ts.map +1 -0
- package/resources/sales/account-prices.js +6 -0
- package/resources/sales/account-prices.js.map +1 -0
- package/resources/sales/account-prices.mjs +3 -0
- package/resources/sales/account-prices.mjs.map +1 -0
- package/resources/sales/customers/actions.d.mts +2 -2
- package/resources/sales/customers/actions.d.mts.map +1 -1
- package/resources/sales/customers/actions.d.ts +2 -2
- package/resources/sales/customers/actions.d.ts.map +1 -1
- package/resources/sales/customers/actions.js.map +1 -1
- package/resources/sales/customers/actions.mjs.map +1 -1
- package/resources/sales/customers/customers.d.mts +6 -564
- package/resources/sales/customers/customers.d.mts.map +1 -1
- package/resources/sales/customers/customers.d.ts +6 -564
- package/resources/sales/customers/customers.d.ts.map +1 -1
- package/resources/sales/customers/customers.js.map +1 -1
- package/resources/sales/customers/customers.mjs.map +1 -1
- package/resources/sales/customers/index.d.mts +1 -1
- package/resources/sales/customers/index.d.mts.map +1 -1
- package/resources/sales/customers/index.d.ts +1 -1
- package/resources/sales/customers/index.d.ts.map +1 -1
- package/resources/sales/customers/index.js.map +1 -1
- package/resources/sales/customers/index.mjs.map +1 -1
- package/resources/sales/index.d.mts +6 -3
- package/resources/sales/index.d.mts.map +1 -1
- package/resources/sales/index.d.ts +6 -3
- package/resources/sales/index.d.ts.map +1 -1
- package/resources/sales/index.js +15 -9
- package/resources/sales/index.js.map +1 -1
- package/resources/sales/index.mjs +3 -0
- package/resources/sales/index.mjs.map +1 -1
- package/resources/sales/order-discounts/actions.d.mts +85 -0
- package/resources/sales/order-discounts/actions.d.mts.map +1 -0
- package/resources/sales/order-discounts/actions.d.ts +85 -0
- package/resources/sales/order-discounts/actions.d.ts.map +1 -0
- package/resources/sales/order-discounts/actions.js +35 -0
- package/resources/sales/order-discounts/actions.js.map +1 -0
- package/resources/sales/order-discounts/actions.mjs +31 -0
- package/resources/sales/order-discounts/actions.mjs.map +1 -0
- package/resources/sales/order-discounts/index.d.mts +3 -0
- package/resources/sales/order-discounts/index.d.mts.map +1 -0
- package/resources/sales/order-discounts/index.d.ts +3 -0
- package/resources/sales/order-discounts/index.d.ts.map +1 -0
- package/resources/sales/order-discounts/index.js +9 -0
- package/resources/sales/order-discounts/index.js.map +1 -0
- package/resources/sales/order-discounts/index.mjs +4 -0
- package/resources/sales/order-discounts/index.mjs.map +1 -0
- package/resources/sales/order-discounts/order-discounts.d.mts +365 -0
- package/resources/sales/order-discounts/order-discounts.d.mts.map +1 -0
- package/resources/sales/order-discounts/order-discounts.d.ts +365 -0
- package/resources/sales/order-discounts/order-discounts.d.ts.map +1 -0
- package/resources/sales/order-discounts/order-discounts.js +125 -0
- package/resources/sales/order-discounts/order-discounts.js.map +1 -0
- package/resources/sales/order-discounts/order-discounts.mjs +120 -0
- package/resources/sales/order-discounts/order-discounts.mjs.map +1 -0
- package/resources/sales/order-discounts.d.mts +2 -0
- package/resources/sales/order-discounts.d.mts.map +1 -0
- package/resources/sales/order-discounts.d.ts +2 -0
- package/resources/sales/order-discounts.d.ts.map +1 -0
- package/resources/sales/order-discounts.js +6 -0
- package/resources/sales/order-discounts.js.map +1 -0
- package/resources/sales/order-discounts.mjs +3 -0
- package/resources/sales/order-discounts.mjs.map +1 -0
- package/resources/sales/priorities.d.mts +4 -44
- package/resources/sales/priorities.d.mts.map +1 -1
- package/resources/sales/priorities.d.ts +4 -44
- package/resources/sales/priorities.d.ts.map +1 -1
- package/resources/sales/priorities.js.map +1 -1
- package/resources/sales/priorities.mjs.map +1 -1
- package/resources/sales/sales-orders/index.d.mts +1 -1
- package/resources/sales/sales-orders/index.d.mts.map +1 -1
- package/resources/sales/sales-orders/index.d.ts +1 -1
- package/resources/sales/sales-orders/index.d.ts.map +1 -1
- package/resources/sales/sales-orders/index.js.map +1 -1
- package/resources/sales/sales-orders/index.mjs.map +1 -1
- package/resources/sales/sales-orders/lines/lines.d.mts +2 -2
- package/resources/sales/sales-orders/lines/lines.d.mts.map +1 -1
- package/resources/sales/sales-orders/lines/lines.d.ts +2 -2
- package/resources/sales/sales-orders/lines/lines.d.ts.map +1 -1
- package/resources/sales/sales-orders/sales-orders.d.mts +10 -69
- package/resources/sales/sales-orders/sales-orders.d.mts.map +1 -1
- package/resources/sales/sales-orders/sales-orders.d.ts +10 -69
- package/resources/sales/sales-orders/sales-orders.d.ts.map +1 -1
- package/resources/sales/sales-orders/sales-orders.js.map +1 -1
- package/resources/sales/sales-orders/sales-orders.mjs.map +1 -1
- package/resources/sales/sales.d.mts +18 -6
- package/resources/sales/sales.d.mts.map +1 -1
- package/resources/sales/sales.d.ts +18 -6
- package/resources/sales/sales.d.ts.map +1 -1
- package/resources/sales/sales.js +12 -0
- package/resources/sales/sales.js.map +1 -1
- package/resources/sales/sales.mjs +12 -0
- package/resources/sales/sales.mjs.map +1 -1
- package/resources/sales/volume-discounts.d.mts +684 -0
- package/resources/sales/volume-discounts.d.mts.map +1 -0
- package/resources/sales/volume-discounts.d.ts +684 -0
- package/resources/sales/volume-discounts.d.ts.map +1 -0
- package/resources/sales/volume-discounts.js +152 -0
- package/resources/sales/volume-discounts.js.map +1 -0
- package/resources/sales/volume-discounts.mjs +148 -0
- package/resources/sales/volume-discounts.mjs.map +1 -0
- package/src/resources/finance/payment-terms.ts +8 -5
- package/src/resources/operations/carriers/carriers.ts +5 -5
- package/src/resources/operations/carriers/service-levels.ts +5 -5
- package/src/resources/operations/shipments/actions.ts +3 -3
- package/src/resources/operations/shipping-terms.ts +8 -5
- package/src/resources/sales/account-prices/account-prices.ts +1191 -0
- package/src/resources/sales/account-prices/actions.ts +74 -0
- package/src/resources/sales/account-prices/index.ts +27 -0
- package/src/resources/sales/account-prices.ts +3 -0
- package/src/resources/sales/customers/actions.ts +6 -2
- package/src/resources/sales/customers/customers.ts +5 -658
- package/src/resources/sales/customers/index.ts +0 -11
- package/src/resources/sales/index.ts +50 -13
- package/src/resources/sales/order-discounts/actions.ts +102 -0
- package/src/resources/sales/order-discounts/index.ts +13 -0
- package/src/resources/sales/order-discounts/order-discounts.ts +442 -0
- package/src/resources/sales/order-discounts.ts +3 -0
- package/src/resources/sales/priorities.ts +3 -51
- package/src/resources/sales/sales-orders/index.ts +0 -1
- package/src/resources/sales/sales-orders/lines/lines.ts +2 -2
- package/src/resources/sales/sales-orders/sales-orders.ts +9 -79
- package/src/resources/sales/sales.ts +113 -26
- package/src/resources/sales/volume-discounts.ts +813 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,999 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.js";
|
|
2
|
+
import * as BlocksAPI from "../../messaging/blocks.js";
|
|
3
|
+
import * as AccountGroupsAPI from "../account-groups.js";
|
|
4
|
+
import * as APIKeysAPI from "../../auth/api-keys/api-keys.js";
|
|
5
|
+
import * as ItemCategoriesAPI from "../../catalog/item-categories/item-categories.js";
|
|
6
|
+
import * as ItemsAPI from "../../catalog/items/items.js";
|
|
7
|
+
import * as MaterialsAPI from "../../catalog/materials/materials.js";
|
|
8
|
+
import * as ProductLinesAPI from "../../catalog/product-lines/product-lines.js";
|
|
9
|
+
import * as PropertiesAPI from "../../catalog/properties/properties.js";
|
|
10
|
+
import * as ActionsAPI from "./actions.js";
|
|
11
|
+
import { ActionExportPriceListParams, Actions, ExportPriceListRequest } from "./actions.js";
|
|
12
|
+
import { APIPromise } from "../../../core/api-promise.js";
|
|
13
|
+
import { RequestOptions } from "../../../internal/request-options.js";
|
|
14
|
+
/**
|
|
15
|
+
* List and manage account prices.
|
|
16
|
+
*/
|
|
17
|
+
export declare class AccountPrices extends APIResource {
|
|
18
|
+
actions: ActionsAPI.Actions;
|
|
19
|
+
/**
|
|
20
|
+
* Returns a paginated list of account prices, newest first.
|
|
21
|
+
*
|
|
22
|
+
* The search term matches the recipient customer's name or their customer number.
|
|
23
|
+
* Customer portal users always see only the prices that apply to their own
|
|
24
|
+
* account, whatever `recipient_account_id` is set to.
|
|
25
|
+
*
|
|
26
|
+
* This endpoint requires the permissions: `discounts:read`, `customers:read`,
|
|
27
|
+
* `suppliers:read`.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const listAccountPrice =
|
|
32
|
+
* await client.sales.accountPrices.list();
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
list(query?: AccountPriceListParams | null | undefined, options?: RequestOptions): APIPromise<ListAccountPrice>;
|
|
36
|
+
/**
|
|
37
|
+
* Returns an account price by ID.
|
|
38
|
+
*
|
|
39
|
+
* A customer portal user can only retrieve a price whose recipient is their own
|
|
40
|
+
* account or its parent; any other price is reported as not found.
|
|
41
|
+
*
|
|
42
|
+
* This endpoint requires the permissions: `discounts:read`, `customers:read`,
|
|
43
|
+
* `suppliers:read`.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const accountPrice =
|
|
48
|
+
* await client.sales.accountPrices.retrieve(
|
|
49
|
+
* 'acpr_7l4j483kf32p',
|
|
50
|
+
* );
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
retrieve(id: string, query?: AccountPriceRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<AccountPrice>;
|
|
54
|
+
/**
|
|
55
|
+
* Creates a customer-specific price for a product line.
|
|
56
|
+
*
|
|
57
|
+
* When a sales order line for the recipient matches the price's product line and
|
|
58
|
+
* attributes, this price replaces the unit price the line would otherwise be
|
|
59
|
+
* given, including the effect of any volume discount. If more than one account
|
|
60
|
+
* price matches a line, the most recently created one wins.
|
|
61
|
+
*
|
|
62
|
+
* This endpoint requires the permission: `discounts:create`.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```ts
|
|
66
|
+
* const accountPrice =
|
|
67
|
+
* await client.sales.accountPrices.create({
|
|
68
|
+
* product_line_id: 'pdln_k9bnlgvxhxjh',
|
|
69
|
+
* rate: {
|
|
70
|
+
* value: '25.50',
|
|
71
|
+
* numerator_unit_id: 'un_82bd37dae5po',
|
|
72
|
+
* denominator_unit_id: 'un_82bd37dae5po',
|
|
73
|
+
* },
|
|
74
|
+
* recipient_account_id: 'ac_ykxoradjoeb3',
|
|
75
|
+
* attribute_ids: ['at_rf1w295jt5ia'],
|
|
76
|
+
* category_ids: ['ic_d06g9c6yc9ck'],
|
|
77
|
+
* });
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
create(params: AccountPriceCreateParams, options?: RequestOptions): APIPromise<AccountPrice>;
|
|
81
|
+
/**
|
|
82
|
+
* Partially updates an account price.
|
|
83
|
+
*
|
|
84
|
+
* Only the provided fields are changed. If `category_ids` or `attribute_ids` are
|
|
85
|
+
* provided, they replace the existing set entirely.
|
|
86
|
+
*
|
|
87
|
+
* Order lines that have already been priced keep the unit price they were given;
|
|
88
|
+
* the new price applies to lines priced after the change.
|
|
89
|
+
*
|
|
90
|
+
* This endpoint requires the permission: `discounts:update`.
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* ```ts
|
|
94
|
+
* const accountPrice =
|
|
95
|
+
* await client.sales.accountPrices.update(
|
|
96
|
+
* 'acpr_7l4j483kf32p',
|
|
97
|
+
* {
|
|
98
|
+
* rate: {
|
|
99
|
+
* value: '30.000000000000000000000000000000',
|
|
100
|
+
* numerator_unit_id: 'un_82bd37dae5po',
|
|
101
|
+
* denominator_unit_id: 'un_82bd37dae5po',
|
|
102
|
+
* },
|
|
103
|
+
* },
|
|
104
|
+
* );
|
|
105
|
+
* ```
|
|
106
|
+
*/
|
|
107
|
+
update(id: string, params?: AccountPriceUpdateParams | null | undefined, options?: RequestOptions): APIPromise<AccountPrice>;
|
|
108
|
+
/**
|
|
109
|
+
* Deletes an account price.
|
|
110
|
+
*
|
|
111
|
+
* The price's category and attribute associations and its rate record are removed
|
|
112
|
+
* with it. Deletion is permanent; further requests against the deleted ID return
|
|
113
|
+
* an error.
|
|
114
|
+
*
|
|
115
|
+
* Order lines that have already been priced keep the unit price they were given;
|
|
116
|
+
* only lines priced after the deletion revert to standard pricing.
|
|
117
|
+
*
|
|
118
|
+
* This endpoint requires the permission: `discounts:delete`.
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* ```ts
|
|
122
|
+
* const accountPrice =
|
|
123
|
+
* await client.sales.accountPrices.delete(
|
|
124
|
+
* 'acpr_7l4j483kf32p',
|
|
125
|
+
* );
|
|
126
|
+
* ```
|
|
127
|
+
*/
|
|
128
|
+
delete(id: string, options?: RequestOptions): APIPromise<AccountPriceDeleteResponse>;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* A customer-specific price for a product line.
|
|
132
|
+
*
|
|
133
|
+
* When a sales order line matches an account price, that price replaces the unit
|
|
134
|
+
* price the line would otherwise be given — including the effect of any volume
|
|
135
|
+
* discount — rather than discounting it. If more than one account price matches a
|
|
136
|
+
* line, the most recently created one wins.
|
|
137
|
+
*/
|
|
138
|
+
export interface AccountPrice {
|
|
139
|
+
/**
|
|
140
|
+
* Account price ID.
|
|
141
|
+
*/
|
|
142
|
+
id: string;
|
|
143
|
+
/**
|
|
144
|
+
* A single page of resources, together with the metadata needed to page through
|
|
145
|
+
* the rest of the result set.
|
|
146
|
+
*/
|
|
147
|
+
attributes: PropertiesAPI.ListAttribute | null;
|
|
148
|
+
/**
|
|
149
|
+
* A single page of resources, together with the metadata needed to page through
|
|
150
|
+
* the rest of the result set.
|
|
151
|
+
*/
|
|
152
|
+
categories: ItemCategoriesAPI.ListItemCategory | null;
|
|
153
|
+
/**
|
|
154
|
+
* Creation timestamp.
|
|
155
|
+
*/
|
|
156
|
+
created_at: string;
|
|
157
|
+
/**
|
|
158
|
+
* Resource type identifier.
|
|
159
|
+
*/
|
|
160
|
+
object: 'account_price';
|
|
161
|
+
/**
|
|
162
|
+
* A named grouping of related products in your catalog.
|
|
163
|
+
*
|
|
164
|
+
* A product line carries the default commission and freight policies for the
|
|
165
|
+
* products assigned to it, along with the unit group that determines how those
|
|
166
|
+
* products are measured. Product lines are also the unit that catalog access is
|
|
167
|
+
* granted over, for both customers and account groups.
|
|
168
|
+
*/
|
|
169
|
+
product_line: ProductLinesAPI.ProductLine | null;
|
|
170
|
+
/**
|
|
171
|
+
* Value expressed as a ratio of two units, such as a price per kilogram or a
|
|
172
|
+
* throughput per hour.
|
|
173
|
+
*/
|
|
174
|
+
rate: ItemsAPI.Rate | null;
|
|
175
|
+
/**
|
|
176
|
+
* A business you sell to, with its contact details, default fulfillment settings,
|
|
177
|
+
* and order policies.
|
|
178
|
+
*/
|
|
179
|
+
recipient_account: Customer | null;
|
|
180
|
+
/**
|
|
181
|
+
* Last updated timestamp.
|
|
182
|
+
*/
|
|
183
|
+
updated_at: string;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* A shipping carrier configured for fulfilling orders.
|
|
187
|
+
*
|
|
188
|
+
* Carriers with a Shippo-supported `code` (`fedex`, `ups`, `usps`) are connected
|
|
189
|
+
* through Shippo for live rating and label purchase; other carriers represent
|
|
190
|
+
* self-managed shipping methods such as will call or local delivery.
|
|
191
|
+
*/
|
|
192
|
+
export interface Carrier {
|
|
193
|
+
/**
|
|
194
|
+
* Carrier ID.
|
|
195
|
+
*/
|
|
196
|
+
id: string;
|
|
197
|
+
/**
|
|
198
|
+
* Your account number with this carrier.
|
|
199
|
+
*
|
|
200
|
+
* UPS and USPS carrier accounts are connected to Shippo using this number; FedEx
|
|
201
|
+
* carriers authorize through OAuth instead, so their account number is not used to
|
|
202
|
+
* connect them.
|
|
203
|
+
*/
|
|
204
|
+
account_number: string | null;
|
|
205
|
+
/**
|
|
206
|
+
* Well-known carrier identifier, set only for recognized carriers and absent for
|
|
207
|
+
* custom ones.
|
|
208
|
+
*
|
|
209
|
+
* - `fedex`, `ups`, `usps`: integrated carriers managed through Shippo (live
|
|
210
|
+
* rating and labels).
|
|
211
|
+
* - `will_call`: customer picks the order up; no carrier shipment.
|
|
212
|
+
* - `delivery`: delivered by your own vehicles/drivers.
|
|
213
|
+
* - `ltl`, `ltl1`: less-than-truckload freight carriers.
|
|
214
|
+
* - `freight_collect`: freight billed to and arranged by the receiver.
|
|
215
|
+
*/
|
|
216
|
+
code: 'fedex' | 'ups' | 'usps' | 'will_call' | 'delivery' | 'ltl' | 'ltl1' | 'freight_collect' | null;
|
|
217
|
+
/**
|
|
218
|
+
* Creation timestamp.
|
|
219
|
+
*/
|
|
220
|
+
created_at: string;
|
|
221
|
+
/**
|
|
222
|
+
* Whether customers can see and select this carrier at checkout in the customer
|
|
223
|
+
* portal.
|
|
224
|
+
*/
|
|
225
|
+
customer_portal_visibility: 'visible' | 'hidden';
|
|
226
|
+
/**
|
|
227
|
+
* Soft-delete timestamp.
|
|
228
|
+
*/
|
|
229
|
+
deleted_at: string | null;
|
|
230
|
+
/**
|
|
231
|
+
* Human-readable name for the carrier, unique among the carriers visible to your
|
|
232
|
+
* account.
|
|
233
|
+
*/
|
|
234
|
+
name: string;
|
|
235
|
+
/**
|
|
236
|
+
* Resource type identifier.
|
|
237
|
+
*/
|
|
238
|
+
object: 'carrier';
|
|
239
|
+
/**
|
|
240
|
+
* Owner describes the provenance of a resource.
|
|
241
|
+
*/
|
|
242
|
+
owner: APIKeysAPI.Owner | null;
|
|
243
|
+
/**
|
|
244
|
+
* A single page of resources, together with the metadata needed to page through
|
|
245
|
+
* the rest of the result set.
|
|
246
|
+
*/
|
|
247
|
+
service_levels: ListServiceLevel | null;
|
|
248
|
+
/**
|
|
249
|
+
* Last updated timestamp.
|
|
250
|
+
*/
|
|
251
|
+
updated_at: string;
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Request to create an account price.
|
|
255
|
+
*/
|
|
256
|
+
export interface CreateAccountPriceRequest {
|
|
257
|
+
/**
|
|
258
|
+
* ID of the product line whose products this price applies to.
|
|
259
|
+
*/
|
|
260
|
+
product_line_id: string;
|
|
261
|
+
/**
|
|
262
|
+
* A value expressed as a ratio of two units, supplied on create and update
|
|
263
|
+
* requests.
|
|
264
|
+
*
|
|
265
|
+
* A unit price, for example, has a currency as its numerator unit and the unit the
|
|
266
|
+
* product is bought or sold by as its denominator.
|
|
267
|
+
*/
|
|
268
|
+
rate: MaterialsAPI.RateInput;
|
|
269
|
+
/**
|
|
270
|
+
* ID of the customer this price is offered to.
|
|
271
|
+
*
|
|
272
|
+
* A price recorded against a parent customer account also applies to orders placed
|
|
273
|
+
* by its child accounts.
|
|
274
|
+
*/
|
|
275
|
+
recipient_account_id: string;
|
|
276
|
+
/**
|
|
277
|
+
* Attribute IDs to constrain this price to.
|
|
278
|
+
*
|
|
279
|
+
* When set, the price applies only to items that have every listed attribute.
|
|
280
|
+
*/
|
|
281
|
+
attribute_ids?: Array<string>;
|
|
282
|
+
/**
|
|
283
|
+
* Item category IDs to record on this price.
|
|
284
|
+
*
|
|
285
|
+
* Order pricing matches an account price on its product line and attributes only,
|
|
286
|
+
* so categories recorded here do not narrow which products the price applies to.
|
|
287
|
+
*/
|
|
288
|
+
category_ids?: Array<string>;
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* A business you sell to, with its contact details, default fulfillment settings,
|
|
292
|
+
* and order policies.
|
|
293
|
+
*/
|
|
294
|
+
export interface Customer {
|
|
295
|
+
/**
|
|
296
|
+
* Customer ID.
|
|
297
|
+
*/
|
|
298
|
+
id: string;
|
|
299
|
+
/**
|
|
300
|
+
* A saved address that can be used for billing and shipping on sales orders,
|
|
301
|
+
* invoices, and shipments.
|
|
302
|
+
*/
|
|
303
|
+
bill_to_address: APIKeysAPI.Address | null;
|
|
304
|
+
/**
|
|
305
|
+
* A single page of resources, together with the metadata needed to page through
|
|
306
|
+
* the rest of the result set.
|
|
307
|
+
*/
|
|
308
|
+
child_accounts: ListCustomer | null;
|
|
309
|
+
/**
|
|
310
|
+
* How sales commission applies to this customer's orders.
|
|
311
|
+
*
|
|
312
|
+
* - `commission_exempt`: this customer's orders are exempt from sales commission.
|
|
313
|
+
* - `commission_applied`: sales commission is calculated on this customer's
|
|
314
|
+
* orders.
|
|
315
|
+
*
|
|
316
|
+
* The customer counts as exempt if this field, its `type` group, or any of its
|
|
317
|
+
* `price_groups` is `commission_exempt`. Exempt customers never have a sales rep
|
|
318
|
+
* assigned automatically when an order is created without one.
|
|
319
|
+
*/
|
|
320
|
+
commission_policy: 'commission_applied' | 'commission_exempt';
|
|
321
|
+
/**
|
|
322
|
+
* Customer contact information.
|
|
323
|
+
*/
|
|
324
|
+
contact_info: CustomerContactInfo | null;
|
|
325
|
+
/**
|
|
326
|
+
* Creation timestamp.
|
|
327
|
+
*/
|
|
328
|
+
created_at: string;
|
|
329
|
+
/**
|
|
330
|
+
* A measured amount: a numeric value together with the unit it is expressed in.
|
|
331
|
+
*
|
|
332
|
+
* Quantities are shared building blocks rather than standalone records — other
|
|
333
|
+
* resources point at them to report stock levels, ordered and packed amounts,
|
|
334
|
+
* money, weights, and durations.
|
|
335
|
+
*/
|
|
336
|
+
credit_limit: ItemsAPI.Quantity | null;
|
|
337
|
+
/**
|
|
338
|
+
* Values used to fill in a new sales order for this customer when the order does
|
|
339
|
+
* not supply its own.
|
|
340
|
+
*/
|
|
341
|
+
defaults: CustomerDefaults | null;
|
|
342
|
+
/**
|
|
343
|
+
* Whether EDI (Electronic Data Interchange) is enabled for exchanging orders and
|
|
344
|
+
* documents with this customer.
|
|
345
|
+
*/
|
|
346
|
+
edi_status: 'enabled' | 'disabled';
|
|
347
|
+
/**
|
|
348
|
+
* Customer freight and carrier settings.
|
|
349
|
+
*/
|
|
350
|
+
freight_preferences: CustomerFreightPreferences | null;
|
|
351
|
+
/**
|
|
352
|
+
* The customer's business name, as shown throughout the app and on documents.
|
|
353
|
+
*/
|
|
354
|
+
name: string;
|
|
355
|
+
/**
|
|
356
|
+
* Free-form note about the customer.
|
|
357
|
+
*/
|
|
358
|
+
note: string | null;
|
|
359
|
+
/**
|
|
360
|
+
* Customer notification settings.
|
|
361
|
+
*/
|
|
362
|
+
notification_preferences: CustomerNotificationPreferences | null;
|
|
363
|
+
/**
|
|
364
|
+
* Human-readable customer number used to identify the account, distinct from the
|
|
365
|
+
* `id`.
|
|
366
|
+
*
|
|
367
|
+
* Unique within your account.
|
|
368
|
+
*/
|
|
369
|
+
number: string;
|
|
370
|
+
/**
|
|
371
|
+
* Resource type identifier.
|
|
372
|
+
*/
|
|
373
|
+
object: 'customer';
|
|
374
|
+
/**
|
|
375
|
+
* A business you sell to, with its contact details, default fulfillment settings,
|
|
376
|
+
* and order policies.
|
|
377
|
+
*/
|
|
378
|
+
parent_account: Customer | null;
|
|
379
|
+
/**
|
|
380
|
+
* A single page of resources, together with the metadata needed to page through
|
|
381
|
+
* the rest of the result set.
|
|
382
|
+
*/
|
|
383
|
+
price_groups: AccountGroupsAPI.ListAccountGroup | null;
|
|
384
|
+
/**
|
|
385
|
+
* The customer's position in the account hierarchy.
|
|
386
|
+
*
|
|
387
|
+
* - `standalone`: no parent or child accounts.
|
|
388
|
+
* - `parent`: has one or more child accounts (see `child_accounts`).
|
|
389
|
+
* - `child`: belongs to a parent account (see `parent_account`).
|
|
390
|
+
*/
|
|
391
|
+
relationship_type: 'standalone' | 'parent' | 'child';
|
|
392
|
+
/**
|
|
393
|
+
* A saved address that can be used for billing and shipping on sales orders,
|
|
394
|
+
* invoices, and shipments.
|
|
395
|
+
*/
|
|
396
|
+
ship_to_address: APIKeysAPI.Address | null;
|
|
397
|
+
/**
|
|
398
|
+
* The customer's account standing.
|
|
399
|
+
*
|
|
400
|
+
* - `normal`: standard account with no restrictions.
|
|
401
|
+
* - `preferred`: account flagged for prioritized handling.
|
|
402
|
+
* - `hold_shipment`: the customer's shipments should be held, typically over a
|
|
403
|
+
* credit problem, while orders can still be placed.
|
|
404
|
+
* - `hold_all`: all activity for the customer should be held.
|
|
405
|
+
*
|
|
406
|
+
* The hold statuses are advisory: Augno flags the customer's orders as being on
|
|
407
|
+
* credit hold, but requests to create orders or shipments for the customer are not
|
|
408
|
+
* rejected.
|
|
409
|
+
*/
|
|
410
|
+
status: 'normal' | 'preferred' | 'hold_shipment' | 'hold_all';
|
|
411
|
+
/**
|
|
412
|
+
* A named grouping of customer accounts, used for pricing rules or to categorize
|
|
413
|
+
* accounts.
|
|
414
|
+
*
|
|
415
|
+
* A customer carries at most one group of type `type_group` as its customer type,
|
|
416
|
+
* plus any number of groups of type `pricing_group`. Membership of either kind can
|
|
417
|
+
* scope a volume discount to the customer and open up product lines for it to
|
|
418
|
+
* order from.
|
|
419
|
+
*/
|
|
420
|
+
type: AccountGroupsAPI.AccountGroup | null;
|
|
421
|
+
/**
|
|
422
|
+
* Last updated timestamp.
|
|
423
|
+
*/
|
|
424
|
+
updated_at: string;
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* Customer contact information.
|
|
428
|
+
*/
|
|
429
|
+
export interface CustomerContactInfo {
|
|
430
|
+
/**
|
|
431
|
+
* Email address.
|
|
432
|
+
*/
|
|
433
|
+
email: string | null;
|
|
434
|
+
/**
|
|
435
|
+
* Resource type identifier.
|
|
436
|
+
*/
|
|
437
|
+
object: 'customer_contact_info';
|
|
438
|
+
/**
|
|
439
|
+
* Phone number.
|
|
440
|
+
*/
|
|
441
|
+
phone: string | null;
|
|
442
|
+
/**
|
|
443
|
+
* Website URL.
|
|
444
|
+
*/
|
|
445
|
+
url: string | null;
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* Values used to fill in a new sales order for this customer when the order does
|
|
449
|
+
* not supply its own.
|
|
450
|
+
*/
|
|
451
|
+
export interface CustomerDefaults {
|
|
452
|
+
/**
|
|
453
|
+
* Calendar days between an order being issued and it being due to ship.
|
|
454
|
+
*
|
|
455
|
+
* Sets each order's `ship_by_date` when it is issued. With none set here the
|
|
456
|
+
* customer inherits its account group's lead time, then the account default.
|
|
457
|
+
*/
|
|
458
|
+
lead_time_days: number | null;
|
|
459
|
+
/**
|
|
460
|
+
* Resource type identifier.
|
|
461
|
+
*/
|
|
462
|
+
object: 'customer_defaults';
|
|
463
|
+
/**
|
|
464
|
+
* A payment term describing when payment is due (e.g. `Net 30`), assignable to
|
|
465
|
+
* customers, sales orders, purchase orders, and invoices.
|
|
466
|
+
*/
|
|
467
|
+
payment_term: PaymentTerm | null;
|
|
468
|
+
/**
|
|
469
|
+
* Priority level used to order work on sales orders, purchase orders, and picks.
|
|
470
|
+
*
|
|
471
|
+
* The levels are platform-provided and the same for every account, so they cannot
|
|
472
|
+
* be created, renamed, or removed. A customer can carry a default priority that
|
|
473
|
+
* pre-fills new orders for them.
|
|
474
|
+
*/
|
|
475
|
+
priority: Priority | null;
|
|
476
|
+
/**
|
|
477
|
+
* A user's membership in an account, carrying the account-specific status, role,
|
|
478
|
+
* and department.
|
|
479
|
+
*
|
|
480
|
+
* Profile fields (name, email, username, image URL) live on the `user`
|
|
481
|
+
* sub-resource, which is shared across every account the user belongs to.
|
|
482
|
+
*/
|
|
483
|
+
sales_rep: BlocksAPI.AccountUser | null;
|
|
484
|
+
/**
|
|
485
|
+
* A named freight pricing rule that decides what a buyer pays for shipping.
|
|
486
|
+
*
|
|
487
|
+
* A customer's default shipping term is evaluated whenever freight is quoted for
|
|
488
|
+
* one of their orders. Freight exemptions on the customer, its type group, or any
|
|
489
|
+
* of its price groups are checked first and zero the freight charge before the
|
|
490
|
+
* shipping term is considered.
|
|
491
|
+
*/
|
|
492
|
+
shipping_term: ShippingTerm | null;
|
|
493
|
+
}
|
|
494
|
+
/**
|
|
495
|
+
* Customer freight and carrier settings.
|
|
496
|
+
*/
|
|
497
|
+
export interface CustomerFreightPreferences {
|
|
498
|
+
/**
|
|
499
|
+
* Carrier billing account number charged when `billing_type` is `third_party`.
|
|
500
|
+
*/
|
|
501
|
+
billing_account: string | null;
|
|
502
|
+
/**
|
|
503
|
+
* Who pays the carrier for shipments.
|
|
504
|
+
*
|
|
505
|
+
* - `sender`: the shipper (you) pays the carrier.
|
|
506
|
+
* - `third_party`: a third party is billed, using `billing_account`.
|
|
507
|
+
*/
|
|
508
|
+
billing_type: 'sender' | 'third_party' | null;
|
|
509
|
+
/**
|
|
510
|
+
* A shipping carrier configured for fulfilling orders.
|
|
511
|
+
*
|
|
512
|
+
* Carriers with a Shippo-supported `code` (`fedex`, `ups`, `usps`) are connected
|
|
513
|
+
* through Shippo for live rating and label purchase; other carriers represent
|
|
514
|
+
* self-managed shipping methods such as will call or local delivery.
|
|
515
|
+
*/
|
|
516
|
+
carrier: Carrier | null;
|
|
517
|
+
/**
|
|
518
|
+
* Resource type identifier.
|
|
519
|
+
*/
|
|
520
|
+
object: 'customer_freight_preferences';
|
|
521
|
+
/**
|
|
522
|
+
* A shipping speed or method offered by a carrier, such as ground or overnight.
|
|
523
|
+
*
|
|
524
|
+
* Carriers connected through Shippo have their service levels synced from the
|
|
525
|
+
* carrier itself; any carrier can also have service levels you create by hand.
|
|
526
|
+
*/
|
|
527
|
+
service_level: ServiceLevel | null;
|
|
528
|
+
/**
|
|
529
|
+
* Freight policy applied to this customer's orders.
|
|
530
|
+
*
|
|
531
|
+
* - `free_freight`: the customer is not billed for freight.
|
|
532
|
+
* - `billed_freight`: freight is billed to the customer.
|
|
533
|
+
*
|
|
534
|
+
* Freight is waived when this field, the customer's `type` group, any of its
|
|
535
|
+
* `price_groups`, or any product line the ordered products belong to is
|
|
536
|
+
* `free_freight`, so a shipment can come back freight-exempt even while this field
|
|
537
|
+
* is `billed_freight`.
|
|
538
|
+
*/
|
|
539
|
+
status: 'free_freight' | 'billed_freight';
|
|
540
|
+
}
|
|
541
|
+
/**
|
|
542
|
+
* Customer notification settings.
|
|
543
|
+
*/
|
|
544
|
+
export interface CustomerNotificationPreferences {
|
|
545
|
+
/**
|
|
546
|
+
* Whether anyone is set up to receive invoice emails for this customer.
|
|
547
|
+
*
|
|
548
|
+
* Derived from the customer's notification recipients: true when at least one of
|
|
549
|
+
* them is configured for invoice notifications.
|
|
550
|
+
*/
|
|
551
|
+
accepts_invoice_emails: boolean;
|
|
552
|
+
/**
|
|
553
|
+
* Resource type identifier.
|
|
554
|
+
*/
|
|
555
|
+
object: 'customer_notification_preferences';
|
|
556
|
+
}
|
|
557
|
+
/**
|
|
558
|
+
* A single page of resources, together with the metadata needed to page through
|
|
559
|
+
* the rest of the result set.
|
|
560
|
+
*/
|
|
561
|
+
export interface ListAccountPrice {
|
|
562
|
+
/**
|
|
563
|
+
* Resources in this page.
|
|
564
|
+
*/
|
|
565
|
+
data: Array<AccountPrice>;
|
|
566
|
+
/**
|
|
567
|
+
* Resource type identifier.
|
|
568
|
+
*/
|
|
569
|
+
object: 'list';
|
|
570
|
+
/**
|
|
571
|
+
* PageInfo describes where the current page sits within a paginated result set and
|
|
572
|
+
* how to move to the adjacent pages.
|
|
573
|
+
*
|
|
574
|
+
* Page a list by following the URLs below rather than assembling cursors yourself.
|
|
575
|
+
* For a top-level list endpoint the URL repeats the original request's query
|
|
576
|
+
* string with only the cursor swapped, so following it preserves the same filters,
|
|
577
|
+
* search term, and page size.
|
|
578
|
+
*/
|
|
579
|
+
page_info: APIKeysAPI.PageInfo;
|
|
580
|
+
}
|
|
581
|
+
/**
|
|
582
|
+
* A single page of resources, together with the metadata needed to page through
|
|
583
|
+
* the rest of the result set.
|
|
584
|
+
*/
|
|
585
|
+
export interface ListCustomer {
|
|
586
|
+
/**
|
|
587
|
+
* Resources in this page.
|
|
588
|
+
*/
|
|
589
|
+
data: Array<Customer>;
|
|
590
|
+
/**
|
|
591
|
+
* Resource type identifier.
|
|
592
|
+
*/
|
|
593
|
+
object: 'list';
|
|
594
|
+
/**
|
|
595
|
+
* PageInfo describes where the current page sits within a paginated result set and
|
|
596
|
+
* how to move to the adjacent pages.
|
|
597
|
+
*
|
|
598
|
+
* Page a list by following the URLs below rather than assembling cursors yourself.
|
|
599
|
+
* For a top-level list endpoint the URL repeats the original request's query
|
|
600
|
+
* string with only the cursor swapped, so following it preserves the same filters,
|
|
601
|
+
* search term, and page size.
|
|
602
|
+
*/
|
|
603
|
+
page_info: APIKeysAPI.PageInfo;
|
|
604
|
+
}
|
|
605
|
+
/**
|
|
606
|
+
* A single page of resources, together with the metadata needed to page through
|
|
607
|
+
* the rest of the result set.
|
|
608
|
+
*/
|
|
609
|
+
export interface ListServiceLevel {
|
|
610
|
+
/**
|
|
611
|
+
* Resources in this page.
|
|
612
|
+
*/
|
|
613
|
+
data: Array<ServiceLevel>;
|
|
614
|
+
/**
|
|
615
|
+
* Resource type identifier.
|
|
616
|
+
*/
|
|
617
|
+
object: 'list';
|
|
618
|
+
/**
|
|
619
|
+
* PageInfo describes where the current page sits within a paginated result set and
|
|
620
|
+
* how to move to the adjacent pages.
|
|
621
|
+
*
|
|
622
|
+
* Page a list by following the URLs below rather than assembling cursors yourself.
|
|
623
|
+
* For a top-level list endpoint the URL repeats the original request's query
|
|
624
|
+
* string with only the cursor swapped, so following it preserves the same filters,
|
|
625
|
+
* search term, and page size.
|
|
626
|
+
*/
|
|
627
|
+
page_info: APIKeysAPI.PageInfo;
|
|
628
|
+
}
|
|
629
|
+
/**
|
|
630
|
+
* A payment term describing when payment is due (e.g. `Net 30`), assignable to
|
|
631
|
+
* customers, sales orders, purchase orders, and invoices.
|
|
632
|
+
*/
|
|
633
|
+
export interface PaymentTerm {
|
|
634
|
+
/**
|
|
635
|
+
* Payment term ID.
|
|
636
|
+
*/
|
|
637
|
+
id: string;
|
|
638
|
+
/**
|
|
639
|
+
* Creation timestamp.
|
|
640
|
+
*/
|
|
641
|
+
created_at: string;
|
|
642
|
+
/**
|
|
643
|
+
* Display name (e.g. `Net 30`), unique among the payment terms visible to your
|
|
644
|
+
* account.
|
|
645
|
+
*/
|
|
646
|
+
name: string;
|
|
647
|
+
/**
|
|
648
|
+
* Resource type identifier.
|
|
649
|
+
*/
|
|
650
|
+
object: 'payment_term';
|
|
651
|
+
/**
|
|
652
|
+
* Owner describes the provenance of a resource.
|
|
653
|
+
*/
|
|
654
|
+
owner: APIKeysAPI.Owner | null;
|
|
655
|
+
/**
|
|
656
|
+
* Whether this payment term is still in active use.
|
|
657
|
+
*
|
|
658
|
+
* Payment terms created through the API are always `active`, and no endpoint
|
|
659
|
+
* changes a term's status. List Payment Terms returns inactive terms alongside
|
|
660
|
+
* active ones, so filter them out yourself if you only want the ones still on
|
|
661
|
+
* offer.
|
|
662
|
+
*/
|
|
663
|
+
status: 'active' | 'inactive';
|
|
664
|
+
/**
|
|
665
|
+
* Last-updated timestamp.
|
|
666
|
+
*/
|
|
667
|
+
updated_at: string;
|
|
668
|
+
}
|
|
669
|
+
/**
|
|
670
|
+
* Priority level used to order work on sales orders, purchase orders, and picks.
|
|
671
|
+
*
|
|
672
|
+
* The levels are platform-provided and the same for every account, so they cannot
|
|
673
|
+
* be created, renamed, or removed. A customer can carry a default priority that
|
|
674
|
+
* pre-fills new orders for them.
|
|
675
|
+
*/
|
|
676
|
+
export interface Priority {
|
|
677
|
+
/**
|
|
678
|
+
* Priority ID.
|
|
679
|
+
*/
|
|
680
|
+
id: string;
|
|
681
|
+
/**
|
|
682
|
+
* Machine-readable code identifying the priority level.
|
|
683
|
+
*
|
|
684
|
+
* Other resources refer to a priority by this code rather than by its ID, such as
|
|
685
|
+
* a sales order's `priority`, and it can be used in place of the ID when
|
|
686
|
+
* retrieving a priority.
|
|
687
|
+
*/
|
|
688
|
+
code: 'low' | 'normal' | 'high';
|
|
689
|
+
/**
|
|
690
|
+
* Creation timestamp.
|
|
691
|
+
*/
|
|
692
|
+
created_at: string;
|
|
693
|
+
/**
|
|
694
|
+
* Display name of the priority level.
|
|
695
|
+
*/
|
|
696
|
+
name: string;
|
|
697
|
+
/**
|
|
698
|
+
* Resource type identifier.
|
|
699
|
+
*/
|
|
700
|
+
object: 'priority';
|
|
701
|
+
/**
|
|
702
|
+
* Owner describes the provenance of a resource.
|
|
703
|
+
*/
|
|
704
|
+
owner: APIKeysAPI.Owner | null;
|
|
705
|
+
/**
|
|
706
|
+
* Last updated timestamp.
|
|
707
|
+
*/
|
|
708
|
+
updated_at: string;
|
|
709
|
+
}
|
|
710
|
+
/**
|
|
711
|
+
* A shipping speed or method offered by a carrier, such as ground or overnight.
|
|
712
|
+
*
|
|
713
|
+
* Carriers connected through Shippo have their service levels synced from the
|
|
714
|
+
* carrier itself; any carrier can also have service levels you create by hand.
|
|
715
|
+
*/
|
|
716
|
+
export interface ServiceLevel {
|
|
717
|
+
/**
|
|
718
|
+
* Service level ID.
|
|
719
|
+
*/
|
|
720
|
+
id: string;
|
|
721
|
+
/**
|
|
722
|
+
* Creation timestamp.
|
|
723
|
+
*/
|
|
724
|
+
created_at: string;
|
|
725
|
+
/**
|
|
726
|
+
* Whether customers can see and select this service level at checkout in the
|
|
727
|
+
* customer portal.
|
|
728
|
+
*/
|
|
729
|
+
customer_portal_visibility: 'visible' | 'hidden';
|
|
730
|
+
/**
|
|
731
|
+
* Business days this service typically takes in transit, used to work an order's
|
|
732
|
+
* ship-by date back from a promised delivery date.
|
|
733
|
+
*
|
|
734
|
+
* A fallback for lanes the carrier has not quoted. Null means transit is unknown
|
|
735
|
+
* for this service rather than instant, so a ship-by date falls back to the
|
|
736
|
+
* promised delivery date itself.
|
|
737
|
+
*/
|
|
738
|
+
default_transit_days: number | null;
|
|
739
|
+
/**
|
|
740
|
+
* Whether this is the carrier's default service level, pre-selected when the
|
|
741
|
+
* carrier is chosen.
|
|
742
|
+
*
|
|
743
|
+
* Each carrier has at most one default; setting a new default clears the previous
|
|
744
|
+
* one. A default service level cannot be deleted until another service level takes
|
|
745
|
+
* its place or the flag is cleared.
|
|
746
|
+
*/
|
|
747
|
+
is_default: boolean;
|
|
748
|
+
/**
|
|
749
|
+
* Human-readable name for the service level, shown to customers at checkout when
|
|
750
|
+
* the service level is visible.
|
|
751
|
+
*/
|
|
752
|
+
name: string;
|
|
753
|
+
/**
|
|
754
|
+
* Resource type identifier.
|
|
755
|
+
*/
|
|
756
|
+
object: 'service_level';
|
|
757
|
+
/**
|
|
758
|
+
* Owner describes the provenance of a resource.
|
|
759
|
+
*/
|
|
760
|
+
owner: APIKeysAPI.Owner | null;
|
|
761
|
+
/**
|
|
762
|
+
* Carrier-specific code identifying this service level (e.g. `fedex_ground`,
|
|
763
|
+
* `ups_next_day_air`).
|
|
764
|
+
*
|
|
765
|
+
* For service levels synced from a connected carrier this is the carrier's own
|
|
766
|
+
* token, which is what rate shopping and label purchase are keyed on; for service
|
|
767
|
+
* levels you create yourself it is the `code` you supplied.
|
|
768
|
+
*/
|
|
769
|
+
service_level_token: string;
|
|
770
|
+
/**
|
|
771
|
+
* Last updated timestamp.
|
|
772
|
+
*/
|
|
773
|
+
updated_at: string;
|
|
774
|
+
}
|
|
775
|
+
/**
|
|
776
|
+
* A named freight pricing rule that decides what a buyer pays for shipping.
|
|
777
|
+
*
|
|
778
|
+
* A customer's default shipping term is evaluated whenever freight is quoted for
|
|
779
|
+
* one of their orders. Freight exemptions on the customer, its type group, or any
|
|
780
|
+
* of its price groups are checked first and zero the freight charge before the
|
|
781
|
+
* shipping term is considered.
|
|
782
|
+
*/
|
|
783
|
+
export interface ShippingTerm {
|
|
784
|
+
/**
|
|
785
|
+
* Shipping term ID.
|
|
786
|
+
*/
|
|
787
|
+
id: string;
|
|
788
|
+
/**
|
|
789
|
+
* When this shipping term was created.
|
|
790
|
+
*/
|
|
791
|
+
created_at: string;
|
|
792
|
+
/**
|
|
793
|
+
* A measured amount: a numeric value together with the unit it is expressed in.
|
|
794
|
+
*
|
|
795
|
+
* Quantities are shared building blocks rather than standalone records — other
|
|
796
|
+
* resources point at them to report stock levels, ordered and packed amounts,
|
|
797
|
+
* money, weights, and durations.
|
|
798
|
+
*/
|
|
799
|
+
flat_rate: ItemsAPI.Quantity | null;
|
|
800
|
+
/**
|
|
801
|
+
* A single page of resources, together with the metadata needed to page through
|
|
802
|
+
* the rest of the result set.
|
|
803
|
+
*/
|
|
804
|
+
free_shipping_service_levels: ListServiceLevel | null;
|
|
805
|
+
/**
|
|
806
|
+
* A measured amount: a numeric value together with the unit it is expressed in.
|
|
807
|
+
*
|
|
808
|
+
* Quantities are shared building blocks rather than standalone records — other
|
|
809
|
+
* resources point at them to report stock levels, ordered and packed amounts,
|
|
810
|
+
* money, weights, and durations.
|
|
811
|
+
*/
|
|
812
|
+
minimum_order_value: ItemsAPI.Quantity | null;
|
|
813
|
+
/**
|
|
814
|
+
* Human-readable name for the shipping term, used to identify it when assigning
|
|
815
|
+
* shipping terms to customers and orders.
|
|
816
|
+
*/
|
|
817
|
+
name: string;
|
|
818
|
+
/**
|
|
819
|
+
* Resource type identifier.
|
|
820
|
+
*/
|
|
821
|
+
object: 'shipping_term';
|
|
822
|
+
/**
|
|
823
|
+
* Owner describes the provenance of a resource.
|
|
824
|
+
*/
|
|
825
|
+
owner: APIKeysAPI.Owner | null;
|
|
826
|
+
/**
|
|
827
|
+
* Freight pricing model applied by this shipping term.
|
|
828
|
+
*
|
|
829
|
+
* - `free_freight`: the buyer is never charged for shipping.
|
|
830
|
+
* - `flat_rate_freight`: the buyer is charged the fixed amount in `flat_rate`,
|
|
831
|
+
* regardless of what the carrier would have charged.
|
|
832
|
+
* - `carrier_rate_freight`: the buyer is charged the rate the carrier quotes for
|
|
833
|
+
* the order's carrier and service level.
|
|
834
|
+
*/
|
|
835
|
+
type: 'free_freight' | 'flat_rate_freight' | 'carrier_rate_freight';
|
|
836
|
+
/**
|
|
837
|
+
* When this shipping term was last updated.
|
|
838
|
+
*/
|
|
839
|
+
updated_at: string;
|
|
840
|
+
}
|
|
841
|
+
/**
|
|
842
|
+
* Request to partially update an account price.
|
|
843
|
+
*/
|
|
844
|
+
export interface UpdateAccountPriceRequest {
|
|
845
|
+
/**
|
|
846
|
+
* Attribute IDs to constrain this price to.
|
|
847
|
+
*
|
|
848
|
+
* When provided, replaces the existing set of attributes entirely; an empty list
|
|
849
|
+
* removes all attribute constraints.
|
|
850
|
+
*/
|
|
851
|
+
attribute_ids?: Array<string>;
|
|
852
|
+
/**
|
|
853
|
+
* Item category IDs to record on this price.
|
|
854
|
+
*
|
|
855
|
+
* When provided, replaces the existing set of categories entirely; an empty list
|
|
856
|
+
* removes them all. Categories are recorded only — they do not narrow which
|
|
857
|
+
* products the price applies to.
|
|
858
|
+
*/
|
|
859
|
+
category_ids?: Array<string>;
|
|
860
|
+
/**
|
|
861
|
+
* ID of the product line whose products this price applies to.
|
|
862
|
+
*/
|
|
863
|
+
product_line_id?: string;
|
|
864
|
+
/**
|
|
865
|
+
* A value expressed as a ratio of two units, supplied on create and update
|
|
866
|
+
* requests.
|
|
867
|
+
*
|
|
868
|
+
* A unit price, for example, has a currency as its numerator unit and the unit the
|
|
869
|
+
* product is bought or sold by as its denominator.
|
|
870
|
+
*/
|
|
871
|
+
rate?: MaterialsAPI.RateInput;
|
|
872
|
+
/**
|
|
873
|
+
* ID of the customer this price is offered to.
|
|
874
|
+
*/
|
|
875
|
+
recipient_account_id?: string;
|
|
876
|
+
}
|
|
877
|
+
export interface AccountPriceDeleteResponse {
|
|
878
|
+
}
|
|
879
|
+
export interface AccountPriceListParams {
|
|
880
|
+
/**
|
|
881
|
+
* Opaque cursor token identifying where the page of results starts.
|
|
882
|
+
*
|
|
883
|
+
* Use the `cursor` value embedded in a previous response's `next_page_url` or
|
|
884
|
+
* `previous_page_url` to fetch the adjacent page. Omit to start from the first
|
|
885
|
+
* page.
|
|
886
|
+
*/
|
|
887
|
+
cursor?: string;
|
|
888
|
+
/**
|
|
889
|
+
* Sub-objects to expand in the response. When omitted, sub-objects are returned as
|
|
890
|
+
* `null`.
|
|
891
|
+
*/
|
|
892
|
+
include?: Array<'recipient_account' | 'product_line' | 'categories' | 'attributes'>;
|
|
893
|
+
/**
|
|
894
|
+
* Maximum number of results to return in a single page.
|
|
895
|
+
*/
|
|
896
|
+
limit?: number;
|
|
897
|
+
/**
|
|
898
|
+
* Free-text search term used to filter results.
|
|
899
|
+
*
|
|
900
|
+
* Which fields are matched against the term varies by endpoint.
|
|
901
|
+
*/
|
|
902
|
+
q?: string;
|
|
903
|
+
/**
|
|
904
|
+
* Filters results to prices whose recipient is this customer account.
|
|
905
|
+
*
|
|
906
|
+
* A child account also matches the prices recorded against its parent, since those
|
|
907
|
+
* price its orders too.
|
|
908
|
+
*/
|
|
909
|
+
recipient_account_id?: string;
|
|
910
|
+
}
|
|
911
|
+
export interface AccountPriceRetrieveParams {
|
|
912
|
+
/**
|
|
913
|
+
* Sub-objects to expand in the response. When omitted, sub-objects are returned as
|
|
914
|
+
* `null`.
|
|
915
|
+
*/
|
|
916
|
+
include?: Array<'recipient_account' | 'product_line' | 'categories' | 'attributes'>;
|
|
917
|
+
}
|
|
918
|
+
export interface AccountPriceCreateParams {
|
|
919
|
+
/**
|
|
920
|
+
* Body param: ID of the product line whose products this price applies to.
|
|
921
|
+
*/
|
|
922
|
+
product_line_id: string;
|
|
923
|
+
/**
|
|
924
|
+
* Body param: A value expressed as a ratio of two units, supplied on create and
|
|
925
|
+
* update requests.
|
|
926
|
+
*
|
|
927
|
+
* A unit price, for example, has a currency as its numerator unit and the unit the
|
|
928
|
+
* product is bought or sold by as its denominator.
|
|
929
|
+
*/
|
|
930
|
+
rate: MaterialsAPI.RateInput;
|
|
931
|
+
/**
|
|
932
|
+
* Body param: ID of the customer this price is offered to.
|
|
933
|
+
*
|
|
934
|
+
* A price recorded against a parent customer account also applies to orders placed
|
|
935
|
+
* by its child accounts.
|
|
936
|
+
*/
|
|
937
|
+
recipient_account_id: string;
|
|
938
|
+
/**
|
|
939
|
+
* Query param: Sub-objects to expand in the response. When omitted, sub-objects
|
|
940
|
+
* are returned as `null`.
|
|
941
|
+
*/
|
|
942
|
+
include?: Array<'recipient_account' | 'product_line' | 'categories' | 'attributes'>;
|
|
943
|
+
/**
|
|
944
|
+
* Body param: Attribute IDs to constrain this price to.
|
|
945
|
+
*
|
|
946
|
+
* When set, the price applies only to items that have every listed attribute.
|
|
947
|
+
*/
|
|
948
|
+
attribute_ids?: Array<string>;
|
|
949
|
+
/**
|
|
950
|
+
* Body param: Item category IDs to record on this price.
|
|
951
|
+
*
|
|
952
|
+
* Order pricing matches an account price on its product line and attributes only,
|
|
953
|
+
* so categories recorded here do not narrow which products the price applies to.
|
|
954
|
+
*/
|
|
955
|
+
category_ids?: Array<string>;
|
|
956
|
+
}
|
|
957
|
+
export interface AccountPriceUpdateParams {
|
|
958
|
+
/**
|
|
959
|
+
* Query param: Sub-objects to expand in the response. When omitted, sub-objects
|
|
960
|
+
* are returned as `null`.
|
|
961
|
+
*/
|
|
962
|
+
include?: Array<'recipient_account' | 'product_line' | 'categories' | 'attributes'>;
|
|
963
|
+
/**
|
|
964
|
+
* Body param: Attribute IDs to constrain this price to.
|
|
965
|
+
*
|
|
966
|
+
* When provided, replaces the existing set of attributes entirely; an empty list
|
|
967
|
+
* removes all attribute constraints.
|
|
968
|
+
*/
|
|
969
|
+
attribute_ids?: Array<string>;
|
|
970
|
+
/**
|
|
971
|
+
* Body param: Item category IDs to record on this price.
|
|
972
|
+
*
|
|
973
|
+
* When provided, replaces the existing set of categories entirely; an empty list
|
|
974
|
+
* removes them all. Categories are recorded only — they do not narrow which
|
|
975
|
+
* products the price applies to.
|
|
976
|
+
*/
|
|
977
|
+
category_ids?: Array<string>;
|
|
978
|
+
/**
|
|
979
|
+
* Body param: ID of the product line whose products this price applies to.
|
|
980
|
+
*/
|
|
981
|
+
product_line_id?: string;
|
|
982
|
+
/**
|
|
983
|
+
* Body param: A value expressed as a ratio of two units, supplied on create and
|
|
984
|
+
* update requests.
|
|
985
|
+
*
|
|
986
|
+
* A unit price, for example, has a currency as its numerator unit and the unit the
|
|
987
|
+
* product is bought or sold by as its denominator.
|
|
988
|
+
*/
|
|
989
|
+
rate?: MaterialsAPI.RateInput;
|
|
990
|
+
/**
|
|
991
|
+
* Body param: ID of the customer this price is offered to.
|
|
992
|
+
*/
|
|
993
|
+
recipient_account_id?: string;
|
|
994
|
+
}
|
|
995
|
+
export declare namespace AccountPrices {
|
|
996
|
+
export { type AccountPrice as AccountPrice, type Carrier as Carrier, type CreateAccountPriceRequest as CreateAccountPriceRequest, type Customer as Customer, type CustomerContactInfo as CustomerContactInfo, type CustomerDefaults as CustomerDefaults, type CustomerFreightPreferences as CustomerFreightPreferences, type CustomerNotificationPreferences as CustomerNotificationPreferences, type ListAccountPrice as ListAccountPrice, type ListCustomer as ListCustomer, type ListServiceLevel as ListServiceLevel, type PaymentTerm as PaymentTerm, type Priority as Priority, type ServiceLevel as ServiceLevel, type ShippingTerm as ShippingTerm, type UpdateAccountPriceRequest as UpdateAccountPriceRequest, type AccountPriceDeleteResponse as AccountPriceDeleteResponse, type AccountPriceListParams as AccountPriceListParams, type AccountPriceRetrieveParams as AccountPriceRetrieveParams, type AccountPriceCreateParams as AccountPriceCreateParams, type AccountPriceUpdateParams as AccountPriceUpdateParams, };
|
|
997
|
+
export { Actions as Actions, type ExportPriceListRequest as ExportPriceListRequest, type ActionExportPriceListParams as ActionExportPriceListParams, };
|
|
998
|
+
}
|
|
999
|
+
//# sourceMappingURL=account-prices.d.ts.map
|