Class: Docdata::Bank

Inherits:
Object
  • Object
show all
Defined in:
lib/docdata/bank.rb

Overview

Object representing a "Bank" object with attributes provided by Mollie

Examples:

Bank.new({
  :id => "0031",
  :name => "ABN AMRO"
})

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(values = nil) ⇒ Bank

Initializer to transform a +Hash+ into an Bank object

Parameters:

  • values (Hash) (defaults to: nil)


20
21
22
23
24
25
# File 'lib/docdata/bank.rb', line 20

def initialize(values=nil)
  return if values.nil?

  @id = values[:id].to_s
  @name = values[:name].to_s
end

Instance Attribute Details

#idString

Returns The id of the bank provided by Mollie.

Returns:

  • (String)

    The id of the bank provided by Mollie.



12
13
14
# File 'lib/docdata/bank.rb', line 12

def id
  @id
end

#nameString

Returns The name of the bank.

Returns:

  • (String)

    The name of the bank.



14
15
16
# File 'lib/docdata/bank.rb', line 14

def name
  @name
end