File: /var/www/quadcode.com/node_modules/pipedrive/dist/model/RecentDataProduct.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 RecentDataProduct model module.
* @module model/RecentDataProduct
* @version 1.0.0
*/
var RecentDataProduct = /*#__PURE__*/function () {
/**
* Constructs a new <code>RecentDataProduct</code>.
* @alias module:model/RecentDataProduct
*/
function RecentDataProduct() {
(0, _classCallCheck2["default"])(this, RecentDataProduct);
RecentDataProduct.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"])(RecentDataProduct, null, [{
key: "initialize",
value: function initialize(obj) {}
/**
* Constructs a <code>RecentDataProduct</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/RecentDataProduct} obj Optional instance to populate.
* @return {module:model/RecentDataProduct} The populated <code>RecentDataProduct</code> instance.
*/
}, {
key: "constructFromObject",
value: function constructFromObject(data, obj) {
if (data) {
obj = obj || new RecentDataProduct();
if (data.hasOwnProperty('id')) {
obj['id'] = _ApiClient["default"].convertToType(data['id'], 'Number');
delete data['id'];
}
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('description')) {
obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
delete data['description'];
}
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('category')) {
obj['category'] = _ApiClient["default"].convertToType(data['category'], 'String');
delete data['category'];
}
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('first_char')) {
obj['first_char'] = _ApiClient["default"].convertToType(data['first_char'], 'String');
delete data['first_char'];
}
if (data.hasOwnProperty('visible_to')) {
obj['visible_to'] = _ApiClient["default"].convertToType(data['visible_to'], 'Number');
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('files_count')) {
obj['files_count'] = _ApiClient["default"].convertToType(data['files_count'], 'Number');
delete data['files_count'];
}
if (data.hasOwnProperty('add_time')) {
obj['add_time'] = _ApiClient["default"].convertToType(data['add_time'], 'String');
delete data['add_time'];
}
if (data.hasOwnProperty('update_time')) {
obj['update_time'] = _ApiClient["default"].convertToType(data['update_time'], 'String');
delete data['update_time'];
}
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 RecentDataProduct;
}();
/**
* The ID of the product
* @member {Number} id
*/
RecentDataProduct.prototype['id'] = undefined;
/**
* The name of the product
* @member {String} name
*/
RecentDataProduct.prototype['name'] = undefined;
/**
* The product code
* @member {String} code
*/
RecentDataProduct.prototype['code'] = undefined;
/**
* The description of the product
* @member {String} description
*/
RecentDataProduct.prototype['description'] = undefined;
/**
* The unit in which this product is sold
* @member {String} unit
*/
RecentDataProduct.prototype['unit'] = undefined;
/**
* The tax percentage
* @member {Number} tax
* @default 0
*/
RecentDataProduct.prototype['tax'] = 0;
/**
* The category of the product
* @member {String} category
*/
RecentDataProduct.prototype['category'] = undefined;
/**
* Whether this product will be made active or not
* @member {Boolean} active_flag
*/
RecentDataProduct.prototype['active_flag'] = undefined;
/**
* Whether this product can be selected in deals or not
* @member {Boolean} selectable
*/
RecentDataProduct.prototype['selectable'] = undefined;
/**
* The first letter of the product name
* @member {String} first_char
*/
RecentDataProduct.prototype['first_char'] = undefined;
/**
* 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.
* @member {Number} visible_to
*/
RecentDataProduct.prototype['visible_to'] = undefined;
/**
* The ID of the user who will be marked as the owner of this product. When omitted, authorized user ID will be used.
* @member {Number} owner_id
*/
RecentDataProduct.prototype['owner_id'] = undefined;
/**
* The count of files
* @member {Number} files_count
*/
RecentDataProduct.prototype['files_count'] = undefined;
/**
* The date and time when the product was added to the deal
* @member {String} add_time
*/
RecentDataProduct.prototype['add_time'] = undefined;
/**
* The date and time when the product was updated to the deal
* @member {String} update_time
*/
RecentDataProduct.prototype['update_time'] = undefined;
/**
* 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
*/
RecentDataProduct.prototype['prices'] = undefined;
var _default = RecentDataProduct;
exports["default"] = _default;