groupdocs_comparison_cloud 20.5 → 21.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/lib/groupdocs_comparison_cloud.rb +4 -1
  3. data/lib/groupdocs_comparison_cloud/api/compare_api.rb +4 -4
  4. data/lib/groupdocs_comparison_cloud/api/file_api.rb +6 -6
  5. data/lib/groupdocs_comparison_cloud/api/folder_api.rb +6 -6
  6. data/lib/groupdocs_comparison_cloud/api/info_api.rb +2 -2
  7. data/lib/groupdocs_comparison_cloud/api/review_api.rb +314 -0
  8. data/lib/groupdocs_comparison_cloud/api/storage_api.rb +5 -5
  9. data/lib/groupdocs_comparison_cloud/api_client.rb +1 -1
  10. data/lib/groupdocs_comparison_cloud/api_error.rb +16 -6
  11. data/lib/groupdocs_comparison_cloud/configuration.rb +1 -1
  12. data/lib/groupdocs_comparison_cloud/models/apply_revisions_options.rb +266 -0
  13. data/lib/groupdocs_comparison_cloud/models/change_info.rb +1 -1
  14. data/lib/groupdocs_comparison_cloud/models/comparison_options.rb +1 -1
  15. data/lib/groupdocs_comparison_cloud/models/diagram_master_setting.rb +1 -1
  16. data/lib/groupdocs_comparison_cloud/models/disc_usage.rb +1 -1
  17. data/lib/groupdocs_comparison_cloud/models/error.rb +1 -1
  18. data/lib/groupdocs_comparison_cloud/models/error_details.rb +1 -1
  19. data/lib/groupdocs_comparison_cloud/models/file_info.rb +1 -1
  20. data/lib/groupdocs_comparison_cloud/models/file_version.rb +1 -1
  21. data/lib/groupdocs_comparison_cloud/models/file_versions.rb +1 -1
  22. data/lib/groupdocs_comparison_cloud/models/files_list.rb +1 -1
  23. data/lib/groupdocs_comparison_cloud/models/files_upload_result.rb +1 -1
  24. data/lib/groupdocs_comparison_cloud/models/format.rb +1 -1
  25. data/lib/groupdocs_comparison_cloud/models/formats_result.rb +1 -1
  26. data/lib/groupdocs_comparison_cloud/models/info_result.rb +1 -1
  27. data/lib/groupdocs_comparison_cloud/models/items_style.rb +1 -1
  28. data/lib/groupdocs_comparison_cloud/models/link.rb +1 -1
  29. data/lib/groupdocs_comparison_cloud/models/metadata.rb +1 -1
  30. data/lib/groupdocs_comparison_cloud/models/object_exist.rb +1 -1
  31. data/lib/groupdocs_comparison_cloud/models/page_info.rb +1 -1
  32. data/lib/groupdocs_comparison_cloud/models/rectangle.rb +1 -1
  33. data/lib/groupdocs_comparison_cloud/models/revision_info.rb +322 -0
  34. data/lib/groupdocs_comparison_cloud/models/settings.rb +1 -1
  35. data/lib/groupdocs_comparison_cloud/models/size.rb +1 -1
  36. data/lib/groupdocs_comparison_cloud/models/storage_exist.rb +1 -1
  37. data/lib/groupdocs_comparison_cloud/models/storage_file.rb +1 -1
  38. data/lib/groupdocs_comparison_cloud/models/style_change_info.rb +1 -1
  39. data/lib/groupdocs_comparison_cloud/models/updates_options.rb +1 -1
  40. data/lib/groupdocs_comparison_cloud/version.rb +2 -2
  41. metadata +5 -16
@@ -1,6 +1,6 @@
1
1
  # -----------------------------------------------------------------------------------
2
2
  # <copyright company="Aspose Pty Ltd" file="storage.rb">
3
- # Copyright (c) 2003-2020 Aspose Pty Ltd
3
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
4
4
  # </copyright>
5
5
  # <summary>
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -350,7 +350,7 @@ end
350
350
  #
