cloudmersive-convert-api-client 1.5.4 → 1.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -5
  3. data/docs/ConvertDataApi.md +59 -4
  4. data/docs/ConvertDocumentApi.md +55 -0
  5. data/docs/DocxInsertImageRequest.md +2 -0
  6. data/docs/EditDocumentApi.md +58 -3
  7. data/docs/GetXlsxCellRequest.md +12 -0
  8. data/docs/GetXlsxCellResponse.md +9 -0
  9. data/docs/GetXlsxColumnsResponse.md +1 -1
  10. data/docs/GetXlsxImagesResponse.md +1 -1
  11. data/docs/GetXlsxRowsAndCellsResponse.md +1 -1
  12. data/lib/cloudmersive-convert-api-client.rb +2 -0
  13. data/lib/cloudmersive-convert-api-client/api/convert_data_api.rb +59 -4
  14. data/lib/cloudmersive-convert-api-client/api/convert_document_api.rb +56 -0
  15. data/lib/cloudmersive-convert-api-client/api/edit_document_api.rb +57 -2
  16. data/lib/cloudmersive-convert-api-client/models/docx_insert_image_request.rb +24 -4
  17. data/lib/cloudmersive-convert-api-client/models/get_xlsx_cell_request.rb +245 -0
  18. data/lib/cloudmersive-convert-api-client/models/get_xlsx_cell_response.rb +199 -0
  19. data/lib/cloudmersive-convert-api-client/models/get_xlsx_columns_response.rb +1 -1
  20. data/lib/cloudmersive-convert-api-client/models/get_xlsx_images_response.rb +1 -1
  21. data/lib/cloudmersive-convert-api-client/models/get_xlsx_rows_and_cells_response.rb +1 -1
  22. data/lib/cloudmersive-convert-api-client/version.rb +1 -1
  23. data/spec/api/convert_data_api_spec.rb +12 -0
  24. data/spec/api/convert_document_api_spec.rb +12 -0
  25. data/spec/api/edit_document_api_spec.rb +13 -1
  26. data/spec/models/docx_insert_image_request_spec.rb +12 -0
  27. data/spec/models/get_xlsx_cell_request_spec.rb +66 -0
  28. data/spec/models/get_xlsx_cell_response_spec.rb +48 -0
  29. metadata +8 -2
