Refactored model/ErrorData.
This commit is contained in:
parent
3291b2e11e
commit
37e0f852a6
|
|
@ -41,6 +41,7 @@ import { CustomerReviews } from "./model/CustomerReviews";
|
|||
import { DeliveryFlag } from "./model/DeliveryFlag";
|
||||
import { DimensionBasedAttribute } from "./model/DimensionBasedAttribute";
|
||||
import { DurationPrice } from "./model/DurationPrice";
|
||||
import { ErrorData } from "./model/ErrorData";
|
||||
import { Languages } from "./model/Languages";
|
||||
import { LanguageType } from "./model/LanguageType";
|
||||
import { OfferPrice } from "./model/OfferPrice";
|
||||
|
|
|
|||
|
|
@ -21,43 +21,28 @@
|
|||
*
|
||||
*/
|
||||
|
||||
(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.ErrorData = factory(root.ProductAdvertisingAPIv1.ApiClient);
|
||||
}
|
||||
}(this, function(ApiClient) {
|
||||
'use strict';
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* The ErrorData model module.
|
||||
* @module model/ErrorData
|
||||
* @version 1.0.0
|
||||
*/
|
||||
|
||||
import { ApiClient } from "../ApiClient";
|
||||
|
||||
/**
|
||||
* Constructs a new <code>ErrorData</code>.
|
||||
* @alias module:model/ErrorData
|
||||
* @class
|
||||
*/
|
||||
var exports = function() {
|
||||
var _this = this;
|
||||
|
||||
|
||||
|
||||
};
|
||||
export class ErrorData {
|
||||
/**
|
||||
* @member {String} Code
|
||||
*/
|
||||
public Code?: string;
|
||||
/**
|
||||
* @member {String} Message
|
||||
*/
|
||||
public Message?: string;
|
||||
|
||||
/**
|
||||
* Constructs a <code>ErrorData</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
|
|
@ -66,32 +51,17 @@
|
|||
* @param {module:model/ErrorData} obj Optional instance to populate.
|
||||
* @return {module:model/ErrorData} The populated <code>ErrorData</code> instance.
|
||||
*/
|
||||
exports.constructFromObject = function(data, obj) {
|
||||
public static constructFromObject(data: any, obj?: ErrorData) {
|
||||
if (data) {
|
||||
obj = obj || new exports();
|
||||
obj = obj || new ErrorData();
|
||||
|
||||
if (data.hasOwnProperty('Code')) {
|
||||
obj['Code'] = ApiClient.convertToType(data['Code'], 'String');
|
||||
obj.Code = ApiClient.convertToType(data['Code'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('Message')) {
|
||||
obj['Message'] = ApiClient.convertToType(data['Message'], 'String');
|
||||
obj.Message = ApiClient.convertToType(data['Message'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {String} Code
|
||||
*/
|
||||
exports.prototype['Code'] = undefined;
|
||||
/**
|
||||
* @member {String} Message
|
||||
*/
|
||||
exports.prototype['Message'] = undefined;
|
||||
|
||||
|
||||
|
||||
return exports;
|
||||
}));
|
||||
|
||||
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user