Class: Io::Flow::V0::Models::OrganizationDefaultBankAccount
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrganizationDefaultBankAccount
- 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 = {}) ⇒ OrganizationDefaultBankAccount
constructor
A new instance of OrganizationDefaultBankAccount.
- #to_hash ⇒ Object
- #to_json ⇒ Object
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_account ⇒ Object (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 @bank_account end |
#id ⇒ Object (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_hash ⇒ Object
54779 54780 54781 54782 54783 54784 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54779 def to_hash { :id => id, :bank_account => bank_account.to_hash } end |
#to_json ⇒ Object
54771 54772 54773 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54771 def to_json JSON.dump(to_hash) end |