cloudmersive-convert-api-client 2.2.6 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +54 -8
  3. data/docs/CompareDocumentApi.md +6 -2
  4. data/docs/ConvertDataApi.md +60 -5
  5. data/docs/ConvertDocumentApi.md +358 -10
  6. data/docs/ConvertDocumentBatchJobCreateResult.md +9 -0
  7. data/docs/ConvertDocumentJobStatusResult.md +12 -0
  8. data/docs/ConvertImageApi.md +6 -2
  9. data/docs/ConvertWebApi.md +8 -8
  10. data/docs/ConvertedPngDirectPage.md +9 -0
  11. data/docs/DocumentArrayInput.md +8 -0
  12. data/docs/DocumentItem.md +9 -0
  13. data/docs/EditDocumentApi.md +124 -2
  14. data/docs/EditPdfApi.md +244 -2
  15. data/docs/EditPdfBatchJobCreateResult.md +9 -0
  16. data/docs/EditPdfJobStatusResult.md +12 -0
  17. data/docs/JobStatusResult.md +12 -0
  18. data/docs/MergeBatchJobCreateResult.md +9 -0
  19. data/docs/MergeDocumentApi.md +440 -0
  20. data/docs/MergeJobStatusResult.md +12 -0
  21. data/docs/PdfMetadata.md +2 -0
  22. data/docs/PdfToPngDirectResult.md +9 -0
  23. data/docs/PptxPageLayoutInformation.md +11 -0
  24. data/docs/PptxSplitAdvancedRequest.md +9 -0
  25. data/docs/PptxSplitAdvancedResponse.md +9 -0
  26. data/docs/PresentationAdvancedResult.md +9 -0
  27. data/docs/SplitBatchJobCreateResult.md +9 -0
  28. data/docs/SplitDocumentApi.md +169 -0
  29. data/docs/ValidateDocumentApi.md +175 -6
  30. data/lib/cloudmersive-convert-api-client/api/compare_document_api.rb +3 -0
  31. data/lib/cloudmersive-convert-api-client/api/convert_data_api.rb +57 -4
  32. data/lib/cloudmersive-convert-api-client/api/convert_document_api.rb +354 -11
  33. data/lib/cloudmersive-convert-api-client/api/convert_image_api.rb +3 -0
  34. data/lib/cloudmersive-convert-api-client/api/convert_web_api.rb +8 -8
  35. data/lib/cloudmersive-convert-api-client/api/edit_document_api.rb +122 -0
  36. data/lib/cloudmersive-convert-api-client/api/edit_pdf_api.rb +263 -0
  37. data/lib/cloudmersive-convert-api-client/api/merge_document_api.rb +431 -0
  38. data/lib/cloudmersive-convert-api-client/api/split_document_api.rb +165 -0
  39. data/lib/cloudmersive-convert-api-client/api/validate_document_api.rb +172 -4
  40. data/lib/cloudmersive-convert-api-client/models/convert_document_batch_job_create_result.rb +196 -0
  41. data/lib/cloudmersive-convert-api-client/models/convert_document_job_status_result.rb +241 -0
  42. data/lib/cloudmersive-convert-api-client/models/converted_png_direct_page.rb +211 -0
  43. data/lib/cloudmersive-convert-api-client/models/document_array_input.rb +188 -0
  44. data/lib/cloudmersive-convert-api-client/models/document_item.rb +211 -0
  45. data/lib/cloudmersive-convert-api-client/models/edit_pdf_batch_job_create_result.rb +196 -0
  46. data/lib/cloudmersive-convert-api-client/models/edit_pdf_job_status_result.rb +241 -0
  47. data/lib/cloudmersive-convert-api-client/models/job_status_result.rb +226 -0
  48. data/lib/cloudmersive-convert-api-client/models/merge_batch_job_create_result.rb +196 -0
  49. data/lib/cloudmersive-convert-api-client/models/merge_job_status_result.rb +241 -0
  50. data/lib/cloudmersive-convert-api-client/models/pdf_metadata.rb +24 -4
  51. data/lib/cloudmersive-convert-api-client/models/pdf_to_png_direct_result.rb +198 -0
  52. data/lib/cloudmersive-convert-api-client/models/pptx_page_layout_information.rb +216 -0
  53. data/lib/cloudmersive-convert-api-client/models/pptx_split_advanced_request.rb +211 -0
  54. data/lib/cloudmersive-convert-api-client/models/pptx_split_advanced_response.rb +197 -0
  55. data/lib/cloudmersive-convert-api-client/models/presentation_advanced_result.rb +211 -0
  56. data/lib/cloudmersive-convert-api-client/models/presentation_result.rb +1 -1
  57. data/lib/cloudmersive-convert-api-client/models/split_batch_job_create_result.rb +196 -0
  58. data/lib/cloudmersive-convert-api-client/version.rb +1 -1
  59. data/lib/cloudmersive-convert-api-client.rb +16 -0
  60. data/spec/api/compare_document_api_spec.rb +1 -0
  61. data/spec/api/convert_data_api_spec.rb +14 -2
  62. data/spec/api/convert_document_api_spec.rb +80 -3
  63. data/spec/api/convert_image_api_spec.rb +1 -0
  64. data/spec/api/edit_document_api_spec.rb +28 -0
  65. data/spec/api/edit_pdf_api_spec.rb +55 -0
  66. data/spec/api/merge_document_api_spec.rb +96 -0
  67. data/spec/api/split_document_api_spec.rb +37 -0
  68. data/spec/api/validate_document_api_spec.rb +39 -2
  69. data/spec/models/convert_document_batch_job_create_result_spec.rb +47 -0
  70. data/spec/models/convert_document_job_status_result_spec.rb +65 -0
  71. data/spec/models/converted_png_direct_page_spec.rb +47 -0
  72. data/spec/models/document_array_input_spec.rb +41 -0
  73. data/spec/models/document_item_spec.rb +47 -0
  74. data/spec/models/edit_pdf_batch_job_create_result_spec.rb +47 -0
  75. data/spec/models/edit_pdf_job_status_result_spec.rb +65 -0
  76. data/spec/models/job_status_result_spec.rb +65 -0
  77. data/spec/models/merge_batch_job_create_result_spec.rb +47 -0
  78. data/spec/models/merge_job_status_result_spec.rb +65 -0
  79. data/spec/models/pdf_metadata_spec.rb +12 -0
  80. data/spec/models/pdf_to_png_direct_result_spec.rb +47 -0
  81. data/spec/models/pptx_page_layout_information_spec.rb +59 -0
  82. data/spec/models/pptx_split_advanced_request_spec.rb +47 -0
  83. data/spec/models/pptx_split_advanced_response_spec.rb +47 -0
  84. data/spec/models/presentation_advanced_result_spec.rb +47 -0
  85. data/spec/models/split_batch_job_create_result_spec.rb +47 -0
  86. metadata +50 -2
