Skip to content

Commit aec4bef

Browse files
committed
Generate PosMobile
1 parent d1a1cdc commit aec4bef

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/services/posMobile/posMobileApi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ export class PosMobileApi extends Service {
4141
const endpoint = `${this.baseUrl}/sessions`;
4242
const resource = new Resource(this, endpoint);
4343

44-
const request: CreateSessionRequest = ObjectSerializer.serialize(createSessionRequest, "CreateSessionRequest", "");
44+
const request: CreateSessionRequest = ObjectSerializer.serialize(createSessionRequest, "CreateSessionRequest");
4545
const response = await getJsonResponse<CreateSessionRequest, CreateSessionResponse>(
4646
resource,
4747
request,
4848
{ ...requestOptions, method: "POST" }
4949
);
5050

51-
return ObjectSerializer.deserialize(response, "CreateSessionResponse", "");
51+
return ObjectSerializer.deserialize(response, "CreateSessionResponse");
5252
}
5353

5454
}

src/typings/posMobile/objectSerializer.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,10 @@ export class ObjectSerializer {
129129
*
130130
* @param data - The value to serialize.
131131
* @param type - The expected type name as a string.
132-
* @param format - Format hint (e.g. "date" or "date-time").
132+
* @param format - Format hint (e.g. "date" or "date-time"). Default is an empty string.
133133
* @returns A JSON-compatible representation of `data`.
134134
*/
135-
public static serialize(data: any, type: string, format: string): any {
135+
public static serialize(data: any, type: string, format: string = ""): any {
136136
if (data == undefined) {
137137
return data;
138138
} else if (primitives.indexOf(type.toLowerCase()) !== -1) {
@@ -209,10 +209,10 @@ export class ObjectSerializer {
209209
*
210210
* @param data - The raw input to deserialize.
211211
* @param type - The expected type name as a string.
212-
* @param format - Format hint (e.g. "date" or "date-time").
212+
* @param format - Format hint (e.g. "date" or "date-time"). Default is an empty string.
213213
* @returns A deserialized instance or value of `data`.
214214
*/
215-
public static deserialize(data: any, type: string, format: string): any {
215+
public static deserialize(data: any, type: string, format: string = ""): any {
216216
// polymorphism may change the actual type.
217217
type = ObjectSerializer.findCorrectType(data, type);
218218
if (data == undefined) {

0 commit comments

Comments
 (0)