@ringer-tel/ivy
Version:
TypeScript SDK for Ringer APIs
92 lines (81 loc) • 3.1 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';
/**
*
* @export
* @interface CallBlockCore
*/
export interface CallBlockCore {
/**
* The phone number (or pattern) to block. E.164 format recommended for specific numbers.
* @type {string}
* @memberof CallBlockCore
*/
numberToBlock: string;
/**
* If true, calls from the number are blocked to all extensions on the site. If false, `applicable_extensions` must be specified.
* @type {boolean}
* @memberof CallBlockCore
*/
blockAllExtensions: boolean;
/**
* A list of specific extension identifiers (e.g., device codes, extension numbers) to which this block applies. Used if `block_all_extensions` is false.
* @type {Array<string>}
* @memberof CallBlockCore
*/
applicableExtensions?: Array<string> | null;
/**
* Optional notes or reason for this call block rule.
* @type {string}
* @memberof CallBlockCore
*/
notes?: string | null;
}
/**
* Check if a given object implements the CallBlockCore interface.
*/
export function instanceOfCallBlockCore(value: object): value is CallBlockCore {
if (!('numberToBlock' in value) || value['numberToBlock'] === undefined) return false;
if (!('blockAllExtensions' in value) || value['blockAllExtensions'] === undefined) return false;
return true;
}
export function CallBlockCoreFromJSON(json: any): CallBlockCore {
return CallBlockCoreFromJSONTyped(json, false);
}
export function CallBlockCoreFromJSONTyped(json: any, ignoreDiscriminator: boolean): CallBlockCore {
if (json == null) {
return json;
}
return {
'numberToBlock': json['number_to_block'],
'blockAllExtensions': json['block_all_extensions'],
'applicableExtensions': json['applicable_extensions'] == null ? undefined : json['applicable_extensions'],
'notes': json['notes'] == null ? undefined : json['notes'],
};
}
export function CallBlockCoreToJSON(json: any): CallBlockCore {
return CallBlockCoreToJSONTyped(json, false);
}
export function CallBlockCoreToJSONTyped(value?: CallBlockCore | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'number_to_block': value['numberToBlock'],
'block_all_extensions': value['blockAllExtensions'],
'applicable_extensions': value['applicableExtensions'],
'notes': value['notes'],
};
}