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,445 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose Pty Ltd" file="form_field_signature.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
+ # Contains Form field signature properties
32
+ class FormFieldSignature
33
+
34
+ # Specifies the signature type (Text, Image, Digital, Barcode, QRCode, Stamp)
35
+ attr_accessor :signature_type
36
+
37
+ # Specifies the page signature was found on
38
+ attr_accessor :page_number
39
+
40
+ # Unique signature identifier to modify signature in the document over Update or Delete methods. This property will be set automatically after Sign or Search method being called. If this property was saved before it can be set manually to manipulate the signature.
41
+ attr_accessor :signature_id
42
+
43
+ # Get or set flag to indicate if this component is Signature or document content. This property is being used with Update method to set element as signature (true) or document element (false).
44
+ attr_accessor :is_signature
45
+
46
+ # Get or set the signature creation date
47
+ attr_accessor :created_on
48
+
49
+ # Get or set the signature modification date
50
+ attr_accessor :modified_on
51
+
52
+ # Specifies top position of signature
53
+ attr_accessor :top
54
+
55
+ # Specifies left position of signature
56
+ attr_accessor :left
57
+
58
+ # Specifies width of signature
59
+ attr_accessor :width
60
+
61
+ # Specifies height of signature
62
+ attr_accessor :height
63
+
64
+ # Specifies unique form field name
65
+ attr_accessor :name
66
+
67
+ # Specifies Form field type
68
+ attr_accessor :type
69
+ class EnumAttributeValidator
70
+ attr_reader :datatype
71
+ attr_reader :allowable_values
72
+
73
+ def initialize(datatype, allowable_values)
74
+ @allowable_values = allowable_values.map do |value|
75
+ case datatype.to_s
76
+ when /Integer/i
77
+ value.to_i
78
+ when /Float/i
79
+ value.to_f
80
+ else
81
+ value
82
+ end
83
+ end
84
+ end
85
+
86
+ def valid?(value)
87
+ !value || allowable_values.include?(value)
88
+ end
89
+ end
90
+
91
+ # Attribute mapping from ruby-style variable name to JSON key.
92
+ def self.attribute_map
93
+ {
94
+ :'signature_type' => :'SignatureType',
95
+ :'page_number' => :'PageNumber',
96
+ :'signature_id' => :'SignatureId',
97
+ :'is_signature' => :'IsSignature',
98
+ :'created_on' => :'CreatedOn',
99
+ :'modified_on' => :'ModifiedOn',
100
+ :'top' => :'Top',
101
+ :'left' => :'Left',
102
+ :'width' => :'Width',
103
+ :'height' => :'Height',
104
+ :'name' => :'Name',
105
+ :'type' => :'Type'
106
+ }
107
+ end
108
+
109
+ # Attribute type mapping.
110
+ def self.swagger_types
111
+ {
112
+ :'signature_type' => :'String',
113
+ :'page_number' => :'Integer',
114
+ :'signature_id' => :'String',
115
+ :'is_signature' => :'BOOLEAN',
116
+ :'created_on' => :'DateTime',
117
+ :'modified_on' => :'DateTime',
118
+ :'top' => :'Integer',
119
+ :'left' => :'Integer',
120
+ :'width' => :'Integer',
121
+ :'height' => :'Integer',
122
+ :'name' => :'String',
123
+ :'type' => :'String'
124
+ }
125
+ end
126
+
127
+ # Initializes the object
128
+ # @param [Hash] attributes Model attributes in the form of hash
129
+ def initialize(attributes = {})
130
+ return unless attributes.is_a?(Hash)
131
+
132
+ # convert string to symbol for hash key
133
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
134
+
135
+ if attributes.key?(:'SignatureType')
136
+ self.signature_type = attributes[:'SignatureType']
137
+ end
138
+
139
+ if attributes.key?(:'PageNumber')
140
+ self.page_number = attributes[:'PageNumber']
141
+ end
142
+
143
+ if attributes.key?(:'SignatureId')
144
+ self.signature_id = attributes[:'SignatureId']
145
+ end
146
+
147
+ if attributes.key?(:'IsSignature')
148
+ self.is_signature = attributes[:'IsSignature']
149
+ end
150
+
151
+ if attributes.key?(:'CreatedOn')
152
+ self.created_on = attributes[:'CreatedOn']
153
+ end
154
+
155
+ if attributes.key?(:'ModifiedOn')
156
+ self.modified_on = attributes[:'ModifiedOn']
157
+ end
158
+
159
+ if attributes.key?(:'Top')
160
+ self.top = attributes[:'Top']
161
+ end
162
+
163
+ if attributes.key?(:'Left')
164
+ self.left = attributes[:'Left']
165
+ end
166
+
167
+ if attributes.key?(:'Width')
168
+ self.width = attributes[:'Width']
169
+ end
170
+
171
+ if attributes.key?(:'Height')
172
+ self.height = attributes[:'Height']
173
+ end
174
+
175
+ if attributes.key?(:'Name')
176
+ self.name = attributes[:'Name']
177
+ end
178
+
179
+ if attributes.key?(:'Type')
180
+ self.type = attributes[:'Type']
181
+ end
182
+
183
+ end
184
+
185
+ # Show invalid properties with the reasons. Usually used together with valid?
186
+ # @return Array for valid properies with the reasons
187
+ def list_invalid_properties
188
+ invalid_properties = []
189
+ if @signature_type.nil?
190
+ invalid_properties.push("invalid value for 'signature_type', signature_type cannot be nil.")
191
+ end
192
+
193
+ if @is_signature.nil?
194
+ invalid_properties.push("invalid value for 'is_signature', is_signature cannot be nil.")
195
+ end
196
+
197
+ if @created_on.nil?
198
+ invalid_properties.push("invalid value for 'created_on', created_on cannot be nil.")
199
+ end
200
+
201
+ if @modified_on.nil?
202
+ invalid_properties.push("invalid value for 'modified_on', modified_on cannot be nil.")
203
+ end
204
+
205
+ if @top.nil?
206
+ invalid_properties.push("invalid value for 'top', top cannot be nil.")
207
+ end
208
+
209
+ if @left.nil?
210
+ invalid_properties.push("invalid value for 'left', left cannot be nil.")
211
+ end
212
+
213
+ if @width.nil?
214
+ invalid_properties.push("invalid value for 'width', width cannot be nil.")
215
+ end
216
+
217
+ if @height.nil?
218
+ invalid_properties.push("invalid value for 'height', height cannot be nil.")
219
+ end
220
+
221
+ if @type.nil?
222
+ invalid_properties.push("invalid value for 'type', type cannot be nil.")
223
+ end
224
+
225
+ return invalid_properties
226
+ end
227
+
228
+ # Check to see if the all the properties in the model are valid
229
+ # @return true if the model is valid
230
+ def valid?
231
+ return false if @signature_type.nil?
232
+ signature_type_validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp", "FormField", "Metadata"])
233
+ return false unless signature_type_validator.valid?(@signature_type)
234
+ return false if @is_signature.nil?
235
+ return false if @created_on.nil?
236
+ return false if @modified_on.nil?
237
+ return false if @top.nil?
238
+ return false if @left.nil?
239
+ return false if @width.nil?
240
+ return false if @height.nil?
241
+ return false if @type.nil?
242
+ type_validator = EnumAttributeValidator.new('String', ["Text", "Checkbox", "Combobox", "DigitalSignature", "Radio", "None"])
243
+ return false unless type_validator.valid?(@type)
244
+ return true
245
+ end
246
+
247
+ # Custom attribute writer method checking allowed values (enum).
248
+ # @param [Object] signature_type Object to be assigned
249
+ def signature_type=(signature_type)
250
+ validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp", "FormField", "Metadata"])
251
+ if signature_type.to_i == 0
252
+ unless validator.valid?(signature_type)
253
+ raise ArgumentError, "invalid value for 'signature_type', must be one of #{validator.allowable_values}."
254
+ end
255
+ @signature_type = signature_type
256
+ else
257
+ @signature_type = validator.allowable_values[signature_type.to_i]
258
+ end
259
+ end
260
+
261
+ # Custom attribute writer method checking allowed values (enum).
262
+ # @param [Object] type Object to be assigned
263
+ def type=(type)
264
+ validator = EnumAttributeValidator.new('String', ["Text", "Checkbox", "Combobox", "DigitalSignature", "Radio", "None"])
265
+ if type.to_i == 0
266
+ unless validator.valid?(type)
267
+ raise ArgumentError, "invalid value for 'type', must be one of #{validator.allowable_values}."
268
+ end
269
+ @type = type
270
+ else
271
+ @type = validator.allowable_values[type.to_i]
272
+ end
273
+ end
274
+
275
+ # Checks equality by comparing each attribute.
276
+ # @param [Object] Object to be compared
277
+ def ==(other)
278
+ return true if self.equal?(other)
279
+ self.class == other.class &&
280
+ signature_type == other.signature_type &&
281
+ page_number == other.page_number &&
282
+ signature_id == other.signature_id &&
283
+ is_signature == other.is_signature &&
284
+ created_on == other.created_on &&
285
+ modified_on == other.modified_on &&
286
+ top == other.top &&
287
+ left == other.left &&
288
+ width == other.width &&
289
+ height == other.height &&
290
+ name == other.name &&
291
+ type == other.type
292
+ end
293
+
294
+ # @see the `==` method
295
+ # @param [Object] Object to be compared
296
+ def eql?(other)
297
+ self == other
298
+ end
299
+
300
+ # Calculates hash code according to all attributes.
301
+ # @return [Fixnum] Hash code
302
+ def hash
303
+ [signature_type, page_number, signature_id, is_signature, created_on, modified_on, top, left, width, height, name, type].hash
304
+ end
305
+
306
+ # Downcases first letter.
307
+ # @return downcased string
308
+ def uncap(str)
309
+ str[0, 1].downcase + str[1..-1]
310
+ end
311
+
312
+ # Builds the object from hash
313
+ # @param [Hash] attributes Model attributes in the form of hash
314
+ # @return [Object] Returns the model itself
315
+ def build_from_hash(attributes)
316
+ return nil unless attributes.is_a?(Hash)
317
+ self.class.swagger_types.each_pair do |key, type|
318
+ pname = uncap(self.class.attribute_map[key]).intern
319
+ value = attributes[pname]
320
+ if type =~ /\AArray<(.*)>/i
321
+ # check to ensure the input is an array given that the the attribute
322
+ # is documented as an array but the input is not
323
+ if value.is_a?(Array)
324
+ self.send("#{key}=", value.map { |v| _deserialize($1, v) })
325
+ end
326
+ elsif !value.nil?
327
+ self.send("#{key}=", _deserialize(type, value))
328
+ end
329
+ # or else data not found in attributes(hash), not an issue as the data can be optional
330
+ end
331
+
332
+ self
333
+ end
334
+
335
+ # Deserializes the data based on type
336
+ # @param string type Data type
337
+ # @param string value Value to be deserialized
338
+ # @return [Object] Deserialized data
339
+ def _deserialize(type, value)
340
+ case type.to_sym
341
+ when :DateTime
342
+ Date.parse value
343
+ when :Date
344
+ Date.parse value
345
+ when :String
346
+ value.to_s
347
+ when :Integer
348
+ value.to_i
349
+ when :Float
350
+ value.to_f
351
+ when :BOOLEAN
352
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
353
+ true
354
+ else
355
+ false
356
+ end
357
+ when :Object
358
+ # generic object (usually a Hash), return directly
359
+ value
360
+ when /\AArray<(?<inner_type>.+)>\z/
361
+ inner_type = Regexp.last_match[:inner_type]
362
+ value.map { |v| _deserialize(inner_type, v) }
363
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
364
+ k_type = Regexp.last_match[:k_type]
365
+ v_type = Regexp.last_match[:v_type]
366
+ {}.tap do |hash|
367
+ value.each do |k, v|
368
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
369
+ end
370
+ end
371
+ else
372
+ # model
373
+ # Signature type fix
374
+ ttype = type
375
+ if value.is_a?(Hash) and !value[:signatureType].nil?
376
+ ttype = value[:signatureType] + 'Signature'
377
+ if value[:signatureType] == 'FormField' and !value[:type].nil?
378
+ type = value[:type]
379
+ if type == 'Checkbox'
380
+ ttype = 'CheckboxFormFieldSignature'
381
+ end
382
+ if type == 'Text'
383
+ ttype = 'TextFormFieldSignature'
384
+ end
385
+ if type == 'Combobox'
386
+ ttype = 'ComboboxFormFieldSignature'
387
+ end
388
+ if type == 'DigitalSignature'
389
+ ttype = 'DigitalFormFieldSignature'
390
+ end
391
+ if type == 'Radio'
392
+ ttype = 'RadioButtonFormFieldSignature'
393
+ end
394
+ end
395
+ end
396
+ temp_model = GroupDocsSignatureCloud.const_get(ttype).new
397
+ temp_model.build_from_hash(value)
398
+ end
399
+ end
400
+
401
+ # Returns the string representation of the object
402
+ # @return [String] String presentation of the object
403
+ def to_s
404
+ to_hash.to_s
405
+ end
406
+
407
+ # to_body is an alias to to_hash (backward compatibility)
408
+ # @return [Hash] Returns the object in the form of hash
409
+ def to_body
410
+ to_hash
411
+ end
412
+
413
+ # Returns the object in the form of hash
414
+ # @return [Hash] Returns the object in the form of hash
415
+ def to_hash
416
+ hash = {}
417
+ self.class.attribute_map.each_pair do |attr, param|
418
+ value = self.send(attr)
419
+ next if value.nil?
420
+ hash[param] = _to_hash(value)
421
+ end
422
+ hash
423
+ end
424
+
425
+ # Outputs non-array value in the form of hash
426
+ # For object, use to_hash. Otherwise, just return the value
427
+ # @param [Object] value Any valid value
428
+ # @return [Hash] Returns the value in the form of hash
429
+ def _to_hash(value)
430
+ if value.is_a?(Array)
431
+ value.compact.map { |v| _to_hash(v) }
432
+ elsif value.is_a?(Hash)
433
+ {}.tap do |hash|
434
+ value.each { |k, v| hash[k] = _to_hash(v) }
435
+ end
436
+ elsif value.respond_to? :to_hash
437
+ value.to_hash
438
+ else
439
+ value
440
+ end
441
+ end
442
+
443
+ end
444
+
445
+ end
@@ -176,6 +176,24 @@ module GroupDocsSignatureCloud
176
176
  ttype = type
