Class: PDFire::MergeParams

Inherits:
Object
  • Object
show all
Defined in:
lib/merge_params.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(documents = []) ⇒ MergeParams

Returns a new instance of MergeParams.



14
15
16
17
18
19
20
# File 'lib/merge_params.rb', line 14

def initialize(documents = [])
  @documents = documents
  @cdn = nil
  @storage = nil
  @owner_password = nil
  @user_password = nil
end

Instance Attribute Details

#cdnBoolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/merge_params.rb', line 6

def cdn
  @cdn
end

#documentsArray<PDFire::ConversionParams>

Returns:



4
5
6
# File 'lib/merge_params.rb', line 4

def documents
  @documents
end

#owner_passwordString

Returns:

  • (String)


10
11
12
# File 'lib/merge_params.rb', line 10

def owner_password
  @owner_password
end

#storageBoolean, Hash

Returns:

  • (Boolean, Hash)


8
9
10
# File 'lib/merge_params.rb', line 8

def storage
  @storage
end

#user_passwordString

Returns:

  • (String)


12
13
14
# File 'lib/merge_params.rb', line 12

def user_password
  @user_password
end

Instance Method Details

#to_mapObject



22
23
24
25
26
27
28
29
30
31
# File 'lib/merge_params.rb', line 22

def to_map
  map = {}
  map['documents'] = @documents.map { |doc| doc.to_map } if @documents.length > 0
  map['cdn'] = @cdn if @cdn != nil
  map['storage'] = @storage if @storage != nil
  map['ownerPassword'] = @owner_password if @owner_password != nil
  map['userPassword'] = @user_password if @user_password != nil

  return map
end