cloudmersive-convert-api-client 1.5.8 → 1.5.9

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 (37) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -4
  3. data/docs/AddPdfAnnotationRequest.md +9 -0
  4. data/docs/EditDocumentApi.md +56 -1
  5. data/docs/EditPdfApi.md +345 -0
  6. data/docs/GetPdfAnnotationsResult.md +9 -0
  7. data/docs/PdfAnnotation.md +19 -0
  8. data/docs/PresentationResult.md +10 -0
  9. data/docs/RemovePptxSlidesRequest.md +11 -0
  10. data/docs/SetPdfMetadataRequest.md +2 -2
  11. data/docs/SplitDocumentApi.md +65 -2
  12. data/docs/SplitPptxPresentationResult.md +9 -0
  13. data/docs/WorksheetResult.md +1 -0
  14. data/lib/cloudmersive-convert-api-client.rb +6 -0
  15. data/lib/cloudmersive-convert-api-client/api/edit_document_api.rb +57 -2
  16. data/lib/cloudmersive-convert-api-client/api/edit_pdf_api.rb +370 -0
  17. data/lib/cloudmersive-convert-api-client/api/split_document_api.rb +62 -0
  18. data/lib/cloudmersive-convert-api-client/models/add_pdf_annotation_request.rb +217 -0
  19. data/lib/cloudmersive-convert-api-client/models/get_pdf_annotations_result.rb +201 -0
  20. data/lib/cloudmersive-convert-api-client/models/pdf_annotation.rb +299 -0
  21. data/lib/cloudmersive-convert-api-client/models/presentation_result.rb +225 -0
  22. data/lib/cloudmersive-convert-api-client/models/remove_pptx_slides_request.rb +235 -0
  23. data/lib/cloudmersive-convert-api-client/models/set_pdf_metadata_request.rb +3 -1
  24. data/lib/cloudmersive-convert-api-client/models/split_pptx_presentation_result.rb +200 -0
  25. data/lib/cloudmersive-convert-api-client/models/worksheet_result.rb +30 -4
  26. data/lib/cloudmersive-convert-api-client/version.rb +1 -1
  27. data/spec/api/edit_document_api_spec.rb +13 -1
  28. data/spec/api/edit_pdf_api_spec.rb +77 -0
  29. data/spec/api/split_document_api_spec.rb +14 -0
  30. data/spec/models/add_pdf_annotation_request_spec.rb +48 -0
  31. data/spec/models/get_pdf_annotations_result_spec.rb +48 -0
  32. data/spec/models/pdf_annotation_spec.rb +108 -0
  33. data/spec/models/presentation_result_spec.rb +54 -0
  34. data/spec/models/remove_pptx_slides_request_spec.rb +60 -0
  35. data/spec/models/split_pptx_presentation_result_spec.rb +48 -0
  36. data/spec/models/worksheet_result_spec.rb +6 -0
  37. metadata +20 -2
@@ -24,13 +24,17 @@ module CloudmersiveConvertApiClient
24
24
  # URL to the XLSX file of this worksheet; file is stored in an in-memory cache and will be deleted
25
25
  attr_accessor :url
26
26
 
27
+ # Contents of the worksheet in bytes
28
+ attr_accessor :worksheet_contents
29
+
27
30
 
28
31
  # Attribute mapping from ruby-style variable name to JSON key.
29
32
  def self.attribute_map
30
33
  {
31
34
  :'worksheet_number' => :'WorksheetNumber',
32
35
  :'worksheet_name' => :'WorksheetName',
33
- :'url' => :'URL'
36
+ :'url' => :'URL',
37
+ :'worksheet_contents' => :'WorksheetContents'
34
38
  }
35
39
  end
36
40
 
@@ -39,7 +43,8 @@ module CloudmersiveConvertApiClient
39
43
  {
40
44
  :'worksheet_number' => :'Integer',
41
45
  :'worksheet_name' => :'String',
42
- :'url' => :'String'
46
+ :'url' => :'String',
47
+ :'worksheet_contents' => :'String'
43
48
  }
44
49
  end
45
50
 
@@ -63,21 +68,41 @@ module CloudmersiveConvertApiClient
63
68
  self.url = attributes[:'URL']
