class TXTextControl::ReportingCloud::AppendBody

Passes data to the {ReportingCloud.append_documents} method. @attr documents [Array<AppendDocument>] The documents that are appended. @attr document_settings [DocumentSettings] Optional. Document settings to specify

document properties such as title and author.

@author Thorsten Kummerow (@thomerow)

Public Class Methods

new(documents, document_settings = nil) click to toggle source
# File lib/txtextcontrol/reportingcloud/append_body.rb, line 27
def initialize(documents, document_settings = nil)
  self.documents = documents
  self.document_settings = document_settings
end

Public Instance Methods

document_settings() click to toggle source
# File lib/txtextcontrol/reportingcloud/append_body.rb, line 48
def document_settings
  @document_settings
end
document_settings=(val) click to toggle source
# File lib/txtextcontrol/reportingcloud/append_body.rb, line 52
def document_settings=(val)
  unless val.is_a?(TXTextControl::ReportingCloud::DocumentSettings) 
    raise ArgumentError, "Must be a DocumentSettings instance."
  end
  @document_settings = val;
end
documents() click to toggle source
# File lib/txtextcontrol/reportingcloud/append_body.rb, line 32
def documents
  @documents
end
documents=(val) click to toggle source
# File lib/txtextcontrol/reportingcloud/append_body.rb, line 36
def documents=(val)
  unless val.kind_of?(Array) 
    raise ArgumentError, "Not an qarray."
  end
  val.each do |elem|
    unless elem.is_a?(TXTextControl::ReportingCloud::AppendDocument)
      raise ArgumentError, "Only elements of type \"AppendDocument\" are allowed."
    end
  end
  @documents = 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_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