Class: Ibancom::Resources::IBAN::Checks

Inherits:
Collection
  • Object
show all
Defined in:
lib/ibancom/resources/iban/checks.rb

Instance Attribute Summary

Attributes inherited from Collection

#response

Instance Method Summary collapse

Methods inherited from Collection

#each

Constructor Details

#initialize(response, attributes_collection) ⇒ Checks

Returns a new instance of Checks.



7
8
9
10
11
12
13
14
15
16
# File 'lib/ibancom/resources/iban/checks.rb', line 7

def initialize(response, attributes_collection)
  parsed = attributes_collection.map do |check_attributes|
    {
      type: check_attributes[0],
      code: check_attributes[1][:code],
      message: check_attributes[1][:message],
    }
  end
  super(response, Check, parsed)
end