Skip to content

Commit 374f873

Browse files
SDK regenerated by CI server [ci skip]
1 parent aa83511 commit 374f873

File tree

14 files changed

+245
-37
lines changed

14 files changed

+245
-37
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ 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 23.4
17+
18+
- Added new type of RangeEndIdentifier for RangeApi: document:end
19+
20+
1621
## Enhancements in Version 23.3
1722

1823
- Fix compatibility between CreateDocument API and Dropbox storage.
@@ -264,7 +269,7 @@ To use Aspose Words for Cloud Ruby SDK you need to register an account with [Asp
264269
To install this package do the following:
265270
update your Gemfile
266271
```ruby
267-
gem 'aspose_words_cloud', '~> 23.3'
272+
gem 'aspose_words_cloud', '~> 23.4'
268273
```
269274
or install directly
270275
```bash

lib/aspose_words_cloud.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@
167167
require_relative 'aspose_words_cloud/models/metafile_rendering_options_data'
168168
require_relative 'aspose_words_cloud/models/mhtml_save_options_data'
169169
require_relative 'aspose_words_cloud/models/modification_operation_result'
170+
require_relative 'aspose_words_cloud/models/new_document_position'
170171
require_relative 'aspose_words_cloud/models/node_link'
171172
require_relative 'aspose_words_cloud/models/odt_save_options_data'
172173
require_relative 'aspose_words_cloud/models/office_math_link'

lib/aspose_words_cloud/models/bookmark_insert.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ def self.swagger_types
5555
{
5656
:'name' => :'String',
5757
:'text' => :'String',
58-
:'end_range' => :'DocumentPosition',
59-
:'start_range' => :'DocumentPosition'
58+
:'end_range' => :'NewDocumentPosition',
59+
:'start_range' => :'NewDocumentPosition'
6060
}
6161
end
6262

lib/aspose_words_cloud/models/comment_insert.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ def self.swagger_types
6464
:'author' => :'String',
6565
:'date_time' => :'DateTime',
6666
:'initial' => :'String',
67-
:'range_end' => :'DocumentPosition',
68-
:'range_start' => :'DocumentPosition',
67+
:'range_end' => :'NewDocumentPosition',
68+
:'range_start' => :'NewDocumentPosition',
6969
:'text' => :'String'
7070
}
7171
end

lib/aspose_words_cloud/models/comment_update.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ def self.swagger_types
6464
:'author' => :'String',
6565
:'date_time' => :'DateTime',
6666
:'initial' => :'String',
67-
:'range_end' => :'DocumentPosition',
68-
:'range_start' => :'DocumentPosition',
67+
:'range_end' => :'NewDocumentPosition',
68+
:'range_start' => :'NewDocumentPosition',
6969
:'text' => :'String'
7070
}
7171
end

lib/aspose_words_cloud/models/drawing_object_insert.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def self.swagger_types
9494
{
9595
:'height' => :'Float',
9696
:'left' => :'Float',
97-
:'position' => :'DocumentPosition',
97+
:'position' => :'NewDocumentPosition',
9898
:'relative_horizontal_position' => :'String',
9999
:'relative_vertical_position' => :'String',
100100
:'top' => :'Float',

lib/aspose_words_cloud/models/footnote_insert.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def self.attribute_map
7878
def self.swagger_types
7979
{
8080
:'footnote_type' => :'String',
81-
:'position' => :'DocumentPosition',
81+
:'position' => :'NewDocumentPosition',
8282
:'reference_mark' => :'String',
8383
:'text' => :'String'
8484
}

lib/aspose_words_cloud/models/footnote_update.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def self.attribute_map
7878
def self.swagger_types
7979
{
8080
:'footnote_type' => :'String',
81-
:'position' => :'DocumentPosition',
81+
:'position' => :'NewDocumentPosition',
8282
:'reference_mark' => :'String',
8383
:'text' => :'String'
8484
}
Lines changed: 214 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,214 @@
1+
# ------------------------------------------------------------------------------------
2+
# <copyright company="Aspose" file="new_document_position.rb">
3+
# Copyright (c) 2023 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+
require 'date'
27+
28+
module AsposeWordsCloud
29+
30+
# DTO container with a new position in the document tree.
31+
class NewDocumentPosition
32+
# Gets or sets the node id.
33+
attr_accessor :node_id
34+
35+
# Gets or sets the offset in the node.
36+
attr_accessor :offset
37+
# Attribute mapping from ruby-style variable name to JSON key.
38+
def self.attribute_map
39+
{
40+
:'node_id' => :'NodeId',
41+
:'offset' => :'Offset'
42+
}
43+
end
44+
45+
# Attribute type mapping.
46+
def self.swagger_types
47+
{
48+
:'node_id' => :'String',
49+
:'offset' => :'Integer'
50+
}
51+
end
52+
53+
# Initializes the object
54+
# @param [Hash] attributes Model attributes in the form of hash
55+
def initialize(attributes = {})
56+
return unless attributes.is_a?(Hash)
57+
58+
# convert string to symbol for hash key
59+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
60+
61+
if attributes.key?(:'NodeId')
62+
self.node_id = attributes[:'NodeId']
63+
end
64+
65+
if attributes.key?(:'Offset')
66+
self.offset = attributes[:'Offset']
67+
end
68+
end
69+
70+
# Show invalid properties with the reasons. Usually used together with valid?
71+
# @return Array for valid properies with the reasons
72+
def list_invalid_properties
73+
invalid_properties = []
74+
return invalid_properties
75+
end
76+
77+
# Check to see if the all the properties in the model are valid
78+
# @return true if the model is valid
79+
def valid?
80+
return true
81+
end
82+
83+
# Checks equality by comparing each attribute.
84+
# @param [Object] Object to be compared
85+
def ==(other)
86+
return true if self.equal?(other)
87+
self.class == other.class &&
88+
node_id == other.node_id &&
89+
offset == other.offset
90+
end
91+
92+
# @see the `==` method
93+
# @param [Object] Object to be compared
94+
def eql?(other)
95+
self == other
96+
end
97+
98+
# Calculates hash code according to all attributes.
99+
# @return [Fixnum] Hash code
100+
def hash
101+
[node_id, offset].hash
102+
end
103+
104+
# Builds the object from hash
105+
# @param [Hash] attributes Model attributes in the form of hash
106+
# @return [Object] Returns the model itself
107+
def build_from_hash(attributes)
108+
return nil unless attributes.is_a?(Hash)
109+
self.class.swagger_types.each_pair do |key, type|
110+
if type =~ /\AArray<(.*)>/i
111+
# check to ensure the input is an array given that the the attribute
112+
# is documented as an array but the input is not
113+
if attributes[self.class.attribute_map[key]].is_a?(Array)
114+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
115+
end
116+
elsif !attributes[self.class.attribute_map[key]].nil?
117+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
118+
end
119+
# or else data not found in attributes(hash), not an issue as the data can be optional
120+
end
121+
122+
self
123+
end
124+
125+
# Deserializes the data based on type
126+
# @param string type Data type
127+
# @param string value Value to be deserialized
128+
# @return [Object] Deserialized data
129+
def _deserialize(type, value)
130+
case type.to_sym
131+
when :DateTime
132+
Time.at(/\d/.match(value)[0].to_f).to_datetime
133+
when :Date
134+
Time.at(/\d/.match(value)[0].to_f).to_date
135+
when :String
136+
value.to_s
137+
when :Integer
138+
value.to_i
139+
when :Float
140+
value.to_f
141+
when :BOOLEAN
142+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
143+
true
144+
else
145+
false
146+
end
147+
when :Object
148+
# generic object (usually a Hash), return directly
149+
value
150+
when /\AArray<(?<inner_type>.+)>\z/
151+
inner_type = Regexp.last_match[:inner_type]
152+
value.map { |v| _deserialize(inner_type, v) }
153+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
154+
k_type = Regexp.last_match[:k_type]
155+
v_type = Regexp.last_match[:v_type]
156+
{}.tap do |hash|
157+
value.each do |k, v|
158+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
159+
end
160+
end
161+
else
162+
# model
163+
temp_model = AsposeWordsCloud.const_get(type).new
164+
temp_model.build_from_hash(value)
165+
end
166+
end
167+
168+
# Returns the string representation of the object
169+
# @return [String] String presentation of the object
170+
def to_s
171+
to_hash.to_s
172+
end
173+
174+
# to_body is an alias to to_hash (backward compatibility)
175+
# @return [Hash] Returns the object in the form of hash
176+
def to_body
177+
to_hash
178+
end
179+
180+
# Returns the object in the form of hash
181+
# @return [Hash] Returns the object in the form of hash
182+
def to_hash
183+
hash = {}
184+
self.class.attribute_map.each_pair do |attr, param|
185+
value = self.send(attr)
186+
next if value.nil?
187+
hash[param] = _to_hash(value)
188+
end
189+
hash
190+
end
191+
192+
# Outputs non-array value in the form of hash
193+
# For object, use to_hash. Otherwise, just return the value
194+
# @param [Object] value Any valid value
195+
# @return [Hash] Returns the value in the form of hash
196+
def _to_hash(value)
197+
if value.is_a?(Array)
198+
value.compact.map { |v| _to_hash(v) }
199+
elsif value.is_a?(Hash)
200+
{}.tap do |hash|
201+
value.each { |k, v| hash[k] = _to_hash(v) }
202+
end
203+
elsif value.respond_to? :to_hash
204+
value.to_hash
205+
else
206+
value
207+
end
208+
end
209+
210+
def collectFilesContent(resultFilesContent)
211+
end
212+
213+
end
214+
end

lib/aspose_words_cloud/models/table_insert.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def self.attribute_map
5050
def self.swagger_types
5151
{
5252
:'columns_count' => :'Integer',
53-
:'position' => :'DocumentPosition',
53+
:'position' => :'NewDocumentPosition',
5454
:'rows_count' => :'Integer'
5555
}
5656
end

0 commit comments

Comments
 (0)