Refactored model/Price.

This commit is contained in:
David Ball 2024-07-17 23:52:27 -04:00
parent f2a0197648
commit 832681f186
2 changed files with 22 additions and 51 deletions

View File

@ -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";

View File

@ -21,43 +21,28 @@
* *
*/ */
(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.
* @module model/Price
* @version 1.0.0
*/
/**
* Constructs a new <code>Price</code>.
* @alias module:model/Price
* @class
*/
export class Price {
/** /**
* The Price model module. * @member {module:model/OfferPrice} HighestPrice
* @module model/Price
* @version 1.0.0
*/ */
public HighestPrice?: OfferPrice;
/** /**
* Constructs a new <code>Price</code>. * @member {module:model/OfferPrice} LowestPrice
* @alias module:model/Price
* @class
*/ */
var exports = function() { public LowestPrice?: OfferPrice;
var _this = this;
};
/** /**
* 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;
}));