groupdocs_comparison_cloud 20.5 → 21.7

Sign up to get free protection for your applications and to get access to all the features.
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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c3d15eabf7059b1c257df768dcb17aa069e68f9f
4
- data.tar.gz: de9e909270ad4e0c21476478d56872d3d32b1599
3
+ metadata.gz: ea57c48c2d48fed49b535ee196c9f1fca512cfe0
4
+ data.tar.gz: d7c6b55b480d1b78a1969270015446324c717c0d
5
5
  SHA512:
6
- metadata.gz: f19f56eeac4f06e1a2e9b847198d6591a3dc3d375b225e12ae974747f1e0c14e45fece664f23dd5685c49abf059212fd7bf718165b5fd3991d4a46ba1e29b3ca
7
- data.tar.gz: f37f83a710b3119d466af1e39b541aa195c19dbfdc4d13eb1baeef544cb9f62d27836ea3173deaff549fd8a4e3946f90569ecc8ec4d9a9d0970d613766d96e91
6
+ metadata.gz: 7dfaa5b57b6a7e4d2687c185c24ca60cdb1e01b9d54ae42218ef969874bd5bab6873b2b5636221403a9bc01fa96cd8a2a8fcd76572aede40f1606c2b4163f161
7
+ data.tar.gz: 5c26a43224802f11edb0ab708435cb94ef0afc800e3b1de533f37353479786f0b621691a113f6e9ee35fff2e2447d59ff7ba056c2df9fa80f2c9384ae91eea06
@@ -1,6 +1,6 @@
1
1
  # ------------------------------------------------------------------------------------
2
2
  # <copyright company="Aspose Pty Ltd" file="groupdocs_comparison_cloud.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
@@ -30,6 +30,7 @@ require_relative 'groupdocs_comparison_cloud/version'
30
30
  require_relative 'groupdocs_comparison_cloud/configuration'
31
31
 
32
32
  # Models
33
+ require_relative 'groupdocs_comparison_cloud/models/apply_revisions_options'
33
34
  require_relative 'groupdocs_comparison_cloud/models/change_info'
34
35
  require_relative 'groupdocs_comparison_cloud/models/comparison_options'
35
36
  require_relative 'groupdocs_comparison_cloud/models/diagram_master_setting'
@@ -49,6 +50,7 @@ require_relative 'groupdocs_comparison_cloud/models/metadata'
49
50
  require_relative 'groupdocs_comparison_cloud/models/object_exist'
50
51
  require_relative 'groupdocs_comparison_cloud/models/page_info'
51
52
  require_relative 'groupdocs_comparison_cloud/models/rectangle'
53
+ require_relative 'groupdocs_comparison_cloud/models/revision_info'
52
54
  require_relative 'groupdocs_comparison_cloud/models/settings'
53
55
  require_relative 'groupdocs_comparison_cloud/models/size'
54
56
  require_relative 'groupdocs_comparison_cloud/models/storage_exist'
@@ -62,4 +64,5 @@ require_relative 'groupdocs_comparison_cloud/api/compare_api'
62
64
  require_relative 'groupdocs_comparison_cloud/api/file_api'
63
65
  require_relative 'groupdocs_comparison_cloud/api/folder_api'
64
66
  require_relative 'groupdocs_comparison_cloud/api/info_api'
67
+ require_relative 'groupdocs_comparison_cloud/api/review_api'
65
68
  require_relative 'groupdocs_comparison_cloud/api/storage_api'
@@ -1,6 +1,6 @@
1
1
  # -----------------------------------------------------------------------------------
2
2
  # <copyright company="Aspose Pty Ltd" file="compare.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
@@ -277,7 +277,7 @@ end
277
277
  #
278
278
  # --------------------------------------------------------------------------------------------------------------------
279
279
  # <copyright company="Aspose Pty Ltd" file="comparisons_request.rb">
280
- # Copyright (c) 2003-2020 Aspose Pty Ltd
280
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
281
281
  # </copyright>
