Skip to content

Commit 0cfa4ea

Browse files
committed
Updated sources
1 parent dd353f0 commit 0cfa4ea

4 files changed

Lines changed: 84 additions & 7 deletions

File tree

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
groupdocs_conversion_cloud (24.8)
4+
groupdocs_conversion_cloud (24.11)
55
addressable (~> 2.8.0, >= 2.8.0)
66
faraday (~> 0.14.0)
77

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ gem install groupdocs_conversion_cloud
1212
To add dependency to your app copy following into your Gemfile and run `bundle install`:
1313

1414
```
15-
gem "groupdocs_conversion_cloud", "~> 24.8"
15+
gem "groupdocs_conversion_cloud", "~> 24.11"
1616
```
1717

1818
## Getting Started

lib/groupdocs_conversion_cloud/models/web_load_options.rb

Lines changed: 81 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,55 @@ class WebLoadOptions
3737
# Enable or disable generation of page numbering in converted document. Default: false
3838
attr_accessor :page_numbering
3939

40+
# Get or sets the encoding to be used when loading the web document. If the property is null the encoding will be determined from document character set attribute
41+
attr_accessor :encoding
42+
43+
# Use pdf for the conversion. Default: false
44+
attr_accessor :use_pdf
45+
46+
# Controls how HTML content is rendered. Default: AbsolutePositioning
47+
attr_accessor :rendering_mode
48+
class EnumAttributeValidator
49+
attr_reader :datatype
50+
attr_reader :allowable_values
51+
52+
def initialize(datatype, allowable_values)
53+
@allowable_values = allowable_values.map do |value|
54+
case datatype.to_s
55+
when /Integer/i
56+
value.to_i
57+
when /Float/i
58+
value.to_f
59+
else
60+
value
61+
end
62+
end
63+
end
64+
65+
def valid?(value)
66+
!value || allowable_values.include?(value)
67+
end
68+
end
69+
4070
# Attribute mapping from ruby-style variable name to JSON key.
4171
def self.attribute_map
4272
{
4373
:'format' => :'Format',
44-
:'page_numbering' => :'PageNumbering'
74+
:'page_numbering' => :'PageNumbering',
75+
:'encoding' => :'Encoding',
76+
:'use_pdf' => :'UsePdf',
77+
:'rendering_mode' => :'RenderingMode'
4578
}
4679
end
4780

4881
# Attribute type mapping.
4982
def self.swagger_types
5083
{
5184
:'format' => :'String',
52-
:'page_numbering' => :'BOOLEAN'
85+
:'page_numbering' => :'BOOLEAN',
86+
:'encoding' => :'String',
87+
:'use_pdf' => :'BOOLEAN',
88+
:'rendering_mode' => :'String'
5389
}
5490
end
5591

@@ -69,6 +105,18 @@ def initialize(attributes = {})
69105
self.page_numbering = attributes[:'PageNumbering']
70106
end
71107

108+
if attributes.key?(:'Encoding')
109+
self.encoding = attributes[:'Encoding']
110+
end
111+
112+
if attributes.key?(:'UsePdf')
113+
self.use_pdf = attributes[:'UsePdf']
114+
end
115+
116+
if attributes.key?(:'RenderingMode')
117+
self.rendering_mode = attributes[:'RenderingMode']
118+
end
119+
72120
end
73121

74122
# Show invalid properties with the reasons. Usually used together with valid?
@@ -79,23 +127,52 @@ def list_invalid_properties
79127
invalid_properties.push("invalid value for 'page_numbering', page_numbering cannot be nil.")
80128
end
81129

130+
if @use_pdf.nil?
131+
invalid_properties.push("invalid value for 'use_pdf', use_pdf cannot be nil.")
132+
end
133+
134+
if @rendering_mode.nil?
135+
invalid_properties.push("invalid value for 'rendering_mode', rendering_mode cannot be nil.")
136+
end
137+
82138
return invalid_properties
83139
end
84140

85141
# Check to see if the all the properties in the model are valid
86142
# @return true if the model is valid
87143
def valid?
88144
return false if @page_numbering.nil?
145+
return false if @use_pdf.nil?
146+
return false if @rendering_mode.nil?
147+
rendering_mode_validator = EnumAttributeValidator.new('String', ["Flow", "AbsolutePositioning"])
148+
return false unless rendering_mode_validator.valid?(@rendering_mode)
89149
return true
90150
end
91151

152+
# Custom attribute writer method checking allowed values (enum).
153+
# @param [Object] rendering_mode Object to be assigned
154+
def rendering_mode=(rendering_mode)
155+
validator = EnumAttributeValidator.new('String', ["Flow", "AbsolutePositioning"])
156+
if rendering_mode.to_i == 0
157+
unless validator.valid?(rendering_mode)
158+
raise ArgumentError, "invalid value for 'rendering_mode', must be one of #{validator.allowable_values}."
159+
end
160+
@rendering_mode = rendering_mode
161+
else
162+
@rendering_mode = validator.allowable_values[rendering_mode.to_i]
163+
end
164+
end
165+
92166
# Checks equality by comparing each attribute.
93167
# @param [Object] Object to be compared
94168
def ==(other)
95169
return true if self.equal?(other)
96170
self.class == other.class &&
97171
format == other.format &&
98-
page_numbering == other.page_numbering
172+
page_numbering == other.page_numbering &&
173+
encoding == other.encoding &&
174+
use_pdf == other.use_pdf &&
175+
rendering_mode == other.rendering_mode
99176
end
100177

101178
# @see the `==` method
@@ -107,7 +184,7 @@ def eql?(other)
107184
# Calculates hash code according to all attributes.
108185
# @return [Fixnum] Hash code
109186
def hash
110-
[format, page_numbering].hash
187+
[format, page_numbering, encoding, use_pdf, rendering_mode].hash
111188
end
112189

113190
# Downcases first letter.

lib/groupdocs_conversion_cloud/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@
2525
# --------------------------------------------------------------------------------------------------------------------
2626
#
2727
module GroupDocsConversionCloud
28-
VERSION = "24.8".freeze
28+
VERSION = "24.11".freeze
2929
end

0 commit comments

Comments
 (0)