channel3-sdk
Version:
The official TypeScript/JavaScript SDK for Channel3 AI Shopping API
87 lines • 3.3 kB
JavaScript
/* tslint:disable */
/* eslint-disable */
/**
* FastAPI
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { VariantFromJSON, VariantToJSON, } from './Variant';
import { AvailabilityStatusFromJSON, AvailabilityStatusToJSON, } from './AvailabilityStatus';
import { PriceFromJSON, PriceToJSON, } from './Price';
/**
* @export
*/
export const ProductDetailGenderEnum = {
male: 'male',
female: 'female',
unisex: 'unisex'
};
/**
* Check if a given object implements the ProductDetail interface.
*/
export function instanceOfProductDetail(value) {
if (!('id' in value) || value['id'] === undefined)
return false;
if (!('url' in value) || value['url'] === undefined)
return false;
if (!('title' in value) || value['title'] === undefined)
return false;
if (!('price' in value) || value['price'] === undefined)
return false;
if (!('availability' in value) || value['availability'] === undefined)
return false;
return true;
}
export function ProductDetailFromJSON(json) {
return ProductDetailFromJSONTyped(json, false);
}
export function ProductDetailFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'id': json['id'],
'url': json['url'],
'title': json['title'],
'description': json['description'] == null ? undefined : json['description'],
'brand_id': json['brand_id'] == null ? undefined : json['brand_id'],
'brand_name': json['brand_name'] == null ? undefined : json['brand_name'],
'image_urls': json['image_urls'] == null ? undefined : json['image_urls'],
'price': PriceFromJSON(json['price']),
'availability': AvailabilityStatusFromJSON(json['availability']),
'gender': json['gender'] == null ? undefined : json['gender'],
'materials': json['materials'] == null ? undefined : json['materials'],
'key_features': json['key_features'] == null ? undefined : json['key_features'],
'variants': json['variants'] == null ? undefined : (json['variants'].map(VariantFromJSON)),
};
}
export function ProductDetailToJSON(json) {
return ProductDetailToJSONTyped(json, false);
}
export function ProductDetailToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'id': value['id'],
'url': value['url'],
'title': value['title'],
'description': value['description'],
'brand_id': value['brand_id'],
'brand_name': value['brand_name'],
'image_urls': value['image_urls'],
'price': PriceToJSON(value['price']),
'availability': AvailabilityStatusToJSON(value['availability']),
'gender': value['gender'],
'materials': value['materials'],
'key_features': value['key_features'],
'variants': value['variants'] == null ? undefined : (value['variants'].map(VariantToJSON)),
};
}
//# sourceMappingURL=ProductDetail.js.map