groupdocs_signature_cloud 20.7 → 22.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/lib/groupdocs_signature_cloud/api/file_api.rb +6 -6
  3. data/lib/groupdocs_signature_cloud/api/folder_api.rb +6 -6
  4. data/lib/groupdocs_signature_cloud/api/info_api.rb +2 -2
  5. data/lib/groupdocs_signature_cloud/api/license_api.rb +169 -0
  6. data/lib/groupdocs_signature_cloud/api/preview_api.rb +217 -0
  7. data/lib/groupdocs_signature_cloud/api/sign_api.rb +6 -6
  8. data/lib/groupdocs_signature_cloud/api/storage_api.rb +5 -5
  9. data/lib/groupdocs_signature_cloud/api_client.rb +1 -1
  10. data/lib/groupdocs_signature_cloud/api_error.rb +18 -5
  11. data/lib/groupdocs_signature_cloud/configuration.rb +1 -1
  12. data/lib/groupdocs_signature_cloud/models/barcode_signature.rb +21 -3
  13. data/lib/groupdocs_signature_cloud/models/barcode_type.rb +19 -1
  14. data/lib/groupdocs_signature_cloud/models/barcodes_result.rb +19 -1
  15. data/lib/groupdocs_signature_cloud/models/base_settings.rb +19 -1
  16. data/lib/groupdocs_signature_cloud/models/border_line.rb +19 -1
  17. data/lib/groupdocs_signature_cloud/models/brush.rb +19 -1
  18. data/lib/groupdocs_signature_cloud/models/checkbox_form_field_signature.rb +460 -0
  19. data/lib/groupdocs_signature_cloud/models/color.rb +38 -5
  20. data/lib/groupdocs_signature_cloud/models/combobox_form_field_signature.rb +467 -0
  21. data/lib/groupdocs_signature_cloud/models/consumption_result.rb +257 -0
  22. data/lib/groupdocs_signature_cloud/models/delete_options.rb +21 -3
  23. data/lib/groupdocs_signature_cloud/models/delete_result.rb +20 -2
  24. data/lib/groupdocs_signature_cloud/models/delete_settings.rb +19 -1
  25. data/lib/groupdocs_signature_cloud/models/digital_form_field_signature.rb +460 -0
  26. data/lib/groupdocs_signature_cloud/models/digital_signature.rb +35 -7
  27. data/lib/groupdocs_signature_cloud/models/digital_signature_appearance.rb +309 -0
  28. data/lib/groupdocs_signature_cloud/models/disc_usage.rb +19 -1
  29. data/lib/groupdocs_signature_cloud/models/error.rb +19 -1
  30. data/lib/groupdocs_signature_cloud/models/error_details.rb +19 -1
  31. data/lib/groupdocs_signature_cloud/models/file_info.rb +19 -1
  32. data/lib/groupdocs_signature_cloud/models/file_version.rb +19 -1
  33. data/lib/groupdocs_signature_cloud/models/file_versions.rb +19 -1
  34. data/lib/groupdocs_signature_cloud/models/files_list.rb +19 -1
  35. data/lib/groupdocs_signature_cloud/models/files_upload_result.rb +19 -1
  36. data/lib/groupdocs_signature_cloud/models/form_field_signature.rb +445 -0
  37. data/lib/groupdocs_signature_cloud/models/format.rb +19 -1
  38. data/lib/groupdocs_signature_cloud/models/formats_result.rb +19 -1
  39. data/lib/groupdocs_signature_cloud/models/image_appearance.rb +339 -0
  40. data/lib/groupdocs_signature_cloud/models/image_signature.rb +21 -3
  41. data/lib/groupdocs_signature_cloud/models/info_result.rb +36 -6
  42. data/lib/groupdocs_signature_cloud/models/info_settings.rb +38 -5
  43. data/lib/groupdocs_signature_cloud/models/linear_gradient_brush.rb +19 -1
  44. data/lib/groupdocs_signature_cloud/models/object_exist.rb +19 -1
  45. data/lib/groupdocs_signature_cloud/models/options_base.rb +21 -3
  46. data/lib/groupdocs_signature_cloud/models/padding.rb +19 -1
  47. data/lib/groupdocs_signature_cloud/models/page_info.rb +19 -1
  48. data/lib/groupdocs_signature_cloud/models/pages_setup.rb +19 -1
  49. data/lib/groupdocs_signature_cloud/models/pdf_digital_signature.rb +339 -0
  50. data/lib/groupdocs_signature_cloud/models/pdf_digital_signature_appearance.rb +359 -0
  51. data/lib/groupdocs_signature_cloud/models/pdf_text_annotation_appearance.rb +395 -0
  52. data/lib/groupdocs_signature_cloud/models/pdf_text_sticker_appearance.rb +355 -0
  53. data/lib/groupdocs_signature_cloud/models/preview_page.rb +277 -0
  54. data/lib/groupdocs_signature_cloud/models/preview_result.rb +279 -0
  55. data/lib/groupdocs_signature_cloud/models/preview_settings.rb +356 -0
  56. data/lib/groupdocs_signature_cloud/models/qr_code_signature.rb +21 -3
  57. data/lib/groupdocs_signature_cloud/models/qr_code_type.rb +19 -1
  58. data/lib/groupdocs_signature_cloud/models/qr_codes_result.rb +19 -1
  59. data/lib/groupdocs_signature_cloud/models/radial_gradient_brush.rb +19 -1
  60. data/lib/groupdocs_signature_cloud/models/radio_button_form_field_signature.rb +467 -0
  61. data/lib/groupdocs_signature_cloud/models/save_options.rb +19 -1
  62. data/lib/groupdocs_signature_cloud/models/search_barcode_options.rb +21 -3
  63. data/lib/groupdocs_signature_cloud/models/search_digital_options.rb +21 -3
  64. data/lib/groupdocs_signature_cloud/models/search_options.rb +21 -3
  65. data/lib/groupdocs_signature_cloud/models/search_qr_code_options.rb +21 -3
  66. data/lib/groupdocs_signature_cloud/models/search_result.rb +19 -1
  67. data/lib/groupdocs_signature_cloud/models/search_settings.rb +19 -1
  68. data/lib/groupdocs_signature_cloud/models/sign_barcode_options.rb +47 -4
  69. data/lib/groupdocs_signature_cloud/models/sign_digital_options.rb +32 -4
  70. data/lib/groupdocs_signature_cloud/models/sign_image_options.rb +32 -4
  71. data/lib/groupdocs_signature_cloud/models/sign_options.rb +35 -7
  72. data/lib/groupdocs_signature_cloud/models/sign_qr_code_options.rb +47 -4
  73. data/lib/groupdocs_signature_cloud/models/sign_result.rb +20 -2
  74. data/lib/groupdocs_signature_cloud/models/sign_settings.rb +19 -1
  75. data/lib/groupdocs_signature_cloud/models/sign_stamp_options.rb +32 -4
  76. data/lib/groupdocs_signature_cloud/models/sign_text_options.rb +50 -7
  77. data/lib/groupdocs_signature_cloud/models/signature.rb +21 -3
  78. data/lib/groupdocs_signature_cloud/models/signature_appearance.rb +279 -0
  79. data/lib/groupdocs_signature_cloud/models/signature_font.rb +19 -1
  80. data/lib/groupdocs_signature_cloud/models/solid_brush.rb +19 -1
  81. data/lib/groupdocs_signature_cloud/models/stamp_line.rb +19 -1
  82. data/lib/groupdocs_signature_cloud/models/storage_exist.rb +19 -1
  83. data/lib/groupdocs_signature_cloud/models/storage_file.rb +19 -1
  84. data/lib/groupdocs_signature_cloud/models/text_form_field_signature.rb +455 -0
  85. data/lib/groupdocs_signature_cloud/models/text_signature.rb +21 -3
  86. data/lib/groupdocs_signature_cloud/models/texture_brush.rb +19 -1
  87. data/lib/groupdocs_signature_cloud/models/time_stamp.rb +257 -0
  88. data/lib/groupdocs_signature_cloud/models/update_options.rb +21 -3
  89. data/lib/groupdocs_signature_cloud/models/update_result.rb +20 -2
  90. data/lib/groupdocs_signature_cloud/models/update_settings.rb +19 -1
  91. data/lib/groupdocs_signature_cloud/models/verify_barcode_options.rb +21 -3
  92. data/lib/groupdocs_signature_cloud/models/verify_digital_options.rb +21 -3
  93. data/lib/groupdocs_signature_cloud/models/verify_options.rb +21 -3
  94. data/lib/groupdocs_signature_cloud/models/verify_qr_code_options.rb +21 -3
  95. data/lib/groupdocs_signature_cloud/models/verify_result.rb +20 -2
  96. data/lib/groupdocs_signature_cloud/models/verify_settings.rb +19 -1
  97. data/lib/groupdocs_signature_cloud/models/verify_text_options.rb +21 -3
  98. data/lib/groupdocs_signature_cloud/version.rb +2 -2
  99. data/lib/groupdocs_signature_cloud.rb +21 -1
  100. metadata +26 -20
