aspose_words_cloud 24.3.0 → 24.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aspose_words_cloud/api/words_api.rb +84 -0
- data/lib/aspose_words_cloud/models/drawing_object_insert.rb +14 -4
- data/lib/aspose_words_cloud/models/drawing_object_update.rb +14 -4
- data/lib/aspose_words_cloud/models/requests/merge_with_next_online_request.rb +204 -0
- data/lib/aspose_words_cloud/models/requests/merge_with_next_request.rb +203 -0
- data/lib/aspose_words_cloud/models/structured_document_tag.rb +2 -2
- data/lib/aspose_words_cloud/models/structured_document_tag_insert.rb +2 -2
- data/lib/aspose_words_cloud/models/structured_document_tag_update.rb +2 -2
- data/lib/aspose_words_cloud/models/table_properties.rb +2 -2
- data/lib/aspose_words_cloud/version.rb +1 -1
- data/lib/aspose_words_cloud.rb +2 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 483acc5d96cd3060f7f0ea58bd3d9e12ef733a59d3c282bdf3c4eab424d84b76
|
4
|
+
data.tar.gz: e30eb0d51d4eae0855be8401b07232c208933171b7f7688705d09ec4a481b9ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2f8c925601425f051bcdf7417c9facdcd15c5457546333f163b63c24a94743d2f94a1acf773ab3e9bd00ec3a634ce1c6145ddf86e2a373e8ff9ad6be8822971
|
7
|
+
data.tar.gz: 5c7fdb0dfdf78d86a1933471c91e6b4eb43061d4a4bc49d6e25328249cb9bdf947823facee50914fb8da627b4bbcae3219e1793998163f973282212e904cedb5
|
@@ -10885,6 +10885,90 @@ module AsposeWordsCloud
|
|
10885
10885
|
[data, status_code, headers]
|
10886
10886
|
end
|
10887
10887
|
|
10888
|
+
# Merge the section with the next one.
|
10889
|
+
# @param request MergeWithNextRequest
|
10890
|
+
# @return [nil]
|
10891
|
+
def merge_with_next(request)
|
10892
|
+
begin
|
10893
|
+
data, _status_code, _headers = merge_with_next_with_http_info(request)
|
10894
|
+
rescue ApiError => e
|
10895
|
+
if e.code == 401
|
10896
|
+
request_token
|
10897
|
+
data, _status_code, _headers = merge_with_next_with_http_info(request)
|
10898
|
+
else
|
10899
|
+
raise
|
10900
|
+
end
|
10901
|
+
end
|
10902
|
+
nil
|
10903
|
+
end
|
10904
|
+
|
10905
|
+
# Merge the section with the next one.
|
10906
|
+
# @param request MergeWithNextRequest
|
10907
|
+
# @return [Array<(nil, Fixnum, Hash)>]
|
10908
|
+
# nil, response status code and response headers
|
10909
|
+
private def merge_with_next_with_http_info(request)
|
10910
|
+
raise ArgumentError, 'Incorrect request type' unless request.is_a? MergeWithNextRequest
|
10911
|
+
|
10912
|
+
@api_client.config.logger.debug 'Calling API: WordsApi.merge_with_next ...' if @api_client.config.debugging
|
10913
|
+
request_data = request.create_http_request(@api_client)
|
10914
|
+
|
10915
|
+
data, status_code, headers = @api_client.call_api(
|
10916
|
+
request_data[:'method'],
|
10917
|
+
request_data[:'path'],
|
10918
|
+
header_params: request_data[:'header_params'],
|
10919
|
+
query_params: request_data[:'query_params'],
|
10920
|
+
body: request_data[:'body'])
|
10921
|
+
if @api_client.config.debugging
|
10922
|
+
@api_client.config.logger.debug "API called:
|
10923
|
+
WordsApi#merge_with_next\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
10924
|
+
end
|
10925
|
+
|
10926
|
+
[data, status_code, headers]
|
10927
|
+
end
|
10928
|
+
|
10929
|
+
# Merge the section with the next one.
|
10930
|
+
# @param request MergeWithNextOnlineRequest
|
10931
|
+
# @return [FILES_COLLECTION]
|
10932
|
+
def merge_with_next_online(request)
|
10933
|
+
begin
|
10934
|
+
data, _status_code, _headers = merge_with_next_online_with_http_info(request)
|
10935
|
+
rescue ApiError => e
|
10936
|
+
if e.code == 401
|
10937
|
+
request_token
|
10938
|
+
data, _status_code, _headers = merge_with_next_online_with_http_info(request)
|
10939
|
+
else
|
10940
|
+
raise
|
10941
|
+
end
|
10942
|
+
end
|
10943
|
+
data
|
10944
|
+
end
|
10945
|
+
|
10946
|
+
# Merge the section with the next one.
|
10947
|
+
# @param request MergeWithNextOnlineRequest
|
10948
|
+
# @return [Array<(FILES_COLLECTION, Fixnum, Hash)>]
|
10949
|
+
# FILES_COLLECTION, response status code and response headers
|
10950
|
+
private def merge_with_next_online_with_http_info(request)
|
10951
|
+
raise ArgumentError, 'Incorrect request type' unless request.is_a? MergeWithNextOnlineRequest
|
10952
|
+
|
10953
|
+
@api_client.config.logger.debug 'Calling API: WordsApi.merge_with_next_online ...' if @api_client.config.debugging
|
10954
|
+
request_data = request.create_http_request(@api_client)
|
10955
|
+
|
10956
|
+
data, status_code, headers = @api_client.call_api(
|
10957
|
+
request_data[:'method'],
|
10958
|
+
request_data[:'path'],
|
10959
|
+
header_params: request_data[:'header_params'],
|
10960
|
+
query_params: request_data[:'query_params'],
|
10961
|
+
body: request_data[:'body'],
|
10962
|
+
return_type: 'FILES_COLLECTION')
|
10963
|
+
if @api_client.config.debugging
|
10964
|
+
@api_client.config.logger.debug "API called:
|
10965
|
+
WordsApi#merge_with_next_online\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
10966
|
+
end
|
10967
|
+
|
10968
|
+
# FILES_COLLECTION #
|
10969
|
+
[data, status_code, headers]
|
10970
|
+
end
|
10971
|
+
|
10888
10972
|
# Move file.
|
10889
10973
|
# @param request MoveFileRequest
|
10890
10974
|
# @return [nil]
|
@@ -53,6 +53,9 @@ module AsposeWordsCloud
|
|
53
53
|
# Gets or sets the option indicating how to wrap text around the image.
|
54
54
|
attr_accessor :wrap_type
|
55
55
|
|
56
|
+
# Gets or sets a value indicating whether AspectRatioLocked option on or off.
|
57
|
+
attr_accessor :aspect_ratio_locked
|
58
|
+
|
56
59
|
class EnumAttributeValidator
|
57
60
|
attr_reader :datatype
|
58
61
|
attr_reader :allowable_values
|
@@ -85,7 +88,8 @@ module AsposeWordsCloud
|
|
85
88
|
:'top' => :'Top',
|
86
89
|
:'width' => :'Width',
|
87
90
|
:'height' => :'Height',
|
88
|
-
:'wrap_type' => :'WrapType'
|
91
|
+
:'wrap_type' => :'WrapType',
|
92
|
+
:'aspect_ratio_locked' => :'AspectRatioLocked'
|
89
93
|
}
|
90
94
|
end
|
91
95
|
|
@@ -99,7 +103,8 @@ module AsposeWordsCloud
|
|
99
103
|
:'top' => :'Float',
|
100
104
|
:'width' => :'Float',
|
101
105
|
:'height' => :'Float',
|
102
|
-
:'wrap_type' => :'String'
|
106
|
+
:'wrap_type' => :'String',
|
107
|
+
:'aspect_ratio_locked' => :'BOOLEAN'
|
103
108
|
}
|
104
109
|
end
|
105
110
|
|
@@ -142,6 +147,10 @@ module AsposeWordsCloud
|
|
142
147
|
if attributes.key?(:'WrapType')
|
143
148
|
self.wrap_type = attributes[:'WrapType']
|
144
149
|
end
|
150
|
+
|
151
|
+
if attributes.key?(:'AspectRatioLocked')
|
152
|
+
self.aspect_ratio_locked = attributes[:'AspectRatioLocked']
|
153
|
+
end
|
145
154
|
end
|
146
155
|
|
147
156
|
# Check to see if the all the properties in the model are valid
|
@@ -212,7 +221,8 @@ module AsposeWordsCloud
|
|
212
221
|
top == other.top &&
|
213
222
|
width == other.width &&
|
214
223
|
height == other.height &&
|
215
|
-
wrap_type == other.wrap_type
|
224
|
+
wrap_type == other.wrap_type &&
|
225
|
+
aspect_ratio_locked == other.aspect_ratio_locked
|
216
226
|
end
|
217
227
|
|
218
228
|
# @see the `==` method
|
@@ -224,7 +234,7 @@ module AsposeWordsCloud
|
|
224
234
|
# Calculates hash code according to all attributes.
|
225
235
|
# @return [Fixnum] Hash code
|
226
236
|
def hash
|
227
|
-
[position, relative_horizontal_position, left, relative_vertical_position, top, width, height, wrap_type].hash
|
237
|
+
[position, relative_horizontal_position, left, relative_vertical_position, top, width, height, wrap_type, aspect_ratio_locked].hash
|
228
238
|
end
|
229
239
|
|
230
240
|
# Builds the object from hash
|
@@ -50,6 +50,9 @@ module AsposeWordsCloud
|
|
50
50
|
# Gets or sets the option that controls how to wrap text around the image.
|
51
51
|
attr_accessor :wrap_type
|
52
52
|
|
53
|
+
# Gets or sets a value indicating whether AspectRatioLocked option on or off.
|
54
|
+
attr_accessor :aspect_ratio_locked
|
55
|
+
|
53
56
|
class EnumAttributeValidator
|
54
57
|
attr_reader :datatype
|
55
58
|
attr_reader :allowable_values
|
@@ -81,7 +84,8 @@ module AsposeWordsCloud
|
|
81
84
|
:'top' => :'Top',
|
82
85
|
:'width' => :'Width',
|
83
86
|
:'height' => :'Height',
|
84
|
-
:'wrap_type' => :'WrapType'
|
87
|
+
:'wrap_type' => :'WrapType',
|
88
|
+
:'aspect_ratio_locked' => :'AspectRatioLocked'
|
85
89
|
}
|
86
90
|
end
|
87
91
|
|
@@ -94,7 +98,8 @@ module AsposeWordsCloud
|
|
94
98
|
:'top' => :'Float',
|
95
99
|
:'width' => :'Float',
|
96
100
|
:'height' => :'Float',
|
97
|
-
:'wrap_type' => :'String'
|
101
|
+
:'wrap_type' => :'String',
|
102
|
+
:'aspect_ratio_locked' => :'BOOLEAN'
|
98
103
|
}
|
99
104
|
end
|
100
105
|
|
@@ -133,6 +138,10 @@ module AsposeWordsCloud
|
|
133
138
|
if attributes.key?(:'WrapType')
|
134
139
|
self.wrap_type = attributes[:'WrapType']
|
135
140
|
end
|
141
|
+
|
142
|
+
if attributes.key?(:'AspectRatioLocked')
|
143
|
+
self.aspect_ratio_locked = attributes[:'AspectRatioLocked']
|
144
|
+
end
|
136
145
|
end
|
137
146
|
|
138
147
|
# Check to see if the all the properties in the model are valid
|
@@ -202,7 +211,8 @@ module AsposeWordsCloud
|
|
202
211
|
top == other.top &&
|
203
212
|
width == other.width &&
|
204
213
|
height == other.height &&
|
205
|
-
wrap_type == other.wrap_type
|
214
|
+
wrap_type == other.wrap_type &&
|
215
|
+
aspect_ratio_locked == other.aspect_ratio_locked
|
206
216
|
end
|
207
217
|
|
208
218
|
# @see the `==` method
|
@@ -214,7 +224,7 @@ module AsposeWordsCloud
|
|
214
224
|
# Calculates hash code according to all attributes.
|
215
225
|
# @return [Fixnum] Hash code
|
216
226
|
def hash
|
217
|
-
[relative_horizontal_position, left, relative_vertical_position, top, width, height, wrap_type].hash
|
227
|
+
[relative_horizontal_position, left, relative_vertical_position, top, width, height, wrap_type, aspect_ratio_locked].hash
|
218
228
|
end
|
219
229
|
|
220
230
|
# Builds the object from hash
|
@@ -0,0 +1,204 @@
|
|
1
|
+
# ------------------------------------------------------------------------------------
|
2
|
+
# <copyright company="Aspose" file="merge_with_next_online_request.rb">
|
3
|
+
# Copyright (c) 2024 Aspose.Words for Cloud
|
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
|
+
module AsposeWordsCloud
|
27
|
+
|
28
|
+
#
|
29
|
+
# Request model for merge_with_next_online operation.
|
30
|
+
#
|
31
|
+
class MergeWithNextOnlineRequest
|
32
|
+
# The document.
|
33
|
+
attr_accessor :document
|
34
|
+
|
35
|
+
# The index of the section.
|
36
|
+
attr_accessor :section_index
|
37
|
+
|
38
|
+
# Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
|
39
|
+
attr_accessor :load_encoding
|
40
|
+
|
41
|
+
# Password of protected Word document. Use the parameter to pass a password via SDK. SDK encrypts it automatically. We don't recommend to use the parameter to pass a plain password for direct call of API.
|
42
|
+
attr_accessor :password
|
43
|
+
|
44
|
+
# Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details.
|
45
|
+
attr_accessor :encrypted_password
|
46
|
+
|
47
|
+
# Result path of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document.
|
48
|
+
attr_accessor :dest_file_name
|
49
|
+
|
50
|
+
# Initials of the author to use for revisions.If you set this parameter and then make some changes to the document programmatically, save the document and later open the document in MS Word you will see these changes as revisions.
|
51
|
+
attr_accessor :revision_author
|
52
|
+
|
53
|
+
# The date and time to use for revisions.
|
54
|
+
attr_accessor :revision_date_time
|
55
|
+
|
56
|
+
#
|
57
|
+
# Initializes a new instance.
|
58
|
+
# @param document The document.
|
59
|
+
# @param section_index The index of the section.
|
60
|
+
# @param load_encoding Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
|
61
|
+
# @param password Password of protected Word document. Use the parameter to pass a password via SDK. SDK encrypts it automatically. We don't recommend to use the parameter to pass a plain password for direct call of API.
|
62
|
+
# @param encrypted_password Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details.
|
63
|
+
# @param dest_file_name Result path of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document.
|
64
|
+
# @param revision_author Initials of the author to use for revisions.If you set this parameter and then make some changes to the document programmatically, save the document and later open the document in MS Word you will see these changes as revisions.
|
65
|
+
# @param revision_date_time The date and time to use for revisions.
|
66
|
+
|
67
|
+
def initialize(document:, section_index:, load_encoding: nil, password: nil, encrypted_password: nil, dest_file_name: nil, revision_author: nil, revision_date_time: nil)
|
68
|
+
self.document = document
|
69
|
+
self.section_index = section_index
|
70
|
+
self.load_encoding = load_encoding
|
71
|
+
self.password = password
|
72
|
+
self.encrypted_password = encrypted_password
|
73
|
+
self.dest_file_name = dest_file_name
|
74
|
+
self.revision_author = revision_author
|
75
|
+
self.revision_date_time = revision_date_time
|
76
|
+
end
|
77
|
+
|
78
|
+
# Creating batch part from request
|
79
|
+
def to_batch_part(api_client, requestId, parentRequestId = nil)
|
80
|
+
# verify the required parameter 'document' is set
|
81
|
+
raise ArgumentError, 'Missing the required parameter document when calling WordsApi.merge_with_next_online' if api_client.config.client_side_validation && self.document.nil?
|
82
|
+
# verify the required parameter 'section_index' is set
|
83
|
+
raise ArgumentError, 'Missing the required parameter section_index when calling WordsApi.merge_with_next_online' if api_client.config.client_side_validation && self.section_index.nil?
|
84
|
+
|
85
|
+
# resource path
|
86
|
+
local_var_path = '/words/online/put/merge/sections/{sectionIndex}'[7..-1]
|
87
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('SectionIndex') + '}', self.section_index.nil? ? '' : self.section_index.to_s)
|
88
|
+
local_var_path = local_var_path.sub('//', '/')
|
89
|
+
|
90
|
+
# query parameters
|
91
|
+
query_params = {}
|
92
|
+
query_params[downcase_first_letter('LoadEncoding')] = self.load_encoding unless self.load_encoding.nil?
|
93
|
+
query_params[downcase_first_letter('Password')] = self.password unless self.password.nil?
|
94
|
+
query_params[downcase_first_letter('EncryptedPassword')] = self.encrypted_password unless self.encrypted_password.nil?
|
95
|
+
query_params[downcase_first_letter('DestFileName')] = self.dest_file_name unless self.dest_file_name.nil?
|
96
|
+
query_params[downcase_first_letter('RevisionAuthor')] = self.revision_author unless self.revision_author.nil?
|
97
|
+
query_params[downcase_first_letter('RevisionDateTime')] = self.revision_date_time unless self.revision_date_time.nil?
|
98
|
+
|
99
|
+
if query_params
|
100
|
+
query_params.each { |key, value| local_var_path = api_client.add_param_to_query(local_var_path, key, value) }
|
101
|
+
end
|
102
|
+
|
103
|
+
header_params = {}
|
104
|
+
# header parameters
|
105
|
+
# HTTP header 'Content-Type'
|
106
|
+
header_params['Content-Type'] = api_client.select_header_content_type(['multipart/form-data'])
|
107
|
+
header_params['RequestId'] = requestId
|
108
|
+
|
109
|
+
if parentRequestId != nil
|
110
|
+
header_params['DependsOn'] = parentRequestId
|
111
|
+
end
|
112
|
+
|
113
|
+
# form parameters
|
114
|
+
form_params = []
|
115
|
+
files_content = []
|
116
|
+
if self.document.nil?
|
117
|
+
raise "Parameter Document is required."
|
118
|
+
end
|
119
|
+
unless self.document.nil?
|
120
|
+
form_params.push({:'Name' => 'document', :'Data' => self.document, :'MimeType' =>'application/octet-stream'})
|
121
|
+
end
|
122
|
+
|
123
|
+
|
124
|
+
# http body (model)
|
125
|
+
body = api_client.build_request_body_batch(header_params, form_params, files_content)
|
126
|
+
part = ""
|
127
|
+
part.concat("PUT".force_encoding('UTF-8'))
|
128
|
+
part.concat(" ".force_encoding('UTF-8'))
|
129
|
+
part.concat(local_var_path.force_encoding('UTF-8'))
|
130
|
+
part.concat(" \r\n".force_encoding('UTF-8'))
|
131
|
+
|
132
|
+
header_params.each_pair {|key, value| part.concat(key.dup.force_encoding('UTF-8') , ": ".force_encoding('UTF-8'), value.dup.force_encoding('UTF-8'), "\r\n".force_encoding('UTF-8')) }
|
133
|
+
part.concat("\r\n".force_encoding('UTF-8'))
|
134
|
+
if body
|
135
|
+
if body.is_a?(Hash)
|
136
|
+
body.each do |key, value|
|
137
|
+
part.concat(value, "\r\n")
|
138
|
+
end
|
139
|
+
else
|
140
|
+
part.concat(body)
|
141
|
+
end
|
142
|
+
end
|
143
|
+
part
|
144
|
+
end
|
145
|
+
|
146
|
+
def create_http_request(api_client)
|
147
|
+
# verify the required parameter 'document' is set
|
148
|
+
raise ArgumentError, 'Missing the required parameter document when calling WordsApi.merge_with_next_online' if api_client.config.client_side_validation && self.document.nil?
|
149
|
+
# verify the required parameter 'section_index' is set
|
150
|
+
raise ArgumentError, 'Missing the required parameter section_index when calling WordsApi.merge_with_next_online' if api_client.config.client_side_validation && self.section_index.nil?
|
151
|
+
|
152
|
+
# resource path
|
153
|
+
local_var_path = '/words/online/put/merge/sections/{sectionIndex}'[1..-1]
|
154
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('SectionIndex') + '}', self.section_index.nil? ? '' : self.section_index.to_s)
|
155
|
+
local_var_path = local_var_path.sub('//', '/')
|
156
|
+
|
157
|
+
# query parameters
|
158
|
+
query_params = {}
|
159
|
+
query_params[downcase_first_letter('LoadEncoding')] = self.load_encoding unless self.load_encoding.nil?
|
160
|
+
query_params[downcase_first_letter('Password')] = self.password unless self.password.nil?
|
161
|
+
query_params[downcase_first_letter('EncryptedPassword')] = self.encrypted_password unless self.encrypted_password.nil?
|
162
|
+
query_params[downcase_first_letter('DestFileName')] = self.dest_file_name unless self.dest_file_name.nil?
|
163
|
+
query_params[downcase_first_letter('RevisionAuthor')] = self.revision_author unless self.revision_author.nil?
|
164
|
+
query_params[downcase_first_letter('RevisionDateTime')] = self.revision_date_time unless self.revision_date_time.nil?
|
165
|
+
|
166
|
+
# header parameters
|
167
|
+
header_params = {}
|
168
|
+
# HTTP header 'Content-Type'
|
169
|
+
header_params['Content-Type'] = api_client.select_header_content_type(['multipart/form-data'])
|
170
|
+
|
171
|
+
# form parameters
|
172
|
+
form_params = []
|
173
|
+
files_content = []
|
174
|
+
if self.document.nil?
|
175
|
+
raise "Parameter Document is required."
|
176
|
+
end
|
177
|
+
unless self.document.nil?
|
178
|
+
form_params.push({:'Name' => 'document', :'Data' => self.document, :'MimeType' =>'application/octet-stream'})
|
179
|
+
end
|
180
|
+
|
181
|
+
body = api_client.build_request_body(header_params, form_params, files_content)
|
182
|
+
{
|
183
|
+
'method': :PUT,
|
184
|
+
'path': local_var_path,
|
185
|
+
'header_params': header_params,
|
186
|
+
'query_params': query_params,
|
187
|
+
'body': body,
|
188
|
+
'auth_names': ['JWT']
|
189
|
+
}
|
190
|
+
end
|
191
|
+
|
192
|
+
#
|
193
|
+
# Helper method to convert first letter to downcase
|
194
|
+
#
|
195
|
+
def downcase_first_letter(str)
|
196
|
+
str[0].downcase + str[1..-1]
|
197
|
+
end
|
198
|
+
|
199
|
+
# Get response type
|
200
|
+
def get_response_type
|
201
|
+
'FILES_COLLECTION'
|
202
|
+
end
|
203
|
+
end
|
204
|
+
end
|
@@ -0,0 +1,203 @@
|
|
1
|
+
# ------------------------------------------------------------------------------------
|
2
|
+
# <copyright company="Aspose" file="merge_with_next_request.rb">
|
3
|
+
# Copyright (c) 2024 Aspose.Words for Cloud
|
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
|
+
module AsposeWordsCloud
|
27
|
+
|
28
|
+
#
|
29
|
+
# Request model for merge_with_next operation.
|
30
|
+
#
|
31
|
+
class MergeWithNextRequest
|
32
|
+
# The filename of the input document.
|
33
|
+
attr_accessor :name
|
34
|
+
|
35
|
+
# The index of the section.
|
36
|
+
attr_accessor :section_index
|
37
|
+
|
38
|
+
# Original document folder.
|
39
|
+
attr_accessor :folder
|
40
|
+
|
41
|
+
# Original document storage.
|
42
|
+
attr_accessor :storage
|
43
|
+
|
44
|
+
# Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
|
45
|
+
attr_accessor :load_encoding
|
46
|
+
|
47
|
+
# Password of protected Word document. Use the parameter to pass a password via SDK. SDK encrypts it automatically. We don't recommend to use the parameter to pass a plain password for direct call of API.
|
48
|
+
attr_accessor :password
|
49
|
+
|
50
|
+
# Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details.
|
51
|
+
attr_accessor :encrypted_password
|
52
|
+
|
53
|
+
# Result path of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document.
|
54
|
+
attr_accessor :dest_file_name
|
55
|
+
|
56
|
+
# Initials of the author to use for revisions.If you set this parameter and then make some changes to the document programmatically, save the document and later open the document in MS Word you will see these changes as revisions.
|
57
|
+
attr_accessor :revision_author
|
58
|
+
|
59
|
+
# The date and time to use for revisions.
|
60
|
+
attr_accessor :revision_date_time
|
61
|
+
|
62
|
+
#
|
63
|
+
# Initializes a new instance.
|
64
|
+
# @param name The filename of the input document.
|
65
|
+
# @param section_index The index of the section.
|
66
|
+
# @param folder Original document folder.
|
67
|
+
# @param storage Original document storage.
|
68
|
+
# @param load_encoding Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
|
69
|
+
# @param password Password of protected Word document. Use the parameter to pass a password via SDK. SDK encrypts it automatically. We don't recommend to use the parameter to pass a plain password for direct call of API.
|
70
|
+
# @param encrypted_password Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details.
|
71
|
+
# @param dest_file_name Result path of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document.
|
72
|
+
# @param revision_author Initials of the author to use for revisions.If you set this parameter and then make some changes to the document programmatically, save the document and later open the document in MS Word you will see these changes as revisions.
|
73
|
+
# @param revision_date_time The date and time to use for revisions.
|
74
|
+
|
75
|
+
def initialize(name:, section_index:, folder: nil, storage: nil, load_encoding: nil, password: nil, encrypted_password: nil, dest_file_name: nil, revision_author: nil, revision_date_time: nil)
|
76
|
+
self.name = name
|
77
|
+
self.section_index = section_index
|
78
|
+
self.folder = folder
|
79
|
+
self.storage = storage
|
80
|
+
self.load_encoding = load_encoding
|
81
|
+
self.password = password
|
82
|
+
self.encrypted_password = encrypted_password
|
83
|
+
self.dest_file_name = dest_file_name
|
84
|
+
self.revision_author = revision_author
|
85
|
+
self.revision_date_time = revision_date_time
|
86
|
+
end
|
87
|
+
|
88
|
+
# Creating batch part from request
|
89
|
+
def to_batch_part(api_client, requestId, parentRequestId = nil)
|
90
|
+
# verify the required parameter 'name' is set
|
91
|
+
raise ArgumentError, 'Missing the required parameter name when calling WordsApi.merge_with_next' if api_client.config.client_side_validation && self.name.nil?
|
92
|
+
# verify the required parameter 'section_index' is set
|
93
|
+
raise ArgumentError, 'Missing the required parameter section_index when calling WordsApi.merge_with_next' if api_client.config.client_side_validation && self.section_index.nil?
|
94
|
+
|
95
|
+
# resource path
|
96
|
+
local_var_path = '/words/{name}/merge/sections/{sectionIndex}'[7..-1]
|
97
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('Name') + '}', self.name.nil? ? '' : self.name.to_s)
|
98
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('SectionIndex') + '}', self.section_index.nil? ? '' : self.section_index.to_s)
|
99
|
+
local_var_path = local_var_path.sub('//', '/')
|
100
|
+
|
101
|
+
# query parameters
|
102
|
+
query_params = {}
|
103
|
+
query_params[downcase_first_letter('Folder')] = self.folder unless self.folder.nil?
|
104
|
+
query_params[downcase_first_letter('Storage')] = self.storage unless self.storage.nil?
|
105
|
+
query_params[downcase_first_letter('LoadEncoding')] = self.load_encoding unless self.load_encoding.nil?
|
106
|
+
query_params[downcase_first_letter('Password')] = self.password unless self.password.nil?
|
107
|
+
query_params[downcase_first_letter('EncryptedPassword')] = self.encrypted_password unless self.encrypted_password.nil?
|
108
|
+
query_params[downcase_first_letter('DestFileName')] = self.dest_file_name unless self.dest_file_name.nil?
|
109
|
+
query_params[downcase_first_letter('RevisionAuthor')] = self.revision_author unless self.revision_author.nil?
|
110
|
+
query_params[downcase_first_letter('RevisionDateTime')] = self.revision_date_time unless self.revision_date_time.nil?
|
111
|
+
|
112
|
+
if query_params
|
113
|
+
query_params.each { |key, value| local_var_path = api_client.add_param_to_query(local_var_path, key, value) }
|
114
|
+
end
|
115
|
+
|
116
|
+
header_params = {}
|
117
|
+
header_params['RequestId'] = requestId
|
118
|
+
|
119
|
+
if parentRequestId != nil
|
120
|
+
header_params['DependsOn'] = parentRequestId
|
121
|
+
end
|
122
|
+
|
123
|
+
# form parameters
|
124
|
+
form_params = []
|
125
|
+
files_content = []
|
126
|
+
|
127
|
+
# http body (model)
|
128
|
+
body = api_client.build_request_body_batch(header_params, form_params, files_content)
|
129
|
+
part = ""
|
130
|
+
part.concat("PUT".force_encoding('UTF-8'))
|
131
|
+
part.concat(" ".force_encoding('UTF-8'))
|
132
|
+
part.concat(local_var_path.force_encoding('UTF-8'))
|
133
|
+
part.concat(" \r\n".force_encoding('UTF-8'))
|
134
|
+
|
135
|
+
header_params.each_pair {|key, value| part.concat(key.dup.force_encoding('UTF-8') , ": ".force_encoding('UTF-8'), value.dup.force_encoding('UTF-8'), "\r\n".force_encoding('UTF-8')) }
|
136
|
+
part.concat("\r\n".force_encoding('UTF-8'))
|
137
|
+
if body
|
138
|
+
if body.is_a?(Hash)
|
139
|
+
body.each do |key, value|
|
140
|
+
part.concat(value, "\r\n")
|
141
|
+
end
|
142
|
+
else
|
143
|
+
part.concat(body)
|
144
|
+
end
|
145
|
+
end
|
146
|
+
part
|
147
|
+
end
|
148
|
+
|
149
|
+
def create_http_request(api_client)
|
150
|
+
# verify the required parameter 'name' is set
|
151
|
+
raise ArgumentError, 'Missing the required parameter name when calling WordsApi.merge_with_next' if api_client.config.client_side_validation && self.name.nil?
|
152
|
+
# verify the required parameter 'section_index' is set
|
153
|
+
raise ArgumentError, 'Missing the required parameter section_index when calling WordsApi.merge_with_next' if api_client.config.client_side_validation && self.section_index.nil?
|
154
|
+
|
155
|
+
# resource path
|
156
|
+
local_var_path = '/words/{name}/merge/sections/{sectionIndex}'[1..-1]
|
157
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('Name') + '}', self.name.nil? ? '' : self.name.to_s)
|
158
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('SectionIndex') + '}', self.section_index.nil? ? '' : self.section_index.to_s)
|
159
|
+
local_var_path = local_var_path.sub('//', '/')
|
160
|
+
|
161
|
+
# query parameters
|
162
|
+
query_params = {}
|
163
|
+
query_params[downcase_first_letter('Folder')] = self.folder unless self.folder.nil?
|
164
|
+
query_params[downcase_first_letter('Storage')] = self.storage unless self.storage.nil?
|
165
|
+
query_params[downcase_first_letter('LoadEncoding')] = self.load_encoding unless self.load_encoding.nil?
|
166
|
+
query_params[downcase_first_letter('Password')] = self.password unless self.password.nil?
|
167
|
+
query_params[downcase_first_letter('EncryptedPassword')] = self.encrypted_password unless self.encrypted_password.nil?
|
168
|
+
query_params[downcase_first_letter('DestFileName')] = self.dest_file_name unless self.dest_file_name.nil?
|
169
|
+
query_params[downcase_first_letter('RevisionAuthor')] = self.revision_author unless self.revision_author.nil?
|
170
|
+
query_params[downcase_first_letter('RevisionDateTime')] = self.revision_date_time unless self.revision_date_time.nil?
|
171
|
+
|
172
|
+
# header parameters
|
173
|
+
header_params = {}
|
174
|
+
# HTTP header 'Content-Type'
|
175
|
+
header_params['Content-Type'] = api_client.select_header_content_type(['application/xml', 'application/json'])
|
176
|
+
|
177
|
+
# form parameters
|
178
|
+
form_params = []
|
179
|
+
files_content = []
|
180
|
+
body = api_client.build_request_body(header_params, form_params, files_content)
|
181
|
+
{
|
182
|
+
'method': :PUT,
|
183
|
+
'path': local_var_path,
|
184
|
+
'header_params': header_params,
|
185
|
+
'query_params': query_params,
|
186
|
+
'body': body,
|
187
|
+
'auth_names': ['JWT']
|
188
|
+
}
|
189
|
+
end
|
190
|
+
|
191
|
+
#
|
192
|
+
# Helper method to convert first letter to downcase
|
193
|
+
#
|
194
|
+
def downcase_first_letter(str)
|
195
|
+
str[0].downcase + str[1..-1]
|
196
|
+
end
|
197
|
+
|
198
|
+
# Get response type
|
199
|
+
def get_response_type
|
200
|
+
nil
|
201
|
+
end
|
202
|
+
end
|
203
|
+
end
|
@@ -340,7 +340,7 @@ module AsposeWordsCloud
|
|
340
340
|
# Check to see if the all the properties in the model are valid
|
341
341
|
# @return true if the model is valid
|
342
342
|
def valid?
|
343
|
-
appearance_validator = EnumAttributeValidator.new('String', ["
|
343
|
+
appearance_validator = EnumAttributeValidator.new('String', ["BoundingBox", "Default", "Tags", "Hidden"])
|
344
344
|
return false unless appearance_validator.valid?(@appearance)
|
345
345
|
date_storage_format_validator = EnumAttributeValidator.new('String', ["Date", "DateTime", "Default", "Text"])
|
346
346
|
return false unless date_storage_format_validator.valid?(@date_storage_format)
|
@@ -357,7 +357,7 @@ module AsposeWordsCloud
|
|
357
357
|
# Custom attribute writer method checking allowed values (enum).
|
358
358
|
# @param [Object] appearance Object to be assigned
|
359
359
|
def appearance=(appearance)
|
360
|
-
validator = EnumAttributeValidator.new('String', ["
|
360
|
+
validator = EnumAttributeValidator.new('String', ["BoundingBox", "Default", "Tags", "Hidden"])
|
361
361
|
if appearance.to_i == 0
|
362
362
|
unless validator.valid?(appearance)
|
363
363
|
raise ArgumentError, "invalid value for 'appearance', must be one of #{validator.allowable_values}."
|
@@ -349,7 +349,7 @@ module AsposeWordsCloud
|
|
349
349
|
# Check to see if the all the properties in the model are valid
|
350
350
|
# @return true if the model is valid
|
351
351
|
def valid?
|
352
|
-
appearance_validator = EnumAttributeValidator.new('String', ["
|
352
|
+
appearance_validator = EnumAttributeValidator.new('String', ["BoundingBox", "Default", "Tags", "Hidden"])
|
353
353
|
return false unless appearance_validator.valid?(@appearance)
|
354
354
|
date_storage_format_validator = EnumAttributeValidator.new('String', ["Date", "DateTime", "Default", "Text"])
|
355
355
|
return false unless date_storage_format_validator.valid?(@date_storage_format)
|
@@ -366,7 +366,7 @@ module AsposeWordsCloud
|
|
366
366
|
# Custom attribute writer method checking allowed values (enum).
|
367
367
|
# @param [Object] appearance Object to be assigned
|
368
368
|
def appearance=(appearance)
|
369
|
-
validator = EnumAttributeValidator.new('String', ["
|
369
|
+
validator = EnumAttributeValidator.new('String', ["BoundingBox", "Default", "Tags", "Hidden"])
|
370
370
|
if appearance.to_i == 0
|
371
371
|
unless validator.valid?(appearance)
|
372
372
|
raise ArgumentError, "invalid value for 'appearance', must be one of #{validator.allowable_values}."
|
@@ -340,7 +340,7 @@ module AsposeWordsCloud
|
|
340
340
|
# Check to see if the all the properties in the model are valid
|
341
341
|
# @return true if the model is valid
|
342
342
|
def valid?
|
343
|
-
appearance_validator = EnumAttributeValidator.new('String', ["
|
343
|
+
appearance_validator = EnumAttributeValidator.new('String', ["BoundingBox", "Default", "Tags", "Hidden"])
|
344
344
|
return false unless appearance_validator.valid?(@appearance)
|
345
345
|
date_storage_format_validator = EnumAttributeValidator.new('String', ["Date", "DateTime", "Default", "Text"])
|
346
346
|
return false unless date_storage_format_validator.valid?(@date_storage_format)
|
@@ -357,7 +357,7 @@ module AsposeWordsCloud
|
|
357
357
|
# Custom attribute writer method checking allowed values (enum).
|
358
358
|
# @param [Object] appearance Object to be assigned
|
359
359
|
def appearance=(appearance)
|
360
|
-
validator = EnumAttributeValidator.new('String', ["
|
360
|
+
validator = EnumAttributeValidator.new('String', ["BoundingBox", "Default", "Tags", "Hidden"])
|
361
361
|
if appearance.to_i == 0
|
362
362
|
unless validator.valid?(appearance)
|
363
363
|
raise ArgumentError, "invalid value for 'appearance', must be one of #{validator.allowable_values}."
|
@@ -220,7 +220,7 @@ module AsposeWordsCloud
|
|
220
220
|
return false unless style_identifier_validator.valid?(@style_identifier)
|
221
221
|
style_options_validator = EnumAttributeValidator.new('String', ["None", "FirstRow", "LastRow", "FirstColumn", "LastColumn", "RowBands", "Default", "ColumnBands", "Default2003"])
|
222
222
|
return false unless style_options_validator.valid?(@style_options)
|
223
|
-
text_wrapping_validator = EnumAttributeValidator.new('String', ["
|
223
|
+
text_wrapping_validator = EnumAttributeValidator.new('String', ["None", "Default", "Around"])
|
224
224
|
return false unless text_wrapping_validator.valid?(@text_wrapping)
|
225
225
|
|
226
226
|
return true
|
@@ -271,7 +271,7 @@ module AsposeWordsCloud
|
|
271
271
|
# Custom attribute writer method checking allowed values (enum).
|
272
272
|
# @param [Object] text_wrapping Object to be assigned
|
273
273
|
def text_wrapping=(text_wrapping)
|
274
|
-
validator = EnumAttributeValidator.new('String', ["
|
274
|
+
validator = EnumAttributeValidator.new('String', ["None", "Default", "Around"])
|
275
275
|
if text_wrapping.to_i == 0
|
276
276
|
unless validator.valid?(text_wrapping)
|
277
277
|
raise ArgumentError, "invalid value for 'text_wrapping', must be one of #{validator.allowable_values}."
|
data/lib/aspose_words_cloud.rb
CHANGED
@@ -548,6 +548,8 @@ require_relative 'aspose_words_cloud/models/requests/insert_watermark_text_reque
|
|
548
548
|
require_relative 'aspose_words_cloud/models/requests/insert_watermark_text_online_request'
|
549
549
|
require_relative 'aspose_words_cloud/models/requests/link_header_footers_to_previous_request'
|
550
550
|
require_relative 'aspose_words_cloud/models/requests/load_web_document_request'
|
551
|
+
require_relative 'aspose_words_cloud/models/requests/merge_with_next_request'
|
552
|
+
require_relative 'aspose_words_cloud/models/requests/merge_with_next_online_request'
|
551
553
|
require_relative 'aspose_words_cloud/models/requests/move_file_request'
|
552
554
|
require_relative 'aspose_words_cloud/models/requests/move_folder_request'
|
553
555
|
require_relative 'aspose_words_cloud/models/requests/optimize_document_request'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aspose_words_cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 24.
|
4
|
+
version: 24.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- YaroslawEkimov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -527,6 +527,8 @@ files:
|
|
527
527
|
- lib/aspose_words_cloud/models/requests/insert_watermark_text_request.rb
|
528
528
|
- lib/aspose_words_cloud/models/requests/link_header_footers_to_previous_request.rb
|
529
529
|
- lib/aspose_words_cloud/models/requests/load_web_document_request.rb
|
530
|
+
- lib/aspose_words_cloud/models/requests/merge_with_next_online_request.rb
|
531
|
+
- lib/aspose_words_cloud/models/requests/merge_with_next_request.rb
|
530
532
|
- lib/aspose_words_cloud/models/requests/move_file_request.rb
|
531
533
|
- lib/aspose_words_cloud/models/requests/move_folder_request.rb
|
532
534
|
- lib/aspose_words_cloud/models/requests/optimize_document_online_request.rb
|