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,355 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose Pty Ltd" file="pdf_text_sticker_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 appearance of PDF text annotation sticker object and pop-up window of sticker.
32
+ class PdfTextStickerAppearance
33
+
34
+ # Specifies the type of appearance
35
+ attr_accessor :appearance_type
36
+
37
+ # Gets or sets the contents of pop-up window.
38
+ attr_accessor :contents
39
+
40
+ # Gets or sets the icon of sticker.
41
+ attr_accessor :icon
42
+
43
+ # Setup if sticker pop-up window will be opened by default.
44
+ attr_accessor :opened
45
+
46
+ # Gets or sets subject.
47
+ attr_accessor :subject
48
+
49
+ # Gets or sets title of pop-up window.
50
+ attr_accessor :title
51
+ class EnumAttributeValidator
52
+ attr_reader :datatype
53
+ attr_reader :allowable_values
54
+
55
+ def initialize(datatype, allowable_values)
56
+ @allowable_values = allowable_values.map do |value|
57
+ case datatype.to_s
58
+ when /Integer/i
59
+ value.to_i
60
+ when /Float/i
61
+ value.to_f
62
+ else
63
+ value
64
+ end
65
+ end
66
+ end
67
+
68
+ def valid?(value)
69
+ !value || allowable_values.include?(value)
70
+ end
71
+ end
72
+
73
+ # Attribute mapping from ruby-style variable name to JSON key.
74
+ def self.attribute_map
75
+ {
76
+ :'appearance_type' => :'AppearanceType',
77
+ :'contents' => :'Contents',
78
+ :'icon' => :'Icon',
79
+ :'opened' => :'Opened',
80
+ :'subject' => :'Subject',
81
+ :'title' => :'Title'
82
+ }
83
+ end
84
+
85
+ # Attribute type mapping.
86
+ def self.swagger_types
87
+ {
88
+ :'appearance_type' => :'String',
89
+ :'contents' => :'String',
90
+ :'icon' => :'String',
91
+ :'opened' => :'BOOLEAN',
92
+ :'subject' => :'String',
93
+ :'title' => :'String'
94
+ }
95
+ end
96
+
97
+ # Initializes the object
98
+ # @param [Hash] attributes Model attributes in the form of hash
99
+ def initialize(attributes = {})
100
+ return unless attributes.is_a?(Hash)
101
+
102
+ # convert string to symbol for hash key
103
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
104
+
105
+ if attributes.key?(:'AppearanceType')
106
+ self.appearance_type = attributes[:'AppearanceType']
107
+ end
108
+
109
+ if attributes.key?(:'Contents')
110
+ self.contents = attributes[:'Contents']
111
+ end
112
+
113
+ if attributes.key?(:'Icon')
114
+ self.icon = attributes[:'Icon']
115
+ end
116
+
117
+ if attributes.key?(:'Opened')
118
+ self.opened = attributes[:'Opened']
119
+ end
120
+
121
+ if attributes.key?(:'Subject')
122
+ self.subject = attributes[:'Subject']
123
+ end
124
+
125
+ if attributes.key?(:'Title')
126
+ self.title = attributes[:'Title']
127
+ end
128
+
129
+ end
130
+
131
+ # Show invalid properties with the reasons. Usually used together with valid?
132
+ # @return Array for valid properies with the reasons
133
+ def list_invalid_properties
134
+ invalid_properties = []
135
+ if @appearance_type.nil?
136
+ invalid_properties.push("invalid value for 'appearance_type', appearance_type cannot be nil.")
137
+ end
138
+
139
+ if @icon.nil?
140
+ invalid_properties.push("invalid value for 'icon', icon cannot be nil.")
141
+ end
142
+
143
+ if @opened.nil?
144
+ invalid_properties.push("invalid value for 'opened', opened cannot be nil.")
145
+ end
146
+
147
+ return invalid_properties
148
+ end
149
+
150
+ # Check to see if the all the properties in the model are valid
151
+ # @return true if the model is valid
152
+ def valid?
153
+ return false if @appearance_type.nil?
154
+ appearance_type_validator = EnumAttributeValidator.new('String', ["Undefined", "PdfTextAnnotation", "PdfTextSticker", "Image", "DigitalSignature", "PdfDigitalSignature"])
155
+ return false unless appearance_type_validator.valid?(@appearance_type)
156
+ return false if @icon.nil?
157
+ icon_validator = EnumAttributeValidator.new('String', ["Note", "Comment", "Key", "Help", "NewParagraph", "Paragraph", "Insert", "Check", "Cross", "Circle", "Star"])
158
+ return false unless icon_validator.valid?(@icon)
159
+ return false if @opened.nil?
160
+ return true
161
+ end
162
+
163
+ # Custom attribute writer method checking allowed values (enum).
164
+ # @param [Object] appearance_type Object to be assigned
165
+ def appearance_type=(appearance_type)
166
+ validator = EnumAttributeValidator.new('String', ["Undefined", "PdfTextAnnotation", "PdfTextSticker", "Image", "DigitalSignature", "PdfDigitalSignature"])
167
+ if appearance_type.to_i == 0
168
+ unless validator.valid?(appearance_type)
169
+ raise ArgumentError, "invalid value for 'appearance_type', must be one of #{validator.allowable_values}."
170
+ end
171
+ @appearance_type = appearance_type
172
+ else
173
+ @appearance_type = validator.allowable_values[appearance_type.to_i]
174
+ end
175
+ end
176
+
177
+ # Custom attribute writer method checking allowed values (enum).
178
+ # @param [Object] icon Object to be assigned
179
+ def icon=(icon)
180
+ validator = EnumAttributeValidator.new('String', ["Note", "Comment", "Key", "Help", "NewParagraph", "Paragraph", "Insert", "Check", "Cross", "Circle", "Star"])
181
+ if icon.to_i == 0
182
+ unless validator.valid?(icon)
183
+ raise ArgumentError, "invalid value for 'icon', must be one of #{validator.allowable_values}."
184
+ end
185
+ @icon = icon
186
+ else
187
+ @icon = validator.allowable_values[icon.to_i]
188
+ end
189
+ end
190
+
191
+ # Checks equality by comparing each attribute.
192
+ # @param [Object] Object to be compared
193
+ def ==(other)
194
+ return true if self.equal?(other)
195
+ self.class == other.class &&
196
+ appearance_type == other.appearance_type &&
197
+ contents == other.contents &&
198
+ icon == other.icon &&
199
+ opened == other.opened &&
200
+ subject == other.subject &&
201
+ title == other.title
202
+ end
203
+
204
+ # @see the `==` method
205
+ # @param [Object] Object to be compared
206
+ def eql?(other)
207
+ self == other
208
+ end
209
+
210
+ # Calculates hash code according to all attributes.
211
+ # @return [Fixnum] Hash code
212
+ def hash
213
+ [appearance_type, contents, icon, opened, subject, title].hash
214
+ end
215
+
216
+ # Downcases first letter.
217
+ # @return downcased string
218
+ def uncap(str)
219
+ str[0, 1].downcase + str[1..-1]
220
+ end
221
+
222
+ # Builds the object from hash
223
+ # @param [Hash] attributes Model attributes in the form of hash
224
+ # @return [Object] Returns the model itself
225
+ def build_from_hash(attributes)
226
+ return nil unless attributes.is_a?(Hash)
227
+ self.class.swagger_types.each_pair do |key, type|
228
+ pname = uncap(self.class.attribute_map[key]).intern
229
+ value = attributes[pname]
230
+ if type =~ /\AArray<(.*)>/i
231
+ # check to ensure the input is an array given that the the attribute
232
+ # is documented as an array but the input is not
233
+ if value.is_a?(Array)
234
+ self.send("#{key}=", value.map { |v| _deserialize($1, v) })
235
+ end
236
+ elsif !value.nil?
237
+ self.send("#{key}=", _deserialize(type, value))
238
+ end
239
+ # or else data not found in attributes(hash), not an issue as the data can be optional
240
+ end
241
+
242
+ self
243
+ end
244
+
245
+ # Deserializes the data based on type
246
+ # @param string type Data type
247
+ # @param string value Value to be deserialized
248
+ # @return [Object] Deserialized data
249
+ def _deserialize(type, value)
250
+ case type.to_sym
251
+ when :DateTime
252
+ Date.parse value
253
+ when :Date
254
+ Date.parse value
255
+ when :String
256
+ value.to_s
257
+ when :Integer
258
+ value.to_i
259
+ when :Float
260
+ value.to_f
261
+ when :BOOLEAN
262
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
263
+ true
264
+ else
265
+ false
266
+ end
267
+ when :Object
268
+ # generic object (usually a Hash), return directly
269
+ value
270
+ when /\AArray<(?<inner_type>.+)>\z/
271
+ inner_type = Regexp.last_match[:inner_type]
272
+ value.map { |v| _deserialize(inner_type, v) }
273
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
274
+ k_type = Regexp.last_match[:k_type]
275
+ v_type = Regexp.last_match[:v_type]
276
+ {}.tap do |hash|
277
+ value.each do |k, v|
278
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
279
+ end
280
+ end
281
+ else
282
+ # model
283
+ # Signature type fix
284
+ ttype = type
285
+ if value.is_a?(Hash) and !value[:signatureType].nil?
286
+ ttype = value[:signatureType] + 'Signature'
287
+ if value[:signatureType] == 'FormField' and !value[:type].nil?
288
+ type = value[:type]
289
+ if type == 'Checkbox'
290
+ ttype = 'CheckboxFormFieldSignature'
291
+ end
292
+ if type == 'Text'
293
+ ttype = 'TextFormFieldSignature'
294
+ end
295
+ if type == 'Combobox'
296
+ ttype = 'ComboboxFormFieldSignature'
297
+ end
298
+ if type == 'DigitalSignature'
299
+ ttype = 'DigitalFormFieldSignature'
300
+ end
301
+ if type == 'Radio'
302
+ ttype = 'RadioButtonFormFieldSignature'
303
+ end
304
+ end
305
+ end
306
+ temp_model = GroupDocsSignatureCloud.const_get(ttype).new
307
+ temp_model.build_from_hash(value)
308
+ end
309
+ end
310
+
311
+ # Returns the string representation of the object
312
+ # @return [String] String presentation of the object
313
+ def to_s
314
+ to_hash.to_s
315
+ end
316
+
317
+ # to_body is an alias to to_hash (backward compatibility)
318
+ # @return [Hash] Returns the object in the form of hash
319
+ def to_body
320
+ to_hash
321
+ end
322
+
323
+ # Returns the object in the form of hash
324
+ # @return [Hash] Returns the object in the form of hash
325
+ def to_hash
326
+ hash = {}
327
+ self.class.attribute_map.each_pair do |attr, param|
328
+ value = self.send(attr)
329
+ next if value.nil?
330
+ hash[param] = _to_hash(value)
331
+ end
332
+ hash
333
+ end
334
+
335
+ # Outputs non-array value in the form of hash
336
+ # For object, use to_hash. Otherwise, just return the value
337
+ # @param [Object] value Any valid value
338
+ # @return [Hash] Returns the value in the form of hash
339
+ def _to_hash(value)
340
+ if value.is_a?(Array)
341
+ value.compact.map { |v| _to_hash(v) }
342
+ elsif value.is_a?(Hash)
343
+ {}.tap do |hash|
344
+ value.each { |k, v| hash[k] = _to_hash(v) }
345
+ end
346
+ elsif value.respond_to? :to_hash
347
+ value.to_hash
348
+ else
349
+ value
350
+ end
351
+ end
352
+
353
+ end
354
+
355
+ end
@@ -206,6 +206,24 @@ module GroupDocsSignatureCloud
206
206
  ttype = type
