@ringer-tel/ivy
Version:
TypeScript SDK for Ringer APIs
101 lines (89 loc) • 3.58 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';
import type { CallRecordsComponentsSchemasErrorDetailsInner } from './CallRecordsComponentsSchemasErrorDetailsInner';
import {
CallRecordsComponentsSchemasErrorDetailsInnerFromJSON,
CallRecordsComponentsSchemasErrorDetailsInnerFromJSONTyped,
CallRecordsComponentsSchemasErrorDetailsInnerToJSON,
CallRecordsComponentsSchemasErrorDetailsInnerToJSONTyped,
} from './CallRecordsComponentsSchemasErrorDetailsInner';
/**
* Standard error response format.
* @export
* @interface ExtensionComponentsSchemasError
*/
export interface ExtensionComponentsSchemasError {
/**
*
* @type {string}
* @memberof ExtensionComponentsSchemasError
*/
status: string;
/**
*
* @type {string}
* @memberof ExtensionComponentsSchemasError
*/
error: string;
/**
*
* @type {string}
* @memberof ExtensionComponentsSchemasError
*/
errorCode: string;
/**
*
* @type {Array<CallRecordsComponentsSchemasErrorDetailsInner>}
* @memberof ExtensionComponentsSchemasError
*/
details?: Array<CallRecordsComponentsSchemasErrorDetailsInner> | null;
}
/**
* Check if a given object implements the ExtensionComponentsSchemasError interface.
*/
export function instanceOfExtensionComponentsSchemasError(value: object): value is ExtensionComponentsSchemasError {
if (!('status' in value) || value['status'] === undefined) return false;
if (!('error' in value) || value['error'] === undefined) return false;
if (!('errorCode' in value) || value['errorCode'] === undefined) return false;
return true;
}
export function ExtensionComponentsSchemasErrorFromJSON(json: any): ExtensionComponentsSchemasError {
return ExtensionComponentsSchemasErrorFromJSONTyped(json, false);
}
export function ExtensionComponentsSchemasErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExtensionComponentsSchemasError {
if (json == null) {
return json;
}
return {
'status': json['status'],
'error': json['error'],
'errorCode': json['error_code'],
'details': json['details'] == null ? undefined : ((json['details'] as Array<any>).map(CallRecordsComponentsSchemasErrorDetailsInnerFromJSON)),
};
}
export function ExtensionComponentsSchemasErrorToJSON(json: any): ExtensionComponentsSchemasError {
return ExtensionComponentsSchemasErrorToJSONTyped(json, false);
}
export function ExtensionComponentsSchemasErrorToJSONTyped(value?: ExtensionComponentsSchemasError | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'status': value['status'],
'error': value['error'],
'error_code': value['errorCode'],
'details': value['details'] == null ? undefined : ((value['details'] as Array<any>).map(CallRecordsComponentsSchemasErrorDetailsInnerToJSON)),
};
}