diff --git a/.vscode/settings.json b/.vscode/settings.json index c5ff4f7c1..4a90936f0 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -30,5 +30,8 @@ "**/.git": true, "**/.DS_Store": true, ".tsconfig.tsbuildinfo": true + }, + "editor.codeActionsOnSave": { + "source.fixAll.eslint": true } } diff --git a/package.json b/package.json index 5fbd0d9d6..d99f98101 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xero-node", - "version": "4.4.9", + "version": "4.5.2", "description": "Xero NodeJS OAuth 2.0 client for xero-node", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/gen/model/accounting/models.ts b/src/gen/model/accounting/models.ts index d70d41271..6df08c780 100644 --- a/src/gen/model/accounting/models.ts +++ b/src/gen/model/accounting/models.ts @@ -507,7 +507,7 @@ export class ObjectSerializer { if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { - if (type === "string" && data.substring(0, 6) === "/Date(") { + if (type === "string" && data.toString().substring(0, 6) === "/Date(") { return this.deserializeDateFormats(type, data) // For MS dates that are of type 'string' } else { diff --git a/src/gen/model/assets/models.ts b/src/gen/model/assets/models.ts index 273015f43..5940cd7ca 100644 --- a/src/gen/model/assets/models.ts +++ b/src/gen/model/assets/models.ts @@ -154,7 +154,7 @@ export class ObjectSerializer { if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { - if (type === "string" && data.substring(0, 6) === "/Date(") { + if (type === "string" && data.toString().substring(0, 6) === "/Date(") { return this.deserializeDateFormats(type, data) // For MS dates that are of type 'string' } else { diff --git a/src/gen/model/projects/models.ts b/src/gen/model/projects/models.ts index 29ec8c18e..a48341b95 100644 --- a/src/gen/model/projects/models.ts +++ b/src/gen/model/projects/models.ts @@ -171,7 +171,7 @@ export class ObjectSerializer { if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { - if (type === "string" && data.substring(0, 6) === "/Date(") { + if (type === "string" && data.toString().substring(0, 6) === "/Date(") { return this.deserializeDateFormats(type, data) // For MS dates that are of type 'string' } else {