Refactored model/Price.
This commit is contained in:
parent
f2a0197648
commit
832681f186
|
|
@ -61,6 +61,7 @@ import { OfferCount } from "./model/OfferCount";
|
||||||
import { OfferPrice } from "./model/OfferPrice";
|
import { OfferPrice } from "./model/OfferPrice";
|
||||||
import { OfferSavings } from "./model/OfferSavings";
|
import { OfferSavings } from "./model/OfferSavings";
|
||||||
import { PartnerType } from "./model/PartnerType";
|
import { PartnerType } from "./model/PartnerType";
|
||||||
|
import { Price } from "./model/Price";
|
||||||
import { PriceType } from "./model/PriceType";
|
import { PriceType } from "./model/PriceType";
|
||||||
import { Properties } from "./model/Properties";
|
import { Properties } from "./model/Properties";
|
||||||
import { Rating } from "./model/Rating";
|
import { Rating } from "./model/Rating";
|
||||||
|
|
|
||||||
|
|
@ -21,25 +21,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function(root, factory) {
|
import { OfferPrice } from "./OfferPrice";
|
||||||
if (typeof define === 'function' && define.amd) {
|
|
||||||
// AMD. Register as an anonymous module.
|
|
||||||
define(['ApiClient', 'model/OfferPrice'], factory);
|
|
||||||
} else if (typeof module === 'object' && module.exports) {
|
|
||||||
// CommonJS-like environments that support module.exports, like Node.
|
|
||||||
module.exports = factory(require('../ApiClient'), require('./OfferPrice'));
|
|
||||||
} else {
|
|
||||||
// Browser globals (root is window)
|
|
||||||
if (!root.ProductAdvertisingAPIv1) {
|
|
||||||
root.ProductAdvertisingAPIv1 = {};
|
|
||||||
}
|
|
||||||
root.ProductAdvertisingAPIv1.Price = factory(root.ProductAdvertisingAPIv1.ApiClient, root.ProductAdvertisingAPIv1.OfferPrice);
|
|
||||||
}
|
|
||||||
}(this, function(ApiClient, OfferPrice) {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Price model module.
|
* The Price model module.
|
||||||
|
|
@ -52,12 +34,15 @@
|
||||||
* @alias module:model/Price
|
* @alias module:model/Price
|
||||||
* @class
|
* @class
|
||||||
*/
|
*/
|
||||||
var exports = function() {
|
export class Price {
|
||||||
var _this = this;
|
/**
|
||||||
|
* @member {module:model/OfferPrice} HighestPrice
|
||||||
|
*/
|
||||||
|
public HighestPrice?: OfferPrice;
|
||||||
};
|
/**
|
||||||
|
* @member {module:model/OfferPrice} LowestPrice
|
||||||
|
*/
|
||||||
|
public LowestPrice?: OfferPrice;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a <code>Price</code> from a plain JavaScript object, optionally creating a new instance.
|
* Constructs a <code>Price</code> from a plain JavaScript object, optionally creating a new instance.
|
||||||
|
|
@ -66,32 +51,17 @@
|
||||||
* @param {module:model/Price} obj Optional instance to populate.
|
* @param {module:model/Price} obj Optional instance to populate.
|
||||||
* @return {module:model/Price} The populated <code>Price</code> instance.
|
* @return {module:model/Price} The populated <code>Price</code> instance.
|
||||||
*/
|
*/
|
||||||
exports.constructFromObject = function(data, obj) {
|
public static constructFromObject(data: any, obj?: Price) {
|
||||||
if (data) {
|
if (data) {
|
||||||
obj = obj || new exports();
|
obj = obj || new Price();
|
||||||
|
|
||||||
if (data.hasOwnProperty('HighestPrice')) {
|
if (data.hasOwnProperty('HighestPrice')) {
|
||||||
obj['HighestPrice'] = OfferPrice.constructFromObject(data['HighestPrice']);
|
obj.HighestPrice = OfferPrice.constructFromObject(data['HighestPrice']);
|
||||||
}
|
}
|
||||||
if (data.hasOwnProperty('LowestPrice')) {
|
if (data.hasOwnProperty('LowestPrice')) {
|
||||||
obj['LowestPrice'] = OfferPrice.constructFromObject(data['LowestPrice']);
|
obj.LowestPrice = OfferPrice.constructFromObject(data['LowestPrice']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
};
|
||||||
/**
|
|
||||||
* @member {module:model/OfferPrice} HighestPrice
|
|
||||||
*/
|
|
||||||
exports.prototype['HighestPrice'] = undefined;
|
|
||||||
/**
|
|
||||||
* @member {module:model/OfferPrice} LowestPrice
|
|
||||||
*/
|
|
||||||
exports.prototype['LowestPrice'] = undefined;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return exports;
|
|
||||||
}));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user