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