64
69
  end
65
70
 
71
+ if attributes.has_key?(:'WorksheetContents')
72
+ self.worksheet_contents = attributes[:'WorksheetContents']
73
+ end
74
+
66
75
  end
67
76
 
68
77
  # Show invalid properties with the reasons. Usually used together with valid?
69
78
  # @return Array for valid properties with the reasons
70
79
  def list_invalid_properties
71
80
  invalid_properties = Array.new
81
+ if !@worksheet_contents.nil? && @worksheet_contents !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
82
+ invalid_properties.push("invalid value for 'worksheet_contents', must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.")
83
+ end
84
+
72
85
  return invalid_properties
73
86
  end
74
87
 
75
88
  # Check to see if the all the properties in the model are valid
76
89
  # @return true if the model is valid
77
90
  def valid?
91
+ return false if !@worksheet_contents.nil? && @worksheet_contents !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
78
92
  return true
79
93
  end
80
94
 
95
+ # Custom attribute writer method with validation
96
+ # @param [Object] worksheet_contents Value to be assigned
97
+ def worksheet_contents=(worksheet_contents)
98
+
99
+ if !worksheet_contents.nil? && worksheet_contents !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
100
+ fail ArgumentError, "invalid value for 'worksheet_contents', must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/."
101
+ end
102
+
103
+ @worksheet_contents = worksheet_contents
104
+ end
105
+
81
106
  # Checks equality by comparing each attribute.
82
107
  # @param [Object] Object to be compared
83
108
  def ==(o)
@@ -85,7 +110,8 @@ module CloudmersiveConvertApiClient
85
110
  self.class == o.class &&
86
111
  worksheet_number == o.worksheet_number &&
87
112
  worksheet_name == o.worksheet_name &&
88
- url == o.url
113
+ url == o.url &&
114
+ worksheet_contents == o.worksheet_contents
89
115
  end
90
116
 
91
117
  # @see the `==` method
@@ -97,7 +123,7 @@ module CloudmersiveConvertApiClient
97
123
  # Calculates hash code according to all attributes.
98
124
  # @return [Fixnum] Hash code
99
125
  def hash
100
- [worksheet_number, worksheet_name, url].hash
126
+ [worksheet_number, worksheet_name, url, worksheet_contents].hash
101
127
  end
102
128
 
103
129
  # Builds the object from hash
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.3.1
11
11
  =end
12
12
 
13
13
  module CloudmersiveConvertApiClient
14
- VERSION = "1.5.8"
14
+ VERSION = "1.5.9"
15
15
  end
@@ -70,7 +70,7 @@ describe 'EditDocumentApi' do
70
70
 
71
71
  # unit tests for edit_document_docx_delete_pages
72
72
  # Delete, remove pages from a Word DOCX document
73
- # Returns the pages and contents of each page defined in the Word Document (DOCX) format file
73
+ # Returns the edited Word Document in the Word Document (DOCX) format file with the specified pages removed
74
74
  # @param req_config Document input request
75
75
  # @param [Hash] opts the optional parameters
76
76
  # @return [String]
@@ -344,6 +344,18 @@ describe 'EditDocumentApi' do
344
344
  end
345
345
  end
346
346
 
347
+ # unit tests for edit_document_pptx_delete_slides
348
+ # Delete, remove slides from a PowerPoint PPTX presentation document
349
+ # Edits the input PowerPoint PPTX presentation document to remove the specified slides
350
+ # @param req_config Presentation input request
351
+ # @param [Hash] opts the optional parameters
352
+ # @return [String]
353
+ describe 'edit_document_pptx_delete_slides test' do
354
+ it "should work" do
355
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
356
+ end
357
+ end
358
+
347
359
  # unit tests for edit_document_pptx_replace
348
360
  # Replace string in PowerPoint PPTX presentation
349
361
  # Replace all instances of a string in an Office PowerPoint Document (pptx)
@@ -32,6 +32,18 @@ describe 'EditPdfApi' do
32
32
  end
33
33
  end
34
34
 
