@unified-api/typescript-sdk 1.0.36 → 1.0.38
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.
- package/dist/sdk/accounting.d.ts +24 -24
- package/dist/sdk/accounting.js +91 -91
- package/dist/sdk/journal.d.ts +31 -0
- package/dist/sdk/{transaction.js → journal.js} +44 -44
- package/dist/sdk/models/operations/{createaccountingtransaction.d.ts → createaccountingjournal.d.ts} +4 -4
- package/dist/sdk/models/operations/{createaccountingtransaction.js → createaccountingjournal.js} +19 -19
- package/dist/sdk/models/operations/{getaccountingtransaction.d.ts → getaccountingjournal.d.ts} +4 -4
- package/dist/sdk/models/operations/{getaccountingtransaction.js → getaccountingjournal.js} +19 -19
- package/dist/sdk/models/operations/getunifiedintegrationauth.d.ts +2 -0
- package/dist/sdk/models/operations/getunifiedintegrationauth.js +2 -0
- package/dist/sdk/models/operations/index.d.ts +6 -6
- package/dist/sdk/models/operations/index.js +6 -6
- package/dist/sdk/models/operations/{listaccountingtransactions.d.ts → listaccountingjournals.d.ts} +3 -3
- package/dist/sdk/models/operations/{listaccountingtransactions.js → listaccountingjournals.js} +24 -24
- package/dist/sdk/models/operations/{patchaccountingtransaction.d.ts → patchaccountingjournal.d.ts} +5 -5
- package/dist/sdk/models/operations/{patchaccountingtransaction.js → patchaccountingjournal.js} +20 -20
- package/dist/sdk/models/operations/{removeaccountingtransaction.d.ts → removeaccountingjournal.d.ts} +3 -3
- package/dist/sdk/models/operations/{removeaccountingtransaction.js → removeaccountingjournal.js} +17 -17
- package/dist/sdk/models/operations/{updateaccountingtransaction.d.ts → updateaccountingjournal.d.ts} +5 -5
- package/dist/sdk/models/operations/{updateaccountingtransaction.js → updateaccountingjournal.js} +20 -20
- package/dist/sdk/models/shared/{accountingtransaction.d.ts → accountingjournal.d.ts} +3 -3
- package/dist/sdk/models/shared/{accountingtransaction.js → accountingjournal.js} +19 -19
- package/dist/sdk/models/shared/{accountingtransactionlineitem.d.ts → accountingjournallineitem.d.ts} +1 -1
- package/dist/sdk/models/shared/{accountingtransactionlineitem.js → accountingjournallineitem.js} +14 -14
- package/dist/sdk/models/shared/index.d.ts +2 -2
- package/dist/sdk/models/shared/index.js +2 -2
- package/dist/sdk/models/shared/propertyconnectionpermissions.d.ts +2 -0
- package/dist/sdk/models/shared/propertyconnectionpermissions.js +2 -0
- package/dist/sdk/models/shared/propertycrmeventtask.d.ts +6 -0
- package/dist/sdk/models/shared/propertycrmeventtask.js +12 -1
- package/dist/sdk/models/shared/webhook.d.ts +1 -0
- package/dist/sdk/models/shared/webhook.js +1 -0
- package/dist/sdk/sdk.d.ts +2 -2
- package/dist/sdk/sdk.js +5 -5
- package/docs/sdk/models/operations/createaccountingjournalrequest.md +9 -0
- package/docs/sdk/models/operations/createaccountingjournalresponse.md +11 -0
- package/docs/sdk/models/operations/{getaccountingtransactionrequest.md → getaccountingjournalrequest.md} +2 -2
- package/docs/sdk/models/operations/getaccountingjournalresponse.md +11 -0
- package/docs/sdk/models/operations/{listaccountingtransactionsrequest.md → listaccountingjournalsrequest.md} +1 -1
- package/docs/sdk/models/operations/listaccountingjournalsresponse.md +11 -0
- package/docs/sdk/models/operations/patchaccountingjournalrequest.md +10 -0
- package/docs/sdk/models/operations/patchaccountingjournalresponse.md +11 -0
- package/docs/sdk/models/operations/removeaccountingjournalrequest.md +9 -0
- package/docs/sdk/models/operations/{removeaccountingtransactionresponse.md → removeaccountingjournalresponse.md} +1 -1
- package/docs/sdk/models/operations/scopes.md +2 -0
- package/docs/sdk/models/operations/updateaccountingjournalrequest.md +10 -0
- package/docs/sdk/models/operations/updateaccountingjournalresponse.md +11 -0
- package/docs/sdk/models/shared/accountingjournal.md +17 -0
- package/docs/sdk/models/shared/{accountingtransactionlineitem.md → accountingjournallineitem.md} +1 -1
- package/docs/sdk/models/shared/objecttype.md +1 -0
- package/docs/sdk/models/shared/priority.md +10 -0
- package/docs/sdk/models/shared/propertyconnectionpermissions.md +2 -0
- package/docs/sdk/models/shared/propertycrmeventtask.md +1 -0
- package/package.json +1 -1
- package/dist/sdk/transaction.d.ts +0 -31
- package/docs/sdk/models/operations/createaccountingtransactionrequest.md +0 -9
- package/docs/sdk/models/operations/createaccountingtransactionresponse.md +0 -11
- package/docs/sdk/models/operations/getaccountingtransactionresponse.md +0 -11
- package/docs/sdk/models/operations/listaccountingtransactionsresponse.md +0 -11
- package/docs/sdk/models/operations/patchaccountingtransactionrequest.md +0 -10
- package/docs/sdk/models/operations/patchaccountingtransactionresponse.md +0 -11
- package/docs/sdk/models/operations/removeaccountingtransactionrequest.md +0 -9
- package/docs/sdk/models/operations/updateaccountingtransactionrequest.md +0 -10
- package/docs/sdk/models/operations/updateaccountingtransactionresponse.md +0 -11
- package/docs/sdk/models/shared/accountingtransaction.md +0 -17
package/dist/sdk/accounting.js
CHANGED
|
@@ -312,9 +312,9 @@ var Accounting = /** @class */ (function () {
|
|
|
312
312
|
});
|
|
313
313
|
};
|
|
314
314
|
/**
|
|
315
|
-
* Create a
|
|
315
|
+
* Create a journal
|
|
316
316
|
*/
|
|
317
|
-
Accounting.prototype.
|
|
317
|
+
Accounting.prototype.createAccountingJournal = function (req, config) {
|
|
318
318
|
var _a, _b;
|
|
319
319
|
return __awaiter(this, void 0, void 0, function () {
|
|
320
320
|
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
@@ -323,13 +323,13 @@ var Accounting = /** @class */ (function () {
|
|
|
323
323
|
switch (_e.label) {
|
|
324
324
|
case 0:
|
|
325
325
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
326
|
-
req = new operations.
|
|
326
|
+
req = new operations.CreateAccountingJournalRequest(req);
|
|
327
327
|
}
|
|
328
328
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
329
|
-
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/
|
|
329
|
+
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/journal", req);
|
|
330
330
|
_c = __read([{}, null], 2), reqBodyHeaders = _c[0], reqBody = _c[1];
|
|
331
331
|
try {
|
|
332
|
-
_d = __read(utils.serializeRequestBody(req, "
|
|
332
|
+
_d = __read(utils.serializeRequestBody(req, "accountingJournal", "json"), 2), reqBodyHeaders = _d[0], reqBody = _d[1];
|
|
333
333
|
}
|
|
334
334
|
catch (e) {
|
|
335
335
|
if (e instanceof Error) {
|
|
@@ -358,7 +358,7 @@ var Accounting = /** @class */ (function () {
|
|
|
358
358
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
359
359
|
throw new Error("status code not found in response: ".concat(httpRes));
|
|
360
360
|
}
|
|
361
|
-
res = new operations.
|
|
361
|
+
res = new operations.CreateAccountingJournalResponse({
|
|
362
362
|
statusCode: httpRes.status,
|
|
363
363
|
contentType: responseContentType,
|
|
364
364
|
rawResponse: httpRes,
|
|
@@ -367,7 +367,7 @@ var Accounting = /** @class */ (function () {
|
|
|
367
367
|
switch (true) {
|
|
368
368
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
369
369
|
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
370
|
-
res.
|
|
370
|
+
res.accountingJournal = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingJournal);
|
|
371
371
|
}
|
|
372
372
|
else {
|
|
373
373
|
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -383,9 +383,9 @@ var Accounting = /** @class */ (function () {
|
|
|
383
383
|
});
|
|
384
384
|
};
|
|
385
385
|
/**
|
|
386
|
-
* Create a
|
|
386
|
+
* Create a taxrate
|
|
387
387
|
*/
|
|
388
|
-
Accounting.prototype.
|
|
388
|
+
Accounting.prototype.createAccountingTaxrate = function (req, config) {
|
|
389
389
|
var _a, _b;
|
|
390
390
|
return __awaiter(this, void 0, void 0, function () {
|
|
391
391
|
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
@@ -394,13 +394,13 @@ var Accounting = /** @class */ (function () {
|
|
|
394
394
|
switch (_e.label) {
|
|
395
395
|
case 0:
|
|
396
396
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
397
|
-
req = new operations.
|
|
397
|
+
req = new operations.CreateAccountingTaxrateRequest(req);
|
|
398
398
|
}
|
|
399
399
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
400
|
-
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/
|
|
400
|
+
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/taxrate", req);
|
|
401
401
|
_c = __read([{}, null], 2), reqBodyHeaders = _c[0], reqBody = _c[1];
|
|
402
402
|
try {
|
|
403
|
-
_d = __read(utils.serializeRequestBody(req, "
|
|
403
|
+
_d = __read(utils.serializeRequestBody(req, "accountingTaxrate", "json"), 2), reqBodyHeaders = _d[0], reqBody = _d[1];
|
|
404
404
|
}
|
|
405
405
|
catch (e) {
|
|
406
406
|
if (e instanceof Error) {
|
|
@@ -429,7 +429,7 @@ var Accounting = /** @class */ (function () {
|
|
|
429
429
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
430
430
|
throw new Error("status code not found in response: ".concat(httpRes));
|
|
431
431
|
}
|
|
432
|
-
res = new operations.
|
|
432
|
+
res = new operations.CreateAccountingTaxrateResponse({
|
|
433
433
|
statusCode: httpRes.status,
|
|
434
434
|
contentType: responseContentType,
|
|
435
435
|
rawResponse: httpRes,
|
|
@@ -438,7 +438,7 @@ var Accounting = /** @class */ (function () {
|
|
|
438
438
|
switch (true) {
|
|
439
439
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
440
440
|
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
441
|
-
res.
|
|
441
|
+
res.accountingTaxrate = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingTaxrate);
|
|
442
442
|
}
|
|
443
443
|
else {
|
|
444
444
|
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -640,9 +640,9 @@ var Accounting = /** @class */ (function () {
|
|
|
640
640
|
});
|
|
641
641
|
};
|
|
642
642
|
/**
|
|
643
|
-
* Retrieve
|
|
643
|
+
* Retrieve a journal
|
|
644
644
|
*/
|
|
645
|
-
Accounting.prototype.
|
|
645
|
+
Accounting.prototype.getAccountingJournal = function (req, config) {
|
|
646
646
|
var _a, _b;
|
|
647
647
|
return __awaiter(this, void 0, void 0, function () {
|
|
648
648
|
var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes;
|
|
@@ -650,10 +650,10 @@ var Accounting = /** @class */ (function () {
|
|
|
650
650
|
switch (_c.label) {
|
|
651
651
|
case 0:
|
|
652
652
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
653
|
-
req = new operations.
|
|
653
|
+
req = new operations.GetAccountingJournalRequest(req);
|
|
654
654
|
}
|
|
655
655
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
656
|
-
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/
|
|
656
|
+
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/journal/{id}", req);
|
|
657
657
|
client = this.sdkConfiguration.defaultClient;
|
|
658
658
|
globalSecurity = this.sdkConfiguration.security;
|
|
659
659
|
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
@@ -677,7 +677,7 @@ var Accounting = /** @class */ (function () {
|
|
|
677
677
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
678
678
|
throw new Error("status code not found in response: ".concat(httpRes));
|
|
679
679
|
}
|
|
680
|
-
res = new operations.
|
|
680
|
+
res = new operations.GetAccountingJournalResponse({
|
|
681
681
|
statusCode: httpRes.status,
|
|
682
682
|
contentType: responseContentType,
|
|
683
683
|
rawResponse: httpRes,
|
|
@@ -686,7 +686,7 @@ var Accounting = /** @class */ (function () {
|
|
|
686
686
|
switch (true) {
|
|
687
687
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
688
688
|
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
689
|
-
res.
|
|
689
|
+
res.accountingJournal = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingJournal);
|
|
690
690
|
}
|
|
691
691
|
else {
|
|
692
692
|
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -702,9 +702,9 @@ var Accounting = /** @class */ (function () {
|
|
|
702
702
|
});
|
|
703
703
|
};
|
|
704
704
|
/**
|
|
705
|
-
* Retrieve
|
|
705
|
+
* Retrieve an organization
|
|
706
706
|
*/
|
|
707
|
-
Accounting.prototype.
|
|
707
|
+
Accounting.prototype.getAccountingOrganization = function (req, config) {
|
|
708
708
|
var _a, _b;
|
|
709
709
|
return __awaiter(this, void 0, void 0, function () {
|
|
710
710
|
var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes;
|
|
@@ -712,10 +712,10 @@ var Accounting = /** @class */ (function () {
|
|
|
712
712
|
switch (_c.label) {
|
|
713
713
|
case 0:
|
|
714
714
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
715
|
-
req = new operations.
|
|
715
|
+
req = new operations.GetAccountingOrganizationRequest(req);
|
|
716
716
|
}
|
|
717
717
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
718
|
-
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/
|
|
718
|
+
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/organization/{id}", req);
|
|
719
719
|
client = this.sdkConfiguration.defaultClient;
|
|
720
720
|
globalSecurity = this.sdkConfiguration.security;
|
|
721
721
|
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
@@ -739,7 +739,7 @@ var Accounting = /** @class */ (function () {
|
|
|
739
739
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
740
740
|
throw new Error("status code not found in response: ".concat(httpRes));
|
|
741
741
|
}
|
|
742
|
-
res = new operations.
|
|
742
|
+
res = new operations.GetAccountingOrganizationResponse({
|
|
743
743
|
statusCode: httpRes.status,
|
|
744
744
|
contentType: responseContentType,
|
|
745
745
|
rawResponse: httpRes,
|
|
@@ -748,7 +748,7 @@ var Accounting = /** @class */ (function () {
|
|
|
748
748
|
switch (true) {
|
|
749
749
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
750
750
|
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
751
|
-
res.
|
|
751
|
+
res.accountingOrganization = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingOrganization);
|
|
752
752
|
}
|
|
753
753
|
else {
|
|
754
754
|
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -764,9 +764,9 @@ var Accounting = /** @class */ (function () {
|
|
|
764
764
|
});
|
|
765
765
|
};
|
|
766
766
|
/**
|
|
767
|
-
* Retrieve a
|
|
767
|
+
* Retrieve a taxrate
|
|
768
768
|
*/
|
|
769
|
-
Accounting.prototype.
|
|
769
|
+
Accounting.prototype.getAccountingTaxrate = function (req, config) {
|
|
770
770
|
var _a, _b;
|
|
771
771
|
return __awaiter(this, void 0, void 0, function () {
|
|
772
772
|
var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes;
|
|
@@ -774,10 +774,10 @@ var Accounting = /** @class */ (function () {
|
|
|
774
774
|
switch (_c.label) {
|
|
775
775
|
case 0:
|
|
776
776
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
777
|
-
req = new operations.
|
|
777
|
+
req = new operations.GetAccountingTaxrateRequest(req);
|
|
778
778
|
}
|
|
779
779
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
780
|
-
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/
|
|
780
|
+
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/taxrate/{id}", req);
|
|
781
781
|
client = this.sdkConfiguration.defaultClient;
|
|
782
782
|
globalSecurity = this.sdkConfiguration.security;
|
|
783
783
|
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
@@ -801,7 +801,7 @@ var Accounting = /** @class */ (function () {
|
|
|
801
801
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
802
802
|
throw new Error("status code not found in response: ".concat(httpRes));
|
|
803
803
|
}
|
|
804
|
-
res = new operations.
|
|
804
|
+
res = new operations.GetAccountingTaxrateResponse({
|
|
805
805
|
statusCode: httpRes.status,
|
|
806
806
|
contentType: responseContentType,
|
|
807
807
|
rawResponse: httpRes,
|
|
@@ -810,7 +810,7 @@ var Accounting = /** @class */ (function () {
|
|
|
810
810
|
switch (true) {
|
|
811
811
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
812
812
|
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
813
|
-
res.
|
|
813
|
+
res.accountingTaxrate = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingTaxrate);
|
|
814
814
|
}
|
|
815
815
|
else {
|
|
816
816
|
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -1018,9 +1018,9 @@ var Accounting = /** @class */ (function () {
|
|
|
1018
1018
|
});
|
|
1019
1019
|
};
|
|
1020
1020
|
/**
|
|
1021
|
-
* List all
|
|
1021
|
+
* List all journals
|
|
1022
1022
|
*/
|
|
1023
|
-
Accounting.prototype.
|
|
1023
|
+
Accounting.prototype.listAccountingJournals = function (req, config) {
|
|
1024
1024
|
var _a, _b;
|
|
1025
1025
|
return __awaiter(this, void 0, void 0, function () {
|
|
1026
1026
|
var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes, resFieldDepth;
|
|
@@ -1028,10 +1028,10 @@ var Accounting = /** @class */ (function () {
|
|
|
1028
1028
|
switch (_c.label) {
|
|
1029
1029
|
case 0:
|
|
1030
1030
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
1031
|
-
req = new operations.
|
|
1031
|
+
req = new operations.ListAccountingJournalsRequest(req);
|
|
1032
1032
|
}
|
|
1033
1033
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
1034
|
-
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/
|
|
1034
|
+
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/journal", req);
|
|
1035
1035
|
client = this.sdkConfiguration.defaultClient;
|
|
1036
1036
|
globalSecurity = this.sdkConfiguration.security;
|
|
1037
1037
|
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
@@ -1055,7 +1055,7 @@ var Accounting = /** @class */ (function () {
|
|
|
1055
1055
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
1056
1056
|
throw new Error("status code not found in response: ".concat(httpRes));
|
|
1057
1057
|
}
|
|
1058
|
-
res = new operations.
|
|
1058
|
+
res = new operations.ListAccountingJournalsResponse({
|
|
1059
1059
|
statusCode: httpRes.status,
|
|
1060
1060
|
contentType: responseContentType,
|
|
1061
1061
|
rawResponse: httpRes,
|
|
@@ -1064,9 +1064,9 @@ var Accounting = /** @class */ (function () {
|
|
|
1064
1064
|
switch (true) {
|
|
1065
1065
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
1066
1066
|
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
1067
|
-
res.
|
|
1067
|
+
res.accountingJournals = [];
|
|
1068
1068
|
resFieldDepth = utils.getResFieldDepth(res);
|
|
1069
|
-
res.
|
|
1069
|
+
res.accountingJournals = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingJournal, resFieldDepth);
|
|
1070
1070
|
}
|
|
1071
1071
|
else {
|
|
1072
1072
|
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -1082,9 +1082,9 @@ var Accounting = /** @class */ (function () {
|
|
|
1082
1082
|
});
|
|
1083
1083
|
};
|
|
1084
1084
|
/**
|
|
1085
|
-
* List all
|
|
1085
|
+
* List all organizations
|
|
1086
1086
|
*/
|
|
1087
|
-
Accounting.prototype.
|
|
1087
|
+
Accounting.prototype.listAccountingOrganizations = function (req, config) {
|
|
1088
1088
|
var _a, _b;
|
|
1089
1089
|
return __awaiter(this, void 0, void 0, function () {
|
|
1090
1090
|
var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes, resFieldDepth;
|
|
@@ -1092,10 +1092,10 @@ var Accounting = /** @class */ (function () {
|
|
|
1092
1092
|
switch (_c.label) {
|
|
1093
1093
|
case 0:
|
|
1094
1094
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
1095
|
-
req = new operations.
|
|
1095
|
+
req = new operations.ListAccountingOrganizationsRequest(req);
|
|
1096
1096
|
}
|
|
1097
1097
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
1098
|
-
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/
|
|
1098
|
+
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/organization", req);
|
|
1099
1099
|
client = this.sdkConfiguration.defaultClient;
|
|
1100
1100
|
globalSecurity = this.sdkConfiguration.security;
|
|
1101
1101
|
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
@@ -1119,7 +1119,7 @@ var Accounting = /** @class */ (function () {
|
|
|
1119
1119
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
1120
1120
|
throw new Error("status code not found in response: ".concat(httpRes));
|
|
1121
1121
|
}
|
|
1122
|
-
res = new operations.
|
|
1122
|
+
res = new operations.ListAccountingOrganizationsResponse({
|
|
1123
1123
|
statusCode: httpRes.status,
|
|
1124
1124
|
contentType: responseContentType,
|
|
1125
1125
|
rawResponse: httpRes,
|
|
@@ -1128,9 +1128,9 @@ var Accounting = /** @class */ (function () {
|
|
|
1128
1128
|
switch (true) {
|
|
1129
1129
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
1130
1130
|
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
1131
|
-
res.
|
|
1131
|
+
res.accountingOrganizations = [];
|
|
1132
1132
|
resFieldDepth = utils.getResFieldDepth(res);
|
|
1133
|
-
res.
|
|
1133
|
+
res.accountingOrganizations = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingOrganization, resFieldDepth);
|
|
1134
1134
|
}
|
|
1135
1135
|
else {
|
|
1136
1136
|
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -1146,9 +1146,9 @@ var Accounting = /** @class */ (function () {
|
|
|
1146
1146
|
});
|
|
1147
1147
|
};
|
|
1148
1148
|
/**
|
|
1149
|
-
* List all
|
|
1149
|
+
* List all taxrates
|
|
1150
1150
|
*/
|
|
1151
|
-
Accounting.prototype.
|
|
1151
|
+
Accounting.prototype.listAccountingTaxrates = function (req, config) {
|
|
1152
1152
|
var _a, _b;
|
|
1153
1153
|
return __awaiter(this, void 0, void 0, function () {
|
|
1154
1154
|
var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes, resFieldDepth;
|
|
@@ -1156,10 +1156,10 @@ var Accounting = /** @class */ (function () {
|
|
|
1156
1156
|
switch (_c.label) {
|
|
1157
1157
|
case 0:
|
|
1158
1158
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
1159
|
-
req = new operations.
|
|
1159
|
+
req = new operations.ListAccountingTaxratesRequest(req);
|
|
1160
1160
|
}
|
|
1161
1161
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
1162
|
-
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/
|
|
1162
|
+
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/taxrate", req);
|
|
1163
1163
|
client = this.sdkConfiguration.defaultClient;
|
|
1164
1164
|
globalSecurity = this.sdkConfiguration.security;
|
|
1165
1165
|
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
@@ -1183,7 +1183,7 @@ var Accounting = /** @class */ (function () {
|
|
|
1183
1183
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
1184
1184
|
throw new Error("status code not found in response: ".concat(httpRes));
|
|
1185
1185
|
}
|
|
1186
|
-
res = new operations.
|
|
1186
|
+
res = new operations.ListAccountingTaxratesResponse({
|
|
1187
1187
|
statusCode: httpRes.status,
|
|
1188
1188
|
contentType: responseContentType,
|
|
1189
1189
|
rawResponse: httpRes,
|
|
@@ -1192,9 +1192,9 @@ var Accounting = /** @class */ (function () {
|
|
|
1192
1192
|
switch (true) {
|
|
1193
1193
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
1194
1194
|
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
1195
|
-
res.
|
|
1195
|
+
res.accountingTaxrates = [];
|
|
1196
1196
|
resFieldDepth = utils.getResFieldDepth(res);
|
|
1197
|
-
res.
|
|
1197
|
+
res.accountingTaxrates = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingTaxrate, resFieldDepth);
|
|
1198
1198
|
}
|
|
1199
1199
|
else {
|
|
1200
1200
|
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -1423,9 +1423,9 @@ var Accounting = /** @class */ (function () {
|
|
|
1423
1423
|
});
|
|
1424
1424
|
};
|
|
1425
1425
|
/**
|
|
1426
|
-
* Update a
|
|
1426
|
+
* Update a journal
|
|
1427
1427
|
*/
|
|
1428
|
-
Accounting.prototype.
|
|
1428
|
+
Accounting.prototype.patchAccountingJournal = function (req, config) {
|
|
1429
1429
|
var _a, _b;
|
|
1430
1430
|
return __awaiter(this, void 0, void 0, function () {
|
|
1431
1431
|
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
@@ -1434,13 +1434,13 @@ var Accounting = /** @class */ (function () {
|
|
|
1434
1434
|
switch (_e.label) {
|
|
1435
1435
|
case 0:
|
|
1436
1436
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
1437
|
-
req = new operations.
|
|
1437
|
+
req = new operations.PatchAccountingJournalRequest(req);
|
|
1438
1438
|
}
|
|
1439
1439
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
1440
|
-
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/
|
|
1440
|
+
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/journal/{id}", req);
|
|
1441
1441
|
_c = __read([{}, null], 2), reqBodyHeaders = _c[0], reqBody = _c[1];
|
|
1442
1442
|
try {
|
|
1443
|
-
_d = __read(utils.serializeRequestBody(req, "
|
|
1443
|
+
_d = __read(utils.serializeRequestBody(req, "accountingJournal", "json"), 2), reqBodyHeaders = _d[0], reqBody = _d[1];
|
|
1444
1444
|
}
|
|
1445
1445
|
catch (e) {
|
|
1446
1446
|
if (e instanceof Error) {
|
|
@@ -1469,7 +1469,7 @@ var Accounting = /** @class */ (function () {
|
|
|
1469
1469
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
1470
1470
|
throw new Error("status code not found in response: ".concat(httpRes));
|
|
1471
1471
|
}
|
|
1472
|
-
res = new operations.
|
|
1472
|
+
res = new operations.PatchAccountingJournalResponse({
|
|
1473
1473
|
statusCode: httpRes.status,
|
|
1474
1474
|
contentType: responseContentType,
|
|
1475
1475
|
rawResponse: httpRes,
|
|
@@ -1478,7 +1478,7 @@ var Accounting = /** @class */ (function () {
|
|
|
1478
1478
|
switch (true) {
|
|
1479
1479
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
1480
1480
|
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
1481
|
-
res.
|
|
1481
|
+
res.accountingJournal = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingJournal);
|
|
1482
1482
|
}
|
|
1483
1483
|
else {
|
|
1484
1484
|
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -1494,9 +1494,9 @@ var Accounting = /** @class */ (function () {
|
|
|
1494
1494
|
});
|
|
1495
1495
|
};
|
|
1496
1496
|
/**
|
|
1497
|
-
* Update a
|
|
1497
|
+
* Update a taxrate
|
|
1498
1498
|
*/
|
|
1499
|
-
Accounting.prototype.
|
|
1499
|
+
Accounting.prototype.patchAccountingTaxrate = function (req, config) {
|
|
1500
1500
|
var _a, _b;
|
|
1501
1501
|
return __awaiter(this, void 0, void 0, function () {
|
|
1502
1502
|
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
@@ -1505,13 +1505,13 @@ var Accounting = /** @class */ (function () {
|
|
|
1505
1505
|
switch (_e.label) {
|
|
1506
1506
|
case 0:
|
|
1507
1507
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
1508
|
-
req = new operations.
|
|
1508
|
+
req = new operations.PatchAccountingTaxrateRequest(req);
|
|
1509
1509
|
}
|
|
1510
1510
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
1511
|
-
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/
|
|
1511
|
+
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/taxrate/{id}", req);
|
|
1512
1512
|
_c = __read([{}, null], 2), reqBodyHeaders = _c[0], reqBody = _c[1];
|
|
1513
1513
|
try {
|
|
1514
|
-
_d = __read(utils.serializeRequestBody(req, "
|
|
1514
|
+
_d = __read(utils.serializeRequestBody(req, "accountingTaxrate", "json"), 2), reqBodyHeaders = _d[0], reqBody = _d[1];
|
|
1515
1515
|
}
|
|
1516
1516
|
catch (e) {
|
|
1517
1517
|
if (e instanceof Error) {
|
|
@@ -1540,7 +1540,7 @@ var Accounting = /** @class */ (function () {
|
|
|
1540
1540
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
1541
1541
|
throw new Error("status code not found in response: ".concat(httpRes));
|
|
1542
1542
|
}
|
|
1543
|
-
res = new operations.
|
|
1543
|
+
res = new operations.PatchAccountingTaxrateResponse({
|
|
1544
1544
|
statusCode: httpRes.status,
|
|
1545
1545
|
contentType: responseContentType,
|
|
1546
1546
|
rawResponse: httpRes,
|
|
@@ -1549,7 +1549,7 @@ var Accounting = /** @class */ (function () {
|
|
|
1549
1549
|
switch (true) {
|
|
1550
1550
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
1551
1551
|
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
1552
|
-
res.
|
|
1552
|
+
res.accountingTaxrate = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingTaxrate);
|
|
1553
1553
|
}
|
|
1554
1554
|
else {
|
|
1555
1555
|
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -1754,9 +1754,9 @@ var Accounting = /** @class */ (function () {
|
|
|
1754
1754
|
});
|
|
1755
1755
|
};
|
|
1756
1756
|
/**
|
|
1757
|
-
* Remove a
|
|
1757
|
+
* Remove a journal
|
|
1758
1758
|
*/
|
|
1759
|
-
Accounting.prototype.
|
|
1759
|
+
Accounting.prototype.removeAccountingJournal = function (req, config) {
|
|
1760
1760
|
var _a, _b;
|
|
1761
1761
|
return __awaiter(this, void 0, void 0, function () {
|
|
1762
1762
|
var baseURL, operationUrl, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
@@ -1764,10 +1764,10 @@ var Accounting = /** @class */ (function () {
|
|
|
1764
1764
|
switch (_c.label) {
|
|
1765
1765
|
case 0:
|
|
1766
1766
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
1767
|
-
req = new operations.
|
|
1767
|
+
req = new operations.RemoveAccountingJournalRequest(req);
|
|
1768
1768
|
}
|
|
1769
1769
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
1770
|
-
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/
|
|
1770
|
+
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/journal/{id}", req);
|
|
1771
1771
|
client = this.sdkConfiguration.defaultClient;
|
|
1772
1772
|
globalSecurity = this.sdkConfiguration.security;
|
|
1773
1773
|
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
@@ -1790,7 +1790,7 @@ var Accounting = /** @class */ (function () {
|
|
|
1790
1790
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
1791
1791
|
throw new Error("status code not found in response: ".concat(httpRes));
|
|
1792
1792
|
}
|
|
1793
|
-
res = new operations.
|
|
1793
|
+
res = new operations.RemoveAccountingJournalResponse({
|
|
1794
1794
|
statusCode: httpRes.status,
|
|
1795
1795
|
contentType: responseContentType,
|
|
1796
1796
|
rawResponse: httpRes,
|
|
@@ -1817,9 +1817,9 @@ var Accounting = /** @class */ (function () {
|
|
|
1817
1817
|
});
|
|
1818
1818
|
};
|
|
1819
1819
|
/**
|
|
1820
|
-
* Remove a
|
|
1820
|
+
* Remove a taxrate
|
|
1821
1821
|
*/
|
|
1822
|
-
Accounting.prototype.
|
|
1822
|
+
Accounting.prototype.removeAccountingTaxrate = function (req, config) {
|
|
1823
1823
|
var _a, _b;
|
|
1824
1824
|
return __awaiter(this, void 0, void 0, function () {
|
|
1825
1825
|
var baseURL, operationUrl, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
@@ -1827,10 +1827,10 @@ var Accounting = /** @class */ (function () {
|
|
|
1827
1827
|
switch (_c.label) {
|
|
1828
1828
|
case 0:
|
|
1829
1829
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
1830
|
-
req = new operations.
|
|
1830
|
+
req = new operations.RemoveAccountingTaxrateRequest(req);
|
|
1831
1831
|
}
|
|
1832
1832
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
1833
|
-
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/
|
|
1833
|
+
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/taxrate/{id}", req);
|
|
1834
1834
|
client = this.sdkConfiguration.defaultClient;
|
|
1835
1835
|
globalSecurity = this.sdkConfiguration.security;
|
|
1836
1836
|
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
@@ -1853,7 +1853,7 @@ var Accounting = /** @class */ (function () {
|
|
|
1853
1853
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
1854
1854
|
throw new Error("status code not found in response: ".concat(httpRes));
|
|
1855
1855
|
}
|
|
1856
|
-
res = new operations.
|
|
1856
|
+
res = new operations.RemoveAccountingTaxrateResponse({
|
|
1857
1857
|
statusCode: httpRes.status,
|
|
1858
1858
|
contentType: responseContentType,
|
|
1859
1859
|
rawResponse: httpRes,
|
|
@@ -2093,9 +2093,9 @@ var Accounting = /** @class */ (function () {
|
|
|
2093
2093
|
});
|
|
2094
2094
|
};
|
|
2095
2095
|
/**
|
|
2096
|
-
* Update a
|
|
2096
|
+
* Update a journal
|
|
2097
2097
|
*/
|
|
2098
|
-
Accounting.prototype.
|
|
2098
|
+
Accounting.prototype.updateAccountingJournal = function (req, config) {
|
|
2099
2099
|
var _a, _b;
|
|
2100
2100
|
return __awaiter(this, void 0, void 0, function () {
|
|
2101
2101
|
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
@@ -2104,13 +2104,13 @@ var Accounting = /** @class */ (function () {
|
|
|
2104
2104
|
switch (_e.label) {
|
|
2105
2105
|
case 0:
|
|
2106
2106
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
2107
|
-
req = new operations.
|
|
2107
|
+
req = new operations.UpdateAccountingJournalRequest(req);
|
|
2108
2108
|
}
|
|
2109
2109
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
2110
|
-
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/
|
|
2110
|
+
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/journal/{id}", req);
|
|
2111
2111
|
_c = __read([{}, null], 2), reqBodyHeaders = _c[0], reqBody = _c[1];
|
|
2112
2112
|
try {
|
|
2113
|
-
_d = __read(utils.serializeRequestBody(req, "
|
|
2113
|
+
_d = __read(utils.serializeRequestBody(req, "accountingJournal", "json"), 2), reqBodyHeaders = _d[0], reqBody = _d[1];
|
|
2114
2114
|
}
|
|
2115
2115
|
catch (e) {
|
|
2116
2116
|
if (e instanceof Error) {
|
|
@@ -2139,7 +2139,7 @@ var Accounting = /** @class */ (function () {
|
|
|
2139
2139
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
2140
2140
|
throw new Error("status code not found in response: ".concat(httpRes));
|
|
2141
2141
|
}
|
|
2142
|
-
res = new operations.
|
|
2142
|
+
res = new operations.UpdateAccountingJournalResponse({
|
|
2143
2143
|
statusCode: httpRes.status,
|
|
2144
2144
|
contentType: responseContentType,
|
|
2145
2145
|
rawResponse: httpRes,
|
|
@@ -2148,7 +2148,7 @@ var Accounting = /** @class */ (function () {
|
|
|
2148
2148
|
switch (true) {
|
|
2149
2149
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
2150
2150
|
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
2151
|
-
res.
|
|
2151
|
+
res.accountingJournal = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingJournal);
|
|
2152
2152
|
}
|
|
2153
2153
|
else {
|
|
2154
2154
|
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -2164,9 +2164,9 @@ var Accounting = /** @class */ (function () {
|
|
|
2164
2164
|
});
|
|
2165
2165
|
};
|
|
2166
2166
|
/**
|
|
2167
|
-
* Update a
|
|
2167
|
+
* Update a taxrate
|
|
2168
2168
|
*/
|
|
2169
|
-
Accounting.prototype.
|
|
2169
|
+
Accounting.prototype.updateAccountingTaxrate = function (req, config) {
|
|
2170
2170
|
var _a, _b;
|
|
2171
2171
|
return __awaiter(this, void 0, void 0, function () {
|
|
2172
2172
|
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
@@ -2175,13 +2175,13 @@ var Accounting = /** @class */ (function () {
|
|
|
2175
2175
|
switch (_e.label) {
|
|
2176
2176
|
case 0:
|
|
2177
2177
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
2178
|
-
req = new operations.
|
|
2178
|
+
req = new operations.UpdateAccountingTaxrateRequest(req);
|
|
2179
2179
|
}
|
|
2180
2180
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
2181
|
-
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/
|
|
2181
|
+
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/taxrate/{id}", req);
|
|
2182
2182
|
_c = __read([{}, null], 2), reqBodyHeaders = _c[0], reqBody = _c[1];
|
|
2183
2183
|
try {
|
|
2184
|
-
_d = __read(utils.serializeRequestBody(req, "
|
|
2184
|
+
_d = __read(utils.serializeRequestBody(req, "accountingTaxrate", "json"), 2), reqBodyHeaders = _d[0], reqBody = _d[1];
|
|
2185
2185
|
}
|
|
2186
2186
|
catch (e) {
|
|
2187
2187
|
if (e instanceof Error) {
|
|
@@ -2210,7 +2210,7 @@ var Accounting = /** @class */ (function () {
|
|
|
2210
2210
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
2211
2211
|
throw new Error("status code not found in response: ".concat(httpRes));
|
|
2212
2212
|
}
|
|
2213
|
-
res = new operations.
|
|
2213
|
+
res = new operations.UpdateAccountingTaxrateResponse({
|
|
2214
2214
|
statusCode: httpRes.status,
|
|
2215
2215
|
contentType: responseContentType,
|
|
2216
2216
|
rawResponse: httpRes,
|
|
@@ -2219,7 +2219,7 @@ var Accounting = /** @class */ (function () {
|
|
|
2219
2219
|
switch (true) {
|
|
2220
2220
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
2221
2221
|
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
2222
|
-
res.
|
|
2222
|
+
res.accountingTaxrate = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingTaxrate);
|
|
2223
2223
|
}
|
|
2224
2224
|
else {
|
|
2225
2225
|
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as operations from "../sdk/models/operations";
|
|
2
|
+
import { SDKConfiguration } from "./sdk";
|
|
3
|
+
import { AxiosRequestConfig } from "axios";
|
|
4
|
+
export declare class Journal {
|
|
5
|
+
private sdkConfiguration;
|
|
6
|
+
constructor(sdkConfig: SDKConfiguration);
|
|
7
|
+
/**
|
|
8
|
+
* Create a journal
|
|
9
|
+
*/
|
|
10
|
+
createAccountingJournal(req: operations.CreateAccountingJournalRequest, config?: AxiosRequestConfig): Promise<operations.CreateAccountingJournalResponse>;
|
|
11
|
+
/**
|
|
12
|
+
* Retrieve a journal
|
|
13
|
+
*/
|
|
14
|
+
getAccountingJournal(req: operations.GetAccountingJournalRequest, config?: AxiosRequestConfig): Promise<operations.GetAccountingJournalResponse>;
|
|
15
|
+
/**
|
|
16
|
+
* List all journals
|
|
17
|
+
*/
|
|
18
|
+
listAccountingJournals(req: operations.ListAccountingJournalsRequest, config?: AxiosRequestConfig): Promise<operations.ListAccountingJournalsResponse>;
|
|
19
|
+
/**
|
|
20
|
+
* Update a journal
|
|
21
|
+
*/
|
|
22
|
+
patchAccountingJournal(req: operations.PatchAccountingJournalRequest, config?: AxiosRequestConfig): Promise<operations.PatchAccountingJournalResponse>;
|
|
23
|
+
/**
|
|
24
|
+
* Remove a journal
|
|
25
|
+
*/
|
|
26
|
+
removeAccountingJournal(req: operations.RemoveAccountingJournalRequest, config?: AxiosRequestConfig): Promise<operations.RemoveAccountingJournalResponse>;
|
|
27
|
+
/**
|
|
28
|
+
* Update a journal
|
|
29
|
+
*/
|
|
30
|
+
updateAccountingJournal(req: operations.UpdateAccountingJournalRequest, config?: AxiosRequestConfig): Promise<operations.UpdateAccountingJournalResponse>;
|
|
31
|
+
}
|