Class: Invoicing::CombinedPdfGenerator::Result

Inherits:
Data
  • Object
show all
Defined in:
app/services/invoicing/combined_pdf_generator.rb

Overview

Service object: result.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pdf_data: nil, pdf_file_path: nil, file_name: nil, invoice: nil, options: nil) ⇒ Result

Returns a new instance of Result.

Parameters:

  • pdf_data (String, nil) (defaults to: nil)

    the generated PDF binary data

  • pdf_file_path (String, nil) (defaults to: nil)

    path to the written PDF file

  • file_name (String, nil) (defaults to: nil)

    the PDF file name

  • invoice (Invoice, nil) (defaults to: nil)

    the invoice the PDF belongs to

  • options (Hash, nil) (defaults to: nil)

    the generation options that were used

Options Hash (options:):

  • :output_to_file (Boolean)

    whether the PDF was written to a file

  • :output_to_file_path (String)

    path the PDF was written to



13
# File 'app/services/invoicing/combined_pdf_generator.rb', line 13

def initialize(pdf_data: nil, pdf_file_path: nil, file_name: nil, invoice: nil, options: nil) = super

Instance Attribute Details

#file_nameObject (readonly)

Returns the value of attribute file_name

Returns:

  • (Object)

    the current value of file_name



5
6
7
# File 'app/services/invoicing/combined_pdf_generator.rb', line 5

def file_name
  @file_name
end

#invoiceObject (readonly)

Returns the value of attribute invoice

Returns:

  • (Object)

    the current value of invoice



5
6
7
# File 'app/services/invoicing/combined_pdf_generator.rb', line 5

def invoice
  @invoice
end

#optionsObject (readonly)

Returns the value of attribute options

Returns:

  • (Object)

    the current value of options



5
6
7
# File 'app/services/invoicing/combined_pdf_generator.rb', line 5

def options
  @options
end

#pdf_dataObject (readonly)

Returns the value of attribute pdf_data

Returns:

  • (Object)

    the current value of pdf_data



5
6
7
# File 'app/services/invoicing/combined_pdf_generator.rb', line 5

def pdf_data
  @pdf_data
end

#pdf_file_pathObject (readonly)

Returns the value of attribute pdf_file_path

Returns:

  • (Object)

    the current value of pdf_file_path



5
6
7
# File 'app/services/invoicing/combined_pdf_generator.rb', line 5

def pdf_file_path
  @pdf_file_path
end