Class: Io::Flow::V0::Models::ChannelDefaultBankAccount

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

Returns a new instance of ChannelDefaultBankAccount.



35007
35008
35009
35010
35011
35012
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35007

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:id, :bank_account], 'ChannelDefaultBankAccount')
  @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.



35005
35006
35007
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35005

def 
  @bank_account
end

#idObject (readonly)

Returns the value of attribute id.



35005
35006
35007
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35005

def id
  @id
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



35018
35019
35020
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35018

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

#to_hashObject



35022
35023
35024
35025
35026
35027
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35022

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

#to_jsonObject



35014
35015
35016
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35014

def to_json
  JSON.dump(to_hash)
end