207
207
  if value.is_a?(Hash) and !value[:signatureType].nil?
208
208
  ttype = value[:signatureType] + 'Signature'
209
+ if value[:signatureType] == 'FormField' and !value[:type].nil?
210
+ type = value[:type]
211
+ if type == 'Checkbox'
212
+ ttype = 'CheckboxFormFieldSignature'
213
+ end
214
+ if type == 'Text'
215
+ ttype = 'TextFormFieldSignature'
216
+ end
217
+ if type == 'Combobox'
218
+ ttype = 'ComboboxFormFieldSignature'
219
+ end
220
+ if type == 'DigitalSignature'
221
+ ttype = 'DigitalFormFieldSignature'
222
+ end
223
+ if type == 'Radio'
224
+ ttype = 'RadioButtonFormFieldSignature'
225
+ end
226
+ end
209
227
  end
210
228
  temp_model = GroupDocsSignatureCloud.const_get(ttype).new
211
229
  temp_model.build_from_hash(value)
@@ -208,6 +208,24 @@ module GroupDocsSignatureCloud
208
208
  ttype = type
209
209
  if value.is_a?(Hash) and !value[:signatureType].nil?
210
210
  ttype = value[:signatureType] + 'Signature'
211
+ if value[:signatureType] == 'FormField' and !value[:type].nil?
212
+ type = value[:type]
213
+ if type == 'Checkbox'
214
+ ttype = 'CheckboxFormFieldSignature'
215
+ end
216
+ if type == 'Text'
217
+ ttype = 'TextFormFieldSignature'
218
+ end
219
+ if type == 'Combobox'
220
+ ttype = 'ComboboxFormFieldSignature'
221
+ end
222
+ if type == 'DigitalSignature'
223
+ ttype = 'DigitalFormFieldSignature'
224
+ end
225
+ if type == 'Radio'
226
+ ttype = 'RadioButtonFormFieldSignature'
227
+ end
228
+ end
211
229
  end