@@ -0,0 +1,199 @@
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.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module CloudmersiveConvertApiClient
16
+ # Result of running a Get-Cell command
17
+ class GetXlsxCellResponse
18
+ # True if successful, false otherwise
19
+ attr_accessor :successful
20
+
21
+ # Requested Cell in the Excel XLSX document
22
+ attr_accessor :cell
23
+
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'successful' => :'Successful',
29
+ :'cell' => :'Cell'
30
+ }
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.swagger_types
35
+ {
36
+ :'successful' => :'BOOLEAN',
37
+ :'cell' => :'XlsxSpreadsheetCell'
38
+ }
39
+ end
40
+
41
+ # Initializes the object
42
+ # @param [Hash] attributes Model attributes in the form of hash
43
+ def initialize(attributes = {})
44
+ return unless attributes.is_a?(Hash)
45
+
46
+ # convert string to symbol for hash key
47
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
48
+
49
+ if attributes.has_key?(:'Successful')
50
+ self.successful = attributes[:'Successful']
51
+ end
52
+
53
+ if attributes.has_key?(:'Cell')
54
+ self.cell = attributes[:'Cell']
55
+ end
56
+
57
+ end
58
+
59
+ # Show invalid properties with the reasons. Usually used together with valid?
60
+ # @return Array for valid properties with the reasons
61
+ def list_invalid_properties
62
+ invalid_properties = Array.new
63
+ return invalid_properties
64
+ end
65
+
66
+ # Check to see if the all the properties in the model are valid
67
+ # @return true if the model is valid
68
+ def valid?
69
+ return true
70
+ end
71
+
72
+ # Checks equality by comparing each attribute.
73
+ # @param [Object] Object to be compared
74
+ def ==(o)
75
+ return true if self.equal?(o)
76
+ self.class == o.class &&
77
+ successful == o.successful &&
78
+ cell == o.cell
79
+ end
80
+
81
+ # @see the `==` method
82
+ # @param [Object] Object to be compared
83
+ def eql?(o)
84
+ self == o
85
+ end
86
+
87
+ # Calculates hash code according to all attributes.
88
+ # @return [Fixnum] Hash code
89
+ def hash
90
+ [successful, cell].hash
91
+ end
92
+
93
+ # Builds the object from hash
94
+ # @param [Hash] attributes Model attributes in the form of hash
95
+ # @return [Object] Returns the model itself
96
+ def build_from_hash(attributes)
97
+ return nil unless attributes.is_a?(Hash)
98
+ self.class.swagger_types.each_pair do |key, type|
99
+ if type =~ /\AArray<(.*)>/i
100
+ # check to ensure the input is an array given that the the attribute
101
+ # is documented as an array but the input is not
102
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
103
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
104
+ end
105
+ elsif !attributes[self.class.attribute_map[key]].nil?
106
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
107
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
108
+ end
109
+
110
+ self
111
+ end
112
+
113
+ # Deserializes the data based on type
114
+ # @param string type Data type
115
+ # @param string value Value to be deserialized
116
+ # @return [Object] Deserialized data
117
+ def _deserialize(type, value)
118
+ case type.to_sym
119
+ when :DateTime
120
+ DateTime.parse(value)
121
+ when :Date
122
+ Date.parse(value)
123
+ when :String
124
+ value.to_s
125
+ when :Integer
126
+ value.to_i
127
+ when :Float
128
+ value.to_f
129
+ when :BOOLEAN
130
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
131
+ true
132
+ else
133
+ false
134
+ end
135
+ when :Object
136
+ # generic object (usually a Hash), return directly
137
+ value
138
+ when /\AArray<(?<inner_type>.+)>\z/
139
+ inner_type = Regexp.last_match[:inner_type]
140
+ value.map { |v| _deserialize(inner_type, v) }
141
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
142
+ k_type = Regexp.last_match[:k_type]
143
+ v_type = Regexp.last_match[:v_type]
144
+ {}.tap do |hash|
145
+ value.each do |k, v|
146
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
147
+ end
148
+ end
149
+ else # model
150
+ temp_model = CloudmersiveConvertApiClient.const_get(type).new
151
+ temp_model.build_from_hash(value)
152
+ end
153
+ end
154
+
155
+ # Returns the string representation of the object
156
+ # @return [String] String presentation of the object
157
+ def to_s
158
+ to_hash.to_s
159
+ end
160
+
161
+ # to_body is an alias to to_hash (backward compatibility)
162
+ # @return [Hash] Returns the object in the form of hash
163
+ def to_body
164
+ to_hash
165
+ end
166
+
167
+ # Returns the object in the form of hash
168
+ # @return [Hash] Returns the object in the form of hash
169
+ def to_hash
170
+ hash = {}
171
+ self.class.attribute_map.each_pair do |attr, param|
172
+ value = self.send(attr)
173
+ next if value.nil?
174
+ hash[param] = _to_hash(value)
175
+ end
176
+ hash
177
+ end
178
+
179
+ # Outputs non-array value in the form of hash
180
+ # For object, use to_hash. Otherwise, just return the value
181
+ # @param [Object] value Any valid value
182
+ # @return [Hash] Returns the value in the form of hash
183
+ def _to_hash(value)
184
+ if value.is_a?(Array)
185
+ value.compact.map{ |v| _to_hash(v) }
186
+ elsif value.is_a?(Hash)
187
+ {}.tap do |hash|
188
+ value.each { |k, v| hash[k] = _to_hash(v) }
189
+ end
190
+ elsif value.respond_to? :to_hash
191
+ value.to_hash
192
+ else
193
+ value
194
+ end
195
+ end
196
+
197
+ end
198
+
199
+ end
@@ -18,7 +18,7 @@ module CloudmersiveConvertApiClient
18
18
  # True if successful, false otherwise
19
19
  attr_accessor :successful
20
20
 
21
- # Spreadsheet Columns in the DOCX document
21
+ # Spreadsheet Columns in the XLSX document
22
22
  attr_accessor :columns