351
351
  # --------------------------------------------------------------------------------------------------------------------
352
352
  # <copyright company="Aspose Pty Ltd" file="get_disc_usage_request.rb">
353
- # Copyright (c) 2003-2020 Aspose Pty Ltd
353
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
354
354
  # </copyright>
355
355
  # <summary>
356
356
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -395,7 +395,7 @@ end
395
395
  #
396
396
  # --------------------------------------------------------------------------------------------------------------------
397
397
  # <copyright company="Aspose Pty Ltd" file="get_file_versions_request.rb">
398
- # Copyright (c) 2003-2020 Aspose Pty Ltd
398
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
399
399
  # </copyright>
400
400
  # <summary>
401
401
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -444,7 +444,7 @@ end
444
444
  #
445
445
  # --------------------------------------------------------------------------------------------------------------------
446
446
  # <copyright company="Aspose Pty Ltd" file="object_exists_request.rb">
447
- # Copyright (c) 2003-2020 Aspose Pty Ltd
447
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
448
448
  # </copyright>
449
449
  # <summary>
450
450
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -497,7 +497,7 @@ end
497
497
  #
498
498
  # --------------------------------------------------------------------------------------------------------------------
499
499
  # <copyright company="Aspose Pty Ltd" file="storage_exists_request.rb">
500
- # Copyright (c) 2003-2020 Aspose Pty Ltd
500
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
501
501
  # </copyright>
502
502
  # <summary>
503
503
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,6 +1,6 @@
1
1
  # -----------------------------------------------------------------------------------
2
2
  # <copyright company="Aspose Pty Ltd" file="api_client.rb">
3
- # Copyright (c) 2003-2020 Aspose Pty Ltd
3
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
4
4
  # </copyright>
5
5
  # <summary>
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,6 +1,6 @@
1
1
  # -----------------------------------------------------------------------------------
2
2
  # <copyright company="Aspose Pty Ltd" file="api_error.rb">
3
- # Copyright (c) 2003-2020 Aspose Pty Ltd
3
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
4
4
  # </copyright>
5
5
  # <summary>
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -39,12 +39,22 @@ module GroupDocsComparisonCloud
39
39
 
40
40
  if arg.key?(:response_body) then
41
41
  data = JSON.parse(arg[:response_body], :symbolize_names => true)
42
- if !data.nil? && !data[:error].nil? then
43
- error = data[:error]
44
- if error.kind_of?(String) then
45
- @message = error
42
+ if !data.nil? then
43
+ if !data[:error].nil? then
44
+ error = data[:error]
45
+ if error.kind_of?(String) then
46
+ @message = error
47
+ else
48
+ @message = error[:message]
49
+ end
46
50
  else
47
- @message = error[:message]
51
+ message = data[:message]
52
+ if !message.nil? && message.kind_of?(String) then
53
+ @message = message
54
+ @code = data[:code]
55
+ else
56
+ @message = data
57
+ end
48
58
  end
49
59
  end
50
60
  end
@@ -1,6 +1,6 @@
1
1
  # ------------------------------------------------------------------------------------
2
2
  # <copyright company="Aspose Pty Ltd" file="configuration.rb">
3
- # Copyright (c) 2003-2020 Aspose Pty Ltd
3
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
4
4
  # </copyright>
