groupdocs_signature_cloud 20.7 → 21.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/lib/groupdocs_signature_cloud.rb +7 -1
  3. data/lib/groupdocs_signature_cloud/api/file_api.rb +6 -6
  4. data/lib/groupdocs_signature_cloud/api/folder_api.rb +6 -6
  5. data/lib/groupdocs_signature_cloud/api/info_api.rb +2 -2
  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 +1 -1
  13. data/lib/groupdocs_signature_cloud/models/barcode_type.rb +1 -1
  14. data/lib/groupdocs_signature_cloud/models/barcodes_result.rb +1 -1
  15. data/lib/groupdocs_signature_cloud/models/base_settings.rb +1 -1
  16. data/lib/groupdocs_signature_cloud/models/border_line.rb +1 -1
  17. data/lib/groupdocs_signature_cloud/models/brush.rb +1 -1
  18. data/lib/groupdocs_signature_cloud/models/color.rb +1 -1
  19. data/lib/groupdocs_signature_cloud/models/delete_options.rb +1 -1
  20. data/lib/groupdocs_signature_cloud/models/delete_result.rb +2 -2
  21. data/lib/groupdocs_signature_cloud/models/delete_settings.rb +1 -1
  22. data/lib/groupdocs_signature_cloud/models/digital_signature.rb +15 -5
  23. data/lib/groupdocs_signature_cloud/models/disc_usage.rb +1 -1
  24. data/lib/groupdocs_signature_cloud/models/error.rb +1 -1
  25. data/lib/groupdocs_signature_cloud/models/error_details.rb +1 -1
  26. data/lib/groupdocs_signature_cloud/models/file_info.rb +1 -1
  27. data/lib/groupdocs_signature_cloud/models/file_version.rb +1 -1
  28. data/lib/groupdocs_signature_cloud/models/file_versions.rb +1 -1
  29. data/lib/groupdocs_signature_cloud/models/files_list.rb +1 -1
  30. data/lib/groupdocs_signature_cloud/models/files_upload_result.rb +1 -1
  31. data/lib/groupdocs_signature_cloud/models/format.rb +1 -1
  32. data/lib/groupdocs_signature_cloud/models/formats_result.rb +1 -1
  33. data/lib/groupdocs_signature_cloud/models/image_signature.rb +1 -1
  34. data/lib/groupdocs_signature_cloud/models/info_result.rb +2 -2
  35. data/lib/groupdocs_signature_cloud/models/info_settings.rb +1 -1
  36. data/lib/groupdocs_signature_cloud/models/linear_gradient_brush.rb +1 -1
  37. data/lib/groupdocs_signature_cloud/models/object_exist.rb +1 -1
  38. data/lib/groupdocs_signature_cloud/models/options_base.rb +1 -1
  39. data/lib/groupdocs_signature_cloud/models/padding.rb +1 -1
  40. data/lib/groupdocs_signature_cloud/models/page_info.rb +1 -1
  41. data/lib/groupdocs_signature_cloud/models/pages_setup.rb +1 -1
  42. data/lib/groupdocs_signature_cloud/models/pdf_digital_signature.rb +321 -0
  43. data/lib/groupdocs_signature_cloud/models/preview_page.rb +259 -0
  44. data/lib/groupdocs_signature_cloud/models/preview_result.rb +261 -0
  45. data/lib/groupdocs_signature_cloud/models/preview_settings.rb +338 -0
  46. data/lib/groupdocs_signature_cloud/models/qr_code_signature.rb +1 -1
  47. data/lib/groupdocs_signature_cloud/models/qr_code_type.rb +1 -1
  48. data/lib/groupdocs_signature_cloud/models/qr_codes_result.rb +1 -1
  49. data/lib/groupdocs_signature_cloud/models/radial_gradient_brush.rb +1 -1
  50. data/lib/groupdocs_signature_cloud/models/save_options.rb +1 -1
  51. data/lib/groupdocs_signature_cloud/models/search_barcode_options.rb +1 -1
  52. data/lib/groupdocs_signature_cloud/models/search_digital_options.rb +1 -1
  53. data/lib/groupdocs_signature_cloud/models/search_options.rb +1 -1
  54. data/lib/groupdocs_signature_cloud/models/search_qr_code_options.rb +1 -1
  55. data/lib/groupdocs_signature_cloud/models/search_result.rb +1 -1
  56. data/lib/groupdocs_signature_cloud/models/search_settings.rb +1 -1
  57. data/lib/groupdocs_signature_cloud/models/sign_barcode_options.rb +17 -2
  58. data/lib/groupdocs_signature_cloud/models/sign_digital_options.rb +1 -1
  59. data/lib/groupdocs_signature_cloud/models/sign_image_options.rb +1 -1
  60. data/lib/groupdocs_signature_cloud/models/sign_options.rb +1 -1
  61. data/lib/groupdocs_signature_cloud/models/sign_qr_code_options.rb +17 -2
  62. data/lib/groupdocs_signature_cloud/models/sign_result.rb +2 -2
  63. data/lib/groupdocs_signature_cloud/models/sign_settings.rb +1 -1
  64. data/lib/groupdocs_signature_cloud/models/sign_stamp_options.rb +1 -1
  65. data/lib/groupdocs_signature_cloud/models/sign_text_options.rb +20 -5
  66. data/lib/groupdocs_signature_cloud/models/signature.rb +1 -1
  67. data/lib/groupdocs_signature_cloud/models/signature_font.rb +1 -1
  68. data/lib/groupdocs_signature_cloud/models/solid_brush.rb +1 -1
  69. data/lib/groupdocs_signature_cloud/models/stamp_line.rb +1 -1
  70. data/lib/groupdocs_signature_cloud/models/storage_exist.rb +1 -1
  71. data/lib/groupdocs_signature_cloud/models/storage_file.rb +1 -1
  72. data/lib/groupdocs_signature_cloud/models/text_signature.rb +1 -1
  73. data/lib/groupdocs_signature_cloud/models/texture_brush.rb +1 -1
  74. data/lib/groupdocs_signature_cloud/models/time_stamp.rb +239 -0
  75. data/lib/groupdocs_signature_cloud/models/update_options.rb +1 -1
  76. data/lib/groupdocs_signature_cloud/models/update_result.rb +2 -2
  77. data/lib/groupdocs_signature_cloud/models/update_settings.rb +1 -1
  78. data/lib/groupdocs_signature_cloud/models/verify_barcode_options.rb +1 -1
  79. data/lib/groupdocs_signature_cloud/models/verify_digital_options.rb +1 -1
  80. data/lib/groupdocs_signature_cloud/models/verify_options.rb +1 -1
  81. data/lib/groupdocs_signature_cloud/models/verify_qr_code_options.rb +1 -1
  82. data/lib/groupdocs_signature_cloud/models/verify_result.rb +2 -2
  83. data/lib/groupdocs_signature_cloud/models/verify_settings.rb +1 -1
  84. data/lib/groupdocs_signature_cloud/models/verify_text_options.rb +1 -1
  85. data/lib/groupdocs_signature_cloud/version.rb +2 -2
  86. metadata +8 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8fa984d6ace26ca0b73e9c3be93031929594d219
