@ringer-tel/ivy
Version:
TypeScript SDK for Ringer APIs
138 lines (127 loc) • 4.46 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.5
* 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 for updating an existing site. Provide only fields to be changed.
* @export
* @interface SiteUpdateRequest
*/
export interface SiteUpdateRequest {
/**
* A user-friendly name for the site.
* @type {string}
* @memberof SiteUpdateRequest
*/
name?: string;
/**
* The DNS extension for the site.
* @type {string}
* @memberof SiteUpdateRequest
*/
dnsExtension?: string;
/**
* Indicates if the site is active.
* @type {boolean}
* @memberof SiteUpdateRequest
*/
active?: boolean;
/**
* Default Caller ID name for outbound calls.
* @type {string}
* @memberof SiteUpdateRequest
*/
callerIdName?: string;
/**
* Default Caller ID number for outbound calls.
* @type {string}
* @memberof SiteUpdateRequest
*/
callerIdNumber?: string;
/**
* Identifier of the thin client.
* @type {number}
* @memberof SiteUpdateRequest
*/
thinClientId?: number;
/**
* Access Control List.
* @type {string}
* @memberof SiteUpdateRequest
*/
acl?: string;
/**
* Maximum number of concurrent call channels.
* @type {number}
* @memberof SiteUpdateRequest
*/
channelLimit?: number;
/**
* List of permitted outbound country codes.
* @type {Array<string>}
* @memberof SiteUpdateRequest
*/
permittedCountryCodes?: Array<string>;
/**
* URL to the music on hold audio file.
* @type {string}
* @memberof SiteUpdateRequest
*/
musicOnHoldUrl?: string | null;
}
/**
* Check if a given object implements the SiteUpdateRequest interface.
*/
export function instanceOfSiteUpdateRequest(value: object): value is SiteUpdateRequest {
return true;
}
export function SiteUpdateRequestFromJSON(json: any): SiteUpdateRequest {
return SiteUpdateRequestFromJSONTyped(json, false);
}
export function SiteUpdateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteUpdateRequest {
if (json == null) {
return json;
}
return {
'name': json['name'] == null ? undefined : json['name'],
'dnsExtension': json['dns_extension'] == null ? undefined : json['dns_extension'],
'active': json['active'] == null ? undefined : json['active'],
'callerIdName': json['caller_id_name'] == null ? undefined : json['caller_id_name'],
'callerIdNumber': json['caller_id_number'] == null ? undefined : json['caller_id_number'],
'thinClientId': json['thin_client_id'] == null ? undefined : json['thin_client_id'],
'acl': json['acl'] == null ? undefined : json['acl'],
'channelLimit': json['channel_limit'] == null ? undefined : json['channel_limit'],
'permittedCountryCodes': json['permitted_country_codes'] == null ? undefined : json['permitted_country_codes'],
'musicOnHoldUrl': json['music_on_hold_url'] == null ? undefined : json['music_on_hold_url'],
};
}
export function SiteUpdateRequestToJSON(json: any): SiteUpdateRequest {
return SiteUpdateRequestToJSONTyped(json, false);
}
export function SiteUpdateRequestToJSONTyped(value?: SiteUpdateRequest | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'name': value['name'],
'dns_extension': value['dnsExtension'],
'active': value['active'],
'caller_id_name': value['callerIdName'],
'caller_id_number': value['callerIdNumber'],
'thin_client_id': value['thinClientId'],
'acl': value['acl'],
'channel_limit': value['channelLimit'],
'permitted_country_codes': value['permittedCountryCodes'],
'music_on_hold_url': value['musicOnHoldUrl'],
};
}