Class: Boletoman::Services::Itau::Boleto::Request
- Inherits:
-
Object
- Object
- Boletoman::Services::Itau::Boleto::Request
- Defined in:
- lib/boletoman/services/itau/boleto/request.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(data) ⇒ Request
constructor
A new instance of Request.
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
#data ⇒ Object (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
#call ⇒ Object
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 |