UNPKG

@ringer-tel/ivy

Version:
127 lines (112 loc) 3.75 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'; /** * * @export * @interface CallBlockAttributes */ export interface CallBlockAttributes { /** * Name of the Call Block rule. * @type {string} * @memberof CallBlockAttributes */ name: string; /** * Phone number pattern to block. * @type {string} * @memberof CallBlockAttributes */ phoneNumber: string; /** * Direction of calls to block. * @type {string} * @memberof CallBlockAttributes */ direction?: CallBlockAttributesDirectionEnum; /** * * @type {string} * @memberof CallBlockAttributes */ status?: CallBlockAttributesStatusEnum; /** * Creation timestamp. * @type {Date} * @memberof CallBlockAttributes */ readonly createdAt?: Date; /** * Last update timestamp. * @type {Date} * @memberof CallBlockAttributes */ readonly updatedAt?: Date; } /** * @export */ export const CallBlockAttributesDirectionEnum = { Inbound: 'inbound', Outbound: 'outbound', Both: 'both' } as const; export type CallBlockAttributesDirectionEnum = typeof CallBlockAttributesDirectionEnum[keyof typeof CallBlockAttributesDirectionEnum]; /** * @export */ export const CallBlockAttributesStatusEnum = { Active: 'active', Inactive: 'inactive' } as const; export type CallBlockAttributesStatusEnum = typeof CallBlockAttributesStatusEnum[keyof typeof CallBlockAttributesStatusEnum]; /** * Check if a given object implements the CallBlockAttributes interface. */ export function instanceOfCallBlockAttributes(value: object): value is CallBlockAttributes { if (!('name' in value) || value['name'] === undefined) return false; if (!('phoneNumber' in value) || value['phoneNumber'] === undefined) return false; return true; } export function CallBlockAttributesFromJSON(json: any): CallBlockAttributes { return CallBlockAttributesFromJSONTyped(json, false); } export function CallBlockAttributesFromJSONTyped(json: any, ignoreDiscriminator: boolean): CallBlockAttributes { if (json == null) { return json; } return { 'name': json['name'], 'phoneNumber': json['phone_number'], 'direction': json['direction'] == null ? undefined : json['direction'], 'status': json['status'] == null ? undefined : json['status'], 'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])), 'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), }; } export function CallBlockAttributesToJSON(json: any): CallBlockAttributes { return CallBlockAttributesToJSONTyped(json, false); } export function CallBlockAttributesToJSONTyped(value?: Omit<CallBlockAttributes, 'created_at'|'updated_at'> | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'name': value['name'], 'phone_number': value['phoneNumber'], 'direction': value['direction'], 'status': value['status'], }; }