module Paperdrive::Client::OrganizationRelationships

Instance methods related to OrganizationRelationships to embed into Paperdrive::Client
arguments are compatible with the Pipedribe API.

@see developers.pipedrive.com/docs/api/v1/#!/OrganizationRelationships

Public Instance Methods

all_organization_relationships(**args) click to toggle source
GET

Get all relationships for organization

@see developers.pipedrive.com/docs/api/v1/#!/OrganizationRelationships/get_organizationRelationships @return [Paperdrive::Response]

# File lib/paperdrive/client/organization_relationships.rb, line 18
def all_organization_relationships(**args)
  params = parameters(args) do
    required_params :org_id
    optional_params :org_id
  end
  request(:get, 'organizationRelationships', params)
end
create_organization_relationship(**args) click to toggle source
POST

Create an organization relationship

@see developers.pipedrive.com/docs/api/v1/#!/OrganizationRelationships/post_organizationRelationships @return [Paperdrive::Response]

# File lib/paperdrive/client/organization_relationships.rb, line 42
def create_organization_relationship(**args)
  params = parameters(args) do
    required_params :type, :rel_owner_org_id, :rel_linked_org_id
    optional_params :org_id, :type, :rel_owner_org_id, :rel_linked_org_id
  end
  request(:post, 'organizationRelationships', params)
end
delete_organization_relationship(id:, **args) click to toggle source
DELETE

Delete an organization relationship

@param [integer] id: @see developers.pipedrive.com/docs/api/v1/#!/OrganizationRelationships/delete_organizationRelationships_id @return [Paperdrive::Response]

# File lib/paperdrive/client/organization_relationships.rb, line 67
def delete_organization_relationship(id:, **args)
  params = parameters(args) do
    optional_params
  end
  request(:delete, "organizationRelationships/#{id}", params)
end
organization_relationship(id:, **args) click to toggle source
GET

Get one organization relationship

@param [integer] id: @see developers.pipedrive.com/docs/api/v1/#!/OrganizationRelationships/get_organizationRelationships_id @return [Paperdrive::Response]

# File lib/paperdrive/client/organization_relationships.rb, line 31
def organization_relationship(id:, **args)
  params = parameters(args) do
    optional_params :org_id
  end
  request(:get, "organizationRelationships/#{id}", params)
end
update_organization_relationship(id:, **args) click to toggle source
PUT

Update an organization relationship

@param [integer] id: @see developers.pipedrive.com/docs/api/v1/#!/OrganizationRelationships/put_organizationRelationships_id @return [Paperdrive::Response]

# File lib/paperdrive/client/organization_relationships.rb, line 55
def update_organization_relationship(id:, **args)
  params = parameters(args) do
    optional_params :org_id, :type, :rel_owner_org_id, :rel_linked_org_id
  end
  request(:put, "organizationRelationships/#{id}", params)
end