Refactored model/CustomerReviews.

This commit is contained in:
David Ball 2024-07-17 21:40:02 -04:00
parent 2f9d2264fa
commit 99665a01e5
2 changed files with 24 additions and 52 deletions

View File

@ -37,6 +37,7 @@ import { Condition } from "./model/Condition";
import { ContentInfo } from "./model/ContentInfo"; import { ContentInfo } from "./model/ContentInfo";
import { ContentRating } from "./model/ContentRating"; import { ContentRating } from "./model/ContentRating";
import { Contributor } from "./model/Contributor"; import { Contributor } from "./model/Contributor";
import { CustomerReviews } from "./model/CustomerReviews";
import { Languages } from "./model/Languages"; import { Languages } from "./model/Languages";
import { LanguageType } from "./model/LanguageType"; import { LanguageType } from "./model/LanguageType";
import { OfferSavings } from "./model/OfferSavings"; import { OfferSavings } from "./model/OfferSavings";

View File

@ -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. * The CustomerReviews model module.
* @module model/CustomerReviews * @module model/CustomerReviews
* @version 1.0.0 * @version 1.0.0
*/ */
import { ApiClient } from "../ApiClient";
import { Rating } from "./Rating";
/** /**
* Constructs a new <code>CustomerReviews</code>. * Constructs a new <code>CustomerReviews</code>.
* @alias module:model/CustomerReviews * @alias module:model/CustomerReviews
* @class * @class
*/ */
var exports = function() { export class CustomerReviews {
var _this = this; /**
* @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. * 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. * @param {module:model/CustomerReviews} obj Optional instance to populate.
* @return {module:model/CustomerReviews} The populated <code>CustomerReviews</code> instance. * @return {module:model/CustomerReviews} The populated <code>CustomerReviews</code> instance.
*/ */
exports.constructFromObject = function(data, obj) { public static constructFromObject(data: any, obj?: CustomerReviews) {
if (data) { if (data) {
obj = obj || new exports(); obj = obj || new CustomerReviews();
if (data.hasOwnProperty('Count')) { if (data.hasOwnProperty('Count')) {
obj['Count'] = ApiClient.convertToType(data['Count'], 'Number'); obj.Count = ApiClient.convertToType(data['Count'], 'Number');
} }
if (data.hasOwnProperty('StarRating')) { if (data.hasOwnProperty('StarRating')) {
obj['StarRating'] = Rating.constructFromObject(data['StarRating']); obj.StarRating = Rating.constructFromObject(data['StarRating']);
} }
} }
return obj; return obj;
} }
};
/**
* @member {Number} Count
*/
exports.prototype['Count'] = undefined;
/**
* @member {module:model/Rating} StarRating
*/
exports.prototype['StarRating'] = undefined;
return exports;
}));