Class: DynamicPDFApi::PdfInput
- Defined in:
- lib/ruby_client/PdfInput.rb
Overview
Represents a pdf input.
Instance Attribute Summary collapse
-
#_type ⇒ Object
Returns the value of attribute _type.
-
#merge_options ⇒ Object
Gets or sets the merge options MergeOptions.
-
#page_count ⇒ Object
Gets or sets the page count.
-
#start_page ⇒ Object
Gets or sets the start page.
Attributes inherited from Input
#_resources, #_template_id, #id, #resource_name
Instance Method Summary collapse
-
#initialize(resource, options = nil) ⇒ PdfInput
constructor
Initializes a new instance of the PdfInput class.
- #to_json(_options = {}) ⇒ Object
Methods inherited from Input
Constructor Details
#initialize(resource, options = nil) ⇒ PdfInput
Initializes a new instance of the PdfInput class.
17 18 19 20 21 22 23 24 |
# File 'lib/ruby_client/PdfInput.rb', line 17 def initialize(resource, = nil) @id = nil @_type = InputType::PDF @start_page = nil @page_count = nil @merge_options = super(resource) end |
Instance Attribute Details
#_type ⇒ Object
Returns the value of attribute _type.
26 27 28 |
# File 'lib/ruby_client/PdfInput.rb', line 26 def _type @_type end |
#merge_options ⇒ Object
Gets or sets the merge options MergeOptions.
31 32 33 |
# File 'lib/ruby_client/PdfInput.rb', line 31 def @merge_options end |
#page_count ⇒ Object
Gets or sets the page count.
41 42 43 |
# File 'lib/ruby_client/PdfInput.rb', line 41 def page_count @page_count end |
#start_page ⇒ Object
Gets or sets the start page.
36 37 38 |
# File 'lib/ruby_client/PdfInput.rb', line 36 def start_page @start_page end |
Instance Method Details
#to_json(_options = {}) ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/ruby_client/PdfInput.rb', line 43 def to_json( = {}) @template = get_template json_array = {} json_array['type'] = 'pdf' json_array['mergeOptions'] = @merge_options unless @merge_options.nil? json_array['startPage'] = @start_page unless @start_page.nil? json_array['pageCount'] = @page_count unless @page_count.nil? #--------------------------------------------------- json_array['templateId'] = @_template_id unless @_template_id.nil? json_array['resourceName'] = @resource_name json_array['id'] = @id JSON.pretty_generate(json_array) end |