@@ -0,0 +1,197 @@
1
+ =begin
2
+ #convertapi
3
+
4
+ #Convert API lets you effortlessly convert file formats and types.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.14
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module CloudmersiveConvertApiClient
16
+ # Result of splitting a single PowerPoint Presentation PPTX into Separate Presentations
17
+ class PptxSplitAdvancedResponse
18
+ attr_accessor :result_presentations
19
+
20
+ # True if the operation was successful, false otherwise
21
+ attr_accessor :successful
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'result_presentations' => :'ResultPresentations',
27
+ :'successful' => :'Successful'
28
+ }
29
+ end
30
+
31
+ # Attribute type mapping.
32
+ def self.swagger_types
33
+ {
34
+ :'result_presentations' => :'Array<PresentationAdvancedResult>',
35
+ :'successful' => :'BOOLEAN'
36
+ }
37
+ end
38
+
39
+ # Initializes the object
40
+ # @param [Hash] attributes Model attributes in the form of hash
41
+ def initialize(attributes = {})
42
+ return unless attributes.is_a?(Hash)
43
+
44
+ # convert string to symbol for hash key
45
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
46
+
47
+ if attributes.has_key?(:'ResultPresentations')
48
+ if (value = attributes[:'ResultPresentations']).is_a?(Array)
49
+ self.result_presentations = value
50
+ end
51
+ end
52
+
53
+ if attributes.has_key?(:'Successful')
54
+ self.successful = attributes[:'Successful']
55
+ end
56
+ end
57
+
58
+ # Show invalid properties with the reasons. Usually used together with valid?
59
+ # @return Array for valid properties with the reasons
60
+ def list_invalid_properties
61
+ invalid_properties = Array.new
62
+ invalid_properties
63
+ end
64
+
65
+ # Check to see if the all the properties in the model are valid
66
+ # @return true if the model is valid
67
+ def valid?
68
+ true
69
+ end
70
+
71
+ # Checks equality by comparing each attribute.
72
+ # @param [Object] Object to be compared
73
+ def ==(o)
74
+ return true if self.equal?(o)
75
+ self.class == o.class &&
76
+ result_presentations == o.result_presentations &&
77
+ successful == o.successful
78
+ end
79
+
80
+ # @see the `==` method
81
+ # @param [Object] Object to be compared
82
+ def eql?(o)
83
+ self == o
84
+ end
85
+
86
+ # Calculates hash code according to all attributes.
87
+ # @return [Fixnum] Hash code
88
+ def hash
89
+ [result_presentations, successful].hash
90
+ end
91
+
92
+ # Builds the object from hash
93
+ # @param [Hash] attributes Model attributes in the form of hash
94
+ # @return [Object] Returns the model itself
95
+ def build_from_hash(attributes)
96
+ return nil unless attributes.is_a?(Hash)
97
+ self.class.swagger_types.each_pair do |key, type|
98
+ if type =~ /\AArray<(.*)>/i
99
+ # check to ensure the input is an array given that the attribute
100
+ # is documented as an array but the input is not
101
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
102
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
103
+ end
104
+ elsif !attributes[self.class.attribute_map[key]].nil?
105
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
106
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
107
+ end
108
+
109
+ self
110
+ end
111
+
112
+ # Deserializes the data based on type
113
+ # @param string type Data type
114
+ # @param string value Value to be deserialized
115
+ # @return [Object] Deserialized data
116
+ def _deserialize(type, value)
117
+ case type.to_sym
118
+ when :DateTime
119
+ DateTime.parse(value)
120
+ when :Date
121
+ Date.parse(value)
122
+ when :String
123
+ value.to_s
124
+ when :Integer
125
+ value.to_i
126
+ when :Float
127
+ value.to_f
128
+ when :BOOLEAN
129
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
130
+ true
131
+ else
132
+ false
133
+ end
134
+ when :Object
135
+ # generic object (usually a Hash), return directly
136
+ value
137
+ when /\AArray<(?<inner_type>.+)>\z/
138
+ inner_type = Regexp.last_match[:inner_type]
139
+ value.map { |v| _deserialize(inner_type, v) }
140
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
141
+ k_type = Regexp.last_match[:k_type]
142
+ v_type = Regexp.last_match[:v_type]
143
+ {}.tap do |hash|
144
+ value.each do |k, v|
145
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
146
+ end
147
+ end
148
+ else # model
149
+ temp_model = CloudmersiveConvertApiClient.const_get(type).new
150
+ temp_model.build_from_hash(value)
151
+ end
152
+ end
153
+
154
+ # Returns the string representation of the object
155
+ # @return [String] String presentation of the object
156
+ def to_s
157
+ to_hash.to_s
158
+ end
159
+
160
+ # to_body is an alias to to_hash (backward compatibility)
161
+ # @return [Hash] Returns the object in the form of hash
162
+ def to_body
163
+ to_hash
164
+ end
165
+
166
+ # Returns the object in the form of hash
167
+ # @return [Hash] Returns the object in the form of hash
168
+ def to_hash
169
+ hash = {}
170
+ self.class.attribute_map.each_pair do |attr, param|
171
+ value = self.send(attr)
172
+ next if value.nil?
173
+ hash[param] = _to_hash(value)
174
+ end
175
+ hash
176
+ end
177
+
178
+ # Outputs non-array value in the form of hash
179
+ # For object, use to_hash. Otherwise, just return the value
180
+ # @param [Object] value Any valid value
181
+ # @return [Hash] Returns the value in the form of hash
182
+ def _to_hash(value)
183
+ if value.is_a?(Array)
184
+ value.compact.map { |v| _to_hash(v) }
185
+ elsif value.is_a?(Hash)
186
+ {}.tap do |hash|
187
+ value.each { |k, v| hash[k] = _to_hash(v) }
188
+ end
189
+ elsif value.respond_to? :to_hash
190
+ value.to_hash
191
+ else
192
+ value
193
+ end
194
+ end
195
+
196
+ end
197
+ end
@@ -0,0 +1,211 @@
1
+ =begin
2
+ #convertapi
3
+
4
+ #Convert API lets you effortlessly convert file formats and types.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.14
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module CloudmersiveConvertApiClient
16
+ # A single PowerPoint PPTX file corresponding to one worksheet (tab) in the original spreadsheet
17
+ class PresentationAdvancedResult
18
+ # Presentation number of the converted page, starting with 1 for the left-most worksheet
19
+ attr_accessor :slide_number
20
+
21
+ # Contents of the presentation in bytes
22
+ attr_accessor :presentation_contents
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'slide_number' => :'SlideNumber',
28
+ :'presentation_contents' => :'PresentationContents'
29
+ }
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.swagger_types
34
+ {
35
+ :'slide_number' => :'Integer',
36
+ :'presentation_contents' => :'String'
37
+ }
38
+ end
39
+
40
+ # Initializes the object
41
+ # @param [Hash] attributes Model attributes in the form of hash
42
+ def initialize(attributes = {})
43
+ return unless attributes.is_a?(Hash)
44
+
45
+ # convert string to symbol for hash key
46
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
47
+
48
+ if attributes.has_key?(:'SlideNumber')
49
+ self.slide_number = attributes[:'SlideNumber']
50
+ end
51
+
52
+ if attributes.has_key?(:'PresentationContents')
53
+ self.presentation_contents = attributes[:'PresentationContents']
54
+ end
55
+ end
56
+
57
+ # Show invalid properties with the reasons. Usually used together with valid?
58
+ # @return Array for valid properties with the reasons
59
+ def list_invalid_properties
60
+ invalid_properties = Array.new
61
+ if !@presentation_contents.nil? && @presentation_contents !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
62
+ invalid_properties.push('invalid value for "presentation_contents", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.')
63
+ end
64
+
65
+ invalid_properties
66
+ end
67
+
68
+ # Check to see if the all the properties in the model are valid
69
+ # @return true if the model is valid
70
+ def valid?
71
+ return false if !@presentation_contents.nil? && @presentation_contents !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
72
+ true
73
+ end
74
+
75
+ # Custom attribute writer method with validation
76
+ # @param [Object] presentation_contents Value to be assigned
77
+ def presentation_contents=(presentation_contents)
78
+ if !presentation_contents.nil? && presentation_contents !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
79
+ fail ArgumentError, 'invalid value for "presentation_contents", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.'
80
+ end
81
+
82
+ @presentation_contents = presentation_contents
83
+ end
84
+
85
+ # Checks equality by comparing each attribute.
86
+ # @param [Object] Object to be compared
87
+ def ==(o)
88
+ return true if self.equal?(o)
89
+ self.class == o.class &&
90
+ slide_number == o.slide_number &&
91
+ presentation_contents == o.presentation_contents
92
+ end
93
+
94
+ # @see the `==` method
95
+ # @param [Object] Object to be compared
96
+ def eql?(o)
97
+ self == o
98
+ end
99
+
100
+ # Calculates hash code according to all attributes.
101
+ # @return [Fixnum] Hash code
102
+ def hash
103
+ [slide_number, presentation_contents].hash
104
+ end
105
+
106
+ # Builds the object from hash
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ # @return [Object] Returns the model itself
109
+ def build_from_hash(attributes)
110
+ return nil unless attributes.is_a?(Hash)
111
+ self.class.swagger_types.each_pair do |key, type|
112
+ if type =~ /\AArray<(.*)>/i
113
+ # check to ensure the input is an array given that the attribute
114
+ # is documented as an array but the input is not
115
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
116
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
117
+ end
118
+ elsif !attributes[self.class.attribute_map[key]].nil?
119
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
120
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
121
+ end
122
+
123
+ self
124
+ end
125
+
126
+ # Deserializes the data based on type
127
+ # @param string type Data type
128
+ # @param string value Value to be deserialized
129
+ # @return [Object] Deserialized data
130
+ def _deserialize(type, value)
131
+ case type.to_sym
132
+ when :DateTime
133
+ DateTime.parse(value)
134
+ when :Date
135
+ Date.parse(value)
136
+ when :String
137
+ value.to_s
138
+ when :Integer
139
+ value.to_i
140
+ when :Float
141
+ value.to_f
142
+ when :BOOLEAN
143
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
144
+ true
145
+ else
146
+ false
147
+ end
148
+ when :Object
149
+ # generic object (usually a Hash), return directly
150
+ value
151
+ when /\AArray<(?<inner_type>.+)>\z/
152
+ inner_type = Regexp.last_match[:inner_type]
153
+ value.map { |v| _deserialize(inner_type, v) }
154
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
155
+ k_type = Regexp.last_match[:k_type]
156
+ v_type = Regexp.last_match[:v_type]
157
+ {}.tap do |hash|
158
+ value.each do |k, v|
159
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
160
+ end
161
+ end
162
+ else # model
163
+ temp_model = CloudmersiveConvertApiClient.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
+ end
211
+ end
@@ -13,7 +13,7 @@ Swagger Codegen version: 2.4.14
13
13
  require 'date'
