Class: AdvisorsCommandClient::Models::Contact

Inherits:
Base
  • Object
show all
Defined in:
lib/advisors_command_client/models/contact.rb

Instance Method Summary collapse

Methods inherited from Base

deep_underscore_params, #initialize, load

Constructor Details

This class inherits a constructor from AdvisorsCommandClient::Models::Base

Instance Method Details

#accountsObject



24
25
26
27
28
29
30
31
32
33
# File 'lib/advisors_command_client/models/contact.rb', line 24

def accounts
  @accounts ||= @original_hash['accounts'].map do |id|
    resp = @connection.get("accounts/#{id}")
    if resp.success?
      AdvisorsCommandClient::Models::Account.load(resp.body)
    else
      nil
    end
  end
end

#full_nameObject



20
21
22
# File 'lib/advisors_command_client/models/contact.rb', line 20

def full_name
  [first_name, middle_name, last_name].compact.join(' ')
end