Class: Boletoman::Services::Itau::Boleto::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/boletoman/services/itau/boleto/request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Request

Returns a new instance of Request.



14
15
16
# File 'lib/boletoman/services/itau/boleto/request.rb', line 14

def initialize(data)
  @data = data
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



12
13
14
# File 'lib/boletoman/services/itau/boleto/request.rb', line 12

def data
  @data
end

Instance Method Details

#callObject



18
19
20
21
22
# File 'lib/boletoman/services/itau/boleto/request.rb', line 18

def call
  Response.new(request).tap do |response|
    raise "Falha ao gerar dados do boleto #{response.body}" if response.error?
  end
end