File: /var/www/fintechfuel/node_modules/pipedrive/dist/model/OrganizationRelationship.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 OrganizationRelationship model module.
* @module model/OrganizationRelationship
* @version 1.0.0
*/
var OrganizationRelationship = /*#__PURE__*/function () {
/**
* Constructs a new <code>OrganizationRelationship</code>.
* @alias module:model/OrganizationRelationship
*/
function OrganizationRelationship() {
(0, _classCallCheck2["default"])(this, OrganizationRelationship);
OrganizationRelationship.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"])(OrganizationRelationship, null, [{
key: "initialize",
value: function initialize(obj) {}
/**
* Constructs a <code>OrganizationRelationship</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/OrganizationRelationship} obj Optional instance to populate.
* @return {module:model/OrganizationRelationship} The populated <code>OrganizationRelationship</code> instance.
*/
}, {
key: "constructFromObject",
value: function constructFromObject(data, obj) {
if (data) {
obj = obj || new OrganizationRelationship();
if (data.hasOwnProperty('org_id')) {
obj['org_id'] = _ApiClient["default"].convertToType(data['org_id'], 'Number');
delete data['org_id'];
}
if (data.hasOwnProperty('type')) {
obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String');
delete data['type'];
}
if (data.hasOwnProperty('rel_owner_org_id')) {
obj['rel_owner_org_id'] = _ApiClient["default"].convertToType(data['rel_owner_org_id'], 'Number');
delete data['rel_owner_org_id'];
}
if (data.hasOwnProperty('rel_linked_org_id')) {
obj['rel_linked_org_id'] = _ApiClient["default"].convertToType(data['rel_linked_org_id'], 'Number');
delete data['rel_linked_org_id'];
}
if (Object.keys(data).length > 0) {
Object.assign(obj, data);
}
}
return obj;
}
}]);
return OrganizationRelationship;
}();
/**
* The ID of the base organization for the returned calculated values
* @member {Number} org_id
*/
OrganizationRelationship.prototype['org_id'] = undefined;
/**
* The type of organization relationship
* @member {module:model/OrganizationRelationship.TypeEnum} type
*/
OrganizationRelationship.prototype['type'] = undefined;
/**
* The owner of this relationship. If type is `parent`, then the owner is the parent and the linked organization is the daughter.
* @member {Number} rel_owner_org_id
*/
OrganizationRelationship.prototype['rel_owner_org_id'] = undefined;
/**
* The linked organization in this relationship. If type is `parent`, then the linked organization is the daughter.
* @member {Number} rel_linked_org_id
*/
OrganizationRelationship.prototype['rel_linked_org_id'] = undefined;
/**
* Allowed values for the <code>type</code> property.
* @enum {String}
* @readonly
*/
OrganizationRelationship['TypeEnum'] = {
/**
* value: "parent"
* @const
*/
"parent": "parent",
/**
* value: "related"
* @const
*/
"related": "related"
};
var _default = OrganizationRelationship;
exports["default"] = _default;