UNPKG

@ringer-tel/telique

Version:
84 lines (73 loc) 2.47 kB
/* tslint:disable */ /* eslint-disable */ /** * Telique API * The Ringer Telique API provides access to telecommunications data, including caller name (CNAM) data, line type information, and more. The API also includes services for checking phone numbers against Do Not Originate (DNO) and Do Not Call (DNC) databases, as well as STIR/SHAKEN call authentication validation. ## Authentication This API uses IP whitelist authentication. Your server\'s IP address must be registered with Ringer before making API calls. Contact support@ringer.tel to register your IP address. * * The version of the OpenAPI document: 1.0.18 * 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 ModelError */ export interface ModelError { /** * Error status * @type {string} * @memberof ModelError */ status: string; /** * Error message * @type {string} * @memberof ModelError */ error: string; /** * Error code for machine processing * @type {string} * @memberof ModelError */ errorCode?: string; } /** * Check if a given object implements the ModelError interface. */ export function instanceOfModelError(value: object): value is ModelError { if (!('status' in value) || value['status'] === undefined) return false; if (!('error' in value) || value['error'] === undefined) return false; return true; } export function ModelErrorFromJSON(json: any): ModelError { return ModelErrorFromJSONTyped(json, false); } export function ModelErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelError { if (json == null) { return json; } return { 'status': json['status'], 'error': json['error'], 'errorCode': json['error_code'] == null ? undefined : json['error_code'], }; } export function ModelErrorToJSON(json: any): ModelError { return ModelErrorToJSONTyped(json, false); } export function ModelErrorToJSONTyped(value?: ModelError | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'status': value['status'], 'error': value['error'], 'error_code': value['errorCode'], }; }