groupdocs_signature_cloud 21.5 → 21.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/lib/groupdocs_signature_cloud/models/barcode_signature.rb +20 -2
  3. data/lib/groupdocs_signature_cloud/models/barcode_type.rb +18 -0
  4. data/lib/groupdocs_signature_cloud/models/barcodes_result.rb +18 -0
  5. data/lib/groupdocs_signature_cloud/models/base_settings.rb +18 -0
  6. data/lib/groupdocs_signature_cloud/models/border_line.rb +18 -0
  7. data/lib/groupdocs_signature_cloud/models/brush.rb +18 -0
  8. data/lib/groupdocs_signature_cloud/models/checkbox_form_field_signature.rb +460 -0
  9. data/lib/groupdocs_signature_cloud/models/color.rb +18 -0
  10. data/lib/groupdocs_signature_cloud/models/combobox_form_field_signature.rb +467 -0
  11. data/lib/groupdocs_signature_cloud/models/delete_options.rb +20 -2
  12. data/lib/groupdocs_signature_cloud/models/delete_result.rb +18 -0
  13. data/lib/groupdocs_signature_cloud/models/delete_settings.rb +18 -0
  14. data/lib/groupdocs_signature_cloud/models/digital_form_field_signature.rb +460 -0
  15. data/lib/groupdocs_signature_cloud/models/digital_signature.rb +20 -2
  16. data/lib/groupdocs_signature_cloud/models/digital_signature_appearance.rb +309 -0
  17. data/lib/groupdocs_signature_cloud/models/disc_usage.rb +18 -0
  18. data/lib/groupdocs_signature_cloud/models/error.rb +18 -0
  19. data/lib/groupdocs_signature_cloud/models/error_details.rb +18 -0
  20. data/lib/groupdocs_signature_cloud/models/file_info.rb +18 -0
  21. data/lib/groupdocs_signature_cloud/models/file_version.rb +18 -0
  22. data/lib/groupdocs_signature_cloud/models/file_versions.rb +18 -0
  23. data/lib/groupdocs_signature_cloud/models/files_list.rb +18 -0
  24. data/lib/groupdocs_signature_cloud/models/files_upload_result.rb +18 -0
  25. data/lib/groupdocs_signature_cloud/models/form_field_signature.rb +445 -0
  26. data/lib/groupdocs_signature_cloud/models/format.rb +18 -0
  27. data/lib/groupdocs_signature_cloud/models/formats_result.rb +18 -0
  28. data/lib/groupdocs_signature_cloud/models/image_appearance.rb +339 -0
  29. data/lib/groupdocs_signature_cloud/models/image_signature.rb +20 -2
  30. data/lib/groupdocs_signature_cloud/models/info_result.rb +34 -4
  31. data/lib/groupdocs_signature_cloud/models/info_settings.rb +37 -4
  32. data/lib/groupdocs_signature_cloud/models/linear_gradient_brush.rb +18 -0
  33. data/lib/groupdocs_signature_cloud/models/object_exist.rb +18 -0
  34. data/lib/groupdocs_signature_cloud/models/options_base.rb +20 -2
  35. data/lib/groupdocs_signature_cloud/models/padding.rb +18 -0
  36. data/lib/groupdocs_signature_cloud/models/page_info.rb +18 -0
  37. data/lib/groupdocs_signature_cloud/models/pages_setup.rb +18 -0
  38. data/lib/groupdocs_signature_cloud/models/pdf_digital_signature.rb +18 -0
  39. data/lib/groupdocs_signature_cloud/models/pdf_digital_signature_appearance.rb +359 -0
  40. data/lib/groupdocs_signature_cloud/models/pdf_text_annotation_appearance.rb +395 -0
  41. data/lib/groupdocs_signature_cloud/models/pdf_text_sticker_appearance.rb +355 -0
  42. data/lib/groupdocs_signature_cloud/models/preview_page.rb +18 -0
  43. data/lib/groupdocs_signature_cloud/models/preview_result.rb +18 -0
  44. data/lib/groupdocs_signature_cloud/models/preview_settings.rb +18 -0
  45. data/lib/groupdocs_signature_cloud/models/qr_code_signature.rb +20 -2
  46. data/lib/groupdocs_signature_cloud/models/qr_code_type.rb +18 -0
  47. data/lib/groupdocs_signature_cloud/models/qr_codes_result.rb +18 -0
  48. data/lib/groupdocs_signature_cloud/models/radial_gradient_brush.rb +18 -0
  49. data/lib/groupdocs_signature_cloud/models/radio_button_form_field_signature.rb +467 -0
  50. data/lib/groupdocs_signature_cloud/models/save_options.rb +18 -0
  51. data/lib/groupdocs_signature_cloud/models/search_barcode_options.rb +20 -2
  52. data/lib/groupdocs_signature_cloud/models/search_digital_options.rb +20 -2
  53. data/lib/groupdocs_signature_cloud/models/search_options.rb +20 -2
  54. data/lib/groupdocs_signature_cloud/models/search_qr_code_options.rb +20 -2
  55. data/lib/groupdocs_signature_cloud/models/search_result.rb +18 -0
  56. data/lib/groupdocs_signature_cloud/models/search_settings.rb +18 -0
  57. data/lib/groupdocs_signature_cloud/models/sign_barcode_options.rb +31 -3
  58. data/lib/groupdocs_signature_cloud/models/sign_digital_options.rb +31 -3
  59. data/lib/groupdocs_signature_cloud/models/sign_image_options.rb +31 -3
  60. data/lib/groupdocs_signature_cloud/models/sign_options.rb +34 -6
  61. data/lib/groupdocs_signature_cloud/models/sign_qr_code_options.rb +31 -3
  62. data/lib/groupdocs_signature_cloud/models/sign_result.rb +18 -0
  63. data/lib/groupdocs_signature_cloud/models/sign_settings.rb +18 -0
  64. data/lib/groupdocs_signature_cloud/models/sign_stamp_options.rb +31 -3
  65. data/lib/groupdocs_signature_cloud/models/sign_text_options.rb +31 -3
  66. data/lib/groupdocs_signature_cloud/models/signature.rb +20 -2
  67. data/lib/groupdocs_signature_cloud/models/signature_appearance.rb +279 -0
  68. data/lib/groupdocs_signature_cloud/models/signature_font.rb +18 -0
  69. data/lib/groupdocs_signature_cloud/models/solid_brush.rb +18 -0
  70. data/lib/groupdocs_signature_cloud/models/stamp_line.rb +18 -0
  71. data/lib/groupdocs_signature_cloud/models/storage_exist.rb +18 -0
  72. data/lib/groupdocs_signature_cloud/models/storage_file.rb +18 -0
  73. data/lib/groupdocs_signature_cloud/models/text_form_field_signature.rb +455 -0
  74. data/lib/groupdocs_signature_cloud/models/text_signature.rb +20 -2
  75. data/lib/groupdocs_signature_cloud/models/texture_brush.rb +18 -0
  76. data/lib/groupdocs_signature_cloud/models/time_stamp.rb +18 -0
  77. data/lib/groupdocs_signature_cloud/models/update_options.rb +20 -2
  78. data/lib/groupdocs_signature_cloud/models/update_result.rb +18 -0
  79. data/lib/groupdocs_signature_cloud/models/update_settings.rb +18 -0
  80. data/lib/groupdocs_signature_cloud/models/verify_barcode_options.rb +20 -2
  81. data/lib/groupdocs_signature_cloud/models/verify_digital_options.rb +20 -2
  82. data/lib/groupdocs_signature_cloud/models/verify_options.rb +20 -2
  83. data/lib/groupdocs_signature_cloud/models/verify_qr_code_options.rb +20 -2
  84. data/lib/groupdocs_signature_cloud/models/verify_result.rb +18 -0
  85. data/lib/groupdocs_signature_cloud/models/verify_settings.rb +18 -0
  86. data/lib/groupdocs_signature_cloud/models/verify_text_options.rb +20 -2
  87. data/lib/groupdocs_signature_cloud/version.rb +1 -1
  88. data/lib/groupdocs_signature_cloud.rb +12 -0
  89. metadata +14 -2
