HEX
Server: nginx/1.18.0
System: Linux test-ipsremont 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
User: ips (1000)
PHP: 8.0.30
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/fintechfuel/node_modules/pipedrive/dist/model/UpdateDealRequest.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 _BasicDeal = _interopRequireDefault(require("./BasicDeal"));
var _DealTitleParameter = _interopRequireDefault(require("./DealTitleParameter"));
var _UpdateDealParameters = _interopRequireDefault(require("./UpdateDealParameters"));
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 UpdateDealRequest model module.
 * @module model/UpdateDealRequest
 * @version 1.0.0
 */
var UpdateDealRequest = /*#__PURE__*/function () {
  /**
   * Constructs a new <code>UpdateDealRequest</code>.
   * @alias module:model/UpdateDealRequest
   * @implements module:model/DealTitleParameter
   * @implements module:model/UpdateDealParameters
   * @implements module:model/BasicDeal
   */
  function UpdateDealRequest() {
    (0, _classCallCheck2["default"])(this, UpdateDealRequest);
    _DealTitleParameter["default"].initialize(this);
    _UpdateDealParameters["default"].initialize(this);
    _BasicDeal["default"].initialize(this);
    UpdateDealRequest.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"])(UpdateDealRequest, null, [{
    key: "initialize",
    value: function initialize(obj) {}

    /**
     * Constructs a <code>UpdateDealRequest</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/UpdateDealRequest} obj Optional instance to populate.
     * @return {module:model/UpdateDealRequest} The populated <code>UpdateDealRequest</code> instance.
     */
  }, {
    key: "constructFromObject",
    value: function constructFromObject(data, obj) {
      if (data) {
        obj = obj || new UpdateDealRequest();
        _DealTitleParameter["default"].constructFromObject(data, obj);
        _UpdateDealParameters["default"].constructFromObject(data, obj);
        _BasicDeal["default"].constructFromObject(data, obj);
        if (data.hasOwnProperty('title')) {
          obj['title'] = _ApiClient["default"].convertToType(data['title'], 'String');
          delete data['title'];
        }
        if (data.hasOwnProperty('value')) {
          obj['value'] = _ApiClient["default"].convertToType(data['value'], 'String');
          delete data['value'];
        }
        if (data.hasOwnProperty('currency')) {
          obj['currency'] = _ApiClient["default"].convertToType(data['currency'], 'String');
          delete data['currency'];
        }
        if (data.hasOwnProperty('user_id')) {
          obj['user_id'] = _ApiClient["default"].convertToType(data['user_id'], 'Number');
          delete data['user_id'];
        }
        if (data.hasOwnProperty('person_id')) {
          obj['person_id'] = _ApiClient["default"].convertToType(data['person_id'], 'Number');
          delete data['person_id'];
        }
        if (data.hasOwnProperty('org_id')) {
          obj['org_id'] = _ApiClient["default"].convertToType(data['org_id'], 'Number');
          delete data['org_id'];
        }
        if (data.hasOwnProperty('pipeline_id')) {
          obj['pipeline_id'] = _ApiClient["default"].convertToType(data['pipeline_id'], 'Number');
          delete data['pipeline_id'];
        }
        if (data.hasOwnProperty('stage_id')) {
          obj['stage_id'] = _ApiClient["default"].convertToType(data['stage_id'], 'Number');
          delete data['stage_id'];
        }
        if (data.hasOwnProperty('status')) {
          obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
          delete data['status'];
        }
        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 UpdateDealRequest;
}();
/**
 * The title of the deal
 * @member {String} title
 */
UpdateDealRequest.prototype['title'] = undefined;

/**
 * The value of the deal.
 * @member {String} value
 */
UpdateDealRequest.prototype['value'] = undefined;

/**
 * The currency of the deal. Accepts a 3-character currency code.
 * @member {String} currency
 */
UpdateDealRequest.prototype['currency'] = undefined;

/**
 * The ID of the user which will be the new owner of the deal.
 * @member {Number} user_id
 */
UpdateDealRequest.prototype['user_id'] = undefined;

/**
 * The ID of a person which this deal will be linked to. If the person does not exist yet, it needs to be created first.
 * @member {Number} person_id
 */
UpdateDealRequest.prototype['person_id'] = undefined;

/**
 * The ID of an organization which this deal will be linked to. If the organization does not exist yet, it needs to be created first.
 * @member {Number} org_id
 */
UpdateDealRequest.prototype['org_id'] = undefined;

/**
 * The ID of the pipeline this deal will be added to. By default, the deal will be added to the first stage of the specified pipeline. Please note that `pipeline_id` and `stage_id` should not be used together as `pipeline_id` will be ignored.
 * @member {Number} pipeline_id
 */
UpdateDealRequest.prototype['pipeline_id'] = undefined;

/**
 * The ID of the stage this deal will be added to. Please note that a pipeline will be assigned automatically based on the `stage_id`.
 * @member {Number} stage_id
 */
UpdateDealRequest.prototype['stage_id'] = undefined;

/**
 * open = Open, won = Won, lost = Lost, deleted = Deleted.
 * @member {module:model/UpdateDealRequest.StatusEnum} status
 */
UpdateDealRequest.prototype['status'] = undefined;

/**
 * The expected close date of the deal. In ISO 8601 format: YYYY-MM-DD.
 * @member {Date} expected_close_date
 */
UpdateDealRequest.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
 */
UpdateDealRequest.prototype['probability'] = undefined;

/**
 * The optional message about why the deal was lost (to be used when status = lost)
 * @member {String} lost_reason
 */
UpdateDealRequest.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 &amp; 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
 */
UpdateDealRequest.prototype['visible_to'] = undefined;

// Implement DealTitleParameter interface:
/**
 * The title of the deal
 * @member {String} title
 */
_DealTitleParameter["default"].prototype['title'] = undefined;
// Implement UpdateDealParameters interface:
/**
 * The value of the deal.
 * @member {String} value
 */
_UpdateDealParameters["default"].prototype['value'] = undefined;
/**
 * The currency of the deal. Accepts a 3-character currency code.
 * @member {String} currency
 */
_UpdateDealParameters["default"].prototype['currency'] = undefined;
/**
 * The ID of the user which will be the new owner of the deal.
 * @member {Number} user_id
 */
_UpdateDealParameters["default"].prototype['user_id'] = undefined;
/**
 * The ID of a person which this deal will be linked to. If the person does not exist yet, it needs to be created first.
 * @member {Number} person_id
 */
_UpdateDealParameters["default"].prototype['person_id'] = undefined;
/**
 * The ID of an organization which this deal will be linked to. If the organization does not exist yet, it needs to be created first.
 * @member {Number} org_id
 */
_UpdateDealParameters["default"].prototype['org_id'] = undefined;
/**
 * The ID of the pipeline this deal will be added to. By default, the deal will be added to the first stage of the specified pipeline. Please note that `pipeline_id` and `stage_id` should not be used together as `pipeline_id` will be ignored.
 * @member {Number} pipeline_id
 */
_UpdateDealParameters["default"].prototype['pipeline_id'] = undefined;
/**
 * The ID of the stage this deal will be added to. Please note that a pipeline will be assigned automatically based on the `stage_id`.
 * @member {Number} stage_id
 */
_UpdateDealParameters["default"].prototype['stage_id'] = undefined;
/**
 * open = Open, won = Won, lost = Lost, deleted = Deleted.
 * @member {module:model/UpdateDealParameters.StatusEnum} status
 */
_UpdateDealParameters["default"].prototype['status'] = undefined;
// Implement BasicDeal interface:
/**
 * The expected close date of the deal. In ISO 8601 format: YYYY-MM-DD.
 * @member {Date} expected_close_date
 */
_BasicDeal["default"].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["default"].prototype['probability'] = undefined;
/**
 * The optional message about why the deal was lost (to be used when status = lost)
 * @member {String} lost_reason
 */
_BasicDeal["default"].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 &amp; 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["default"].prototype['visible_to'] = undefined;

/**
 * Allowed values for the <code>status</code> property.
 * @enum {String}
 * @readonly
 */
UpdateDealRequest['StatusEnum'] = {
  /**
   * value: "open"
   * @const
   */
  "open": "open",
  /**
   * value: "won"
   * @const
   */
  "won": "won",
  /**
   * value: "lost"
   * @const
   */
  "lost": "lost",
  /**
   * value: "deleted"
   * @const
   */
  "deleted": "deleted"
};
var _default = UpdateDealRequest;
exports["default"] = _default;