35
+ # unit tests for edit_pdf_add_annotations
36
+ # Add one or more PDF annotations, comments in the PDF document
37
+ # Adds one or more annotations, comments to a PDF document.
38
+ # @param request
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [String]
41
+ describe 'edit_pdf_add_annotations test' 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
+
35
47
  # unit tests for edit_pdf_decrypt
36
48
  # Decrypt and password-protect a PDF
37
49
  # Decrypt a PDF document with a password. Decrypted PDF will no longer require a password to open.
@@ -74,6 +86,18 @@ describe 'EditPdfApi' do
74
86
  end
75
87
  end
76
88
 
89
+ # unit tests for edit_pdf_get_annotations
90
+ # Get PDF annotations, including comments in the document
91
+ # Enumerates the annotations, including comments and notes, in a PDF document.
92
+ # @param input_file Input file to perform the operation on.
93
+ # @param [Hash] opts the optional parameters
94
+ # @return [GetPdfAnnotationsResult]
95
+ describe 'edit_pdf_get_annotations test' do
96
+ it "should work" do
97
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
98
+ end
99
+ end
100
+
77
101
  # unit tests for edit_pdf_get_form_fields
78
102
  # Gets PDF Form fields and values
79
103
  # Encrypt a PDF document with a password. Set an owner password to control owner (editor/creator) permissions, and set a user (reader) password to control the viewer of the PDF. Set the password fields null to omit the given password.
@@ -138,6 +162,59 @@ describe 'EditPdfApi' do
138
162
  end
139
163
  end
140
164
 
165
+ # unit tests for edit_pdf_remove_all_annotations
166
+ # Remove all PDF annotations, including comments in the document
167
+ # Removes all of the annotations, including comments and notes, in a PDF document.
168
+ # @param input_file Input file to perform the operation on.
169
+ # @param [Hash] opts the optional parameters
170
+ # @return [String]
171
+ describe 'edit_pdf_remove_all_annotations test' do
172
+ it "should work" do
173
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
174
+ end
175
+ end
176
+
177
+ # unit tests for edit_pdf_remove_annotation_item
178
+ # Remove a specific PDF annotation, comment in the document
179
+ # Removes a specific annotation in a PDF document, using the AnnotationIndex. To enumerate AnnotationIndex for all of the annotations in the PDF document, use the /edit/pdf/annotations/list API.
180
+ # @param input_file Input file to perform the operation on.
181
+ # @param annotation_index The 0-based index of the annotation in the document
182
+ # @param [Hash] opts the optional parameters
183
+ # @return [String]
184
+ describe 'edit_pdf_remove_annotation_item test' do
185
+ it "should work" do
186
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
187
+ end
188
+ end
189
+
190
+ # unit tests for edit_pdf_rotate_all_pages
191
+ # Rotate all pages in a PDF document
192
+ # Rotate all of the pages in a PDF document by a multiple of 90 degrees
193
+ # @param input_file Input file to perform the operation on.
194
+ # @param rotation_angle The angle to rotate the page in degrees, must be a multiple of 90 degrees, e.g. 90, 180, 270, or -90, -180, -270, etc.
195
+ # @param [Hash] opts the optional parameters
196
+ # @return [String]
197
+ describe 'edit_pdf_rotate_all_pages test' do
198
+ it "should work" do
199
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
200
+ end
201
+ end
202
+
203
+ # unit tests for edit_pdf_rotate_page_range
204
+ # Rotate a range, subset of pages in a PDF document
205
+ # Rotate a range of specific pages in a PDF document by a multiple of 90 degrees
206
+ # @param input_file Input file to perform the operation on.
207
+ # @param rotation_angle The angle to rotate the page in degrees, must be a multiple of 90 degrees, e.g. 90, 180, 270, or -90, -180, -270, etc.
208
+ # @param page_start Page number (1 based) to start rotating pages from (inclusive).
209
+ # @param page_end Page number (1 based) to stop rotating pages from (inclusive).
210
+ # @param [Hash] opts the optional parameters
211
+ # @return [String]
212
+ describe 'edit_pdf_rotate_page_range test' do
213
+ it "should work" do
214
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
215
+ end
216
+ end
217
+
141
218
  # unit tests for edit_pdf_set_form_fields
