@unified-api/typescript-sdk 1.0.0 → 1.0.2

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 (196) hide show
  1. package/README.md +54 -700
  2. package/dist/sdk/accounting.d.ts +0 -40
  3. package/dist/sdk/accounting.js +44 -696
  4. package/dist/sdk/link.d.ts +31 -0
  5. package/dist/sdk/link.js +503 -0
  6. package/dist/sdk/models/operations/{createaccountingpayment.d.ts → createpaymentlink.d.ts} +7 -7
  7. package/dist/sdk/models/operations/createpaymentlink.js +95 -0
  8. package/dist/sdk/models/operations/createpaymentpayment.d.ts +28 -0
  9. package/dist/sdk/models/operations/{createaccountingpayment.js → createpaymentpayment.js} +20 -20
  10. package/dist/sdk/models/operations/getpaymentlink.d.ts +35 -0
  11. package/dist/sdk/models/operations/getpaymentlink.js +99 -0
  12. package/dist/sdk/models/operations/{getaccountingpayment.d.ts → getpaymentpayment.d.ts} +6 -6
  13. package/dist/sdk/models/operations/{getaccountingpayment.js → getpaymentpayment.js} +20 -20
  14. package/dist/sdk/models/operations/{getaccountingpayout.d.ts → getpaymentpayout.d.ts} +6 -6
  15. package/dist/sdk/models/operations/{getaccountingpayout.js → getpaymentpayout.js} +20 -20
  16. package/dist/sdk/models/operations/{getaccountingrefund.d.ts → getpaymentrefund.d.ts} +6 -6
  17. package/dist/sdk/models/operations/{getaccountingrefund.js → getpaymentrefund.js} +20 -20
  18. package/dist/sdk/models/operations/getunifiedintegrationauth.d.ts +6 -4
  19. package/dist/sdk/models/operations/getunifiedintegrationauth.js +6 -4
  20. package/dist/sdk/models/operations/index.d.ts +16 -10
  21. package/dist/sdk/models/operations/index.js +16 -10
  22. package/dist/sdk/models/operations/listpaymentlinks.d.ts +51 -0
  23. package/dist/sdk/models/operations/listpaymentlinks.js +127 -0
  24. package/dist/sdk/models/operations/{listaccountingpayments.d.ts → listpaymentpayments.d.ts} +6 -6
  25. package/dist/sdk/models/operations/{listaccountingpayments.js → listpaymentpayments.js} +28 -28
  26. package/dist/sdk/models/operations/{listaccountingpayouts.d.ts → listpaymentpayouts.d.ts} +6 -6
  27. package/dist/sdk/models/operations/{listaccountingpayouts.js → listpaymentpayouts.js} +26 -26
  28. package/dist/sdk/models/operations/{listaccountingrefunds.d.ts → listpaymentrefunds.d.ts} +6 -6
  29. package/dist/sdk/models/operations/{listaccountingrefunds.js → listpaymentrefunds.js} +27 -27
  30. package/dist/sdk/models/operations/listunifiedconnections.d.ts +2 -1
  31. package/dist/sdk/models/operations/listunifiedconnections.js +1 -0
  32. package/dist/sdk/models/operations/listunifiedintegrations.d.ts +2 -1
  33. package/dist/sdk/models/operations/listunifiedintegrations.js +1 -0
  34. package/dist/sdk/models/operations/listunifiedintegrationworkspaces.d.ts +2 -1
  35. package/dist/sdk/models/operations/listunifiedintegrationworkspaces.js +1 -0
  36. package/dist/sdk/models/operations/patchpaymentlink.d.ts +32 -0
  37. package/dist/sdk/models/operations/patchpaymentlink.js +99 -0
  38. package/dist/sdk/models/operations/{patchaccountingpayment.d.ts → patchpaymentpayment.d.ts} +7 -7
  39. package/dist/sdk/models/operations/{patchaccountingpayment.js → patchpaymentpayment.js} +21 -21
  40. package/dist/sdk/models/operations/removepaymentlink.d.ts +30 -0
  41. package/dist/sdk/models/operations/{removeaccountingpayment.js → removepaymentlink.js} +17 -17
  42. package/dist/sdk/models/operations/{removeaccountingpayment.d.ts → removepaymentpayment.d.ts} +2 -2
  43. package/dist/sdk/models/operations/removepaymentpayment.js +71 -0
  44. package/dist/sdk/models/operations/updatepaymentlink.d.ts +32 -0
  45. package/dist/sdk/models/operations/updatepaymentlink.js +99 -0
  46. package/dist/sdk/models/operations/{updateaccountingpayment.d.ts → updatepaymentpayment.d.ts} +7 -7
  47. package/dist/sdk/models/operations/{updateaccountingpayment.js → updatepaymentpayment.js} +21 -21
  48. package/dist/sdk/models/shared/accountinginvoice.d.ts +1 -0
  49. package/dist/sdk/models/shared/accountinginvoice.js +5 -0
  50. package/dist/sdk/models/shared/index.d.ts +5 -3
  51. package/dist/sdk/models/shared/index.js +5 -3
  52. package/dist/sdk/models/shared/paymenntlinklineitem.d.ts +20 -0
  53. package/dist/sdk/models/shared/paymenntlinklineitem.js +137 -0
  54. package/dist/sdk/models/shared/paymentlink.d.ts +15 -0
  55. package/dist/sdk/models/shared/paymentlink.js +105 -0
  56. package/dist/sdk/models/shared/{accountingpayment.d.ts → paymentpayment.d.ts} +1 -1
  57. package/dist/sdk/models/shared/{accountingpayment.js → paymentpayment.js} +18 -18
  58. package/dist/sdk/models/shared/{accountingpayout.d.ts → paymentpayout.d.ts} +3 -3
  59. package/dist/sdk/models/shared/{accountingpayout.js → paymentpayout.js} +21 -21
  60. package/dist/sdk/models/shared/{accountingrefund.d.ts → paymentrefund.d.ts} +3 -3
  61. package/dist/sdk/models/shared/{accountingrefund.js → paymentrefund.js} +23 -23
  62. package/dist/sdk/models/shared/propertyconnectioncategories.d.ts +2 -1
  63. package/dist/sdk/models/shared/propertyconnectioncategories.js +1 -0
  64. package/dist/sdk/models/shared/propertyconnectionpermissions.d.ts +6 -4
  65. package/dist/sdk/models/shared/propertyconnectionpermissions.js +6 -4
  66. package/dist/sdk/models/shared/propertyintegrationcategories.d.ts +2 -1
  67. package/dist/sdk/models/shared/propertyintegrationcategories.js +1 -0
  68. package/dist/sdk/models/shared/webhook.d.ts +4 -3
  69. package/dist/sdk/models/shared/webhook.js +4 -3
  70. package/dist/sdk/payment.d.ts +46 -6
  71. package/dist/sdk/payment.js +705 -53
  72. package/dist/sdk/payout.d.ts +2 -2
  73. package/dist/sdk/payout.js +11 -11
  74. package/dist/sdk/refund.d.ts +2 -2
  75. package/dist/sdk/refund.js +11 -11
  76. package/dist/sdk/sdk.d.ts +5 -3
  77. package/dist/sdk/sdk.js +7 -5
  78. package/docs/sdk/models/operations/categories.md +2 -1
  79. package/docs/sdk/models/operations/createpaymentlinkrequest.md +9 -0
  80. package/docs/sdk/models/operations/createpaymentlinkresponse.md +11 -0
  81. package/docs/sdk/models/operations/createpaymentpaymentrequest.md +9 -0
  82. package/docs/sdk/models/operations/createpaymentpaymentresponse.md +11 -0
  83. package/docs/sdk/models/operations/getpaymentlinkrequest.md +10 -0
  84. package/docs/sdk/models/operations/getpaymentlinkresponse.md +11 -0
  85. package/docs/sdk/models/operations/{getaccountingpaymentrequest.md → getpaymentpaymentrequest.md} +1 -1
  86. package/docs/sdk/models/operations/getpaymentpaymentresponse.md +11 -0
  87. package/docs/sdk/models/operations/{getaccountingpayoutrequest.md → getpaymentpayoutrequest.md} +1 -1
  88. package/docs/sdk/models/operations/getpaymentpayoutresponse.md +11 -0
  89. package/docs/sdk/models/operations/{getaccountingrefundrequest.md → getpaymentrefundrequest.md} +1 -1
  90. package/docs/sdk/models/operations/getpaymentrefundresponse.md +11 -0
  91. package/docs/sdk/models/operations/listpaymentlinksrequest.md +17 -0
  92. package/docs/sdk/models/operations/listpaymentlinksresponse.md +11 -0
  93. package/docs/sdk/models/operations/{listaccountingpaymentsrequest.md → listpaymentpaymentsrequest.md} +1 -1
  94. package/docs/sdk/models/operations/listpaymentpaymentsresponse.md +11 -0
  95. package/docs/sdk/models/operations/{listaccountingpayoutsrequest.md → listpaymentpayoutsrequest.md} +1 -1
  96. package/docs/sdk/models/operations/listpaymentpayoutsresponse.md +11 -0
  97. package/docs/sdk/models/operations/{listaccountingrefundsrequest.md → listpaymentrefundsrequest.md} +1 -1
  98. package/docs/sdk/models/operations/listpaymentrefundsresponse.md +11 -0
  99. package/docs/sdk/models/operations/listunifiedintegrationsqueryparamcategories.md +2 -1
  100. package/docs/sdk/models/operations/patchpaymentlinkrequest.md +10 -0
  101. package/docs/sdk/models/operations/patchpaymentlinkresponse.md +11 -0
  102. package/docs/sdk/models/operations/patchpaymentpaymentrequest.md +10 -0
  103. package/docs/sdk/models/operations/patchpaymentpaymentresponse.md +11 -0
  104. package/docs/sdk/models/operations/queryparamcategories.md +2 -1
  105. package/docs/sdk/models/operations/{removeaccountingpaymentrequest.md → removepaymentlinkrequest.md} +2 -2
  106. package/docs/sdk/models/operations/{removeaccountingpaymentresponse.md → removepaymentlinkresponse.md} +1 -1
  107. package/docs/sdk/models/operations/removepaymentpaymentrequest.md +9 -0
  108. package/docs/sdk/models/operations/removepaymentpaymentresponse.md +11 -0
  109. package/docs/sdk/models/operations/scopes.md +6 -4
  110. package/docs/sdk/models/operations/updatepaymentlinkrequest.md +10 -0
  111. package/docs/sdk/models/operations/updatepaymentlinkresponse.md +11 -0
  112. package/docs/sdk/models/operations/updatepaymentpaymentrequest.md +10 -0
  113. package/docs/sdk/models/operations/updatepaymentpaymentresponse.md +11 -0
  114. package/docs/sdk/models/shared/accountinginvoice.md +2 -1
  115. package/docs/sdk/models/shared/objecttype.md +4 -3
  116. package/docs/sdk/models/shared/paymenntlinklineitem.md +24 -0
  117. package/docs/sdk/models/shared/paymentlink.md +18 -0
  118. package/docs/sdk/models/shared/{accountingpayment.md → paymentpayment.md} +1 -1
  119. package/docs/sdk/models/shared/paymentpayout.md +15 -0
  120. package/docs/sdk/models/shared/{accountingpayoutstatus.md → paymentpayoutstatus.md} +1 -1
  121. package/docs/sdk/models/shared/paymentrefund.md +17 -0
  122. package/docs/sdk/models/shared/{accountingrefundstatus.md → paymentrefundstatus.md} +1 -1
  123. package/docs/sdk/models/shared/propertyconnectioncategories.md +2 -1
  124. package/docs/sdk/models/shared/propertyconnectionpermissions.md +6 -4
  125. package/docs/sdk/models/shared/propertyintegrationcategories.md +2 -1
  126. package/package.json +1 -1
  127. package/docs/sdk/models/operations/createaccountingpaymentrequest.md +0 -9
  128. package/docs/sdk/models/operations/createaccountingpaymentresponse.md +0 -11
  129. package/docs/sdk/models/operations/getaccountingpaymentresponse.md +0 -11
  130. package/docs/sdk/models/operations/getaccountingpayoutresponse.md +0 -11
  131. package/docs/sdk/models/operations/getaccountingrefundresponse.md +0 -11
  132. package/docs/sdk/models/operations/listaccountingpaymentsresponse.md +0 -11
  133. package/docs/sdk/models/operations/listaccountingpayoutsresponse.md +0 -11
  134. package/docs/sdk/models/operations/listaccountingrefundsresponse.md +0 -11
  135. package/docs/sdk/models/operations/patchaccountingpaymentrequest.md +0 -10
  136. package/docs/sdk/models/operations/patchaccountingpaymentresponse.md +0 -11
  137. package/docs/sdk/models/operations/updateaccountingpaymentrequest.md +0 -10
  138. package/docs/sdk/models/operations/updateaccountingpaymentresponse.md +0 -11
  139. package/docs/sdk/models/shared/accountingpayout.md +0 -15
  140. package/docs/sdk/models/shared/accountingrefund.md +0 -17
  141. package/docs/sdks/account/README.md +0 -312
  142. package/docs/sdks/accounting/README.md +0 -2198
  143. package/docs/sdks/activity/README.md +0 -321
  144. package/docs/sdks/apicall/README.md +0 -95
  145. package/docs/sdks/application/README.md +0 -333
  146. package/docs/sdks/applicationstatus/README.md +0 -54
  147. package/docs/sdks/ats/README.md +0 -2488
  148. package/docs/sdks/auth/README.md +0 -103
  149. package/docs/sdks/call/README.md +0 -54
  150. package/docs/sdks/candidate/README.md +0 -369
  151. package/docs/sdks/collection/README.md +0 -348
  152. package/docs/sdks/commerce/README.md +0 -1371
  153. package/docs/sdks/company/README.md +0 -517
  154. package/docs/sdks/connection/README.md +0 -359
  155. package/docs/sdks/contact/README.md +0 -1028
  156. package/docs/sdks/crm/README.md +0 -2048
  157. package/docs/sdks/customer/README.md +0 -348
  158. package/docs/sdks/deal/README.md +0 -315
  159. package/docs/sdks/document/README.md +0 -309
  160. package/docs/sdks/employee/README.md +0 -363
  161. package/docs/sdks/enrich/README.md +0 -97
  162. package/docs/sdks/event/README.md +0 -390
  163. package/docs/sdks/file/README.md +0 -330
  164. package/docs/sdks/group/README.md +0 -327
  165. package/docs/sdks/hris/README.md +0 -685
  166. package/docs/sdks/integration/README.md +0 -155
  167. package/docs/sdks/interview/README.md +0 -318
  168. package/docs/sdks/inventory/README.md +0 -309
  169. package/docs/sdks/invoice/README.md +0 -324
  170. package/docs/sdks/issue/README.md +0 -49
  171. package/docs/sdks/item/README.md +0 -417
  172. package/docs/sdks/job/README.md +0 -396
  173. package/docs/sdks/lead/README.md +0 -336
  174. package/docs/sdks/list/README.md +0 -306
  175. package/docs/sdks/location/README.md +0 -312
  176. package/docs/sdks/login/README.md +0 -52
  177. package/docs/sdks/martech/README.md +0 -643
  178. package/docs/sdks/member/README.md +0 -342
  179. package/docs/sdks/note/README.md +0 -306
  180. package/docs/sdks/organization/README.md +0 -104
  181. package/docs/sdks/passthrough/README.md +0 -249
  182. package/docs/sdks/payment/README.md +0 -306
  183. package/docs/sdks/payout/README.md +0 -104
  184. package/docs/sdks/person/README.md +0 -51
  185. package/docs/sdks/pipeline/README.md +0 -306
  186. package/docs/sdks/refund/README.md +0 -104
  187. package/docs/sdks/scorecard/README.md +0 -324
  188. package/docs/sdks/storage/README.md +0 -330
  189. package/docs/sdks/taxrate/README.md +0 -312
  190. package/docs/sdks/ticket/README.md +0 -318
  191. package/docs/sdks/ticketing/README.md +0 -962
  192. package/docs/sdks/transaction/README.md +0 -327
  193. package/docs/sdks/uc/README.md +0 -388
  194. package/docs/sdks/unified/README.md +0 -929
  195. package/docs/sdks/unifiedto/README.md +0 -9
  196. package/docs/sdks/webhook/README.md +0 -291
