channel3-sdk
Version:
The official TypeScript/JavaScript SDK for Channel3 AI Shopping API
95 lines • 3.69 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.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.ProductDetailGenderEnum = void 0;
exports.instanceOfProductDetail = instanceOfProductDetail;
exports.ProductDetailFromJSON = ProductDetailFromJSON;
exports.ProductDetailFromJSONTyped = ProductDetailFromJSONTyped;
exports.ProductDetailToJSON = ProductDetailToJSON;
exports.ProductDetailToJSONTyped = ProductDetailToJSONTyped;
const Variant_1 = require("./Variant");
const AvailabilityStatus_1 = require("./AvailabilityStatus");
const Price_1 = require("./Price");
/**
* @export
*/
exports.ProductDetailGenderEnum = {
male: 'male',
female: 'female',
unisex: 'unisex'
};
/**
* Check if a given object implements the ProductDetail interface.
*/
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;
}
function ProductDetailFromJSON(json) {
return ProductDetailFromJSONTyped(json, false);
}
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': (0, Price_1.PriceFromJSON)(json['price']),
'availability': (0, AvailabilityStatus_1.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(Variant_1.VariantFromJSON)),
};
}
function ProductDetailToJSON(json) {
return ProductDetailToJSONTyped(json, false);
}
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': (0, Price_1.PriceToJSON)(value['price']),
'availability': (0, AvailabilityStatus_1.AvailabilityStatusToJSON)(value['availability']),
'gender': value['gender'],
'materials': value['materials'],
'key_features': value['key_features'],
'variants': value['variants'] == null ? undefined : (value['variants'].map(Variant_1.VariantToJSON)),
};
}
//# sourceMappingURL=ProductDetail.js.map