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



28
29
30
31
32
33
34
35
# File 'lib/advisors_command_client/models/contact.rb', line 28

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

#full_nameObject



24
25
26
# File 'lib/advisors_command_client/models/contact.rb', line 24

def full_name
  [name_prefix, first_name, middle_name, last_name, name_suffix].reject(&:blank?).join(' ')
end