14
14
 
15
15
  module CloudmersiveConvertApiClient
16
- # A single Excel XLSX file corresponding to one worksheet (tab) in the original spreadsheet
16
+ # A single PowerPoint PPTX file corresponding to one slide in the original presentation
17
17
  class PresentationResult
18
18
  # Worksheet number of the converted page, starting with 1 for the left-most worksheet
19
19
  attr_accessor :slide_number
@@ -0,0 +1,196 @@
1
+ =begin
2
+ #convertapi
3
+
4
+ #Convert API lets you effortlessly convert file formats and types.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.14
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module CloudmersiveConvertApiClient
16
+ # Result of performing a split document batch job
17
+ class SplitBatchJobCreateResult
18
+ # True if successful, false otherwise
19
+ attr_accessor :successful
20
+
21
+ # When creating a job, an Async Job ID is returned. Use the GetAsyncJobStatus API to check on the status of this job using the AsyncJobID and get the result when it finishes
22
+ attr_accessor :async_job_id
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'successful' => :'Successful',
28
+ :'async_job_id' => :'AsyncJobID'
29
+ }
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.swagger_types
34
+ {
35
+ :'successful' => :'BOOLEAN',
36
+ :'async_job_id' => :'String'
37
+ }
38
+ end
39
+
40
+ # Initializes the object
41
+ # @param [Hash] attributes Model attributes in the form of hash
42
+ def initialize(attributes = {})
43
+ return unless attributes.is_a?(Hash)
44
+
45
+ # convert string to symbol for hash key
46
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
47
+
48
+ if attributes.has_key?(:'Successful')
49
+ self.successful = attributes[:'Successful']
50
+ end
51
+
52
+ if attributes.has_key?(:'AsyncJobID')
53
+ self.async_job_id = attributes[:'AsyncJobID']
54
+ end
55
+ end
56
+
57
+ # Show invalid properties with the reasons. Usually used together with valid?
58
+ # @return Array for valid properties with the reasons
59
+ def list_invalid_properties
60
+ invalid_properties = Array.new
61
+ invalid_properties
62
+ end
63
+
64
+ # Check to see if the all the properties in the model are valid
65
+ # @return true if the model is valid
66
+ def valid?
67
+ true
68
+ end
69
+
70
+ # Checks equality by comparing each attribute.
71
+ # @param [Object] Object to be compared
72
+ def ==(o)
73
+ return true if self.equal?(o)
74
+ self.class == o.class &&
75
+ successful == o.successful &&
76
+ async_job_id == o.async_job_id
77
+ end
78
+
79
+ # @see the `==` method
80
+ # @param [Object] Object to be compared
81
+ def eql?(o)
82
+ self == o
83
+ end
84
+
85
+ # Calculates hash code according to all attributes.
86
+ # @return [Fixnum] Hash code
87
+ def hash
88
+ [successful, async_job_id].hash
89
+ end
90
+
91
+ # Builds the object from hash
92
+ # @param [Hash] attributes Model attributes in the form of hash
93
+ # @return [Object] Returns the model itself
94
+ def build_from_hash(attributes)
95
+ return nil unless attributes.is_a?(Hash)
96
+ self.class.swagger_types.each_pair do |key, type|
97
+ if type =~ /\AArray<(.*)>/i
98
+ # check to ensure the input is an array given that the attribute
99
+ # is documented as an array but the input is not
100
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
101
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
102
+ end
103
+ elsif !attributes[self.class.attribute_map[key]].nil?
104
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
105
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
106
+ end
107
+
108
+ self
109
+ end
110
+
111
+ # Deserializes the data based on type
112
+ # @param string type Data type
113
+ # @param string value Value to be deserialized
114
+ # @return [Object] Deserialized data
115
+ def _deserialize(type, value)
116
+ case type.to_sym
117
+ when :DateTime
118
+ DateTime.parse(value)
119
+ when :Date
120
+ Date.parse(value)
121
+ when :String
122
+ value.to_s
123
+ when :Integer
124
+ value.to_i
125
+ when :Float
126
+ value.to_f
127
+ when :BOOLEAN
128
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
129
+ true
130
+ else
131
+ false
132
+ end
133
+ when :Object
134
+ # generic object (usually a Hash), return directly
135
+ value
136
+ when /\AArray<(?<inner_type>.+)>\z/
137
+ inner_type = Regexp.last_match[:inner_type]
138
+ value.map { |v| _deserialize(inner_type, v) }
139
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
140
+ k_type = Regexp.last_match[:k_type]
141
+ v_type = Regexp.last_match[:v_type]
142
+ {}.tap do |hash|
143
+ value.each do |k, v|
144
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
145
+ end
146
+ end
147
+ else # model
148
+ temp_model = CloudmersiveConvertApiClient.const_get(type).new
149
+ temp_model.build_from_hash(value)
150
+ end
151
+ end
152
+
153
+ # Returns the string representation of the object
154
+ # @return [String] String presentation of the object
155
+ def to_s
156
+ to_hash.to_s
157
+ end
158
+
159
+ # to_body is an alias to to_hash (backward compatibility)
160
+ # @return [Hash] Returns the object in the form of hash
161
+ def to_body
162
+ to_hash
163
+ end
164
+
165
+ # Returns the object in the form of hash
166
+ # @return [Hash] Returns the object in the form of hash
167
+ def to_hash
168
+ hash = {}
169
+ self.class.attribute_map.each_pair do |attr, param|
170
+ value = self.send(attr)
171
+ next if value.nil?
172
+ hash[param] = _to_hash(value)
173
+ end
174
+ hash
175
+ end
176
+
177
+ # Outputs non-array value in the form of hash
178
+ # For object, use to_hash. Otherwise, just return the value
179
+ # @param [Object] value Any valid value
180
+ # @return [Hash] Returns the value in the form of hash
181
+ def _to_hash(value)
182
+ if value.is_a?(Array)
183
+ value.compact.map { |v| _to_hash(v) }
184
+ elsif value.is_a?(Hash)
185
+ {}.tap do |hash|
186
+ value.each { |k, v| hash[k] = _to_hash(v) }
187
+ end
188
+ elsif value.respond_to? :to_hash
189
+ value.to_hash
190
+ else
191
+ value
192
+ end
193
+ end
194
+
195
+ end
196
+ end
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.14
11
11
  =end
