Class: TXTextControl::ReportingCloud::DocumentSettings

Inherits:
Object
  • Object
show all
Defined in:
lib/txtextcontrol/reportingcloud/document_settings.rb

Overview

Holds the merge settings needed by the ReportingCloud#append_documents method.

Author:

  • Thorsten Kummerow (@thomerow)

Direct Known Subclasses

MergeSettings

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDocumentSettings

Returns a new instance of DocumentSettings



34
35
36
37
38
39
40
41
42
# File 'lib/txtextcontrol/reportingcloud/document_settings.rb', line 34

def initialize
  @author = nil
  @creation_date = nil
  @creator_application = nil
  @document_subject = nil
  @document_title = nil
  @last_modification_date = nil
  @user_password = nil
end

Instance Attribute Details

#authorString

The document's author.

Returns:

  • (String)

    the current value of author



27
28
29
# File 'lib/txtextcontrol/reportingcloud/document_settings.rb', line 27

def author
  @author
end

#creation_dateDateTime

The document's creation date.

Returns:

  • (DateTime)

    the current value of creation_date



27
28
29
# File 'lib/txtextcontrol/reportingcloud/document_settings.rb', line 27

def creation_date
  @creation_date
end

#creator_applicationString

The application which created the document.

Returns:

  • (String)

    the current value of creator_application



27
28
29
# File 'lib/txtextcontrol/reportingcloud/document_settings.rb', line 27

def creator_application
  @creator_application
end

#document_subjectString

The document's subject.

Returns:

  • (String)

    the current value of document_subject



27
28
29
# File 'lib/txtextcontrol/reportingcloud/document_settings.rb', line 27

def document_subject
  @document_subject
end

#document_titleString

The document's title.

Returns:

  • (String)

    the current value of document_title



27
28
29
# File 'lib/txtextcontrol/reportingcloud/document_settings.rb', line 27

def document_title
  @document_title
end

#last_modification_dateDateTime

The document's last modification date.

Returns:

  • (DateTime)

    the current value of last_modification_date



27
28
29
# File 'lib/txtextcontrol/reportingcloud/document_settings.rb', line 27

def last_modification_date
  @last_modification_date
end

#user_passwordString

The password needed to open the document.

Returns:

  • (String)

    the current value of user_password



27
28
29
# File 'lib/txtextcontrol/reportingcloud/document_settings.rb', line 27

def user_password
  @user_password
end

Instance Method Details

#to_camelized_hashHash

Converts a DocumentSettings instance to a hash while converting the attribute names from snake case to camel case.

Returns:

  • (Hash)

    A hash representing the DocumentSettings instance.



79
80
81
82
83
84
85
86
87
88
89
# File 'lib/txtextcontrol/reportingcloud/document_settings.rb', line 79

def to_camelized_hash
  return {
    "author" => @author,
    "creationDate" => @creation_date.nil? ? nil : @creation_date.iso8601,
    "creatorApplication" => @creator_application,
    "documentSubject" => @document_subject,
    "documentTitle" => @document_title,
    "lastModificationDate" => @last_modification_date.nil? ? nil : @last_modification_date.iso8601,
    "userPassword" => @user_password
  }
end