class Billomat::Actions::Pdf
This class allows to download the invoice as a pdf. The PDF comes in a base64 encoded string in the response body.
Public Class Methods
new(invoice_id, opts = {})
click to toggle source
@param [String] invoice_id The invoice ID @param [Hash] opts The options for this action
@return [Billomat::Actions::Pdf]
# File lib/billomat/actions/pdf.rb, line 13 def initialize(invoice_id, opts = {}) @invoice_id = invoice_id @opts = opts end
Public Instance Methods
call()
click to toggle source
Calls the gateway
@return [TrueClass]
# File lib/billomat/actions/pdf.rb, line 22 def call resp = Billomat::Gateway.new(:get, path).run resp['pdf'] end
path()
click to toggle source
Wraps the options
@return [Hash] The wrapped email options
# File lib/billomat/actions/pdf.rb, line 31 def path "/invoices/#{@invoice_id}/pdf" end