Refactored model/CustomerReviews.
This commit is contained in:
parent
2f9d2264fa
commit
99665a01e5
|
|
@ -37,6 +37,7 @@ import { Condition } from "./model/Condition";
|
|||
import { ContentInfo } from "./model/ContentInfo";
|
||||
import { ContentRating } from "./model/ContentRating";
|
||||
import { Contributor } from "./model/Contributor";
|
||||
import { CustomerReviews } from "./model/CustomerReviews";
|
||||
import { Languages } from "./model/Languages";
|
||||
import { LanguageType } from "./model/LanguageType";
|
||||
import { OfferSavings } from "./model/OfferSavings";
|
||||
|
|
|
|||
|
|
@ -21,43 +21,29 @@
|
|||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['ApiClient', 'model/Rating'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
module.exports = factory(require('../ApiClient'), require('./Rating'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
if (!root.ProductAdvertisingAPIv1) {
|
||||
root.ProductAdvertisingAPIv1 = {};
|
||||
}
|
||||
root.ProductAdvertisingAPIv1.CustomerReviews = factory(root.ProductAdvertisingAPIv1.ApiClient, root.ProductAdvertisingAPIv1.Rating);
|
||||
}
|
||||
}(this, function(ApiClient, Rating) {
|
||||
'use strict';
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* The CustomerReviews model module.
|
||||
* @module model/CustomerReviews
|
||||
* @version 1.0.0
|
||||
*/
|
||||
|
||||
import { ApiClient } from "../ApiClient";
|
||||
import { Rating } from "./Rating";
|
||||
|
||||
/**
|
||||
* Constructs a new <code>CustomerReviews</code>.
|
||||
* @alias module:model/CustomerReviews
|
||||
* @class
|
||||
*/
|
||||
var exports = function() {
|
||||
var _this = this;
|
||||
|
||||
|
||||
|
||||
};
|
||||
export class CustomerReviews {
|
||||
/**
|
||||
* @member {Number} Count
|
||||
*/
|
||||
public Count?: number;
|
||||
/**
|
||||
* @member {module:model/Rating} StarRating
|
||||
*/
|
||||
public StarRating?: Rating;
|
||||
|
||||
/**
|
||||
* Constructs a <code>CustomerReviews</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
|
|
@ -66,32 +52,17 @@
|
|||
* @param {module:model/CustomerReviews} obj Optional instance to populate.
|
||||
* @return {module:model/CustomerReviews} The populated <code>CustomerReviews</code> instance.
|
||||
*/
|
||||
exports.constructFromObject = function(data, obj) {
|
||||
public static constructFromObject(data: any, obj?: CustomerReviews) {
|
||||
if (data) {
|
||||
obj = obj || new exports();
|
||||
obj = obj || new CustomerReviews();
|
||||
|
||||
if (data.hasOwnProperty('Count')) {
|
||||
obj['Count'] = ApiClient.convertToType(data['Count'], 'Number');
|
||||
obj.Count = ApiClient.convertToType(data['Count'], 'Number');
|
||||
}
|
||||
if (data.hasOwnProperty('StarRating')) {
|
||||
obj['StarRating'] = Rating.constructFromObject(data['StarRating']);
|
||||
obj.StarRating = Rating.constructFromObject(data['StarRating']);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {Number} Count
|
||||
*/
|
||||
exports.prototype['Count'] = undefined;
|
||||
/**
|
||||
* @member {module:model/Rating} StarRating
|
||||
*/
|
||||
exports.prototype['StarRating'] = undefined;
|
||||
|
||||
|
||||
|
||||
return exports;
|
||||
}));
|
||||
|
||||
|
||||
};
|
||||
Loading…
Reference in New Issue
Block a user