conductor-node 12.0.0-beta.8 → 12.0.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 +194 -0
- package/README.md +2 -4
- package/_shims/index.d.ts +2 -0
- package/_shims/index.js +5 -1
- package/_shims/index.mjs +5 -1
- package/core.d.ts.map +1 -1
- package/core.js +5 -2
- package/core.js.map +1 -1
- package/core.mjs +6 -3
- package/core.mjs.map +1 -1
- package/index.d.mts +4 -4
- package/index.d.ts +4 -4
- package/index.d.ts.map +1 -1
- package/index.js.map +1 -1
- package/index.mjs.map +1 -1
- package/package.json +8 -29
- package/pagination.js +1 -1
- package/pagination.js.map +1 -1
- package/pagination.mjs +1 -1
- package/pagination.mjs.map +1 -1
- package/resources/auth-sessions.d.ts +12 -12
- package/resources/auth-sessions.js +3 -3
- package/resources/auth-sessions.mjs +3 -3
- package/resources/end-users.d.ts +20 -32
- package/resources/end-users.d.ts.map +1 -1
- package/resources/end-users.js +4 -12
- package/resources/end-users.js.map +1 -1
- package/resources/end-users.mjs +4 -12
- package/resources/end-users.mjs.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/qbd/account-tax-lines.d.ts +48 -0
- package/resources/qbd/account-tax-lines.d.ts.map +1 -0
- package/resources/qbd/account-tax-lines.js +21 -0
- package/resources/qbd/account-tax-lines.js.map +1 -0
- package/resources/qbd/account-tax-lines.mjs +17 -0
- package/resources/qbd/account-tax-lines.mjs.map +1 -0
- package/resources/qbd/accounts.d.ts +9 -3
- package/resources/qbd/accounts.d.ts.map +1 -1
- package/resources/qbd/bill-check-payments.d.ts +4 -4
- package/resources/qbd/bill-credit-card-payments.d.ts +4 -4
- package/resources/qbd/bills.d.ts +7 -8
- package/resources/qbd/bills.d.ts.map +1 -1
- package/resources/qbd/bills.js.map +1 -1
- package/resources/qbd/bills.mjs.map +1 -1
- package/resources/qbd/checks.d.ts +4 -4
- package/resources/qbd/company.d.ts +354 -0
- package/resources/qbd/company.d.ts.map +1 -0
- package/resources/qbd/company.js +22 -0
- package/resources/qbd/company.js.map +1 -0
- package/resources/qbd/company.mjs +18 -0
- package/resources/qbd/company.mjs.map +1 -0
- package/resources/qbd/credit-card-charges.d.ts +4 -4
- package/resources/qbd/credit-card-credits.d.ts +4 -4
- package/resources/qbd/credit-memos.d.ts +4 -4
- package/resources/qbd/customers.d.ts +2 -2
- package/resources/qbd/customers.d.ts.map +1 -1
- package/resources/qbd/employees.d.ts +17 -6
- package/resources/qbd/employees.d.ts.map +1 -1
- package/resources/qbd/employees.js.map +1 -1
- package/resources/qbd/employees.mjs.map +1 -1
- package/resources/qbd/estimates.d.ts +4 -4
- package/resources/qbd/index.d.ts +7 -1
- package/resources/qbd/index.d.ts.map +1 -1
- package/resources/qbd/index.js +16 -2
- package/resources/qbd/index.js.map +1 -1
- package/resources/qbd/index.mjs +6 -0
- package/resources/qbd/index.mjs.map +1 -1
- package/resources/qbd/inventory-adjustments.d.ts +4 -4
- package/resources/qbd/invoices.d.ts +4 -4
- package/resources/qbd/item-receipts.d.ts +2336 -0
- package/resources/qbd/item-receipts.d.ts.map +1 -0
- package/resources/qbd/item-receipts.js +69 -0
- package/resources/qbd/item-receipts.js.map +1 -0
- package/resources/qbd/item-receipts.mjs +64 -0
- package/resources/qbd/item-receipts.mjs.map +1 -0
- package/resources/qbd/journal-entries.d.ts +4 -4
- package/resources/qbd/preferences.d.ts +591 -0
- package/resources/qbd/preferences.d.ts.map +1 -0
- package/resources/qbd/preferences.js +21 -0
- package/resources/qbd/preferences.js.map +1 -0
- package/resources/qbd/preferences.mjs +17 -0
- package/resources/qbd/preferences.mjs.map +1 -0
- package/resources/qbd/price-levels.d.ts +454 -0
- package/resources/qbd/price-levels.d.ts.map +1 -0
- package/resources/qbd/price-levels.js +54 -0
- package/resources/qbd/price-levels.js.map +1 -0
- package/resources/qbd/price-levels.mjs +50 -0
- package/resources/qbd/price-levels.mjs.map +1 -0
- package/resources/qbd/purchase-orders.d.ts +4 -4
- package/resources/qbd/qbd.d.ts +52 -0
- package/resources/qbd/qbd.d.ts.map +1 -1
- package/resources/qbd/qbd.js +39 -0
- package/resources/qbd/qbd.js.map +1 -1
- package/resources/qbd/qbd.mjs +39 -0
- package/resources/qbd/qbd.mjs.map +1 -1
- package/resources/qbd/receive-payments.d.ts +4 -4
- package/resources/qbd/sales-orders.d.ts +4 -4
- package/resources/qbd/sales-receipts.d.ts +4 -4
- package/resources/qbd/sales-representatives.d.ts +4 -0
- package/resources/qbd/sales-representatives.d.ts.map +1 -1
- package/resources/qbd/time-tracking-activities.d.ts +14 -12
- package/resources/qbd/time-tracking-activities.d.ts.map +1 -1
- package/resources/qbd/time-tracking-activities.js.map +1 -1
- package/resources/qbd/time-tracking-activities.mjs.map +1 -1
- package/resources/qbd/transactions.d.ts +310 -0
- package/resources/qbd/transactions.d.ts.map +1 -0
- package/resources/qbd/transactions.js +40 -0
- package/resources/qbd/transactions.js.map +1 -0
- package/resources/qbd/transactions.mjs +35 -0
- package/resources/qbd/transactions.mjs.map +1 -0
- package/resources/qbd/transfers.d.ts +4 -4
- package/resources/qbd/vendor-credits.d.ts +4 -4
- package/resources/qbd/vendors.d.ts +6 -6
- package/resources/qbd/vendors.d.ts.map +1 -1
- package/resources/qbd.d.ts +2 -0
- package/resources/qbd.d.ts.map +1 -0
- package/resources/qbd.js +19 -0
- package/resources/qbd.js.map +1 -0
- package/resources/qbd.mjs +3 -0
- package/resources/qbd.mjs.map +1 -0
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +18 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/_shims/index.d.ts +2 -0
- package/src/_shims/index.js +5 -1
- package/src/_shims/index.mjs +5 -1
- package/src/core.ts +9 -4
- package/src/index.ts +6 -4
- package/src/pagination.ts +1 -1
- package/src/resources/auth-sessions.ts +12 -12
- package/src/resources/end-users.ts +19 -40
- package/src/resources/index.ts +1 -2
- package/src/resources/qbd/account-tax-lines.ts +70 -0
- package/src/resources/qbd/accounts.ts +9 -3
- package/src/resources/qbd/bill-check-payments.ts +4 -4
- package/src/resources/qbd/bill-credit-card-payments.ts +4 -4
- package/src/resources/qbd/bills.ts +7 -8
- package/src/resources/qbd/checks.ts +4 -4
- package/src/resources/qbd/company.ts +466 -0
- package/src/resources/qbd/credit-card-charges.ts +4 -4
- package/src/resources/qbd/credit-card-credits.ts +4 -4
- package/src/resources/qbd/credit-memos.ts +4 -4
- package/src/resources/qbd/customers.ts +2 -2
- package/src/resources/qbd/employees.ts +18 -6
- package/src/resources/qbd/estimates.ts +4 -4
- package/src/resources/qbd/index.ts +36 -1
- package/src/resources/qbd/inventory-adjustments.ts +4 -4
- package/src/resources/qbd/invoices.ts +4 -4
- package/src/resources/qbd/item-receipts.ts +2783 -0
- package/src/resources/qbd/journal-entries.ts +4 -4
- package/src/resources/qbd/preferences.ts +684 -0
- package/src/resources/qbd/price-levels.ts +561 -0
- package/src/resources/qbd/purchase-orders.ts +4 -4
- package/src/resources/qbd/qbd.ts +144 -0
- package/src/resources/qbd/receive-payments.ts +4 -4
- package/src/resources/qbd/sales-orders.ts +4 -4
- package/src/resources/qbd/sales-receipts.ts +4 -4
- package/src/resources/qbd/sales-representatives.ts +4 -0
- package/src/resources/qbd/time-tracking-activities.ts +14 -12
- package/src/resources/qbd/transactions.ts +439 -0
- package/src/resources/qbd/transfers.ts +4 -4
- package/src/resources/qbd/vendor-credits.ts +4 -4
- package/src/resources/qbd/vendors.ts +6 -6
- package/src/resources/qbd.ts +3 -0
- package/src/resources.ts +1 -0
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
|
@@ -0,0 +1,561 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../resource';
|
|
4
|
+
import * as Core from '../../core';
|
|
5
|
+
|
|
6
|
+
export class PriceLevels extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Creates a new price level.
|
|
9
|
+
*/
|
|
10
|
+
create(params: PriceLevelCreateParams, options?: Core.RequestOptions): Core.APIPromise<PriceLevel> {
|
|
11
|
+
const { conductorEndUserId, ...body } = params;
|
|
12
|
+
return this._client.post('/quickbooks-desktop/price-levels', {
|
|
13
|
+
body,
|
|
14
|
+
...options,
|
|
15
|
+
headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Retrieves a price level by ID.
|
|
21
|
+
*/
|
|
22
|
+
retrieve(
|
|
23
|
+
id: string,
|
|
24
|
+
params: PriceLevelRetrieveParams,
|
|
25
|
+
options?: Core.RequestOptions,
|
|
26
|
+
): Core.APIPromise<PriceLevel> {
|
|
27
|
+
const { conductorEndUserId } = params;
|
|
28
|
+
return this._client.get(`/quickbooks-desktop/price-levels/${id}`, {
|
|
29
|
+
...options,
|
|
30
|
+
headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Updates an existing price level.
|
|
36
|
+
*/
|
|
37
|
+
update(
|
|
38
|
+
id: string,
|
|
39
|
+
params: PriceLevelUpdateParams,
|
|
40
|
+
options?: Core.RequestOptions,
|
|
41
|
+
): Core.APIPromise<PriceLevel> {
|
|
42
|
+
const { conductorEndUserId, ...body } = params;
|
|
43
|
+
return this._client.post(`/quickbooks-desktop/price-levels/${id}`, {
|
|
44
|
+
body,
|
|
45
|
+
...options,
|
|
46
|
+
headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Returns a list of price levels. NOTE: QuickBooks Desktop does not support
|
|
52
|
+
* pagination for price levels; hence, there is no `cursor` parameter. Users
|
|
53
|
+
* typically have few price levels.
|
|
54
|
+
*/
|
|
55
|
+
list(params: PriceLevelListParams, options?: Core.RequestOptions): Core.APIPromise<PriceLevelListResponse> {
|
|
56
|
+
const { conductorEndUserId, ...query } = params;
|
|
57
|
+
return this._client.get('/quickbooks-desktop/price-levels', {
|
|
58
|
+
query,
|
|
59
|
+
...options,
|
|
60
|
+
headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface PriceLevel {
|
|
66
|
+
/**
|
|
67
|
+
* The unique identifier assigned by QuickBooks to this price level. This ID is
|
|
68
|
+
* unique across all price levels but not across different QuickBooks object types.
|
|
69
|
+
*/
|
|
70
|
+
id: string;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* The date and time when this price level was created, in ISO 8601 format
|
|
74
|
+
* (YYYY-MM-DDThh:mm:ss±hh:mm). The time zone is the same as the user's time zone
|
|
75
|
+
* in QuickBooks.
|
|
76
|
+
*/
|
|
77
|
+
createdAt: string;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* The price level's currency. For built-in currencies, the name and code are
|
|
81
|
+
* standard international values. For user-defined currencies, all values are
|
|
82
|
+
* editable.
|
|
83
|
+
*/
|
|
84
|
+
currency: PriceLevel.Currency | null;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The fixed percentage adjustment applied to all items for this price level
|
|
88
|
+
* (instead of a per-item price level). Once you create the price level, you cannot
|
|
89
|
+
* change this.
|
|
90
|
+
*
|
|
91
|
+
* When this price level is applied to a customer, it automatically adjusts the
|
|
92
|
+
* `rate` and `amount` columns for applicable line items in sales orders and
|
|
93
|
+
* invoices for that customer. This value supports both positive and negative
|
|
94
|
+
* values - a value of "20" increases prices by 20%, while "-10" decreases prices
|
|
95
|
+
* by 10%.
|
|
96
|
+
*/
|
|
97
|
+
fixedPercentage: string | null;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Indicates whether this price level is active. Inactive objects are typically
|
|
101
|
+
* hidden from views and reports in QuickBooks. Defaults to `true`.
|
|
102
|
+
*/
|
|
103
|
+
isActive: boolean;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* The case-insensitive unique name of this price level, unique across all price
|
|
107
|
+
* levels.
|
|
108
|
+
*
|
|
109
|
+
* **NOTE**: Price levels do not have a `fullName` field because they are not
|
|
110
|
+
* hierarchical objects, which is why `name` is unique for them but not for objects
|
|
111
|
+
* that have parents.
|
|
112
|
+
*/
|
|
113
|
+
name: string;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* The type of object. This value is always `"qbd_price_level"`.
|
|
117
|
+
*/
|
|
118
|
+
objectType: 'qbd_price_level';
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* The per-item price level configurations for this price level.
|
|
122
|
+
*/
|
|
123
|
+
perItemPriceLevels: Array<PriceLevel.PerItemPriceLevel>;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* The price level's type.
|
|
127
|
+
*/
|
|
128
|
+
priceLevelType: 'fixed_percentage' | 'per_item';
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* The current QuickBooks-assigned revision number of this price level object,
|
|
132
|
+
* which changes each time the object is modified. When updating this object, you
|
|
133
|
+
* must provide the most recent `revisionNumber` to ensure you're working with the
|
|
134
|
+
* latest data; otherwise, the update will return an error.
|
|
135
|
+
*/
|
|
136
|
+
revisionNumber: string;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* The date and time when this price level was last updated, in ISO 8601 format
|
|
140
|
+
* (YYYY-MM-DDThh:mm:ss±hh:mm). The time zone is the same as the user's time zone
|
|
141
|
+
* in QuickBooks.
|
|
142
|
+
*/
|
|
143
|
+
updatedAt: string;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export namespace PriceLevel {
|
|
147
|
+
/**
|
|
148
|
+
* The price level's currency. For built-in currencies, the name and code are
|
|
149
|
+
* standard international values. For user-defined currencies, all values are
|
|
150
|
+
* editable.
|
|
151
|
+
*/
|
|
152
|
+
export interface Currency {
|
|
153
|
+
/**
|
|
154
|
+
* The unique identifier assigned by QuickBooks to this object. This ID is unique
|
|
155
|
+
* across all objects of the same type, but not across different QuickBooks object
|
|
156
|
+
* types.
|
|
157
|
+
*/
|
|
158
|
+
id: string | null;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* The fully-qualified unique name for this object, formed by combining the names
|
|
162
|
+
* of its parent objects with its own `name`, separated by colons. Not
|
|
163
|
+
* case-sensitive.
|
|
164
|
+
*/
|
|
165
|
+
fullName: string | null;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export interface PerItemPriceLevel {
|
|
169
|
+
/**
|
|
170
|
+
* The fixed amount custom price for this per-item price level that overrides the
|
|
171
|
+
* standard price for the specified item. Used when setting an absolute price value
|
|
172
|
+
* for the item in this price level.
|
|
173
|
+
*/
|
|
174
|
+
customPrice: string | null;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* The fixed discount percentage for this per-item price level that modifies the
|
|
178
|
+
* specified item's standard price. Used to create a fixed percentage markup or
|
|
179
|
+
* discount specific to this item within this price level.
|
|
180
|
+
*/
|
|
181
|
+
customPricePercent: string | null;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* The item associated with this per-item price level. This can refer to any good
|
|
185
|
+
* or service that the business buys or sells, including item types such as a
|
|
186
|
+
* service item, inventory item, or special calculation item like a discount item
|
|
187
|
+
* or sales-tax item.
|
|
188
|
+
*/
|
|
189
|
+
item: PerItemPriceLevel.Item | null;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export namespace PerItemPriceLevel {
|
|
193
|
+
/**
|
|
194
|
+
* The item associated with this per-item price level. This can refer to any good
|
|
195
|
+
* or service that the business buys or sells, including item types such as a
|
|
196
|
+
* service item, inventory item, or special calculation item like a discount item
|
|
197
|
+
* or sales-tax item.
|
|
198
|
+
*/
|
|
199
|
+
export interface Item {
|
|
200
|
+
/**
|
|
201
|
+
* The unique identifier assigned by QuickBooks to this object. This ID is unique
|
|
202
|
+
* across all objects of the same type, but not across different QuickBooks object
|
|
203
|
+
* types.
|
|
204
|
+
*/
|
|
205
|
+
id: string | null;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* The fully-qualified unique name for this object, formed by combining the names
|
|
209
|
+
* of its parent objects with its own `name`, separated by colons. Not
|
|
210
|
+
* case-sensitive.
|
|
211
|
+
*/
|
|
212
|
+
fullName: string | null;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export interface PriceLevelListResponse {
|
|
218
|
+
/**
|
|
219
|
+
* The array of price levels.
|
|
220
|
+
*/
|
|
221
|
+
data: Array<PriceLevel>;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* The type of object. This value is always `"list"`.
|
|
225
|
+
*/
|
|
226
|
+
objectType: 'list';
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* The endpoint URL where this list can be accessed.
|
|
230
|
+
*/
|
|
231
|
+
url: string;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export interface PriceLevelCreateParams {
|
|
235
|
+
/**
|
|
236
|
+
* Body param: The case-insensitive unique name of this price level, unique across
|
|
237
|
+
* all price levels.
|
|
238
|
+
*
|
|
239
|
+
* **NOTE**: Price levels do not have a `fullName` field because they are not
|
|
240
|
+
* hierarchical objects, which is why `name` is unique for them but not for objects
|
|
241
|
+
* that have parents.
|
|
242
|
+
*
|
|
243
|
+
* Maximum length: 31 characters.
|
|
244
|
+
*/
|
|
245
|
+
name: string;
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Header param: The ID of the EndUser to receive this request (e.g.,
|
|
249
|
+
* `"Conductor-End-User-Id: {{END_USER_ID}}"`).
|
|
250
|
+
*/
|
|
251
|
+
conductorEndUserId: string;
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Body param: The price level's currency. For built-in currencies, the name and
|
|
255
|
+
* code are standard international values. For user-defined currencies, all values
|
|
256
|
+
* are editable.
|
|
257
|
+
*/
|
|
258
|
+
currencyId?: string;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Body param: The fixed percentage adjustment applied to all items for this price
|
|
262
|
+
* level (instead of a per-item price level). Once you create the price level, you
|
|
263
|
+
* cannot change this.
|
|
264
|
+
*
|
|
265
|
+
* When this price level is applied to a customer, it automatically adjusts the
|
|
266
|
+
* `rate` and `amount` columns for applicable line items in sales orders and
|
|
267
|
+
* invoices for that customer. This value supports both positive and negative
|
|
268
|
+
* values - a value of "20" increases prices by 20%, while "-10" decreases prices
|
|
269
|
+
* by 10%.
|
|
270
|
+
*/
|
|
271
|
+
fixedPercentage?: string;
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Body param: Indicates whether this price level is active. Inactive objects are
|
|
275
|
+
* typically hidden from views and reports in QuickBooks. Defaults to `true`.
|
|
276
|
+
*/
|
|
277
|
+
isActive?: boolean;
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Body param: The per-item price level configurations for this price level.
|
|
281
|
+
*/
|
|
282
|
+
perItemPriceLevels?: Array<PriceLevelCreateParams.PerItemPriceLevel>;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
export namespace PriceLevelCreateParams {
|
|
286
|
+
export interface PerItemPriceLevel {
|
|
287
|
+
/**
|
|
288
|
+
* The percentage adjustment for this per-item price level when using relative
|
|
289
|
+
* pricing. Specifies a percentage to modify pricing, using positive values (e.g.,
|
|
290
|
+
* "20") to increase prices by that percentage, or negative values (e.g., "-10") to
|
|
291
|
+
* apply a discount.
|
|
292
|
+
*/
|
|
293
|
+
adjustPercentage: string;
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* The base value reference for this per-item price level's percentage adjustment.
|
|
297
|
+
* Specifies which price to use as the starting point for the adjustment
|
|
298
|
+
* calculation in the price level.
|
|
299
|
+
*
|
|
300
|
+
* **NOTE:** The price level must use either a fixed pricing approach
|
|
301
|
+
* (`customPrice` or `customPricePercent`) or a relative adjustment approach
|
|
302
|
+
* (`adjustPercentage` with `adjustRelativeTo`) when configuring per-item price
|
|
303
|
+
* levels.
|
|
304
|
+
*/
|
|
305
|
+
adjustRelativeTo: 'cost' | 'current_custom_price' | 'standard_price';
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* The fixed amount custom price for this per-item price level that overrides the
|
|
309
|
+
* standard price for the specified item. Used when setting an absolute price value
|
|
310
|
+
* for the item in this price level.
|
|
311
|
+
*/
|
|
312
|
+
customPrice?: string;
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* The fixed discount percentage for this per-item price level that modifies the
|
|
316
|
+
* specified item's standard price. Used to create a fixed percentage markup or
|
|
317
|
+
* discount specific to this item within this price level.
|
|
318
|
+
*/
|
|
319
|
+
customPricePercent?: string;
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* The item associated with this per-item price level. This can refer to any good
|
|
323
|
+
* or service that the business buys or sells, including item types such as a
|
|
324
|
+
* service item, inventory item, or special calculation item like a discount item
|
|
325
|
+
* or sales-tax item.
|
|
326
|
+
*/
|
|
327
|
+
itemId?: string;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
export interface PriceLevelRetrieveParams {
|
|
332
|
+
/**
|
|
333
|
+
* The ID of the EndUser to receive this request (e.g.,
|
|
334
|
+
* `"Conductor-End-User-Id: {{END_USER_ID}}"`).
|
|
335
|
+
*/
|
|
336
|
+
conductorEndUserId: string;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
export interface PriceLevelUpdateParams {
|
|
340
|
+
/**
|
|
341
|
+
* Body param: The current QuickBooks-assigned revision number of the price level
|
|
342
|
+
* object you are updating, which you can get by fetching the object first. Provide
|
|
343
|
+
* the most recent `revisionNumber` to ensure you're working with the latest data;
|
|
344
|
+
* otherwise, the update will return an error.
|
|
345
|
+
*/
|
|
346
|
+
revisionNumber: string;
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* Header param: The ID of the EndUser to receive this request (e.g.,
|
|
350
|
+
* `"Conductor-End-User-Id: {{END_USER_ID}}"`).
|
|
351
|
+
*/
|
|
352
|
+
conductorEndUserId: string;
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* Body param: The price level's currency. For built-in currencies, the name and
|
|
356
|
+
* code are standard international values. For user-defined currencies, all values
|
|
357
|
+
* are editable.
|
|
358
|
+
*/
|
|
359
|
+
currencyId?: string;
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* Body param: The fixed percentage adjustment applied to all items for this price
|
|
363
|
+
* level (instead of a per-item price level). Once you create the price level, you
|
|
364
|
+
* cannot change this.
|
|
365
|
+
*
|
|
366
|
+
* When this price level is applied to a customer, it automatically adjusts the
|
|
367
|
+
* `rate` and `amount` columns for applicable line items in sales orders and
|
|
368
|
+
* invoices for that customer. This value supports both positive and negative
|
|
369
|
+
* values - a value of "20" increases prices by 20%, while "-10" decreases prices
|
|
370
|
+
* by 10%.
|
|
371
|
+
*/
|
|
372
|
+
fixedPercentage?: string;
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Body param: Indicates whether this price level is active. Inactive objects are
|
|
376
|
+
* typically hidden from views and reports in QuickBooks. Defaults to `true`.
|
|
377
|
+
*/
|
|
378
|
+
isActive?: boolean;
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Body param: The case-insensitive unique name of this price level, unique across
|
|
382
|
+
* all price levels.
|
|
383
|
+
*
|
|
384
|
+
* **NOTE**: Price levels do not have a `fullName` field because they are not
|
|
385
|
+
* hierarchical objects, which is why `name` is unique for them but not for objects
|
|
386
|
+
* that have parents.
|
|
387
|
+
*
|
|
388
|
+
* Maximum length: 31 characters.
|
|
389
|
+
*/
|
|
390
|
+
name?: string;
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* Body param: The per-item price level configurations for this price level.
|
|
394
|
+
*/
|
|
395
|
+
perItemPriceLevels?: Array<PriceLevelUpdateParams.PerItemPriceLevel>;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
export namespace PriceLevelUpdateParams {
|
|
399
|
+
export interface PerItemPriceLevel {
|
|
400
|
+
/**
|
|
401
|
+
* The percentage adjustment for this per-item price level when using relative
|
|
402
|
+
* pricing. Specifies a percentage to modify pricing, using positive values (e.g.,
|
|
403
|
+
* "20") to increase prices by that percentage, or negative values (e.g., "-10") to
|
|
404
|
+
* apply a discount.
|
|
405
|
+
*/
|
|
406
|
+
adjustPercentage: string;
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* The base value reference for this per-item price level's percentage adjustment.
|
|
410
|
+
* Specifies which price to use as the starting point for the adjustment
|
|
411
|
+
* calculation in the price level.
|
|
412
|
+
*
|
|
413
|
+
* **NOTE:** The price level must use either a fixed pricing approach
|
|
414
|
+
* (`customPrice` or `customPricePercent`) or a relative adjustment approach
|
|
415
|
+
* (`adjustPercentage` with `adjustRelativeTo`) when configuring per-item price
|
|
416
|
+
* levels.
|
|
417
|
+
*/
|
|
418
|
+
adjustRelativeTo: 'cost' | 'current_custom_price' | 'standard_price';
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* The fixed amount custom price for this per-item price level that overrides the
|
|
422
|
+
* standard price for the specified item. Used when setting an absolute price value
|
|
423
|
+
* for the item in this price level.
|
|
424
|
+
*/
|
|
425
|
+
customPrice?: string;
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* The fixed discount percentage for this per-item price level that modifies the
|
|
429
|
+
* specified item's standard price. Used to create a fixed percentage markup or
|
|
430
|
+
* discount specific to this item within this price level.
|
|
431
|
+
*/
|
|
432
|
+
customPricePercent?: string;
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* The item associated with this per-item price level. This can refer to any good
|
|
436
|
+
* or service that the business buys or sells, including item types such as a
|
|
437
|
+
* service item, inventory item, or special calculation item like a discount item
|
|
438
|
+
* or sales-tax item.
|
|
439
|
+
*/
|
|
440
|
+
itemId?: string;
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
export interface PriceLevelListParams {
|
|
445
|
+
/**
|
|
446
|
+
* Header param: The ID of the EndUser to receive this request (e.g.,
|
|
447
|
+
* `"Conductor-End-User-Id: {{END_USER_ID}}"`).
|
|
448
|
+
*/
|
|
449
|
+
conductorEndUserId: string;
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* Query param: Filter for price levels in these currencies.
|
|
453
|
+
*/
|
|
454
|
+
currencyIds?: Array<string>;
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* Query param: Filter for specific price levels by their QuickBooks-assigned
|
|
458
|
+
* unique identifier(s).
|
|
459
|
+
*
|
|
460
|
+
* **IMPORTANT**: If you include this parameter, QuickBooks will ignore all other
|
|
461
|
+
* query parameters for this request.
|
|
462
|
+
*
|
|
463
|
+
* **NOTE**: If any of the values you specify in this parameter are not found, the
|
|
464
|
+
* request will return an error.
|
|
465
|
+
*/
|
|
466
|
+
ids?: Array<string>;
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* Query param: Filter for price levels containing these items.
|
|
470
|
+
*/
|
|
471
|
+
itemIds?: Array<string>;
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* Query param: The maximum number of objects to return.
|
|
475
|
+
*
|
|
476
|
+
* **IMPORTANT**: QuickBooks Desktop does not support cursor-based pagination for
|
|
477
|
+
* price levels. This parameter will limit the response size, but you cannot fetch
|
|
478
|
+
* subsequent results using a cursor. For pagination, use the name-range parameters
|
|
479
|
+
* instead (e.g., `nameFrom=A&nameTo=B`).
|
|
480
|
+
*
|
|
481
|
+
* When this parameter is omitted, the endpoint returns all price levels without
|
|
482
|
+
* limit, unlike paginated endpoints which default to 150 records. This is
|
|
483
|
+
* acceptable because price levels typically have low record counts.
|
|
484
|
+
*/
|
|
485
|
+
limit?: number;
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* Query param: Filter for price levels whose `name` contains this substring,
|
|
489
|
+
* case-insensitive. NOTE: If you use this parameter, you cannot also use
|
|
490
|
+
* `nameStartsWith` or `nameEndsWith`.
|
|
491
|
+
*/
|
|
492
|
+
nameContains?: string;
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* Query param: Filter for price levels whose `name` ends with this substring,
|
|
496
|
+
* case-insensitive. NOTE: If you use this parameter, you cannot also use
|
|
497
|
+
* `nameContains` or `nameStartsWith`.
|
|
498
|
+
*/
|
|
499
|
+
nameEndsWith?: string;
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* Query param: Filter for price levels whose `name` is alphabetically greater than
|
|
503
|
+
* or equal to this value.
|
|
504
|
+
*/
|
|
505
|
+
nameFrom?: string;
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* Query param: Filter for specific price levels by their name(s),
|
|
509
|
+
* case-insensitive. Like `id`, `name` is a unique identifier for a price level.
|
|
510
|
+
*
|
|
511
|
+
* **IMPORTANT**: If you include this parameter, QuickBooks will ignore all other
|
|
512
|
+
* query parameters for this request.
|
|
513
|
+
*
|
|
514
|
+
* **NOTE**: If any of the values you specify in this parameter are not found, the
|
|
515
|
+
* request will return an error.
|
|
516
|
+
*/
|
|
517
|
+
names?: Array<string>;
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* Query param: Filter for price levels whose `name` starts with this substring,
|
|
521
|
+
* case-insensitive. NOTE: If you use this parameter, you cannot also use
|
|
522
|
+
* `nameContains` or `nameEndsWith`.
|
|
523
|
+
*/
|
|
524
|
+
nameStartsWith?: string;
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* Query param: Filter for price levels whose `name` is alphabetically less than or
|
|
528
|
+
* equal to this value.
|
|
529
|
+
*/
|
|
530
|
+
nameTo?: string;
|
|
531
|
+
|
|
532
|
+
/**
|
|
533
|
+
* Query param: Filter for price levels that are active, inactive, or both.
|
|
534
|
+
*/
|
|
535
|
+
status?: 'active' | 'all' | 'inactive';
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* Query param: Filter for price levels updated on or after this date and time, in
|
|
539
|
+
* ISO 8601 format (YYYY-MM-DDTHH:mm:ss). If you only provide a date (YYYY-MM-DD),
|
|
540
|
+
* the time is assumed to be 00:00:00 of that day.
|
|
541
|
+
*/
|
|
542
|
+
updatedAfter?: string;
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* Query param: Filter for price levels updated on or before this date and time, in
|
|
546
|
+
* ISO 8601 format (YYYY-MM-DDTHH:mm:ss). If you only provide a date (YYYY-MM-DD),
|
|
547
|
+
* the time is assumed to be 23:59:59 of that day.
|
|
548
|
+
*/
|
|
549
|
+
updatedBefore?: string;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
export declare namespace PriceLevels {
|
|
553
|
+
export {
|
|
554
|
+
type PriceLevel as PriceLevel,
|
|
555
|
+
type PriceLevelListResponse as PriceLevelListResponse,
|
|
556
|
+
type PriceLevelCreateParams as PriceLevelCreateParams,
|
|
557
|
+
type PriceLevelRetrieveParams as PriceLevelRetrieveParams,
|
|
558
|
+
type PriceLevelUpdateParams as PriceLevelUpdateParams,
|
|
559
|
+
type PriceLevelListParams as PriceLevelListParams,
|
|
560
|
+
};
|
|
561
|
+
}
|
|
@@ -2990,14 +2990,14 @@ export interface PurchaseOrderListParams extends CursorPageParams {
|
|
|
2990
2990
|
refNumberTo?: string;
|
|
2991
2991
|
|
|
2992
2992
|
/**
|
|
2993
|
-
* Query param: Filter for purchase orders
|
|
2994
|
-
* 8601 format (YYYY-MM-DD).
|
|
2993
|
+
* Query param: Filter for purchase orders whose `date` field is on or after this
|
|
2994
|
+
* date, in ISO 8601 format (YYYY-MM-DD).
|
|
2995
2995
|
*/
|
|
2996
2996
|
transactionDateFrom?: string;
|
|
2997
2997
|
|
|
2998
2998
|
/**
|
|
2999
|
-
* Query param: Filter for purchase orders
|
|
3000
|
-
* 8601 format (YYYY-MM-DD).
|
|
2999
|
+
* Query param: Filter for purchase orders whose `date` field is on or before this
|
|
3000
|
+
* date, in ISO 8601 format (YYYY-MM-DD).
|
|
3001
3001
|
*/
|
|
3002
3002
|
transactionDateTo?: string;
|
|
3003
3003
|
|