conductor-node 14.2.1 → 14.3.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.
@@ -464,6 +464,15 @@ import {
464
464
  ServiceItems,
465
465
  ServiceItemsCursorPage,
466
466
  } from './service-items';
467
+ import * as ShippingMethodsAPI from './shipping-methods';
468
+ import {
469
+ ShippingMethod,
470
+ ShippingMethodCreateParams,
471
+ ShippingMethodListParams,
472
+ ShippingMethodListResponse,
473
+ ShippingMethodRetrieveParams,
474
+ ShippingMethods,
475
+ } from './shipping-methods';
467
476
  import * as StandardTermsAPI from './standard-terms';
468
477
  import {
469
478
  StandardTerm,
@@ -618,6 +627,7 @@ export class Qbd extends APIResource {
618
627
  salesTaxCodes: SalesTaxCodesAPI.SalesTaxCodes = new SalesTaxCodesAPI.SalesTaxCodes(this._client);
619
628
  salesTaxItems: SalesTaxItemsAPI.SalesTaxItems = new SalesTaxItemsAPI.SalesTaxItems(this._client);
620
629
  serviceItems: ServiceItemsAPI.ServiceItems = new ServiceItemsAPI.ServiceItems(this._client);
630
+ shippingMethods: ShippingMethodsAPI.ShippingMethods = new ShippingMethodsAPI.ShippingMethods(this._client);
621
631
  standardTerms: StandardTermsAPI.StandardTerms = new StandardTermsAPI.StandardTerms(this._client);
622
632
  subtotalItems: SubtotalItemsAPI.SubtotalItems = new SubtotalItemsAPI.SubtotalItems(this._client);
623
633
  templates: TemplatesAPI.Templates = new TemplatesAPI.Templates(this._client);
@@ -719,6 +729,7 @@ Qbd.SalesRepresentatives = SalesRepresentatives;
719
729
  Qbd.SalesTaxCodes = SalesTaxCodes;
720
730
  Qbd.SalesTaxItems = SalesTaxItems;
721
731
  Qbd.ServiceItems = ServiceItems;
732
+ Qbd.ShippingMethods = ShippingMethods;
722
733
  Qbd.StandardTerms = StandardTerms;
723
734
  Qbd.SubtotalItems = SubtotalItems;
724
735
  Qbd.Templates = Templates;
@@ -1202,6 +1213,15 @@ export declare namespace Qbd {
1202
1213
  type ServiceItemListParams as ServiceItemListParams,
1203
1214
  };
1204
1215
 
1216
+ export {
1217
+ ShippingMethods as ShippingMethods,
1218
+ type ShippingMethod as ShippingMethod,
1219
+ type ShippingMethodListResponse as ShippingMethodListResponse,
1220
+ type ShippingMethodCreateParams as ShippingMethodCreateParams,
1221
+ type ShippingMethodRetrieveParams as ShippingMethodRetrieveParams,
1222
+ type ShippingMethodListParams as ShippingMethodListParams,
1223
+ };
1224
+
1205
1225
  export {
1206
1226
  StandardTerms as StandardTerms,
1207
1227
  type StandardTerm as StandardTerm,
@@ -0,0 +1,310 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import { APIPromise } from '../../core/api-promise';
5
+ import { buildHeaders } from '../../internal/headers';
6
+ import { RequestOptions } from '../../internal/request-options';
7
+ import { path } from '../../internal/utils/path';
8
+
9
+ export class ShippingMethods extends APIResource {
10
+ /**
11
+ * Creates a new shipping method.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const shippingMethod =
16
+ * await conductor.qbd.shippingMethods.create({
17
+ * name: 'FedEx Ground',
18
+ * conductorEndUserId: 'end_usr_1234567abcdefg',
19
+ * });
20
+ * ```
21
+ */
22
+ create(params: ShippingMethodCreateParams, options?: RequestOptions): APIPromise<ShippingMethod> {
23
+ const { conductorEndUserId, ...body } = params;
24
+ return this._client.post('/quickbooks-desktop/shipping-methods', {
25
+ body,
26
+ ...options,
27
+ headers: buildHeaders([{ 'Conductor-End-User-Id': conductorEndUserId }, options?.headers]),
28
+ });
29
+ }
30
+
31
+ /**
32
+ * Retrieves a shipping method by ID.
33
+ *
34
+ * **IMPORTANT:** If you need to fetch multiple specific shipping methods by ID,
35
+ * use the list endpoint instead with the `ids` parameter. It accepts an array of
36
+ * IDs so you can batch the request into a single call, which is significantly
37
+ * faster.
38
+ *
39
+ * @example
40
+ * ```ts
41
+ * const shippingMethod =
42
+ * await conductor.qbd.shippingMethods.retrieve(
43
+ * '80000001-1234567890',
44
+ * { conductorEndUserId: 'end_usr_1234567abcdefg' },
45
+ * );
46
+ * ```
47
+ */
48
+ retrieve(
49
+ id: string,
50
+ params: ShippingMethodRetrieveParams,
51
+ options?: RequestOptions,
52
+ ): APIPromise<ShippingMethod> {
53
+ const { conductorEndUserId } = params;
54
+ return this._client.get(path`/quickbooks-desktop/shipping-methods/${id}`, {
55
+ ...options,
56
+ headers: buildHeaders([{ 'Conductor-End-User-Id': conductorEndUserId }, options?.headers]),
57
+ });
58
+ }
59
+
60
+ /**
61
+ * Returns a list of shipping methods. NOTE: QuickBooks Desktop does not support
62
+ * pagination for shipping methods; hence, there is no `cursor` parameter. Users
63
+ * typically have few shipping methods.
64
+ *
65
+ * @example
66
+ * ```ts
67
+ * const shippingMethods =
68
+ * await conductor.qbd.shippingMethods.list({
69
+ * conductorEndUserId: 'end_usr_1234567abcdefg',
70
+ * });
71
+ * ```
72
+ */
73
+ list(params: ShippingMethodListParams, options?: RequestOptions): APIPromise<ShippingMethodListResponse> {
74
+ const { conductorEndUserId, ...query } = params;
75
+ return this._client.get('/quickbooks-desktop/shipping-methods', {
76
+ query,
77
+ ...options,
78
+ headers: buildHeaders([{ 'Conductor-End-User-Id': conductorEndUserId }, options?.headers]),
79
+ });
80
+ }
81
+ }
82
+
83
+ export interface ShippingMethod {
84
+ /**
85
+ * The unique identifier assigned by QuickBooks to this shipping method. This ID is
86
+ * unique across all shipping methods but not across different QuickBooks object
87
+ * types.
88
+ */
89
+ id: string;
90
+
91
+ /**
92
+ * The date and time when this shipping method was created, in ISO 8601 format
93
+ * (YYYY-MM-DDThh:mm:ss±hh:mm), which QuickBooks Desktop interprets in the local
94
+ * timezone of the end-user's computer.
95
+ */
96
+ createdAt: string;
97
+
98
+ /**
99
+ * Indicates whether this shipping method is active. Inactive objects are typically
100
+ * hidden from views and reports in QuickBooks. Defaults to `true`.
101
+ */
102
+ isActive: boolean;
103
+
104
+ /**
105
+ * The case-insensitive unique name of this shipping method, unique across all
106
+ * shipping methods.
107
+ *
108
+ * **NOTE**: Shipping methods do not have a `fullName` field because they are not
109
+ * hierarchical objects, which is why `name` is unique for them but not for objects
110
+ * that have parents.
111
+ */
112
+ name: string;
113
+
114
+ /**
115
+ * The type of object. This value is always `"qbd_shipping_method"`.
116
+ */
117
+ objectType: 'qbd_shipping_method';
118
+
119
+ /**
120
+ * The current QuickBooks-assigned revision number of this shipping method object,
121
+ * which changes each time the object is modified. When updating this object, you
122
+ * must provide the most recent `revisionNumber` to ensure you're working with the
123
+ * latest data; otherwise, the update will return an error.
124
+ */
125
+ revisionNumber: string;
126
+
127
+ /**
128
+ * The date and time when this shipping method was last updated, in ISO 8601 format
129
+ * (YYYY-MM-DDThh:mm:ss±hh:mm), which QuickBooks Desktop interprets in the local
130
+ * timezone of the end-user's computer.
131
+ */
132
+ updatedAt: string;
133
+ }
134
+
135
+ export interface ShippingMethodListResponse {
136
+ /**
137
+ * The array of shipping methods.
138
+ */
139
+ data: Array<ShippingMethod>;
140
+
141
+ /**
142
+ * The type of object. This value is always `"list"`.
143
+ */
144
+ objectType: 'list';
145
+
146
+ /**
147
+ * The endpoint URL where this list can be accessed.
148
+ */
149
+ url: string;
150
+ }
151
+
152
+ export interface ShippingMethodCreateParams {
153
+ /**
154
+ * Body param: The case-insensitive unique name of this shipping method, unique
155
+ * across all shipping methods.
156
+ *
157
+ * **NOTE**: Shipping methods do not have a `fullName` field because they are not
158
+ * hierarchical objects, which is why `name` is unique for them but not for objects
159
+ * that have parents.
160
+ *
161
+ * Maximum length: 15 characters.
162
+ */
163
+ name: string;
164
+
165
+ /**
166
+ * Header param: The ID of the End-User to receive this request.
167
+ */
168
+ conductorEndUserId: string;
169
+
170
+ /**
171
+ * Body param: Indicates whether this shipping method is active. Inactive objects
172
+ * are typically hidden from views and reports in QuickBooks. Defaults to `true`.
173
+ */
174
+ isActive?: boolean;
175
+ }
176
+
177
+ export interface ShippingMethodRetrieveParams {
178
+ /**
179
+ * The ID of the End-User to receive this request.
180
+ */
181
+ conductorEndUserId: string;
182
+ }
183
+
184
+ export interface ShippingMethodListParams {
185
+ /**
186
+ * Header param: The ID of the End-User to receive this request.
187
+ */
188
+ conductorEndUserId: string;
189
+
190
+ /**
191
+ * Query param: Filter for specific shipping methods by their QuickBooks-assigned
192
+ * unique identifier(s).
193
+ *
194
+ * **IMPORTANT**: If you include this parameter, QuickBooks will ignore all other
195
+ * query parameters for this request.
196
+ *
197
+ * **NOTE**: If any of the values you specify in this parameter are not found, the
198
+ * request will return an error.
199
+ */
200
+ ids?: Array<string>;
201
+
202
+ /**
203
+ * Query param: The maximum number of objects to return.
204
+ *
205
+ * **IMPORTANT**: QuickBooks Desktop does not support cursor-based pagination for
206
+ * shipping methods. This parameter will limit the response size, but you cannot
207
+ * fetch subsequent results using a cursor. For pagination, use the name-range
208
+ * parameters instead (e.g., `nameFrom=A&nameTo=B`).
209
+ *
210
+ * When this parameter is omitted, the endpoint returns all shipping methods
211
+ * without limit, unlike paginated endpoints which default to 150 records. This is
212
+ * acceptable because shipping methods typically have low record counts.
213
+ */
214
+ limit?: number;
215
+
216
+ /**
217
+ * Query param: Filter for shipping methods whose `name` contains this substring,
218
+ * case-insensitive.
219
+ *
220
+ * **NOTE**: If you use this parameter, you cannot also use `nameStartsWith` or
221
+ * `nameEndsWith`.
222
+ */
223
+ nameContains?: string;
224
+
225
+ /**
226
+ * Query param: Filter for shipping methods whose `name` ends with this substring,
227
+ * case-insensitive.
228
+ *
229
+ * **NOTE**: If you use this parameter, you cannot also use `nameContains` or
230
+ * `nameStartsWith`.
231
+ */
232
+ nameEndsWith?: string;
233
+
234
+ /**
235
+ * Query param: Filter for shipping methods whose `name` is alphabetically greater
236
+ * than or equal to this value.
237
+ */
238
+ nameFrom?: string;
239
+
240
+ /**
241
+ * Query param: Filter for specific shipping methods by their name(s),
242
+ * case-insensitive. Like `id`, `name` is a unique identifier for a shipping
243
+ * method.
244
+ *
245
+ * **IMPORTANT**: If you include this parameter, QuickBooks will ignore all other
246
+ * query parameters for this request.
247
+ *
248
+ * **NOTE**: If any of the values you specify in this parameter are not found, the
249
+ * request will return an error.
250
+ */
251
+ names?: Array<string>;
252
+
253
+ /**
254
+ * Query param: Filter for shipping methods whose `name` starts with this
255
+ * substring, case-insensitive.
256
+ *
257
+ * **NOTE**: If you use this parameter, you cannot also use `nameContains` or
258
+ * `nameEndsWith`.
259
+ */
260
+ nameStartsWith?: string;
261
+
262
+ /**
263
+ * Query param: Filter for shipping methods whose `name` is alphabetically less
264
+ * than or equal to this value.
265
+ */
266
+ nameTo?: string;
267
+
268
+ /**
269
+ * Query param: Filter for shipping methods that are active, inactive, or both.
270
+ */
271
+ status?: 'active' | 'all' | 'inactive';
272
+
273
+ /**
274
+ * Query param: Filter for shipping methods updated on or after this date/time.
275
+ * Accepts the following ISO 8601 formats:
276
+ *
277
+ * - **date-only** (YYYY-MM-DD) - QuickBooks Desktop interprets the date as the
278
+ * **start of the specified day** in the local timezone of the end-user's
279
+ * computer (e.g., `2025-01-01` → `2025-01-01T00:00:00`).
280
+ * - **datetime without timezone** (YYYY-MM-DDTHH:mm:ss) - QuickBooks Desktop
281
+ * interprets the timestamp in the local timezone of the end-user's computer.
282
+ * - **datetime with timezone** (YYYY-MM-DDTHH:mm:ss±HH:mm) - QuickBooks Desktop
283
+ * interprets the timestamp using the specified timezone.
284
+ */
285
+ updatedAfter?: string;
286
+
287
+ /**
288
+ * Query param: Filter for shipping methods updated on or before this date/time.
289
+ * Accepts the following ISO 8601 formats:
290
+ *
291
+ * - **date-only** (YYYY-MM-DD) - QuickBooks Desktop interprets the date as the
292
+ * **end of the specified day** in the local timezone of the end-user's computer
293
+ * (e.g., `2025-01-01` → `2025-01-01T23:59:59`).
294
+ * - **datetime without timezone** (YYYY-MM-DDTHH:mm:ss) - QuickBooks Desktop
295
+ * interprets the timestamp in the local timezone of the end-user's computer.
296
+ * - **datetime with timezone** (YYYY-MM-DDTHH:mm:ss±HH:mm) - QuickBooks Desktop
297
+ * interprets the timestamp using the specified timezone.
298
+ */
299
+ updatedBefore?: string;
300
+ }
301
+
302
+ export declare namespace ShippingMethods {
303
+ export {
304
+ type ShippingMethod as ShippingMethod,
305
+ type ShippingMethodListResponse as ShippingMethodListResponse,
306
+ type ShippingMethodCreateParams as ShippingMethodCreateParams,
307
+ type ShippingMethodRetrieveParams as ShippingMethodRetrieveParams,
308
+ type ShippingMethodListParams as ShippingMethodListParams,
309
+ };
310
+ }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '14.2.1'; // x-release-please-version
1
+ export const VERSION = '14.3.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "14.2.1";
1
+ export declare const VERSION = "14.3.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "14.2.1";
1
+ export declare const VERSION = "14.3.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '14.2.1'; // x-release-please-version
4
+ exports.VERSION = '14.3.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '14.2.1'; // x-release-please-version
1
+ export const VERSION = '14.3.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map