4
- data.tar.gz: d990275e8c301d779c59571859caf8023836f7a1
3
+ metadata.gz: 8c9a5d0d513bf78b30876315bf66fa535a9dce68
4
+ data.tar.gz: 15140996c38c2bb7f1ce0f71c3995e5cb901f480
5
5
  SHA512:
6
- metadata.gz: 22c1e3b614286e022dfe2420e73561c00fe771d0754ffad4fc619e2448533dc94cdecef85facc52cf05f070d2beeabc25f8b5250c3953ce226be779cd78f9dd5
7
- data.tar.gz: ea0bae5816f4246b5c5aa96cc8fb7b38647aedb4996948f035c860320b731ff8a39fbf6631f3c73715eb975361bcbb926a374d6257b7b751cc487803b3d25958
6
+ metadata.gz: d595bf805a5fef25911167e6d4e77db9128c490b47e5b3724f765cb5a228c5638df020ef40f936a87537e602c11d38c122592acbeb31355e8518ee2e378e8358
7
+ data.tar.gz: a0d1d2bb262fbae93444554cde965409fd65d19a93d1da3259cda06c849ca1af797de3869a59be828f830bf7da9b87e23ea426671f679318494d0ce7ce8e4236
@@ -1,6 +1,6 @@
1
1
  # ------------------------------------------------------------------------------------
