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