Class: Io::Flow::V0::Models::OrganizationBankAccount

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 = {}) ⇒ OrganizationBankAccount

Returns a new instance of OrganizationBankAccount.



54708
54709
54710
54711
54712
54713
54714
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54708

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

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



54706
54707
54708
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54706

def id
  @id
end

#keyObject (readonly)

Returns the value of attribute key.



54706
54707
54708
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54706

def key
  @key
end

#last4Object (readonly)

Returns the value of attribute last4.



54706
54707
54708
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54706

def last4
  @last4
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



54720
54721
54722
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54720

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

#to_hashObject



54724
54725
54726
54727
54728
54729
54730
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54724

def to_hash
  {
    :id => id,
    :key => key,
    :last4 => last4
  }
end

#to_jsonObject



54716
54717
54718
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54716

def to_json
  JSON.dump(to_hash)
end