@ingestkorea/client-sens
Version:
INGESTKOREA SDK Naver Cloud Platform SENS Client for Node.js.
27 lines (26 loc) • 996 B
JavaScript
import { SensCommand } from "../models";
import { serializeIngestkorea_restJson_GetSMSResultCommand, deserializeIngestkorea_restJson_GetSMSResultCommand, } from "../protocols/GetSMSResult";
import { IngestkoreaError } from "@ingestkorea/util-error-handler";
export class GetSMSResultCommand extends SensCommand {
constructor(input) {
super(input);
this.input = {
...input,
};
}
async serialize(input, config) {
if (!config.serviceId.sms)
throw new IngestkoreaError({
code: 400,
type: "Bad Request",
message: "Invalid Params",
description: "Please Check SMS ServiceId",
});
let request = await serializeIngestkorea_restJson_GetSMSResultCommand(input, config);
return request;
}
async deserialize(response) {
let output = await deserializeIngestkorea_restJson_GetSMSResultCommand(response);
return output;
}
}