Skip to content

Commit

Permalink
SDK regenerated by CI server [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
dynabic-billing-team committed Sep 1, 2023
1 parent 64c27a3 commit ff2f268
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/internal/objectSerializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,11 @@ export class ObjectSerializer {
if (enumsMap[type]) {
return data;
}
if (!typeMap[type]) { // in case we dont know the type
return data;
if (typeMap[data.constructor.name]) {
type = data.constructor.name;
}
else {
throw new Error('Invalid model type ' + type);
}

// get the map for the correct type.
Expand Down
1 change: 1 addition & 0 deletions src/model/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,7 @@ const enumsMap = {
};

const typeMap = {
FileReference: importedFileReference.FileReference,
ApiError: importedApiError.ApiError,
AvailableFontsResponse: importedAvailableFontsResponse.AvailableFontsResponse,
BmpSaveOptionsData: importedBmpSaveOptionsData.BmpSaveOptionsData,
Expand Down

0 comments on commit ff2f268

Please sign in to comment.