@ringer-tel/ivy
Version:
TypeScript SDK for Ringer APIs
100 lines (89 loc) • 3.3 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';
/**
*
* @export
* @interface SchemasPhoneNumberCore
*/
export interface SchemasPhoneNumberCore {
/**
* Unique identifier for the phone number record/assignment.
* @type {number}
* @memberof SchemasPhoneNumberCore
*/
id?: number;
/**
* A user-friendly name or label for the phone number (e.g., "Main Line", "Sales Dept").
* @type {string}
* @memberof SchemasPhoneNumberCore
*/
name: string;
/**
* The actual phone number in E.164 format (e.g., +13035551212).
* @type {string}
* @memberof SchemasPhoneNumberCore
*/
number: string;
/**
* Identifier of the site the phone number is associated with. Can be null if the number is available but not yet assigned to a specific site.
* @type {number}
* @memberof SchemasPhoneNumberCore
*/
siteId?: number | null;
/**
* System code for the destination where calls to this number are routed (e.g., "device:dev_xyz", "menu:ivr_main").
* @type {string}
* @memberof SchemasPhoneNumberCore
*/
destinationCode?: string | null;
}
/**
* Check if a given object implements the SchemasPhoneNumberCore interface.
*/
export function instanceOfSchemasPhoneNumberCore(value: object): value is SchemasPhoneNumberCore {
if (!('name' in value) || value['name'] === undefined) return false;
if (!('number' in value) || value['number'] === undefined) return false;
return true;
}
export function SchemasPhoneNumberCoreFromJSON(json: any): SchemasPhoneNumberCore {
return SchemasPhoneNumberCoreFromJSONTyped(json, false);
}
export function SchemasPhoneNumberCoreFromJSONTyped(json: any, ignoreDiscriminator: boolean): SchemasPhoneNumberCore {
if (json == null) {
return json;
}
return {
'id': json['id'] == null ? undefined : json['id'],
'name': json['name'],
'number': json['number'],
'siteId': json['site_id'] == null ? undefined : json['site_id'],
'destinationCode': json['destination_code'] == null ? undefined : json['destination_code'],
};
}
export function SchemasPhoneNumberCoreToJSON(json: any): SchemasPhoneNumberCore {
return SchemasPhoneNumberCoreToJSONTyped(json, false);
}
export function SchemasPhoneNumberCoreToJSONTyped(value?: SchemasPhoneNumberCore | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'name': value['name'],
'number': value['number'],
'site_id': value['siteId'],
'destination_code': value['destinationCode'],
};
}