Class: Io::Flow::V0::Models::BankAccountReference

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

Returns a new instance of BankAccountReference.



32189
32190
32191
32192
32193
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32189

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

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



32187
32188
32189
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32187

def id
  @id
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



32199
32200
32201
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32199

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

#to_hashObject



32203
32204
32205
32206
32207
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32203

def to_hash
  {
    :id => id
  }
end

#to_jsonObject



32195
32196
32197
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32195

def to_json
  JSON.dump(to_hash)
end