@@ -0,0 +1,339 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose Pty Ltd" file="image_appearance.rb">
4
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
5
+ # </copyright>
6
+ # <summary>
7
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ # of this software and associated documentation files (the "Software"), to deal
9
+ # in the Software without restriction, including without limitation the rights
10
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ # copies of the Software, and to permit persons to whom the Software is
12
+ # furnished to do so, subject to the following conditions:
13
+ #
14
+ # The above copyright notice and this permission notice shall be included in all
15
+ # copies or substantial portions of the Software.
16
+ #
17
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ # SOFTWARE.
24
+ # </summary>
25
+ # --------------------------------------------------------------------------------------------------------------------
26
+ #
27
+
28
+ require 'date'
29
+
30
+ module GroupDocsSignatureCloud
31
+ # Describes extended appearance features for Image Signature.
32
+ class ImageAppearance
33
+
34
+ # Specifies the type of appearance
35
+ attr_accessor :appearance_type
36
+
37
+ # Gets or sets image brightness. Default value is 1 it corresponds to original brightness of image.
38
+ attr_accessor :brightness
39
+
40
+ # Gets or sets image contrast. Default value is 1 it corresponds to original contrast of image.
41
+ attr_accessor :contrast
42
+
43
+ # Gets or sets image gamma. Default value is 1 it corresponds to original gamma of image.
44
+ attr_accessor :gamma_correction
45
+
46
+ # Setup this flag to true if gray-scale filter is required.
47
+ attr_accessor :grayscale
48
+ class EnumAttributeValidator
49
+ attr_reader :datatype
50
+ attr_reader :allowable_values
51
+
52
+ def initialize(datatype, allowable_values)
53
+ @allowable_values = allowable_values.map do |value|
54
+ case datatype.to_s
55
+ when /Integer/i
56
+ value.to_i
57
+ when /Float/i
58
+ value.to_f
59
+ else
60
+ value
61
+ end
62
+ end
63
+ end
64
+
65
+ def valid?(value)
66
+ !value || allowable_values.include?(value)
67
+ end
68
+ end
69
+
70
+ # Attribute mapping from ruby-style variable name to JSON key.
71
+ def self.attribute_map
72
+ {
73
+ :'appearance_type' => :'AppearanceType',
74
+ :'brightness' => :'Brightness',
75
+ :'contrast' => :'Contrast',
76
+ :'gamma_correction' => :'GammaCorrection',
77
+ :'grayscale' => :'Grayscale'
78
+ }
79
+ end
80
+
81
+ # Attribute type mapping.
82
+ def self.swagger_types
83
+ {
84
+ :'appearance_type' => :'String',
85
+ :'brightness' => :'Float',
86
+ :'contrast' => :'Float',
87
+ :'gamma_correction' => :'Float',
88
+ :'grayscale' => :'BOOLEAN'
89
+ }
90
+ end
91
+
92
+ # Initializes the object
93
+ # @param [Hash] attributes Model attributes in the form of hash
94
+ def initialize(attributes = {})
95
+ return unless attributes.is_a?(Hash)
96
+
97
+ # convert string to symbol for hash key
98
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
99
+
100
+ if attributes.key?(:'AppearanceType')
101
+ self.appearance_type = attributes[:'AppearanceType']
102
+ end
103
+
104
+ if attributes.key?(:'Brightness')
105
+ self.brightness = attributes[:'Brightness']
106
+ end
107
+
108
+ if attributes.key?(:'Contrast')
109
+ self.contrast = attributes[:'Contrast']
110
+ end
111
+
112
+ if attributes.key?(:'GammaCorrection')
113
+ self.gamma_correction = attributes[:'GammaCorrection']
114
+ end
115
+
116
+ if attributes.key?(:'Grayscale')
117
+ self.grayscale = attributes[:'Grayscale']
118
+ end
119
+
120
+ end
121
+
122
+ # Show invalid properties with the reasons. Usually used together with valid?
123
+ # @return Array for valid properies with the reasons
124
+ def list_invalid_properties
125
+ invalid_properties = []
126
+ if @appearance_type.nil?
127
+ invalid_properties.push("invalid value for 'appearance_type', appearance_type cannot be nil.")
128
+ end
129
+
130
+ if @brightness.nil?
131
+ invalid_properties.push("invalid value for 'brightness', brightness cannot be nil.")
132
+ end
133
+
134
+ if @contrast.nil?
135
+ invalid_properties.push("invalid value for 'contrast', contrast cannot be nil.")
136
+ end
137
+
138
+ if @gamma_correction.nil?
139
+ invalid_properties.push("invalid value for 'gamma_correction', gamma_correction cannot be nil.")
140
+ end
141
+
142
+ if @grayscale.nil?
143
+ invalid_properties.push("invalid value for 'grayscale', grayscale cannot be nil.")
144
+ end
145
+
146
+ return invalid_properties
147
+ end
148
+
149
+ # Check to see if the all the properties in the model are valid
150
+ # @return true if the model is valid
151
+ def valid?
152
+ return false if @appearance_type.nil?
153
+ appearance_type_validator = EnumAttributeValidator.new('String', ["Undefined", "PdfTextAnnotation", "PdfTextSticker", "Image", "DigitalSignature", "PdfDigitalSignature"])
154
+ return false unless appearance_type_validator.valid?(@appearance_type)
155
+ return false if @brightness.nil?
156
+ return false if @contrast.nil?
157
+ return false if @gamma_correction.nil?
158
+ return false if @grayscale.nil?
159
+ return true
160
+ end
161
+
162
+ # Custom attribute writer method checking allowed values (enum).
163
+ # @param [Object] appearance_type Object to be assigned
164
+ def appearance_type=(appearance_type)
165
+ validator = EnumAttributeValidator.new('String', ["Undefined", "PdfTextAnnotation", "PdfTextSticker", "Image", "DigitalSignature", "PdfDigitalSignature"])
166
+ if appearance_type.to_i == 0
167
+ unless validator.valid?(appearance_type)
168
+ raise ArgumentError, "invalid value for 'appearance_type', must be one of #{validator.allowable_values}."
169
+ end
170
+ @appearance_type = appearance_type
171
+ else
172
+ @appearance_type = validator.allowable_values[appearance_type.to_i]
173
+ end
174
+ end
175
+
176
+ # Checks equality by comparing each attribute.
177
+ # @param [Object] Object to be compared
178
+ def ==(other)
179
+ return true if self.equal?(other)
180
+ self.class == other.class &&
181
+ appearance_type == other.appearance_type &&
182
+ brightness == other.brightness &&
183
+ contrast == other.contrast &&
184
+ gamma_correction == other.gamma_correction &&
185
+ grayscale == other.grayscale
186
+ end
187
+
188
+ # @see the `==` method
189
+ # @param [Object] Object to be compared
190
+ def eql?(other)
191
+ self == other
192
+ end
193
+
194
+ # Calculates hash code according to all attributes.
195
+ # @return [Fixnum] Hash code
196
+ def hash
197
+ [appearance_type, brightness, contrast, gamma_correction, grayscale].hash
198
+ end
199
+
200
+ # Downcases first letter.
201
+ # @return downcased string
202
+ def uncap(str)
203
+ str[0, 1].downcase + str[1..-1]
204
+ end
205
+
206
+ # Builds the object from hash
207
+ # @param [Hash] attributes Model attributes in the form of hash
208
+ # @return [Object] Returns the model itself
209
+ def build_from_hash(attributes)
210
+ return nil unless attributes.is_a?(Hash)
211
+ self.class.swagger_types.each_pair do |key, type|
212
+ pname = uncap(self.class.attribute_map[key]).intern
213
+ value = attributes[pname]
214
+ if type =~ /\AArray<(.*)>/i
215
+ # check to ensure the input is an array given that the the attribute
216
+ # is documented as an array but the input is not
217
+ if value.is_a?(Array)
218
+ self.send("#{key}=", value.map { |v| _deserialize($1, v) })
219
+ end
220
+ elsif !value.nil?
221
+ self.send("#{key}=", _deserialize(type, value))
222
+ end
223
+ # or else data not found in attributes(hash), not an issue as the data can be optional
224
+ end
225
+
226
+ self
227
+ end
228
+
229
+ # Deserializes the data based on type
230
+ # @param string type Data type
231
+ # @param string value Value to be deserialized
232
+ # @return [Object] Deserialized data
233
+ def _deserialize(type, value)
234
+ case type.to_sym
235
+ when :DateTime
236
+ Date.parse value
237
+ when :Date
238
+ Date.parse value
239
+ when :String
240
+ value.to_s
241
+ when :Integer
242
+ value.to_i
243
+ when :Float
244
+ value.to_f
245
+ when :BOOLEAN
246
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
247
+ true
248
+ else
249
+ false
250
+ end
251
+ when :Object
252
+ # generic object (usually a Hash), return directly
253
+ value
254
+ when /\AArray<(?<inner_type>.+)>\z/
255
+ inner_type = Regexp.last_match[:inner_type]
256
+ value.map { |v| _deserialize(inner_type, v) }
257
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
258
+ k_type = Regexp.last_match[:k_type]
259
+ v_type = Regexp.last_match[:v_type]
260
+ {}.tap do |hash|
261
+ value.each do |k, v|
262
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
263
+ end
264
+ end
265
+ else
266
+ # model
267
+ # Signature type fix
268
+ ttype = type
269
+ if value.is_a?(Hash) and !value[:signatureType].nil?
270
+ ttype = value[:signatureType] + 'Signature'
271
+ if value[:signatureType] == 'FormField' and !value[:type].nil?
272
+ type = value[:type]
273
+ if type == 'Checkbox'
274
+ ttype = 'CheckboxFormFieldSignature'
275
+ end
276
+ if type == 'Text'
277
+ ttype = 'TextFormFieldSignature'
278
+ end
279
+ if type == 'Combobox'
280
+ ttype = 'ComboboxFormFieldSignature'
281
+ end
282
+ if type == 'DigitalSignature'
283
+ ttype = 'DigitalFormFieldSignature'
284
+ end
285
+ if type == 'Radio'
286
+ ttype = 'RadioButtonFormFieldSignature'
287
+ end
288
+ end
289
+ end
290
+ temp_model = GroupDocsSignatureCloud.const_get(ttype).new
291
+ temp_model.build_from_hash(value)
292
+ end
293
+ end
294
+
295
+ # Returns the string representation of the object
296
+ # @return [String] String presentation of the object
297
+ def to_s
298
+ to_hash.to_s
299
+ end
300
+
301
+ # to_body is an alias to to_hash (backward compatibility)
302
+ # @return [Hash] Returns the object in the form of hash
303
+ def to_body
304
+ to_hash
305
+ end
306
+
307
+ # Returns the object in the form of hash
308
+ # @return [Hash] Returns the object in the form of hash
309
+ def to_hash
310
+ hash = {}
311
+ self.class.attribute_map.each_pair do |attr, param|
312
+ value = self.send(attr)
313
+ next if value.nil?
314
+ hash[param] = _to_hash(value)
315
+ end
316
+ hash
317
+ end
318
+
319
+ # Outputs non-array value in the form of hash
320
+ # For object, use to_hash. Otherwise, just return the value
321
+ # @param [Object] value Any valid value
322
+ # @return [Hash] Returns the value in the form of hash
323
+ def _to_hash(value)
324
+ if value.is_a?(Array)
325
+ value.compact.map { |v| _to_hash(v) }
326
+ elsif value.is_a?(Hash)
327
+ {}.tap do |hash|
328
+ value.each { |k, v| hash[k] = _to_hash(v) }
329
+ end
330
+ elsif value.respond_to? :to_hash
331
+ value.to_hash
332
+ else
333
+ value
334
+ end
335
+ end
336
+
337
+ end
338
+
339
+ end
@@ -229,7 +229,7 @@ module GroupDocsSignatureCloud
229
229
  # @return true if the model is valid
