@ringer-tel/ivy
Version:
TypeScript SDK for Ringer APIs
93 lines (81 loc) • 2.9 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';
import type { ExtensionCoreDestination } from './ExtensionCoreDestination';
import {
ExtensionCoreDestinationFromJSON,
ExtensionCoreDestinationFromJSONTyped,
ExtensionCoreDestinationToJSON,
ExtensionCoreDestinationToJSONTyped,
} from './ExtensionCoreDestination';
/**
* Data required to create a new extension.
* @export
* @interface ExtensionRequest
*/
export interface ExtensionRequest {
/**
* Extension number (e.g., "1001", "*123"). Typically 2-12 digits.
* @type {string}
* @memberof ExtensionRequest
*/
number: string;
/**
* A user-friendly name for the extension (e.g., "Sales Hotline", "John Doe").
* @type {string}
* @memberof ExtensionRequest
*/
name: string;
/**
*
* @type {ExtensionCoreDestination}
* @memberof ExtensionRequest
*/
destination: ExtensionCoreDestination;
}
/**
* Check if a given object implements the ExtensionRequest interface.
*/
export function instanceOfExtensionRequest(value: object): value is ExtensionRequest {
if (!('number' in value) || value['number'] === undefined) return false;
if (!('name' in value) || value['name'] === undefined) return false;
if (!('destination' in value) || value['destination'] === undefined) return false;
return true;
}
export function ExtensionRequestFromJSON(json: any): ExtensionRequest {
return ExtensionRequestFromJSONTyped(json, false);
}
export function ExtensionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExtensionRequest {
if (json == null) {
return json;
}
return {
'number': json['number'],
'name': json['name'],
'destination': ExtensionCoreDestinationFromJSON(json['destination']),
};
}
export function ExtensionRequestToJSON(json: any): ExtensionRequest {
return ExtensionRequestToJSONTyped(json, false);
}
export function ExtensionRequestToJSONTyped(value?: ExtensionRequest | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'number': value['number'],
'name': value['name'],
'destination': ExtensionCoreDestinationToJSON(value['destination']),
};
}