2
2
  # <copyright company="Aspose Pty Ltd" file="groupdocs_signature_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
@@ -53,6 +53,9 @@ require_relative 'groupdocs_signature_cloud/models/options_base'
53
53
  require_relative 'groupdocs_signature_cloud/models/padding'
54
54
  require_relative 'groupdocs_signature_cloud/models/page_info'
55
55
  require_relative 'groupdocs_signature_cloud/models/pages_setup'
56
+ require_relative 'groupdocs_signature_cloud/models/pdf_digital_signature'
57
+ require_relative 'groupdocs_signature_cloud/models/preview_page'
58
+ require_relative 'groupdocs_signature_cloud/models/preview_result'
56
59
  require_relative 'groupdocs_signature_cloud/models/qr_code_type'
57
60
  require_relative 'groupdocs_signature_cloud/models/qr_codes_result'
58
61
  require_relative 'groupdocs_signature_cloud/models/save_options'
@@ -63,6 +66,7 @@ require_relative 'groupdocs_signature_cloud/models/signature_font'
63
66
  require_relative 'groupdocs_signature_cloud/models/stamp_line'
64
67
  require_relative 'groupdocs_signature_cloud/models/storage_exist'
65
68
  require_relative 'groupdocs_signature_cloud/models/storage_file'
69
+ require_relative 'groupdocs_signature_cloud/models/time_stamp'
66
70
  require_relative 'groupdocs_signature_cloud/models/update_options'
67
71
  require_relative 'groupdocs_signature_cloud/models/update_result'
68
72
  require_relative 'groupdocs_signature_cloud/models/verify_result'
@@ -73,6 +77,7 @@ require_relative 'groupdocs_signature_cloud/models/file_version'
73
77
  require_relative 'groupdocs_signature_cloud/models/image_signature'
74
78
  require_relative 'groupdocs_signature_cloud/models/info_settings'
75
79
  require_relative 'groupdocs_signature_cloud/models/linear_gradient_brush'
80
+ require_relative 'groupdocs_signature_cloud/models/preview_settings'
76
81
  require_relative 'groupdocs_signature_cloud/models/qr_code_signature'
77
82
  require_relative 'groupdocs_signature_cloud/models/radial_gradient_brush'
78
83
  require_relative 'groupdocs_signature_cloud/models/search_options'
@@ -103,5 +108,6 @@ require_relative 'groupdocs_signature_cloud/models/verify_qr_code_options'
103
108
  require_relative 'groupdocs_signature_cloud/api/file_api'
104
109
  require_relative 'groupdocs_signature_cloud/api/folder_api'
105
110
  require_relative 'groupdocs_signature_cloud/api/info_api'
111
+ require_relative 'groupdocs_signature_cloud/api/preview_api'
106
112
  require_relative 'groupdocs_signature_cloud/api/sign_api'
107
113
  require_relative 'groupdocs_signature_cloud/api/storage_api'
@@ -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
@@ -454,7 +454,7 @@ end
454
454
  #
455
455
  # --------------------------------------------------------------------------------------------------------------------
456
456
  # <copyright company="Aspose Pty Ltd" file="copy_file_request.rb">
457
- # Copyright (c) 2003-2020 Aspose Pty Ltd
457
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
458
458
  # </copyright>
459
459
  # <summary>
460
460
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -515,7 +515,7 @@ end
515
515
  #
516
516
  # --------------------------------------------------------------------------------------------------------------------
517
517
  # <copyright company="Aspose Pty Ltd" file="delete_file_request.rb">
518
- # Copyright (c) 2003-2020 Aspose Pty Ltd
518
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
519
519
  # </copyright>
520
520
  # <summary>
521
521
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -568,7 +568,7 @@ end
568
568
  #
569
569
  # --------------------------------------------------------------------------------------------------------------------
570
570
  # <copyright company="Aspose Pty Ltd" file="download_file_request.rb">
571
- # Copyright (c) 2003-2020 Aspose Pty Ltd
571
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
572
572
  # </copyright>