12
12
 
13
13
  module CloudmersiveConvertApiClient
14
- VERSION = '2.2.6'
14
+ VERSION = '2.3.0'
15
15
  end
@@ -37,7 +37,10 @@ require 'cloudmersive-convert-api-client/models/clear_xlsx_cell_request'
37
37
  require 'cloudmersive-convert-api-client/models/clear_xlsx_cell_response'
38
38
  require 'cloudmersive-convert-api-client/models/clear_xlsx_row_request'
39
39
  require 'cloudmersive-convert-api-client/models/clear_xlsx_row_response'
40
+ require 'cloudmersive-convert-api-client/models/convert_document_batch_job_create_result'
41
+ require 'cloudmersive-convert-api-client/models/convert_document_job_status_result'
40
42
  require 'cloudmersive-convert-api-client/models/converted_jpg_page'
43
+ require 'cloudmersive-convert-api-client/models/converted_png_direct_page'
41
44
  require 'cloudmersive-convert-api-client/models/converted_png_page'
42
45
  require 'cloudmersive-convert-api-client/models/create_blank_docx_request'
43
46
  require 'cloudmersive-convert-api-client/models/create_blank_docx_response'
@@ -55,7 +58,9 @@ require 'cloudmersive-convert-api-client/models/delete_docx_table_row_response'
55
58
  require 'cloudmersive-convert-api-client/models/detect_line_endings_response'
