@ringer-tel/ivy
Version:
TypeScript SDK for Ringer APIs
151 lines (139 loc) • 4.84 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 { SchemasLink } from './SchemasLink';
import {
SchemasLinkFromJSON,
SchemasLinkFromJSONTyped,
SchemasLinkToJSON,
SchemasLinkToJSONTyped,
} from './SchemasLink';
/**
* Detailed information about a billable item or feature.
* @export
* @interface ItemResponse
*/
export interface ItemResponse {
/**
* Unique identifier for the item.
* @type {number}
* @memberof ItemResponse
*/
id: number;
/**
* The human-readable name of the item or feature.
* @type {string}
* @memberof ItemResponse
*/
name: string;
/**
* The general category or type of the item (e.g., cdr, service_fee, feature_license).
* @type {string}
* @memberof ItemResponse
*/
itemType: string;
/**
* Specific rules or sub-classification for the item type that might affect rating or behavior.
* @type {string}
* @memberof ItemResponse
*/
itemRules?: string | null;
/**
* The price of this individual item (e.g., per unit, per month).
* @type {string}
* @memberof ItemResponse
*/
itemPrice: string;
/**
* Three-letter ISO currency code for the item price.
* @type {string}
* @memberof ItemResponse
*/
currency: string;
/**
* Identifier of the price deck this item pricing might belong to.
* @type {number}
* @memberof ItemResponse
*/
priceDeckId?: number | null;
/**
* Identifier for the tax category applicable to this item.
* @type {number}
* @memberof ItemResponse
*/
taxCategory?: number | null;
/**
* Specific tax code applicable to this item.
* @type {number}
* @memberof ItemResponse
*/
taxCode?: number | null;
/**
* HATEOAS links related to this item.
* @type {Array<SchemasLink>}
* @memberof ItemResponse
*/
links?: Array<SchemasLink> | null;
}
/**
* Check if a given object implements the ItemResponse interface.
*/
export function instanceOfItemResponse(value: object): value is ItemResponse {
if (!('id' in value) || value['id'] === undefined) return false;
if (!('name' in value) || value['name'] === undefined) return false;
if (!('itemType' in value) || value['itemType'] === undefined) return false;
if (!('itemPrice' in value) || value['itemPrice'] === undefined) return false;
if (!('currency' in value) || value['currency'] === undefined) return false;
return true;
}
export function ItemResponseFromJSON(json: any): ItemResponse {
return ItemResponseFromJSONTyped(json, false);
}
export function ItemResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ItemResponse {
if (json == null) {
return json;
}
return {
'id': json['id'],
'name': json['name'],
'itemType': json['item_type'],
'itemRules': json['item_rules'] == null ? undefined : json['item_rules'],
'itemPrice': json['item_price'],
'currency': json['currency'],
'priceDeckId': json['price_deck_id'] == null ? undefined : json['price_deck_id'],
'taxCategory': json['tax_category'] == null ? undefined : json['tax_category'],
'taxCode': json['tax_code'] == null ? undefined : json['tax_code'],
'links': json['links'] == null ? undefined : ((json['links'] as Array<any>).map(SchemasLinkFromJSON)),
};
}
export function ItemResponseToJSON(json: any): ItemResponse {
return ItemResponseToJSONTyped(json, false);
}
export function ItemResponseToJSONTyped(value?: ItemResponse | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'name': value['name'],
'item_type': value['itemType'],
'item_rules': value['itemRules'],
'item_price': value['itemPrice'],
'currency': value['currency'],
'price_deck_id': value['priceDeckId'],
'tax_category': value['taxCategory'],
'tax_code': value['taxCode'],
'links': value['links'] == null ? undefined : ((value['links'] as Array<any>).map(SchemasLinkToJSON)),
};
}