Class: Io::Flow::V0::Models::OrganizationDefaultBankAccount

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

Returns a new instance of OrganizationDefaultBankAccount.



54764
54765
54766
54767
54768
54769
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54764

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:id, :bank_account], 'OrganizationDefaultBankAccount')
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
  @bank_account = (x = opts.delete(:bank_account); x.is_a?(::Io::Flow::V0::Models::BankAccountReference) ? x : ::Io::Flow::V0::Models::BankAccountReference.new(x))
end

Instance Attribute Details

#bank_accountObject (readonly)

Returns the value of attribute bank_account.



54762
54763
54764
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54762

def 
  @bank_account
end

#idObject (readonly)

Returns the value of attribute id.



54762
54763
54764
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54762

def id
  @id
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



54775
54776
54777
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54775

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

#to_hashObject



54779
54780
54781
54782
54783
54784
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54779

def to_hash
  {
    :id => id,
    :bank_account => .to_hash
  }
end

#to_jsonObject



54771
54772
54773
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54771

def to_json
  JSON.dump(to_hash)
end