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/UpdateProductRequestBody.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 _OptionalNameObject = _interopRequireDefault(require("./OptionalNameObject"));
var _ProductRequest = _interopRequireDefault(require("./ProductRequest"));
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 UpdateProductRequestBody model module.
 * @module model/UpdateProductRequestBody
 * @version 1.0.0
 */
var UpdateProductRequestBody = /*#__PURE__*/function () {
  /**
   * Constructs a new <code>UpdateProductRequestBody</code>.
   * @alias module:model/UpdateProductRequestBody
   * @implements module:model/OptionalNameObject
   * @implements module:model/ProductRequest
   * @param name {String} The name of the product
   */
  function UpdateProductRequestBody(name) {
    (0, _classCallCheck2["default"])(this, UpdateProductRequestBody);
    _OptionalNameObject["default"].initialize(this);
    _ProductRequest["default"].initialize(this);
    UpdateProductRequestBody.initialize(this, name);
  }

  /**
   * 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"])(UpdateProductRequestBody, null, [{
    key: "initialize",
    value: function initialize(obj, name) {
      obj['name'] = name;
    }

    /**
     * Constructs a <code>UpdateProductRequestBody</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/UpdateProductRequestBody} obj Optional instance to populate.
     * @return {module:model/UpdateProductRequestBody} The populated <code>UpdateProductRequestBody</code> instance.
     */
  }, {
    key: "constructFromObject",
    value: function constructFromObject(data, obj) {
      if (data) {
        obj = obj || new UpdateProductRequestBody();
        _OptionalNameObject["default"].constructFromObject(data, obj);
        _ProductRequest["default"].constructFromObject(data, obj);
        if (data.hasOwnProperty('name')) {
          obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
          delete data['name'];
        }
        if (data.hasOwnProperty('code')) {
          obj['code'] = _ApiClient["default"].convertToType(data['code'], 'String');
          delete data['code'];
        }
        if (data.hasOwnProperty('unit')) {
          obj['unit'] = _ApiClient["default"].convertToType(data['unit'], 'String');
          delete data['unit'];
        }
        if (data.hasOwnProperty('tax')) {
          obj['tax'] = _ApiClient["default"].convertToType(data['tax'], 'Number');
          delete data['tax'];
        }
        if (data.hasOwnProperty('active_flag')) {
          obj['active_flag'] = _ApiClient["default"].convertToType(data['active_flag'], 'Boolean');
          delete data['active_flag'];
        }
        if (data.hasOwnProperty('selectable')) {
          obj['selectable'] = _ApiClient["default"].convertToType(data['selectable'], 'Boolean');
          delete data['selectable'];
        }
        if (data.hasOwnProperty('visible_to')) {
          obj['visible_to'] = _ApiClient["default"].convertToType(data['visible_to'], _VisibleTo["default"]);
          delete data['visible_to'];
        }
        if (data.hasOwnProperty('owner_id')) {
          obj['owner_id'] = _ApiClient["default"].convertToType(data['owner_id'], 'Number');
          delete data['owner_id'];
        }
        if (data.hasOwnProperty('prices')) {
          obj['prices'] = _ApiClient["default"].convertToType(data['prices'], [Object]);
          delete data['prices'];
        }
        if (Object.keys(data).length > 0) {
          Object.assign(obj, data);
        }
      }
      return obj;
    }
  }]);
  return UpdateProductRequestBody;
}();
/**
 * The name of the product
 * @member {String} name
 */
UpdateProductRequestBody.prototype['name'] = undefined;

/**
 * The product code
 * @member {String} code
 */
UpdateProductRequestBody.prototype['code'] = undefined;

/**
 * The unit in which this product is sold
 * @member {String} unit
 */
UpdateProductRequestBody.prototype['unit'] = undefined;

/**
 * The tax percentage
 * @member {Number} tax
 * @default 0
 */
UpdateProductRequestBody.prototype['tax'] = 0;

/**
 * Whether this product will be made active or not
 * @member {Boolean} active_flag
 * @default true
 */
UpdateProductRequestBody.prototype['active_flag'] = true;

/**
 * Whether this product can be selected in deals or not
 * @member {Boolean} selectable
 * @default true
 */
UpdateProductRequestBody.prototype['selectable'] = true;

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

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

/**
 * An array of objects, each containing: `currency` (string), `price` (number), `cost` (number, optional), `overhead_cost` (number, optional). Note that there can only be one price per product per currency. When `prices` is omitted altogether, a default price of 0 and a default currency based on the company's currency will be assigned.
 * @member {Array.<Object>} prices
 */
UpdateProductRequestBody.prototype['prices'] = undefined;

// Implement OptionalNameObject interface:
/**
 * The name of the product
 * @member {String} name
 */
_OptionalNameObject["default"].prototype['name'] = undefined;
// Implement ProductRequest interface:
/**
 * The product code
 * @member {String} code
 */
_ProductRequest["default"].prototype['code'] = undefined;
/**
 * The unit in which this product is sold
 * @member {String} unit
 */
_ProductRequest["default"].prototype['unit'] = undefined;
/**
 * The tax percentage
 * @member {Number} tax
 * @default 0
 */
_ProductRequest["default"].prototype['tax'] = 0;
/**
 * Whether this product will be made active or not
 * @member {Boolean} active_flag
 * @default true
 */
_ProductRequest["default"].prototype['active_flag'] = true;
/**
 * Whether this product can be selected in deals or not
 * @member {Boolean} selectable
 * @default true
 */
_ProductRequest["default"].prototype['selectable'] = true;
/**
 * The visibility of the product. 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
 */
_ProductRequest["default"].prototype['visible_to'] = undefined;
/**
 * The ID of the user who will be marked as the owner of this product. When omitted, the authorized user ID will be used.
 * @member {Number} owner_id
 */
_ProductRequest["default"].prototype['owner_id'] = undefined;
/**
 * An array of objects, each containing: `currency` (string), `price` (number), `cost` (number, optional), `overhead_cost` (number, optional). Note that there can only be one price per product per currency. When `prices` is omitted altogether, a default price of 0 and a default currency based on the company's currency will be assigned.
 * @member {Array.<Object>} prices
 */
_ProductRequest["default"].prototype['prices'] = undefined;
var _default = UpdateProductRequestBody;
exports["default"] = _default;