File: /var/www/fintechfuel/node_modules/pipedrive/dist/model/BasicDeal.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 _VisibleTo = _interopRequireDefault(require("./VisibleTo"));
/**
* 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 BasicDeal model module.
* @module model/BasicDeal
* @version 1.0.0
*/
var BasicDeal = /*#__PURE__*/function () {
/**
* Constructs a new <code>BasicDeal</code>.
* @alias module:model/BasicDeal
*/
function BasicDeal() {
(0, _classCallCheck2["default"])(this, BasicDeal);
BasicDeal.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"])(BasicDeal, null, [{
key: "initialize",
value: function initialize(obj) {}
/**
* Constructs a <code>BasicDeal</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/BasicDeal} obj Optional instance to populate.
* @return {module:model/BasicDeal} The populated <code>BasicDeal</code> instance.
*/
}, {
key: "constructFromObject",
value: function constructFromObject(data, obj) {
if (data) {
obj = obj || new BasicDeal();
if (data.hasOwnProperty('expected_close_date')) {
obj['expected_close_date'] = _ApiClient["default"].convertToType(data['expected_close_date'], 'Date');
delete data['expected_close_date'];
}
if (data.hasOwnProperty('probability')) {
obj['probability'] = _ApiClient["default"].convertToType(data['probability'], 'Number');
delete data['probability'];
}
if (data.hasOwnProperty('lost_reason')) {
obj['lost_reason'] = _ApiClient["default"].convertToType(data['lost_reason'], 'String');
delete data['lost_reason'];
}
if (data.hasOwnProperty('visible_to')) {
obj['visible_to'] = _ApiClient["default"].convertToType(data['visible_to'], _VisibleTo["default"]);
delete data['visible_to'];
}
if (Object.keys(data).length > 0) {
Object.assign(obj, data);
}
}
return obj;
}
}]);
return BasicDeal;
}();
/**
* The expected close date of the deal. In ISO 8601 format: YYYY-MM-DD.
* @member {Date} expected_close_date
*/
BasicDeal.prototype['expected_close_date'] = undefined;
/**
* The success probability percentage of the deal. Used/shown only when `deal_probability` for the pipeline of the deal is enabled.
* @member {Number} probability
*/
BasicDeal.prototype['probability'] = undefined;
/**
* The optional message about why the deal was lost (to be used when status = lost)
* @member {String} lost_reason
*/
BasicDeal.prototype['lost_reason'] = undefined;
/**
* The visibility of the deal. If omitted, the visibility will be set to the default visibility setting of this item type for the authorized user. Read more about visibility groups <a href=\"https://support.pipedrive.com/en/article/visibility-groups\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.<h4>Essential / Advanced plan</h4><table><tr><th style=\"width:40px\">Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner & followers</td><tr><td>`3`</td><td>Entire company</td></tr></table><h4>Professional / Enterprise plan</h4><table><tr><th style=\"width:40px\">Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner only</td><tr><td>`3`</td><td>Owner's visibility group</td></tr><tr><td>`5`</td><td>Owner's visibility group and sub-groups</td></tr><tr><td>`7`</td><td>Entire company</td></tr></table>
* @member {module:model/VisibleTo} visible_to
*/
BasicDeal.prototype['visible_to'] = undefined;
var _default = BasicDeal;
exports["default"] = _default;