573
573
  # <summary>
574
574
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -621,7 +621,7 @@ end
621
621
  #
622
622
  # --------------------------------------------------------------------------------------------------------------------
623
623
  # <copyright company="Aspose Pty Ltd" file="move_file_request.rb">
624
- # Copyright (c) 2003-2020 Aspose Pty Ltd
624
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
625
625
  # </copyright>
626
626
  # <summary>
627
627
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -682,7 +682,7 @@ end
682
682
  #
683
683
  # --------------------------------------------------------------------------------------------------------------------
684
684
  # <copyright company="Aspose Pty Ltd" file="upload_file_request.rb">
685
- # Copyright (c) 2003-2020 Aspose Pty Ltd
685
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
686
686
  # </copyright>
687
687
  # <summary>
688
688
  # 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
@@ -435,7 +435,7 @@ end
435
435
  #
436
436
  # --------------------------------------------------------------------------------------------------------------------
437
437
  # <copyright company="Aspose Pty Ltd" file="copy_folder_request.rb">
438
- # Copyright (c) 2003-2020 Aspose Pty Ltd
438
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
439
439
  # </copyright>
440
440
  # <summary>
441
441
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -492,7 +492,7 @@ end
492
492
  #
493
493
  # --------------------------------------------------------------------------------------------------------------------
494
494
  # <copyright company="Aspose Pty Ltd" file="create_folder_request.rb">
495
- # Copyright (c) 2003-2020 Aspose Pty Ltd
495
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
496
496
  # </copyright>
497
497
  # <summary>
498
498
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -541,7 +541,7 @@ end
541
541
  #
542
542
  # --------------------------------------------------------------------------------------------------------------------
543
543
  # <copyright company="Aspose Pty Ltd" file="delete_folder_request.rb">
544
- # Copyright (c) 2003-2020 Aspose Pty Ltd
544
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
545
545
  # </copyright>
546
546
  # <summary>
547
547
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -594,7 +594,7 @@ end
594
594
  #
595
595
  # --------------------------------------------------------------------------------------------------------------------
596
596
  # <copyright company="Aspose Pty Ltd" file="get_files_list_request.rb">
597
- # Copyright (c) 2003-2020 Aspose Pty Ltd
597
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
598
598
  # </copyright>
599
599
  # <summary>
600
600
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -643,7 +643,7 @@ end
643
643
  #
644
644
  # --------------------------------------------------------------------------------------------------------------------
645
645
  # <copyright company="Aspose Pty Ltd" file="move_folder_request.rb">
646
- # Copyright (c) 2003-2020 Aspose Pty Ltd
646
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
647
647
  # </copyright>
648
648
  # <summary>
649
649
  # 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
@@ -320,7 +320,7 @@ end
320
320
  #
321
321
  # --------------------------------------------------------------------------------------------------------------------
322
322
  # <copyright company="Aspose Pty Ltd" file="get_info_request.rb">
323
- # Copyright (c) 2003-2020 Aspose Pty Ltd
323
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
324
324
  # </copyright>
325
325
  # <summary>