56
59
  require 'cloudmersive-convert-api-client/models/disable_shared_workbook_request'
57
60
  require 'cloudmersive-convert-api-client/models/disable_shared_workbook_response'
61
+ require 'cloudmersive-convert-api-client/models/document_array_input'
58
62
  require 'cloudmersive-convert-api-client/models/document_editing_edit_session'
63
+ require 'cloudmersive-convert-api-client/models/document_item'
59
64
  require 'cloudmersive-convert-api-client/models/document_transform_edit_session'
60
65
  require 'cloudmersive-convert-api-client/models/document_validation_error'
61
66
  require 'cloudmersive-convert-api-client/models/document_validation_result'
@@ -98,6 +103,8 @@ require 'cloudmersive-convert-api-client/models/docx_text'
98
103
  require 'cloudmersive-convert-api-client/models/docx_to_jpg_result'
99
104
  require 'cloudmersive-convert-api-client/models/docx_to_png_result'
100
105
  require 'cloudmersive-convert-api-client/models/docx_top_level_comment'
106
+ require 'cloudmersive-convert-api-client/models/edit_pdf_batch_job_create_result'
107
+ require 'cloudmersive-convert-api-client/models/edit_pdf_job_status_result'
101
108
  require 'cloudmersive-convert-api-client/models/eml_attachment'