@@ -0,0 +1,257 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose Pty Ltd" file="consumption_result.rb">
4
+ # Copyright (c) 2003-2022 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
+ # Metered license consumption information
32
+ class ConsumptionResult
33
+
34
+ # Amount of used credits
35
+ attr_accessor :credit
36
+
37
+ # Amount of MBs processed
38
+ attr_accessor :quantity
39
+
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ def self.attribute_map
42
+ {
43
+ :'credit' => :'Credit',
44
+ :'quantity' => :'Quantity'
45
+ }
46
+ end
47
+
48
+ # Attribute type mapping.
49
+ def self.swagger_types
50
+ {
51
+ :'credit' => :'Float',
52
+ :'quantity' => :'Float'
53
+ }
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ return unless attributes.is_a?(Hash)
60
+
61
+ # convert string to symbol for hash key
62
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
63
+
64
+ if attributes.key?(:'Credit')
65
+ self.credit = attributes[:'Credit']
66
+ end
67
+
68
+ if attributes.key?(:'Quantity')
69
+ self.quantity = attributes[:'Quantity']
70
+ end
71
+
72
+ end
73
+
74
+ # Show invalid properties with the reasons. Usually used together with valid?
75
+ # @return Array for valid properies with the reasons
76
+ def list_invalid_properties
77
+ invalid_properties = []
78
+ if @credit.nil?
79
+ invalid_properties.push("invalid value for 'credit', credit cannot be nil.")
80
+ end
81
+
82
+ if @quantity.nil?
83
+ invalid_properties.push("invalid value for 'quantity', quantity cannot be nil.")
84
+ end
85
+
86
+ return invalid_properties
87
+ end
88
+
89
+ # Check to see if the all the properties in the model are valid
90
+ # @return true if the model is valid
91
+ def valid?
92
+ return false if @credit.nil?
93
+ return false if @quantity.nil?
94
+ return true
95
+ end
96
+
97
+ # Checks equality by comparing each attribute.
98
+ # @param [Object] Object to be compared
99
+ def ==(other)
100
+ return true if self.equal?(other)
101
+ self.class == other.class &&
102
+ credit == other.credit &&
103
+ quantity == other.quantity
104
+ end
105
+
106
+ # @see the `==` method
107
+ # @param [Object] Object to be compared
108
+ def eql?(other)
109
+ self == other
110
+ end
111
+
112
+ # Calculates hash code according to all attributes.
113
+ # @return [Fixnum] Hash code
114
+ def hash
115
+ [credit, quantity].hash
116
+ end
117
+
118
+ # Downcases first letter.
119
+ # @return downcased string
120
+ def uncap(str)
121
+ str[0, 1].downcase + str[1..-1]
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def build_from_hash(attributes)
128
+ return nil unless attributes.is_a?(Hash)
129
+ self.class.swagger_types.each_pair do |key, type|
130
+ pname = uncap(self.class.attribute_map[key]).intern
131
+ value = attributes[pname]
132
+ if type =~ /\AArray<(.*)>/i
133
+ # check to ensure the input is an array given that the the attribute
134
+ # is documented as an array but the input is not
135
+ if value.is_a?(Array)
136
+ self.send("#{key}=", value.map { |v| _deserialize($1, v) })
137
+ end
138
+ elsif !value.nil?
139
+ self.send("#{key}=", _deserialize(type, value))
140
+ end
141
+ # or else data not found in attributes(hash), not an issue as the data can be optional
142
+ end
143
+
144
+ self
145
+ end
146
+
147
+ # Deserializes the data based on type
148
+ # @param string type Data type
149
+ # @param string value Value to be deserialized
150
+ # @return [Object] Deserialized data
151
+ def _deserialize(type, value)
152
+ case type.to_sym
153
+ when :DateTime
154
+ Date.parse value
155
+ when :Date
156
+ Date.parse value
157
+ when :String
158
+ value.to_s
159
+ when :Integer
160
+ value.to_i
161
+ when :Float
162
+ value.to_f
163
+ when :BOOLEAN
164
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
165
+ true
166
+ else
167
+ false
168
+ end
169
+ when :Object
170
+ # generic object (usually a Hash), return directly
171
+ value
172
+ when /\AArray<(?<inner_type>.+)>\z/
173
+ inner_type = Regexp.last_match[:inner_type]
174
+ value.map { |v| _deserialize(inner_type, v) }
175
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
176
+ k_type = Regexp.last_match[:k_type]
177
+ v_type = Regexp.last_match[:v_type]
178
+ {}.tap do |hash|
179
+ value.each do |k, v|
180
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
181
+ end
182
+ end
183
+ else
184
+ # model
185
+ # Signature type fix
186
+ ttype = type
187
+ if value.is_a?(Hash) and !value[:signatureType].nil?
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
207
+ end
208
+ temp_model = GroupDocsSignatureCloud.const_get(ttype).new
209
+ temp_model.build_from_hash(value)
210
+ end
211
+ end
212
+
213
+ # Returns the string representation of the object
214
+ # @return [String] String presentation of the object
215
+ def to_s
216
+ to_hash.to_s
217
+ end
218
+
219
+ # to_body is an alias to to_hash (backward compatibility)
220
+ # @return [Hash] Returns the object in the form of hash
221
+ def to_body
222
+ to_hash
223
+ end
224
+
225
+ # Returns the object in the form of hash
226
+ # @return [Hash] Returns the object in the form of hash
227
+ def to_hash
228
+ hash = {}
229
+ self.class.attribute_map.each_pair do |attr, param|
230
+ value = self.send(attr)
231
+ next if value.nil?
232
+ hash[param] = _to_hash(value)
233
+ end
234
+ hash
235
+ end
236
+
237
+ # Outputs non-array value in the form of hash
238
+ # For object, use to_hash. Otherwise, just return the value
239
+ # @param [Object] value Any valid value
240
+ # @return [Hash] Returns the value in the form of hash
241
+ def _to_hash(value)
242
+ if value.is_a?(Array)
243
+ value.compact.map { |v| _to_hash(v) }
244
+ elsif value.is_a?(Hash)
245
+ {}.tap do |hash|
246
+ value.each { |k, v| hash[k] = _to_hash(v) }
247
+ end
248
+ elsif value.respond_to? :to_hash
249
+ value.to_hash
250
+ else
251
+ value
252
+ end
253
+ end
254
+
255
+ end
256
+
257
+ end
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="delete_options.rb">
4
- # Copyright (c) 2003-2020 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2022 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -107,7 +107,7 @@ module GroupDocsSignatureCloud
107
107
  # @return true if the model is valid
