Class: Bloomerang::Relationship

Inherits:
Base
  • Object
show all
Defined in:
lib/bloomerang/relationship.rb

Overview

Bloomerang::Relationship bloomerang.co/product/integrations-data-management/api/rest-api/#/Relationships Id integer($int64) AccountId1* integer($int64) AccountId2* integer($int64) Note string RelationshipRoleId1* id from RelationshipRole (object) RelationshipRoleId2* id from RelationshipRole (object) bloomerang.co/product/integrations-data-management/api/rest-api/#/Relationship%20Roles Id integer($int64) SortIndex integer($int32) Name string IsDefault boolean, Is this the default? IsActive boolean, Is this active?

Class Method Summary collapse

Methods inherited from Base

get, post, put

Class Method Details

.create(body) ⇒ Object

Relationships: Create a relationship between two non-household constituents bloomerang.co/product/integrations-data-management/api/rest-api/#/Relationships/post_relationship

Params: body JSON object, see API for fields



25
26
27
# File 'lib/bloomerang/relationship.rb', line 25

def self.create(body)
  post("relationship", {}, body)
end

.delete(id) ⇒ Object



53
54
55
# File 'lib/bloomerang/relationship.rb', line 53

def self.delete(id)
  delete("relationship/#{id}")
end

.fetch_roles(params = {}) ⇒ Object

ROLES: Fetch all roles bloomerang.co/product/integrations-data-management/api/rest-api/#/Relationship%20Roles/get_relationshiproles

Params: skip integer, default: 0, simple paging system take integer, default: 50, simple paging system id array, separated by pipes: “1|2|3” name array, Filters to relationship roles with the names in the list (pipe-separated) isActive boolean, Filters to either active or inactive relationship roles



67
68
69
# File 'lib/bloomerang/relationship.rb', line 67

def self.fetch_roles(params = {})
  get("relationshiproles", params)
end

.get_role(role_id) ⇒ Object



76
77
78
# File 'lib/bloomerang/relationship.rb', line 76

def self.get_role(role_id)
  get("relationshiprole/#{role_id}")
end

.show(id) ⇒ Object



34
35
36
# File 'lib/bloomerang/relationship.rb', line 34

def self.show(id)
  get("relationship/#{id}")
end

.update(id, body) ⇒ Object

Update a relationship bloomerang.co/product/integrations-data-management/api/rest-api/#/Relationships/put_relationship_id

Params: id integer body JSON object, see API for fields



44
45
46
# File 'lib/bloomerang/relationship.rb', line 44

def self.update(id, body)
  put("relationship/#{id}", {}, body)
end