Class: Tradier::Profile

Inherits:
Base
  • Object
show all
Defined in:
lib/tradier/profile.rb

Instance Method Summary collapse

Methods inherited from Base

#[], #attr_equal, attr_reader, #attrs, #attrs_equal, from_response, #initialize, #update

Constructor Details

This class inherits a constructor from Tradier::Base

Instance Method Details

#accountsObject



10
11
12
# File 'lib/tradier/profile.rb', line 10

def accounts
  @accounts ||= @attrs[:profile] && [@attrs[:profile][:account]].flatten.map { |a| Tradier::Account.new(a); }
end

#nameObject



6
7
8
# File 'lib/tradier/profile.rb', line 6

def name
  @name ||= @attrs[:profile] && @attrs[:profile][:name]
end