@ringer-tel/ivy
Version:
TypeScript SDK for Ringer APIs
90 lines (79 loc) • 2.64 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';
/**
* Specifies the fields that can be updated for an item.
* @export
* @interface ItemUpdateRequest
*/
export interface ItemUpdateRequest {
/**
* New name for the item.
* @type {string}
* @memberof ItemUpdateRequest
*/
name?: string;
/**
* New price for the item.
* @type {string}
* @memberof ItemUpdateRequest
*/
itemPrice?: string;
/**
* Updated tax category identifier.
* @type {number}
* @memberof ItemUpdateRequest
*/
taxCategory?: number | null;
/**
* Updated tax code.
* @type {number}
* @memberof ItemUpdateRequest
*/
taxCode?: number | null;
}
/**
* Check if a given object implements the ItemUpdateRequest interface.
*/
export function instanceOfItemUpdateRequest(value: object): value is ItemUpdateRequest {
return true;
}
export function ItemUpdateRequestFromJSON(json: any): ItemUpdateRequest {
return ItemUpdateRequestFromJSONTyped(json, false);
}
export function ItemUpdateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ItemUpdateRequest {
if (json == null) {
return json;
}
return {
'name': json['name'] == null ? undefined : json['name'],
'itemPrice': json['item_price'] == null ? undefined : json['item_price'],
'taxCategory': json['tax_category'] == null ? undefined : json['tax_category'],
'taxCode': json['tax_code'] == null ? undefined : json['tax_code'],
};
}
export function ItemUpdateRequestToJSON(json: any): ItemUpdateRequest {
return ItemUpdateRequestToJSONTyped(json, false);
}
export function ItemUpdateRequestToJSONTyped(value?: ItemUpdateRequest | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'name': value['name'],
'item_price': value['itemPrice'],
'tax_category': value['taxCategory'],
'tax_code': value['taxCode'],
};
}