108
108
  def valid?
109
109
  return false if @signature_type.nil?
110
- signature_type_validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp"])
110
+ signature_type_validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp", "FormField", "Metadata"])
111
111
  return false unless signature_type_validator.valid?(@signature_type)
112
112
  return true
113
113
  end
@@ -115,7 +115,7 @@ module GroupDocsSignatureCloud
115
115
  # Custom attribute writer method checking allowed values (enum).
116
116
  # @param [Object] signature_type Object to be assigned
117
117
  def signature_type=(signature_type)
118
- validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp"])
118
+ validator = EnumAttributeValidator.new('String', ["None", "Text", "Image", "Digital", "Barcode", "QRCode", "Stamp", "FormField", "Metadata"])
119
119
  if signature_type.to_i == 0
120
120
  unless validator.valid?(signature_type)
121
121
  raise ArgumentError, "invalid value for 'signature_type', must be one of #{validator.allowable_values}."
@@ -218,6 +218,24 @@ module GroupDocsSignatureCloud
218
218
  ttype = type
219
219
  if value.is_a?(Hash) and !value[:signatureType].nil?
220
220
  ttype = value[:signatureType] + 'Signature'
221
+ if value[:signatureType] == 'FormField' and !value[:type].nil?
222
+ type = value[:type]
223
+ if type == 'Checkbox'
224
+ ttype = 'CheckboxFormFieldSignature'
225
+ end
226
+ if type == 'Text'
227
+ ttype = 'TextFormFieldSignature'
228
+ end
229
+ if type == 'Combobox'
230
+ ttype = 'ComboboxFormFieldSignature'
231
+ end
232
+ if type == 'DigitalSignature'
233
+ ttype = 'DigitalFormFieldSignature'
234
+ end
235
+ if type == 'Radio'
236
+ ttype = 'RadioButtonFormFieldSignature'
237
+ end
238
+ end
221
239
  end