326
326
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -0,0 +1,217 @@
1
+ # -----------------------------------------------------------------------------------
2
+ # <copyright company="Aspose Pty Ltd" file="preview.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 GroupDocsSignatureCloud
30
+ #
31
+ # GroupDocs.Signature Cloud API
32
+ #
33
+ class PreviewApi
34
+ attr_accessor :config
35
+
36
+ #make PreviewApi.new private
37
+ private_class_method :new
38
+
39
+ # Initializes new instance of PreviewApi
40
+ #
41
+ # @param [config] Configuration
42
+ # @return [PreviewApi] New instance of PreviewApi
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 PreviewApi
50
+ #
51
+ # @param [app_sid] Application identifier (App SID)
52
+ # @param [app_key] Application private key (App Key)
53
+ # @return [PreviewApi] New instance of PreviewApi
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 PreviewApi
60
+ #
61
+ # @param [config] Configuration
62
+ # @return [PreviewApi] New instance of PreviewApi
63
+ def self.from_config(config)
64
+ return new(config)
65
+ end
66
+
67
+ # Creates document preview images
68
+ #
69
+ # @param request preview_document_request
70
+ # @return [PreviewResult]
71
+ def preview_document(request)
72
+ data, _status_code, _headers = preview_document_with_http_info(request)
73
+ data
74
+ end
75
+
76
+ # Creates document preview images
77
+ #
78
+ # @param request preview_document_request
79
+ # @return [Array<(PreviewResult, Fixnum, Hash)>]
80
+ # PreviewResult data, response status code and response headers
81
+ def preview_document_with_http_info(request)
82
+ raise ArgumentError, 'Incorrect request type' unless request.is_a? PreviewDocumentRequest
83
+
84
+ @api_client.config.logger.debug 'Calling API: PreviewApi.preview_document ...' if @api_client.config.debugging
85
+ # verify the required parameter 'preview_settings' is set
86
+ raise ArgumentError, 'Missing the required parameter preview_settings when calling PreviewApi.preview_document' if @api_client.config.client_side_validation && request.preview_settings.nil?
87
+ # resource path
88
+ local_var_path = '/signature/preview'
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.preview_settings)
105
+ data, status_code, headers = @api_client.call_api(:POST, 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: 'PreviewResult')
112
+ if @api_client.config.debugging
113
+ @api_client.config.logger.debug "API called:
114
+ PreviewApi#preview_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
115
+ end
116
+ [data, status_code, headers]
117
+ end
118
+
119
+ #
120
+ # Helper method to convert first letter to downcase
121
+ #
122
+ private def downcase_first_letter(str)
123
+ value = str[0].downcase + str[1..-1]
124
+ value
125
+ end
126
+
127
+ #
128
+ # Retrieves access token
129
+ #
130
+ private def get_access_token
131
+ if @access_token.nil? then
132
+ request_access_token
133
+ end
134
+
135
+ @access_token
136
+ end
137
+
138
+ #
139
+ # Gets a access token from server
140
+ #
141
+ private def request_access_token
142
+ auth_config = Configuration.new(@config.app_sid, @config.app_key)
143
+ auth_config.api_base_url = @config.api_base_url
144
+ auth_config.debugging = @config.debugging
145
+ auth_config.logger = @config.logger
146
+ auth_config.temp_folder_path = @config.temp_folder_path
147
+ auth_config.client_side_validation = @config.client_side_validation
148
+ auth_config.api_version = ''
149
+
150
+ auth_api_client = ApiClient.new(auth_config)
151
+
152
+ request_url = "/connect/token"
153
+ post_data = "grant_type=client_credentials&client_id=#{@config.app_sid}&client_secret=#{@config.app_key}"
154
+
155
+ data, _status_code, _header = auth_api_client.call_api(:POST, request_url, :body => post_data, :return_type => 'Object')
156
+
157
+ @access_token = data[:access_token]
158
+
159
+ expires_in_seconds = data[:expires_in].to_i - 5 * 60
160
+ expires_in_days = Rational(expires_in_seconds, 60 * 60 * 24)
161
+ @access_token_expires_at = DateTime.now + expires_in_days
162
+ end
163
+
164
+ # requires all files inside a directory from current dir
165
+ # @param _dir can be relative path like '/lib' or "../lib"
166
+ private def require_all(_dir)
167
+ Dir[File.expand_path(File.join(File.dirname(File.absolute_path(__FILE__)), _dir)) + "/*.rb"].each do |file|
168
+ require file
169
+ end
170
+ end
171
+ end
172
+ end
173
+ #
174
+ # --------------------------------------------------------------------------------------------------------------------
175
+ # <copyright company="Aspose Pty Ltd" file="preview_document_request.rb">
176
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
177
+ # </copyright>
178
+ # <summary>
179
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
180
+ # of this software and associated documentation files (the "Software"), to deal
181
+ # in the Software without restriction, including without limitation the rights
182
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
183
+ # copies of the Software, and to permit persons to whom the Software is
184
+ # furnished to do so, subject to the following conditions:
185
+ #
186
+ # The above copyright notice and this permission notice shall be included in all
187
+ # copies or substantial portions of the Software.
188
+ #
189
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
190
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
191
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
192
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
193
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
194
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
195
+ # SOFTWARE.
196
+ # </summary>
197
+ # --------------------------------------------------------------------------------------------------------------------
198
+ #
199
+
200
+ module GroupDocsSignatureCloud
201
+
202
+ #
203
+ # Request model for preview_document operation.
204
+ #
205
+ class PreviewDocumentRequest
206
+
207
+ # Document preview settings
208
+ attr_accessor :preview_settings
209
+
210
+ #
211
+ # Initializes a new instance.
212
+ # @param preview_settings Document preview settings
213
+ def initialize(preview_settings)
214
+ self.preview_settings = preview_settings
215
+ end
216
+ end
217
+ end
@@ -1,6 +1,6 @@
1
1
  # -----------------------------------------------------------------------------------
