@apideck/unify 0.23.0 → 0.23.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.
Files changed (93) hide show
  1. package/jsr.json +1 -1
  2. package/lib/config.d.ts +3 -3
  3. package/lib/config.js +3 -3
  4. package/models/components/note.d.ts +5 -0
  5. package/models/components/note.d.ts.map +1 -1
  6. package/models/components/note.js +4 -0
  7. package/models/components/note.js.map +1 -1
  8. package/models/components/noteinput.d.ts +5 -0
  9. package/models/components/noteinput.d.ts.map +1 -1
  10. package/models/components/noteinput.js +4 -0
  11. package/models/components/noteinput.js.map +1 -1
  12. package/package.json +5 -1
  13. package/src/__tests__/activities.test.ts +783 -0
  14. package/src/__tests__/agedcreditors.test.ts +279 -0
  15. package/src/__tests__/ageddebtors.test.ts +279 -0
  16. package/src/__tests__/apideckcompanies.test.ts +712 -0
  17. package/src/__tests__/apideckcustomers.test.ts +360 -0
  18. package/src/__tests__/apideckdepartments.test.ts +319 -0
  19. package/src/__tests__/apiresources.test.ts +61 -0
  20. package/src/__tests__/apis.test.ts +214 -0
  21. package/src/__tests__/applicants.test.ts +976 -0
  22. package/src/__tests__/applications.test.ts +329 -0
  23. package/src/__tests__/assertions.ts +13 -0
  24. package/src/__tests__/attachments.test.ts +363 -0
  25. package/src/__tests__/balancesheet.test.ts +451 -0
  26. package/src/__tests__/billpayments.test.ts +666 -0
  27. package/src/__tests__/bills.test.ts +1133 -0
  28. package/src/__tests__/collections.test.ts +115 -0
  29. package/src/__tests__/collectiontags.test.ts +66 -0
  30. package/src/__tests__/collectionticketcomments.test.ts +318 -0
  31. package/src/__tests__/collectiontickets.test.ts +436 -0
  32. package/src/__tests__/collectionusers.test.ts +122 -0
  33. package/src/__tests__/companies.test.ts +1059 -0
  34. package/src/__tests__/companyinfo.test.ts +218 -0
  35. package/src/__tests__/connectioncustommappings.test.ts +67 -0
  36. package/src/__tests__/connections.test.ts +1713 -0
  37. package/src/__tests__/connectionsettings.test.ts +280 -0
  38. package/src/__tests__/connectordocs.test.ts +28 -0
  39. package/src/__tests__/connectors.test.ts +751 -0
  40. package/src/__tests__/consumerrequestcounts.test.ts +41 -0
  41. package/src/__tests__/consumers.test.ts +517 -0
  42. package/src/__tests__/contacts.test.ts +957 -0
  43. package/src/__tests__/createcallback.test.ts +34 -0
  44. package/src/__tests__/creditnotes.test.ts +1362 -0
  45. package/src/__tests__/customers.test.ts +1089 -0
  46. package/src/__tests__/customfields.test.ts +50 -0
  47. package/src/__tests__/custommappings.test.ts +63 -0
  48. package/src/__tests__/departments.test.ts +359 -0
  49. package/src/__tests__/drivegroups.test.ts +318 -0
  50. package/src/__tests__/drives.test.ts +311 -0
  51. package/src/__tests__/employeepayrolls.test.ts +487 -0
  52. package/src/__tests__/employees.test.ts +1682 -0
  53. package/src/__tests__/employeeschedules.test.ts +456 -0
  54. package/src/__tests__/eventlogs.test.ts +157 -0
  55. package/src/__tests__/expenses.test.ts +566 -0
  56. package/src/__tests__/files.test.ts +392 -0
  57. package/src/__tests__/files.ts +56 -0
  58. package/src/__tests__/folders.test.ts +103 -0
  59. package/src/__tests__/invoiceitems.test.ts +586 -0
  60. package/src/__tests__/invoices.test.ts +1561 -0
  61. package/src/__tests__/jobs.test.ts +837 -0
  62. package/src/__tests__/journalentries.test.ts +1053 -0
  63. package/src/__tests__/leads.test.ts +897 -0
  64. package/src/__tests__/ledgeraccounts.test.ts +594 -0
  65. package/src/__tests__/locations.test.ts +561 -0
  66. package/src/__tests__/logs.test.ts +135 -0
  67. package/src/__tests__/messages.test.ts +396 -0
  68. package/src/__tests__/mockserver/README.md +52 -0
  69. package/src/__tests__/notes.test.ts +335 -0
  70. package/src/__tests__/opportunities.test.ts +503 -0
  71. package/src/__tests__/orders.test.ts +849 -0
  72. package/src/__tests__/payments.test.ts +557 -0
  73. package/src/__tests__/payrolls.test.ts +481 -0
  74. package/src/__tests__/pipelines.test.ts +383 -0
  75. package/src/__tests__/products.test.ts +505 -0
  76. package/src/__tests__/profitandloss.test.ts +221 -0
  77. package/src/__tests__/purchaseorders.test.ts +1464 -0
  78. package/src/__tests__/sessions.test.ts +70 -0
  79. package/src/__tests__/sharedlinks.test.ts +331 -0
  80. package/src/__tests__/stores.test.ts +39 -0
  81. package/src/__tests__/subsidiaries.test.ts +316 -0
  82. package/src/__tests__/suppliers.test.ts +1071 -0
  83. package/src/__tests__/taxrates.test.ts +472 -0
  84. package/src/__tests__/testclient.ts +48 -0
  85. package/src/__tests__/timeoffrequests.test.ts +381 -0
  86. package/src/__tests__/trackingcategories.test.ts +329 -0
  87. package/src/__tests__/uploadsessions.test.ts +142 -0
  88. package/src/__tests__/users.test.ts +667 -0
  89. package/src/__tests__/validateconnection.test.ts +32 -0
  90. package/src/__tests__/webhooks.test.ts +248 -0
  91. package/src/lib/config.ts +3 -3
  92. package/src/models/components/note.ts +9 -0
  93. package/src/models/components/noteinput.ts +9 -0