23
23
 
24
24
 
@@ -18,7 +18,7 @@ module CloudmersiveConvertApiClient
18
18
  # True if successful, false otherwise
19
19
  attr_accessor :successful
20
20
 
21
- # Spreadsheet Columns in the DOCX document
21
+ # Spreadsheet Images in the XLSX document
22
22
  attr_accessor :images
23
23
 
24
24
 
@@ -18,7 +18,7 @@ module CloudmersiveConvertApiClient
18
18
  # True if successful, false otherwise
19
19
  attr_accessor :successful
20
20
 
21
- # Spreadsheet Rows in the DOCX document
21
+ # Spreadsheet Rows in the Excel XLSX document
22
22
  attr_accessor :rows
23
23
 
24
24
 
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.3.1
11
11
  =end
12
12
 
13
13
  module CloudmersiveConvertApiClient
14
- VERSION = "1.5.4"
14
+ VERSION = "1.5.5"
15
15
  end
@@ -44,6 +44,18 @@ describe 'ConvertDataApi' do
44
44
  end
45
45
  end
46
46
 
47
+ # unit tests for convert_data_json_to_xml
48
+ # Convert JSON to XML conversion
49
+ # Convert a JSON object into XML
50
+ # @param json_object
51
+ # @param [Hash] opts the optional parameters
52
+ # @return [Object]
53
+ describe 'convert_data_json_to_xml test' do
54
+ it "should work" do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
47
59
  # unit tests for convert_data_xls_to_json
48
60
  # Convert Excel (97-2003) XLS to JSON conversion
49
61
  # Convert an Excel (97-2003) XLS file to a JSON object array
@@ -176,6 +176,18 @@ describe 'ConvertDocumentApi' do
176
176
  end
177
177
  end
178
178
 
179
+ # unit tests for convert_document_pdf_to_docx_rasterize
180
+ # Convert PDF to Word DOCX Document based on rasterized version of the PDF
181
+ # Convert standard PDF to Office Word Documents (docx), but first rasterize the PDF. Converts a PDF at high fidelity into Word format.
182
+ # @param input_file Input file to perform the operation on.
183
+ # @param [Hash] opts the optional parameters
184
+ # @return [String]
185
+ describe 'convert_document_pdf_to_docx_rasterize test' do
186
+ it "should work" do
187
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
188
+ end
189
+ end
190
+
179
191
  # unit tests for convert_document_pdf_to_png_array
180
192
  # Convert PDF to PNG Image Array
181
193
  # Convert PDF document to PNG array, one image per page.
@@ -368,6 +368,18 @@ describe 'EditDocumentApi' do
368
368
  end
369
369
  end
370
370
 
371
+ # unit tests for edit_document_xlsx_get_cell_by_index
372
+ # Get cell from an Excel XLSX spreadsheet, worksheet by index
373
+ # Returns the rows and cells defined in the Excel Spreadsheet worksheet
374
+ # @param input Document input request
375
+ # @param [Hash] opts the optional parameters
376
+ # @return [GetXlsxCellResponse]
377
+ describe 'edit_document_xlsx_get_cell_by_index test' do
378
+ it "should work" do
379
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
380
+ end
381
+ end
382
+
371
383
  # unit tests for edit_document_xlsx_get_columns
372
384
  # Get rows and cells from a Excel XLSX spreadsheet, worksheet
373
385
  # Returns the rows and cells defined in the Excel Spreadsheet worksheet
@@ -393,7 +405,7 @@ describe 'EditDocumentApi' do
393
405
  end
394
406
 
395
407
  # unit tests for edit_document_xlsx_get_rows_and_cells
396
- # Get rows and cells from a Word XLSX spreadsheet, worksheet
408
+ # Get rows and cells from a Excel XLSX spreadsheet, worksheet
397
409
  # Returns the rows and cells defined in the Excel Spreadsheet worksheet
398
410
  # @param input Document input request
399
411
  # @param [Hash] opts the optional parameters
@@ -74,5 +74,17 @@ describe 'DocxInsertImageRequest' do
74
74
  end