230
230
  def valid?
231
231
  return false if @signature_type.nil?
232
- signature_type_validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp"])
232
+ signature_type_validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp", "FormField", "Metadata"])
233
233
  return false unless signature_type_validator.valid?(@signature_type)
234
234
  return false if @is_signature.nil?
235
235
  return false if @created_on.nil?
@@ -245,7 +245,7 @@ module GroupDocsSignatureCloud
245
245
  # Custom attribute writer method checking allowed values (enum).
246
246
  # @param [Object] signature_type Object to be assigned
247
247
  def signature_type=(signature_type)
248
- validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp"])
248
+ validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp", "FormField", "Metadata"])
249
249
  if signature_type.to_i == 0
250
250
  unless validator.valid?(signature_type)
251
251
  raise ArgumentError, "invalid value for 'signature_type', must be one of #{validator.allowable_values}."
@@ -358,6 +358,24 @@ module GroupDocsSignatureCloud
358
358
  ttype = type
359
359
  if value.is_a?(Hash) and !value[:signatureType].nil?
360
360
  ttype = value[:signatureType] + 'Signature'
361
+ if value[:signatureType] == 'FormField' and !value[:type].nil?
362
+ type = value[:type]
363
+ if type == 'Checkbox'
364
+ ttype = 'CheckboxFormFieldSignature'
365
+ end
366
+ if type == 'Text'
367
+ ttype = 'TextFormFieldSignature'
368
+ end
369
+ if type == 'Combobox'
370
+ ttype = 'ComboboxFormFieldSignature'
371
+ end
372
+ if type == 'DigitalSignature'
373
+ ttype = 'DigitalFormFieldSignature'
374
+ end
375
+ if type == 'Radio'
376
+ ttype = 'RadioButtonFormFieldSignature'
377
+ end
378
+ end
361
379
  end
