conductor-node 12.18.2 → 12.20.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.
Files changed (39) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/package.json +1 -1
  3. package/resources/qbd/index.d.ts +2 -0
  4. package/resources/qbd/index.d.ts.map +1 -1
  5. package/resources/qbd/index.js +7 -2
  6. package/resources/qbd/index.js.map +1 -1
  7. package/resources/qbd/index.mjs +2 -0
  8. package/resources/qbd/index.mjs.map +1 -1
  9. package/resources/qbd/inventory-items.d.ts +2 -3
  10. package/resources/qbd/inventory-items.d.ts.map +1 -1
  11. package/resources/qbd/inventory-items.js.map +1 -1
  12. package/resources/qbd/inventory-items.mjs.map +1 -1
  13. package/resources/qbd/other-charge-items.d.ts +933 -0
  14. package/resources/qbd/other-charge-items.d.ts.map +1 -0
  15. package/resources/qbd/other-charge-items.js +98 -0
  16. package/resources/qbd/other-charge-items.js.map +1 -0
  17. package/resources/qbd/other-charge-items.mjs +93 -0
  18. package/resources/qbd/other-charge-items.mjs.map +1 -0
  19. package/resources/qbd/qbd.d.ts +8 -0
  20. package/resources/qbd/qbd.d.ts.map +1 -1
  21. package/resources/qbd/qbd.js +9 -0
  22. package/resources/qbd/qbd.js.map +1 -1
  23. package/resources/qbd/qbd.mjs +9 -0
  24. package/resources/qbd/qbd.mjs.map +1 -1
  25. package/resources/qbd/templates.d.ts +107 -0
  26. package/resources/qbd/templates.d.ts.map +1 -0
  27. package/resources/qbd/templates.js +27 -0
  28. package/resources/qbd/templates.js.map +1 -0
  29. package/resources/qbd/templates.mjs +23 -0
  30. package/resources/qbd/templates.mjs.map +1 -0
  31. package/src/resources/qbd/index.ts +10 -0
  32. package/src/resources/qbd/inventory-items.ts +2 -3
  33. package/src/resources/qbd/other-charge-items.ts +1113 -0
  34. package/src/resources/qbd/qbd.ts +36 -0
  35. package/src/resources/qbd/templates.ts +144 -0
  36. package/src/version.ts +1 -1
  37. package/version.d.ts +1 -1
  38. package/version.js +1 -1
  39. package/version.mjs +1 -1