75
75
  end
76
76
 
77
+ describe 'test attribute "width_in_em_us"' do
78
+ it 'should work' do
79
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
80
+ end
81
+ end
82
+
83
+ describe 'test attribute "height_in_em_us"' do
84
+ it 'should work' do
85
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
86
+ end
87
+ end
88
+
77
89
  end
78
90
 
@@ -0,0 +1,66 @@
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.3.1
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for CloudmersiveConvertApiClient::GetXlsxCellRequest
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'GetXlsxCellRequest' do
21
+ before do
22
+ # run before each test
23
+ @instance = CloudmersiveConvertApiClient::GetXlsxCellRequest.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of GetXlsxCellRequest' do
31
+ it 'should create an instance of GetXlsxCellRequest' do
32
+ expect(@instance).to be_instance_of(CloudmersiveConvertApiClient::GetXlsxCellRequest)
33
+ end
34
+ end
35
+ describe 'test attribute "input_file_bytes"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "input_file_url"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "worksheet_to_query"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
53
+ describe 'test attribute "row_index"' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
59
+ describe 'test attribute "cell_index"' do
60
+ it 'should work' do
61
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
62
+ end
63
+ end
64
+
65
+ end
66
+
@@ -0,0 +1,48 @@
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.3.1
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for CloudmersiveConvertApiClient::GetXlsxCellResponse
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'GetXlsxCellResponse' do
21
+ before do
22
+ # run before each test
23
+ @instance = CloudmersiveConvertApiClient::GetXlsxCellResponse.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of GetXlsxCellResponse' do
31
+ it 'should create an instance of GetXlsxCellResponse' do
32
+ expect(@instance).to be_instance_of(CloudmersiveConvertApiClient::GetXlsxCellResponse)
33
+ end
34
+ end
35
+ describe 'test attribute "successful"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "cell"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ end
48
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudmersive-convert-api-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.4
4
+ version: 1.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cloudmersive
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-15 00:00:00.000000000 Z
11
+ date: 2019-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -269,6 +269,8 @@ files:
269
269
  - "./docs/GetDocxTablesRequest.md"
270
270
  - "./docs/GetDocxTablesResponse.md"
271
271
  - "./docs/GetImageInfoResult.md"
272
+ - "./docs/GetXlsxCellRequest.md"
273
+ - "./docs/GetXlsxCellResponse.md"
272
274
  - "./docs/GetXlsxColumnsRequest.md"
273
275
  - "./docs/GetXlsxColumnsResponse.md"
274
276
  - "./docs/GetXlsxImagesRequest.md"
@@ -405,6 +407,8 @@ files:
405
407
  - "./lib/cloudmersive-convert-api-client/models/get_docx_tables_request.rb"
406
408
  - "./lib/cloudmersive-convert-api-client/models/get_docx_tables_response.rb"
407
409
  - "./lib/cloudmersive-convert-api-client/models/get_image_info_result.rb"
410
+ - "./lib/cloudmersive-convert-api-client/models/get_xlsx_cell_request.rb"
411
+ - "./lib/cloudmersive-convert-api-client/models/get_xlsx_cell_response.rb"
408
412
  - "./lib/cloudmersive-convert-api-client/models/get_xlsx_columns_request.rb"
409
413
  - "./lib/cloudmersive-convert-api-client/models/get_xlsx_columns_response.rb"
410
414
  - "./lib/cloudmersive-convert-api-client/models/get_xlsx_images_request.rb"
@@ -535,6 +539,8 @@ files:
535
539
  - "./spec/models/get_docx_tables_request_spec.rb"
536
540
  - "./spec/models/get_docx_tables_response_spec.rb"
537
541
  - "./spec/models/get_image_info_result_spec.rb"
542
+ - "./spec/models/get_xlsx_cell_request_spec.rb"
543
+ - "./spec/models/get_xlsx_cell_response_spec.rb"
538
544
  - "./spec/models/get_xlsx_columns_request_spec.rb"
539
545
  - "./spec/models/get_xlsx_columns_response_spec.rb"
540
546
  - "./spec/models/get_xlsx_images_request_spec.rb"