Refactored model/TradeInPrice.

This commit is contained in:
David Ball 2024-07-17 23:57:20 -04:00
parent 9fda72d3c0
commit 29d1079d02
2 changed files with 28 additions and 58 deletions

View File

@ -71,6 +71,7 @@ import { SearchRefinements } from "./model/SearchRefinements";
import { SingleBooleanValuedAttribute } from "./model/SingleBooleanValuedAttribute";
import { SingleIntegerValuedAttribute } from "./model/SingleIntegerValuedAttribute";
import { SingleStringValuedAttribute } from "./model/SingleStringValuedAttribute";
import { TradeInPrice } from "./model/TradeInPrice";
import { UnitBasedAttribute } from "./model/UnitBasedAttribute";
import { VariationDimension } from "./model/VariationDimension";
import { VariationSummary } from "./model/VariationSummary";

View File

@ -21,44 +21,32 @@
*
*/
(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.TradeInPrice = factory(root.ProductAdvertisingAPIv1.ApiClient);
}
}(this, function(ApiClient) {
'use strict';
/**
* The TradeInPrice model module.
* @module model/TradeInPrice
* @version 1.0.0
*/
import { ApiClient } from "../ApiClient";
/**
* Constructs a new <code>TradeInPrice</code>.
* @alias module:model/TradeInPrice
* @class
*/
var exports = function() {
var _this = this;
};
export class TradeInPrice {
/**
* @member {Number} Amount
*/
public Amount?: number;
/**
* @member {String} Currency
*/
public Currency?: string;
/**
* @member {String} DisplayAmount
*/
public DisplayAmount?: string;
/**
* Constructs a <code>TradeInPrice</code> from a plain JavaScript object, optionally creating a new instance.
@ -67,39 +55,20 @@
* @param {module:model/TradeInPrice} obj Optional instance to populate.
* @return {module:model/TradeInPrice} The populated <code>TradeInPrice</code> instance.
*/
exports.constructFromObject = function(data, obj) {
public static constructFromObject(data: any, obj?: TradeInPrice) {
if (data) {
obj = obj || new exports();
obj = obj || new TradeInPrice();
if (data.hasOwnProperty('Amount')) {
obj['Amount'] = ApiClient.convertToType(data['Amount'], 'Number');
obj.Amount = ApiClient.convertToType(data['Amount'], 'Number');
}
if (data.hasOwnProperty('Currency')) {
obj['Currency'] = ApiClient.convertToType(data['Currency'], 'String');
obj.Currency = ApiClient.convertToType(data['Currency'], 'String');
}
if (data.hasOwnProperty('DisplayAmount')) {
obj['DisplayAmount'] = ApiClient.convertToType(data['DisplayAmount'], 'String');
obj.DisplayAmount = ApiClient.convertToType(data['DisplayAmount'], 'String');
}
}
return obj;
}
/**
* @member {Number} Amount
*/
exports.prototype['Amount'] = undefined;
/**
* @member {String} Currency
*/
exports.prototype['Currency'] = undefined;
/**
* @member {String} DisplayAmount
*/
exports.prototype['DisplayAmount'] = undefined;
return exports;
}));
};