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.
135 lines (129 loc) • 3.18 kB
text/typescript
/* tslint:disable */
/* eslint-disable */
/**
* MailSlurp API
* MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. 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
*/
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;
}
/**
* @export
* @enum {string}
*/
export enum PhoneNumberDtoPhoneCountryEnum {
US = 'US',
GB = 'GB',
AU = 'AU',
}
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'],
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']),
};
}
export function PhoneNumberDtoToJSON(value?: PhoneNumberDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
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(),
};
}