5
5
  # <summary>
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -0,0 +1,266 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose Pty Ltd" file="apply_revisions_options.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 GroupDocsComparisonCloud
31
+ # Options for apply revisions method
32
+ class ApplyRevisionsOptions
33
+
34
+ # Information about source file
35
+ attr_accessor :source_file
36
+
37
+ # Revisions to apply or reject.
38
+ attr_accessor :revisions
39
+
40
+ # Indicates whether to apply all revisions in the document
41
+ attr_accessor :accept_all
42
+
43
+ # Indicates whether to reject all revisions in the document
44
+ attr_accessor :reject_all
45
+
46
+ # Path to the resultant document (if not specified the document will not be saved)
47
+ attr_accessor :output_path
48
+
49
+ # Attribute mapping from ruby-style variable name to JSON key.
50
+ def self.attribute_map
51
+ {
52
+ :'source_file' => :'SourceFile',
53
+ :'revisions' => :'Revisions',
54
+ :'accept_all' => :'AcceptAll',
55
+ :'reject_all' => :'RejectAll',
56
+ :'output_path' => :'OutputPath'
57
+ }
58
+ end
59
+
60
+ # Attribute type mapping.
61
+ def self.swagger_types
62
+ {
63
+ :'source_file' => :'FileInfo',
64
+ :'revisions' => :'Array<RevisionInfo>',
65
+ :'accept_all' => :'BOOLEAN',
66
+ :'reject_all' => :'BOOLEAN',
67
+ :'output_path' => :'String'
68
+ }
69
+ end
70
+
71
+ # Initializes the object
72
+ # @param [Hash] attributes Model attributes in the form of hash
73
+ def initialize(attributes = {})
74
+ return unless attributes.is_a?(Hash)
75
+
76
+ # convert string to symbol for hash key
77
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
78
+
79
+ if attributes.key?(:'SourceFile')
80
+ self.source_file = attributes[:'SourceFile']
81
+ end
82
+
83
+ if attributes.key?(:'Revisions')
84
+ if (value = attributes[:'Revisions']).is_a?(Array)
85
+ self.revisions = value
86
+ end
87
+ end
88
+
89
+ if attributes.key?(:'AcceptAll')
90
+ self.accept_all = attributes[:'AcceptAll']
91
+ end
92
+
93
+ if attributes.key?(:'RejectAll')
94
+ self.reject_all = attributes[:'RejectAll']
95
+ end
96
+
97
+ if attributes.key?(:'OutputPath')
98
+ self.output_path = attributes[:'OutputPath']
99
+ end
100
+
101
+ end
102
+
103
+ # Show invalid properties with the reasons. Usually used together with valid?
104
+ # @return Array for valid properies with the reasons
105
+ def list_invalid_properties
106
+ invalid_properties = []
107
+ if @accept_all.nil?
108
+ invalid_properties.push("invalid value for 'accept_all', accept_all cannot be nil.")
109
+ end
110
+
111
+ if @reject_all.nil?
112
+ invalid_properties.push("invalid value for 'reject_all', reject_all cannot be nil.")
113
+ end
114
+
115
+ return invalid_properties
116
+ end
117
+
118
+ # Check to see if the all the properties in the model are valid
119
+ # @return true if the model is valid
120
+ def valid?
121
+ return false if @accept_all.nil?
122
+ return false if @reject_all.nil?
123
+ return true
124
+ end
125
+
126
+ # Checks equality by comparing each attribute.
127
+ # @param [Object] Object to be compared
128
+ def ==(other)
129
+ return true if self.equal?(other)
130
+ self.class == other.class &&
131
+ source_file == other.source_file &&
132
+ revisions == other.revisions &&
133
+ accept_all == other.accept_all &&
134
+ reject_all == other.reject_all &&
135
+ output_path == other.output_path
136
+ end
137
+
138
+ # @see the `==` method
139
+ # @param [Object] Object to be compared
140
+ def eql?(other)
141
+ self == other
142
+ end
143
+
144
+ # Calculates hash code according to all attributes.
145
+ # @return [Fixnum] Hash code
146
+ def hash
147
+ [source_file, revisions, accept_all, reject_all, output_path].hash
148
+ end
149
+
150
+ # Downcases first letter.
151
+ # @return downcased string
152
+ def uncap(str)
153
+ str[0, 1].downcase + str[1..-1]
154
+ end
155
+
156
+ # Builds the object from hash
157
+ # @param [Hash] attributes Model attributes in the form of hash
158
+ # @return [Object] Returns the model itself
159
+ def build_from_hash(attributes)
160
+ return nil unless attributes.is_a?(Hash)
161
+ self.class.swagger_types.each_pair do |key, type|
162
+ pname = uncap(self.class.attribute_map[key]).intern
163
+ value = attributes[pname]
164
+ if type =~ /\AArray<(.*)>/i
165
+ # check to ensure the input is an array given that the the attribute
166
+ # is documented as an array but the input is not
167
+ if value.is_a?(Array)
168
+ self.send("#{key}=", value.map { |v| _deserialize($1, v) })
169
+ end
170
+ elsif !value.nil?
171
+ self.send("#{key}=", _deserialize(type, value))
172
+ end
173
+ # or else data not found in attributes(hash), not an issue as the data can be optional
174
+ end
175
+
176
+ self
177
+ end
178
+
179
+ # Deserializes the data based on type
180
+ # @param string type Data type
181
+ # @param string value Value to be deserialized
182
+ # @return [Object] Deserialized data
183
+ def _deserialize(type, value)
184
+ case type.to_sym
185
+ when :DateTime
186
+ Date.parse value
187
+ when :Date
188
+ Date.parse value
189
+ when :String
190
+ value.to_s
191
+ when :Integer
192
+ value.to_i
193
+ when :Float
194
+ value.to_f
195
+ when :BOOLEAN
196
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
197
+ true
198
+ else
199
+ false
200
+ end
201
+ when :Object
202
+ # generic object (usually a Hash), return directly
203
+ value
204
+ when /\AArray<(?<inner_type>.+)>\z/
205
+ inner_type = Regexp.last_match[:inner_type]
206
+ value.map { |v| _deserialize(inner_type, v) }
207
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
208
+ k_type = Regexp.last_match[:k_type]
209
+ v_type = Regexp.last_match[:v_type]
210
+ {}.tap do |hash|
211
+ value.each do |k, v|
212
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
213
+ end
214
+ end
215
+ else
216
+ # model
217
+ temp_model = GroupDocsComparisonCloud.const_get(type).new
218
+ temp_model.build_from_hash(value)
219
+ end
220
+ end
221
+
222
+ # Returns the string representation of the object
223
+ # @return [String] String presentation of the object
224
+ def to_s
225
+ to_hash.to_s
226
+ end
227
+
228
+ # to_body is an alias to to_hash (backward compatibility)
229
+ # @return [Hash] Returns the object in the form of hash
230
+ def to_body
231
+ to_hash
232
+ end
233
+
234
+ # Returns the object in the form of hash
235
+ # @return [Hash] Returns the object in the form of hash
236
+ def to_hash
237
+ hash = {}
238
+ self.class.attribute_map.each_pair do |attr, param|
239
+ value = self.send(attr)
240
+ next if value.nil?
241
+ hash[param] = _to_hash(value)
242
+ end
243
+ hash
244
+ end
245
+
246
+ # Outputs non-array value in the form of hash
247
+ # For object, use to_hash. Otherwise, just return the value
248
+ # @param [Object] value Any valid value
249
+ # @return [Hash] Returns the value in the form of hash
250
+ def _to_hash(value)
251
+ if value.is_a?(Array)
252
+ value.compact.map { |v| _to_hash(v) }
253
+ elsif value.is_a?(Hash)
254
+ {}.tap do |hash|
255
+ value.each { |k, v| hash[k] = _to_hash(v) }
256
+ end
257
+ elsif value.respond_to? :to_hash
258
+ value.to_hash
259
+ else
260
+ value
261
+ end
262
+ end
263
+
264
+ end
265
+
266
+ end
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="change_info.rb">
4
- # Copyright (c) 2003-2020 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="comparison_options.rb">
4
- # Copyright (c) 2003-2020 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="diagram_master_setting.rb">
4
- # Copyright (c) 2003-2020 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="disc_usage.rb">
4
- # Copyright (c) 2003-2020 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="error.rb">
4
- # Copyright (c) 2003-2020 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="error_details.rb">
4
- # Copyright (c) 2003-2020 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="file_info.rb">
4
- # Copyright (c) 2003-2020 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="file_version.rb">
4
- # Copyright (c) 2003-2020 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="file_versions.rb">
4
- # Copyright (c) 2003-2020 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy