@ringer-tel/telique
Version:
TypeScript SDK for Ringer APIs
93 lines (82 loc) • 2.86 kB
text/typescript
/* 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 LrnResponse
*/
export interface LrnResponse {
/**
* The queried telephone number
* @type {string}
* @memberof LrnResponse
*/
phoneNumber: string;
/**
* Local Routing Number for the queried number
* @type {string}
* @memberof LrnResponse
*/
lrn: string;
/**
* Service Provider ID for the carrier serving this number
* @type {string}
* @memberof LrnResponse
*/
spid?: string | null;
/**
* Indicates whether the number has been ported (true) or not (false)
* @type {boolean}
* @memberof LrnResponse
*/
ported: boolean;
}
/**
* Check if a given object implements the LrnResponse interface.
*/
export function instanceOfLrnResponse(value: object): value is LrnResponse {
if (!('phoneNumber' in value) || value['phoneNumber'] === undefined) return false;
if (!('lrn' in value) || value['lrn'] === undefined) return false;
if (!('ported' in value) || value['ported'] === undefined) return false;
return true;
}
export function LrnResponseFromJSON(json: any): LrnResponse {
return LrnResponseFromJSONTyped(json, false);
}
export function LrnResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): LrnResponse {
if (json == null) {
return json;
}
return {
'phoneNumber': json['phoneNumber'],
'lrn': json['lrn'],
'spid': json['spid'] == null ? undefined : json['spid'],
'ported': json['ported'],
};
}
export function LrnResponseToJSON(json: any): LrnResponse {
return LrnResponseToJSONTyped(json, false);
}
export function LrnResponseToJSONTyped(value?: LrnResponse | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'phoneNumber': value['phoneNumber'],
'lrn': value['lrn'],
'spid': value['spid'],
'ported': value['ported'],
};
}