tuix-marketplace-api
Version:
This package facilitates the client request to tuix marketplace api
87 lines • 3.06 kB
JavaScript
;
/* tslint:disable */
/* eslint-disable */
/**
* Tuix Services
* Tuix Services API
*
* The version of the OpenAPI document: 1.0.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.instanceOfProductDTO = instanceOfProductDTO;
exports.ProductDTOFromJSON = ProductDTOFromJSON;
exports.ProductDTOFromJSONTyped = ProductDTOFromJSONTyped;
exports.ProductDTOToJSON = ProductDTOToJSON;
exports.ProductDTOToJSONTyped = ProductDTOToJSONTyped;
/**
* Check if a given object implements the ProductDTO interface.
*/
function instanceOfProductDTO(value) {
if (!('description' in value) || value['description'] === undefined)
return false;
if (!('name' in value) || value['name'] === undefined)
return false;
if (!('price' in value) || value['price'] === undefined)
return false;
if (!('sku' in value) || value['sku'] === undefined)
return false;
if (!('stock' in value) || value['stock'] === undefined)
return false;
if (!('weight' in value) || value['weight'] === undefined)
return false;
return true;
}
function ProductDTOFromJSON(json) {
return ProductDTOFromJSONTyped(json, false);
}
function ProductDTOFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'color': json['color'] == null ? undefined : json['color'],
'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
'description': json['description'],
'id': json['id'] == null ? undefined : json['id'],
'mainProductId': json['mainProductId'] == null ? undefined : json['mainProductId'],
'material': json['material'] == null ? undefined : json['material'],
'name': json['name'],
'price': json['price'],
'size': json['size'] == null ? undefined : json['size'],
'sku': json['sku'],
'stock': json['stock'],
'style': json['style'] == null ? undefined : json['style'],
'updatedAt': json['updatedAt'] == null ? undefined : json['updatedAt'],
'weight': json['weight'],
};
}
function ProductDTOToJSON(json) {
return ProductDTOToJSONTyped(json, false);
}
function ProductDTOToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'color': value['color'],
'createdAt': value['createdAt'],
'description': value['description'],
'id': value['id'],
'mainProductId': value['mainProductId'],
'material': value['material'],
'name': value['name'],
'price': value['price'],
'size': value['size'],
'sku': value['sku'],
'stock': value['stock'],
'style': value['style'],
'updatedAt': value['updatedAt'],
'weight': value['weight'],
};
}
//# sourceMappingURL=ProductDTO.js.map