222
240
  temp_model = GroupDocsSignatureCloud.const_get(ttype).new
223
241
  temp_model.build_from_hash(value)
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="delete_result.rb">
4
- # Copyright (c) 2003-2020 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2022 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -31,7 +31,7 @@ module GroupDocsSignatureCloud
31
31
  # Delete result information
32
32
  class DeleteResult
33
33
 
34
- # Source document basic info
34
+ # Source document file info
35
35
  attr_accessor :file_info
36
36
 
37
37
  # Source document size in bytes
@@ -205,6 +205,24 @@ module GroupDocsSignatureCloud
205
205
  ttype = type
206
206
  if value.is_a?(Hash) and !value[:signatureType].nil?
207
207
  ttype = value[:signatureType] + 'Signature'
208
+ if value[:signatureType] == 'FormField' and !value[:type].nil?
209
+ type = value[:type]
210
+ if type == 'Checkbox'
211
+ ttype = 'CheckboxFormFieldSignature'
212
+ end
213
+ if type == 'Text'
214
+ ttype = 'TextFormFieldSignature'
215
+ end
216
+ if type == 'Combobox'
217
+ ttype = 'ComboboxFormFieldSignature'
218
+ end
219
+ if type == 'DigitalSignature'
220
+ ttype = 'DigitalFormFieldSignature'
221
+ end
222
+ if type == 'Radio'
223
+ ttype = 'RadioButtonFormFieldSignature'
224
+ end
225
+ end
208
226
  end
