lib/economic/invoice.rb in rconomic-0.4.1 vs lib/economic/invoice.rb in rconomic-0.5.0

- old
+ new

@@ -33,25 +33,25 @@ @debtor = nil unless handle == @debtor_handle @debtor_handle = handle end def remainder - session.request(soap_action(:get_remainder)) do - soap.body = { "invoiceHandle" => handle.to_hash } - end + request(:get_remainder, { + "invoiceHandle" => handle.to_hash + }) end # Returns the PDF version of Invoice as a String. # # To get it as a file you can do: # # File.open("invoice.pdf", 'wb') do |file| # file << invoice.pdf # end def pdf - response = session.request soap_action(:get_pdf) do - soap.body = { "invoiceHandle" => handle.to_hash } - end + response = request(:get_pdf, { + "invoiceHandle" => handle.to_hash + }) Base64.decode64(response) end end end