177
177
  if value.is_a?(Hash) and !value[:signatureType].nil?
178
178
  ttype = value[:signatureType] + 'Signature'
179
+ if value[:signatureType] == 'FormField' and !value[:type].nil?
180
+ type = value[:type]
181
+ if type == 'Checkbox'
182
+ ttype = 'CheckboxFormFieldSignature'
183
+ end
184
+ if type == 'Text'
185
+ ttype = 'TextFormFieldSignature'
186
+ end
187
+ if type == 'Combobox'
188
+ ttype = 'ComboboxFormFieldSignature'
189
+ end
190
+ if type == 'DigitalSignature'
191
+ ttype = 'DigitalFormFieldSignature'
192
+ end
193
+ if type == 'Radio'
194
+ ttype = 'RadioButtonFormFieldSignature'
195
+ end
196
+ end
179
197
  end
180
198
  temp_model = GroupDocsSignatureCloud.const_get(ttype).new
181
199
  temp_model.build_from_hash(value)
@@ -168,6 +168,24 @@ module GroupDocsSignatureCloud
168
168
  ttype = type
169
169
  if value.is_a?(Hash) and !value[:signatureType].nil?
170
170
  ttype = value[:signatureType] + 'Signature'
171
+ if value[:signatureType] == 'FormField' and !value[:type].nil?
172
+ type = value[:type]
173
+ if type == 'Checkbox'
174
+ ttype = 'CheckboxFormFieldSignature'
175
+ end
176
+ if type == 'Text'
177
+ ttype = 'TextFormFieldSignature'
178
+ end
179
+ if type == 'Combobox'
180
+ ttype = 'ComboboxFormFieldSignature'
181
+ end
182
+ if type == 'DigitalSignature'
183
+ ttype = 'DigitalFormFieldSignature'
184
+ end
185
+ if type == 'Radio'
186
+ ttype = 'RadioButtonFormFieldSignature'
187
+ end
188
+ end
171
189
  end
172
190
  temp_model = GroupDocsSignatureCloud.const_get(ttype).new
173
191
  temp_model.build_from_hash(value)