Skip to content

Commit 8436e15

Browse files
Merge branch 'master' into release
2 parents 7cbeae6 + 3478e03 commit 8436e15

File tree

8 files changed

+1129
-2
lines changed

8 files changed

+1129
-2
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 25.5
17+
18+
- Added data models support for classes 'CommentRangeStart', 'CommentRangeEnd'.
19+
- Added data models support for classes 'FormFieldCheckboxLink', 'FormFieldDropDownLink', 'FormFieldTextInputLink'.
20+
21+
1622
## Enhancements in Version 25.4
1723

1824
- Added 'AttachmentsEmbeddingMode' property for PdfSaveOptionsData class.
@@ -381,7 +387,7 @@ To use Aspose Words for Cloud Ruby SDK you need to register an account with [Asp
381387
To install this package do the following:
382388
update your Gemfile
383389
```ruby
384-
gem 'aspose_words_cloud', '~> 25.4'
390+
gem 'aspose_words_cloud', '~> 25.5'
385391
```
386392
or install directly
387393
```bash

lib/aspose_words_cloud.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@
5151
require_relative 'aspose_words_cloud/models/comment'
5252
require_relative 'aspose_words_cloud/models/comment_insert'
5353
require_relative 'aspose_words_cloud/models/comment_link'
54+
require_relative 'aspose_words_cloud/models/comment_range_end'
55+
require_relative 'aspose_words_cloud/models/comment_range_start'
5456
require_relative 'aspose_words_cloud/models/comment_response'
5557
require_relative 'aspose_words_cloud/models/comments_collection'
5658
require_relative 'aspose_words_cloud/models/comments_response'
@@ -127,11 +129,14 @@
127129
require_relative 'aspose_words_cloud/models/footnotes_stat_data'
128130
require_relative 'aspose_words_cloud/models/footnote_update'
129131
require_relative 'aspose_words_cloud/models/form_field_checkbox'
132+
require_relative 'aspose_words_cloud/models/form_field_checkbox_link'
130133
require_relative 'aspose_words_cloud/models/form_field_collection'
131134
require_relative 'aspose_words_cloud/models/form_field_drop_down'
135+
require_relative 'aspose_words_cloud/models/form_field_drop_down_link'
132136
require_relative 'aspose_words_cloud/models/form_field_response'
133137
require_relative 'aspose_words_cloud/models/form_fields_response'
134138
require_relative 'aspose_words_cloud/models/form_field_text_input'
139+
require_relative 'aspose_words_cloud/models/form_field_text_input_link'
135140
require_relative 'aspose_words_cloud/models/gif_save_options_data'
136141
require_relative 'aspose_words_cloud/models/header_footer'
137142
require_relative 'aspose_words_cloud/models/header_footer_link'
Lines changed: 231 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,231 @@
1+
# ------------------------------------------------------------------------------------
2+
# <copyright company="Aspose" file="comment_range_end.rb">
3+
# Copyright (c) 2025 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+
# Comment range end link.
31+
class CommentRangeEnd
32+
# Gets or sets the link to the document.
33+
attr_accessor :link
34+
35+
# Gets or sets the node id.
36+
attr_accessor :node_id
37+
38+
# Gets or sets the link to comment.
39+
attr_accessor :comment_link
40+
# Attribute mapping from ruby-style variable name to JSON key.
41+
def self.attribute_map
42+
{
43+
:'link' => :'Link',
44+
:'node_id' => :'NodeId',
45+
:'comment_link' => :'CommentLink'
46+
}
47+
end
48+
49+
# Attribute type mapping.
50+
def self.swagger_types
51+
{
52+
:'link' => :'WordsApiLink',
53+
:'node_id' => :'String',
54+
:'comment_link' => :'CommentLink'
55+
}
56+
end
57+
58+
# Initializes the object
59+
# @param [Hash] attributes Model attributes in the form of hash
60+
def initialize(attributes = {})
61+
return unless attributes.is_a?(Hash)
62+
63+
# convert string to symbol for hash key
64+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
65+
66+
if attributes.key?(:'Link')
67+
self.link = attributes[:'Link']
68+
end
69+
70+
if attributes.key?(:'NodeId')
71+
self.node_id = attributes[:'NodeId']
72+
end
73+
74+
if attributes.key?(:'CommentLink')
75+
self.comment_link = attributes[:'CommentLink']
76+
end
77+
end
78+
79+
# Check to see if the all the properties in the model are valid
80+
# @return true if the model is valid
81+
def valid?
82+
return true
83+
end
84+
85+
# Checks equality by comparing each attribute.
86+
# @param [Object] Object to be compared
87+
def ==(other)
88+
return true if self.equal?(other)
89+
self.class == other.class &&
90+
link == other.link &&
91+
node_id == other.node_id &&
92+
comment_link == other.comment_link
93+
end
94+
95+
# @see the `==` method
96+
# @param [Object] Object to be compared
97+
def eql?(other)
98+
self == other
99+
end
100+
101+
# Calculates hash code according to all attributes.
102+
# @return [Fixnum] Hash code
103+
def hash
104+
[link, node_id, comment_link].hash
105+
end
106+
107+
# Builds the object from hash
108+
# @param [Hash] attributes Model attributes in the form of hash
109+
# @return [Object] Returns the model itself
110+
def build_from_hash(attributes)
111+
return nil unless attributes.is_a?(Hash)
112+
self.class.swagger_types.each_pair do |key, type|
113+
if type =~ /\AArray<(.*)>/i
114+
# check to ensure the input is an array given that the the attribute
115+
# is documented as an array but the input is not
116+
if attributes[self.class.attribute_map[key]].is_a?(Array)
117+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
118+
end
119+
elsif !attributes[self.class.attribute_map[key]].nil?
120+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
121+
end
122+
# or else data not found in attributes(hash), not an issue as the data can be optional
123+
end
124+
125+
self
126+
end
127+
128+
# Deserializes the data based on type
129+
# @param string type Data type
130+
# @param string value Value to be deserialized
131+
# @return [Object] Deserialized data
132+
def _deserialize(type, value)
133+
case type.to_sym
134+
when :DateTime
135+
Time.at(/\d/.match(value)[0].to_f).to_datetime
136+
when :Date
137+
Time.at(/\d/.match(value)[0].to_f).to_date
138+
when :String
139+
value.to_s
140+
when :Integer
141+
value.to_i
142+
when :Float
143+
value.to_f
144+
when :BOOLEAN
145+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
146+
true
147+
else
148+
false
149+
end
150+
when :Object
151+
# generic object (usually a Hash), return directly
152+
value
153+
when /\AArray<(?<inner_type>.+)>\z/
154+
inner_type = Regexp.last_match[:inner_type]
155+
value.map { |v| _deserialize(inner_type, v) }
156+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
157+
k_type = Regexp.last_match[:k_type]
158+
v_type = Regexp.last_match[:v_type]
159+
{}.tap do |hash|
160+
value.each do |k, v|
161+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
162+
end
163+
end
164+
else
165+
# model
166+
if value[:'$type']
167+
type = value[:'$type'][0..-4]
168+
end
169+
170+
temp_model = AsposeWordsCloud.const_get(type).new
171+
temp_model.build_from_hash(value)
172+
end
173+
end
174+
175+
# Returns the string representation of the object
176+
# @return [String] String presentation of the object
177+
def to_s
178+
to_hash.to_s
179+
end
180+
181+
# to_body is an alias to to_hash (backward compatibility)
182+
# @return [Hash] Returns the object in the form of hash
183+
def to_body
184+
to_hash
185+
end
186+
187+
# Returns the object in the form of hash
188+
# @return [Hash] Returns the object in the form of hash
189+
def to_hash
190+
hash = {}
191+
self.class.attribute_map.each_pair do |attr, param|
192+
value = self.send(attr)
193+
next if value.nil?
194+
hash[param] = _to_hash(value)
195+
end
196+
hash
197+
end
198+
199+
# Outputs non-array value in the form of hash
200+
# For object, use to_hash. Otherwise, just return the value
201+
# @param [Object] value Any valid value
202+
# @return [Hash] Returns the value in the form of hash
203+
def _to_hash(value)
204+
if value.is_a?(Array)
205+
value.compact.map { |v| _to_hash(v) }
206+
elsif value.is_a?(Hash)
207+
{}.tap do |hash|
208+
value.each { |k, v| hash[k] = _to_hash(v) }
209+
end
210+
elsif value.respond_to? :to_hash
211+
value.to_hash
212+
else
213+
value
214+
end
215+
end
216+
217+
def collectFilesContent(resultFilesContent)
218+
end
219+
220+
def validate()
221+
unless self.link.nil?
222+
self.link.validate
223+
end
224+
unless self.comment_link.nil?
225+
self.comment_link.validate
226+
end
227+
228+
end
229+
230+
end
231+
end

0 commit comments

Comments
 (0)