102
109
  require 'cloudmersive-convert-api-client/models/eml_to_html_result'
103
110
  require 'cloudmersive-convert-api-client/models/eml_to_jpg_result'
@@ -186,8 +193,11 @@ require 'cloudmersive-convert-api-client/models/insert_docx_tables_request'
186
193
  require 'cloudmersive-convert-api-client/models/insert_docx_tables_response'
187
194
  require 'cloudmersive-convert-api-client/models/insert_xlsx_worksheet_request'
188
195
  require 'cloudmersive-convert-api-client/models/insert_xlsx_worksheet_response'
196
+ require 'cloudmersive-convert-api-client/models/job_status_result'
189
197
  require 'cloudmersive-convert-api-client/models/keynote_to_jpg_result'
190
198
  require 'cloudmersive-convert-api-client/models/keynote_to_png_result'
199
+ require 'cloudmersive-convert-api-client/models/merge_batch_job_create_result'
200
+ require 'cloudmersive-convert-api-client/models/merge_job_status_result'
191
201
  require 'cloudmersive-convert-api-client/models/msg_attachment'
192
202
  require 'cloudmersive-convert-api-client/models/msg_to_html_result'
193
203
  require 'cloudmersive-convert-api-client/models/msg_to_jpg_result'
@@ -209,8 +219,13 @@ require 'cloudmersive-convert-api-client/models/pdf_metadata'
209
219
  require 'cloudmersive-convert-api-client/models/pdf_page_text'
