Class: PFS::Resources::Accounts::Account

Inherits:
Base
  • Object
show all
Defined in:
lib/pfs/resources/accounts/account.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#response

Instance Method Summary collapse

Methods inherited from Base

map

Constructor Details

#initialize(response, attributes = {}) ⇒ Account

Returns a new instance of Account.



12
13
14
15
16
# File 'lib/pfs/resources/accounts/account.rb', line 12

def initialize(response, attributes = {})
  super(response, attributes)
  @holder = AccountHolder.new(response, attributes.dig(:accountInfo, :cardholder))
  @info = AccountInfo.new(response, attributes.dig(:accountInfo, :card))
end

Instance Attribute Details

#holderObject (readonly)

Returns the value of attribute holder.



7
8
9
# File 'lib/pfs/resources/accounts/account.rb', line 7

def holder
  @holder
end

#infoObject (readonly)

Returns the value of attribute info.



7
8
9
# File 'lib/pfs/resources/accounts/account.rb', line 7

def info
  @info
end