UNPKG

@ringer-tel/ivy

Version:
208 lines (196 loc) 6.8 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'; import type { Link } from './Link'; import { LinkFromJSON, LinkFromJSONTyped, LinkToJSON, LinkToJSONTyped, } from './Link'; /** * Detailed information about a site location. * @export * @interface LocationResponse */ export interface LocationResponse { /** * A user-friendly name for this location (e.g., "Main Building", "Floor 2 Office"). * @type {string} * @memberof LocationResponse */ name: string; /** * The street number of the address. * @type {string} * @memberof LocationResponse */ houseNumber: string; /** * Suffix for the street number, if any (e.g., "A", "1/2"). * @type {string} * @memberof LocationResponse */ houseNumberSuffix?: string | null; /** * The street name. * @type {string} * @memberof LocationResponse */ street: string; /** * The city name. * @type {string} * @memberof LocationResponse */ city: string; /** * The state or province code (e.g., "CO", "ON"). * @type {string} * @memberof LocationResponse */ stateProvince: string; /** * The postal or ZIP code. * @type {string} * @memberof LocationResponse */ postalCode: string; /** * Two-letter ISO 3166-1 alpha-2 country code. * @type {string} * @memberof LocationResponse */ countryCode: string; /** * Caller ID name to be used for E911 calls originating from this location. * @type {string} * @memberof LocationResponse */ callerIdName?: string | null; /** * Indicates if E911 service is enabled for this location. Geocoding and validation occur upon setting this. * @type {boolean} * @memberof LocationResponse */ e911Enabled?: boolean; /** * Unique identifier for the location record. * @type {number} * @memberof LocationResponse */ id: number; /** * Identifier of the site this location belongs to. * @type {number} * @memberof LocationResponse */ siteId: number; /** * Identifier of the associated E911 record/validation, if e911_enabled is true. * @type {number} * @memberof LocationResponse */ e911Id?: number | null; /** * Identifier of the user who last updated this location. * @type {string} * @memberof LocationResponse */ readonly updatedBy?: string | null; /** * * @type {string} * @memberof LocationResponse */ readonly latitude?: string | null; /** * * @type {string} * @memberof LocationResponse */ readonly longitude?: string | null; /** * HATEOAS links related to this location. * @type {Array<Link>} * @memberof LocationResponse */ links?: Array<Link> | null; } /** * Check if a given object implements the LocationResponse interface. */ export function instanceOfLocationResponse(value: object): value is LocationResponse { if (!('name' in value) || value['name'] === undefined) return false; if (!('houseNumber' in value) || value['houseNumber'] === undefined) return false; if (!('street' in value) || value['street'] === undefined) return false; if (!('city' in value) || value['city'] === undefined) return false; if (!('stateProvince' in value) || value['stateProvince'] === undefined) return false; if (!('postalCode' in value) || value['postalCode'] === undefined) return false; if (!('countryCode' in value) || value['countryCode'] === undefined) return false; if (!('id' in value) || value['id'] === undefined) return false; if (!('siteId' in value) || value['siteId'] === undefined) return false; return true; } export function LocationResponseFromJSON(json: any): LocationResponse { return LocationResponseFromJSONTyped(json, false); } export function LocationResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): LocationResponse { if (json == null) { return json; } return { 'name': json['name'], 'houseNumber': json['house_number'], 'houseNumberSuffix': json['house_number_suffix'] == null ? undefined : json['house_number_suffix'], 'street': json['street'], 'city': json['city'], 'stateProvince': json['state_province'], 'postalCode': json['postal_code'], 'countryCode': json['country_code'], 'callerIdName': json['caller_id_name'] == null ? undefined : json['caller_id_name'], 'e911Enabled': json['e911_enabled'] == null ? undefined : json['e911_enabled'], 'id': json['id'], 'siteId': json['site_id'], 'e911Id': json['e911_id'] == null ? undefined : json['e911_id'], 'updatedBy': json['updated_by'] == null ? undefined : json['updated_by'], 'latitude': json['latitude'] == null ? undefined : json['latitude'], 'longitude': json['longitude'] == null ? undefined : json['longitude'], 'links': json['links'] == null ? undefined : ((json['links'] as Array<any>).map(LinkFromJSON)), }; } export function LocationResponseToJSON(json: any): LocationResponse { return LocationResponseToJSONTyped(json, false); } export function LocationResponseToJSONTyped(value?: Omit<LocationResponse, 'updated_by'|'latitude'|'longitude'> | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'name': value['name'], 'house_number': value['houseNumber'], 'house_number_suffix': value['houseNumberSuffix'], 'street': value['street'], 'city': value['city'], 'state_province': value['stateProvince'], 'postal_code': value['postalCode'], 'country_code': value['countryCode'], 'caller_id_name': value['callerIdName'], 'e911_enabled': value['e911Enabled'], 'id': value['id'], 'site_id': value['siteId'], 'e911_id': value['e911Id'], 'links': value['links'] == null ? undefined : ((value['links'] as Array<any>).map(LinkToJSON)), }; }