Refactored model/Rating.
This commit is contained in:
parent
9385da795d
commit
2f9d2264fa
|
|
@ -41,6 +41,7 @@ import { Languages } from "./model/Languages";
|
|||
import { LanguageType } from "./model/LanguageType";
|
||||
import { OfferSavings } from "./model/OfferSavings";
|
||||
import { PriceType } from "./model/PriceType";
|
||||
import { Rating } from "./model/Rating";
|
||||
import { SingleBooleanValuedAttribute } from "./model/SingleBooleanValuedAttribute";
|
||||
import { SingleIntegerValuedAttribute } from "./model/SingleIntegerValuedAttribute";
|
||||
import { SingleStringValuedAttribute } from "./model/SingleStringValuedAttribute";
|
||||
|
|
|
|||
|
|
@ -21,43 +21,25 @@
|
|||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['ApiClient'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
module.exports = factory(require('../ApiClient'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
if (!root.ProductAdvertisingAPIv1) {
|
||||
root.ProductAdvertisingAPIv1 = {};
|
||||
}
|
||||
root.ProductAdvertisingAPIv1.Rating = factory(root.ProductAdvertisingAPIv1.ApiClient);
|
||||
}
|
||||
}(this, function(ApiClient) {
|
||||
'use strict';
|
||||
|
||||
|
||||
/**
|
||||
* The Rating model module.
|
||||
* @module model/Rating
|
||||
* @version 1.0.0
|
||||
*/
|
||||
|
||||
import { ApiClient } from "../ApiClient";
|
||||
|
||||
/**
|
||||
* Constructs a new <code>Rating</code>.
|
||||
* @alias module:model/Rating
|
||||
* @class
|
||||
*/
|
||||
export class Rating {
|
||||
/**
|
||||
* The Rating model module.
|
||||
* @module model/Rating
|
||||
* @version 1.0.0
|
||||
* @member {Number} Value
|
||||
*/
|
||||
|
||||
/**
|
||||
* Constructs a new <code>Rating</code>.
|
||||
* @alias module:model/Rating
|
||||
* @class
|
||||
*/
|
||||
var exports = function() {
|
||||
var _this = this;
|
||||
|
||||
|
||||
};
|
||||
|
||||
public Value?: number;
|
||||
|
||||
/**
|
||||
* Constructs a <code>Rating</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
|
|
@ -65,25 +47,15 @@
|
|||
* @param {module:model/Rating} obj Optional instance to populate.
|
||||
* @return {module:model/Rating} The populated <code>Rating</code> instance.
|
||||
*/
|
||||
exports.constructFromObject = function(data, obj) {
|
||||
public static constructFromObject(data: any, obj?: Rating) {
|
||||
if (data) {
|
||||
obj = obj || new exports();
|
||||
obj = obj || new Rating();
|
||||
|
||||
if (data.hasOwnProperty('Value')) {
|
||||
obj['Value'] = ApiClient.convertToType(data['Value'], 'Number');
|
||||
obj.Value = ApiClient.convertToType(data['Value'], 'Number');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {Number} Value
|
||||
*/
|
||||
exports.prototype['Value'] = undefined;
|
||||
|
||||
|
||||
|
||||
return exports;
|
||||
}));
|
||||
|
||||
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user