conductor-node 12.30.0 → 12.31.1

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.
@@ -0,0 +1,438 @@
1
+ import { APIResource } from "../../resource.js";
2
+ import * as Core from "../../core.js";
3
+ export declare class Currencies extends APIResource {
4
+ /**
5
+ * Creates a user-defined currency with the specified name and currency code.
6
+ * Exchange rates for user-defined currencies are not updated automatically by
7
+ * QuickBooks Desktop; update them manually as needed.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const currency = await conductor.qbd.currencies.create({
12
+ * currencyCode: 'USD',
13
+ * name: 'United States Dollar',
14
+ * conductorEndUserId: 'end_usr_1234567abcdefg',
15
+ * });
16
+ * ```
17
+ */
18
+ create(params: CurrencyCreateParams, options?: Core.RequestOptions): Core.APIPromise<Currency>;
19
+ /**
20
+ * Retrieves a currency by ID.
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * const currency = await conductor.qbd.currencies.retrieve(
25
+ * '80000001-1234567890',
26
+ * { conductorEndUserId: 'end_usr_1234567abcdefg' },
27
+ * );
28
+ * ```
29
+ */
30
+ retrieve(id: string, params: CurrencyRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<Currency>;
31
+ /**
32
+ * Updates an existing currency. For built-in currencies, only the `isActive`
33
+ * status can be changed; name and currency code are not editable. For user-defined
34
+ * currencies, all fields in this request are editable.
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * const currency = await conductor.qbd.currencies.update(
39
+ * '80000001-1234567890',
40
+ * {
41
+ * revisionNumber: '1721172183',
42
+ * conductorEndUserId: 'end_usr_1234567abcdefg',
43
+ * },
44
+ * );
45
+ * ```
46
+ */
47
+ update(id: string, params: CurrencyUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Currency>;
48
+ /**
49
+ * Returns a list of currencies. NOTE: QuickBooks Desktop does not support
50
+ * pagination for currencies; hence, there is no `cursor` parameter. Users
51
+ * typically have few currencies.
52
+ *
53
+ * @example
54
+ * ```ts
55
+ * const currencies = await conductor.qbd.currencies.list({
56
+ * conductorEndUserId: 'end_usr_1234567abcdefg',
57
+ * });
58
+ * ```
59
+ */
60
+ list(params: CurrencyListParams, options?: Core.RequestOptions): Core.APIPromise<CurrencyListResponse>;
61
+ }
62
+ export interface Currency {
63
+ /**
64
+ * The unique identifier assigned by QuickBooks to this currency. This ID is unique
65
+ * across all currencies but not across different QuickBooks object types.
66
+ */
67
+ id: string;
68
+ /**
69
+ * The date when the exchange rate for this currency was last updated, in ISO 8601
70
+ * format (YYYY-MM-DD).
71
+ */
72
+ asOfDate: string | null;
73
+ /**
74
+ * The date and time when this currency was created, in ISO 8601 format
75
+ * (YYYY-MM-DDThh:mm:ss±hh:mm), which QuickBooks Desktop interprets in the local
76
+ * timezone of the end-user's computer.
77
+ */
78
+ createdAt: string;
79
+ /**
80
+ * The internationally accepted currency code used by this currency, typically
81
+ * based on the ISO 4217 standard (for example, USD for US Dollars). Built-in
82
+ * QuickBooks currencies follow ISO 4217. For user-defined currencies, following
83
+ * ISO 4217 is recommended but not required. In many cases, the three-letter code
84
+ * is formed from the country's two-letter internet code plus a currency letter
85
+ * (e.g., BZ + D → BZD for Belize Dollar).
86
+ */
87
+ currencyCode: string;
88
+ /**
89
+ * Controls how this currency displays thousands separators, grouping, and decimal
90
+ * places.
91
+ */
92
+ currencyFormat: Currency.CurrencyFormat | null;
93
+ /**
94
+ * The market exchange rate between this currency's currency and the home currency
95
+ * in QuickBooks at the time of this transaction. Represented as a decimal value
96
+ * (e.g., 1.2345 for 1 EUR = 1.2345 USD if USD is the home currency).
97
+ */
98
+ exchangeRate: number | null;
99
+ /**
100
+ * Indicates whether this currency is active. Inactive objects are typically hidden
101
+ * from views and reports in QuickBooks. Defaults to `true`.
102
+ */
103
+ isActive: boolean;
104
+ /**
105
+ * Indicates whether this currency was created by a QuickBooks user (`true`) or is
106
+ * a built-in currency (`false`).
107
+ */
108
+ isUserDefinedCurrency: boolean | null;
109
+ /**
110
+ * The case-insensitive unique name of this currency, unique across all currencies.
111
+ * For built-in currencies, the name is the internationally accepted currency name
112
+ * and is not editable.
113
+ *
114
+ * **NOTE**: Currencies do not have a `fullName` field because they are not
115
+ * hierarchical objects, which is why `name` is unique for them but not for objects
116
+ * that have parents.
117
+ */
118
+ name: string;
119
+ /**
120
+ * The type of object. This value is always `"qbd_currency"`.
121
+ */
122
+ objectType: 'qbd_currency';
123
+ /**
124
+ * The current QuickBooks-assigned revision number of this currency object, which
125
+ * changes each time the object is modified. When updating this object, you must
126
+ * provide the most recent `revisionNumber` to ensure you're working with the
127
+ * latest data; otherwise, the update will return an error.
128
+ */
129
+ revisionNumber: string;
130
+ /**
131
+ * The date and time when this currency was last updated, in ISO 8601 format
132
+ * (YYYY-MM-DDThh:mm:ss±hh:mm), which QuickBooks Desktop interprets in the local
133
+ * timezone of the end-user's computer.
134
+ */
135
+ updatedAt: string;
136
+ }
137
+ export declare namespace Currency {
138
+ /**
139
+ * Controls how this currency displays thousands separators, grouping, and decimal
140
+ * places.
141
+ */
142
+ interface CurrencyFormat {
143
+ /**
144
+ * Controls the number of decimal places displayed for currency values. Use `0` to
145
+ * hide decimals or `2` to display cents.
146
+ */
147
+ decimalPlaces: '0' | '2' | null;
148
+ /**
149
+ * Controls the decimal separator when displaying currency values (for example,
150
+ * "1.00" vs "1,00"). Defaults to period.
151
+ */
152
+ decimalSeparator: 'comma' | 'period' | null;
153
+ /**
154
+ * Controls the thousands separator when displaying currency values (for example,
155
+ * "1,000,000"). Defaults to comma.
156
+ */
157
+ thousandSeparator: 'apostrophe' | 'comma' | 'period' | 'space' | null;
158
+ /**
159
+ * Controls how digits are grouped for thousands when displaying currency values
160
+ * (for example, "10,000,000").
161
+ */
162
+ thousandSeparatorGrouping: 'x_xx_xx_xxx' | 'xx_xxx_xxx' | null;
163
+ }
164
+ }
165
+ export interface CurrencyListResponse {
166
+ /**
167
+ * The array of currencies.
168
+ */
169
+ data: Array<Currency>;
170
+ /**
171
+ * The type of object. This value is always `"list"`.
172
+ */
173
+ objectType: 'list';
174
+ /**
175
+ * The endpoint URL where this list can be accessed.
176
+ */
177
+ url: string;
178
+ }
179
+ export interface CurrencyCreateParams {
180
+ /**
181
+ * Body param: The internationally accepted currency code used by this currency,
182
+ * typically based on the ISO 4217 standard (for example, USD for US Dollars).
183
+ * Built-in QuickBooks currencies follow ISO 4217. For user-defined currencies,
184
+ * following ISO 4217 is recommended but not required. In many cases, the
185
+ * three-letter code is formed from the country's two-letter internet code plus a
186
+ * currency letter (e.g., BZ + D → BZD for Belize Dollar).
187
+ *
188
+ * Maximum length: 3 characters.
189
+ */
190
+ currencyCode: string;
191
+ /**
192
+ * Body param: The case-insensitive unique name of this currency, unique across all
193
+ * currencies. For built-in currencies, the name is the internationally accepted
194
+ * currency name and is not editable.
195
+ *
196
+ * **NOTE**: Currencies do not have a `fullName` field because they are not
197
+ * hierarchical objects, which is why `name` is unique for them but not for objects
198
+ * that have parents.
199
+ *
200
+ * Maximum length: 64 characters.
201
+ */
202
+ name: string;
203
+ /**
204
+ * Header param: The ID of the EndUser to receive this request (e.g.,
205
+ * `"Conductor-End-User-Id: {{END_USER_ID}}"`).
206
+ */
207
+ conductorEndUserId: string;
208
+ /**
209
+ * Body param: Controls how this currency displays thousands separators, grouping,
210
+ * and decimal places.
211
+ */
212
+ currencyFormat?: CurrencyCreateParams.CurrencyFormat;
213
+ /**
214
+ * Body param: Indicates whether this currency is active. Inactive objects are
215
+ * typically hidden from views and reports in QuickBooks. Defaults to `true`.
216
+ */
217
+ isActive?: boolean;
218
+ }
219
+ export declare namespace CurrencyCreateParams {
220
+ /**
221
+ * Controls how this currency displays thousands separators, grouping, and decimal
222
+ * places.
223
+ */
224
+ interface CurrencyFormat {
225
+ /**
226
+ * Controls the number of decimal places displayed for currency values. Use `0` to
227
+ * hide decimals or `2` to display cents.
228
+ */
229
+ decimalPlaces?: '0' | '2';
230
+ /**
231
+ * Controls the decimal separator when displaying currency values (for example,
232
+ * "1.00" vs "1,00"). Defaults to period.
233
+ */
234
+ decimalSeparator?: 'comma' | 'period';
235
+ /**
236
+ * Controls the thousands separator when displaying currency values (for example,
237
+ * "1,000,000"). Defaults to comma.
238
+ */
239
+ thousandSeparator?: 'apostrophe' | 'comma' | 'period' | 'space';
240
+ /**
241
+ * Controls how digits are grouped for thousands when displaying currency values
242
+ * (for example, "10,000,000").
243
+ */
244
+ thousandSeparatorGrouping?: 'x_xx_xx_xxx' | 'xx_xxx_xxx';
245
+ }
246
+ }
247
+ export interface CurrencyRetrieveParams {
248
+ /**
249
+ * The ID of the EndUser to receive this request (e.g.,
250
+ * `"Conductor-End-User-Id: {{END_USER_ID}}"`).
251
+ */
252
+ conductorEndUserId: string;
253
+ }
254
+ export interface CurrencyUpdateParams {
255
+ /**
256
+ * Body param: The current QuickBooks-assigned revision number of the currency
257
+ * object you are updating, which you can get by fetching the object first. Provide
258
+ * the most recent `revisionNumber` to ensure you're working with the latest data;
259
+ * otherwise, the update will return an error.
260
+ */
261
+ revisionNumber: string;
262
+ /**
263
+ * Header param: The ID of the EndUser to receive this request (e.g.,
264
+ * `"Conductor-End-User-Id: {{END_USER_ID}}"`).
265
+ */
266
+ conductorEndUserId: string;
267
+ /**
268
+ * Body param: The internationally accepted currency code used by this currency,
269
+ * typically based on the ISO 4217 standard (for example, USD for US Dollars).
270
+ * Built-in QuickBooks currencies follow ISO 4217. For user-defined currencies,
271
+ * following ISO 4217 is recommended but not required. In many cases, the
272
+ * three-letter code is formed from the country's two-letter internet code plus a
273
+ * currency letter (e.g., BZ + D → BZD for Belize Dollar).
274
+ *
275
+ * Maximum length: 3 characters.
276
+ */
277
+ currencyCode?: string;
278
+ /**
279
+ * Body param: Controls how this currency displays thousands separators, grouping,
280
+ * and decimal places.
281
+ */
282
+ currencyFormat?: CurrencyUpdateParams.CurrencyFormat;
283
+ /**
284
+ * Body param: Indicates whether this currency is active. Inactive objects are
285
+ * typically hidden from views and reports in QuickBooks. Defaults to `true`.
286
+ */
287
+ isActive?: boolean;
288
+ /**
289
+ * Body param: The case-insensitive unique name of this currency, unique across all
290
+ * currencies. For built-in currencies, the name is the internationally accepted
291
+ * currency name and is not editable.
292
+ *
293
+ * **NOTE**: Currencies do not have a `fullName` field because they are not
294
+ * hierarchical objects, which is why `name` is unique for them but not for objects
295
+ * that have parents.
296
+ *
297
+ * Maximum length: 64 characters.
298
+ */
299
+ name?: string;
300
+ }
301
+ export declare namespace CurrencyUpdateParams {
302
+ /**
303
+ * Controls how this currency displays thousands separators, grouping, and decimal
304
+ * places.
305
+ */
306
+ interface CurrencyFormat {
307
+ /**
308
+ * Controls the number of decimal places displayed for currency values. Use `0` to
309
+ * hide decimals or `2` to display cents.
310
+ */
311
+ decimalPlaces?: '0' | '2';
312
+ /**
313
+ * Controls the decimal separator when displaying currency values (for example,
314
+ * "1.00" vs "1,00"). Defaults to period.
315
+ */
316
+ decimalSeparator?: 'comma' | 'period';
317
+ /**
318
+ * Controls the thousands separator when displaying currency values (for example,
319
+ * "1,000,000"). Defaults to comma.
320
+ */
321
+ thousandSeparator?: 'apostrophe' | 'comma' | 'period' | 'space';
322
+ /**
323
+ * Controls how digits are grouped for thousands when displaying currency values
324
+ * (for example, "10,000,000").
325
+ */
326
+ thousandSeparatorGrouping?: 'x_xx_xx_xxx' | 'xx_xxx_xxx';
327
+ }
328
+ }
329
+ export interface CurrencyListParams {
330
+ /**
331
+ * Header param: The ID of the EndUser to receive this request (e.g.,
332
+ * `"Conductor-End-User-Id: {{END_USER_ID}}"`).
333
+ */
334
+ conductorEndUserId: string;
335
+ /**
336
+ * Query param: Filter for specific currencies by their QuickBooks-assigned unique
337
+ * identifier(s).
338
+ *
339
+ * **IMPORTANT**: If you include this parameter, QuickBooks will ignore all other
340
+ * query parameters for this request.
341
+ *
342
+ * **NOTE**: If any of the values you specify in this parameter are not found, the
343
+ * request will return an error.
344
+ */
345
+ ids?: Array<string>;
346
+ /**
347
+ * Query param: The maximum number of objects to return.
348
+ *
349
+ * **IMPORTANT**: QuickBooks Desktop does not support cursor-based pagination for
350
+ * currencies. This parameter will limit the response size, but you cannot fetch
351
+ * subsequent results using a cursor. For pagination, use the name-range parameters
352
+ * instead (e.g., `nameFrom=A&nameTo=B`).
353
+ *
354
+ * When this parameter is omitted, the endpoint returns all currencies without
355
+ * limit, unlike paginated endpoints which default to 150 records. This is
356
+ * acceptable because currencies typically have low record counts.
357
+ */
358
+ limit?: number;
359
+ /**
360
+ * Query param: Filter for currencies whose `name` contains this substring,
361
+ * case-insensitive.
362
+ *
363
+ * **NOTE**: If you use this parameter, you cannot also use `nameStartsWith` or
364
+ * `nameEndsWith`.
365
+ */
366
+ nameContains?: string;
367
+ /**
368
+ * Query param: Filter for currencies whose `name` ends with this substring,
369
+ * case-insensitive.
370
+ *
371
+ * **NOTE**: If you use this parameter, you cannot also use `nameContains` or
372
+ * `nameStartsWith`.
373
+ */
374
+ nameEndsWith?: string;
375
+ /**
376
+ * Query param: Filter for currencies whose `name` is alphabetically greater than
377
+ * or equal to this value.
378
+ */
379
+ nameFrom?: string;
380
+ /**
381
+ * Query param: Filter for specific currencies by their name(s), case-insensitive.
382
+ * Like `id`, `name` is a unique identifier for a currency.
383
+ *
384
+ * **IMPORTANT**: If you include this parameter, QuickBooks will ignore all other
385
+ * query parameters for this request.
386
+ *
387
+ * **NOTE**: If any of the values you specify in this parameter are not found, the
388
+ * request will return an error.
389
+ */
390
+ names?: Array<string>;
391
+ /**
392
+ * Query param: Filter for currencies whose `name` starts with this substring,
393
+ * case-insensitive.
394
+ *
395
+ * **NOTE**: If you use this parameter, you cannot also use `nameContains` or
396
+ * `nameEndsWith`.
397
+ */
398
+ nameStartsWith?: string;
399
+ /**
400
+ * Query param: Filter for currencies whose `name` is alphabetically less than or
401
+ * equal to this value.
402
+ */
403
+ nameTo?: string;
404
+ /**
405
+ * Query param: Filter for currencies that are active, inactive, or both.
406
+ */
407
+ status?: 'active' | 'all' | 'inactive';
408
+ /**
409
+ * Query param: Filter for currencies updated on or after this date/time. Accepts
410
+ * the following ISO 8601 formats:
411
+ *
412
+ * - **date-only** (YYYY-MM-DD) - QuickBooks Desktop interprets the date as the
413
+ * **start of the specified day** in the local timezone of the end-user's
414
+ * computer (e.g., `2025-01-01` → `2025-01-01T00:00:00`).
415
+ * - **datetime without timezone** (YYYY-MM-DDTHH:mm:ss) - QuickBooks Desktop
416
+ * interprets the timestamp in the local timezone of the end-user's computer.
417
+ * - **datetime with timezone** (YYYY-MM-DDTHH:mm:ss±HH:mm) - QuickBooks Desktop
418
+ * interprets the timestamp using the specified timezone.
419
+ */
420
+ updatedAfter?: string;
421
+ /**
422
+ * Query param: Filter for currencies updated on or before this date/time. Accepts
423
+ * the following ISO 8601 formats:
424
+ *
425
+ * - **date-only** (YYYY-MM-DD) - QuickBooks Desktop interprets the date as the
426
+ * **end of the specified day** in the local timezone of the end-user's computer
427
+ * (e.g., `2025-01-01` → `2025-01-01T23:59:59`).
428
+ * - **datetime without timezone** (YYYY-MM-DDTHH:mm:ss) - QuickBooks Desktop
429
+ * interprets the timestamp in the local timezone of the end-user's computer.
430
+ * - **datetime with timezone** (YYYY-MM-DDTHH:mm:ss±HH:mm) - QuickBooks Desktop
431
+ * interprets the timestamp using the specified timezone.
432
+ */
433
+ updatedBefore?: string;
434
+ }
435
+ export declare namespace Currencies {
436
+ export { type Currency as Currency, type CurrencyListResponse as CurrencyListResponse, type CurrencyCreateParams as CurrencyCreateParams, type CurrencyRetrieveParams as CurrencyRetrieveParams, type CurrencyUpdateParams as CurrencyUpdateParams, type CurrencyListParams as CurrencyListParams, };
437
+ }
438
+ //# sourceMappingURL=currencies.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"currencies.d.ts","sourceRoot":"","sources":["../../src/resources/qbd/currencies.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AAEnC,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;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C,MAAM,CAAC,CAAC;IAEtB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,MAAM,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,UAAU,CAAC;IAEvC;;;;;;;;;;;OAWG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;;;;;;;;OAWG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,QAAQ,IAAI,QAAQ,EACzB,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Currencies = void 0;
5
+ const resource_1 = require("../../resource.js");
6
+ class Currencies extends resource_1.APIResource {
7
+ /**
8
+ * Creates a user-defined currency with the specified name and currency code.
9
+ * Exchange rates for user-defined currencies are not updated automatically by
10
+ * QuickBooks Desktop; update them manually as needed.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const currency = await conductor.qbd.currencies.create({
15
+ * currencyCode: 'USD',
16
+ * name: 'United States Dollar',
17
+ * conductorEndUserId: 'end_usr_1234567abcdefg',
18
+ * });
19
+ * ```
20
+ */
21
+ create(params, options) {
22
+ const { conductorEndUserId, ...body } = params;
23
+ return this._client.post('/quickbooks-desktop/currencies', {
24
+ body,
25
+ ...options,
26
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
27
+ });
28
+ }
29
+ /**
30
+ * Retrieves a currency by ID.
31
+ *
32
+ * @example
33
+ * ```ts
34
+ * const currency = await conductor.qbd.currencies.retrieve(
35
+ * '80000001-1234567890',
36
+ * { conductorEndUserId: 'end_usr_1234567abcdefg' },
37
+ * );
38
+ * ```
39
+ */
40
+ retrieve(id, params, options) {
41
+ const { conductorEndUserId } = params;
42
+ return this._client.get(`/quickbooks-desktop/currencies/${id}`, {
43
+ ...options,
44
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
45
+ });
46
+ }
47
+ /**
48
+ * Updates an existing currency. For built-in currencies, only the `isActive`
49
+ * status can be changed; name and currency code are not editable. For user-defined
50
+ * currencies, all fields in this request are editable.
51
+ *
52
+ * @example
53
+ * ```ts
54
+ * const currency = await conductor.qbd.currencies.update(
55
+ * '80000001-1234567890',
56
+ * {
57
+ * revisionNumber: '1721172183',
58
+ * conductorEndUserId: 'end_usr_1234567abcdefg',
59
+ * },
60
+ * );
61
+ * ```
62
+ */
63
+ update(id, params, options) {
64
+ const { conductorEndUserId, ...body } = params;
65
+ return this._client.post(`/quickbooks-desktop/currencies/${id}`, {
66
+ body,
67
+ ...options,
68
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
69
+ });
70
+ }
71
+ /**
72
+ * Returns a list of currencies. NOTE: QuickBooks Desktop does not support
73
+ * pagination for currencies; hence, there is no `cursor` parameter. Users
74
+ * typically have few currencies.
75
+ *
76
+ * @example
77
+ * ```ts
78
+ * const currencies = await conductor.qbd.currencies.list({
79
+ * conductorEndUserId: 'end_usr_1234567abcdefg',
80
+ * });
81
+ * ```
82
+ */
83
+ list(params, options) {
84
+ const { conductorEndUserId, ...query } = params;
85
+ return this._client.get('/quickbooks-desktop/currencies', {
86
+ query,
87
+ ...options,
88
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
89
+ });
90
+ }
91
+ }
92
+ exports.Currencies = Currencies;
93
+ //# sourceMappingURL=currencies.js.map
@@ -0,0 +1 @@
1
+ {"version":3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AAM,EAAE,kBAAkB,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gCAAgC,EAAE;YACxD,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAC9E,CAAC,CAAC;IACL,CAAC;CACF;AA5FD,gCA4FC"}
@@ -0,0 +1,89 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../resource.mjs";
3
+ export class Currencies extends APIResource {
4
+ /**
5
+ * Creates a user-defined currency with the specified name and currency code.
6
+ * Exchange rates for user-defined currencies are not updated automatically by
7
+ * QuickBooks Desktop; update them manually as needed.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const currency = await conductor.qbd.currencies.create({
12
+ * currencyCode: 'USD',
13
+ * name: 'United States Dollar',
14
+ * conductorEndUserId: 'end_usr_1234567abcdefg',
15
+ * });
16
+ * ```
17
+ */
18
+ create(params, options) {
19
+ const { conductorEndUserId, ...body } = params;
20
+ return this._client.post('/quickbooks-desktop/currencies', {
21
+ body,
22
+ ...options,
23
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
24
+ });
25
+ }
26
+ /**
27
+ * Retrieves a currency by ID.
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * const currency = await conductor.qbd.currencies.retrieve(
32
+ * '80000001-1234567890',
33
+ * { conductorEndUserId: 'end_usr_1234567abcdefg' },
34
+ * );
35
+ * ```
36
+ */
37
+ retrieve(id, params, options) {
38
+ const { conductorEndUserId } = params;
39
+ return this._client.get(`/quickbooks-desktop/currencies/${id}`, {
40
+ ...options,
41
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
42
+ });
43
+ }
44
+ /**
45
+ * Updates an existing currency. For built-in currencies, only the `isActive`
46
+ * status can be changed; name and currency code are not editable. For user-defined
47
+ * currencies, all fields in this request are editable.
48
+ *
49
+ * @example
50
+ * ```ts
51
+ * const currency = await conductor.qbd.currencies.update(
52
+ * '80000001-1234567890',
53
+ * {
54
+ * revisionNumber: '1721172183',
55
+ * conductorEndUserId: 'end_usr_1234567abcdefg',
56
+ * },
57
+ * );
58
+ * ```
59
+ */
60
+ update(id, params, options) {
61
+ const { conductorEndUserId, ...body } = params;
62
+ return this._client.post(`/quickbooks-desktop/currencies/${id}`, {
63
+ body,
64
+ ...options,
65
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
66
+ });
67
+ }
68
+ /**
69
+ * Returns a list of currencies. NOTE: QuickBooks Desktop does not support
70
+ * pagination for currencies; hence, there is no `cursor` parameter. Users
71
+ * typically have few currencies.
72
+ *
73
+ * @example
74
+ * ```ts
75
+ * const currencies = await conductor.qbd.currencies.list({
76
+ * conductorEndUserId: 'end_usr_1234567abcdefg',
77
+ * });
78
+ * ```
79
+ */
80
+ list(params, options) {
81
+ const { conductorEndUserId, ...query } = params;
82
+ return this._client.get('/quickbooks-desktop/currencies', {
83
+ query,
84
+ ...options,
85
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
86
+ });
87
+ }
88
+ }
89
+ //# sourceMappingURL=currencies.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"currencies.mjs","sourceRoot":"","sources":["../../src/resources/qbd/currencies.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,MAA4B,EAAE,OAA6B;QAChE,MAAM,EAAE,kBAAkB,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gCAAgC,EAAE;YACzD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAC9E,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,QAAQ,CACN,EAAU,EACV,MAA8B,EAC9B,OAA6B;QAE7B,MAAM,EAAE,kBAAkB,EAAE,GAAG,MAAM,CAAC;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kCAAkC,EAAE,EAAE,EAAE;YAC9D,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAC9E,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CAAC,EAAU,EAAE,MAA4B,EAAE,OAA6B;QAC5E,MAAM,EAAE,kBAAkB,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kCAAkC,EAAE,EAAE,EAAE;YAC/D,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAC9E,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,MAA0B,EAAE,OAA6B;QAC5D,MAAM,EAAE,kBAAkB,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gCAAgC,EAAE;YACxD,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAC9E,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -10,6 +10,7 @@ export { CompanyResource, type Company, type CompanyRetrieveParams } from "./com
10
10
  export { CreditCardChargesCursorPage, CreditCardCharges, type CreditCardCharge, type CreditCardChargeDeleteResponse, type CreditCardChargeCreateParams, type CreditCardChargeRetrieveParams, type CreditCardChargeUpdateParams, type CreditCardChargeListParams, type CreditCardChargeDeleteParams, } from "./credit-card-charges.js";
11
11
  export { CreditCardCreditsCursorPage, CreditCardCredits, type CreditCardCredit, type CreditCardCreditDeleteResponse, type CreditCardCreditCreateParams, type CreditCardCreditRetrieveParams, type CreditCardCreditUpdateParams, type CreditCardCreditListParams, type CreditCardCreditDeleteParams, } from "./credit-card-credits.js";
12
12
  export { CreditMemosCursorPage, CreditMemos, type CreditMemo, type CreditMemoDeleteResponse, type CreditMemoCreateParams, type CreditMemoRetrieveParams, type CreditMemoUpdateParams, type CreditMemoListParams, type CreditMemoDeleteParams, } from "./credit-memos.js";
13
+ export { Currencies, type Currency, type CurrencyListResponse, type CurrencyCreateParams, type CurrencyRetrieveParams, type CurrencyUpdateParams, type CurrencyListParams, } from "./currencies.js";
13
14
  export { CustomersCursorPage, Customers, type Customer, type CustomerCreateParams, type CustomerRetrieveParams, type CustomerUpdateParams, type CustomerListParams, } from "./customers.js";
14
15
  export { DateDrivenTerms, type DateDrivenTerm, type DateDrivenTermListResponse, type DateDrivenTermCreateParams, type DateDrivenTermRetrieveParams, type DateDrivenTermListParams, } from "./date-driven-terms.js";
15
16
  export { DeletedListObjects, type DeletedListObject, type DeletedListObjectListResponse, type DeletedListObjectListParams, } from "./deleted-list-objects.js";