212
230
  temp_model = GroupDocsSignatureCloud.const_get(ttype).new
213
231
  temp_model.build_from_hash(value)
@@ -285,6 +285,24 @@ module GroupDocsSignatureCloud
285
285
  ttype = type
286
286
  if value.is_a?(Hash) and !value[:signatureType].nil?
287
287
  ttype = value[:signatureType] + 'Signature'
288
+ if value[:signatureType] == 'FormField' and !value[:type].nil?
289
+ type = value[:type]
290
+ if type == 'Checkbox'
291
+ ttype = 'CheckboxFormFieldSignature'
292
+ end
293
+ if type == 'Text'
294
+ ttype = 'TextFormFieldSignature'
295
+ end
296
+ if type == 'Combobox'
297
+ ttype = 'ComboboxFormFieldSignature'
298
+ end
299
+ if type == 'DigitalSignature'
300
+ ttype = 'DigitalFormFieldSignature'
301
+ end
302
+ if type == 'Radio'
303
+ ttype = 'RadioButtonFormFieldSignature'
304
+ end
305
+ end
288
306
  end
289
307
  temp_model = GroupDocsSignatureCloud.const_get(ttype).new
290
308
  temp_model.build_from_hash(value)
@@ -234,7 +234,7 @@ module GroupDocsSignatureCloud
234
234
  # @return true if the model is valid