@@ -0,0 +1,1464 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { assert, expect, it, test } from "vitest";
6
+ import { Apideck } from "../index.js";
7
+ import { RFCDate } from "../types/index.js";
8
+ import { createTestHTTPClient } from "./testclient.js";
9
+
10
+ test("Purchaseorders Accounting Purchase Orders All", async () => {
11
+ const testHttpClient = createTestHTTPClient("accounting.purchaseOrdersAll");
12
+
13
+ const apideck = new Apideck({
14
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
15
+ httpClient: testHttpClient,
16
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
17
+ });
18
+
19
+ const result = await apideck.accounting.purchaseOrders.list({
20
+ serviceId: "salesforce",
21
+ passThrough: {
22
+ "search": "San Francisco",
23
+ },
24
+ filter: {
25
+ updatedSince: new Date("2020-09-30T07:43:32.000Z"),
26
+ supplierId: "1234",
27
+ },
28
+ sort: {
29
+ by: "updated_at",
30
+ },
31
+ });
32
+ expect(result.httpMeta.response.status).toBe(200);
33
+ expect(result.getPurchaseOrdersResponse).toBeDefined();
34
+ expect(result.getPurchaseOrdersResponse).toEqual({
35
+ statusCode: 200,
36
+ status: "OK",
37
+ service: "quickbooks",
38
+ resource: "PurchaseOrders",
39
+ operation: "all",
40
+ data: [
41
+ {
42
+ id: "12345",
43
+ downstreamId: "12345",
44
+ poNumber: "90000117",
45
+ reference: "123456",
46
+ supplier: {
47
+ id: "12345",
48
+ displayId: "SUPP00101",
49
+ displayName: "Windsurf Shop",
50
+ companyName: "The boring company",
51
+ address: {
52
+ id: "123",
53
+ type: "primary",
54
+ string: "25 Spring Street, Blackburn, VIC 3130",
55
+ name: "HQ US",
56
+ line1: "Main street",
57
+ line2: "apt #",
58
+ line3: "Suite #",
59
+ line4: "delivery instructions",
60
+ streetNumber: "25",
61
+ city: "San Francisco",
62
+ state: "CA",
63
+ postalCode: "94104",
64
+ country: "US",
65
+ latitude: "40.759211",
66
+ longitude: "-73.984638",
67
+ county: "Santa Clara",
68
+ contactName: "Elon Musk",
69
+ salutation: "Mr",
70
+ phoneNumber: "111-111-1111",
71
+ fax: "122-111-1111",
72
+ email: "elon@musk.com",
73
+ website: "https://elonmusk.com",
74
+ notes: "Address notes or delivery instructions.",
75
+ rowVersion: "1-12345",
76
+ },
77
+ },
78
+ companyId: "12345",
79
+ status: "open",
80
+ issuedDate: new RFCDate("2020-09-30"),
81
+ deliveryDate: new RFCDate("2020-09-30"),
82
+ expectedArrivalDate: new RFCDate("2020-09-30"),
83
+ currency: "USD",
84
+ currencyRate: 0.69,
85
+ subTotal: 27500,
86
+ totalTax: 2500,
87
+ total: 27500,
88
+ taxInclusive: true,
89
+ lineItems: [
90
+ {
91
+ id: "12345",
92
+ rowId: "12345",
93
+ code: "120-C",
94
+ lineNumber: 1,
95
+ description:
96
+ "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.",
97
+ type: "sales_item",
98
+ taxAmount: 27500,
99
+ totalAmount: 27500,
100
+ quantity: 1,
101
+ unitPrice: 27500.5,
102
+ unitOfMeasure: "pc.",
103
+ discountPercentage: 0.01,
104
+ discountAmount: 19.99,
105
+ locationId: "12345",
106
+ departmentId: "12345",
107
+ item: {
108
+ id: "12344",
109
+ code: "120-C",
110
+ name: "Model Y",
111
+ },
112
+ taxRate: {
113
+ id: "123456",
114
+ code: "N-T",
115
+ name: "GST on Purchases",
116
+ rate: 10,
117
+ },
118
+ trackingCategories: [
119
+ {
120
+ id: "123456",
121
+ name: "New York",
122
+ },
123
+ {
124
+ id: "123456",
125
+ name: "New York",
126
+ },
127
+ {
128
+ id: "123456",
129
+ name: "New York",
130
+ },
131
+ ],
132
+ ledgerAccount: {
133
+ id: "123456",
134
+ name: "Bank account",
135
+ nominalCode: "N091",
136
+ code: "453",
137
+ },
138
+ customFields: [
139
+ {
140
+ id: "2389328923893298",
141
+ name: "employee_level",
142
+ description: "Employee Level",
143
+ value: 10,
144
+ },
145
+ ],
146
+ rowVersion: "1-12345",
147
+ updatedBy: "12345",
148
+ createdBy: "12345",
149
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
150
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
151
+ },
152
+ {
153
+ id: "12345",
154
+ rowId: "12345",
155
+ code: "120-C",
156
+ lineNumber: 1,
157
+ description:
158
+ "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.",
159
+ type: "sales_item",
160
+ taxAmount: 27500,
161
+ totalAmount: 27500,
162
+ quantity: 1,
163
+ unitPrice: 27500.5,
164
+ unitOfMeasure: "pc.",
165
+ discountPercentage: 0.01,
166
+ discountAmount: 19.99,
167
+ locationId: "12345",
168
+ departmentId: "12345",
169
+ item: {
170
+ id: "12344",
171
+ code: "120-C",
172
+ name: "Model Y",
173
+ },
174
+ taxRate: {
175
+ id: "123456",
176
+ code: "N-T",
177
+ name: "GST on Purchases",
178
+ rate: 10,
179
+ },
180
+ trackingCategories: [
181
+ {
182
+ id: "123456",
183
+ name: "New York",
184
+ },
185
+ ],
186
+ ledgerAccount: {
187
+ id: "123456",
188
+ name: "Bank account",
189
+ nominalCode: "N091",
190
+ code: "453",
191
+ },
192
+ customFields: [
193
+ {
194
+ id: "2389328923893298",
195
+ name: "employee_level",
196
+ description: "Employee Level",
197
+ value: {},
198
+ },
199
+ {
200
+ id: "2389328923893298",
201
+ name: "employee_level",
202
+ description: "Employee Level",
203
+ value: "Uses Salesforce and Marketo",
204
+ },
205
+ ],
206
+ rowVersion: "1-12345",
207
+ updatedBy: "12345",
208
+ createdBy: "12345",
209
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
210
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
211
+ },
212
+ ],
213
+ shippingAddress: {
214
+ id: "123",
215
+ type: "primary",
216
+ string: "25 Spring Street, Blackburn, VIC 3130",
217
+ name: "HQ US",
218
+ line1: "Main street",
219
+ line2: "apt #",
220
+ line3: "Suite #",
221
+ line4: "delivery instructions",
222
+ streetNumber: "25",
223
+ city: "San Francisco",
224
+ state: "CA",
225
+ postalCode: "94104",
226
+ country: "US",
227
+ latitude: "40.759211",
228
+ longitude: "-73.984638",
229
+ county: "Santa Clara",
230
+ contactName: "Elon Musk",
231
+ salutation: "Mr",
232
+ phoneNumber: "111-111-1111",
233
+ fax: "122-111-1111",
234
+ email: "elon@musk.com",
235
+ website: "https://elonmusk.com",
236
+ notes: "Address notes or delivery instructions.",
237
+ rowVersion: "1-12345",
238
+ },
239
+ ledgerAccount: {
240
+ id: "123456",
241
+ name: "Bank account",
242
+ nominalCode: "N091",
243
+ code: "453",
244
+ },
245
+ templateId: "123456",
246
+ discountPercentage: 5.5,
247
+ bankAccount: {
248
+ bankName: "Monzo",
249
+ accountNumber: "123465",
250
+ accountName: "SPACEX LLC",
251
+ accountType: "credit_card",
252
+ iban: "CH2989144532982975332",
253
+ bic: "AUDSCHGGXXX",
254
+ routingNumber: "012345678",
255
+ bsbNumber: "062-001",
256
+ branchIdentifier: "001",
257
+ bankCode: "BNH",
258
+ currency: "USD",
259
+ },
260
+ accountingByRow: false,
261
+ dueDate: new RFCDate("2020-10-30"),
262
+ paymentMethod: "cash",
263
+ taxCode: "1234",
264
+ channel: "email",
265
+ memo: "Thank you for the partnership and have a great day!",
266
+ trackingCategories: [
267
+ {
268
+ id: "123456",
269
+ name: "New York",
270
+ },
271
+ {
272
+ id: "123456",
273
+ name: "New York",
274
+ },
275
+ {
276
+ id: "123456",
277
+ name: "New York",
278
+ },
279
+ ],
280
+ customFields: [
281
+ {
282
+ id: "2389328923893298",
283
+ name: "employee_level",
284
+ description: "Employee Level",
285
+ value: "Uses Salesforce and Marketo",
286
+ },
287
+ ],
288
+ rowVersion: "1-12345",
289
+ updatedBy: "12345",
290
+ createdBy: "12345",
291
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
292
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
293
+ passThrough: [
294
+ {
295
+ serviceId: "<id>",
296
+ extendPaths: [
297
+ {
298
+ path: "$.nested.property",
299
+ value: {
300
+ "TaxClassificationRef": {
301
+ "value": "EUC-99990201-V1-00020000",
302
+ },
303
+ },
304
+ },
305
+ {
306
+ path: "$.nested.property",
307
+ value: {
308
+ "TaxClassificationRef": {
309
+ "value": "EUC-99990201-V1-00020000",
310
+ },
311
+ },
312
+ },
313
+ ],
314
+ },
315
+ {
316
+ serviceId: "<id>",
317
+ extendPaths: [
318
+ {
319
+ path: "$.nested.property",
320
+ value: {
321
+ "TaxClassificationRef": {
322
+ "value": "EUC-99990201-V1-00020000",
323
+ },
324
+ },
325
+ },
326
+ {
327
+ path: "$.nested.property",
328
+ value: {
329
+ "TaxClassificationRef": {
330
+ "value": "EUC-99990201-V1-00020000",
331
+ },
332
+ },
333
+ },
334
+ ],
335
+ },
336
+ {
337
+ serviceId: "<id>",
338
+ extendPaths: [
339
+ {
340
+ path: "$.nested.property",
341
+ value: {
342
+ "TaxClassificationRef": {
343
+ "value": "EUC-99990201-V1-00020000",
344
+ },
345
+ },
346
+ },
347
+ ],
348
+ },
349
+ ],
350
+ },
351
+ {
352
+ id: "12345",
353
+ downstreamId: "12345",
354
+ poNumber: "90000117",
355
+ reference: "123456",
356
+ supplier: {
357
+ id: "12345",
358
+ displayId: "SUPP00101",
359
+ displayName: "Windsurf Shop",
360
+ companyName: "The boring company",
361
+ address: {
362
+ id: "123",
363
+ type: "primary",
364
+ string: "25 Spring Street, Blackburn, VIC 3130",
365
+ name: "HQ US",
366
+ line1: "Main street",
367
+ line2: "apt #",
368
+ line3: "Suite #",
369
+ line4: "delivery instructions",
370
+ streetNumber: "25",
371
+ city: "San Francisco",
372
+ state: "CA",
373
+ postalCode: "94104",
374
+ country: "US",
375
+ latitude: "40.759211",
376
+ longitude: "-73.984638",
377
+ county: "Santa Clara",
378
+ contactName: "Elon Musk",
379
+ salutation: "Mr",
380
+ phoneNumber: "111-111-1111",
381
+ fax: "122-111-1111",
382
+ email: "elon@musk.com",
383
+ website: "https://elonmusk.com",
384
+ notes: "Address notes or delivery instructions.",
385
+ rowVersion: "1-12345",
386
+ },
387
+ },
388
+ companyId: "12345",
389
+ status: "open",
390
+ issuedDate: new RFCDate("2020-09-30"),
391
+ deliveryDate: new RFCDate("2020-09-30"),
392
+ expectedArrivalDate: new RFCDate("2020-09-30"),
393
+ currency: "USD",
394
+ currencyRate: 0.69,
395
+ subTotal: 27500,
396
+ totalTax: 2500,
397
+ total: 27500,
398
+ taxInclusive: true,
399
+ lineItems: [
400
+ {
401
+ id: "12345",
402
+ rowId: "12345",
403
+ code: "120-C",
404
+ lineNumber: 1,
405
+ description:
406
+ "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.",
407
+ type: "sales_item",
408
+ taxAmount: 27500,
409
+ totalAmount: 27500,
410
+ quantity: 1,
411
+ unitPrice: 27500.5,
412
+ unitOfMeasure: "pc.",
413
+ discountPercentage: 0.01,
414
+ discountAmount: 19.99,
415
+ locationId: "12345",
416
+ departmentId: "12345",
417
+ item: {
418
+ id: "12344",
419
+ code: "120-C",
420
+ name: "Model Y",
421
+ },
422
+ taxRate: {
423
+ id: "123456",
424
+ code: "N-T",
425
+ name: "GST on Purchases",
426
+ rate: 10,
427
+ },
428
+ trackingCategories: [
429
+ {
430
+ id: "123456",
431
+ name: "New York",
432
+ },
433
+ {
434
+ id: "123456",
435
+ name: "New York",
436
+ },
437
+ ],
438
+ ledgerAccount: {
439
+ id: "123456",
440
+ name: "Bank account",
441
+ nominalCode: "N091",
442
+ code: "453",
443
+ },
444
+ customFields: [
445
+ {
446
+ id: "2389328923893298",
447
+ name: "employee_level",
448
+ description: "Employee Level",
449
+ value: "Uses Salesforce and Marketo",
450
+ },
451
+ {
452
+ id: "2389328923893298",
453
+ name: "employee_level",
454
+ description: "Employee Level",
455
+ value: [
456
+ {},
457
+ {},
458
+ ],
459
+ },
460
+ ],
461
+ rowVersion: "1-12345",
462
+ updatedBy: "12345",
463
+ createdBy: "12345",
464
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
465
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
466
+ },
467
+ ],
468
+ shippingAddress: {
469
+ id: "123",
470
+ type: "primary",
471
+ string: "25 Spring Street, Blackburn, VIC 3130",
472
+ name: "HQ US",
473
+ line1: "Main street",
474
+ line2: "apt #",
475
+ line3: "Suite #",
476
+ line4: "delivery instructions",
477
+ streetNumber: "25",
478
+ city: "San Francisco",
479
+ state: "CA",
480
+ postalCode: "94104",
481
+ country: "US",
482
+ latitude: "40.759211",
483
+ longitude: "-73.984638",
484
+ county: "Santa Clara",
485
+ contactName: "Elon Musk",
486
+ salutation: "Mr",
487
+ phoneNumber: "111-111-1111",
488
+ fax: "122-111-1111",
489
+ email: "elon@musk.com",
490
+ website: "https://elonmusk.com",
491
+ notes: "Address notes or delivery instructions.",
492
+ rowVersion: "1-12345",
493
+ },
494
+ ledgerAccount: {
495
+ id: "123456",
496
+ name: "Bank account",
497
+ nominalCode: "N091",
498
+ code: "453",
499
+ },
500
+ templateId: "123456",
501
+ discountPercentage: 5.5,
502
+ bankAccount: {
503
+ bankName: "Monzo",
504
+ accountNumber: "123465",
505
+ accountName: "SPACEX LLC",
506
+ accountType: "credit_card",
507
+ iban: "CH2989144532982975332",
508
+ bic: "AUDSCHGGXXX",
509
+ routingNumber: "012345678",
510
+ bsbNumber: "062-001",
511
+ branchIdentifier: "001",
512
+ bankCode: "BNH",
513
+ currency: "USD",
514
+ },
515
+ accountingByRow: false,
516
+ dueDate: new RFCDate("2020-10-30"),
517
+ paymentMethod: "cash",
518
+ taxCode: "1234",
519
+ channel: "email",
520
+ memo: "Thank you for the partnership and have a great day!",
521
+ trackingCategories: [
522
+ {
523
+ id: "123456",
524
+ name: "New York",
525
+ },
526
+ {
527
+ id: "123456",
528
+ name: "New York",
529
+ },
530
+ {
531
+ id: "123456",
532
+ name: "New York",
533
+ },
534
+ ],
535
+ customFields: [
536
+ {
537
+ id: "2389328923893298",
538
+ name: "employee_level",
539
+ description: "Employee Level",
540
+ value: "Uses Salesforce and Marketo",
541
+ },
542
+ {
543
+ id: "2389328923893298",
544
+ name: "employee_level",
545
+ description: "Employee Level",
546
+ value: 10,
547
+ },
548
+ ],
549
+ rowVersion: "1-12345",
550
+ updatedBy: "12345",
551
+ createdBy: "12345",
552
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
553
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
554
+ passThrough: [
555
+ {
556
+ serviceId: "<id>",
557
+ extendPaths: [
558
+ {
559
+ path: "$.nested.property",
560
+ value: {
561
+ "TaxClassificationRef": {
562
+ "value": "EUC-99990201-V1-00020000",
563
+ },
564
+ },
565
+ },
566
+ ],
567
+ },
568
+ {
569
+ serviceId: "<id>",
570
+ extendPaths: [
571
+ {
572
+ path: "$.nested.property",
573
+ value: {
574
+ "TaxClassificationRef": {
575
+ "value": "EUC-99990201-V1-00020000",
576
+ },
577
+ },
578
+ },
579
+ {
580
+ path: "$.nested.property",
581
+ value: {
582
+ "TaxClassificationRef": {
583
+ "value": "EUC-99990201-V1-00020000",
584
+ },
585
+ },
586
+ },
587
+ {
588
+ path: "$.nested.property",
589
+ value: {
590
+ "TaxClassificationRef": {
591
+ "value": "EUC-99990201-V1-00020000",
592
+ },
593
+ },
594
+ },
595
+ ],
596
+ },
597
+ {
598
+ serviceId: "<id>",
599
+ extendPaths: [
600
+ {
601
+ path: "$.nested.property",
602
+ value: {
603
+ "TaxClassificationRef": {
604
+ "value": "EUC-99990201-V1-00020000",
605
+ },
606
+ },
607
+ },
608
+ {
609
+ path: "$.nested.property",
610
+ value: {
611
+ "TaxClassificationRef": {
612
+ "value": "EUC-99990201-V1-00020000",
613
+ },
614
+ },
615
+ },
616
+ ],
617
+ },
618
+ ],
619
+ },
620
+ {
621
+ id: "12345",
622
+ downstreamId: "12345",
623
+ poNumber: "90000117",
624
+ reference: "123456",
625
+ supplier: {
626
+ id: "12345",
627
+ displayId: "SUPP00101",
628
+ displayName: "Windsurf Shop",
629
+ companyName: "The boring company",
630
+ address: {
631
+ id: "123",
632
+ type: "primary",
633
+ string: "25 Spring Street, Blackburn, VIC 3130",
634
+ name: "HQ US",
635
+ line1: "Main street",
636
+ line2: "apt #",
637
+ line3: "Suite #",
638
+ line4: "delivery instructions",
639
+ streetNumber: "25",
640
+ city: "San Francisco",
641
+ state: "CA",
642
+ postalCode: "94104",
643
+ country: "US",
644
+ latitude: "40.759211",
645
+ longitude: "-73.984638",
646
+ county: "Santa Clara",
647
+ contactName: "Elon Musk",
648
+ salutation: "Mr",
649
+ phoneNumber: "111-111-1111",
650
+ fax: "122-111-1111",
651
+ email: "elon@musk.com",
652
+ website: "https://elonmusk.com",
653
+ notes: "Address notes or delivery instructions.",
654
+ rowVersion: "1-12345",
655
+ },
656
+ },
657
+ companyId: "12345",
658
+ status: "open",
659
+ issuedDate: new RFCDate("2020-09-30"),
660
+ deliveryDate: new RFCDate("2020-09-30"),
661
+ expectedArrivalDate: new RFCDate("2020-09-30"),
662
+ currency: "USD",
663
+ currencyRate: 0.69,
664
+ subTotal: 27500,
665
+ totalTax: 2500,
666
+ total: 27500,
667
+ taxInclusive: true,
668
+ lineItems: [
669
+ {
670
+ id: "12345",
671
+ rowId: "12345",
672
+ code: "120-C",
673
+ lineNumber: 1,
674
+ description:
675
+ "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.",
676
+ type: "sales_item",
677
+ taxAmount: 27500,
678
+ totalAmount: 27500,
679
+ quantity: 1,
680
+ unitPrice: 27500.5,
681
+ unitOfMeasure: "pc.",
682
+ discountPercentage: 0.01,
683
+ discountAmount: 19.99,
684
+ locationId: "12345",
685
+ departmentId: "12345",
686
+ item: {
687
+ id: "12344",
688
+ code: "120-C",
689
+ name: "Model Y",
690
+ },
691
+ taxRate: {
692
+ id: "123456",
693
+ code: "N-T",
694
+ name: "GST on Purchases",
695
+ rate: 10,
696
+ },
697
+ trackingCategories: [
698
+ {
699
+ id: "123456",
700
+ name: "New York",
701
+ },
702
+ ],
703
+ ledgerAccount: {
704
+ id: "123456",
705
+ name: "Bank account",
706
+ nominalCode: "N091",
707
+ code: "453",
708
+ },
709
+ customFields: [
710
+ {
711
+ id: "2389328923893298",
712
+ name: "employee_level",
713
+ description: "Employee Level",
714
+ value: {},
715
+ },
716
+ ],
717
+ rowVersion: "1-12345",
718
+ updatedBy: "12345",
719
+ createdBy: "12345",
720
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
721
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
722
+ },
723
+ {
724
+ id: "12345",
725
+ rowId: "12345",
726
+ code: "120-C",
727
+ lineNumber: 1,
728
+ description:
729
+ "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.",
730
+ type: "sales_item",
731
+ taxAmount: 27500,
732
+ totalAmount: 27500,
733
+ quantity: 1,
734
+ unitPrice: 27500.5,
735
+ unitOfMeasure: "pc.",
736
+ discountPercentage: 0.01,
737
+ discountAmount: 19.99,
738
+ locationId: "12345",
739
+ departmentId: "12345",
740
+ item: {
741
+ id: "12344",
742
+ code: "120-C",
743
+ name: "Model Y",
744
+ },
745
+ taxRate: {
746
+ id: "123456",
747
+ code: "N-T",
748
+ name: "GST on Purchases",
749
+ rate: 10,
750
+ },
751
+ trackingCategories: [
752
+ {
753
+ id: "123456",
754
+ name: "New York",
755
+ },
756
+ {
757
+ id: "123456",
758
+ name: "New York",
759
+ },
760
+ ],
761
+ ledgerAccount: {
762
+ id: "123456",
763
+ name: "Bank account",
764
+ nominalCode: "N091",
765
+ code: "453",
766
+ },
767
+ customFields: [
768
+ {
769
+ id: "2389328923893298",
770
+ name: "employee_level",
771
+ description: "Employee Level",
772
+ value: true,
773
+ },
774
+ {
775
+ id: "2389328923893298",
776
+ name: "employee_level",
777
+ description: "Employee Level",
778
+ value: true,
779
+ },
780
+ ],
781
+ rowVersion: "1-12345",
782
+ updatedBy: "12345",
783
+ createdBy: "12345",
784
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
785
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
786
+ },
787
+ {
788
+ id: "12345",
789
+ rowId: "12345",
790
+ code: "120-C",
791
+ lineNumber: 1,
792
+ description:
793
+ "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.",
794
+ type: "sales_item",
795
+ taxAmount: 27500,
796
+ totalAmount: 27500,
797
+ quantity: 1,
798
+ unitPrice: 27500.5,
799
+ unitOfMeasure: "pc.",
800
+ discountPercentage: 0.01,
801
+ discountAmount: 19.99,
802
+ locationId: "12345",
803
+ departmentId: "12345",
804
+ item: {
805
+ id: "12344",
806
+ code: "120-C",
807
+ name: "Model Y",
808
+ },
809
+ taxRate: {
810
+ id: "123456",
811
+ code: "N-T",
812
+ name: "GST on Purchases",
813
+ rate: 10,
814
+ },
815
+ trackingCategories: [
816
+ {
817
+ id: "123456",
818
+ name: "New York",
819
+ },
820
+ ],
821
+ ledgerAccount: {
822
+ id: "123456",
823
+ name: "Bank account",
824
+ nominalCode: "N091",
825
+ code: "453",
826
+ },
827
+ customFields: [
828
+ {
829
+ id: "2389328923893298",
830
+ name: "employee_level",
831
+ description: "Employee Level",
832
+ value: [
833
+ {},
834
+ ],
835
+ },
836
+ {
837
+ id: "2389328923893298",
838
+ name: "employee_level",
839
+ description: "Employee Level",
840
+ value: [
841
+ {},
842
+ ],
843
+ },
844
+ ],
845
+ rowVersion: "1-12345",
846
+ updatedBy: "12345",
847
+ createdBy: "12345",
848
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
849
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
850
+ },
851
+ ],
852
+ shippingAddress: {
853
+ id: "123",
854
+ type: "primary",
855
+ string: "25 Spring Street, Blackburn, VIC 3130",
856
+ name: "HQ US",
857
+ line1: "Main street",
858
+ line2: "apt #",
859
+ line3: "Suite #",
860
+ line4: "delivery instructions",
861
+ streetNumber: "25",
862
+ city: "San Francisco",
863
+ state: "CA",
864
+ postalCode: "94104",
865
+ country: "US",
866
+ latitude: "40.759211",
867
+ longitude: "-73.984638",
868
+ county: "Santa Clara",
869
+ contactName: "Elon Musk",
870
+ salutation: "Mr",
871
+ phoneNumber: "111-111-1111",
872
+ fax: "122-111-1111",
873
+ email: "elon@musk.com",
874
+ website: "https://elonmusk.com",
875
+ notes: "Address notes or delivery instructions.",
876
+ rowVersion: "1-12345",
877
+ },
878
+ ledgerAccount: {
879
+ id: "123456",
880
+ name: "Bank account",
881
+ nominalCode: "N091",
882
+ code: "453",
883
+ },
884
+ templateId: "123456",
885
+ discountPercentage: 5.5,
886
+ bankAccount: {
887
+ bankName: "Monzo",
888
+ accountNumber: "123465",
889
+ accountName: "SPACEX LLC",
890
+ accountType: "credit_card",
891
+ iban: "CH2989144532982975332",
892
+ bic: "AUDSCHGGXXX",
893
+ routingNumber: "012345678",
894
+ bsbNumber: "062-001",
895
+ branchIdentifier: "001",
896
+ bankCode: "BNH",
897
+ currency: "USD",
898
+ },
899
+ accountingByRow: false,
900
+ dueDate: new RFCDate("2020-10-30"),
901
+ paymentMethod: "cash",
902
+ taxCode: "1234",
903
+ channel: "email",
904
+ memo: "Thank you for the partnership and have a great day!",
905
+ trackingCategories: [
906
+ {
907
+ id: "123456",
908
+ name: "New York",
909
+ },
910
+ {
911
+ id: "123456",
912
+ name: "New York",
913
+ },
914
+ ],
915
+ customFields: [
916
+ {
917
+ id: "2389328923893298",
918
+ name: "employee_level",
919
+ description: "Employee Level",
920
+ value: 10,
921
+ },
922
+ ],
923
+ rowVersion: "1-12345",
924
+ updatedBy: "12345",
925
+ createdBy: "12345",
926
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
927
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
928
+ passThrough: [
929
+ {
930
+ serviceId: "<id>",
931
+ extendPaths: [
932
+ {
933
+ path: "$.nested.property",
934
+ value: {
935
+ "TaxClassificationRef": {
936
+ "value": "EUC-99990201-V1-00020000",
937
+ },
938
+ },
939
+ },
940
+ ],
941
+ },
942
+ {
943
+ serviceId: "<id>",
944
+ extendPaths: [
945
+ {
946
+ path: "$.nested.property",
947
+ value: {
948
+ "TaxClassificationRef": {
949
+ "value": "EUC-99990201-V1-00020000",
950
+ },
951
+ },
952
+ },
953
+ {
954
+ path: "$.nested.property",
955
+ value: {
956
+ "TaxClassificationRef": {
957
+ "value": "EUC-99990201-V1-00020000",
958
+ },
959
+ },
960
+ },
961
+ ],
962
+ },
963
+ {
964
+ serviceId: "<id>",
965
+ extendPaths: [
966
+ {
967
+ path: "$.nested.property",
968
+ value: {
969
+ "TaxClassificationRef": {
970
+ "value": "EUC-99990201-V1-00020000",
971
+ },
972
+ },
973
+ },
974
+ {
975
+ path: "$.nested.property",
976
+ value: {
977
+ "TaxClassificationRef": {
978
+ "value": "EUC-99990201-V1-00020000",
979
+ },
980
+ },
981
+ },
982
+ {
983
+ path: "$.nested.property",
984
+ value: {
985
+ "TaxClassificationRef": {
986
+ "value": "EUC-99990201-V1-00020000",
987
+ },
988
+ },
989
+ },
990
+ ],
991
+ },
992
+ ],
993
+ },
994
+ ],
995
+ meta: {
996
+ itemsOnPage: 50,
997
+ cursors: {
998
+ previous: "em9oby1jcm06OnBhZ2U6OjE=",
999
+ current: "em9oby1jcm06OnBhZ2U6OjI=",
1000
+ next: "em9oby1jcm06OnBhZ2U6OjM=",
1001
+ },
1002
+ },
1003
+ links: {
1004
+ previous:
1005
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D",
1006
+ current: "https://unify.apideck.com/crm/companies",
1007
+ next:
1008
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
1009
+ },
1010
+ });
1011
+ });
1012
+
1013
+ it.skip("Purchaseorders Accounting Purchase Orders Add", async () => {
1014
+ assert.fail(
1015
+ "incomplete test found please make sure to address the following errors: [`workflow step accounting.purchaseOrdersAdd.test referencing operation accounting.purchaseOrdersAdd with expression in requestBody with type not currently supported`]",
1016
+ );
1017
+ });
1018
+
1019
+ test("Purchaseorders Accounting Purchase Orders One", async () => {
1020
+ const testHttpClient = createTestHTTPClient("accounting.purchaseOrdersOne");
1021
+
1022
+ const apideck = new Apideck({
1023
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
1024
+ httpClient: testHttpClient,
1025
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
1026
+ });
1027
+
1028
+ const result = await apideck.accounting.purchaseOrders.get({
1029
+ id: "<id>",
1030
+ serviceId: "salesforce",
1031
+ });
1032
+ expect(result.httpMeta.response.status).toBe(200);
1033
+ expect(result.getPurchaseOrderResponse).toBeDefined();
1034
+ expect(result.getPurchaseOrderResponse).toEqual({
1035
+ statusCode: 200,
1036
+ status: "OK",
1037
+ service: "quickbooks",
1038
+ resource: "PurchaseOrders",
1039
+ operation: "one",
1040
+ data: {
1041
+ id: "12345",
1042
+ downstreamId: "12345",
1043
+ poNumber: "90000117",
1044
+ reference: "123456",
1045
+ supplier: {
1046
+ id: "12345",
1047
+ displayId: "SUPP00101",
1048
+ displayName: "Windsurf Shop",
1049
+ companyName: "The boring company",
1050
+ address: {
1051
+ id: "123",
1052
+ type: "primary",
1053
+ string: "25 Spring Street, Blackburn, VIC 3130",
1054
+ name: "HQ US",
1055
+ line1: "Main street",
1056
+ line2: "apt #",
1057
+ line3: "Suite #",
1058
+ line4: "delivery instructions",
1059
+ streetNumber: "25",
1060
+ city: "San Francisco",
1061
+ state: "CA",
1062
+ postalCode: "94104",
1063
+ country: "US",
1064
+ latitude: "40.759211",
1065
+ longitude: "-73.984638",
1066
+ county: "Santa Clara",
1067
+ contactName: "Elon Musk",
1068
+ salutation: "Mr",
1069
+ phoneNumber: "111-111-1111",
1070
+ fax: "122-111-1111",
1071
+ email: "elon@musk.com",
1072
+ website: "https://elonmusk.com",
1073
+ notes: "Address notes or delivery instructions.",
1074
+ rowVersion: "1-12345",
1075
+ },
1076
+ },
1077
+ companyId: "12345",
1078
+ status: "open",
1079
+ issuedDate: new RFCDate("2020-09-30"),
1080
+ deliveryDate: new RFCDate("2020-09-30"),
1081
+ expectedArrivalDate: new RFCDate("2020-09-30"),
1082
+ currency: "USD",
1083
+ currencyRate: 0.69,
1084
+ subTotal: 27500,
1085
+ totalTax: 2500,
1086
+ total: 27500,
1087
+ taxInclusive: true,
1088
+ lineItems: [
1089
+ {
1090
+ id: "12345",
1091
+ rowId: "12345",
1092
+ code: "120-C",
1093
+ lineNumber: 1,
1094
+ description:
1095
+ "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.",
1096
+ type: "sales_item",
1097
+ taxAmount: 27500,
1098
+ totalAmount: 27500,
1099
+ quantity: 1,
1100
+ unitPrice: 27500.5,
1101
+ unitOfMeasure: "pc.",
1102
+ discountPercentage: 0.01,
1103
+ discountAmount: 19.99,
1104
+ locationId: "12345",
1105
+ departmentId: "12345",
1106
+ item: {
1107
+ id: "12344",
1108
+ code: "120-C",
1109
+ name: "Model Y",
1110
+ },
1111
+ taxRate: {
1112
+ id: "123456",
1113
+ code: "N-T",
1114
+ name: "GST on Purchases",
1115
+ rate: 10,
1116
+ },
1117
+ trackingCategories: [
1118
+ {
1119
+ id: "123456",
1120
+ name: "New York",
1121
+ },
1122
+ {
1123
+ id: "123456",
1124
+ name: "New York",
1125
+ },
1126
+ ],
1127
+ ledgerAccount: {
1128
+ id: "123456",
1129
+ name: "Bank account",
1130
+ nominalCode: "N091",
1131
+ code: "453",
1132
+ },
1133
+ customFields: [
1134
+ {
1135
+ id: "2389328923893298",
1136
+ name: "employee_level",
1137
+ description: "Employee Level",
1138
+ value: {},
1139
+ },
1140
+ {
1141
+ id: "2389328923893298",
1142
+ name: "employee_level",
1143
+ description: "Employee Level",
1144
+ value: [
1145
+ {},
1146
+ ],
1147
+ },
1148
+ ],
1149
+ rowVersion: "1-12345",
1150
+ updatedBy: "12345",
1151
+ createdBy: "12345",
1152
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
1153
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
1154
+ },
1155
+ {
1156
+ id: "12345",
1157
+ rowId: "12345",
1158
+ code: "120-C",
1159
+ lineNumber: 1,
1160
+ description:
1161
+ "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.",
1162
+ type: "sales_item",
1163
+ taxAmount: 27500,
1164
+ totalAmount: 27500,
1165
+ quantity: 1,
1166
+ unitPrice: 27500.5,
1167
+ unitOfMeasure: "pc.",
1168
+ discountPercentage: 0.01,
1169
+ discountAmount: 19.99,
1170
+ locationId: "12345",
1171
+ departmentId: "12345",
1172
+ item: {
1173
+ id: "12344",
1174
+ code: "120-C",
1175
+ name: "Model Y",
1176
+ },
1177
+ taxRate: {
1178
+ id: "123456",
1179
+ code: "N-T",
1180
+ name: "GST on Purchases",
1181
+ rate: 10,
1182
+ },
1183
+ trackingCategories: [
1184
+ {
1185
+ id: "123456",
1186
+ name: "New York",
1187
+ },
1188
+ {
1189
+ id: "123456",
1190
+ name: "New York",
1191
+ },
1192
+ ],
1193
+ ledgerAccount: {
1194
+ id: "123456",
1195
+ name: "Bank account",
1196
+ nominalCode: "N091",
1197
+ code: "453",
1198
+ },
1199
+ customFields: [
1200
+ {
1201
+ id: "2389328923893298",
1202
+ name: "employee_level",
1203
+ description: "Employee Level",
1204
+ value: 10,
1205
+ },
1206
+ ],
1207
+ rowVersion: "1-12345",
1208
+ updatedBy: "12345",
1209
+ createdBy: "12345",
1210
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
1211
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
1212
+ },
1213
+ {
1214
+ id: "12345",
1215
+ rowId: "12345",
1216
+ code: "120-C",
1217
+ lineNumber: 1,
1218
+ description:
1219
+ "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.",
1220
+ type: "sales_item",
1221
+ taxAmount: 27500,
1222
+ totalAmount: 27500,
1223
+ quantity: 1,
1224
+ unitPrice: 27500.5,
1225
+ unitOfMeasure: "pc.",
1226
+ discountPercentage: 0.01,
1227
+ discountAmount: 19.99,
1228
+ locationId: "12345",
1229
+ departmentId: "12345",
1230
+ item: {
1231
+ id: "12344",
1232
+ code: "120-C",
1233
+ name: "Model Y",
1234
+ },
1235
+ taxRate: {
1236
+ id: "123456",
1237
+ code: "N-T",
1238
+ name: "GST on Purchases",
1239
+ rate: 10,
1240
+ },
1241
+ trackingCategories: [
1242
+ {
1243
+ id: "123456",
1244
+ name: "New York",
1245
+ },
1246
+ {
1247
+ id: "123456",
1248
+ name: "New York",
1249
+ },
1250
+ {
1251
+ id: "123456",
1252
+ name: "New York",
1253
+ },
1254
+ ],
1255
+ ledgerAccount: {
1256
+ id: "123456",
1257
+ name: "Bank account",
1258
+ nominalCode: "N091",
1259
+ code: "453",
1260
+ },
1261
+ customFields: [
1262
+ {
1263
+ id: "2389328923893298",
1264
+ name: "employee_level",
1265
+ description: "Employee Level",
1266
+ value: {},
1267
+ },
1268
+ {
1269
+ id: "2389328923893298",
1270
+ name: "employee_level",
1271
+ description: "Employee Level",
1272
+ value: 10,
1273
+ },
1274
+ ],
1275
+ rowVersion: "1-12345",
1276
+ updatedBy: "12345",
1277
+ createdBy: "12345",
1278
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
1279
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
1280
+ },
1281
+ ],
1282
+ shippingAddress: {
1283
+ id: "123",
1284
+ type: "primary",
1285
+ string: "25 Spring Street, Blackburn, VIC 3130",
1286
+ name: "HQ US",
1287
+ line1: "Main street",
1288
+ line2: "apt #",
1289
+ line3: "Suite #",
1290
+ line4: "delivery instructions",
1291
+ streetNumber: "25",
1292
+ city: "San Francisco",
1293
+ state: "CA",
1294
+ postalCode: "94104",
1295
+ country: "US",
1296
+ latitude: "40.759211",
1297
+ longitude: "-73.984638",
1298
+ county: "Santa Clara",
1299
+ contactName: "Elon Musk",
1300
+ salutation: "Mr",
1301
+ phoneNumber: "111-111-1111",
1302
+ fax: "122-111-1111",
1303
+ email: "elon@musk.com",
1304
+ website: "https://elonmusk.com",
1305
+ notes: "Address notes or delivery instructions.",
1306
+ rowVersion: "1-12345",
1307
+ },
1308
+ ledgerAccount: {
1309
+ id: "123456",
1310
+ name: "Bank account",
1311
+ nominalCode: "N091",
1312
+ code: "453",
1313
+ },
1314
+ templateId: "123456",
1315
+ discountPercentage: 5.5,
1316
+ bankAccount: {
1317
+ bankName: "Monzo",
1318
+ accountNumber: "123465",
1319
+ accountName: "SPACEX LLC",
1320
+ accountType: "credit_card",
1321
+ iban: "CH2989144532982975332",
1322
+ bic: "AUDSCHGGXXX",
1323
+ routingNumber: "012345678",
1324
+ bsbNumber: "062-001",
1325
+ branchIdentifier: "001",
1326
+ bankCode: "BNH",
1327
+ currency: "USD",
1328
+ },
1329
+ accountingByRow: false,
1330
+ dueDate: new RFCDate("2020-10-30"),
1331
+ paymentMethod: "cash",
1332
+ taxCode: "1234",
1333
+ channel: "email",
1334
+ memo: "Thank you for the partnership and have a great day!",
1335
+ trackingCategories: [
1336
+ {
1337
+ id: "123456",
1338
+ name: "New York",
1339
+ },
1340
+ ],
1341
+ customFields: [
1342
+ {
1343
+ id: "2389328923893298",
1344
+ name: "employee_level",
1345
+ description: "Employee Level",
1346
+ value: {},
1347
+ },
1348
+ ],
1349
+ rowVersion: "1-12345",
1350
+ updatedBy: "12345",
1351
+ createdBy: "12345",
1352
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
1353
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
1354
+ passThrough: [
1355
+ {
1356
+ serviceId: "<id>",
1357
+ extendPaths: [
1358
+ {
1359
+ path: "$.nested.property",
1360
+ value: {
1361
+ "TaxClassificationRef": {
1362
+ "value": "EUC-99990201-V1-00020000",
1363
+ },
1364
+ },
1365
+ },
1366
+ {
1367
+ path: "$.nested.property",
1368
+ value: {
1369
+ "TaxClassificationRef": {
1370
+ "value": "EUC-99990201-V1-00020000",
1371
+ },
1372
+ },
1373
+ },
1374
+ ],
1375
+ },
1376
+ {
1377
+ serviceId: "<id>",
1378
+ extendPaths: [
1379
+ {
1380
+ path: "$.nested.property",
1381
+ value: {
1382
+ "TaxClassificationRef": {
1383
+ "value": "EUC-99990201-V1-00020000",
1384
+ },
1385
+ },
1386
+ },
1387
+ {
1388
+ path: "$.nested.property",
1389
+ value: {
1390
+ "TaxClassificationRef": {
1391
+ "value": "EUC-99990201-V1-00020000",
1392
+ },
1393
+ },
1394
+ },
1395
+ {
1396
+ path: "$.nested.property",
1397
+ value: {
1398
+ "TaxClassificationRef": {
1399
+ "value": "EUC-99990201-V1-00020000",
1400
+ },
1401
+ },
1402
+ },
1403
+ ],
1404
+ },
1405
+ {
1406
+ serviceId: "<id>",
1407
+ extendPaths: [
1408
+ {
1409
+ path: "$.nested.property",
1410
+ value: {
1411
+ "TaxClassificationRef": {
1412
+ "value": "EUC-99990201-V1-00020000",
1413
+ },
1414
+ },
1415
+ },
1416
+ {
1417
+ path: "$.nested.property",
1418
+ value: {
1419
+ "TaxClassificationRef": {
1420
+ "value": "EUC-99990201-V1-00020000",
1421
+ },
1422
+ },
1423
+ },
1424
+ ],
1425
+ },
1426
+ ],
1427
+ },
1428
+ });
1429
+ });
1430
+
1431
+ it.skip("Purchaseorders Accounting Purchase Orders Update", async () => {
1432
+ assert.fail(
1433
+ "incomplete test found please make sure to address the following errors: [`workflow step accounting.purchaseOrdersUpdate.test referencing operation accounting.purchaseOrdersUpdate with expression in requestBody with type not currently supported`, `workflow step accounting.purchaseOrdersUpdate.test referencing operation accounting.purchaseOrdersUpdate with expression in requestBody with type not currently supported`, `workflow step accounting.purchaseOrdersUpdate.test referencing operation accounting.purchaseOrdersUpdate with expression in requestBody with type not currently supported`, `workflow step accounting.purchaseOrdersUpdate.test referencing operation accounting.purchaseOrdersUpdate with expression in requestBody with type not currently supported`]",
1434
+ );
1435
+ });
1436
+
1437
+ test("Purchaseorders Accounting Purchase Orders Delete", async () => {
1438
+ const testHttpClient = createTestHTTPClient(
1439
+ "accounting.purchaseOrdersDelete",
1440
+ );
1441
+
1442
+ const apideck = new Apideck({
1443
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
1444
+ httpClient: testHttpClient,
1445
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
1446
+ });
1447
+
1448
+ const result = await apideck.accounting.purchaseOrders.delete({
1449
+ id: "<id>",
1450
+ serviceId: "salesforce",
1451
+ });
1452
+ expect(result.httpMeta.response.status).toBe(200);
1453
+ expect(result.deletePurchaseOrderResponse).toBeDefined();
1454
+ expect(result.deletePurchaseOrderResponse).toEqual({
1455
+ statusCode: 200,
1456
+ status: "OK",
1457
+ service: "quickbooks",
1458
+ resource: "PurchaseOrders",
1459
+ operation: "delete",
1460
+ data: {
1461
+ id: "12345",
1462
+ },
1463
+ });
1464
+ });