Class: AqumulateAPI::Account
- Defined in:
- lib/aqumulate_api/entities/account.rb
Constant Summary collapse
- ATTR_MAP =
{ id: 'AcctId', login_account_id: 'FILoginAcctId', added_by: 'AccountAddedBy', financial_institution_id: 'FIId', financial_institution_name: 'FIName', account_type: 'AccountType', account_type_extended: 'ExtendedAccountType', nick_name: 'NickNameAtFI', update_error_code: 'UpdateErrorCode', retirement_status: 'RetirementStatus', instrument: 'Instrument', ownership: 'AccountOwnership', adv_access: 'AdvAccess', tracking_code: 'TrackingCode', last_update_status_code: 'LastUpdateStatusCode', last_update_status_msg: 'LastUpdateStatusMsg', last_update_status_msg_fi: 'LastUpdateStatusMessageAtFI', last_update_attempt: 'LastUpdateAttempt', last_update: 'LastSuccessfulUpdate' }
- SOURCE_ASSOCIATIONS =
[ { key: 'AccountBalances', class: AccountBalance, attr: :account_balances }, { key: 'Positions', class: Position, attr: :positions } ]
Instance Attribute Summary collapse
-
#account_balances ⇒ Object
Returns the value of attribute account_balances.
-
#account_type ⇒ Object
Returns the value of attribute account_type.
-
#account_type_extended ⇒ Object
Returns the value of attribute account_type_extended.
-
#added_by ⇒ Object
Returns the value of attribute added_by.
-
#adv_access ⇒ Object
Returns the value of attribute adv_access.
-
#financial_institution_id ⇒ Object
Returns the value of attribute financial_institution_id.
-
#financial_institution_name ⇒ Object
Returns the value of attribute financial_institution_name.
-
#id ⇒ Object
Returns the value of attribute id.
-
#instrument ⇒ Object
Returns the value of attribute instrument.
-
#last_update ⇒ Object
Returns the value of attribute last_update.
-
#last_update_attempt ⇒ Object
Returns the value of attribute last_update_attempt.
-
#last_update_status_code ⇒ Object
Returns the value of attribute last_update_status_code.
-
#last_update_status_msg ⇒ Object
Returns the value of attribute last_update_status_msg.
-
#last_update_status_msg_fi ⇒ Object
Returns the value of attribute last_update_status_msg_fi.
-
#login_account_id ⇒ Object
Returns the value of attribute login_account_id.
-
#nick_name ⇒ Object
Returns the value of attribute nick_name.
-
#ownership ⇒ Object
Returns the value of attribute ownership.
-
#positions ⇒ Object
Returns the value of attribute positions.
-
#retirement_status ⇒ Object
Returns the value of attribute retirement_status.
-
#tracking_code ⇒ Object
Returns the value of attribute tracking_code.
-
#update_error_code ⇒ Object
Returns the value of attribute update_error_code.
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Entity
Constructor Details
This class inherits a constructor from AqumulateAPI::Entity
Instance Attribute Details
#account_balances ⇒ Object
Returns the value of attribute account_balances.
31 32 33 |
# File 'lib/aqumulate_api/entities/account.rb', line 31 def account_balances @account_balances end |
#account_type ⇒ Object
Returns the value of attribute account_type.
31 32 33 |
# File 'lib/aqumulate_api/entities/account.rb', line 31 def account_type @account_type end |
#account_type_extended ⇒ Object
Returns the value of attribute account_type_extended.
31 32 33 |
# File 'lib/aqumulate_api/entities/account.rb', line 31 def account_type_extended @account_type_extended end |
#added_by ⇒ Object
Returns the value of attribute added_by.
31 32 33 |
# File 'lib/aqumulate_api/entities/account.rb', line 31 def added_by @added_by end |
#adv_access ⇒ Object
Returns the value of attribute adv_access.
31 32 33 |
# File 'lib/aqumulate_api/entities/account.rb', line 31 def adv_access @adv_access end |
#financial_institution_id ⇒ Object
Returns the value of attribute financial_institution_id.
31 32 33 |
# File 'lib/aqumulate_api/entities/account.rb', line 31 def financial_institution_id @financial_institution_id end |
#financial_institution_name ⇒ Object
Returns the value of attribute financial_institution_name.
31 32 33 |
# File 'lib/aqumulate_api/entities/account.rb', line 31 def financial_institution_name @financial_institution_name end |
#id ⇒ Object
Returns the value of attribute id.
31 32 33 |
# File 'lib/aqumulate_api/entities/account.rb', line 31 def id @id end |
#instrument ⇒ Object
Returns the value of attribute instrument.
31 32 33 |
# File 'lib/aqumulate_api/entities/account.rb', line 31 def instrument @instrument end |
#last_update ⇒ Object
Returns the value of attribute last_update.
31 32 33 |
# File 'lib/aqumulate_api/entities/account.rb', line 31 def last_update @last_update end |
#last_update_attempt ⇒ Object
Returns the value of attribute last_update_attempt.
31 32 33 |
# File 'lib/aqumulate_api/entities/account.rb', line 31 def last_update_attempt @last_update_attempt end |
#last_update_status_code ⇒ Object
Returns the value of attribute last_update_status_code.
31 32 33 |
# File 'lib/aqumulate_api/entities/account.rb', line 31 def last_update_status_code @last_update_status_code end |
#last_update_status_msg ⇒ Object
Returns the value of attribute last_update_status_msg.
31 32 33 |
# File 'lib/aqumulate_api/entities/account.rb', line 31 def last_update_status_msg @last_update_status_msg end |
#last_update_status_msg_fi ⇒ Object
Returns the value of attribute last_update_status_msg_fi.
31 32 33 |
# File 'lib/aqumulate_api/entities/account.rb', line 31 def last_update_status_msg_fi @last_update_status_msg_fi end |
#login_account_id ⇒ Object
Returns the value of attribute login_account_id.
31 32 33 |
# File 'lib/aqumulate_api/entities/account.rb', line 31 def login_account_id @login_account_id end |
#nick_name ⇒ Object
Returns the value of attribute nick_name.
31 32 33 |
# File 'lib/aqumulate_api/entities/account.rb', line 31 def nick_name @nick_name end |
#ownership ⇒ Object
Returns the value of attribute ownership.
31 32 33 |
# File 'lib/aqumulate_api/entities/account.rb', line 31 def ownership @ownership end |
#positions ⇒ Object
Returns the value of attribute positions.
31 32 33 |
# File 'lib/aqumulate_api/entities/account.rb', line 31 def positions @positions end |
#retirement_status ⇒ Object
Returns the value of attribute retirement_status.
31 32 33 |
# File 'lib/aqumulate_api/entities/account.rb', line 31 def retirement_status @retirement_status end |
#tracking_code ⇒ Object
Returns the value of attribute tracking_code.
31 32 33 |
# File 'lib/aqumulate_api/entities/account.rb', line 31 def tracking_code @tracking_code end |
#update_error_code ⇒ Object
Returns the value of attribute update_error_code.
31 32 33 |
# File 'lib/aqumulate_api/entities/account.rb', line 31 def update_error_code @update_error_code end |
Class Method Details
.fetch(advisor, fi_id = nil) ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/aqumulate_api/entities/account.rb', line 37 def self.fetch(advisor, fi_id = nil) body = { 'SessionId' => advisor.session_id } if fi_id.nil? response = AggAccount.advisor_get_aggregate_account(body) else body['FIId'] = fi_id response = AggAccount.advisor_agg_get_account_for_fi(body) end return [] unless response.has_key?('Accounts') response['Accounts'].map { |source| from_source(source) } end |
Instance Method Details
#financial_institution ⇒ Object
59 60 61 |
# File 'lib/aqumulate_api/entities/account.rb', line 59 def financial_institution @financial_institution ||= FinancialInstitution.find(financial_institution_id) end |