class TXTextControl::ReportingCloud::AppendDocument
Passes data to the {ReportingCloud.append_documents} method. @attr document [String] The document as a Base64 encoded string. @attr document_divider
[Symbol] The document divider option. Possible values are
+:none+, +:new_paragraph+ and +:new_section+.
@author Thorsten Kummerow (@thomerow)
Attributes
document_divider[RW]
Public Class Methods
new(document, document_divider = :none)
click to toggle source
# File lib/txtextcontrol/reportingcloud/append_document.rb, line 25 def initialize(document, document_divider = :none) self.document = document @document_divider = document_divider end
Public Instance Methods
document()
click to toggle source
# File lib/txtextcontrol/reportingcloud/append_document.rb, line 30 def document @document end
document=(val)
click to toggle source
# File lib/txtextcontrol/reportingcloud/append_document.rb, line 34 def document=(val) unless val.is_a?(String) raise ArgumentError, "document must be a Base64 encoded string." end @document = val end
to_camelized_hash()
click to toggle source
Converts an AppendBody
instance to a hash while converting the attribute names from snake case to camel case. @return [Hash] A hash representing the AppendBody
instance.
# File lib/txtextcontrol/reportingcloud/append_document.rb, line 44 def to_camelized_hash result = { "document" => @document, "documentDivider" => "None" } case @document_divider when :new_paragraph result["documentDivider"] = "NewParagraph" when :new_section result["documentDivider"] = "NewSection" end return result end