Skip to content

Commit 956e591

Browse files
Merge branch 'master' into release
2 parents 779e959 + cff4bd9 commit 956e591

13 files changed

+561
-18
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ This repository contains Aspose.Words Cloud SDK for Ruby source code. This SDK a
1313
* Watermarks and protection
1414
* Full read & write access to Document Object Model, including sections, paragraphs, text, images, tables, headers/footers and many others
1515

16+
## Enhancements in Version 24.4
17+
18+
- Added the 'MergeWithNext' method to merge a section with the next one.
19+
- Added the 'LockAspectRatio' propperty for DrawingObjectInsert and DrawingObjectUpdate methods.
20+
21+
1622
## Enhancements in Version 24.3
1723

1824
- Added support for 'RemoveEmptyCells' option for the 'Cleanup' parameter in the insert 'MailMerge' API method.
@@ -321,7 +327,7 @@ To use Aspose Words for Cloud Ruby SDK you need to register an account with [Asp
321327
To install this package do the following:
322328
update your Gemfile
323329
```ruby
324-
gem 'aspose_words_cloud', '~> 24.3'
330+
gem 'aspose_words_cloud', '~> 24.4'
325331
```
326332
or install directly
327333
```bash

lib/aspose_words_cloud.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,8 @@
548548
require_relative 'aspose_words_cloud/models/requests/insert_watermark_text_online_request'
549549
require_relative 'aspose_words_cloud/models/requests/link_header_footers_to_previous_request'
550550
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'
551553
require_relative 'aspose_words_cloud/models/requests/move_file_request'
552554
require_relative 'aspose_words_cloud/models/requests/move_folder_request'
553555
require_relative 'aspose_words_cloud/models/requests/optimize_document_request'

lib/aspose_words_cloud/api/words_api.rb

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10885,6 +10885,90 @@ def load_web_document(request)
1088510885
[data, status_code, headers]
1088610886
end
1088710887

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+
1088810972
# Move file.
1088910973
# @param request MoveFileRequest
1089010974
# @return [nil]

lib/aspose_words_cloud/models/drawing_object_insert.rb

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ class DrawingObjectInsert
5353
# Gets or sets the option indicating how to wrap text around the image.
5454
attr_accessor :wrap_type
5555

56+
# Gets or sets a value indicating whether AspectRatioLocked option on or off.
57+
attr_accessor :aspect_ratio_locked
58+
5659
class EnumAttributeValidator
5760
attr_reader :datatype
5861
attr_reader :allowable_values
@@ -85,7 +88,8 @@ def self.attribute_map
8588
:'top' => :'Top',
8689
:'width' => :'Width',
8790
:'height' => :'Height',
88-
:'wrap_type' => :'WrapType'
91+
:'wrap_type' => :'WrapType',
92+
:'aspect_ratio_locked' => :'AspectRatioLocked'
8993
}
9094
end
9195

@@ -99,7 +103,8 @@ def self.swagger_types
99103
:'top' => :'Float',
100104
:'width' => :'Float',
101105
:'height' => :'Float',
102-
:'wrap_type' => :'String'
106+
:'wrap_type' => :'String',
107+
:'aspect_ratio_locked' => :'BOOLEAN'
103108
}
104109
end
105110

@@ -142,6 +147,10 @@ def initialize(attributes = {})
142147
if attributes.key?(:'WrapType')
143148
self.wrap_type = attributes[:'WrapType']
144149
end
150+
151+
if attributes.key?(:'AspectRatioLocked')
152+
self.aspect_ratio_locked = attributes[:'AspectRatioLocked']
153+
end
145154
end
146155

147156
# Check to see if the all the properties in the model are valid
@@ -212,7 +221,8 @@ def ==(other)
212221
top == other.top &&
213222
width == other.width &&
214223
height == other.height &&
215-
wrap_type == other.wrap_type
224+
wrap_type == other.wrap_type &&
225+
aspect_ratio_locked == other.aspect_ratio_locked
216226
end
217227

218228
# @see the `==` method
@@ -224,7 +234,7 @@ def eql?(other)
224234
# Calculates hash code according to all attributes.
225235
# @return [Fixnum] Hash code
226236
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
228238
end
229239

230240
# Builds the object from hash

lib/aspose_words_cloud/models/drawing_object_update.rb

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ class DrawingObjectUpdate
5050
# Gets or sets the option that controls how to wrap text around the image.
5151
attr_accessor :wrap_type
5252

53+
# Gets or sets a value indicating whether AspectRatioLocked option on or off.
54+
attr_accessor :aspect_ratio_locked
55+
5356
class EnumAttributeValidator
5457
attr_reader :datatype
5558
attr_reader :allowable_values
@@ -81,7 +84,8 @@ def self.attribute_map
8184
:'top' => :'Top',
8285
:'width' => :'Width',
8386
:'height' => :'Height',
84-
:'wrap_type' => :'WrapType'
87+
:'wrap_type' => :'WrapType',
88+
:'aspect_ratio_locked' => :'AspectRatioLocked'
8589
}
8690
end
8791

@@ -94,7 +98,8 @@ def self.swagger_types
9498
:'top' => :'Float',
9599
:'width' => :'Float',
96100
:'height' => :'Float',
97-
:'wrap_type' => :'String'
101+
:'wrap_type' => :'String',
102+
:'aspect_ratio_locked' => :'BOOLEAN'
98103
}
99104
end
100105

@@ -133,6 +138,10 @@ def initialize(attributes = {})
133138
if attributes.key?(:'WrapType')
134139
self.wrap_type = attributes[:'WrapType']
135140
end
141+
142+
if attributes.key?(:'AspectRatioLocked')
143+
self.aspect_ratio_locked = attributes[:'AspectRatioLocked']
144+
end
136145
end
137146

138147
# Check to see if the all the properties in the model are valid
@@ -202,7 +211,8 @@ def ==(other)
202211
top == other.top &&
203212
width == other.width &&
204213
height == other.height &&
205-
wrap_type == other.wrap_type
214+
wrap_type == other.wrap_type &&
215+
aspect_ratio_locked == other.aspect_ratio_locked
206216
end
207217

208218
# @see the `==` method
@@ -214,7 +224,7 @@ def eql?(other)
214224
# Calculates hash code according to all attributes.
215225
# @return [Fixnum] Hash code
216226
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
218228
end
219229

220230
# Builds the object from hash

0 commit comments

Comments
 (0)