@@ -311,77 +311,6 @@ var Accounting = /** @class */ (function () {
311
311
  });
312
312
  });
313
313
  };
314
- /**
315
- * Create a payment
316
- */
317
- Accounting.prototype.createAccountingPayment = function (req, config) {
318
- var _a, _b;
319
- return __awaiter(this, void 0, void 0, function () {
320
- var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
321
- var _d;
322
- return __generator(this, function (_e) {
323
- switch (_e.label) {
324
- case 0:
325
- if (!(req instanceof utils.SpeakeasyBase)) {
326
- req = new operations.CreateAccountingPaymentRequest(req);
327
- }
328
- baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
329
- operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/payment", req);
330
- _c = __read([{}, null], 2), reqBodyHeaders = _c[0], reqBody = _c[1];
331
- try {
332
- _d = __read(utils.serializeRequestBody(req, "accountingPayment", "json"), 2), reqBodyHeaders = _d[0], reqBody = _d[1];
333
- }
334
- catch (e) {
335
- if (e instanceof Error) {
336
- throw new Error("Error serializing request body, cause: ".concat(e.message));
337
- }
338
- }
339
- client = this.sdkConfiguration.defaultClient;
340
- globalSecurity = this.sdkConfiguration.security;
341
- if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
342
- return [4 /*yield*/, globalSecurity()];
343
- case 1:
344
- globalSecurity = _e.sent();
345
- _e.label = 2;
346
- case 2:
347
- if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
348
- globalSecurity = new shared.Security(globalSecurity);
349
- }
350
- properties = utils.parseSecurityProperties(globalSecurity);
351
- headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
352
- headers["Accept"] = "application/json";
353
- headers["user-agent"] = this.sdkConfiguration.userAgent;
354
- return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "post", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
355
- case 3:
356
- httpRes = _e.sent();
357
- responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
358
- if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
359
- throw new Error("status code not found in response: ".concat(httpRes));
360
- }
361
- res = new operations.CreateAccountingPaymentResponse({
362
- statusCode: httpRes.status,
363
- contentType: responseContentType,
364
- rawResponse: httpRes,
365
- });
366
- decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
367
- switch (true) {
368
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
369
- if (utils.matchContentType(responseContentType, "application/json")) {
370
- res.accountingPayment = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingPayment);
371
- }
372
- else {
373
- throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
374
- }
375
- break;
376
- case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
377
- ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
378
- throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
379
- }
380
- return [2 /*return*/, res];
381
- }
382
- });
383
- });
384
- };
385
314
  /**
386
315
  * Create a taxrate
387
316
  */