209
227
  temp_model = GroupDocsSignatureCloud.const_get(ttype).new
210
228
  temp_model.build_from_hash(value)
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="delete_settings.rb">
4
- # Copyright (c) 2003-2020 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2022 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -178,6 +178,24 @@ module GroupDocsSignatureCloud
178
178
  ttype = type
179
179
  if value.is_a?(Hash) and !value[:signatureType].nil?
180
180
  ttype = value[:signatureType] + 'Signature'
181
+ if value[:signatureType] == 'FormField' and !value[:type].nil?
182
+ type = value[:type]
183
+ if type == 'Checkbox'
184
+ ttype = 'CheckboxFormFieldSignature'
185
+ end
186
+ if type == 'Text'
187
+ ttype = 'TextFormFieldSignature'
188
+ end
189
+ if type == 'Combobox'
190
+ ttype = 'ComboboxFormFieldSignature'
191
+ end
192
+ if type == 'DigitalSignature'
193
+ ttype = 'DigitalFormFieldSignature'
194
+ end
195
+ if type == 'Radio'
196
+ ttype = 'RadioButtonFormFieldSignature'
197
+ end
198
+ end
181
199
  end
182
200
  temp_model = GroupDocsSignatureCloud.const_get(ttype).new
183
201
  temp_model.build_from_hash(value)