Class: Io::Flow::V0::Models::BankAccountInfoUsa

Inherits:
BankAccountInfo show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Attributes inherited from BankAccountInfo

#discriminator

Instance Method Summary collapse

Methods inherited from BankAccountInfo

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ BankAccountInfoUsa

Returns a new instance of BankAccountInfoUsa.



32160
32161
32162
32163
32164
32165
32166
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32160

def initialize(incoming={})
  super(:discriminator => BankAccountInfo::Types::BANK_ACCOUNT_INFO_USA)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:routing_number, :account_number], 'BankAccountInfoUsa')
  @routing_number = HttpClient::Preconditions.assert_class('routing_number', opts.delete(:routing_number), String)
  @account_number = HttpClient::Preconditions.assert_class('account_number', opts.delete(:account_number), String)
end

Instance Attribute Details

#account_numberObject (readonly)

Returns the value of attribute account_number.



32158
32159
32160
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32158

def 
  @account_number
end

#routing_numberObject (readonly)

Returns the value of attribute routing_number.



32158
32159
32160
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32158

def routing_number
  @routing_number
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



32172
32173
32174
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32172

def copy(incoming={})
  BankAccountInfoUsa.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#subtype_to_hashObject



32176
32177
32178
32179
32180
32181
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32176

def subtype_to_hash
  {
    :routing_number => routing_number,
    :account_number => 
  }
end

#to_jsonObject



32168
32169
32170
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32168

def to_json
  JSON.dump(to_hash)
end