362
380
  temp_model = GroupDocsSignatureCloud.const_get(ttype).new
363
381
  temp_model.build_from_hash(value)
@@ -61,6 +61,9 @@ module GroupDocsSignatureCloud
61
61
  # List of document pages descriptions
62
62
  attr_accessor :pages
63
63
 
64
+ # Collection of document signatures
65
+ attr_accessor :signatures
66
+
64
67
  # Attribute mapping from ruby-style variable name to JSON key.
65
68
  def self.attribute_map
66
69
  {
@@ -73,7 +76,8 @@ module GroupDocsSignatureCloud
73
76
  :'date_modified' => :'DateModified',
74
77
  :'width_for_max_height' => :'WidthForMaxHeight',
75
78
  :'max_page_height' => :'MaxPageHeight',
76
- :'pages' => :'Pages'
79
+ :'pages' => :'Pages',
80
+ :'signatures' => :'Signatures'
77
81
  }
78
82
  end
79
83
 
@@ -89,7 +93,8 @@ module GroupDocsSignatureCloud
89
93
  :'date_modified' => :'DateTime',
90
94
  :'width_for_max_height' => :'Integer',
91
95
  :'max_page_height' => :'Integer',
92
- :'pages' => :'Array<PageInfo>'
96
+ :'pages' => :'Array<PageInfo>',
97
+ :'signatures' => :'Array<Signature>'
93
98
  }