282
282
  # <summary>
283
283
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -322,7 +322,7 @@ end
322
322
  #
323
323
  # --------------------------------------------------------------------------------------------------------------------
324
324
  # <copyright company="Aspose Pty Ltd" file="post_changes_request.rb">
325
- # Copyright (c) 2003-2020 Aspose Pty Ltd
325
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
326
326
  # </copyright>
327
327
  # <summary>
328
328
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -367,7 +367,7 @@ end
367
367
  #
368
368
  # --------------------------------------------------------------------------------------------------------------------
369
369
  # <copyright company="Aspose Pty Ltd" file="put_changes_document_request.rb">
370
- # Copyright (c) 2003-2020 Aspose Pty Ltd
370
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
371
371
  # </copyright>
372
372
  # <summary>
373
373
  # 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="file.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
@@ -449,7 +449,7 @@ end
449
449
  #
450
450
  # --------------------------------------------------------------------------------------------------------------------
451
451
  # <copyright company="Aspose Pty Ltd" file="copy_file_request.rb">
452
- # Copyright (c) 2003-2020 Aspose Pty Ltd
452
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
453
453
  # </copyright>
454
454
  # <summary>
455
455
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -510,7 +510,7 @@ end
510
510
  #
511
511
  # --------------------------------------------------------------------------------------------------------------------
512
512
  # <copyright company="Aspose Pty Ltd" file="delete_file_request.rb">
513
- # Copyright (c) 2003-2020 Aspose Pty Ltd
513
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
514
514
  # </copyright>
515
515
  # <summary>
516
516
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -563,7 +563,7 @@ end
563
563
  #
564
564
  # --------------------------------------------------------------------------------------------------------------------
565
565
  # <copyright company="Aspose Pty Ltd" file="download_file_request.rb">
566
- # Copyright (c) 2003-2020 Aspose Pty Ltd
566
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
567
567
  # </copyright>
568
568
  # <summary>
569
569
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -616,7 +616,7 @@ end
616
616
  #
617
617
  # --------------------------------------------------------------------------------------------------------------------
618
618
  # <copyright company="Aspose Pty Ltd" file="move_file_request.rb">
619
- # Copyright (c) 2003-2020 Aspose Pty Ltd
619
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
620
620
  # </copyright>
621
621
  # <summary>
622
622
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -677,7 +677,7 @@ end
677
677
  #
678
678
  # --------------------------------------------------------------------------------------------------------------------
679
679
  # <copyright company="Aspose Pty Ltd" file="upload_file_request.rb">
680
- # Copyright (c) 2003-2020 Aspose Pty Ltd
680
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
681
681
  # </copyright>
682
682
  # <summary>
683
683
  # 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="folder.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
@@ -430,7 +430,7 @@ end
430
430
  #
431
431
  # --------------------------------------------------------------------------------------------------------------------
432
432
  # <copyright company="Aspose Pty Ltd" file="copy_folder_request.rb">
433
- # Copyright (c) 2003-2020 Aspose Pty Ltd
433
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
434
434
  # </copyright>
435
435
  # <summary>
436
436
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -487,7 +487,7 @@ end
487
487
  #
488
488
  # --------------------------------------------------------------------------------------------------------------------
489
489
  # <copyright company="Aspose Pty Ltd" file="create_folder_request.rb">
490
- # Copyright (c) 2003-2020 Aspose Pty Ltd
490
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
491
491
  # </copyright>
492
492
  # <summary>
493
493
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -536,7 +536,7 @@ end
536
536
  #
537
537
  # --------------------------------------------------------------------------------------------------------------------
538
538
  # <copyright company="Aspose Pty Ltd" file="delete_folder_request.rb">
539
- # Copyright (c) 2003-2020 Aspose Pty Ltd
539
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
540
540
  # </copyright>
541
541
  # <summary>
542
542
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -589,7 +589,7 @@ end
589
589
  #
590
590
  # --------------------------------------------------------------------------------------------------------------------
