Class: DynamicPDFApi::PdfResource
- Defined in:
- lib/ruby_client/PdfResource.rb
Overview
Represents a pdf resource.
Instance Attribute Summary
Attributes inherited from Resource
#_file_path, #_mime_type, #data, #resource_name
Instance Method Summary collapse
- #_file_extension ⇒ Object
-
#initialize(file, resource_name = nil) ⇒ PdfResource
constructor
Initializes a new instance of the PdfResource class.
-
#to_json(_options = {}) ⇒ Object
?string ResourcePath.
Methods inherited from Resource
Constructor Details
#initialize(file, resource_name = nil) ⇒ PdfResource
Initializes a new instance of the PdfResource class.
15 16 17 18 |
# File 'lib/ruby_client/PdfResource.rb', line 15 def initialize(file, resource_name = nil) super(file, resource_name) @_mime_type = "application/pdf" end |
Instance Method Details
#_file_extension ⇒ Object
22 23 24 |
# File 'lib/ruby_client/PdfResource.rb', line 22 def _file_extension ".pdf" end |
#to_json(_options = {}) ⇒ Object
?string ResourcePath
28 29 30 31 32 33 34 |
# File 'lib/ruby_client/PdfResource.rb', line 28 def to_json( = {}) @input_json = {} @input_json["type"] = @_type @input_json["resourceName"] = @resource_name JSON.pretty_generate(@input_json) end |