@ringer-tel/ivy
Version:
TypeScript SDK for Ringer APIs
145 lines (134 loc) • 4.92 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';
/**
* Data for updating an existing location. All fields are typically resubmitted for a PUT.
* @export
* @interface LocationUpdateRequest
*/
export interface LocationUpdateRequest {
/**
* A user-friendly name for this location (e.g., "Main Building", "Floor 2 Office").
* @type {string}
* @memberof LocationUpdateRequest
*/
name: string;
/**
* The street number of the address.
* @type {string}
* @memberof LocationUpdateRequest
*/
houseNumber: string;
/**
* Suffix for the street number, if any (e.g., "A", "1/2").
* @type {string}
* @memberof LocationUpdateRequest
*/
houseNumberSuffix?: string | null;
/**
* The street name.
* @type {string}
* @memberof LocationUpdateRequest
*/
street: string;
/**
* The city name.
* @type {string}
* @memberof LocationUpdateRequest
*/
city: string;
/**
* The state or province code (e.g., "CO", "ON").
* @type {string}
* @memberof LocationUpdateRequest
*/
stateProvince: string;
/**
* The postal or ZIP code.
* @type {string}
* @memberof LocationUpdateRequest
*/
postalCode: string;
/**
* Two-letter ISO 3166-1 alpha-2 country code.
* @type {string}
* @memberof LocationUpdateRequest
*/
countryCode: string;
/**
* Caller ID name to be used for E911 calls originating from this location.
* @type {string}
* @memberof LocationUpdateRequest
*/
callerIdName?: string | null;
/**
* Indicates if E911 service is enabled for this location. Geocoding and validation occur upon setting this.
* @type {boolean}
* @memberof LocationUpdateRequest
*/
e911Enabled?: boolean;
}
/**
* Check if a given object implements the LocationUpdateRequest interface.
*/
export function instanceOfLocationUpdateRequest(value: object): value is LocationUpdateRequest {
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;
return true;
}
export function LocationUpdateRequestFromJSON(json: any): LocationUpdateRequest {
return LocationUpdateRequestFromJSONTyped(json, false);
}
export function LocationUpdateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): LocationUpdateRequest {
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'],
};
}
export function LocationUpdateRequestToJSON(json: any): LocationUpdateRequest {
return LocationUpdateRequestToJSONTyped(json, false);
}
export function LocationUpdateRequestToJSONTyped(value?: LocationUpdateRequest | 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'],
};
}