Class: RIQ::User

Inherits:
RIQObject show all
Defined in:
lib/riq/user.rb

Overview

Users are represented by owners and contacts in your SalesforceIQ organization

Instance Attribute Summary collapse

Attributes inherited from RIQObject

#id, #modified_date

Instance Method Summary collapse

Methods inherited from RIQObject

#delete, #initialize, node, #payload

Constructor Details

This class inherits a constructor from RIQ::RIQObject

Instance Attribute Details

#emailObject

Returns the value of attribute email.



7
8
9
# File 'lib/riq/user.rb', line 7

def email
  @email
end

#nameObject

Returns the value of attribute name.



6
7
8
# File 'lib/riq/user.rb', line 6

def name
  @name
end

Instance Method Details

#dataHash

Returns all relevant stored data.

Returns:

  • (Hash)

    all relevant stored data



15
16
17
18
19
20
21
# File 'lib/riq/user.rb', line 15

def data
  {
    id: @id,
    name: @name,
    email: @email
  }
end

#nodeString

Returns endpoint.

Returns:

  • (String)

    endpoint



10
11
12
# File 'lib/riq/user.rb', line 10

def node
  "users/#{@id}"
end

#saveObject

Overwriting parent because lists can’t be saved through the API



24
25
26
# File 'lib/riq/user.rb', line 24

def save
  raise NotImplementedError, "Users can't be edited through the API"
end