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/UpdatePerson.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 _BasePersonItemPhone = _interopRequireDefault(require("./BasePersonItemPhone"));
var _BasicPerson = _interopRequireDefault(require("./BasicPerson"));
var _BasicPersonEmail = _interopRequireDefault(require("./BasicPersonEmail"));
var _MarketingStatus = _interopRequireDefault(require("./MarketingStatus"));
var _UpdatePersonAllOf = _interopRequireDefault(require("./UpdatePersonAllOf"));
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 UpdatePerson model module.
 * @module model/UpdatePerson
 * @version 1.0.0
 */
var UpdatePerson = /*#__PURE__*/function () {
  /**
   * Constructs a new <code>UpdatePerson</code>.
   * @alias module:model/UpdatePerson
   * @implements module:model/UpdatePersonAllOf
   * @implements module:model/BasicPerson
   */
  function UpdatePerson() {
    (0, _classCallCheck2["default"])(this, UpdatePerson);
    _UpdatePersonAllOf["default"].initialize(this);
    _BasicPerson["default"].initialize(this);
    UpdatePerson.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"])(UpdatePerson, null, [{
    key: "initialize",
    value: function initialize(obj) {}

    /**
     * Constructs a <code>UpdatePerson</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/UpdatePerson} obj Optional instance to populate.
     * @return {module:model/UpdatePerson} The populated <code>UpdatePerson</code> instance.
     */
  }, {
    key: "constructFromObject",
    value: function constructFromObject(data, obj) {
      if (data) {
        obj = obj || new UpdatePerson();
        _UpdatePersonAllOf["default"].constructFromObject(data, obj);
        _BasicPerson["default"].constructFromObject(data, obj);
        if (data.hasOwnProperty('name')) {
          obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
          delete data['name'];
        }
        if (data.hasOwnProperty('owner_id')) {
          obj['owner_id'] = _ApiClient["default"].convertToType(data['owner_id'], 'Number');
          delete data['owner_id'];
        }
        if (data.hasOwnProperty('org_id')) {
          obj['org_id'] = _ApiClient["default"].convertToType(data['org_id'], 'Number');
          delete data['org_id'];
        }
        if (data.hasOwnProperty('email')) {
          obj['email'] = _ApiClient["default"].convertToType(data['email'], [_BasicPersonEmail["default"]]);
          delete data['email'];
        }
        if (data.hasOwnProperty('phone')) {
          obj['phone'] = _ApiClient["default"].convertToType(data['phone'], [_BasePersonItemPhone["default"]]);
          delete data['phone'];
        }
        if (data.hasOwnProperty('visible_to')) {
          obj['visible_to'] = _ApiClient["default"].convertToType(data['visible_to'], _VisibleTo["default"]);
          delete data['visible_to'];
        }
        if (data.hasOwnProperty('marketing_status')) {
          obj['marketing_status'] = _ApiClient["default"].convertToType(data['marketing_status'], _MarketingStatus["default"]);
          delete data['marketing_status'];
        }
        if (data.hasOwnProperty('add_time')) {
          obj['add_time'] = _ApiClient["default"].convertToType(data['add_time'], 'String');
          delete data['add_time'];
        }
        if (Object.keys(data).length > 0) {
          Object.assign(obj, data);
        }
      }
      return obj;
    }
  }]);
  return UpdatePerson;
}();
/**
 * The name of the person
 * @member {String} name
 */
UpdatePerson.prototype['name'] = undefined;

/**
 * The ID of the user who will be marked as the owner of this person. When omitted, the authorized user ID will be used.
 * @member {Number} owner_id
 */
UpdatePerson.prototype['owner_id'] = undefined;

/**
 * The ID of the organization this person will belong to
 * @member {Number} org_id
 */
UpdatePerson.prototype['org_id'] = undefined;

/**
 * An email address as a string or an array of email objects related to the person. The structure of the array is as follows: `[{ \"value\": \"mail@example.com\", \"primary\": \"true\", \"label\": \"main\" }]`. Please note that only `value` is required.
 * @member {Array.<module:model/BasicPersonEmail>} email
 */
UpdatePerson.prototype['email'] = undefined;

