Class: Io::Flow::V0::Models::BankAccountSummary

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ BankAccountSummary

Returns a new instance of BankAccountSummary.



32215
32216
32217
32218
32219
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32215

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:last4], 'BankAccountSummary')
  @last4 = HttpClient::Preconditions.assert_class('last4', opts.delete(:last4), String)
end

Instance Attribute Details

#last4Object (readonly)

Returns the value of attribute last4.



32213
32214
32215
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32213

def last4
  @last4
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



32225
32226
32227
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32225

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

#to_hashObject



32229
32230
32231
32232
32233
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32229

def to_hash
  {
    :last4 => last4
  }
end

#to_jsonObject



32221
32222
32223
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32221

def to_json
  JSON.dump(to_hash)
end