File: /var/www/quadcode.com/node_modules/pipedrive/dist/model/DealNonStrictWithDetailsAllOf.js
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
var _DealNonStrictWithDetailsAllOfAge = _interopRequireDefault(require("./DealNonStrictWithDetailsAllOfAge"));
var _DealNonStrictWithDetailsAllOfAverageTimeToWon = _interopRequireDefault(require("./DealNonStrictWithDetailsAllOfAverageTimeToWon"));
var _DealNonStrictWithDetailsAllOfStayInPipelineStages = _interopRequireDefault(require("./DealNonStrictWithDetailsAllOfStayInPipelineStages"));
/**
* Pipedrive API v1
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
/**
* The DealNonStrictWithDetailsAllOf model module.
* @module model/DealNonStrictWithDetailsAllOf
* @version 1.0.0
*/
var DealNonStrictWithDetailsAllOf = /*#__PURE__*/function () {
/**
* Constructs a new <code>DealNonStrictWithDetailsAllOf</code>.
* @alias module:model/DealNonStrictWithDetailsAllOf
*/
function DealNonStrictWithDetailsAllOf() {
(0, _classCallCheck2["default"])(this, DealNonStrictWithDetailsAllOf);
DealNonStrictWithDetailsAllOf.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
(0, _createClass2["default"])(DealNonStrictWithDetailsAllOf, null, [{
key: "initialize",
value: function initialize(obj) {}
/**
* Constructs a <code>DealNonStrictWithDetailsAllOf</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/DealNonStrictWithDetailsAllOf} obj Optional instance to populate.
* @return {module:model/DealNonStrictWithDetailsAllOf} The populated <code>DealNonStrictWithDetailsAllOf</code> instance.
*/
}, {
key: "constructFromObject",
value: function constructFromObject(data, obj) {
if (data) {
obj = obj || new DealNonStrictWithDetailsAllOf();
if (data.hasOwnProperty('average_time_to_won')) {
obj['average_time_to_won'] = _DealNonStrictWithDetailsAllOfAverageTimeToWon["default"].constructFromObject(data['average_time_to_won']);
delete data['average_time_to_won'];
}
if (data.hasOwnProperty('average_stage_progress')) {
obj['average_stage_progress'] = _ApiClient["default"].convertToType(data['average_stage_progress'], 'Number');
delete data['average_stage_progress'];
}
if (data.hasOwnProperty('age')) {
obj['age'] = _DealNonStrictWithDetailsAllOfAge["default"].constructFromObject(data['age']);
delete data['age'];
}
if (data.hasOwnProperty('stay_in_pipeline_stages')) {
obj['stay_in_pipeline_stages'] = _DealNonStrictWithDetailsAllOfStayInPipelineStages["default"].constructFromObject(data['stay_in_pipeline_stages']);
delete data['stay_in_pipeline_stages'];
}
if (data.hasOwnProperty('last_activity')) {
obj['last_activity'] = _ApiClient["default"].convertToType(data['last_activity'], Object);
delete data['last_activity'];
}
if (data.hasOwnProperty('next_activity')) {
obj['next_activity'] = _ApiClient["default"].convertToType(data['next_activity'], Object);
delete data['next_activity'];
}
if (Object.keys(data).length > 0) {
Object.assign(obj, data);
}
}
return obj;
}
}]);
return DealNonStrictWithDetailsAllOf;
}();
/**
* @member {module:model/DealNonStrictWithDetailsAllOfAverageTimeToWon} average_time_to_won
*/
DealNonStrictWithDetailsAllOf.prototype['average_time_to_won'] = undefined;
/**
* The average of the deal stage progression
* @member {Number} average_stage_progress
*/
DealNonStrictWithDetailsAllOf.prototype['average_stage_progress'] = undefined;
/**
* @member {module:model/DealNonStrictWithDetailsAllOfAge} age
*/
DealNonStrictWithDetailsAllOf.prototype['age'] = undefined;
/**
* @member {module:model/DealNonStrictWithDetailsAllOfStayInPipelineStages} stay_in_pipeline_stages
*/
DealNonStrictWithDetailsAllOf.prototype['stay_in_pipeline_stages'] = undefined;
/**
* The details of the last activity associated with the deal
* @member {Object} last_activity
*/
DealNonStrictWithDetailsAllOf.prototype['last_activity'] = undefined;
/**
* The details of the next activity associated with the deal
* @member {Object} next_activity
*/
DealNonStrictWithDetailsAllOf.prototype['next_activity'] = undefined;
var _default = DealNonStrictWithDetailsAllOf;
exports["default"] = _default;