Class: TXTextControl::ReportingCloud::AppendBody
- Inherits:
-
Object
- Object
- TXTextControl::ReportingCloud::AppendBody
- Defined in:
- lib/txtextcontrol/reportingcloud/append_body.rb
Overview
Passes data to the ReportingCloud#append_documents method.
Instance Attribute Summary collapse
-
#document_settings ⇒ DocumentSettings
Optional.
-
#documents ⇒ Array<AppendDocument>
The documents that are appended.
Instance Method Summary collapse
-
#initialize(documents, document_settings = nil) ⇒ AppendBody
constructor
A new instance of AppendBody.
-
#to_camelized_hash ⇒ Hash
Converts an AppendBody instance to a hash while converting the attribute names from snake case to camel case.
Constructor Details
#initialize(documents, document_settings = nil) ⇒ AppendBody
Returns a new instance of AppendBody
27 28 29 30 |
# File 'lib/txtextcontrol/reportingcloud/append_body.rb', line 27 def initialize(documents, document_settings = nil) self.documents = documents self.document_settings = document_settings end |
Instance Attribute Details
#document_settings ⇒ DocumentSettings
Optional. Document settings to specify document properties such as title and author.
25 26 27 |
# File 'lib/txtextcontrol/reportingcloud/append_body.rb', line 25 def document_settings @document_settings end |
#documents ⇒ Array<AppendDocument>
The documents that are appended.
25 26 27 |
# File 'lib/txtextcontrol/reportingcloud/append_body.rb', line 25 def documents @documents end |
Instance Method Details
#to_camelized_hash ⇒ Hash
Converts an AppendBody instance to a hash while converting the attribute names from snake case to camel case.
62 63 64 65 66 67 |
# File 'lib/txtextcontrol/reportingcloud/append_body.rb', line 62 def to_camelized_hash return { "documents" => @documents.map { |d| d.to_camelized_hash }, "documentSettings" => @document_settings.nil? ? nil : @document_settings.to_camelized_hash } end |