94
99
  end
95
100
 
@@ -143,6 +148,12 @@ module GroupDocsSignatureCloud
143
148
  end
144
149
  end
145
150
 
151
+ if attributes.key?(:'Signatures')
152
+ if (value = attributes[:'Signatures']).is_a?(Array)
153
+ self.signatures = value
154
+ end
155
+ end
156
+
146
157
  end
147
158
 
148
159
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -202,7 +213,8 @@ module GroupDocsSignatureCloud
202
213
  date_modified == other.date_modified &&
203
214
  width_for_max_height == other.width_for_max_height &&
204
215
  max_page_height == other.max_page_height &&
205
- pages == other.pages
216
+ pages == other.pages &&
217
+ signatures == other.signatures
206
218
  end
207
219
 
208
220
  # @see the `==` method
@@ -214,7 +226,7 @@ module GroupDocsSignatureCloud
214
226
  # Calculates hash code according to all attributes.
215
227
  # @return [Fixnum] Hash code
216
228
  def hash
217
- [file_info, extension, file_format, size, pages_count, date_created, date_modified, width_for_max_height, max_page_height, pages].hash
229
+ [file_info, extension, file_format, size, pages_count, date_created, date_modified, width_for_max_height, max_page_height, pages, signatures].hash
218
230
  end