142
219
  # Sets ands fills PDF Form field values
143
220
  # Fill in the form fields in a PDF form with specific values. Use form/get-fields to enumerate the available fields and their data types in an input form.
@@ -45,11 +45,25 @@ describe 'SplitDocumentApi' do
45
45
  end
46
46
  end
47
47
 
48
+ # unit tests for split_document_pptx
49
+ # Split a single PowerPoint Presentation PPTX into Separate Slides
50
+ # Split an PowerPoint PPTX Presentation, comprised of multiple slides into separate PowerPoint PPTX presentation files, with each containing exactly one slide.
51
+ # @param input_file Input file to perform the operation on.
52
+ # @param [Hash] opts the optional parameters
53
+ # @option opts [BOOLEAN] :return_document_contents Set to true to return the contents of each Worksheet directly, set to false to only return URLs to each resulting worksheet. Default is true.
54
+ # @return [SplitPptxPresentationResult]
55
+ describe 'split_document_pptx test' do
56
+ it "should work" do
57
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
58
+ end
59
+ end
60
+
48
61
  # unit tests for split_document_xlsx
49
62
  # Split a single Excel XLSX into Separate Worksheets
50
63
  # Split an Excel XLSX Spreadsheet, comprised of multiple Worksheets (or Tabs) into separate Excel XLSX spreadsheet files, with each containing exactly one Worksheet.
51
64
  # @param input_file Input file to perform the operation on.
52
65
  # @param [Hash] opts the optional parameters
66
+ # @option opts [BOOLEAN] :return_document_contents Set to true to return the contents of each Worksheet directly, set to false to only return URLs to each resulting worksheet. Default is true.
53
67
  # @return [SplitXlsxWorksheetResult]
54
68
  describe 'split_document_xlsx test' do
55
69
  it "should work" do
@@ -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::AddPdfAnnotationRequest
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'AddPdfAnnotationRequest' do
21
+ before do
22
+ # run before each test
23
+ @instance = CloudmersiveConvertApiClient::AddPdfAnnotationRequest.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of AddPdfAnnotationRequest' do
31
+ it 'should create an instance of AddPdfAnnotationRequest' do
32
+ expect(@instance).to be_instance_of(CloudmersiveConvertApiClient::AddPdfAnnotationRequest)
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 "annotations_to_add"' 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
+
@@ -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::GetPdfAnnotationsResult
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'GetPdfAnnotationsResult' do
21
+ before do
22
+ # run before each test
23
+ @instance = CloudmersiveConvertApiClient::GetPdfAnnotationsResult.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of GetPdfAnnotationsResult' do
31
+ it 'should create an instance of GetPdfAnnotationsResult' do
32
+ expect(@instance).to be_instance_of(CloudmersiveConvertApiClient::GetPdfAnnotationsResult)
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 "annotations"' 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
+
@@ -0,0 +1,108 @@
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::PdfAnnotation
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'PdfAnnotation' do
21
+ before do
22
+ # run before each test
23
+ @instance = CloudmersiveConvertApiClient::PdfAnnotation.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of PdfAnnotation' do
31
+ it 'should create an instance of PdfAnnotation' do
32
+ expect(@instance).to be_instance_of(CloudmersiveConvertApiClient::PdfAnnotation)
33
+ end
34
+ end
35
+ describe 'test attribute "title"' 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 "annotation_type"' 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 "page_number"' 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 "annotation_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 "subject"' 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
+ describe 'test attribute "text_contents"' do
66
+ it 'should work' do
67
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
68
+ end
69
+ end
70
+
71
+ describe 'test attribute "creation_date"' do
72
+ it 'should work' do
73
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
74
+ end
75
+ end
76
+
77
+ describe 'test attribute "modified_date"' 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 "left_x"' 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
+
89
+ describe 'test attribute "top_y"' do
90
+ it 'should work' do
91
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
92
+ end
93
+ end
94
+
95
+ describe 'test attribute "width"' do
96
+ it 'should work' do
97
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
98
+ end
99
+ end
100
+
101
+ describe 'test attribute "height"' do
102
+ it 'should work' do
103
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
104
+ end
105
+ end
106
+
107
+ end
108
+