2
2
  # <copyright company="Aspose Pty Ltd" file="sign.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
@@ -381,7 +381,7 @@ end
381
381
  #
382
382
  # --------------------------------------------------------------------------------------------------------------------
383
383
  # <copyright company="Aspose Pty Ltd" file="create_signatures_request.rb">
384
- # Copyright (c) 2003-2020 Aspose Pty Ltd
384
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
385
385
  # </copyright>
386
386
  # <summary>
387
387
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -426,7 +426,7 @@ end
426
426
  #
427
427
  # --------------------------------------------------------------------------------------------------------------------
428
428
  # <copyright company="Aspose Pty Ltd" file="delete_signatures_request.rb">
429
- # Copyright (c) 2003-2020 Aspose Pty Ltd
429
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
430
430
  # </copyright>
431
431
  # <summary>
432
432
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -471,7 +471,7 @@ end
471
471
  #
472
472
  # --------------------------------------------------------------------------------------------------------------------
473
473
  # <copyright company="Aspose Pty Ltd" file="search_signatures_request.rb">
474
- # Copyright (c) 2003-2020 Aspose Pty Ltd
474
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
475
475
  # </copyright>
476
476
  # <summary>
477
477
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -516,7 +516,7 @@ end
516
516
  #
517
517
  # --------------------------------------------------------------------------------------------------------------------
518
518
  # <copyright company="Aspose Pty Ltd" file="update_signatures_request.rb">
519
- # Copyright (c) 2003-2020 Aspose Pty Ltd
519
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
520
520
  # </copyright>
521
521
  # <summary>
522
522
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -561,7 +561,7 @@ end
561
561
  #
562
562
  # --------------------------------------------------------------------------------------------------------------------
563
563
  # <copyright company="Aspose Pty Ltd" file="verify_signatures_request.rb">
564
- # Copyright (c) 2003-2020 Aspose Pty Ltd
564
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
565
565
  # </copyright>
566
566
  # <summary>
567
567
  # 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="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
@@ -353,7 +353,7 @@ end
353
353
  #
354
354
  # --------------------------------------------------------------------------------------------------------------------
355
355
  # <copyright company="Aspose Pty Ltd" file="get_disc_usage_request.rb">
356
- # Copyright (c) 2003-2020 Aspose Pty Ltd
356
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
357
357
  # </copyright>
358
358
  # <summary>
359
359
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -398,7 +398,7 @@ end
398
398
  #
399
399
  # --------------------------------------------------------------------------------------------------------------------
400
400
  # <copyright company="Aspose Pty Ltd" file="get_file_versions_request.rb">
401
- # Copyright (c) 2003-2020 Aspose Pty Ltd
401
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
402
402
  # </copyright>
403
403
  # <summary>
404
404
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -447,7 +447,7 @@ end
447
447
  #
448
448
  # --------------------------------------------------------------------------------------------------------------------
449
449
  # <copyright company="Aspose Pty Ltd" file="object_exists_request.rb">
450
- # Copyright (c) 2003-2020 Aspose Pty Ltd
450
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
451
451
  # </copyright>
452
452
  # <summary>
453
453
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -500,7 +500,7 @@ end
500
500
  #
501
501
  # --------------------------------------------------------------------------------------------------------------------
502
502
  # <copyright company="Aspose Pty Ltd" file="storage_exists_request.rb">
503
- # Copyright (c) 2003-2020 Aspose Pty Ltd
503
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
504
504
  # </copyright>
505
505
  # <summary>
506
506
  # Permission is hereby granted, free of charge, to any person obtaining a copy