Refactored model/DurationPrice. Resolved issue in OfferPrice.
This commit is contained in:
parent
8b63721743
commit
3291b2e11e
|
|
@ -40,6 +40,7 @@ import { Contributor } from "./model/Contributor";
|
||||||
import { CustomerReviews } from "./model/CustomerReviews";
|
import { CustomerReviews } from "./model/CustomerReviews";
|
||||||
import { DeliveryFlag } from "./model/DeliveryFlag";
|
import { DeliveryFlag } from "./model/DeliveryFlag";
|
||||||
import { DimensionBasedAttribute } from "./model/DimensionBasedAttribute";
|
import { DimensionBasedAttribute } from "./model/DimensionBasedAttribute";
|
||||||
|
import { DurationPrice } from "./model/DurationPrice";
|
||||||
import { Languages } from "./model/Languages";
|
import { Languages } from "./model/Languages";
|
||||||
import { LanguageType } from "./model/LanguageType";
|
import { LanguageType } from "./model/LanguageType";
|
||||||
import { OfferPrice } from "./model/OfferPrice";
|
import { OfferPrice } from "./model/OfferPrice";
|
||||||
|
|
|
||||||
|
|
@ -21,43 +21,29 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function(root, factory) {
|
/**
|
||||||
if (typeof define === 'function' && define.amd) {
|
|
||||||
// AMD. Register as an anonymous module.
|
|
||||||
define(['ApiClient', 'model/OfferPrice', 'model/UnitBasedAttribute'], factory);
|
|
||||||
} else if (typeof module === 'object' && module.exports) {
|
|
||||||
// CommonJS-like environments that support module.exports, like Node.
|
|
||||||
module.exports = factory(require('../ApiClient'), require('./OfferPrice'), require('./UnitBasedAttribute'));
|
|
||||||
} else {
|
|
||||||
// Browser globals (root is window)
|
|
||||||
if (!root.ProductAdvertisingAPIv1) {
|
|
||||||
root.ProductAdvertisingAPIv1 = {};
|
|
||||||
}
|
|
||||||
root.ProductAdvertisingAPIv1.DurationPrice = factory(root.ProductAdvertisingAPIv1.ApiClient, root.ProductAdvertisingAPIv1.OfferPrice, root.ProductAdvertisingAPIv1.UnitBasedAttribute);
|
|
||||||
}
|
|
||||||
}(this, function(ApiClient, OfferPrice, UnitBasedAttribute) {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The DurationPrice model module.
|
* The DurationPrice model module.
|
||||||
* @module model/DurationPrice
|
* @module model/DurationPrice
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
import { OfferPrice } from "./OfferPrice";
|
||||||
|
import { UnitBasedAttribute } from "./UnitBasedAttribute";
|
||||||
|
|
||||||
|
/**
|
||||||
* Constructs a new <code>DurationPrice</code>.
|
* Constructs a new <code>DurationPrice</code>.
|
||||||
* @alias module:model/DurationPrice
|
* @alias module:model/DurationPrice
|
||||||
* @class
|
* @class
|
||||||
*/
|
*/
|
||||||
var exports = function() {
|
export class DurationPrice {
|
||||||
var _this = this;
|
/**
|
||||||
|
* @member {module:model/OfferPrice} Price
|
||||||
|
*/
|
||||||
|
public Price?: OfferPrice;
|
||||||
};
|
/**
|
||||||
|
* @member {module:model/UnitBasedAttribute} Duration
|
||||||
|
*/
|
||||||
|
public Duration?: UnitBasedAttribute;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a <code>DurationPrice</code> from a plain JavaScript object, optionally creating a new instance.
|
* Constructs a <code>DurationPrice</code> from a plain JavaScript object, optionally creating a new instance.
|
||||||
|
|
@ -66,32 +52,17 @@
|
||||||
* @param {module:model/DurationPrice} obj Optional instance to populate.
|
* @param {module:model/DurationPrice} obj Optional instance to populate.
|
||||||
* @return {module:model/DurationPrice} The populated <code>DurationPrice</code> instance.
|
* @return {module:model/DurationPrice} The populated <code>DurationPrice</code> instance.
|
||||||
*/
|
*/
|
||||||
exports.constructFromObject = function(data, obj) {
|
public static constructFromObject(data: any, obj?: DurationPrice) {
|
||||||
if (data) {
|
if (data) {
|
||||||
obj = obj || new exports();
|
obj = obj || new DurationPrice();
|
||||||
|
|
||||||
if (data.hasOwnProperty('Price')) {
|
if (data.hasOwnProperty('Price')) {
|
||||||
obj['Price'] = OfferPrice.constructFromObject(data['Price']);
|
obj.Price = OfferPrice.constructFromObject(data['Price']);
|
||||||
}
|
}
|
||||||
if (data.hasOwnProperty('Duration')) {
|
if (data.hasOwnProperty('Duration')) {
|
||||||
obj['Duration'] = UnitBasedAttribute.constructFromObject(data['Duration']);
|
obj.Duration = UnitBasedAttribute.constructFromObject(data['Duration']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
};
|
||||||
/**
|
|
||||||
* @member {module:model/OfferPrice} Price
|
|
||||||
*/
|
|
||||||
exports.prototype['Price'] = undefined;
|
|
||||||
/**
|
|
||||||
* @member {module:model/UnitBasedAttribute} Duration
|
|
||||||
*/
|
|
||||||
exports.prototype['Duration'] = undefined;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return exports;
|
|
||||||
}));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ export class OfferPrice {
|
||||||
* @param {module:model/OfferPrice} obj Optional instance to populate.
|
* @param {module:model/OfferPrice} obj Optional instance to populate.
|
||||||
* @return {module:model/OfferPrice} The populated <code>OfferPrice</code> instance.
|
* @return {module:model/OfferPrice} The populated <code>OfferPrice</code> instance.
|
||||||
*/
|
*/
|
||||||
public static constructFromObject(data: any, obj: OfferPrice) {
|
public static constructFromObject(data: any, obj?: OfferPrice) {
|
||||||
if (data) {
|
if (data) {
|
||||||
obj = obj || new OfferPrice();
|
obj = obj || new OfferPrice();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user