Class: Modulr::Resources::Accounts::Account

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

Constant Summary collapse

STATUS =
{
  active: "ACTIVE",
  blocked: "BLOCKED",
  closed: "CLOSED",
  client_blocked: "CLIENT_BLOCKED",
}.freeze

Instance Attribute Summary collapse

Attributes inherited from Base

#response

Instance Method Summary collapse

Methods inherited from Base

map

Constructor Details

#initialize(response, attributes, opts = { requested_at: nil }) ⇒ Account

Returns a new instance of Account.



26
27
28
29
30
31
# File 'lib/modulr/resources/accounts/account.rb', line 26

def initialize(response, attributes, opts = { requested_at: nil })
  super(response, attributes)

  @requested_at = opts[:requested_at]
  @identifiers = Accounts::Identifiers.new(nil, attributes[:identifiers])
end

Instance Attribute Details

#identifiersObject (readonly)

Returns the value of attribute identifiers.



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

def identifiers
  @identifiers
end

#requested_atObject (readonly)

Returns the value of attribute requested_at.



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

def requested_at
  @requested_at
end