Class: TXTextControl::ReportingCloud::FindAndReplaceBody

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

Overview

The request body of requests to the endpoint “/document/findandreplace”. Contains an array of string arrays, a template encoded as a Base64 string and a ReportingCloud MergeSettings object.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(find_and_replace_data, template = nil, merge_settings = nil) ⇒ FindAndReplaceBody



38
39
40
41
42
# File 'lib/txtextcontrol/reportingcloud/find_and_replace_body.rb', line 38

def initialize(find_and_replace_data, template = nil, merge_settings = nil)
  self.find_and_replace_data = find_and_replace_data
  self.template = template
  self.merge_settings = merge_settings
end

Instance Attribute Details

#find_and_replace_dataArray<Array<String>>

The find and replace pair values as an array of string arrays.



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

def find_and_replace_data
  @find_and_replace_data
end

#merge_settingsMergeSettings

Merge settings to specify merge properties and document properties such as title and author.



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

def merge_settings
  @merge_settings
end

#templateString

The source document encoded as a Base64 string.



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

def template
  @template
end

Instance Method Details

#to_camelized_hashHash

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



81
82
83
84
85
86
87
# File 'lib/txtextcontrol/reportingcloud/find_and_replace_body.rb', line 81

def to_camelized_hash
  return {
    "findAndReplaceData" => @find_and_replace_data,
    "template" => @template,
    "mergeSettings" => @merge_settings
  }
end