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.
168 lines (162 loc) • 3.85 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 PhoneNumberDto
*/
export interface PhoneNumberDto {
/**
*
* @type {string}
* @memberof PhoneNumberDto
*/
id: string;
/**
*
* @type {string}
* @memberof PhoneNumberDto
*/
name?: string;
/**
*
* @type {string}
* @memberof PhoneNumberDto
*/
description?: string;
/**
*
* @type {string}
* @memberof PhoneNumberDto
*/
userId: string;
/**
*
* @type {string}
* @memberof PhoneNumberDto
*/
complianceAddress?: string;
/**
*
* @type {string}
* @memberof PhoneNumberDto
*/
emergencyAddress?: string;
/**
*
* @type {string}
* @memberof PhoneNumberDto
*/
phoneNumber: string;
/**
*
* @type {string}
* @memberof PhoneNumberDto
*/
phoneCountry: PhoneNumberDtoPhoneCountryEnum;
/**
*
* @type {string}
* @memberof PhoneNumberDto
*/
phonePlan: string;
/**
*
* @type {Date}
* @memberof PhoneNumberDto
*/
createdAt: Date;
/**
*
* @type {Date}
* @memberof PhoneNumberDto
*/
updatedAt: Date;
/**
*
* @type {boolean}
* @memberof PhoneNumberDto
*/
favourite: boolean;
}
/**
* @export
* @enum {string}
*/
export enum PhoneNumberDtoPhoneCountryEnum {
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 function PhoneNumberDtoFromJSON(json: any): PhoneNumberDto {
return PhoneNumberDtoFromJSONTyped(json, false);
}
export function PhoneNumberDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PhoneNumberDto {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
name: !exists(json, 'name') ? undefined : json['name'],
description: !exists(json, 'description') ? undefined : json['description'],
userId: json['userId'],
complianceAddress: !exists(json, 'complianceAddress')
? undefined
: json['complianceAddress'],
emergencyAddress: !exists(json, 'emergencyAddress')
? undefined
: json['emergencyAddress'],
phoneNumber: json['phoneNumber'],
phoneCountry: json['phoneCountry'],
phonePlan: json['phonePlan'],
createdAt: new Date(json['createdAt']),
updatedAt: new Date(json['updatedAt']),
favourite: json['favourite'],
};
}
export function PhoneNumberDtoToJSON(value?: PhoneNumberDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
name: value.name,
description: value.description,
userId: value.userId,
complianceAddress: value.complianceAddress,
emergencyAddress: value.emergencyAddress,
phoneNumber: value.phoneNumber,
phoneCountry: value.phoneCountry,
phonePlan: value.phonePlan,
createdAt: value.createdAt.toISOString(),
updatedAt: value.updatedAt.toISOString(),
favourite: value.favourite,
};
}