210
220
  require 'cloudmersive-convert-api-client/models/pdf_text_by_page_result'
211
221
  require 'cloudmersive-convert-api-client/models/pdf_to_jpg_result'
222
+ require 'cloudmersive-convert-api-client/models/pdf_to_png_direct_result'
212
223
  require 'cloudmersive-convert-api-client/models/pdf_to_png_result'
224
+ require 'cloudmersive-convert-api-client/models/pptx_page_layout_information'
225
+ require 'cloudmersive-convert-api-client/models/pptx_split_advanced_request'
226
+ require 'cloudmersive-convert-api-client/models/pptx_split_advanced_response'
213
227
  require 'cloudmersive-convert-api-client/models/pptx_to_png_result'
228
+ require 'cloudmersive-convert-api-client/models/presentation_advanced_result'
214
229
  require 'cloudmersive-convert-api-client/models/presentation_result'
215
230
  require 'cloudmersive-convert-api-client/models/remove_docx_headers_and_footers_request'
216
231
  require 'cloudmersive-convert-api-client/models/remove_docx_headers_and_footers_response'
@@ -241,6 +256,7 @@ require 'cloudmersive-convert-api-client/models/set_xlsx_cell_by_identifier_resp
241
256
  require 'cloudmersive-convert-api-client/models/set_xlsx_cell_request'
242
257
  require 'cloudmersive-convert-api-client/models/set_xlsx_cell_response'
243
258
  require 'cloudmersive-convert-api-client/models/single_replace_string'
259
+ require 'cloudmersive-convert-api-client/models/split_batch_job_create_result'
244
260
  require 'cloudmersive-convert-api-client/models/split_document_result'
245
261
  require 'cloudmersive-convert-api-client/models/split_docx_document_result'
246
262
  require 'cloudmersive-convert-api-client/models/split_pdf_result'
@@ -38,6 +38,7 @@ describe 'CompareDocumentApi' do
38
38
  # @param input_file1 First input file to perform the operation on.
39
39
  # @param input_file2 Second input file to perform the operation on (more than 2 can be supplied).
40
40
  # @param [Hash] opts the optional parameters
41
+ # @option opts [BOOLEAN] :autorepair Optional; automatically repair input documents that have errors (default is true)
41
42
  # @return [String]
42
43
  describe 'compare_document_docx test' do
43
44
  it 'should work' do