235
235
  def valid?
236
236
  return false if @signature_type.nil?
237
- signature_type_validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp"])
237
+ signature_type_validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp", "FormField", "Metadata"])
238
238
  return false unless signature_type_validator.valid?(@signature_type)
239
239
  return false if @is_signature.nil?
240
240
  return false if @created_on.nil?
@@ -249,7 +249,7 @@ module GroupDocsSignatureCloud
249
249
  # Custom attribute writer method checking allowed values (enum).
250
250
  # @param [Object] signature_type Object to be assigned
251
251
  def signature_type=(signature_type)
252
- validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp"])
252
+ validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp", "FormField", "Metadata"])
253
253
  if signature_type.to_i == 0
254
254
  unless validator.valid?(signature_type)
255
255
  raise ArgumentError, "invalid value for 'signature_type', must be one of #{validator.allowable_values}."
@@ -363,6 +363,24 @@ module GroupDocsSignatureCloud
363
363
  ttype = type
364
364
  if value.is_a?(Hash) and !value[:signatureType].nil?
365
365
  ttype = value[:signatureType] + 'Signature'
366
+ if value[:signatureType] == 'FormField' and !value[:type].nil?
367
+ type = value[:type]
368
+ if type == 'Checkbox'
369
+ ttype = 'CheckboxFormFieldSignature'
370
+ end
371
+ if type == 'Text'
372
+ ttype = 'TextFormFieldSignature'
373
+ end
374
+ if type == 'Combobox'
375
+ ttype = 'ComboboxFormFieldSignature'
376
+ end
377
+ if type == 'DigitalSignature'
378
+ ttype = 'DigitalFormFieldSignature'
379
+ end
380
+ if type == 'Radio'
381
+ ttype = 'RadioButtonFormFieldSignature'
382
+ end
383
+ end
366
384
  end
367
385
  temp_model = GroupDocsSignatureCloud.const_get(ttype).new
368
386
  temp_model.build_from_hash(value)
@@ -166,6 +166,24 @@ module GroupDocsSignatureCloud
166
166
  ttype = type
167
167
  if value.is_a?(Hash) and !value[:signatureType].nil?
168
168
  ttype = value[:signatureType] + 'Signature'
169
+ if value[:signatureType] == 'FormField' and !value[:type].nil?
170
+ type = value[:type]
171
+ if type == 'Checkbox'
172
+ ttype = 'CheckboxFormFieldSignature'
173
+ end
174
+ if type == 'Text'
175
+ ttype = 'TextFormFieldSignature'
176
+ end
177
+ if type == 'Combobox'
178
+ ttype = 'ComboboxFormFieldSignature'
179
+ end
180
+ if type == 'DigitalSignature'
181
+ ttype = 'DigitalFormFieldSignature'
182
+ end
183
+ if type == 'Radio'
184
+ ttype = 'RadioButtonFormFieldSignature'
185
+ end
186
+ end
169
187
  end
170
188
  temp_model = GroupDocsSignatureCloud.const_get(ttype).new
171
189
  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)
@@ -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)