@ringer-tel/ivy
Version:
TypeScript SDK for Ringer APIs
109 lines (98 loc) • 3.8 kB
text/typescript
/* tslint:disable */
/* eslint-disable */
/**
* Ringer Business API
* This API provides comprehensive endpoints for the Ringer Business system. It includes functionality for managing customer accounts, addresses, sites, phone numbers, payments, users, and other business resources. Operations typically require authentication and appropriate permissions.
*
* The version of the OpenAPI document: 1.0.6
* Contact: support@ringer.tel
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
/**
* Data required to assign/create a phone number for a site.
* @export
* @interface PhoneNumberCreateRequest
*/
export interface PhoneNumberCreateRequest {
/**
* A user-friendly name for the phone number (e.g., "Main Line", "Sales Dept").
* @type {string}
* @memberof PhoneNumberCreateRequest
*/
name: string;
/**
* The actual phone number in E.164 format (e.g., +13035551212).
* @type {string}
* @memberof PhoneNumberCreateRequest
*/
number: string;
/**
* System code for the primary destination where calls to this number are routed.
* @type {string}
* @memberof PhoneNumberCreateRequest
*/
destinationCode: string;
/**
* System code for the failover destination if the primary is unavailable.
* @type {string}
* @memberof PhoneNumberCreateRequest
*/
failOverDestinationCode?: string | null;
/**
* Identifier of the E911 record associated with this phone number for emergency calling.
* @type {number}
* @memberof PhoneNumberCreateRequest
*/
e911Id?: number | null;
/**
* Optional. Identifier of a user primarily associated with this phone number.
* @type {number}
* @memberof PhoneNumberCreateRequest
*/
userId?: number | null;
}
/**
* Check if a given object implements the PhoneNumberCreateRequest interface.
*/
export function instanceOfPhoneNumberCreateRequest(value: object): value is PhoneNumberCreateRequest {
if (!('name' in value) || value['name'] === undefined) return false;
if (!('number' in value) || value['number'] === undefined) return false;
if (!('destinationCode' in value) || value['destinationCode'] === undefined) return false;
return true;
}
export function PhoneNumberCreateRequestFromJSON(json: any): PhoneNumberCreateRequest {
return PhoneNumberCreateRequestFromJSONTyped(json, false);
}
export function PhoneNumberCreateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PhoneNumberCreateRequest {
if (json == null) {
return json;
}
return {
'name': json['name'],
'number': json['number'],
'destinationCode': json['destination_code'],
'failOverDestinationCode': json['fail_over_destination_code'] == null ? undefined : json['fail_over_destination_code'],
'e911Id': json['e911_id'] == null ? undefined : json['e911_id'],
'userId': json['user_id'] == null ? undefined : json['user_id'],
};
}
export function PhoneNumberCreateRequestToJSON(json: any): PhoneNumberCreateRequest {
return PhoneNumberCreateRequestToJSONTyped(json, false);
}
export function PhoneNumberCreateRequestToJSONTyped(value?: PhoneNumberCreateRequest | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'name': value['name'],
'number': value['number'],
'destination_code': value['destinationCode'],
'fail_over_destination_code': value['failOverDestinationCode'],
'e911_id': value['e911Id'],
'user_id': value['userId'],
};
}