File: /var/www/fintechfuel/node_modules/pipedrive/dist/model/LeadValue.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"));
/**
* 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 LeadValue model module.
* @module model/LeadValue
* @version 1.0.0
*/
var LeadValue = /*#__PURE__*/function () {
/**
* Constructs a new <code>LeadValue</code>.
* The potential value of the lead
* @alias module:model/LeadValue
* @param amount {Number}
* @param currency {String}
*/
function LeadValue(amount, currency) {
(0, _classCallCheck2["default"])(this, LeadValue);
LeadValue.initialize(this, amount, currency);
}
/**
* 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"])(LeadValue, null, [{
key: "initialize",
value: function initialize(obj, amount, currency) {
obj['amount'] = amount;
obj['currency'] = currency;
}
/**
* Constructs a <code>LeadValue</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/LeadValue} obj Optional instance to populate.
* @return {module:model/LeadValue} The populated <code>LeadValue</code> instance.
*/
}, {
key: "constructFromObject",
value: function constructFromObject(data, obj) {
if (data) {
obj = obj || new LeadValue();
if (data.hasOwnProperty('amount')) {
obj['amount'] = _ApiClient["default"].convertToType(data['amount'], 'Number');
delete data['amount'];
}
if (data.hasOwnProperty('currency')) {
obj['currency'] = _ApiClient["default"].convertToType(data['currency'], 'String');
delete data['currency'];
}
if (Object.keys(data).length > 0) {
Object.assign(obj, data);
}
}
return obj;
}
}]);
return LeadValue;
}();
/**
* @member {Number} amount
*/
LeadValue.prototype['amount'] = undefined;
/**
* @member {String} currency
*/
LeadValue.prototype['currency'] = undefined;
var _default = LeadValue;
exports["default"] = _default;