219
231
 
220
232
  # Downcases first letter.
@@ -288,6 +300,24 @@ module GroupDocsSignatureCloud
288
300
  ttype = type
289
301
  if value.is_a?(Hash) and !value[:signatureType].nil?
290
302
  ttype = value[:signatureType] + 'Signature'
303
+ if value[:signatureType] == 'FormField' and !value[:type].nil?
304
+ type = value[:type]
305
+ if type == 'Checkbox'
306
+ ttype = 'CheckboxFormFieldSignature'
307
+ end
308
+ if type == 'Text'
309
+ ttype = 'TextFormFieldSignature'
310
+ end
311
+ if type == 'Combobox'
312
+ ttype = 'ComboboxFormFieldSignature'
313
+ end
314
+ if type == 'DigitalSignature'
315
+ ttype = 'DigitalFormFieldSignature'
316
+ end
317
+ if type == 'Radio'
318
+ ttype = 'RadioButtonFormFieldSignature'
319
+ end
320
+ end
291
321
  end
292
322
  temp_model = GroupDocsSignatureCloud.const_get(ttype).new
293
323
  temp_model.build_from_hash(value)
@@ -34,17 +34,22 @@ module GroupDocsSignatureCloud
34
34
  # File info
35
35
  attr_accessor :file_info
36
36
 
37
+ # Gets or sets flag that includes deleted signatures into Document Info result.
38
+ attr_accessor :show_deleted_signatures_info
39
+
37
40
  # Attribute mapping from ruby-style variable name to JSON key.
38
41
  def self.attribute_map