/**
 * A phone number supplied as a string or an array of phone objects related to the person. The structure of the array is as follows: `[{ \"value\": \"12345\", \"primary\": \"true\", \"label\": \"mobile\" }]`. Please note that only `value` is required.
 * @member {Array.<module:model/BasePersonItemPhone>} phone
 */
UpdatePerson.prototype['phone'] = undefined;

/**
 * The visibility of the person. 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
 */
UpdatePerson.prototype['visible_to'] = undefined;

/**
 * If the person does not have a valid email address, then the marketing status is **not set** and `no_consent` is returned for the `marketing_status` value when the new person is created. If the change is forbidden, the status will remain unchanged for every call that tries to modify the marketing status. Please be aware that it is only allowed **once** to change the marketing status from an old status to a new one.<table><tr><th>Value</th><th>Description</th></tr><tr><td>`no_consent`</td><td>The customer has not given consent to receive any marketing communications</td></tr><tr><td>`unsubscribed`</td><td>The customers have unsubscribed from ALL marketing communications</td></tr><tr><td>`subscribed`</td><td>The customers are subscribed and are counted towards marketing caps</td></tr><tr><td>`archived`</td><td>The customers with `subscribed` status can be moved to `archived` to save consent, but they are not paid for</td></tr></table>
 * @member {module:model/MarketingStatus} marketing_status
 */
UpdatePerson.prototype['marketing_status'] = undefined;

/**
 * The optional creation date & time of the person in UTC. Requires admin user API token. Format: YYYY-MM-DD HH:MM:SS
 * @member {String} add_time
 */
UpdatePerson.prototype['add_time'] = undefined;

// Implement UpdatePersonAllOf interface:
/**
 * The name of the person
 * @member {String} name
 */
_UpdatePersonAllOf["default"].prototype['name'] = undefined;
// Implement BasicPerson interface:
/**
 * The ID of the user who will be marked as the owner of this person. When omitted, the authorized user ID will be used.
 * @member {Number} owner_id
 */
_BasicPerson["default"].prototype['owner_id'] = undefined;
/**
 * The ID of the organization this person will belong to
 * @member {Number} org_id
 */
_BasicPerson["default"].prototype['org_id'] = undefined;
/**
 * An email address as a string or an array of email objects related to the person. The structure of the array is as follows: `[{ \"value\": \"mail@example.com\", \"primary\": \"true\", \"label\": \"main\" }]`. Please note that only `value` is required.
 * @member {Array.<module:model/BasicPersonEmail>} email
 */
_BasicPerson["default"].prototype['email'] = undefined;
/**
 * A phone number supplied as a string or an array of phone objects related to the person. The structure of the array is as follows: `[{ \"value\": \"12345\", \"primary\": \"true\", \"label\": \"mobile\" }]`. Please note that only `value` is required.
 * @member {Array.<module:model/BasePersonItemPhone>} phone
 */
_BasicPerson["default"].prototype['phone'] = undefined;
/**
 * The visibility of the person. 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
 */
_BasicPerson["default"].prototype['visible_to'] = undefined;
/**
 * If the person does not have a valid email address, then the marketing status is **not set** and `no_consent` is returned for the `marketing_status` value when the new person is created. If the change is forbidden, the status will remain unchanged for every call that tries to modify the marketing status. Please be aware that it is only allowed **once** to change the marketing status from an old status to a new one.<table><tr><th>Value</th><th>Description</th></tr><tr><td>`no_consent`</td><td>The customer has not given consent to receive any marketing communications</td></tr><tr><td>`unsubscribed`</td><td>The customers have unsubscribed from ALL marketing communications</td></tr><tr><td>`subscribed`</td><td>The customers are subscribed and are counted towards marketing caps</td></tr><tr><td>`archived`</td><td>The customers with `subscribed` status can be moved to `archived` to save consent, but they are not paid for</td></tr></table>
 * @member {module:model/MarketingStatus} marketing_status
 */
_BasicPerson["default"].prototype['marketing_status'] = undefined;
/**
 * The optional creation date & time of the person in UTC. Requires admin user API token. Format: YYYY-MM-DD HH:MM:SS
 * @member {String} add_time
 */
_BasicPerson["default"].prototype['add_time'] = undefined;
var _default = UpdatePerson;
exports["default"] = _default;