@@ -748,379 +677,7 @@ var Accounting = /** @class */ (function () {
748
677
  if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
749
678
  throw new Error("status code not found in response: ".concat(httpRes));
750
679
  }
751
- res = new operations.GetAccountingOrganizationResponse({
752
- statusCode: httpRes.status,
753
- contentType: responseContentType,
754
- rawResponse: httpRes,
755
- });
756
- decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
757
- switch (true) {
758
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
759
- if (utils.matchContentType(responseContentType, "application/json")) {
760
- res.accountingOrganization = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingOrganization);
761
- }
762
- else {
763
- throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
764
- }
765
- break;
766
- case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
767
- ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
768
- throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
769
- }
770
- return [2 /*return*/, res];
771
- }
772
- });
773
- });
774
- };
775
- /**
776
- * Retrieve a payment
777
- */
778
- Accounting.prototype.getAccountingPayment = function (req, config) {
779
- var _a, _b;
780
- return __awaiter(this, void 0, void 0, function () {
781
- var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes;
782
- return __generator(this, function (_c) {
783
- switch (_c.label) {
784
- case 0:
785
- if (!(req instanceof utils.SpeakeasyBase)) {
786
- req = new operations.GetAccountingPaymentRequest(req);
787
- }
788
- baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
789
- operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/payment/{id}", req);
790
- client = this.sdkConfiguration.defaultClient;
791
- globalSecurity = this.sdkConfiguration.security;
792
- if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
793
- return [4 /*yield*/, globalSecurity()];
794
- case 1:
795
- globalSecurity = _c.sent();
796
- _c.label = 2;
797
- case 2:
798
- if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
799
- globalSecurity = new shared.Security(globalSecurity);
800
- }
801
- properties = utils.parseSecurityProperties(globalSecurity);
802
- headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
803
- queryParams = utils.serializeQueryParams(req);
804
- headers["Accept"] = "application/json";
805
- headers["user-agent"] = this.sdkConfiguration.userAgent;
806
- return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
807
- case 3:
808
- httpRes = _c.sent();
809
- responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
810
- if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
811
- throw new Error("status code not found in response: ".concat(httpRes));
812
- }
813
- res = new operations.GetAccountingPaymentResponse({
814
- statusCode: httpRes.status,
815
- contentType: responseContentType,
816
- rawResponse: httpRes,
817
- });
818
- decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
819
- switch (true) {
820
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
821
- if (utils.matchContentType(responseContentType, "application/json")) {
822
- res.accountingPayment = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingPayment);
823
- }
824
- else {
825
- throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
826
- }
827
- break;
828
- case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
829
- ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
830
- throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
831
- }
832
- return [2 /*return*/, res];
833
- }
834
- });
835
- });
836
- };
837
- /**
838
- * Retrieve a payout
839
- */
840
- Accounting.prototype.getAccountingPayout = function (req, config) {
841
- var _a, _b;
842
- return __awaiter(this, void 0, void 0, function () {
843
- var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes;
844
- return __generator(this, function (_c) {
845
- switch (_c.label) {
846
- case 0:
847
- if (!(req instanceof utils.SpeakeasyBase)) {
848
- req = new operations.GetAccountingPayoutRequest(req);
849
- }
850
- baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
851
- operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/payout/{id}", req);
852
- client = this.sdkConfiguration.defaultClient;
853
- globalSecurity = this.sdkConfiguration.security;
854
- if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
855
- return [4 /*yield*/, globalSecurity()];
856
- case 1:
857
- globalSecurity = _c.sent();
858
- _c.label = 2;
859
- case 2:
860
- if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
861
- globalSecurity = new shared.Security(globalSecurity);
862
- }
863
- properties = utils.parseSecurityProperties(globalSecurity);
864
- headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
865
- queryParams = utils.serializeQueryParams(req);
866
- headers["Accept"] = "application/json";
867
- headers["user-agent"] = this.sdkConfiguration.userAgent;
868
- return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
869
- case 3:
870
- httpRes = _c.sent();
871
- responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
872
- if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
873
- throw new Error("status code not found in response: ".concat(httpRes));
874
- }
875
- res = new operations.GetAccountingPayoutResponse({
876
- statusCode: httpRes.status,
877
- contentType: responseContentType,
878
- rawResponse: httpRes,
879
- });
880
- decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
881
- switch (true) {
882
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
883
- if (utils.matchContentType(responseContentType, "application/json")) {
884
- res.accountingPayout = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingPayout);
885
- }
886
- else {
887
- throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
888
- }
889
- break;
890
- case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
891
- ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
892
- throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
893
- }
894
- return [2 /*return*/, res];
895
- }
896
- });
897
- });
898
- };
899
- /**
900
- * Retrieve a refund
901
- */
902
- Accounting.prototype.getAccountingRefund = function (req, config) {
903
- var _a, _b;
904
- return __awaiter(this, void 0, void 0, function () {
905
- var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes;
906
- return __generator(this, function (_c) {
907
- switch (_c.label) {
908
- case 0:
909
- if (!(req instanceof utils.SpeakeasyBase)) {
910
- req = new operations.GetAccountingRefundRequest(req);
911
- }
912
- baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
913
- operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/refund/{id}", req);
914
- client = this.sdkConfiguration.defaultClient;
915
- globalSecurity = this.sdkConfiguration.security;
916
- if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
917
- return [4 /*yield*/, globalSecurity()];
918
- case 1:
919
- globalSecurity = _c.sent();
920
- _c.label = 2;
921
- case 2:
922
- if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
923
- globalSecurity = new shared.Security(globalSecurity);
924
- }
925
- properties = utils.parseSecurityProperties(globalSecurity);
926
- headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
927
- queryParams = utils.serializeQueryParams(req);
928
- headers["Accept"] = "application/json";
929
- headers["user-agent"] = this.sdkConfiguration.userAgent;
930
- return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
931
- case 3:
932
- httpRes = _c.sent();
933
- responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
934
- if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
935
- throw new Error("status code not found in response: ".concat(httpRes));
936
- }
937
- res = new operations.GetAccountingRefundResponse({
938
- statusCode: httpRes.status,
939
- contentType: responseContentType,
940
- rawResponse: httpRes,
941
- });
942
- decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
943
- switch (true) {
944
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
945
- if (utils.matchContentType(responseContentType, "application/json")) {
946
- res.accountingRefund = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingRefund);
947
- }
948
- else {
949
- throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
950
- }
951
- break;
952
- case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
953
- ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
954
- throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
955
- }
956
- return [2 /*return*/, res];
957
- }
958
- });
959
- });
960
- };
961
- /**
962
- * Retrieve a taxrate
963
- */
964
- Accounting.prototype.getAccountingTaxrate = function (req, config) {
965
- var _a, _b;
966
- return __awaiter(this, void 0, void 0, function () {
967
- var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes;
968
- return __generator(this, function (_c) {
969
- switch (_c.label) {
970
- case 0:
971
- if (!(req instanceof utils.SpeakeasyBase)) {
972
- req = new operations.GetAccountingTaxrateRequest(req);
973
- }
974
- baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
975
- operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/taxrate/{id}", req);
976
- client = this.sdkConfiguration.defaultClient;
977
- globalSecurity = this.sdkConfiguration.security;
978
- if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
979
- return [4 /*yield*/, globalSecurity()];
980
- case 1:
981
- globalSecurity = _c.sent();
982
- _c.label = 2;
983
- case 2:
984
- if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
985
- globalSecurity = new shared.Security(globalSecurity);
986
- }
987
- properties = utils.parseSecurityProperties(globalSecurity);
988
- headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
989
- queryParams = utils.serializeQueryParams(req);
990
- headers["Accept"] = "application/json";
991
- headers["user-agent"] = this.sdkConfiguration.userAgent;
992
- return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
993
- case 3:
994
- httpRes = _c.sent();
995
- responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
996
- if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
997
- throw new Error("status code not found in response: ".concat(httpRes));
998
- }
999
- res = new operations.GetAccountingTaxrateResponse({
1000
- statusCode: httpRes.status,
1001
- contentType: responseContentType,
1002
- rawResponse: httpRes,
1003
- });
1004
- decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
1005
- switch (true) {
1006
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
1007
- if (utils.matchContentType(responseContentType, "application/json")) {
1008
- res.accountingTaxrate = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingTaxrate);
1009
- }
1010
- else {
1011
- throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
1012
- }
1013
- break;
1014
- case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
1015
- ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
1016
- throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
1017
- }
1018
- return [2 /*return*/, res];
1019
- }
1020
- });
1021
- });
1022
- };
1023
- /**
1024
- * Retrieve a transaction
1025
- */
1026
- Accounting.prototype.getAccountingTransaction = function (req, config) {
1027
- var _a, _b;
1028
- return __awaiter(this, void 0, void 0, function () {
1029
- var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes;
1030
- return __generator(this, function (_c) {
1031
- switch (_c.label) {
1032
- case 0:
1033
- if (!(req instanceof utils.SpeakeasyBase)) {
1034
- req = new operations.GetAccountingTransactionRequest(req);
1035
- }
1036
- baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
1037
- operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/transaction/{id}", req);
1038
- client = this.sdkConfiguration.defaultClient;
1039
- globalSecurity = this.sdkConfiguration.security;
1040
- if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
1041
- return [4 /*yield*/, globalSecurity()];
1042
- case 1:
1043
- globalSecurity = _c.sent();
1044
- _c.label = 2;
1045
- case 2:
1046
- if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
1047
- globalSecurity = new shared.Security(globalSecurity);
1048
- }
1049
- properties = utils.parseSecurityProperties(globalSecurity);
1050
- headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
1051
- queryParams = utils.serializeQueryParams(req);
1052
- headers["Accept"] = "application/json";
1053
- headers["user-agent"] = this.sdkConfiguration.userAgent;
1054
- return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
1055
- case 3:
1056
- httpRes = _c.sent();
1057
- responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
1058
- if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
1059
- throw new Error("status code not found in response: ".concat(httpRes));
1060
- }
1061
- res = new operations.GetAccountingTransactionResponse({
1062
- statusCode: httpRes.status,
1063
- contentType: responseContentType,
1064
- rawResponse: httpRes,
1065
- });
1066
- decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
1067
- switch (true) {
1068
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
1069
- if (utils.matchContentType(responseContentType, "application/json")) {
1070
- res.accountingTransaction = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingTransaction);
1071
- }
1072
- else {
1073
- throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
1074
- }
1075
- break;
1076
- case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
1077
- ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
1078
- throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
1079
- }
1080
- return [2 /*return*/, res];
1081
- }
1082
- });
1083
- });
1084
- };
1085
- /**
1086
- * List all accounts
1087
- */
1088
- Accounting.prototype.listAccountingAccounts = function (req, config) {
1089
- var _a, _b;
1090
- return __awaiter(this, void 0, void 0, function () {
1091
- var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes, resFieldDepth;
1092
- return __generator(this, function (_c) {
1093
- switch (_c.label) {
1094
- case 0:
1095
- if (!(req instanceof utils.SpeakeasyBase)) {
1096
- req = new operations.ListAccountingAccountsRequest(req);
1097
- }
1098
- baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
1099
- operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/account", req);
1100
- client = this.sdkConfiguration.defaultClient;
1101
- globalSecurity = this.sdkConfiguration.security;
1102
- if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
1103
- return [4 /*yield*/, globalSecurity()];
1104
- case 1:
1105
- globalSecurity = _c.sent();
1106
- _c.label = 2;
1107
- case 2:
1108
- if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
1109
- globalSecurity = new shared.Security(globalSecurity);
1110
- }
1111
- properties = utils.parseSecurityProperties(globalSecurity);
1112
- headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
1113
- queryParams = utils.serializeQueryParams(req);
1114
- headers["Accept"] = "application/json";
1115
- headers["user-agent"] = this.sdkConfiguration.userAgent;
1116
- return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
1117
- case 3:
1118
- httpRes = _c.sent();
1119
- responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
1120
- if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
1121
- throw new Error("status code not found in response: ".concat(httpRes));
1122
- }
1123
- res = new operations.ListAccountingAccountsResponse({
680
+ res = new operations.GetAccountingOrganizationResponse({
1124
681
  statusCode: httpRes.status,
1125
682
  contentType: responseContentType,
1126
683
  rawResponse: httpRes,
@@ -1129,9 +686,7 @@ var Accounting = /** @class */ (function () {
1129
686
  switch (true) {
1130
687
  case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
1131
688
  if (utils.matchContentType(responseContentType, "application/json")) {
1132
- res.accountingAccounts = [];
1133
- resFieldDepth = utils.getResFieldDepth(res);
1134
- res.accountingAccounts = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingAccount, resFieldDepth);
689
+ res.accountingOrganization = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingOrganization);
1135
690
  }
1136
691
  else {
1137
692
  throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
@@ -1147,20 +702,20 @@ var Accounting = /** @class */ (function () {
1147
702
  });
1148
703
  };
1149
704
  /**
1150
- * List all contacts
705
+ * Retrieve a taxrate
1151
706
  */
1152
- Accounting.prototype.listAccountingContacts = function (req, config) {
707
+ Accounting.prototype.getAccountingTaxrate = function (req, config) {
1153
708
  var _a, _b;
1154
709
  return __awaiter(this, void 0, void 0, function () {
1155
- var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes, resFieldDepth;
710
+ var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes;
1156
711
  return __generator(this, function (_c) {
1157
712
  switch (_c.label) {
1158
713
  case 0:
1159
714
  if (!(req instanceof utils.SpeakeasyBase)) {
1160
- req = new operations.ListAccountingContactsRequest(req);
715
+ req = new operations.GetAccountingTaxrateRequest(req);
1161
716
  }
1162
717
  baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
1163
- operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/contact", req);
718
+ operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/taxrate/{id}", req);
1164
719
  client = this.sdkConfiguration.defaultClient;
1165
720
  globalSecurity = this.sdkConfiguration.security;
1166
721
  if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
@@ -1184,7 +739,7 @@ var Accounting = /** @class */ (function () {
1184
739
  if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
1185
740
  throw new Error("status code not found in response: ".concat(httpRes));
1186
741
  }
1187
- res = new operations.ListAccountingContactsResponse({
742
+ res = new operations.GetAccountingTaxrateResponse({
1188
743
  statusCode: httpRes.status,
1189
744
  contentType: responseContentType,
1190
745
  rawResponse: httpRes,
@@ -1193,9 +748,7 @@ var Accounting = /** @class */ (function () {
1193
748
  switch (true) {
1194
749
  case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
1195
750
  if (utils.matchContentType(responseContentType, "application/json")) {
1196
- res.accountingContacts = [];
1197
- resFieldDepth = utils.getResFieldDepth(res);
1198
- res.accountingContacts = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingContact, resFieldDepth);
751
+ res.accountingTaxrate = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingTaxrate);
1199
752
  }
1200
753
  else {
1201
754
  throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
@@ -1211,20 +764,20 @@ var Accounting = /** @class */ (function () {
1211
764
  });
1212
765
  };
1213
766
  /**
1214
- * List all invoices
767
+ * Retrieve a transaction
1215
768
  */
1216
- Accounting.prototype.listAccountingInvoices = function (req, config) {
769
+ Accounting.prototype.getAccountingTransaction = function (req, config) {
1217
770
  var _a, _b;
1218
771
  return __awaiter(this, void 0, void 0, function () {
1219
- var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes, resFieldDepth;
772
+ var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes;
1220
773
  return __generator(this, function (_c) {
1221
774
  switch (_c.label) {
1222
775
  case 0:
1223
776
  if (!(req instanceof utils.SpeakeasyBase)) {
1224
- req = new operations.ListAccountingInvoicesRequest(req);
777
+ req = new operations.GetAccountingTransactionRequest(req);
1225
778
  }
1226
779
  baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
1227
- operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/invoice", req);
780
+ operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/transaction/{id}", req);
1228
781
  client = this.sdkConfiguration.defaultClient;
1229
782
  globalSecurity = this.sdkConfiguration.security;
1230
783
  if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
@@ -1248,7 +801,7 @@ var Accounting = /** @class */ (function () {
1248
801
  if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
1249
802
  throw new Error("status code not found in response: ".concat(httpRes));
1250
803
  }
1251
- res = new operations.ListAccountingInvoicesResponse({
804
+ res = new operations.GetAccountingTransactionResponse({
1252
805
  statusCode: httpRes.status,
1253
806
  contentType: responseContentType,
1254
807
  rawResponse: httpRes,
@@ -1257,9 +810,7 @@ var Accounting = /** @class */ (function () {
1257
810
  switch (true) {
1258
811
  case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
1259
812
  if (utils.matchContentType(responseContentType, "application/json")) {
1260
- res.accountingInvoices = [];
1261
- resFieldDepth = utils.getResFieldDepth(res);
1262
- res.accountingInvoices = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingInvoice, resFieldDepth);
813
+ res.accountingTransaction = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingTransaction);
1263
814
  }
1264
815
  else {
1265
816
  throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
@@ -1275,9 +826,9 @@ var Accounting = /** @class */ (function () {
1275
826
  });
1276
827
  };
1277
828
  /**
1278
- * List all organizations
829
+ * List all accounts
1279
830
  */
1280
- Accounting.prototype.listAccountingOrganizations = function (req, config) {
831
+ Accounting.prototype.listAccountingAccounts = function (req, config) {
1281
832
  var _a, _b;
1282
833
  return __awaiter(this, void 0, void 0, function () {
1283
834
  var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes, resFieldDepth;
@@ -1285,10 +836,10 @@ var Accounting = /** @class */ (function () {
1285
836
  switch (_c.label) {
1286
837
  case 0:
1287
838
  if (!(req instanceof utils.SpeakeasyBase)) {
1288
- req = new operations.ListAccountingOrganizationsRequest(req);
839
+ req = new operations.ListAccountingAccountsRequest(req);
1289
840
  }
1290
841
  baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
1291
- operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/organization", req);
842
+ operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/account", req);
1292
843
  client = this.sdkConfiguration.defaultClient;
1293
844
  globalSecurity = this.sdkConfiguration.security;
1294
845
  if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
@@ -1312,7 +863,7 @@ var Accounting = /** @class */ (function () {
1312
863
  if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
1313
864
  throw new Error("status code not found in response: ".concat(httpRes));
1314
865
  }
1315
- res = new operations.ListAccountingOrganizationsResponse({
866
+ res = new operations.ListAccountingAccountsResponse({
1316
867
  statusCode: httpRes.status,
1317
868
  contentType: responseContentType,
1318
869
  rawResponse: httpRes,
@@ -1321,9 +872,9 @@ var Accounting = /** @class */ (function () {
1321
872
  switch (true) {
1322
873
  case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
1323
874
  if (utils.matchContentType(responseContentType, "application/json")) {
1324
- res.accountingOrganizations = [];
875
+ res.accountingAccounts = [];
1325
876
  resFieldDepth = utils.getResFieldDepth(res);
1326
- res.accountingOrganizations = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingOrganization, resFieldDepth);
877
+ res.accountingAccounts = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingAccount, resFieldDepth);
1327
878
  }
1328
879
  else {
1329
880
  throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
@@ -1339,9 +890,9 @@ var Accounting = /** @class */ (function () {
1339
890
  });
1340
891
  };
1341
892
  /**
1342
- * List all payments
893
+ * List all contacts
1343
894
  */
1344
- Accounting.prototype.listAccountingPayments = function (req, config) {
895
+ Accounting.prototype.listAccountingContacts = function (req, config) {
1345
896
  var _a, _b;
1346
897
  return __awaiter(this, void 0, void 0, function () {
1347
898
  var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes, resFieldDepth;
@@ -1349,10 +900,10 @@ var Accounting = /** @class */ (function () {
1349
900
  switch (_c.label) {
1350
901
  case 0:
1351
902
  if (!(req instanceof utils.SpeakeasyBase)) {
1352
- req = new operations.ListAccountingPaymentsRequest(req);
903
+ req = new operations.ListAccountingContactsRequest(req);
1353
904
  }
1354
905
  baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
1355
- operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/payment", req);
906
+ operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/contact", req);
1356
907
  client = this.sdkConfiguration.defaultClient;
1357
908
  globalSecurity = this.sdkConfiguration.security;
1358
909
  if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
@@ -1376,7 +927,7 @@ var Accounting = /** @class */ (function () {
1376
927
  if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
1377
928
  throw new Error("status code not found in response: ".concat(httpRes));
1378
929
  }
1379
- res = new operations.ListAccountingPaymentsResponse({
930
+ res = new operations.ListAccountingContactsResponse({
1380
931
  statusCode: httpRes.status,
1381
932
  contentType: responseContentType,
1382
933
  rawResponse: httpRes,
@@ -1385,9 +936,9 @@ var Accounting = /** @class */ (function () {
1385
936
  switch (true) {
1386
937
  case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
1387
938
  if (utils.matchContentType(responseContentType, "application/json")) {
1388
- res.accountingPayments = [];
939
+ res.accountingContacts = [];
1389
940
  resFieldDepth = utils.getResFieldDepth(res);
1390
- res.accountingPayments = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingPayment, resFieldDepth);
941
+ res.accountingContacts = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingContact, resFieldDepth);
1391
942
  }
1392
943
  else {
1393
944
  throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
@@ -1403,9 +954,9 @@ var Accounting = /** @class */ (function () {
1403
954
  });
1404
955
  };
1405
956
  /**
1406
- * List all payouts
957
+ * List all invoices
1407
958
  */
1408
- Accounting.prototype.listAccountingPayouts = function (req, config) {
959
+ Accounting.prototype.listAccountingInvoices = function (req, config) {
1409
960
  var _a, _b;
1410
961
  return __awaiter(this, void 0, void 0, function () {
1411
962
  var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes, resFieldDepth;
@@ -1413,10 +964,10 @@ var Accounting = /** @class */ (function () {
1413
964
  switch (_c.label) {
1414
965
  case 0:
1415
966
  if (!(req instanceof utils.SpeakeasyBase)) {
1416
- req = new operations.ListAccountingPayoutsRequest(req);
967
+ req = new operations.ListAccountingInvoicesRequest(req);
1417
968
  }
1418
969
  baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
1419
- operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/payout", req);
970
+ operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/invoice", req);
1420
971
  client = this.sdkConfiguration.defaultClient;
1421
972
  globalSecurity = this.sdkConfiguration.security;
1422
973
  if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
@@ -1440,7 +991,7 @@ var Accounting = /** @class */ (function () {
1440
991
  if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
1441
992
  throw new Error("status code not found in response: ".concat(httpRes));
1442
993
  }
1443
- res = new operations.ListAccountingPayoutsResponse({
994
+ res = new operations.ListAccountingInvoicesResponse({
1444
995
  statusCode: httpRes.status,
1445
996
  contentType: responseContentType,
1446
997
  rawResponse: httpRes,
@@ -1449,9 +1000,9 @@ var Accounting = /** @class */ (function () {
1449
1000
  switch (true) {
1450
1001
  case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
1451
1002
  if (utils.matchContentType(responseContentType, "application/json")) {
1452
- res.accountingPayouts = [];
1003
+ res.accountingInvoices = [];
1453
1004
  resFieldDepth = utils.getResFieldDepth(res);
1454
- res.accountingPayouts = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingPayout, resFieldDepth);
1005
+ res.accountingInvoices = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingInvoice, resFieldDepth);
1455
1006
  }
1456
1007
  else {
1457
1008
  throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
@@ -1467,9 +1018,9 @@ var Accounting = /** @class */ (function () {
1467
1018
  });
1468
1019
  };
1469
1020
  /**
1470
- * List all refunds
1021
+ * List all organizations
1471
1022
  */
1472
- Accounting.prototype.listAccountingRefunds = function (req, config) {
1023
+ Accounting.prototype.listAccountingOrganizations = function (req, config) {
1473
1024
  var _a, _b;
1474
1025
  return __awaiter(this, void 0, void 0, function () {
1475
1026
  var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes, resFieldDepth;
@@ -1477,10 +1028,10 @@ var Accounting = /** @class */ (function () {
1477
1028
  switch (_c.label) {
1478
1029
  case 0:
1479
1030
  if (!(req instanceof utils.SpeakeasyBase)) {
1480
- req = new operations.ListAccountingRefundsRequest(req);
1031
+ req = new operations.ListAccountingOrganizationsRequest(req);
1481
1032
  }
1482
1033
  baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
1483
- operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/refund", req);
1034
+ operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/organization", req);
1484
1035
  client = this.sdkConfiguration.defaultClient;
1485
1036
  globalSecurity = this.sdkConfiguration.security;
1486
1037
  if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
@@ -1504,7 +1055,7 @@ var Accounting = /** @class */ (function () {
1504
1055
  if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
1505
1056
  throw new Error("status code not found in response: ".concat(httpRes));
1506
1057
  }
1507
- res = new operations.ListAccountingRefundsResponse({
1058
+ res = new operations.ListAccountingOrganizationsResponse({
1508
1059
  statusCode: httpRes.status,
1509
1060
  contentType: responseContentType,
1510
1061
  rawResponse: httpRes,
@@ -1513,9 +1064,9 @@ var Accounting = /** @class */ (function () {
1513
1064
  switch (true) {
1514
1065
  case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
1515
1066
  if (utils.matchContentType(responseContentType, "application/json")) {
1516
- res.accountingRefunds = [];
1067
+ res.accountingOrganizations = [];
1517
1068
  resFieldDepth = utils.getResFieldDepth(res);
1518
- res.accountingRefunds = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingRefund, resFieldDepth);
1069
+ res.accountingOrganizations = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingOrganization, resFieldDepth);
1519
1070
  }
1520
1071
  else {
1521
1072
  throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
@@ -1871,77 +1422,6 @@ var Accounting = /** @class */ (function () {
1871
1422
  });
1872
1423
  });
1873
1424
  };
1874
- /**
1875
- * Update a payment
1876
- */
1877
- Accounting.prototype.patchAccountingPayment = function (req, config) {
1878
- var _a, _b;
1879
- return __awaiter(this, void 0, void 0, function () {
1880
- var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
1881
- var _d;
1882
- return __generator(this, function (_e) {
1883
- switch (_e.label) {
1884
- case 0:
1885
- if (!(req instanceof utils.SpeakeasyBase)) {
1886
- req = new operations.PatchAccountingPaymentRequest(req);
1887
- }
1888
- baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
1889
- operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/payment/{id}", req);
1890
- _c = __read([{}, null], 2), reqBodyHeaders = _c[0], reqBody = _c[1];
1891
- try {
1892
- _d = __read(utils.serializeRequestBody(req, "accountingPayment", "json"), 2), reqBodyHeaders = _d[0], reqBody = _d[1];
1893
- }
1894
- catch (e) {
1895
- if (e instanceof Error) {
1896
- throw new Error("Error serializing request body, cause: ".concat(e.message));
1897
- }
1898
- }
1899
- client = this.sdkConfiguration.defaultClient;
1900
- globalSecurity = this.sdkConfiguration.security;
1901
- if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
1902
- return [4 /*yield*/, globalSecurity()];
1903
- case 1:
1904
- globalSecurity = _e.sent();
1905
- _e.label = 2;
1906
- case 2:
1907
- if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
1908
- globalSecurity = new shared.Security(globalSecurity);
1909
- }
1910
- properties = utils.parseSecurityProperties(globalSecurity);
1911
- headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
1912
- headers["Accept"] = "application/json";
1913
- headers["user-agent"] = this.sdkConfiguration.userAgent;
1914
- return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "patch", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
1915
- case 3:
1916
- httpRes = _e.sent();
1917
- responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
1918
- if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
1919
- throw new Error("status code not found in response: ".concat(httpRes));
1920
- }
1921
- res = new operations.PatchAccountingPaymentResponse({
1922
- statusCode: httpRes.status,
1923
- contentType: responseContentType,
1924
- rawResponse: httpRes,
1925
- });
1926
- decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
1927
- switch (true) {
1928
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
1929
- if (utils.matchContentType(responseContentType, "application/json")) {
1930
- res.accountingPayment = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingPayment);
1931
- }
1932
- else {
1933
- throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
1934
- }
1935
- break;
1936
- case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
1937
- ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
1938
- throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
1939
- }
1940
- return [2 /*return*/, res];
1941
- }
1942
- });
1943
- });
1944
- };
1945
1425
  /**
1946
1426
  * Update a taxrate
1947
1427
  */
@@ -2267,67 +1747,6 @@ var Accounting = /** @class */ (function () {
2267
1747
  });
2268
1748
  });
2269
1749
  };
2270
- /**
2271
- * Remove a payment
2272
- */
2273
- Accounting.prototype.removeAccountingPayment = function (req, config) {
2274
- var _a, _b;
2275
- return __awaiter(this, void 0, void 0, function () {
2276
- var baseURL, operationUrl, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
2277
- return __generator(this, function (_c) {
2278
- switch (_c.label) {
2279
- case 0:
2280
- if (!(req instanceof utils.SpeakeasyBase)) {
2281
- req = new operations.RemoveAccountingPaymentRequest(req);
2282
- }
2283
- baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
2284
- operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/payment/{id}", req);
2285
- client = this.sdkConfiguration.defaultClient;
2286
- globalSecurity = this.sdkConfiguration.security;
2287
- if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
2288
- return [4 /*yield*/, globalSecurity()];
2289
- case 1:
2290
- globalSecurity = _c.sent();
2291
- _c.label = 2;
2292
- case 2:
2293
- if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
2294
- globalSecurity = new shared.Security(globalSecurity);
2295
- }
2296
- properties = utils.parseSecurityProperties(globalSecurity);
2297
- headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
2298
- headers["Accept"] = "application/json";
2299
- headers["user-agent"] = this.sdkConfiguration.userAgent;
2300
- return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "delete", headers: headers, responseType: "arraybuffer" }, config))];
2301
- case 3:
2302
- httpRes = _c.sent();
2303
- responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
2304
- if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
2305
- throw new Error("status code not found in response: ".concat(httpRes));
2306
- }
2307
- res = new operations.RemoveAccountingPaymentResponse({
2308
- statusCode: httpRes.status,
2309
- contentType: responseContentType,
2310
- rawResponse: httpRes,
2311
- });
2312
- decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
2313
- switch (true) {
2314
- case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
2315
- ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
2316
- throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
2317
- default:
2318
- if (utils.matchContentType(responseContentType, "application/json")) {
2319
- res.res = decodedRes;
2320
- }
2321
- else {
2322
- throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
2323
- }
2324
- break;
2325
- }
2326
- return [2 /*return*/, res];
2327
- }
2328
- });
2329
- });
2330
- };
2331
1750
  /**
2332
1751
  * Remove a taxrate
2333
1752
  */
@@ -2663,77 +2082,6 @@ var Accounting = /** @class */ (function () {
2663
2082
  });
2664
2083
  });
2665
2084
  };
2666
- /**
2667
- * Update a payment
2668
- */
2669
- Accounting.prototype.updateAccountingPayment = function (req, config) {
2670
- var _a, _b;
2671
- return __awaiter(this, void 0, void 0, function () {
2672
- var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
2673
- var _d;
2674
- return __generator(this, function (_e) {
2675
- switch (_e.label) {
2676
- case 0:
2677
- if (!(req instanceof utils.SpeakeasyBase)) {
2678
- req = new operations.UpdateAccountingPaymentRequest(req);
2679
- }
2680
- baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
2681
- operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/payment/{id}", req);
2682
- _c = __read([{}, null], 2), reqBodyHeaders = _c[0], reqBody = _c[1];
2683
- try {
2684
- _d = __read(utils.serializeRequestBody(req, "accountingPayment", "json"), 2), reqBodyHeaders = _d[0], reqBody = _d[1];
2685
- }
2686
- catch (e) {
2687
- if (e instanceof Error) {
2688
- throw new Error("Error serializing request body, cause: ".concat(e.message));
2689
- }
2690
- }
2691
- client = this.sdkConfiguration.defaultClient;
2692
- globalSecurity = this.sdkConfiguration.security;
2693
- if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
2694
- return [4 /*yield*/, globalSecurity()];
2695
- case 1:
2696
- globalSecurity = _e.sent();
2697
- _e.label = 2;
2698
- case 2:
2699
- if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
2700
- globalSecurity = new shared.Security(globalSecurity);
2701
- }
2702
- properties = utils.parseSecurityProperties(globalSecurity);
2703
- headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
2704
- headers["Accept"] = "application/json";
2705
- headers["user-agent"] = this.sdkConfiguration.userAgent;
2706
- return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "put", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
2707
- case 3:
2708
- httpRes = _e.sent();
2709
- responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
2710
- if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
2711
- throw new Error("status code not found in response: ".concat(httpRes));
2712
- }
2713
- res = new operations.UpdateAccountingPaymentResponse({
2714
- statusCode: httpRes.status,
2715
- contentType: responseContentType,
2716
- rawResponse: httpRes,
2717
- });
2718
- decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
2719
- switch (true) {
2720
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
2721
- if (utils.matchContentType(responseContentType, "application/json")) {
2722
- res.accountingPayment = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingPayment);
2723
- }
2724
- else {
2725
- throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
2726
- }
2727
- break;
2728
- case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
2729
- ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
2730
- throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
2731
- }
2732
- return [2 /*return*/, res];
2733
- }
2734
- });
2735
- });
2736
- };
2737
2085
  /**
2738
2086
  * Update a taxrate
2739
2087
  */