@ringer-tel/ivy
Version:
TypeScript SDK for Ringer APIs
106 lines (95 loc) • 3.65 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 call forward. Only provide fields to change.
* @export
* @interface ForwardUpdateRequest
*/
export interface ForwardUpdateRequest {
/**
* A user-friendly name for the forward configuration.
* @type {string}
* @memberof ForwardUpdateRequest
*/
name?: string | null;
/**
* The external phone number (E.164 format recommended) to which calls will be forwarded.
* @type {string}
* @memberof ForwardUpdateRequest
*/
destinationDialString?: string | null;
/**
* How long (in seconds) the forward will be attempted before failing over or disconnecting.
* @type {number}
* @memberof ForwardUpdateRequest
*/
timeout?: number | null;
/**
* Whether this call forward rule is currently active.
* @type {boolean}
* @memberof ForwardUpdateRequest
*/
active?: boolean | null;
/**
* System code for the destination if the forward attempt fails or times out.
* @type {string}
* @memberof ForwardUpdateRequest
*/
failOverDestinationCode?: string | null;
/**
* Optional. Identifier of the user primarily associated with this forward.
* @type {number}
* @memberof ForwardUpdateRequest
*/
userId?: number | null;
}
/**
* Check if a given object implements the ForwardUpdateRequest interface.
*/
export function instanceOfForwardUpdateRequest(value: object): value is ForwardUpdateRequest {
return true;
}
export function ForwardUpdateRequestFromJSON(json: any): ForwardUpdateRequest {
return ForwardUpdateRequestFromJSONTyped(json, false);
}
export function ForwardUpdateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ForwardUpdateRequest {
if (json == null) {
return json;
}
return {
'name': json['name'] == null ? undefined : json['name'],
'destinationDialString': json['destination_dial_string'] == null ? undefined : 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 ForwardUpdateRequestToJSON(json: any): ForwardUpdateRequest {
return ForwardUpdateRequestToJSONTyped(json, false);
}
export function ForwardUpdateRequestToJSONTyped(value?: ForwardUpdateRequest | 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'],
};
}