Class: Credigy::BoletoResponse

Inherits:
Response
  • Object
show all
Defined in:
lib/credigy/boleto_response.rb

Instance Attribute Summary

Attributes inherited from Response

#raw_response, #requester

Instance Method Summary collapse

Methods inherited from Response

#body, #initialize, #root_key

Constructor Details

This class inherits a constructor from Credigy::Response

Instance Method Details

#pdfObject

Raises:



7
8
9
10
11
# File 'lib/credigy/boleto_response.rb', line 7

def pdf
  raise(BoletoNotAvailable, body) if boleto_not_available?

  Base64.decode64(body[:boleto])
end

#sub_root_keyObject



13
14
15
# File 'lib/credigy/boleto_response.rb', line 13

def sub_root_key
  :ws_result_boleto
end