module Moneta::Front::ServiceMethods
Public Instance Methods
get_receipt_pdf(operation_id)
click to toggle source
# File lib/moneta/front/service_methods.rb, line 4 def get_receipt_pdf(operation_id) url = "report/receipt.htm?operationId=#{operation_id}&format=pdf" call(url) end
Private Instance Methods
call(url)
click to toggle source
# File lib/moneta/front/service_methods.rb, line 12 def call(url) response = request(url) case response.status when 200..230 then response.body else raise Moneta::Front::HTTPException.new("Status code: #{response.status}") end rescue Faraday::Error => e raise Moneta::Front::HTTPException.new(e.message) end