591
591
  # <copyright company="Aspose Pty Ltd" file="get_files_list_request.rb">
592
- # Copyright (c) 2003-2020 Aspose Pty Ltd
592
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
593
593
  # </copyright>
594
594
  # <summary>
595
595
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -638,7 +638,7 @@ end
638
638
  #
639
639
  # --------------------------------------------------------------------------------------------------------------------
640
640
  # <copyright company="Aspose Pty Ltd" file="move_folder_request.rb">
641
- # Copyright (c) 2003-2020 Aspose Pty Ltd
641
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
642
642
  # </copyright>
643
643
  # <summary>
644
644
  # 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="info.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
@@ -222,7 +222,7 @@ end
222
222
  #
223
223
  # --------------------------------------------------------------------------------------------------------------------
224
224
  # <copyright company="Aspose Pty Ltd" file="get_document_info_request.rb">
225
- # Copyright (c) 2003-2020 Aspose Pty Ltd
225
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
226
226
  # </copyright>
227
227
  # <summary>
228
228
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -0,0 +1,314 @@
1
+ # -----------------------------------------------------------------------------------
2
+ # <copyright company="Aspose Pty Ltd" file="review.rb">
3
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
4
+ # </copyright>
5
+ # <summary>
6
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ # of this software and associated documentation files (the "Software"), to deal
8
+ # in the Software without restriction, including without limitation the rights
9
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ # copies of the Software, and to permit persons to whom the Software is
11
+ # furnished to do so, subject to the following conditions:
12
+ #
13
+ # The above copyright notice and this permission notice shall be included in all
14
+ # copies or substantial portions of the Software.
15
+ #
16
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ # SOFTWARE.
23
+ # </summary>
24
+ # -----------------------------------------------------------------------------------
25
+
26
+ require 'uri'
27
+ require 'date'
28
+
29
+ module GroupDocsComparisonCloud
30
+ #
31
+ # GroupDocs.Comparison Cloud API
32
+ #
33
+ class ReviewApi
34
+ attr_accessor :config
35
+
36
+ #make ReviewApi.new private
37
+ private_class_method :new
38
+
39
+ # Initializes new instance of ReviewApi
40
+ #
41
+ # @param [config] Configuration
42
+ # @return [ReviewApi] New instance of ReviewApi
43
+ def initialize(config)
44
+ @config = config
45
+ @api_client = ApiClient.new(config)
46
+ @access_token = nil
47
+ end
48
+
49
+ # Initializes new instance of ReviewApi
50
+ #
51
+ # @param [app_sid] Application identifier (App SID)
52
+ # @param [app_key] Application private key (App Key)
53
+ # @return [ReviewApi] New instance of ReviewApi
54
+ def self.from_keys(app_sid, app_key)
55
+ config = Configuration.new(app_sid, app_key)
56
+ return new(config)
57
+ end
58
+
59
+ # Initializes new instance of ReviewApi
60
+ #
61
+ # @param [config] Configuration
62
+ # @return [ReviewApi] New instance of ReviewApi
63
+ def self.from_config(config)
64
+ return new(config)
65
+ end
66
+
67
+ # Accepts or rejects revisions in DOCX document
68
+ #
69
+ # @param request apply_revisions_request
70
+ # @return [Link]
71
+ def apply_revisions(request)
72
+ data, _status_code, _headers = apply_revisions_with_http_info(request)
73
+ data
74
+ end
75
+
76
+ # Accepts or rejects revisions in DOCX document
77
+ #
78
+ # @param request apply_revisions_request
79
+ # @return [Array<(Link, Fixnum, Hash)>]
80
+ # Link data, response status code and response headers
81
+ def apply_revisions_with_http_info(request)
82
+ raise ArgumentError, 'Incorrect request type' unless request.is_a? ApplyRevisionsRequest
83
+
84
+ @api_client.config.logger.debug 'Calling API: ReviewApi.apply_revisions ...' if @api_client.config.debugging
85
+ # verify the required parameter 'revision_options' is set
86
+ raise ArgumentError, 'Missing the required parameter revision_options when calling ReviewApi.apply_revisions' if @api_client.config.client_side_validation && request.revision_options.nil?
87
+ # resource path
88
+ local_var_path = '/comparison/revisions'
89
+
90
+ # query parameters
91
+ query_params = {}
92
+
93
+ # header parameters
94
+ header_params = {}
95
+ # HTTP header 'Accept' (if needed)
96
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
97
+ # HTTP header 'Content-Type'
98
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
99
+
100
+ # form parameters
101
+ form_params = {}
102
+
103
+ # http body (model)
104
+ post_body = @api_client.object_to_http_body(request.revision_options)
105
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
106
+ header_params: header_params,
107
+ query_params: query_params,
108
+ form_params: form_params,
109
+ body: post_body,
110
+ access_token: get_access_token,
111
+ return_type: 'Link')
112
+ if @api_client.config.debugging
113
+ @api_client.config.logger.debug "API called:
114
+ ReviewApi#apply_revisions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
115
+ end
116
+ [data, status_code, headers]
117
+ end
118
+
119
+ # Get list of DOCX document revisions.
120
+ #
121
+ # @param request get_revisions_request
122
+ # @return [Array<RevisionInfo>]
123
+ def get_revisions(request)
124
+ data, _status_code, _headers = get_revisions_with_http_info(request)
125
+ data
126
+ end
127
+
128
+ # Get list of DOCX document revisions.
129
+ #
130
+ # @param request get_revisions_request
131
+ # @return [Array<(Array<RevisionInfo>, Fixnum, Hash)>]
132
+ # Array<RevisionInfo> data, response status code and response headers
133
+ def get_revisions_with_http_info(request)
134
+ raise ArgumentError, 'Incorrect request type' unless request.is_a? GetRevisionsRequest
135
+
136
+ @api_client.config.logger.debug 'Calling API: ReviewApi.get_revisions ...' if @api_client.config.debugging
137
+ # verify the required parameter 'file_info' is set
138
+ raise ArgumentError, 'Missing the required parameter file_info when calling ReviewApi.get_revisions' if @api_client.config.client_side_validation && request.file_info.nil?
139
+ # resource path
140
+ local_var_path = '/comparison/revisions'
141
+
142
+ # query parameters
143
+ query_params = {}
144
+
145
+ # header parameters
146
+ header_params = {}
147
+ # HTTP header 'Accept' (if needed)
148
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
149
+ # HTTP header 'Content-Type'
150
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
151
+
152
+ # form parameters
153
+ form_params = {}
154
+
155
+ # http body (model)
156
+ post_body = @api_client.object_to_http_body(request.file_info)
157
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
158
+ header_params: header_params,
159
+ query_params: query_params,
160
+ form_params: form_params,
161
+ body: post_body,
162
+ access_token: get_access_token,
163
+ return_type: 'Array<RevisionInfo>')
164
+ if @api_client.config.debugging
165
+ @api_client.config.logger.debug "API called:
166
+ ReviewApi#get_revisions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
167
+ end
168
+ [data, status_code, headers]
169
+ end
170
+
171
+ #
172
+ # Helper method to convert first letter to downcase
173
+ #
174
+ private def downcase_first_letter(str)
175
+ value = str[0].downcase + str[1..-1]
176
+ value
177
+ end
178
+
179
+ #
180
+ # Retrieves access token
181
+ #
182
+ private def get_access_token
183
+ if @access_token.nil? then
184
+ request_access_token
185
+ end
186
+
187
+ @access_token
188
+ end
189
+
190
+ #
191
+ # Gets a access token from server
192
+ #
193
+ private def request_access_token
194
+ auth_config = Configuration.new(@config.app_sid, @config.app_key)
195
+ auth_config.api_base_url = @config.api_base_url
196
+ auth_config.debugging = @config.debugging
197
+ auth_config.logger = @config.logger
198
+ auth_config.temp_folder_path = @config.temp_folder_path
199
+ auth_config.client_side_validation = @config.client_side_validation
200
+ auth_config.api_version = ''
201
+
202
+ auth_api_client = ApiClient.new(auth_config)
203
+
204
+ request_url = "/connect/token"
205
+ post_data = "grant_type=client_credentials&client_id=#{@config.app_sid}&client_secret=#{@config.app_key}"
206
+
207
+ data, _status_code, _header = auth_api_client.call_api(:POST, request_url, :body => post_data, :return_type => 'Object')
208
+
209
+ @access_token = data[:access_token]
210
+
211
+ expires_in_seconds = data[:expires_in].to_i - 5 * 60
212
+ expires_in_days = Rational(expires_in_seconds, 60 * 60 * 24)
213
+ @access_token_expires_at = DateTime.now + expires_in_days
214
+ end
215
+
216
+ # requires all files inside a directory from current dir
217
+ # @param _dir can be relative path like '/lib' or "../lib"
218
+ private def require_all(_dir)
219
+ Dir[File.expand_path(File.join(File.dirname(File.absolute_path(__FILE__)), _dir)) + "/*.rb"].each do |file|
220
+ require file
221
+ end
222
+ end
223
+ end
224
+ end
225
+ #
226
+ # --------------------------------------------------------------------------------------------------------------------
227
+ # <copyright company="Aspose Pty Ltd" file="apply_revisions_request.rb">
228
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
229
+ # </copyright>
230
+ # <summary>
231
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
232
+ # of this software and associated documentation files (the "Software"), to deal
233
+ # in the Software without restriction, including without limitation the rights
234
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
235
+ # copies of the Software, and to permit persons to whom the Software is
236
+ # furnished to do so, subject to the following conditions:
237
+ #
238
+ # The above copyright notice and this permission notice shall be included in all
239
+ # copies or substantial portions of the Software.
240
+ #
241
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
242
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
243
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
244
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
245
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
246
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
247
+ # SOFTWARE.
248
+ # </summary>
249
+ # --------------------------------------------------------------------------------------------------------------------
250
+ #
251
+
252
+ module GroupDocsComparisonCloud
253
+
254
+ #
255
+ # Request model for apply_revisions operation.
256
+ #
257
+ class ApplyRevisionsRequest
258
+
259
+ # Apply revisions options
260
+ attr_accessor :revision_options
261
+
262
+ #
263
+ # Initializes a new instance.
264
+ # @param revision_options Apply revisions options
265
+ def initialize(revision_options)
266
+ self.revision_options = revision_options
267
+ end
268
+ end
269
+ end
270
+ #
271
+ # --------------------------------------------------------------------------------------------------------------------
272
+ # <copyright company="Aspose Pty Ltd" file="get_revisions_request.rb">
273
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
274
+ # </copyright>
275
+ # <summary>
276
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
277
+ # of this software and associated documentation files (the "Software"), to deal
278
+ # in the Software without restriction, including without limitation the rights
279
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
280
+ # copies of the Software, and to permit persons to whom the Software is
281
+ # furnished to do so, subject to the following conditions:
282
+ #
283
+ # The above copyright notice and this permission notice shall be included in all
284
+ # copies or substantial portions of the Software.
285
+ #
286
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
287
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
288
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
289
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
290
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
291
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
292
+ # SOFTWARE.
293
+ # </summary>
294
+ # --------------------------------------------------------------------------------------------------------------------
295
+ #
296
+
297
+ module GroupDocsComparisonCloud
298
+
299
+ #
300
+ # Request model for get_revisions operation.
301
+ #
302
+ class GetRevisionsRequest
303
+
304
+ # File information
305
+ attr_accessor :file_info
306
+
307
+ #
308
+ # Initializes a new instance.
309
+ # @param file_info File information
310
+ def initialize(file_info)
311
+ self.file_info = file_info
312
+ end
313
+ end
314
+ end