39
42
  {
40
- :'file_info' => :'FileInfo'
43
+ :'file_info' => :'FileInfo',
44
+ :'show_deleted_signatures_info' => :'ShowDeletedSignaturesInfo'
41
45
  }
42
46
  end
43
47
 
44
48
  # Attribute type mapping.
45
49
  def self.swagger_types
46
50
  {
47
- :'file_info' => :'FileInfo'
51
+ :'file_info' => :'FileInfo',
52
+ :'show_deleted_signatures_info' => :'BOOLEAN'
48
53
  }
49
54
  end
50
55
 
@@ -60,18 +65,27 @@ module GroupDocsSignatureCloud
60
65
  self.file_info = attributes[:'FileInfo']
61
66
  end
62
67
 
68
+ if attributes.key?(:'ShowDeletedSignaturesInfo')
69
+ self.show_deleted_signatures_info = attributes[:'ShowDeletedSignaturesInfo']
70
+ end
71
+
63
72
  end
64
73
 
65
74
  # Show invalid properties with the reasons. Usually used together with valid?
66
75
  # @return Array for valid properies with the reasons
67
76
  def list_invalid_properties
68
77
  invalid_properties = []
78
+ if @show_deleted_signatures_info.nil?
79
+ invalid_properties.push("invalid value for 'show_deleted_signatures_info', show_deleted_signatures_info cannot be nil.")
80
+ end
81
+
69
82
  return invalid_properties
70
83
  end
71
84
 
72
85
  # Check to see if the all the properties in the model are valid
73
86
  # @return true if the model is valid
74
87
  def valid?
88
+ return false if @show_deleted_signatures_info.nil?
75
89
  return true
76
90
  end
77
91
 
@@ -80,7 +94,8 @@ module GroupDocsSignatureCloud
80
94
  def ==(other)
81
95
  return true if self.equal?(other)
82
96
  self.class == other.class &&
83
- file_info == other.file_info
97
+ file_info == other.file_info &&
98
+ show_deleted_signatures_info == other.show_deleted_signatures_info
84
99
  end
85
100
 
86
101
  # @see the `==` method
@@ -92,7 +107,7 @@ module GroupDocsSignatureCloud
92
107
  # Calculates hash code according to all attributes.
93
108
  # @return [Fixnum] Hash code
94
109
  def hash
95
- [file_info].hash
110
+ [file_info, show_deleted_signatures_info].hash
96
111
  end
97
112
 
98
113
  # Downcases first letter.
@@ -166,6 +181,24 @@ module GroupDocsSignatureCloud
166
181
  ttype = type
167
182
  if value.is_a?(Hash) and !value[:signatureType].nil?
168
183
  ttype = value[:signatureType] + 'Signature'
184
+ if value[:signatureType] == 'FormField' and !value[:type].nil?
185
+ type = value[:type]
186
+ if type == 'Checkbox'
187
+ ttype = 'CheckboxFormFieldSignature'
188
+ end
189
+ if type == 'Text'
190
+ ttype = 'TextFormFieldSignature'
191
+ end
192
+ if type == 'Combobox'
193
+ ttype = 'ComboboxFormFieldSignature'
194
+ end
195
+ if type == 'DigitalSignature'
196
+ ttype = 'DigitalFormFieldSignature'
197
+ end
198
+ if type == 'Radio'
199
+ ttype = 'RadioButtonFormFieldSignature'
200
+ end
201
+ end
169
202
  end
170
203
  temp_model = GroupDocsSignatureCloud.const_get(ttype).new
171
204
  temp_model.build_from_hash(value)
@@ -201,6 +201,24 @@ module GroupDocsSignatureCloud
201
201
  ttype = type
202
202
  if value.is_a?(Hash) and !value[:signatureType].nil?
203
203
  ttype = value[:signatureType] + 'Signature'
204
+ if value[:signatureType] == 'FormField' and !value[:type].nil?
205
+ type = value[:type]
206
+ if type == 'Checkbox'
207
+ ttype = 'CheckboxFormFieldSignature'
208
+ end
209
+ if type == 'Text'
210
+ ttype = 'TextFormFieldSignature'
211
+ end
212
+ if type == 'Combobox'
213
+ ttype = 'ComboboxFormFieldSignature'
214
+ end
215
+ if type == 'DigitalSignature'
216
+ ttype = 'DigitalFormFieldSignature'
217
+ end
218
+ if type == 'Radio'
219
+ ttype = 'RadioButtonFormFieldSignature'
220
+ end
221
+ end
204
222
  end
205
223
  temp_model = GroupDocsSignatureCloud.const_get(ttype).new
206
224
  temp_model.build_from_hash(value)
@@ -186,6 +186,24 @@ module GroupDocsSignatureCloud
186
186
  ttype = type
187
187
  if value.is_a?(Hash) and !value[:signatureType].nil?
188
188
  ttype = value[:signatureType] + 'Signature'
189
+ if value[:signatureType] == 'FormField' and !value[:type].nil?
190
+ type = value[:type]
191
+ if type == 'Checkbox'
192
+ ttype = 'CheckboxFormFieldSignature'
193
+ end
194
+ if type == 'Text'
195
+ ttype = 'TextFormFieldSignature'
196
+ end
197
+ if type == 'Combobox'
198
+ ttype = 'ComboboxFormFieldSignature'
199
+ end
200
+ if type == 'DigitalSignature'
201
+ ttype = 'DigitalFormFieldSignature'
202
+ end
203
+ if type == 'Radio'
204
+ ttype = 'RadioButtonFormFieldSignature'
205
+ end
206
+ end
189
207
  end
190
208
  temp_model = GroupDocsSignatureCloud.const_get(ttype).new
191
209
  temp_model.build_from_hash(value)
@@ -129,7 +129,7 @@ module GroupDocsSignatureCloud
129
129
  # @return true if the model is valid
130
130
  def valid?
131
131
  return false if @signature_type.nil?
132
- signature_type_validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp"])
132
+ signature_type_validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp", "FormField", "Metadata"])
133
133
  return false unless signature_type_validator.valid?(@signature_type)
134
134
  return false if @all_pages.nil?
135
135
  return true
@@ -138,7 +138,7 @@ module GroupDocsSignatureCloud
138
138
  # Custom attribute writer method checking allowed values (enum).
139
139
  # @param [Object] signature_type Object to be assigned
140
140
  def signature_type=(signature_type)
141
- validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp"])
141
+ validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp", "FormField", "Metadata"])
142
142
  if signature_type.to_i == 0
143
143
  unless validator.valid?(signature_type)
144
144
  raise ArgumentError, "invalid value for 'signature_type', must be one of #{validator.allowable_values}."
@@ -243,6 +243,24 @@ module GroupDocsSignatureCloud
243
243
  ttype = type
244
244
  if value.is_a?(Hash) and !value[:signatureType].nil?
245
245
  ttype = value[:signatureType] + 'Signature'
246
+ if value[:signatureType] == 'FormField' and !value[:type].nil?
247
+ type = value[:type]
248
+ if type == 'Checkbox'
249
+ ttype = 'CheckboxFormFieldSignature'
250
+ end
251
+ if type == 'Text'
252
+ ttype = 'TextFormFieldSignature'
253
+ end
254
+ if type == 'Combobox'
255
+ ttype = 'ComboboxFormFieldSignature'
256
+ end
257
+ if type == 'DigitalSignature'
258
+ ttype = 'DigitalFormFieldSignature'
259
+ end
260
+ if type == 'Radio'
261
+ ttype = 'RadioButtonFormFieldSignature'
262
+ end
263
+ end
246
264
  end
247
265
  temp_model = GroupDocsSignatureCloud.const_get(ttype).new
248
266
  temp_model.build_from_hash(value)
@@ -231,6 +231,24 @@ module GroupDocsSignatureCloud
231
231
  ttype = type
232
232
  if value.is_a?(Hash) and !value[:signatureType].nil?
233
233
  ttype = value[:signatureType] + 'Signature'
234
+ if value[:signatureType] == 'FormField' and !value[:type].nil?
235
+ type = value[:type]
236
+ if type == 'Checkbox'
237
+ ttype = 'CheckboxFormFieldSignature'
238
+ end
239
+ if type == 'Text'
240
+ ttype = 'TextFormFieldSignature'
241
+ end
242
+ if type == 'Combobox'
243
+ ttype = 'ComboboxFormFieldSignature'
244
+ end
245
+ if type == 'DigitalSignature'
246
+ ttype = 'DigitalFormFieldSignature'
247
+ end
248
+ if type == 'Radio'
249
+ ttype = 'RadioButtonFormFieldSignature'
250
+ end
251
+ end
234
252
  end
235
253
  temp_model = GroupDocsSignatureCloud.const_get(ttype).new
236
254
  temp_model.build_from_hash(value)