lib/saasu/invoice.rb
# Returns the pdf file as raw binary data in a String object
#
# if there is problem getting the PDF you will get a runtime error
#   e.g RuntimeError (Server did not return a valid response. URL: Invoice/9999/generate-pdf?FileId=9999. Response status: 400. Response body: Unable to perform the request.):
#
# this can happen if the tempate_id is invalid
Returns the pdf file as raw binary data in a String object
if there is problem getting the PDF you will get a runtime error
e.g RuntimeError (Server did not return a valid response.

this can happen if the tempate_id is invalid
Returns the pdf file as raw binary data in a String object if there is problem getting the PDF you will get a runtime error e . g RuntimeError ( Server did not return a valid response . this can happen if the tempate_id is invalid
def generate_pdf(template_id = nil)
    if template_id.present?
      url = ['Invoice', id, 'generate-pdf'].join('/')
      params = { TemplateId: template_id }
    else
      url = ['Invoice', id, 'generate-pdf'].join('/')
      params = {}
    end
    Saasu::Client.request(:get, url, params)
  end
def generate_pdf ( template_id = nil ) if template_id . present? url = [ 'Invoice' , id , 'generate-pdf' ] . join ( '/' ) params = { TemplateId : template_id } else url = [ 'Invoice' , id , 'generate-pdf' ] . join ( '/' ) params = { } end Saasu :: Client . request ( :get , url , params ) end
Returns the pdf file as raw binary data in a String object
if there is problem getting the PDF you will get a runtime error
e.g RuntimeError (Server did not return a valid response.
Returns the pdf file as raw binary data in a String object if there is problem getting the PDF you will get a runtime error e . g RuntimeError ( Server did not return a valid response .
template_id