mailslurp-client
Version:
Official client for MailSlurp Email and SMS API. Create email addresses and phone numbers in Javascript without a mail server. Send and receive real emails in applications or tests.
112 lines (106 loc) • 2.78 kB
text/typescript
/* tslint:disable */
/* eslint-disable */
/**
* MailSlurp API
* MailSlurp is an API for sending and receiving emails and SMS from dynamically allocated email addresses and phone numbers. It\'s designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository
*
* The version of the OpenAPI document: 6.5.2
* Contact: contact@mailslurp.dev
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
/**
*
* @export
* @interface CreatePhoneNumberOptions
*/
export interface CreatePhoneNumberOptions {
/**
*
* @type {string}
* @memberof CreatePhoneNumberOptions
*/
phoneCountry: CreatePhoneNumberOptionsPhoneCountryEnum;
/**
*
* @type {string}
* @memberof CreatePhoneNumberOptions
*/
name?: string;
/**
*
* @type {string}
* @memberof CreatePhoneNumberOptions
*/
description?: string;
/**
*
* @type {string}
* @memberof CreatePhoneNumberOptions
*/
schedule?: CreatePhoneNumberOptionsScheduleEnum;
}
/**
* @export
* @enum {string}
*/
export enum CreatePhoneNumberOptionsPhoneCountryEnum {
US = 'US',
GB = 'GB',
AU = 'AU',
CA = 'CA',
EE = 'EE',
HK = 'HK',
PL = 'PL',
CH = 'CH',
PT = 'PT',
NL = 'NL',
IL = 'IL',
SE = 'SE',
}
/**
* @export
* @enum {string}
*/
export enum CreatePhoneNumberOptionsScheduleEnum {
MONTHLY = 'MONTHLY',
YEARLY = 'YEARLY',
}
export function CreatePhoneNumberOptionsFromJSON(
json: any
): CreatePhoneNumberOptions {
return CreatePhoneNumberOptionsFromJSONTyped(json, false);
}
export function CreatePhoneNumberOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): CreatePhoneNumberOptions {
if (json === undefined || json === null) {
return json;
}
return {
phoneCountry: json['phoneCountry'],
name: !exists(json, 'name') ? undefined : json['name'],
description: !exists(json, 'description') ? undefined : json['description'],
schedule: !exists(json, 'schedule') ? undefined : json['schedule'],
};
}
export function CreatePhoneNumberOptionsToJSON(
value?: CreatePhoneNumberOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
phoneCountry: value.phoneCountry,
name: value.name,
description: value.description,
schedule: value.schedule,
};
}