UNPKG

@ringer-tel/ivy

Version:
108 lines (97 loc) 3.68 kB
/* 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 required to create a new call forward. * @export * @interface ForwardCreateRequest */ export interface ForwardCreateRequest { /** * A user-friendly name for the forward configuration. * @type {string} * @memberof ForwardCreateRequest */ name: string; /** * The external phone number (E.164 format recommended) to which calls will be forwarded. * @type {string} * @memberof ForwardCreateRequest */ destinationDialString: string; /** * How long (in seconds) the forward will be attempted before failing over or disconnecting. * @type {number} * @memberof ForwardCreateRequest */ timeout?: number; /** * Whether this call forward rule is currently active. * @type {boolean} * @memberof ForwardCreateRequest */ active?: boolean; /** * System code for the destination if the forward attempt fails or times out. * @type {string} * @memberof ForwardCreateRequest */ failOverDestinationCode?: string | null; /** * Optional. Identifier of the user primarily associated with this forward. * @type {number} * @memberof ForwardCreateRequest */ userId?: number | null; } /** * Check if a given object implements the ForwardCreateRequest interface. */ export function instanceOfForwardCreateRequest(value: object): value is ForwardCreateRequest { if (!('name' in value) || value['name'] === undefined) return false; if (!('destinationDialString' in value) || value['destinationDialString'] === undefined) return false; return true; } export function ForwardCreateRequestFromJSON(json: any): ForwardCreateRequest { return ForwardCreateRequestFromJSONTyped(json, false); } export function ForwardCreateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ForwardCreateRequest { if (json == null) { return json; } return { 'name': json['name'], 'destinationDialString': json['destination_dial_string'], 'timeout': json['timeout'] == null ? undefined : json['timeout'], 'active': json['active'] == null ? undefined : json['active'], 'failOverDestinationCode': json['fail_over_destination_code'] == null ? undefined : json['fail_over_destination_code'], 'userId': json['user_id'] == null ? undefined : json['user_id'], }; } export function ForwardCreateRequestToJSON(json: any): ForwardCreateRequest { return ForwardCreateRequestToJSONTyped(json, false); } export function ForwardCreateRequestToJSONTyped(value?: ForwardCreateRequest | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'name': value['name'], 'destination_dial_string': value['destinationDialString'], 'timeout': value['timeout'], 'active': value['active'], 'fail_over_destination_code': value['failOverDestinationCode'], 'user_id': value['userId'], }; }