Class: Io::Flow::V0::Models::ChannelDefaultBankAccount
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ChannelDefaultBankAccount
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#bank_account ⇒ Object
readonly
Returns the value of attribute bank_account.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ChannelDefaultBankAccount
constructor
A new instance of ChannelDefaultBankAccount.
- #to_hash ⇒ Object
- #to_json ⇒ Object
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_account ⇒ Object (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 @bank_account end |
#id ⇒ Object (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_hash ⇒ Object
35022 35023 35024 35025 35026 35027 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35022 def to_hash { :id => id, :bank_account => bank_account.to_hash } end |
#to_json ⇒ Object
35014 35015 35016 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35014 def to_json JSON.dump(to_hash) end |