File: /var/www/fintechfuel/node_modules/pipedrive/dist/model/PersonItem.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 _AdditionalPersonInfo = _interopRequireDefault(require("./AdditionalPersonInfo"));
var _BasePersonItem = _interopRequireDefault(require("./BasePersonItem"));
var _BasePersonItemEmail = _interopRequireDefault(require("./BasePersonItemEmail"));
var _BasePersonItemPhone = _interopRequireDefault(require("./BasePersonItemPhone"));
var _Owner = _interopRequireDefault(require("./Owner"));
var _PictureDataWithID = _interopRequireDefault(require("./PictureDataWithID"));
var _RelationshipOrganizationInfoItemWithActiveFlag = _interopRequireDefault(require("./RelationshipOrganizationInfoItemWithActiveFlag"));
/**
* 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 PersonItem model module.
* @module model/PersonItem
* @version 1.0.0
*/
var PersonItem = /*#__PURE__*/function () {
/**
* Constructs a new <code>PersonItem</code>.
* @alias module:model/PersonItem
* @implements module:model/BasePersonItem
* @implements module:model/AdditionalPersonInfo
*/
function PersonItem() {
(0, _classCallCheck2["default"])(this, PersonItem);
_BasePersonItem["default"].initialize(this);
_AdditionalPersonInfo["default"].initialize(this);
PersonItem.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"])(PersonItem, null, [{
key: "initialize",
value: function initialize(obj) {}
/**
* Constructs a <code>PersonItem</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/PersonItem} obj Optional instance to populate.
* @return {module:model/PersonItem} The populated <code>PersonItem</code> instance.
*/
}, {
key: "constructFromObject",
value: function constructFromObject(data, obj) {
if (data) {
obj = obj || new PersonItem();
_BasePersonItem["default"].constructFromObject(data, obj);
_AdditionalPersonInfo["default"].constructFromObject(data, obj);
if (data.hasOwnProperty('id')) {
obj['id'] = _ApiClient["default"].convertToType(data['id'], 'Number');
delete data['id'];
}
if (data.hasOwnProperty('company_id')) {
obj['company_id'] = _ApiClient["default"].convertToType(data['company_id'], 'Number');
delete data['company_id'];
}
if (data.hasOwnProperty('active_flag')) {
obj['active_flag'] = _ApiClient["default"].convertToType(data['active_flag'], 'Boolean');
delete data['active_flag'];
}
if (data.hasOwnProperty('phone')) {
obj['phone'] = _ApiClient["default"].convertToType(data['phone'], [_BasePersonItemPhone["default"]]);
delete data['phone'];
}
if (data.hasOwnProperty('email')) {
obj['email'] = _ApiClient["default"].convertToType(data['email'], [_BasePersonItemEmail["default"]]);
delete data['email'];
}
if (data.hasOwnProperty('first_char')) {
obj['first_char'] = _ApiClient["default"].convertToType(data['first_char'], 'String');
delete data['first_char'];
}
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('visible_to')) {
obj['visible_to'] = _ApiClient["default"].convertToType(data['visible_to'], 'String');
delete data['visible_to'];
}
if (data.hasOwnProperty('picture_id')) {
obj['picture_id'] = _PictureDataWithID["default"].constructFromObject(data['picture_id']);
delete data['picture_id'];
}
if (data.hasOwnProperty('label')) {
obj['label'] = _ApiClient["default"].convertToType(data['label'], 'Number');
delete data['label'];
}
if (data.hasOwnProperty('org_name')) {
obj['org_name'] = _ApiClient["default"].convertToType(data['org_name'], 'String');
delete data['org_name'];
}
if (data.hasOwnProperty('owner_name')) {
obj['owner_name'] = _ApiClient["default"].convertToType(data['owner_name'], 'String');
delete data['owner_name'];
}
if (data.hasOwnProperty('cc_email')) {
obj['cc_email'] = _ApiClient["default"].convertToType(data['cc_email'], 'String');
delete data['cc_email'];
}
if (data.hasOwnProperty('owner_id')) {
obj['owner_id'] = _Owner["default"].constructFromObject(data['owner_id']);
delete data['owner_id'];
}
if (data.hasOwnProperty('org_id')) {
obj['org_id'] = _RelationshipOrganizationInfoItemWithActiveFlag["default"].constructFromObject(data['org_id']);
delete data['org_id'];
}
if (data.hasOwnProperty('name')) {
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
delete data['name'];
}
if (data.hasOwnProperty('first_name')) {
obj['first_name'] = _ApiClient["default"].convertToType(data['first_name'], 'String');
delete data['first_name'];
}
if (data.hasOwnProperty('last_name')) {
obj['last_name'] = _ApiClient["default"].convertToType(data['last_name'], 'String');
delete data['last_name'];
}
if (data.hasOwnProperty('email_messages_count')) {
obj['email_messages_count'] = _ApiClient["default"].convertToType(data['email_messages_count'], 'Number');
delete data['email_messages_count'];
}
if (data.hasOwnProperty('activities_count')) {
obj['activities_count'] = _ApiClient["default"].convertToType(data['activities_count'], 'Number');
delete data['activities_count'];
}
if (data.hasOwnProperty('done_activities_count')) {
obj['done_activities_count'] = _ApiClient["default"].convertToType(data['done_activities_count'], 'Number');
delete data['done_activities_count'];
}
if (data.hasOwnProperty('undone_activities_count')) {
obj['undone_activities_count'] = _ApiClient["default"].convertToType(data['undone_activities_count'], 'Number');
delete data['undone_activities_count'];
}
if (data.hasOwnProperty('files_count')) {
obj['files_count'] = _ApiClient["default"].convertToType(data['files_count'], 'Number');
delete data['files_count'];
}
if (data.hasOwnProperty('notes_count')) {
obj['notes_count'] = _ApiClient["default"].convertToType(data['notes_count'], 'Number');
delete data['notes_count'];
}
if (data.hasOwnProperty('followers_count')) {
obj['followers_count'] = _ApiClient["default"].convertToType(data['followers_count'], 'Number');
delete data['followers_count'];
}
if (data.hasOwnProperty('last_incoming_mail_time')) {
obj['last_incoming_mail_time'] = _ApiClient["default"].convertToType(data['last_incoming_mail_time'], 'String');
delete data['last_incoming_mail_time'];
}
if (data.hasOwnProperty('last_outgoing_mail_time')) {
obj['last_outgoing_mail_time'] = _ApiClient["default"].convertToType(data['last_outgoing_mail_time'], 'String');
delete data['last_outgoing_mail_time'];
}
if (data.hasOwnProperty('open_deals_count')) {
obj['open_deals_count'] = _ApiClient["default"].convertToType(data['open_deals_count'], 'Number');
delete data['open_deals_count'];
}
if (data.hasOwnProperty('related_open_deals_count')) {
obj['related_open_deals_count'] = _ApiClient["default"].convertToType(data['related_open_deals_count'], 'Number');
delete data['related_open_deals_count'];
}
if (data.hasOwnProperty('closed_deals_count')) {
obj['closed_deals_count'] = _ApiClient["default"].convertToType(data['closed_deals_count'], 'Number');
delete data['closed_deals_count'];
}
if (data.hasOwnProperty('related_closed_deals_count')) {
obj['related_closed_deals_count'] = _ApiClient["default"].convertToType(data['related_closed_deals_count'], 'Number');
delete data['related_closed_deals_count'];
}
if (data.hasOwnProperty('won_deals_count')) {
obj['won_deals_count'] = _ApiClient["default"].convertToType(data['won_deals_count'], 'Number');
delete data['won_deals_count'];
}
if (data.hasOwnProperty('related_won_deals_count')) {
obj['related_won_deals_count'] = _ApiClient["default"].convertToType(data['related_won_deals_count'], 'Number');
delete data['related_won_deals_count'];
}
if (data.hasOwnProperty('lost_deals_count')) {
obj['lost_deals_count'] = _ApiClient["default"].convertToType(data['lost_deals_count'], 'Number');
delete data['lost_deals_count'];
}
if (data.hasOwnProperty('related_lost_deals_count')) {
obj['related_lost_deals_count'] = _ApiClient["default"].convertToType(data['related_lost_deals_count'], 'Number');
delete data['related_lost_deals_count'];
}
if (data.hasOwnProperty('next_activity_date')) {
obj['next_activity_date'] = _ApiClient["default"].convertToType(data['next_activity_date'], 'String');
delete data['next_activity_date'];
}
if (data.hasOwnProperty('next_activity_time')) {
obj['next_activity_time'] = _ApiClient["default"].convertToType(data['next_activity_time'], 'String');
delete data['next_activity_time'];
}
if (data.hasOwnProperty('next_activity_id')) {
obj['next_activity_id'] = _ApiClient["default"].convertToType(data['next_activity_id'], 'Number');
delete data['next_activity_id'];
}
if (data.hasOwnProperty('last_activity_id')) {
obj['last_activity_id'] = _ApiClient["default"].convertToType(data['last_activity_id'], 'Number');
delete data['last_activity_id'];
}
if (data.hasOwnProperty('last_activity_date')) {
obj['last_activity_date'] = _ApiClient["default"].convertToType(data['last_activity_date'], 'String');
delete data['last_activity_date'];
}
if (Object.keys(data).length > 0) {
Object.assign(obj, data);
}
}
return obj;
}
}]);
return PersonItem;
}();
/**
* The ID of the person
* @member {Number} id
*/
PersonItem.prototype['id'] = undefined;
/**
* The ID of the company related to the person
* @member {Number} company_id
*/
PersonItem.prototype['company_id'] = undefined;
/**
* Whether the person is active or not
* @member {Boolean} active_flag
*/
PersonItem.prototype['active_flag'] = 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
*/
PersonItem.prototype['phone'] = 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/BasePersonItemEmail>} email
*/
PersonItem.prototype['email'] = undefined;
/**
* The first letter of the name of the person
* @member {String} first_char
*/
PersonItem.prototype['first_char'] = undefined;
/**
* The date and time when the person was added/created. Format: YYYY-MM-DD HH:MM:SS
* @member {String} add_time
*/
PersonItem.prototype['add_time'] = undefined;
/**
* The last updated date and time of the person. Format: YYYY-MM-DD HH:MM:SS
* @member {String} update_time
*/
PersonItem.prototype['update_time'] = undefined;
/**
* The visibility group ID of who can see the person
* @member {String} visible_to
*/
PersonItem.prototype['visible_to'] = undefined;
/**
* @member {module:model/PictureDataWithID} picture_id
*/
PersonItem.prototype['picture_id'] = undefined;
/**
* The label assigned to the person
* @member {Number} label
*/
PersonItem.prototype['label'] = undefined;
/**
* The name of the organization associated with the person
* @member {String} org_name
*/
PersonItem.prototype['org_name'] = undefined;
/**
* The name of the owner associated with the person
* @member {String} owner_name
*/
PersonItem.prototype['owner_name'] = undefined;
/**
* The BCC email associated with the person
* @member {String} cc_email
*/
PersonItem.prototype['cc_email'] = undefined;
/**
* @member {module:model/Owner} owner_id
*/
PersonItem.prototype['owner_id'] = undefined;
/**
* @member {module:model/RelationshipOrganizationInfoItemWithActiveFlag} org_id
*/
PersonItem.prototype['org_id'] = undefined;
/**
* The name of the person
* @member {String} name
*/
PersonItem.prototype['name'] = undefined;
/**
* The first name of the person
* @member {String} first_name
*/
PersonItem.prototype['first_name'] = undefined;
/**
* The last name of the person
* @member {String} last_name
*/
PersonItem.prototype['last_name'] = undefined;
/**
* The count of email messages related to the person
* @member {Number} email_messages_count
*/
PersonItem.prototype['email_messages_count'] = undefined;
/**
* The count of activities related to the person
* @member {Number} activities_count
*/
PersonItem.prototype['activities_count'] = undefined;
/**
* The count of done activities related to the person
* @member {Number} done_activities_count
*/
PersonItem.prototype['done_activities_count'] = undefined;
/**
* The count of undone activities related to the person
* @member {Number} undone_activities_count
*/
PersonItem.prototype['undone_activities_count'] = undefined;
/**
* The count of files related to the person
* @member {Number} files_count
*/
PersonItem.prototype['files_count'] = undefined;
/**
* The count of notes related to the person
* @member {Number} notes_count
*/
PersonItem.prototype['notes_count'] = undefined;
/**
* The count of followers related to the person
* @member {Number} followers_count
*/
PersonItem.prototype['followers_count'] = undefined;
/**
* The date and time of the last incoming email associated with the person
* @member {String} last_incoming_mail_time
*/
PersonItem.prototype['last_incoming_mail_time'] = undefined;
/**
* The date and time of the last outgoing email associated with the person
* @member {String} last_outgoing_mail_time
*/
PersonItem.prototype['last_outgoing_mail_time'] = undefined;
/**
* The count of open deals related with the item
* @member {Number} open_deals_count
*/
PersonItem.prototype['open_deals_count'] = undefined;
/**
* The count of related open deals related with the item
* @member {Number} related_open_deals_count
*/
PersonItem.prototype['related_open_deals_count'] = undefined;
/**
* The count of closed deals related with the item
* @member {Number} closed_deals_count
*/
PersonItem.prototype['closed_deals_count'] = undefined;
/**
* The count of related closed deals related with the item
* @member {Number} related_closed_deals_count
*/
PersonItem.prototype['related_closed_deals_count'] = undefined;
/**
* The count of won deals related with the item
* @member {Number} won_deals_count
*/
PersonItem.prototype['won_deals_count'] = undefined;
/**
* The count of related won deals related with the item
* @member {Number} related_won_deals_count
*/
PersonItem.prototype['related_won_deals_count'] = undefined;
/**
* The count of lost deals related with the item
* @member {Number} lost_deals_count
*/
PersonItem.prototype['lost_deals_count'] = undefined;
/**
* The count of related lost deals related with the item
* @member {Number} related_lost_deals_count
*/
PersonItem.prototype['related_lost_deals_count'] = undefined;
/**
* The date of the next activity associated with the deal
* @member {String} next_activity_date
*/
PersonItem.prototype['next_activity_date'] = undefined;
/**
* The time of the next activity associated with the deal
* @member {String} next_activity_time
*/
PersonItem.prototype['next_activity_time'] = undefined;
/**
* The ID of the next activity associated with the deal
* @member {Number} next_activity_id
*/
PersonItem.prototype['next_activity_id'] = undefined;
/**
* The ID of the last activity associated with the deal
* @member {Number} last_activity_id
*/
PersonItem.prototype['last_activity_id'] = undefined;
/**
* The date of the last activity associated with the deal
* @member {String} last_activity_date
*/
PersonItem.prototype['last_activity_date'] = undefined;
// Implement BasePersonItem interface:
/**
* The ID of the person
* @member {Number} id
*/
_BasePersonItem["default"].prototype['id'] = undefined;
/**
* The ID of the company related to the person
* @member {Number} company_id
*/
_BasePersonItem["default"].prototype['company_id'] = undefined;
/**
* Whether the person is active or not
* @member {Boolean} active_flag
*/
_BasePersonItem["default"].prototype['active_flag'] = 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
*/
_BasePersonItem["default"].prototype['phone'] = 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/BasePersonItemEmail>} email
*/
_BasePersonItem["default"].prototype['email'] = undefined;
/**
* The first letter of the name of the person
* @member {String} first_char
*/
_BasePersonItem["default"].prototype['first_char'] = undefined;
/**
* The date and time when the person was added/created. Format: YYYY-MM-DD HH:MM:SS
* @member {String} add_time
*/
_BasePersonItem["default"].prototype['add_time'] = undefined;
/**
* The last updated date and time of the person. Format: YYYY-MM-DD HH:MM:SS
* @member {String} update_time
*/
_BasePersonItem["default"].prototype['update_time'] = undefined;
/**
* The visibility group ID of who can see the person
* @member {String} visible_to
*/
_BasePersonItem["default"].prototype['visible_to'] = undefined;
/**
* @member {module:model/PictureDataWithID} picture_id
*/
_BasePersonItem["default"].prototype['picture_id'] = undefined;
/**
* The label assigned to the person
* @member {Number} label
*/
_BasePersonItem["default"].prototype['label'] = undefined;
/**
* The name of the organization associated with the person
* @member {String} org_name
*/
_BasePersonItem["default"].prototype['org_name'] = undefined;
/**
* The name of the owner associated with the person
* @member {String} owner_name
*/
_BasePersonItem["default"].prototype['owner_name'] = undefined;
/**
* The BCC email associated with the person
* @member {String} cc_email
*/
_BasePersonItem["default"].prototype['cc_email'] = undefined;
// Implement AdditionalPersonInfo interface:
/**
* @member {module:model/Owner} owner_id
*/
_AdditionalPersonInfo["default"].prototype['owner_id'] = undefined;
/**
* @member {module:model/RelationshipOrganizationInfoItemWithActiveFlag} org_id
*/
_AdditionalPersonInfo["default"].prototype['org_id'] = undefined;
/**
* The name of the person
* @member {String} name
*/
_AdditionalPersonInfo["default"].prototype['name'] = undefined;
/**
* The first name of the person
* @member {String} first_name
*/
_AdditionalPersonInfo["default"].prototype['first_name'] = undefined;
/**
* The last name of the person
* @member {String} last_name
*/
_AdditionalPersonInfo["default"].prototype['last_name'] = undefined;
/**
* The count of email messages related to the person
* @member {Number} email_messages_count
*/
_AdditionalPersonInfo["default"].prototype['email_messages_count'] = undefined;
/**
* The count of activities related to the person
* @member {Number} activities_count
*/
_AdditionalPersonInfo["default"].prototype['activities_count'] = undefined;
/**
* The count of done activities related to the person
* @member {Number} done_activities_count
*/
_AdditionalPersonInfo["default"].prototype['done_activities_count'] = undefined;
/**
* The count of undone activities related to the person
* @member {Number} undone_activities_count
*/
_AdditionalPersonInfo["default"].prototype['undone_activities_count'] = undefined;
/**
* The count of files related to the person
* @member {Number} files_count
*/
_AdditionalPersonInfo["default"].prototype['files_count'] = undefined;
/**
* The count of notes related to the person
* @member {Number} notes_count
*/
_AdditionalPersonInfo["default"].prototype['notes_count'] = undefined;
/**
* The count of followers related to the person
* @member {Number} followers_count
*/
_AdditionalPersonInfo["default"].prototype['followers_count'] = undefined;
/**
* The date and time of the last incoming email associated with the person
* @member {String} last_incoming_mail_time
*/
_AdditionalPersonInfo["default"].prototype['last_incoming_mail_time'] = undefined;
/**
* The date and time of the last outgoing email associated with the person
* @member {String} last_outgoing_mail_time
*/
_AdditionalPersonInfo["default"].prototype['last_outgoing_mail_time'] = undefined;
/**
* The count of open deals related with the item
* @member {Number} open_deals_count
*/
_AdditionalPersonInfo["default"].prototype['open_deals_count'] = undefined;
/**
* The count of related open deals related with the item
* @member {Number} related_open_deals_count
*/
_AdditionalPersonInfo["default"].prototype['related_open_deals_count'] = undefined;
/**
* The count of closed deals related with the item
* @member {Number} closed_deals_count
*/
_AdditionalPersonInfo["default"].prototype['closed_deals_count'] = undefined;
/**
* The count of related closed deals related with the item
* @member {Number} related_closed_deals_count
*/
_AdditionalPersonInfo["default"].prototype['related_closed_deals_count'] = undefined;
/**
* The count of won deals related with the item
* @member {Number} won_deals_count
*/
_AdditionalPersonInfo["default"].prototype['won_deals_count'] = undefined;
/**
* The count of related won deals related with the item
* @member {Number} related_won_deals_count
*/
_AdditionalPersonInfo["default"].prototype['related_won_deals_count'] = undefined;
/**
* The count of lost deals related with the item
* @member {Number} lost_deals_count
*/
_AdditionalPersonInfo["default"].prototype['lost_deals_count'] = undefined;
/**
* The count of related lost deals related with the item
* @member {Number} related_lost_deals_count
*/
_AdditionalPersonInfo["default"].prototype['related_lost_deals_count'] = undefined;
/**
* The date of the next activity associated with the deal
* @member {String} next_activity_date
*/
_AdditionalPersonInfo["default"].prototype['next_activity_date'] = undefined;
/**
* The time of the next activity associated with the deal
* @member {String} next_activity_time
*/
_AdditionalPersonInfo["default"].prototype['next_activity_time'] = undefined;
/**
* The ID of the next activity associated with the deal
* @member {Number} next_activity_id
*/
_AdditionalPersonInfo["default"].prototype['next_activity_id'] = undefined;
/**
* The ID of the last activity associated with the deal
* @member {Number} last_activity_id
*/
_AdditionalPersonInfo["default"].prototype['last_activity_id'] = undefined;
/**
* The date of the last activity associated with the deal
* @member {String} last_activity_date
*/
_AdditionalPersonInfo["default"].prototype['last_activity_date'] = undefined;
var _default = PersonItem;
exports["default"] = _default;