@@ -0,0 +1,1113 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from "../../resource.js";
4
+ import * as Core from "../../core.js";
5
+ import { CursorPage, type CursorPageParams } from "../../pagination.js";
6
+
7
+ export class OtherChargeItems extends APIResource {
8
+ /**
9
+ * Creates a new other charge item.
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const otherChargeItem =
14
+ * await conductor.qbd.otherChargeItems.create({
15
+ * name: 'Overnight Delivery',
16
+ * conductorEndUserId: 'end_usr_1234567abcdefg',
17
+ * });
18
+ * ```
19
+ */
20
+ create(
21
+ params: OtherChargeItemCreateParams,
22
+ options?: Core.RequestOptions,
23
+ ): Core.APIPromise<OtherChargeItem> {
24
+ const { conductorEndUserId, ...body } = params;
25
+ return this._client.post('/quickbooks-desktop/other-charge-items', {
26
+ body,
27
+ ...options,
28
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
29
+ });
30
+ }
31
+
32
+ /**
33
+ * Retrieves an other charge item by ID.
34
+ *
35
+ * @example
36
+ * ```ts
37
+ * const otherChargeItem =
38
+ * await conductor.qbd.otherChargeItems.retrieve(
39
+ * '80000001-1234567890',
40
+ * { conductorEndUserId: 'end_usr_1234567abcdefg' },
41
+ * );
42
+ * ```
43
+ */
44
+ retrieve(
45
+ id: string,
46
+ params: OtherChargeItemRetrieveParams,
47
+ options?: Core.RequestOptions,
48
+ ): Core.APIPromise<OtherChargeItem> {
49
+ const { conductorEndUserId } = params;
50
+ return this._client.get(`/quickbooks-desktop/other-charge-items/${id}`, {
51
+ ...options,
52
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
53
+ });
54
+ }
55
+
56
+ /**
57
+ * Updates an existing other charge item.
58
+ *
59
+ * @example
60
+ * ```ts
61
+ * const otherChargeItem =
62
+ * await conductor.qbd.otherChargeItems.update(
63
+ * '80000001-1234567890',
64
+ * {
65
+ * revisionNumber: '1721172183',
66
+ * conductorEndUserId: 'end_usr_1234567abcdefg',
67
+ * },
68
+ * );
69
+ * ```
70
+ */
71
+ update(
72
+ id: string,
73
+ params: OtherChargeItemUpdateParams,
74
+ options?: Core.RequestOptions,
75
+ ): Core.APIPromise<OtherChargeItem> {
76
+ const { conductorEndUserId, ...body } = params;
77
+ return this._client.post(`/quickbooks-desktop/other-charge-items/${id}`, {
78
+ body,
79
+ ...options,
80
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
81
+ });
82
+ }
83
+
84
+ /**
85
+ * Returns a list of other charge items. Use the `cursor` parameter to paginate
86
+ * through the results.
87
+ *
88
+ * @example
89
+ * ```ts
90
+ * // Automatically fetches more pages as needed.
91
+ * for await (const otherChargeItem of conductor.qbd.otherChargeItems.list(
92
+ * { conductorEndUserId: 'end_usr_1234567abcdefg' },
93
+ * )) {
94
+ * // ...
95
+ * }
96
+ * ```
97
+ */
98
+ list(
99
+ params: OtherChargeItemListParams,
100
+ options?: Core.RequestOptions,
101
+ ): Core.PagePromise<OtherChargeItemsCursorPage, OtherChargeItem> {
102
+ const { conductorEndUserId, ...query } = params;
103
+ return this._client.getAPIList('/quickbooks-desktop/other-charge-items', OtherChargeItemsCursorPage, {
104
+ query,
105
+ ...options,
106
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
107
+ });
108
+ }
109
+ }
110
+
111
+ export class OtherChargeItemsCursorPage extends CursorPage<OtherChargeItem> {}
112
+
113
+ export interface OtherChargeItem {
114
+ /**
115
+ * The unique identifier assigned by QuickBooks to this other charge item. This ID
116
+ * is unique across all other charge items but not across different QuickBooks
117
+ * object types.
118
+ */
119
+ id: string;
120
+
121
+ /**
122
+ * The other charge item's barcode.
123
+ */
124
+ barcode: string | null;
125
+
126
+ /**
127
+ * The other charge item's class. Classes can be used to categorize objects into
128
+ * meaningful segments, such as department, location, or type of work. In
129
+ * QuickBooks, class tracking is off by default.
130
+ */
131
+ class: OtherChargeItem.Class | null;
132
+
133
+ /**
134
+ * The date and time when this other charge item was created, in ISO 8601 format
135
+ * (YYYY-MM-DDThh:mm:ss±hh:mm). The time zone is the same as the user's time zone
136
+ * in QuickBooks.
137
+ */
138
+ createdAt: string;
139
+
140
+ /**
141
+ * The custom fields for the other charge item object, added as user-defined data
142
+ * extensions, not included in the standard QuickBooks object.
143
+ */
144
+ customFields: Array<OtherChargeItem.CustomField>;
145
+
146
+ /**
147
+ * A globally unique identifier (GUID) you, the developer, can provide for tracking
148
+ * this object in your external system. This field is immutable and can only be set
149
+ * during object creation.
150
+ */
151
+ externalId: string | null;
152
+
153
+ /**
154
+ * The case-insensitive fully-qualified unique name of this other charge item,
155
+ * formed by combining the names of its hierarchical parent objects with its own
156
+ * `name`, separated by colons. For example, if an other charge item is under
157
+ * "Shipping Charges" and has the `name` "Overnight Delivery", its `fullName` would
158
+ * be "Shipping Charges:Overnight Delivery".
159
+ *
160
+ * **NOTE**: Unlike `name`, `fullName` is guaranteed to be unique across all other
161
+ * charge item objects. However, `fullName` can still be arbitrarily changed by the
162
+ * QuickBooks user when they modify the underlying `name` field.
163
+ */
164
+ fullName: string;
165
+
166
+ /**
167
+ * Indicates whether this other charge item is active. Inactive objects are
168
+ * typically hidden from views and reports in QuickBooks. Defaults to `true`.
169
+ */
170
+ isActive: boolean;
171
+
172
+ /**
173
+ * The case-insensitive name of this other charge item. Not guaranteed to be unique
174
+ * because it does not include the names of its hierarchical parent objects like
175
+ * `fullName` does. For example, two other charge items could both have the `name`
176
+ * "Overnight Delivery", but they could have unique `fullName` values, such as
177
+ * "Shipping Charges:Overnight Delivery" and "Misc Fees:Overnight Delivery".
178
+ */
179
+ name: string;
180
+
181
+ /**
182
+ * The type of object. This value is always `"qbd_other_charge_item"`.
183
+ */
184
+ objectType: 'qbd_other_charge_item';
185
+
186
+ /**
187
+ * The parent other charge item one level above this one in the hierarchy. For
188
+ * example, if this other charge item has a `fullName` of "Shipping
189
+ * Charges:Overnight Delivery", its parent has a `fullName` of "Shipping Charges".
190
+ * If this other charge item is at the top level, this field will be `null`.
191
+ */
192
+ parent: OtherChargeItem.Parent | null;
193
+
194
+ /**
195
+ * The current QuickBooks-assigned revision number of this other charge item
196
+ * object, which changes each time the object is modified. When updating this
197
+ * object, you must provide the most recent `revisionNumber` to ensure you're
198
+ * working with the latest data; otherwise, the update will return an error.
199
+ */
200
+ revisionNumber: string;
201
+
202
+ /**
203
+ * Details for other charge items that are both purchased and sold, such as
204
+ * reimbursable expenses or inventory items that are bought from vendors and sold
205
+ * to customers.
206
+ *
207
+ * **IMPORTANT**: An other charge item will have either `salesAndPurchaseDetails`
208
+ * or `salesOrPurchaseDetails`, but never both because an item cannot have both
209
+ * configurations.
210
+ */
211
+ salesAndPurchaseDetails: OtherChargeItem.SalesAndPurchaseDetails | null;
212
+
213
+ /**
214
+ * Details for other charge items that are exclusively sold or exclusively
215
+ * purchased, but not both. This typically applies to non-inventory items (like a
216
+ * purchased office supply that isn't resold) or service items (like consulting
217
+ * services that are sold but not purchased).
218
+ *
219
+ * **IMPORTANT**: An other charge item will have either `salesAndPurchaseDetails`
220
+ * or `salesOrPurchaseDetails`, but never both because an item cannot have both
221
+ * configurations.
222
+ */
223
+ salesOrPurchaseDetails: OtherChargeItem.SalesOrPurchaseDetails | null;
224
+
225
+ /**
226
+ * The default sales-tax code for this other charge item, determining whether it is
227
+ * taxable or non-taxable. This can be overridden at the transaction-line level.
228
+ *
229
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
230
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
231
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
232
+ * non-taxable code to all sales.
233
+ */
234
+ salesTaxCode: OtherChargeItem.SalesTaxCode | null;
235
+
236
+ /**
237
+ * The type of special item for this other charge item.
238
+ */
239
+ specialItemType: 'finance_charge' | 'reimbursable_expense_group' | 'reimbursable_expense_subtotal' | null;
240
+
241
+ /**
242
+ * The depth level of this other charge item in the hierarchy. A top-level other
243
+ * charge item has a `sublevel` of 0; each subsequent sublevel increases this
244
+ * number by 1. For example, an other charge item with a `fullName` of "Shipping
245
+ * Charges:Overnight Delivery" would have a `sublevel` of 1.
246
+ */
247
+ sublevel: number;
248
+
249
+ /**
250
+ * The date and time when this other charge item was last updated, in ISO 8601
251
+ * format (YYYY-MM-DDThh:mm:ss±hh:mm). The time zone is the same as the user's time
252
+ * zone in QuickBooks.
253
+ */
254
+ updatedAt: string;
255
+ }
256
+
257
+ export namespace OtherChargeItem {
258
+ /**
259
+ * The other charge item's class. Classes can be used to categorize objects into
260
+ * meaningful segments, such as department, location, or type of work. In
261
+ * QuickBooks, class tracking is off by default.
262
+ */
263
+ export interface Class {
264
+ /**
265
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
266
+ * across all objects of the same type, but not across different QuickBooks object
267
+ * types.
268
+ */
269
+ id: string | null;
270
+
271
+ /**
272
+ * The fully-qualified unique name for this object, formed by combining the names
273
+ * of its parent objects with its own `name`, separated by colons. Not
274
+ * case-sensitive.
275
+ */
276
+ fullName: string | null;
277
+ }
278
+
279
+ export interface CustomField {
280
+ /**
281
+ * The name of the custom field, unique for the specified `ownerId`. For public
282
+ * custom fields, this name is visible as a label in the QuickBooks UI.
283
+ */
284
+ name: string;
285
+
286
+ /**
287
+ * The identifier of the owner of the custom field, which QuickBooks internally
288
+ * calls a "data extension". For public custom fields visible in the UI, such as
289
+ * those added by the QuickBooks user, this is always "0". For private custom
290
+ * fields that are only visible to the application that created them, this is a
291
+ * valid GUID identifying the owning application. Internally, Conductor always
292
+ * fetches all public custom fields (those with an `ownerId` of "0") for all
293
+ * objects.
294
+ */
295
+ ownerId: string;
296
+
297
+ /**
298
+ * The data type of this custom field.
299
+ */
300
+ type:
301
+ | 'amount_type'
302
+ | 'date_time_type'
303
+ | 'integer_type'
304
+ | 'percent_type'
305
+ | 'price_type'
306
+ | 'quantity_type'
307
+ | 'string_1024_type'
308
+ | 'string_255_type';
309
+
310
+ /**
311
+ * The value of this custom field. The maximum length depends on the field's data
312
+ * type.
313
+ */
314
+ value: string;
315
+ }
316
+
317
+ /**
318
+ * The parent other charge item one level above this one in the hierarchy. For
319
+ * example, if this other charge item has a `fullName` of "Shipping
320
+ * Charges:Overnight Delivery", its parent has a `fullName` of "Shipping Charges".
321
+ * If this other charge item is at the top level, this field will be `null`.
322
+ */
323
+ export interface Parent {
324
+ /**
325
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
326
+ * across all objects of the same type, but not across different QuickBooks object
327
+ * types.
328
+ */
329
+ id: string | null;
330
+
331
+ /**
332
+ * The fully-qualified unique name for this object, formed by combining the names
333
+ * of its parent objects with its own `name`, separated by colons. Not
334
+ * case-sensitive.
335
+ */
336
+ fullName: string | null;
337
+ }
338
+
339
+ /**
340
+ * Details for other charge items that are both purchased and sold, such as
341
+ * reimbursable expenses or inventory items that are bought from vendors and sold
342
+ * to customers.
343
+ *
344
+ * **IMPORTANT**: An other charge item will have either `salesAndPurchaseDetails`
345
+ * or `salesOrPurchaseDetails`, but never both because an item cannot have both
346
+ * configurations.
347
+ */
348
+ export interface SalesAndPurchaseDetails {
349
+ /**
350
+ * The expense account used to track costs from purchases of this item.
351
+ */
352
+ expenseAccount: SalesAndPurchaseDetails.ExpenseAccount;
353
+
354
+ /**
355
+ * The income account used to track revenue from sales of this item.
356
+ */
357
+ incomeAccount: SalesAndPurchaseDetails.IncomeAccount;
358
+
359
+ /**
360
+ * The preferred vendor from whom this item is typically purchased.
361
+ */
362
+ preferredVendor: SalesAndPurchaseDetails.PreferredVendor | null;
363
+
364
+ /**
365
+ * The cost at which this item is purchased from vendors, represented as a decimal
366
+ * string.
367
+ */
368
+ purchaseCost: string | null;
369
+
370
+ /**
371
+ * The description of this item that appears on purchase forms (e.g., checks,
372
+ * bills, item receipts) when it is ordered or bought from vendors.
373
+ */
374
+ purchaseDescription: string | null;
375
+
376
+ /**
377
+ * The tax code applied to purchases of this item. Applicable in regions where
378
+ * purchase taxes are used, such as Canada or the UK.
379
+ */
380
+ purchaseTaxCode: SalesAndPurchaseDetails.PurchaseTaxCode | null;
381
+
382
+ /**
383
+ * The description of this item that appears on sales forms (e.g., invoices, sales
384
+ * receipts) when sold to customers.
385
+ */
386
+ salesDescription: string | null;
387
+
388
+ /**
389
+ * The price at which this item is sold to customers, represented as a decimal
390
+ * string.
391
+ */
392
+ salesPrice: string | null;
393
+ }
394
+
395
+ export namespace SalesAndPurchaseDetails {
396
+ /**
397
+ * The expense account used to track costs from purchases of this item.
398
+ */
399
+ export interface ExpenseAccount {
400
+ /**
401
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
402
+ * across all objects of the same type, but not across different QuickBooks object
403
+ * types.
404
+ */
405
+ id: string | null;
406
+
407
+ /**
408
+ * The fully-qualified unique name for this object, formed by combining the names
409
+ * of its parent objects with its own `name`, separated by colons. Not
410
+ * case-sensitive.
411
+ */
412
+ fullName: string | null;
413
+ }
414
+
415
+ /**
416
+ * The income account used to track revenue from sales of this item.
417
+ */
418
+ export interface IncomeAccount {
419
+ /**
420
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
421
+ * across all objects of the same type, but not across different QuickBooks object
422
+ * types.
423
+ */
424
+ id: string | null;
425
+
426
+ /**
427
+ * The fully-qualified unique name for this object, formed by combining the names
428
+ * of its parent objects with its own `name`, separated by colons. Not
429
+ * case-sensitive.
430
+ */
431
+ fullName: string | null;
432
+ }
433
+
434
+ /**
435
+ * The preferred vendor from whom this item is typically purchased.
436
+ */
437
+ export interface PreferredVendor {
438
+ /**
439
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
440
+ * across all objects of the same type, but not across different QuickBooks object
441
+ * types.
442
+ */
443
+ id: string | null;
444
+
445
+ /**
446
+ * The fully-qualified unique name for this object, formed by combining the names
447
+ * of its parent objects with its own `name`, separated by colons. Not
448
+ * case-sensitive.
449
+ */
450
+ fullName: string | null;
451
+ }
452
+
453
+ /**
454
+ * The tax code applied to purchases of this item. Applicable in regions where
455
+ * purchase taxes are used, such as Canada or the UK.
456
+ */
457
+ export interface PurchaseTaxCode {
458
+ /**
459
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
460
+ * across all objects of the same type, but not across different QuickBooks object
461
+ * types.
462
+ */
463
+ id: string | null;
464
+
465
+ /**
466
+ * The fully-qualified unique name for this object, formed by combining the names
467
+ * of its parent objects with its own `name`, separated by colons. Not
468
+ * case-sensitive.
469
+ */
470
+ fullName: string | null;
471
+ }
472
+ }
473
+
474
+ /**
475
+ * Details for other charge items that are exclusively sold or exclusively
476
+ * purchased, but not both. This typically applies to non-inventory items (like a
477
+ * purchased office supply that isn't resold) or service items (like consulting
478
+ * services that are sold but not purchased).
479
+ *
480
+ * **IMPORTANT**: An other charge item will have either `salesAndPurchaseDetails`
481
+ * or `salesOrPurchaseDetails`, but never both because an item cannot have both
482
+ * configurations.
483
+ */
484
+ export interface SalesOrPurchaseDetails {
485
+ /**
486
+ * A description of this item.
487
+ */
488
+ description: string | null;
489
+
490
+ /**
491
+ * The posting account to which transactions involving this item are posted. This
492
+ * could be an income account when selling or an expense account when purchasing.
493
+ */
494
+ postingAccount: SalesOrPurchaseDetails.PostingAccount | null;
495
+
496
+ /**
497
+ * The price at which this item is purchased or sold, represented as a decimal
498
+ * string.
499
+ */
500
+ price: string | null;
501
+
502
+ /**
503
+ * The price of this item expressed as a percentage, used instead of `price` when
504
+ * the item's cost is calculated as a percentage of another amount. For example, a
505
+ * service item that costs a percentage of another item's price.
506
+ */
507
+ pricePercentage: string | null;
508
+ }
509
+
510
+ export namespace SalesOrPurchaseDetails {
511
+ /**
512
+ * The posting account to which transactions involving this item are posted. This
513
+ * could be an income account when selling or an expense account when purchasing.
514
+ */
515
+ export interface PostingAccount {
516
+ /**
517
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
518
+ * across all objects of the same type, but not across different QuickBooks object
519
+ * types.
520
+ */
521
+ id: string | null;
522
+
523
+ /**
524
+ * The fully-qualified unique name for this object, formed by combining the names
525
+ * of its parent objects with its own `name`, separated by colons. Not
526
+ * case-sensitive.
527
+ */
528
+ fullName: string | null;
529
+ }
530
+ }
531
+
532
+ /**
533
+ * The default sales-tax code for this other charge item, determining whether it is
534
+ * taxable or non-taxable. This can be overridden at the transaction-line level.
535
+ *
536
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
537
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
538
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
539
+ * non-taxable code to all sales.
540
+ */
541
+ export interface SalesTaxCode {
542
+ /**
543
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
544
+ * across all objects of the same type, but not across different QuickBooks object
545
+ * types.
546
+ */
547
+ id: string | null;
548
+
549
+ /**
550
+ * The fully-qualified unique name for this object, formed by combining the names
551
+ * of its parent objects with its own `name`, separated by colons. Not
552
+ * case-sensitive.
553
+ */
554
+ fullName: string | null;
555
+ }
556
+ }
557
+
558
+ export interface OtherChargeItemCreateParams {
559
+ /**
560
+ * Body param: The case-insensitive name of this other charge item. Not guaranteed
561
+ * to be unique because it does not include the names of its hierarchical parent
562
+ * objects like `fullName` does. For example, two other charge items could both
563
+ * have the `name` "Overnight Delivery", but they could have unique `fullName`
564
+ * values, such as "Shipping Charges:Overnight Delivery" and "Misc Fees:Overnight
565
+ * Delivery".
566
+ *
567
+ * Maximum length: 31 characters.
568
+ */
569
+ name: string;
570
+
571
+ /**
572
+ * Header param: The ID of the EndUser to receive this request (e.g.,
573
+ * `"Conductor-End-User-Id: {{END_USER_ID}}"`).
574
+ */
575
+ conductorEndUserId: string;
576
+
577
+ /**
578
+ * Body param: The other charge item's barcode.
579
+ */
580
+ barcode?: OtherChargeItemCreateParams.Barcode;
581
+
582
+ /**
583
+ * Body param: The other charge item's class. Classes can be used to categorize
584
+ * objects into meaningful segments, such as department, location, or type of work.
585
+ * In QuickBooks, class tracking is off by default.
586
+ */
587
+ classId?: string;
588
+
589
+ /**
590
+ * Body param: A globally unique identifier (GUID) you, the developer, can provide
591
+ * for tracking this object in your external system. This field is immutable and
592
+ * can only be set during object creation.
593
+ *
594
+ * **IMPORTANT**: This field must be formatted as a valid GUID; otherwise,
595
+ * QuickBooks will return an error.
596
+ */
597
+ externalId?: string;
598
+
599
+ /**
600
+ * Body param: Indicates whether this other charge item is active. Inactive objects
601
+ * are typically hidden from views and reports in QuickBooks. Defaults to `true`.
602
+ */
603
+ isActive?: boolean;
604
+
605
+ /**
606
+ * Body param: The parent other charge item one level above this one in the
607
+ * hierarchy. For example, if this other charge item has a `fullName` of "Shipping
608
+ * Charges:Overnight Delivery", its parent has a `fullName` of "Shipping Charges".
609
+ * If this other charge item is at the top level, this field will be `null`.
610
+ */
611
+ parentId?: string;
612
+
613
+ /**
614
+ * Body param: Details for other charge items that are both purchased and sold,
615
+ * such as reimbursable expenses or inventory items that are bought from vendors
616
+ * and sold to customers.
617
+ *
618
+ * **IMPORTANT**: You must specify either `salesAndPurchaseDetails` or
619
+ * `salesOrPurchaseDetails` when creating an other charge item, but never both
620
+ * because an item cannot have both configurations.
621
+ */
622
+ salesAndPurchaseDetails?: OtherChargeItemCreateParams.SalesAndPurchaseDetails;
623
+
624
+ /**
625
+ * Body param: Details for other charge items that are exclusively sold or
626
+ * exclusively purchased, but not both. This typically applies to non-inventory
627
+ * items (like a purchased office supply that isn't resold) or service items (like
628
+ * consulting services that are sold but not purchased).
629
+ *
630
+ * **IMPORTANT**: You must specify either `salesOrPurchaseDetails` or
631
+ * `salesAndPurchaseDetails` when creating an other charge item, but never both
632
+ * because an item cannot have both configurations.
633
+ */
634
+ salesOrPurchaseDetails?: OtherChargeItemCreateParams.SalesOrPurchaseDetails;
635
+
636
+ /**
637
+ * Body param: The default sales-tax code for this other charge item, determining
638
+ * whether it is taxable or non-taxable. This can be overridden at the
639
+ * transaction-line level.
640
+ *
641
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
642
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
643
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
644
+ * non-taxable code to all sales.
645
+ */
646
+ salesTaxCodeId?: string;
647
+ }
648
+
649
+ export namespace OtherChargeItemCreateParams {
650
+ /**
651
+ * The other charge item's barcode.
652
+ */
653
+ export interface Barcode {
654
+ /**
655
+ * Indicates whether to allow the barcode to be overridden.
656
+ */
657
+ allowOverride?: boolean;
658
+
659
+ /**
660
+ * Indicates whether to assign the barcode even if it is already used.
661
+ */
662
+ assignEvenIfUsed?: boolean;
663
+
664
+ /**
665
+ * The item's barcode value.
666
+ */
667
+ value?: string;
668
+ }
669
+
670
+ /**
671
+ * Details for other charge items that are both purchased and sold, such as
672
+ * reimbursable expenses or inventory items that are bought from vendors and sold
673
+ * to customers.
674
+ *
675
+ * **IMPORTANT**: You must specify either `salesAndPurchaseDetails` or
676
+ * `salesOrPurchaseDetails` when creating an other charge item, but never both
677
+ * because an item cannot have both configurations.
678
+ */
679
+ export interface SalesAndPurchaseDetails {
680
+ /**
681
+ * The expense account used to track costs from purchases of this item.
682
+ */
683
+ expenseAccountId: string;
684
+
685
+ /**
686
+ * The income account used to track revenue from sales of this item.
687
+ */
688
+ incomeAccountId: string;
689
+
690
+ /**
691
+ * The preferred vendor from whom this item is typically purchased.
692
+ */
693
+ preferredVendorId?: string;
694
+
695
+ /**
696
+ * The cost at which this item is purchased from vendors, represented as a decimal
697
+ * string.
698
+ */
699
+ purchaseCost?: string;
700
+
701
+ /**
702
+ * The description of this item that appears on purchase forms (e.g., checks,
703
+ * bills, item receipts) when it is ordered or bought from vendors.
704
+ */
705
+ purchaseDescription?: string;
706
+
707
+ /**
708
+ * The tax code applied to purchases of this item. Applicable in regions where
709
+ * purchase taxes are used, such as Canada or the UK.
710
+ */
711
+ purchaseTaxCodeId?: string;
712
+
713
+ /**
714
+ * The description of this item that appears on sales forms (e.g., invoices, sales
715
+ * receipts) when sold to customers.
716
+ */
717
+ salesDescription?: string;
718
+
719
+ /**
720
+ * The price at which this item is sold to customers, represented as a decimal
721
+ * string.
722
+ */
723
+ salesPrice?: string;
724
+ }
725
+
726
+ /**
727
+ * Details for other charge items that are exclusively sold or exclusively
728
+ * purchased, but not both. This typically applies to non-inventory items (like a
729
+ * purchased office supply that isn't resold) or service items (like consulting
730
+ * services that are sold but not purchased).
731
+ *
732
+ * **IMPORTANT**: You must specify either `salesOrPurchaseDetails` or
733
+ * `salesAndPurchaseDetails` when creating an other charge item, but never both
734
+ * because an item cannot have both configurations.
735
+ */
736
+ export interface SalesOrPurchaseDetails {
737
+ /**
738
+ * The posting account to which transactions involving this item are posted. This
739
+ * could be an income account when selling or an expense account when purchasing.
740
+ */
741
+ postingAccountId: string;
742
+
743
+ /**
744
+ * A description of this item.
745
+ */
746
+ description?: string;
747
+
748
+ /**
749
+ * The price at which this item is purchased or sold, represented as a decimal
750
+ * string.
751
+ */
752
+ price?: string;
753
+
754
+ /**
755
+ * The price of this item expressed as a percentage, used instead of `price` when
756
+ * the item's cost is calculated as a percentage of another amount. For example, a
757
+ * service item that costs a percentage of another item's price.
758
+ */
759
+ pricePercentage?: string;
760
+ }
761
+ }
762
+
763
+ export interface OtherChargeItemRetrieveParams {
764
+ /**
765
+ * The ID of the EndUser to receive this request (e.g.,
766
+ * `"Conductor-End-User-Id: {{END_USER_ID}}"`).
767
+ */
768
+ conductorEndUserId: string;
769
+ }
770
+
771
+ export interface OtherChargeItemUpdateParams {
772
+ /**
773
+ * Body param: The current QuickBooks-assigned revision number of the other charge
774
+ * item object you are updating, which you can get by fetching the object first.
775
+ * Provide the most recent `revisionNumber` to ensure you're working with the
776
+ * latest data; otherwise, the update will return an error.
777
+ */
778
+ revisionNumber: string;
779
+
780
+ /**
781
+ * Header param: The ID of the EndUser to receive this request (e.g.,
782
+ * `"Conductor-End-User-Id: {{END_USER_ID}}"`).
783
+ */
784
+ conductorEndUserId: string;
785
+
786
+ /**
787
+ * Body param: The other charge item's barcode.
788
+ */
789
+ barcode?: OtherChargeItemUpdateParams.Barcode;
790
+
791
+ /**
792
+ * Body param: The other charge item's class. Classes can be used to categorize
793
+ * objects into meaningful segments, such as department, location, or type of work.
794
+ * In QuickBooks, class tracking is off by default.
795
+ */
796
+ classId?: string;
797
+
798
+ /**
799
+ * Body param: Indicates whether this other charge item is active. Inactive objects
800
+ * are typically hidden from views and reports in QuickBooks. Defaults to `true`.
801
+ */
802
+ isActive?: boolean;
803
+
804
+ /**
805
+ * Body param: The case-insensitive name of this other charge item. Not guaranteed
806
+ * to be unique because it does not include the names of its hierarchical parent
807
+ * objects like `fullName` does. For example, two other charge items could both
808
+ * have the `name` "Overnight Delivery", but they could have unique `fullName`
809
+ * values, such as "Shipping Charges:Overnight Delivery" and "Misc Fees:Overnight
810
+ * Delivery".
811
+ *
812
+ * Maximum length: 31 characters.
813
+ */
814
+ name?: string;
815
+
816
+ /**
817
+ * Body param: The parent other charge item one level above this one in the
818
+ * hierarchy. For example, if this other charge item has a `fullName` of "Shipping
819
+ * Charges:Overnight Delivery", its parent has a `fullName` of "Shipping Charges".
820
+ * If this other charge item is at the top level, this field will be `null`.
821
+ */
822
+ parentId?: string;
823
+
824
+ /**
825
+ * Body param: Details for other charge items that are both purchased and sold,
826
+ * such as reimbursable expenses or inventory items that are bought from vendors
827
+ * and sold to customers.
828
+ *
829
+ * **IMPORTANT**: You cannot specify both `salesAndPurchaseDetails` and
830
+ * `salesOrPurchaseDetails` when modifying an other charge item because an item
831
+ * cannot have both configurations.
832
+ */
833
+ salesAndPurchaseDetails?: OtherChargeItemUpdateParams.SalesAndPurchaseDetails;
834
+
835
+ /**
836
+ * Body param: Details for other charge items that are exclusively sold or
837
+ * exclusively purchased, but not both. This typically applies to non-inventory
838
+ * items (like a purchased office supply that isn't resold) or service items (like
839
+ * consulting services that are sold but not purchased).
840
+ *
841
+ * **IMPORTANT**: You cannot specify both `salesOrPurchaseDetails` and
842
+ * `salesAndPurchaseDetails` when modifying an other charge item because an item
843
+ * cannot have both configurations.
844
+ */
845
+ salesOrPurchaseDetails?: OtherChargeItemUpdateParams.SalesOrPurchaseDetails;
846
+
847
+ /**
848
+ * Body param: The default sales-tax code for this other charge item, determining
849
+ * whether it is taxable or non-taxable. This can be overridden at the
850
+ * transaction-line level.
851
+ *
852
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
853
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
854
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
855
+ * non-taxable code to all sales.
856
+ */
857
+ salesTaxCodeId?: string;
858
+ }
859
+
860
+ export namespace OtherChargeItemUpdateParams {
861
+ /**
862
+ * The other charge item's barcode.
863
+ */
864
+ export interface Barcode {
865
+ /**
866
+ * Indicates whether to allow the barcode to be overridden.
867
+ */
868
+ allowOverride?: boolean;
869
+
870
+ /**
871
+ * Indicates whether to assign the barcode even if it is already used.
872
+ */
873
+ assignEvenIfUsed?: boolean;
874
+
875
+ /**
876
+ * The item's barcode value.
877
+ */
878
+ value?: string;
879
+ }
880
+
881
+ /**
882
+ * Details for other charge items that are both purchased and sold, such as
883
+ * reimbursable expenses or inventory items that are bought from vendors and sold
884
+ * to customers.
885
+ *
886
+ * **IMPORTANT**: You cannot specify both `salesAndPurchaseDetails` and
887
+ * `salesOrPurchaseDetails` when modifying an other charge item because an item
888
+ * cannot have both configurations.
889
+ */
890
+ export interface SalesAndPurchaseDetails {
891
+ /**
892
+ * The expense account used to track costs from purchases of this item.
893
+ */
894
+ expenseAccountId?: string;
895
+
896
+ /**
897
+ * The income account used to track revenue from sales of this item.
898
+ */
899
+ incomeAccountId?: string;
900
+
901
+ /**
902
+ * The preferred vendor from whom this item is typically purchased.
903
+ */
904
+ preferredVendorId?: string;
905
+
906
+ /**
907
+ * The cost at which this item is purchased from vendors, represented as a decimal
908
+ * string.
909
+ */
910
+ purchaseCost?: string;
911
+
912
+ /**
913
+ * The description of this item that appears on purchase forms (e.g., checks,
914
+ * bills, item receipts) when it is ordered or bought from vendors.
915
+ */
916
+ purchaseDescription?: string;
917
+
918
+ /**
919
+ * The tax code applied to purchases of this item. Applicable in regions where
920
+ * purchase taxes are used, such as Canada or the UK.
921
+ */
922
+ purchaseTaxCodeId?: string;
923
+
924
+ /**
925
+ * The description of this item that appears on sales forms (e.g., invoices, sales
926
+ * receipts) when sold to customers.
927
+ */
928
+ salesDescription?: string;
929
+
930
+ /**
931
+ * The price at which this item is sold to customers, represented as a decimal
932
+ * string.
933
+ */
934
+ salesPrice?: string;
935
+
936
+ /**
937
+ * When `true`, applies the new expense account (specified by the
938
+ * `expenseAccountId` field) to all existing transactions that use this item. This
939
+ * updates historical data and should be used with caution. The update will fail if
940
+ * any affected transaction falls within a closed accounting period. If this
941
+ * parameter is not specified, QuickBooks will prompt the user before making any
942
+ * changes.
943
+ */
944
+ updateExistingTransactionsExpenseAccount?: boolean;
945
+
946
+ /**
947
+ * When `true`, applies the new income account (specified by the `incomeAccountId`
948
+ * field) to all existing transactions that use this item. This updates historical
949
+ * data and should be used with caution. The update will fail if any affected
950
+ * transaction falls within a closed accounting period. If this parameter is not
951
+ * specified, QuickBooks will prompt the user before making any changes.
952
+ */
953
+ updateExistingTransactionsIncomeAccount?: boolean;
954
+ }
955
+
956
+ /**
957
+ * Details for other charge items that are exclusively sold or exclusively
958
+ * purchased, but not both. This typically applies to non-inventory items (like a
959
+ * purchased office supply that isn't resold) or service items (like consulting
960
+ * services that are sold but not purchased).
961
+ *
962
+ * **IMPORTANT**: You cannot specify both `salesOrPurchaseDetails` and
963
+ * `salesAndPurchaseDetails` when modifying an other charge item because an item
964
+ * cannot have both configurations.
965
+ */
966
+ export interface SalesOrPurchaseDetails {
967
+ /**
968
+ * A description of this item.
969
+ */
970
+ description?: string;
971
+
972
+ /**
973
+ * The posting account to which transactions involving this item are posted. This
974
+ * could be an income account when selling or an expense account when purchasing.
975
+ */
976
+ postingAccountId?: string;
977
+
978
+ /**
979
+ * The price at which this item is purchased or sold, represented as a decimal
980
+ * string.
981
+ */
982
+ price?: string;
983
+
984
+ /**
985
+ * The price of this item expressed as a percentage, used instead of `price` when
986
+ * the item's cost is calculated as a percentage of another amount. For example, a
987
+ * service item that costs a percentage of another item's price.
988
+ */
989
+ pricePercentage?: string;
990
+
991
+ /**
992
+ * When `true`, applies the new account (specified by the `accountId` field) to all
993
+ * existing transactions associated with this item. This updates historical data
994
+ * and should be used with caution. The update will fail if any affected
995
+ * transaction falls within a closed accounting period. If this parameter is not
996
+ * specified, QuickBooks will prompt the user before making any changes.
997
+ */
998
+ updateExistingTransactionsAccount?: boolean;
999
+ }
1000
+ }
1001
+
1002
+ export interface OtherChargeItemListParams extends CursorPageParams {
1003
+ /**
1004
+ * Header param: The ID of the EndUser to receive this request (e.g.,
1005
+ * `"Conductor-End-User-Id: {{END_USER_ID}}"`).
1006
+ */
1007
+ conductorEndUserId: string;
1008
+
1009
+ /**
1010
+ * Query param: Filter for other charge items of these classes. A class is a way
1011
+ * end-users can categorize other charge items in QuickBooks.
1012
+ */
1013
+ classIds?: Array<string>;
1014
+
1015
+ /**
1016
+ * Query param: Filter for specific other charge items by their full-name(s),
1017
+ * case-insensitive. Like `id`, `fullName` is a unique identifier for an other
1018
+ * charge item, formed by by combining the names of its parent objects with its own
1019
+ * `name`, separated by colons. For example, if an other charge item is under
1020
+ * "Shipping Charges" and has the `name` "Overnight Delivery", its `fullName` would
1021
+ * be "Shipping Charges:Overnight Delivery".
1022
+ *
1023
+ * **IMPORTANT**: If you include this parameter, QuickBooks will ignore all other
1024
+ * query parameters for this request.
1025
+ *
1026
+ * **NOTE**: If any of the values you specify in this parameter are not found, the
1027
+ * request will return an error.
1028
+ */
1029
+ fullNames?: Array<string>;
1030
+
1031
+ /**
1032
+ * Query param: Filter for specific other charge items by their QuickBooks-assigned
1033
+ * unique identifier(s).
1034
+ *
1035
+ * **IMPORTANT**: If you include this parameter, QuickBooks will ignore all other
1036
+ * query parameters for this request.
1037
+ *
1038
+ * **NOTE**: If any of the values you specify in this parameter are not found, the
1039
+ * request will return an error.
1040
+ */
1041
+ ids?: Array<string>;
1042
+
1043
+ /**
1044
+ * Query param: Filter for other charge items whose `name` contains this substring,
1045
+ * case-insensitive.
1046
+ *
1047
+ * **NOTE**: If you use this parameter, you cannot also use `nameStartsWith` or
1048
+ * `nameEndsWith`.
1049
+ */
1050
+ nameContains?: string;
1051
+
1052
+ /**
1053
+ * Query param: Filter for other charge items whose `name` ends with this
1054
+ * substring, case-insensitive.
1055
+ *
1056
+ * **NOTE**: If you use this parameter, you cannot also use `nameContains` or
1057
+ * `nameStartsWith`.
1058
+ */
1059
+ nameEndsWith?: string;
1060
+
1061
+ /**
1062
+ * Query param: Filter for other charge items whose `name` is alphabetically
1063
+ * greater than or equal to this value.
1064
+ */
1065
+ nameFrom?: string;
1066
+
1067
+ /**
1068
+ * Query param: Filter for other charge items whose `name` starts with this
1069
+ * substring, case-insensitive.
1070
+ *
1071
+ * **NOTE**: If you use this parameter, you cannot also use `nameContains` or
1072
+ * `nameEndsWith`.
1073
+ */
1074
+ nameStartsWith?: string;
1075
+
1076
+ /**
1077
+ * Query param: Filter for other charge items whose `name` is alphabetically less
1078
+ * than or equal to this value.
1079
+ */
1080
+ nameTo?: string;
1081
+
1082
+ /**
1083
+ * Query param: Filter for other charge items that are active, inactive, or both.
1084
+ */
1085
+ status?: 'active' | 'all' | 'inactive';
1086
+
1087
+ /**
1088
+ * Query param: Filter for other charge items updated on or after this date and
1089
+ * time, in ISO 8601 format (YYYY-MM-DDTHH:mm:ss). If you only provide a date
1090
+ * (YYYY-MM-DD), the time is assumed to be 00:00:00 of that day.
1091
+ */
1092
+ updatedAfter?: string;
1093
+
1094
+ /**
1095
+ * Query param: Filter for other charge items updated on or before this date and
1096
+ * time, in ISO 8601 format (YYYY-MM-DDTHH:mm:ss). If you only provide a date
1097
+ * (YYYY-MM-DD), the time is assumed to be 23:59:59 of that day.
1098
+ */
1099
+ updatedBefore?: string;
1100
+ }
1101
+
1102
+ OtherChargeItems.OtherChargeItemsCursorPage = OtherChargeItemsCursorPage;
1103
+
1104
+ export declare namespace OtherChargeItems {
1105
+ export {
1106
+ type OtherChargeItem as OtherChargeItem,
1107
+ OtherChargeItemsCursorPage as OtherChargeItemsCursorPage,
1108
+ type OtherChargeItemCreateParams as OtherChargeItemCreateParams,
1109
+ type OtherChargeItemRetrieveParams as OtherChargeItemRetrieveParams,
1110
+ type OtherChargeItemUpdateParams as OtherChargeItemUpdateParams,
1111
+ type OtherChargeItemListParams as OtherChargeItemListParams,
1112
+ };
1113
+ }