cloudmersive-convert-api-client 2.2.1 → 2.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aca03b0a392d0630380546ff0bd26723a2e7e194f53d0422494cef35a8419010
4
- data.tar.gz: 6b61c4210bc45ce5ed9b0271ebb16ddbcdb21543c696a95c13a31aa239200833
3
+ metadata.gz: 2d210214a3f253a594bc803767092acf71aae425d7024c6a896f7f6dbf4a0ed8
4
+ data.tar.gz: f7ec216cd18558660e9c20acb0eeec9e8cd2d651e9756e7c8e5bfaf35ee84817
5
5
  SHA512:
6
- metadata.gz: fd75154a4a59b3d7b0c73f3028df7bc1cbc06578c6218af16816457358e2426d87cba86579885d56459a7fe9a326b5c44a61de9518b5b70ab70aa95e0912b8ab
7
- data.tar.gz: a51879f112974e63d6118dd43e484aecdbd9e7776642839c08fd9a016f48bac72a622035e7e490981bd4024d57c991a6d00b46043a6839a00825d81d37fdd88e
6
+ metadata.gz: b31cbaaa49b829afdd8981c7c09e7335d44ab103bac8af01ef82c57892ce137e1b94b5cbdbbd0067ed99a15fabf5a0f0859dd651733dc8a3d73675c558312fa3
7
+ data.tar.gz: 31e545ead88a6c6862f1abe4232df95413ac4fe69c075a57739b3f85c0ff51a5ff1f1e3d79a075ac5d999a40b4a380cec91bdaacdc21af5bcf150b1a0b4c0d0a
data/README.md CHANGED
@@ -7,7 +7,7 @@ Convert API lets you effortlessly convert file formats and types.
7
7
  This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
8
 
9
9
  - API version: v1
10
- - Package version: 2.2.1
10
+ - Package version: 2.2.2
11
11
  - Build package: io.swagger.codegen.languages.RubyClientCodegen
12
12
 
13
13
  ## Installation
@@ -23,15 +23,15 @@ gem build cloudmersive-convert-api-client.gemspec
23
23
  Then either install the gem locally:
24
24
 
25
25
  ```shell
26
- gem install ./cloudmersive-convert-api-client-2.2.1.gem
26
+ gem install ./cloudmersive-convert-api-client-2.2.2.gem
27
27
  ```
28
- (for development, run `gem install --dev ./cloudmersive-convert-api-client-2.2.1.gem` to install the development dependencies)
28
+ (for development, run `gem install --dev ./cloudmersive-convert-api-client-2.2.2.gem` to install the development dependencies)
29
29
 
30
30
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
31
31
 
32
32
  Finally add this to the Gemfile:
33
33
 
34
- gem 'cloudmersive-convert-api-client', '~> 2.2.1'
34
+ gem 'cloudmersive-convert-api-client', '~> 2.2.2'
35
35
 
36
36
  ### Install from Git
37
37
 
@@ -227,7 +227,8 @@ Class | Method | HTTP request | Description
227
227
  *CloudmersiveConvertApiClient::EditDocumentApi* | [**edit_document_docx_remove_headers_and_footers**](docs/EditDocumentApi.md#edit_document_docx_remove_headers_and_footers) | **POST** /convert/edit/docx/remove-headers-and-footers | Remove headers and footers from Word DOCX document
228
228
  *CloudmersiveConvertApiClient::EditDocumentApi* | [**edit_document_docx_remove_object**](docs/EditDocumentApi.md#edit_document_docx_remove_object) | **POST** /convert/edit/docx/remove-object | Delete any object in a Word DOCX document
229
229
  *CloudmersiveConvertApiClient::EditDocumentApi* | [**edit_document_docx_replace**](docs/EditDocumentApi.md#edit_document_docx_replace) | **POST** /convert/edit/docx/replace-all | Replace string in Word DOCX document
230
- *CloudmersiveConvertApiClient::EditDocumentApi* | [**edit_document_docx_replace_multi**](docs/EditDocumentApi.md#edit_document_docx_replace_multi) | **POST** /convert/edit/docx/replace-all/multi | Replace multiple strings in Word DOCX document
230
+ *CloudmersiveConvertApiClient::EditDocumentApi* | [**edit_document_docx_replace_multi**](docs/EditDocumentApi.md#edit_document_docx_replace_multi) | **POST** /convert/edit/docx/replace-all/multi | Replace multiple strings in Word DOCX document, return result
231
+ *CloudmersiveConvertApiClient::EditDocumentApi* | [**edit_document_docx_replace_multi_edit_session**](docs/EditDocumentApi.md#edit_document_docx_replace_multi_edit_session) | **POST** /convert/edit/docx/replace-all/multi/edit-session | Replace multiple strings in Word DOCX document, return edit session
231
232
  *CloudmersiveConvertApiClient::EditDocumentApi* | [**edit_document_docx_replace_paragraph**](docs/EditDocumentApi.md#edit_document_docx_replace_paragraph) | **POST** /convert/edit/docx/replace/paragraph | Replace matching paragraphs in a Word DOCX document
232
233
  *CloudmersiveConvertApiClient::EditDocumentApi* | [**edit_document_docx_set_custom_metadata_properties**](docs/EditDocumentApi.md#edit_document_docx_set_custom_metadata_properties) | **POST** /convert/edit/docx/set-metadata/custom-property | Set custom property metadata properties in Word DOCX document
233
234
  *CloudmersiveConvertApiClient::EditDocumentApi* | [**edit_document_docx_set_footer**](docs/EditDocumentApi.md#edit_document_docx_set_footer) | **POST** /convert/edit/docx/set-footer | Set the footer in a Word DOCX document
@@ -328,9 +329,11 @@ Class | Method | HTTP request | Description
328
329
  *CloudmersiveConvertApiClient::SplitDocumentApi* | [**split_document_txt_by_line**](docs/SplitDocumentApi.md#split_document_txt_by_line) | **POST** /convert/split/txt/by-line | Split a single Text file (txt) into lines
329
330
  *CloudmersiveConvertApiClient::SplitDocumentApi* | [**split_document_txt_by_string**](docs/SplitDocumentApi.md#split_document_txt_by_string) | **POST** /convert/split/txt/by-string | Split a single Text file (txt) by a string delimiter
330
331
  *CloudmersiveConvertApiClient::SplitDocumentApi* | [**split_document_xlsx**](docs/SplitDocumentApi.md#split_document_xlsx) | **POST** /convert/split/xlsx | Split a single Excel XLSX into Separate Worksheets
331
- *CloudmersiveConvertApiClient::TransformDocumentApi* | [**transform_document_docx_replace**](docs/TransformDocumentApi.md#transform_document_docx_replace) | **POST** /convert/transform/docx/replace-all | Replace string in Word DOCX document
332
- *CloudmersiveConvertApiClient::TransformDocumentApi* | [**transform_document_docx_table_fill_in**](docs/TransformDocumentApi.md#transform_document_docx_table_fill_in) | **POST** /convert/transform/docx/table/fill/data | Fill in data in a table in a Word DOCX document
333
- *CloudmersiveConvertApiClient::TransformDocumentApi* | [**transform_document_pptx_replace**](docs/TransformDocumentApi.md#transform_document_pptx_replace) | **POST** /convert/transform/pptx/replace-all | Replace string in PowerPoint PPTX presentation
332
+ *CloudmersiveConvertApiClient::TransformDocumentApi* | [**transform_document_docx_replace**](docs/TransformDocumentApi.md#transform_document_docx_replace) | **POST** /convert/transform/docx/replace-all | Replace string in Word DOCX document, return result
333
+ *CloudmersiveConvertApiClient::TransformDocumentApi* | [**transform_document_docx_replace_edit_session**](docs/TransformDocumentApi.md#transform_document_docx_replace_edit_session) | **POST** /convert/transform/docx/replace-all/edit-session | Replace string in Word DOCX document, return edit session
334
+ *CloudmersiveConvertApiClient::TransformDocumentApi* | [**transform_document_docx_table_fill_in**](docs/TransformDocumentApi.md#transform_document_docx_table_fill_in) | **POST** /convert/transform/docx/table/fill/data | Fill in data in a table in a Word DOCX document, return result
335
+ *CloudmersiveConvertApiClient::TransformDocumentApi* | [**transform_document_docx_table_fill_in_edit_session**](docs/TransformDocumentApi.md#transform_document_docx_table_fill_in_edit_session) | **POST** /convert/transform/docx/table/fill/data/edit-session | Fill in data in a table in a Word DOCX document, return edit session
336
+ *CloudmersiveConvertApiClient::TransformDocumentApi* | [**transform_document_pptx_replace**](docs/TransformDocumentApi.md#transform_document_pptx_replace) | **POST** /convert/transform/pptx/replace-all | Replace string in PowerPoint PPTX presentation, return result
334
337
  *CloudmersiveConvertApiClient::ValidateDocumentApi* | [**validate_document_autodetect_validation**](docs/ValidateDocumentApi.md#validate_document_autodetect_validation) | **POST** /convert/validate/autodetect | Autodetect content type and validate
335
338
  *CloudmersiveConvertApiClient::ValidateDocumentApi* | [**validate_document_csv_validation**](docs/ValidateDocumentApi.md#validate_document_csv_validation) | **POST** /convert/validate/csv | Validate a CSV file document (CSV)
336
339
  *CloudmersiveConvertApiClient::ValidateDocumentApi* | [**validate_document_docx_validation**](docs/ValidateDocumentApi.md#validate_document_docx_validation) | **POST** /convert/validate/docx | Validate a Word document (DOCX)
@@ -403,6 +406,8 @@ Class | Method | HTTP request | Description
403
406
  - [CloudmersiveConvertApiClient::DetectLineEndingsResponse](docs/DetectLineEndingsResponse.md)
404
407
  - [CloudmersiveConvertApiClient::DisableSharedWorkbookRequest](docs/DisableSharedWorkbookRequest.md)
405
408
  - [CloudmersiveConvertApiClient::DisableSharedWorkbookResponse](docs/DisableSharedWorkbookResponse.md)
409
+ - [CloudmersiveConvertApiClient::DocumentEditingEditSession](docs/DocumentEditingEditSession.md)
410
+ - [CloudmersiveConvertApiClient::DocumentTransformEditSession](docs/DocumentTransformEditSession.md)
406
411
  - [CloudmersiveConvertApiClient::DocumentValidationError](docs/DocumentValidationError.md)
407
412
  - [CloudmersiveConvertApiClient::DocumentValidationResult](docs/DocumentValidationResult.md)
408
413
  - [CloudmersiveConvertApiClient::DocxBody](docs/DocxBody.md)
@@ -0,0 +1,9 @@
1
+ # CloudmersiveConvertApiClient::DocumentEditingEditSession
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **successful** | **BOOLEAN** | True if the operation was successful, false otherwise | [optional]
7
+ **edit_session_url** | **String** | Document editing session URL; in-memory temporary cache link with TTL (Time-to-Live expiration) of 30 minutes. To retrieve the document, use the Finish Editing API. | [optional]
8
+
9
+
@@ -0,0 +1,9 @@
1
+ # CloudmersiveConvertApiClient::DocumentTransformEditSession
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **successful** | **BOOLEAN** | True if the operation was successful, false otherwise | [optional]
7
+ **edit_session_url** | **String** | Document editing session URL; in-memory temporary cache link with TTL (Time-to-Live expiration) of 30 minutes. To retrieve the document, use the Finish Editing API. | [optional]
8
+
9
+
@@ -35,7 +35,8 @@ Method | HTTP request | Description
35
35
  [**edit_document_docx_remove_headers_and_footers**](EditDocumentApi.md#edit_document_docx_remove_headers_and_footers) | **POST** /convert/edit/docx/remove-headers-and-footers | Remove headers and footers from Word DOCX document
36
36
  [**edit_document_docx_remove_object**](EditDocumentApi.md#edit_document_docx_remove_object) | **POST** /convert/edit/docx/remove-object | Delete any object in a Word DOCX document
37
37
  [**edit_document_docx_replace**](EditDocumentApi.md#edit_document_docx_replace) | **POST** /convert/edit/docx/replace-all | Replace string in Word DOCX document
38
- [**edit_document_docx_replace_multi**](EditDocumentApi.md#edit_document_docx_replace_multi) | **POST** /convert/edit/docx/replace-all/multi | Replace multiple strings in Word DOCX document
38
+ [**edit_document_docx_replace_multi**](EditDocumentApi.md#edit_document_docx_replace_multi) | **POST** /convert/edit/docx/replace-all/multi | Replace multiple strings in Word DOCX document, return result
39
+ [**edit_document_docx_replace_multi_edit_session**](EditDocumentApi.md#edit_document_docx_replace_multi_edit_session) | **POST** /convert/edit/docx/replace-all/multi/edit-session | Replace multiple strings in Word DOCX document, return edit session
39
40
  [**edit_document_docx_replace_paragraph**](EditDocumentApi.md#edit_document_docx_replace_paragraph) | **POST** /convert/edit/docx/replace/paragraph | Replace matching paragraphs in a Word DOCX document
40
41
  [**edit_document_docx_set_custom_metadata_properties**](EditDocumentApi.md#edit_document_docx_set_custom_metadata_properties) | **POST** /convert/edit/docx/set-metadata/custom-property | Set custom property metadata properties in Word DOCX document
41
42
  [**edit_document_docx_set_footer**](EditDocumentApi.md#edit_document_docx_set_footer) | **POST** /convert/edit/docx/set-footer | Set the footer in a Word DOCX document
@@ -1747,7 +1748,7 @@ Name | Type | Description | Notes
1747
1748
  # **edit_document_docx_replace_multi**
1748
1749
  > String edit_document_docx_replace_multi(req_config)
1749
1750
 
1750
- Replace multiple strings in Word DOCX document
1751
+ Replace multiple strings in Word DOCX document, return result
1751
1752
 
1752
1753
  Replace all instances of multiple strings in an Office Word Document (docx)
1753
1754
 
@@ -1769,7 +1770,7 @@ req_config = CloudmersiveConvertApiClient::MultiReplaceStringRequest.new # Multi
1769
1770
 
1770
1771
 
1771
1772
  begin
1772
- #Replace multiple strings in Word DOCX document
1773
+ #Replace multiple strings in Word DOCX document, return result
1773
1774
  result = api_instance.edit_document_docx_replace_multi(req_config)
1774
1775
  p result
1775
1776
  rescue CloudmersiveConvertApiClient::ApiError => e
@@ -1798,6 +1799,60 @@ Name | Type | Description | Notes
1798
1799
 
1799
1800
 
1800
1801
 
1802
+ # **edit_document_docx_replace_multi_edit_session**
1803
+ > DocumentEditingEditSession edit_document_docx_replace_multi_edit_session(req_config)
1804
+
1805
+ Replace multiple strings in Word DOCX document, return edit session
1806
+
1807
+ Replace all instances of multiple strings in an Office Word Document (docx). Returns an edit session URL so that you can chain together multiple edit operations without having to send the entire document contents back and forth multiple times. Call the Finish Editing API to retrieve the final document once editing is complete.
1808
+
1809
+ ### Example
1810
+ ```ruby
1811
+ # load the gem
1812
+ require 'cloudmersive-convert-api-client'
1813
+ # setup authorization
1814
+ CloudmersiveConvertApiClient.configure do |config|
1815
+ # Configure API key authorization: Apikey
1816
+ config.api_key['Apikey'] = 'YOUR API KEY'
1817
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
1818
+ #config.api_key_prefix['Apikey'] = 'Bearer'
1819
+ end
1820
+
1821
+ api_instance = CloudmersiveConvertApiClient::EditDocumentApi.new
1822
+
1823
+ req_config = CloudmersiveConvertApiClient::MultiReplaceStringRequest.new # MultiReplaceStringRequest | Document string replacement configuration input
1824
+
1825
+
1826
+ begin
1827
+ #Replace multiple strings in Word DOCX document, return edit session
1828
+ result = api_instance.edit_document_docx_replace_multi_edit_session(req_config)
1829
+ p result
1830
+ rescue CloudmersiveConvertApiClient::ApiError => e
1831
+ puts "Exception when calling EditDocumentApi->edit_document_docx_replace_multi_edit_session: #{e}"
1832
+ end
1833
+ ```
1834
+
1835
+ ### Parameters
1836
+
1837
+ Name | Type | Description | Notes
1838
+ ------------- | ------------- | ------------- | -------------
1839
+ **req_config** | [**MultiReplaceStringRequest**](MultiReplaceStringRequest.md)| Document string replacement configuration input |
1840
+
1841
+ ### Return type
1842
+
1843
+ [**DocumentEditingEditSession**](DocumentEditingEditSession.md)
1844
+
1845
+ ### Authorization
1846
+
1847
+ [Apikey](../README.md#Apikey)
1848
+
1849
+ ### HTTP request headers
1850
+
1851
+ - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
1852
+ - **Accept**: application/json, text/json, application/xml, text/xml
1853
+
1854
+
1855
+
1801
1856
  # **edit_document_docx_replace_paragraph**
1802
1857
  > ReplaceDocxParagraphResponse edit_document_docx_replace_paragraph(req_config)
1803
1858
 
@@ -4,15 +4,17 @@ All URIs are relative to *https://api.cloudmersive.com*
4
4
 
5
5
  Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
7
- [**transform_document_docx_replace**](TransformDocumentApi.md#transform_document_docx_replace) | **POST** /convert/transform/docx/replace-all | Replace string in Word DOCX document
8
- [**transform_document_docx_table_fill_in**](TransformDocumentApi.md#transform_document_docx_table_fill_in) | **POST** /convert/transform/docx/table/fill/data | Fill in data in a table in a Word DOCX document
9
- [**transform_document_pptx_replace**](TransformDocumentApi.md#transform_document_pptx_replace) | **POST** /convert/transform/pptx/replace-all | Replace string in PowerPoint PPTX presentation
7
+ [**transform_document_docx_replace**](TransformDocumentApi.md#transform_document_docx_replace) | **POST** /convert/transform/docx/replace-all | Replace string in Word DOCX document, return result
8
+ [**transform_document_docx_replace_edit_session**](TransformDocumentApi.md#transform_document_docx_replace_edit_session) | **POST** /convert/transform/docx/replace-all/edit-session | Replace string in Word DOCX document, return edit session
9
+ [**transform_document_docx_table_fill_in**](TransformDocumentApi.md#transform_document_docx_table_fill_in) | **POST** /convert/transform/docx/table/fill/data | Fill in data in a table in a Word DOCX document, return result
10
+ [**transform_document_docx_table_fill_in_edit_session**](TransformDocumentApi.md#transform_document_docx_table_fill_in_edit_session) | **POST** /convert/transform/docx/table/fill/data/edit-session | Fill in data in a table in a Word DOCX document, return edit session
11
+ [**transform_document_pptx_replace**](TransformDocumentApi.md#transform_document_pptx_replace) | **POST** /convert/transform/pptx/replace-all | Replace string in PowerPoint PPTX presentation, return result
10
12
 
11
13
 
12
14
  # **transform_document_docx_replace**
13
15
  > String transform_document_docx_replace(match_string, replace_string, opts)
14
16
 
15
- Replace string in Word DOCX document
17
+ Replace string in Word DOCX document, return result
16
18
 
17
19
  Replace all instances of a string in an Office Word Document (docx)
18
20
 
@@ -41,7 +43,7 @@ opts = {
41
43
  }
42
44
 
43
45
  begin
44
- #Replace string in Word DOCX document
46
+ #Replace string in Word DOCX document, return result
45
47
  result = api_instance.transform_document_docx_replace(match_string, replace_string, opts)
46
48
  p result
47
49
  rescue CloudmersiveConvertApiClient::ApiError => e
@@ -74,10 +76,75 @@ Name | Type | Description | Notes
74
76
 
75
77
 
76
78
 
79
+ # **transform_document_docx_replace_edit_session**
80
+ > DocumentTransformEditSession transform_document_docx_replace_edit_session(match_string, replace_string, opts)
81
+
82
+ Replace string in Word DOCX document, return edit session
83
+
84
+ Replace all instances of a string in an Office Word Document (docx). Returns an edit session URL so that you can chain together multiple edit operations without having to send the entire document contents back and forth multiple times. Call the Finish Editing API to retrieve the final document once editing is complete.
85
+
86
+ ### Example
87
+ ```ruby
88
+ # load the gem
89
+ require 'cloudmersive-convert-api-client'
90
+ # setup authorization
91
+ CloudmersiveConvertApiClient.configure do |config|
92
+ # Configure API key authorization: Apikey
93
+ config.api_key['Apikey'] = 'YOUR API KEY'
94
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
95
+ #config.api_key_prefix['Apikey'] = 'Bearer'
96
+ end
97
+
98
+ api_instance = CloudmersiveConvertApiClient::TransformDocumentApi.new
99
+
100
+ match_string = 'match_string_example' # String | String to search for and match against, to be replaced
101
+
102
+ replace_string = 'replace_string_example' # String | String to replace the matched values with
103
+
104
+ opts = {
105
+ input_file: File.new('/path/to/file.txt'), # File | Optional: Input file to perform the operation on.
106
+ input_file_url: 'input_file_url_example', # String | Optional: URL of a file to operate on as input. This can be a public URL, or you can also use the begin-editing API (part of EditDocumentApi) to upload a document and pass in the secure URL result from that operation as the URL here (this URL is not public).
107
+ match_case: true # BOOLEAN | Optional: True if the case should be matched, false for case insensitive match. Default is false.
108
+ }
109
+
110
+ begin
111
+ #Replace string in Word DOCX document, return edit session
112
+ result = api_instance.transform_document_docx_replace_edit_session(match_string, replace_string, opts)
113
+ p result
114
+ rescue CloudmersiveConvertApiClient::ApiError => e
115
+ puts "Exception when calling TransformDocumentApi->transform_document_docx_replace_edit_session: #{e}"
116
+ end
117
+ ```
118
+
119
+ ### Parameters
120
+
121
+ Name | Type | Description | Notes
122
+ ------------- | ------------- | ------------- | -------------
123
+ **match_string** | **String**| String to search for and match against, to be replaced |
124
+ **replace_string** | **String**| String to replace the matched values with |
125
+ **input_file** | **File**| Optional: Input file to perform the operation on. | [optional]
126
+ **input_file_url** | **String**| Optional: URL of a file to operate on as input. This can be a public URL, or you can also use the begin-editing API (part of EditDocumentApi) to upload a document and pass in the secure URL result from that operation as the URL here (this URL is not public). | [optional]
127
+ **match_case** | **BOOLEAN**| Optional: True if the case should be matched, false for case insensitive match. Default is false. | [optional]
128
+
129
+ ### Return type
130
+
131
+ [**DocumentTransformEditSession**](DocumentTransformEditSession.md)
132
+
133
+ ### Authorization
134
+
135
+ [Apikey](../README.md#Apikey)
136
+
137
+ ### HTTP request headers
138
+
139
+ - **Content-Type**: Not defined
140
+ - **Accept**: application/json, text/json, application/xml, text/xml
141
+
142
+
143
+
77
144
  # **transform_document_docx_table_fill_in**
78
145
  > String transform_document_docx_table_fill_in(request)
79
146
 
80
- Fill in data in a table in a Word DOCX document
147
+ Fill in data in a table in a Word DOCX document, return result
81
148
 
82
149
  Replace placeholder rows ina table in an Office Word Document (docx) using one or more templates
83
150
 
@@ -99,7 +166,7 @@ request = CloudmersiveConvertApiClient::DocxTableTableFillRequest.new # DocxTabl
99
166
 
100
167
 
101
168
  begin
102
- #Fill in data in a table in a Word DOCX document
169
+ #Fill in data in a table in a Word DOCX document, return result
103
170
  result = api_instance.transform_document_docx_table_fill_in(request)
104
171
  p result
105
172
  rescue CloudmersiveConvertApiClient::ApiError => e
@@ -128,10 +195,64 @@ Name | Type | Description | Notes
128
195
 
129
196
 
130
197
 
198
+ # **transform_document_docx_table_fill_in_edit_session**
199
+ > DocumentTransformEditSession transform_document_docx_table_fill_in_edit_session(request)
200
+
201
+ Fill in data in a table in a Word DOCX document, return edit session
202
+
203
+ Replace placeholder rows ina table in an Office Word Document (docx) using one or more templates. Returns an edit session URL so that you can chain together multiple edit operations without having to send the entire document contents back and forth multiple times. Call the Finish Editing API to retrieve the final document once editing is complete.
204
+
205
+ ### Example
206
+ ```ruby
207
+ # load the gem
208
+ require 'cloudmersive-convert-api-client'
209
+ # setup authorization
210
+ CloudmersiveConvertApiClient.configure do |config|
211
+ # Configure API key authorization: Apikey
212
+ config.api_key['Apikey'] = 'YOUR API KEY'
213
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
214
+ #config.api_key_prefix['Apikey'] = 'Bearer'
215
+ end
216
+
217
+ api_instance = CloudmersiveConvertApiClient::TransformDocumentApi.new
218
+
219
+ request = CloudmersiveConvertApiClient::DocxTableTableFillRequest.new # DocxTableTableFillRequest |
220
+
221
+
222
+ begin
223
+ #Fill in data in a table in a Word DOCX document, return edit session
224
+ result = api_instance.transform_document_docx_table_fill_in_edit_session(request)
225
+ p result
226
+ rescue CloudmersiveConvertApiClient::ApiError => e
227
+ puts "Exception when calling TransformDocumentApi->transform_document_docx_table_fill_in_edit_session: #{e}"
228
+ end
229
+ ```
230
+
231
+ ### Parameters
232
+
233
+ Name | Type | Description | Notes
234
+ ------------- | ------------- | ------------- | -------------
235
+ **request** | [**DocxTableTableFillRequest**](DocxTableTableFillRequest.md)| |
236
+
237
+ ### Return type
238
+
239
+ [**DocumentTransformEditSession**](DocumentTransformEditSession.md)
240
+
241
+ ### Authorization
242
+
243
+ [Apikey](../README.md#Apikey)
244
+
245
+ ### HTTP request headers
246
+
247
+ - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
248
+ - **Accept**: application/json, text/json, application/xml, text/xml
249
+
250
+
251
+
131
252
  # **transform_document_pptx_replace**
132
253
  > String transform_document_pptx_replace(match_string, replace_string, opts)
133
254
 
134
- Replace string in PowerPoint PPTX presentation
255
+ Replace string in PowerPoint PPTX presentation, return result
135
256
 
136
257
  Replace all instances of a string in an Office PowerPoint Document (pptx)
137
258
 
@@ -160,7 +281,7 @@ opts = {
160
281
  }
161
282
 
162
283
  begin
163
- #Replace string in PowerPoint PPTX presentation
284
+ #Replace string in PowerPoint PPTX presentation, return result
164
285
  result = api_instance.transform_document_pptx_replace(match_string, replace_string, opts)
165
286
  p result
166
287
  rescue CloudmersiveConvertApiClient::ApiError => e
@@ -55,6 +55,8 @@ require 'cloudmersive-convert-api-client/models/delete_docx_table_row_response'
55
55
  require 'cloudmersive-convert-api-client/models/detect_line_endings_response'
56
56
  require 'cloudmersive-convert-api-client/models/disable_shared_workbook_request'
57
57
  require 'cloudmersive-convert-api-client/models/disable_shared_workbook_response'
58
+ require 'cloudmersive-convert-api-client/models/document_editing_edit_session'
59
+ require 'cloudmersive-convert-api-client/models/document_transform_edit_session'
58
60
  require 'cloudmersive-convert-api-client/models/document_validation_error'
59
61
  require 'cloudmersive-convert-api-client/models/document_validation_result'
60
62
  require 'cloudmersive-convert-api-client/models/docx_body'
@@ -1700,7 +1700,7 @@ module CloudmersiveConvertApiClient
1700
1700
  end
1701
1701
  return data, status_code, headers
1702
1702
  end
1703
- # Replace multiple strings in Word DOCX document
1703
+ # Replace multiple strings in Word DOCX document, return result
1704
1704
  # Replace all instances of multiple strings in an Office Word Document (docx)
1705
1705
  # @param req_config Document string replacement configuration input
1706
1706
  # @param [Hash] opts the optional parameters
@@ -1710,7 +1710,7 @@ module CloudmersiveConvertApiClient
1710
1710
  data
1711
1711
  end
1712
1712
 
1713
- # Replace multiple strings in Word DOCX document
1713
+ # Replace multiple strings in Word DOCX document, return result
1714
1714
  # Replace all instances of multiple strings in an Office Word Document (docx)
1715
1715
  # @param req_config Document string replacement configuration input
1716
1716
  # @param [Hash] opts the optional parameters
@@ -1754,6 +1754,60 @@ module CloudmersiveConvertApiClient
1754
1754
  end
1755
1755
  return data, status_code, headers
1756
1756
  end
1757
+ # Replace multiple strings in Word DOCX document, return edit session
1758
+ # Replace all instances of multiple strings in an Office Word Document (docx). Returns an edit session URL so that you can chain together multiple edit operations without having to send the entire document contents back and forth multiple times. Call the Finish Editing API to retrieve the final document once editing is complete.
1759
+ # @param req_config Document string replacement configuration input
1760
+ # @param [Hash] opts the optional parameters
1761
+ # @return [DocumentEditingEditSession]
1762
+ def edit_document_docx_replace_multi_edit_session(req_config, opts = {})
1763
+ data, _status_code, _headers = edit_document_docx_replace_multi_edit_session_with_http_info(req_config, opts)
1764
+ data
1765
+ end
1766
+
1767
+ # Replace multiple strings in Word DOCX document, return edit session
1768
+ # Replace all instances of multiple strings in an Office Word Document (docx). Returns an edit session URL so that you can chain together multiple edit operations without having to send the entire document contents back and forth multiple times. Call the Finish Editing API to retrieve the final document once editing is complete.
1769
+ # @param req_config Document string replacement configuration input
1770
+ # @param [Hash] opts the optional parameters
1771
+ # @return [Array<(DocumentEditingEditSession, Fixnum, Hash)>] DocumentEditingEditSession data, response status code and response headers
1772
+ def edit_document_docx_replace_multi_edit_session_with_http_info(req_config, opts = {})
1773
+ if @api_client.config.debugging
1774
+ @api_client.config.logger.debug 'Calling API: EditDocumentApi.edit_document_docx_replace_multi_edit_session ...'
1775
+ end
1776
+ # verify the required parameter 'req_config' is set
1777
+ if @api_client.config.client_side_validation && req_config.nil?
1778
+ fail ArgumentError, "Missing the required parameter 'req_config' when calling EditDocumentApi.edit_document_docx_replace_multi_edit_session"
1779
+ end
1780
+ # resource path
1781
+ local_var_path = '/convert/edit/docx/replace-all/multi/edit-session'
1782
+
1783
+ # query parameters
1784
+ query_params = {}
1785
+
1786
+ # header parameters
1787
+ header_params = {}
1788
+ # HTTP header 'Accept' (if needed)
1789
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
1790
+ # HTTP header 'Content-Type'
1791
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
1792
+
1793
+ # form parameters
1794
+ form_params = {}
1795
+
1796
+ # http body (model)
1797
+ post_body = @api_client.object_to_http_body(req_config)
1798
+ auth_names = ['Apikey']
1799
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1800
+ :header_params => header_params,
1801
+ :query_params => query_params,
1802
+ :form_params => form_params,
1803
+ :body => post_body,
1804
+ :auth_names => auth_names,
1805
+ :return_type => 'DocumentEditingEditSession')
1806
+ if @api_client.config.debugging
1807
+ @api_client.config.logger.debug "API called: EditDocumentApi#edit_document_docx_replace_multi_edit_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1808
+ end
1809
+ return data, status_code, headers
1810
+ end
1757
1811
  # Replace matching paragraphs in a Word DOCX document
1758
1812
  # Returns the edited Word Document (DOCX) format file with the matching paragraphs replaced as requested. Replace a paragraph with another object such as an image. Useful for performing templating operations.
1759
1813
  # @param req_config Document input request
@@ -19,7 +19,7 @@ module CloudmersiveConvertApiClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Replace string in Word DOCX document
22
+ # Replace string in Word DOCX document, return result
23
23
  # Replace all instances of a string in an Office Word Document (docx)
24
24
  # @param match_string String to search for and match against, to be replaced
25
25
  # @param replace_string String to replace the matched values with
@@ -33,7 +33,7 @@ module CloudmersiveConvertApiClient
33
33
  data
34
34
  end
35
35
 
36
- # Replace string in Word DOCX document
36
+ # Replace string in Word DOCX document, return result
37
37
  # Replace all instances of a string in an Office Word Document (docx)
38
38
  # @param match_string String to search for and match against, to be replaced
39
39
  # @param replace_string String to replace the matched values with
@@ -88,7 +88,76 @@ module CloudmersiveConvertApiClient
88
88
  end
89
89
  return data, status_code, headers
90
90
  end
91
- # Fill in data in a table in a Word DOCX document
91
+ # Replace string in Word DOCX document, return edit session
92
+ # Replace all instances of a string in an Office Word Document (docx). Returns an edit session URL so that you can chain together multiple edit operations without having to send the entire document contents back and forth multiple times. Call the Finish Editing API to retrieve the final document once editing is complete.
93
+ # @param match_string String to search for and match against, to be replaced
94
+ # @param replace_string String to replace the matched values with
95
+ # @param [Hash] opts the optional parameters
96
+ # @option opts [File] :input_file Optional: Input file to perform the operation on.
97
+ # @option opts [String] :input_file_url Optional: URL of a file to operate on as input. This can be a public URL, or you can also use the begin-editing API (part of EditDocumentApi) to upload a document and pass in the secure URL result from that operation as the URL here (this URL is not public).
98
+ # @option opts [BOOLEAN] :match_case Optional: True if the case should be matched, false for case insensitive match. Default is false.
99
+ # @return [DocumentTransformEditSession]
100
+ def transform_document_docx_replace_edit_session(match_string, replace_string, opts = {})
101
+ data, _status_code, _headers = transform_document_docx_replace_edit_session_with_http_info(match_string, replace_string, opts)
102
+ data
103
+ end
104
+
105
+ # Replace string in Word DOCX document, return edit session
106
+ # Replace all instances of a string in an Office Word Document (docx). Returns an edit session URL so that you can chain together multiple edit operations without having to send the entire document contents back and forth multiple times. Call the Finish Editing API to retrieve the final document once editing is complete.
107
+ # @param match_string String to search for and match against, to be replaced
108
+ # @param replace_string String to replace the matched values with
109
+ # @param [Hash] opts the optional parameters
110
+ # @option opts [File] :input_file Optional: Input file to perform the operation on.
111
+ # @option opts [String] :input_file_url Optional: URL of a file to operate on as input. This can be a public URL, or you can also use the begin-editing API (part of EditDocumentApi) to upload a document and pass in the secure URL result from that operation as the URL here (this URL is not public).
112
+ # @option opts [BOOLEAN] :match_case Optional: True if the case should be matched, false for case insensitive match. Default is false.
113
+ # @return [Array<(DocumentTransformEditSession, Fixnum, Hash)>] DocumentTransformEditSession data, response status code and response headers
114
+ def transform_document_docx_replace_edit_session_with_http_info(match_string, replace_string, opts = {})
115
+ if @api_client.config.debugging
116
+ @api_client.config.logger.debug 'Calling API: TransformDocumentApi.transform_document_docx_replace_edit_session ...'
117
+ end
118
+ # verify the required parameter 'match_string' is set
119
+ if @api_client.config.client_side_validation && match_string.nil?
120
+ fail ArgumentError, "Missing the required parameter 'match_string' when calling TransformDocumentApi.transform_document_docx_replace_edit_session"
121
+ end
122
+ # verify the required parameter 'replace_string' is set
123
+ if @api_client.config.client_side_validation && replace_string.nil?
124
+ fail ArgumentError, "Missing the required parameter 'replace_string' when calling TransformDocumentApi.transform_document_docx_replace_edit_session"
125
+ end
126
+ # resource path
127
+ local_var_path = '/convert/transform/docx/replace-all/edit-session'
128
+
129
+ # query parameters
130
+ query_params = {}
131
+
132
+ # header parameters
133
+ header_params = {}
134
+ # HTTP header 'Accept' (if needed)
135
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
136
+ header_params[:'matchString'] = match_string
137
+ header_params[:'replaceString'] = replace_string
138
+ header_params[:'inputFileUrl'] = opts[:'input_file_url'] if !opts[:'input_file_url'].nil?
139
+ header_params[:'matchCase'] = opts[:'match_case'] if !opts[:'match_case'].nil?
140
+
141
+ # form parameters
142
+ form_params = {}
143
+ form_params['inputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil?
144
+
145
+ # http body (model)
146
+ post_body = nil
147
+ auth_names = ['Apikey']
148
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
149
+ :header_params => header_params,
150
+ :query_params => query_params,
151
+ :form_params => form_params,
152
+ :body => post_body,
153
+ :auth_names => auth_names,
154
+ :return_type => 'DocumentTransformEditSession')
155
+ if @api_client.config.debugging
156
+ @api_client.config.logger.debug "API called: TransformDocumentApi#transform_document_docx_replace_edit_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
157
+ end
158
+ return data, status_code, headers
159
+ end
160
+ # Fill in data in a table in a Word DOCX document, return result
92
161
  # Replace placeholder rows ina table in an Office Word Document (docx) using one or more templates
93
162
  # @param request
94
163
  # @param [Hash] opts the optional parameters
@@ -98,7 +167,7 @@ module CloudmersiveConvertApiClient
98
167
  data
99
168
  end
100
169
 
101
- # Fill in data in a table in a Word DOCX document
170
+ # Fill in data in a table in a Word DOCX document, return result
102
171
  # Replace placeholder rows ina table in an Office Word Document (docx) using one or more templates
103
172
  # @param request
104
173
  # @param [Hash] opts the optional parameters
@@ -142,7 +211,61 @@ module CloudmersiveConvertApiClient
142
211
  end
143
212
  return data, status_code, headers
144
213
  end
145
- # Replace string in PowerPoint PPTX presentation
214
+ # Fill in data in a table in a Word DOCX document, return edit session
215
+ # Replace placeholder rows ina table in an Office Word Document (docx) using one or more templates. Returns an edit session URL so that you can chain together multiple edit operations without having to send the entire document contents back and forth multiple times. Call the Finish Editing API to retrieve the final document once editing is complete.
216
+ # @param request
217
+ # @param [Hash] opts the optional parameters
218
+ # @return [DocumentTransformEditSession]
219
+ def transform_document_docx_table_fill_in_edit_session(request, opts = {})
220
+ data, _status_code, _headers = transform_document_docx_table_fill_in_edit_session_with_http_info(request, opts)
221
+ data
222
+ end
223
+
224
+ # Fill in data in a table in a Word DOCX document, return edit session
225
+ # Replace placeholder rows ina table in an Office Word Document (docx) using one or more templates. Returns an edit session URL so that you can chain together multiple edit operations without having to send the entire document contents back and forth multiple times. Call the Finish Editing API to retrieve the final document once editing is complete.
226
+ # @param request
227
+ # @param [Hash] opts the optional parameters
228
+ # @return [Array<(DocumentTransformEditSession, Fixnum, Hash)>] DocumentTransformEditSession data, response status code and response headers
229
+ def transform_document_docx_table_fill_in_edit_session_with_http_info(request, opts = {})
230
+ if @api_client.config.debugging
231
+ @api_client.config.logger.debug 'Calling API: TransformDocumentApi.transform_document_docx_table_fill_in_edit_session ...'
232
+ end
233
+ # verify the required parameter 'request' is set
234
+ if @api_client.config.client_side_validation && request.nil?
235
+ fail ArgumentError, "Missing the required parameter 'request' when calling TransformDocumentApi.transform_document_docx_table_fill_in_edit_session"
236
+ end
237
+ # resource path
238
+ local_var_path = '/convert/transform/docx/table/fill/data/edit-session'
239
+
240
+ # query parameters
241
+ query_params = {}
242
+
243
+ # header parameters
244
+ header_params = {}
245
+ # HTTP header 'Accept' (if needed)
246
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
247
+ # HTTP header 'Content-Type'
248
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
249
+
250
+ # form parameters
251
+ form_params = {}
252
+
253
+ # http body (model)
254
+ post_body = @api_client.object_to_http_body(request)
255
+ auth_names = ['Apikey']
256
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
257
+ :header_params => header_params,
258
+ :query_params => query_params,
259
+ :form_params => form_params,
260
+ :body => post_body,
261
+ :auth_names => auth_names,
262
+ :return_type => 'DocumentTransformEditSession')
263
+ if @api_client.config.debugging
264
+ @api_client.config.logger.debug "API called: TransformDocumentApi#transform_document_docx_table_fill_in_edit_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
265
+ end
266
+ return data, status_code, headers
267
+ end
268
+ # Replace string in PowerPoint PPTX presentation, return result
146
269
  # Replace all instances of a string in an Office PowerPoint Document (pptx)
147
270
  # @param match_string String to search for and match against, to be replaced
148
271
  # @param replace_string String to replace the matched values with
@@ -156,7 +279,7 @@ module CloudmersiveConvertApiClient
156
279
  data
157
280
  end
158
281
 
159
- # Replace string in PowerPoint PPTX presentation
282
+ # Replace string in PowerPoint PPTX presentation, return result
160
283
  # Replace all instances of a string in an Office PowerPoint Document (pptx)
161
284
  # @param match_string String to search for and match against, to be replaced
162
285
  # @param replace_string String to replace the matched values with
@@ -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
+ # Active document editing session result. To retrieve the document, use the Finish Editing API.
17
+ class DocumentEditingEditSession
18
+ # True if the operation was successful, false otherwise
19
+ attr_accessor :successful
20
+
21
+ # Document editing session URL; in-memory temporary cache link with TTL (Time-to-Live expiration) of 30 minutes. To retrieve the document, use the Finish Editing API.
22
+ attr_accessor :edit_session_url
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'successful' => :'Successful',
28
+ :'edit_session_url' => :'EditSessionURL'
29
+ }
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.swagger_types
34
+ {
35
+ :'successful' => :'BOOLEAN',
36
+ :'edit_session_url' => :'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?(:'EditSessionURL')
53
+ self.edit_session_url = attributes[:'EditSessionURL']
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
+ edit_session_url == o.edit_session_url
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, edit_session_url].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
@@ -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
+ # Active document editing session result. To retrieve the document, use the Finish Editing API.
17
+ class DocumentTransformEditSession
18
+ # True if the operation was successful, false otherwise
19
+ attr_accessor :successful
20
+
21
+ # Document editing session URL; in-memory temporary cache link with TTL (Time-to-Live expiration) of 30 minutes. To retrieve the document, use the Finish Editing API.
22
+ attr_accessor :edit_session_url
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'successful' => :'Successful',
28
+ :'edit_session_url' => :'EditSessionURL'
29
+ }
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.swagger_types
34
+ {
35
+ :'successful' => :'BOOLEAN',
36
+ :'edit_session_url' => :'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?(:'EditSessionURL')
53
+ self.edit_session_url = attributes[:'EditSessionURL']
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
+ edit_session_url == o.edit_session_url
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, edit_session_url].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.1'
14
+ VERSION = '2.2.2'
15
15
  end
@@ -405,7 +405,7 @@ describe 'EditDocumentApi' do
405
405
  end
406
406
 
407
407
  # unit tests for edit_document_docx_replace_multi
408
- # Replace multiple strings in Word DOCX document
408
+ # Replace multiple strings in Word DOCX document, return result
409
409
  # Replace all instances of multiple strings in an Office Word Document (docx)
410
410
  # @param req_config Document string replacement configuration input
411
411
  # @param [Hash] opts the optional parameters
@@ -416,6 +416,18 @@ describe 'EditDocumentApi' do
416
416
  end
417
417
  end
418
418
 
419
+ # unit tests for edit_document_docx_replace_multi_edit_session
420
+ # Replace multiple strings in Word DOCX document, return edit session
421
+ # Replace all instances of multiple strings in an Office Word Document (docx). Returns an edit session URL so that you can chain together multiple edit operations without having to send the entire document contents back and forth multiple times. Call the Finish Editing API to retrieve the final document once editing is complete.
422
+ # @param req_config Document string replacement configuration input
423
+ # @param [Hash] opts the optional parameters
424
+ # @return [DocumentEditingEditSession]
425
+ describe 'edit_document_docx_replace_multi_edit_session test' do
426
+ it 'should work' do
427
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
428
+ end
429
+ end
430
+
419
431
  # unit tests for edit_document_docx_replace_paragraph
420
432
  # Replace matching paragraphs in a Word DOCX document
421
433
  # Returns the edited Word Document (DOCX) format file with the matching paragraphs replaced as requested. Replace a paragraph with another object such as an image. Useful for performing templating operations.
@@ -33,7 +33,7 @@ describe 'TransformDocumentApi' do
33
33
  end
34
34
 
35
35
  # unit tests for transform_document_docx_replace
36
- # Replace string in Word DOCX document
36
+ # Replace string in Word DOCX document, return result
37
37
  # Replace all instances of a string in an Office Word Document (docx)
38
38
  # @param match_string String to search for and match against, to be replaced
39
39
  # @param replace_string String to replace the matched values with
@@ -48,8 +48,24 @@ describe 'TransformDocumentApi' do
48
48
  end
49
49
  end
50
50
 
51
+ # unit tests for transform_document_docx_replace_edit_session
52
+ # Replace string in Word DOCX document, return edit session
53
+ # Replace all instances of a string in an Office Word Document (docx). Returns an edit session URL so that you can chain together multiple edit operations without having to send the entire document contents back and forth multiple times. Call the Finish Editing API to retrieve the final document once editing is complete.
54
+ # @param match_string String to search for and match against, to be replaced
55
+ # @param replace_string String to replace the matched values with
56
+ # @param [Hash] opts the optional parameters
57
+ # @option opts [File] :input_file Optional: Input file to perform the operation on.
58
+ # @option opts [String] :input_file_url Optional: URL of a file to operate on as input. This can be a public URL, or you can also use the begin-editing API (part of EditDocumentApi) to upload a document and pass in the secure URL result from that operation as the URL here (this URL is not public).
59
+ # @option opts [BOOLEAN] :match_case Optional: True if the case should be matched, false for case insensitive match. Default is false.
60
+ # @return [DocumentTransformEditSession]
61
+ describe 'transform_document_docx_replace_edit_session test' do
62
+ it 'should work' do
63
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
64
+ end
65
+ end
66
+
51
67
  # unit tests for transform_document_docx_table_fill_in
52
- # Fill in data in a table in a Word DOCX document
68
+ # Fill in data in a table in a Word DOCX document, return result
53
69
  # Replace placeholder rows ina table in an Office Word Document (docx) using one or more templates
54
70
  # @param request
55
71
  # @param [Hash] opts the optional parameters
@@ -60,8 +76,20 @@ describe 'TransformDocumentApi' do
60
76
  end
61
77
  end
62
78
 
79
+ # unit tests for transform_document_docx_table_fill_in_edit_session
80
+ # Fill in data in a table in a Word DOCX document, return edit session
81
+ # Replace placeholder rows ina table in an Office Word Document (docx) using one or more templates. Returns an edit session URL so that you can chain together multiple edit operations without having to send the entire document contents back and forth multiple times. Call the Finish Editing API to retrieve the final document once editing is complete.
82
+ # @param request
83
+ # @param [Hash] opts the optional parameters
84
+ # @return [DocumentTransformEditSession]
85
+ describe 'transform_document_docx_table_fill_in_edit_session test' do
86
+ it 'should work' do
87
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
88
+ end
89
+ end
90
+
63
91
  # unit tests for transform_document_pptx_replace
64
- # Replace string in PowerPoint PPTX presentation
92
+ # Replace string in PowerPoint PPTX presentation, return result
65
93
  # Replace all instances of a string in an Office PowerPoint Document (pptx)
66
94
  # @param match_string String to search for and match against, to be replaced
67
95
  # @param replace_string String to replace the matched values with
@@ -0,0 +1,47 @@
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 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for CloudmersiveConvertApiClient::DocumentEditingEditSession
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'DocumentEditingEditSession' do
21
+ before do
22
+ # run before each test
23
+ @instance = CloudmersiveConvertApiClient::DocumentEditingEditSession.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of DocumentEditingEditSession' do
31
+ it 'should create an instance of DocumentEditingEditSession' do
32
+ expect(@instance).to be_instance_of(CloudmersiveConvertApiClient::DocumentEditingEditSession)
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 "edit_session_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
+ end
@@ -0,0 +1,47 @@
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 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for CloudmersiveConvertApiClient::DocumentTransformEditSession
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'DocumentTransformEditSession' do
21
+ before do
22
+ # run before each test
23
+ @instance = CloudmersiveConvertApiClient::DocumentTransformEditSession.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of DocumentTransformEditSession' do
31
+ it 'should create an instance of DocumentTransformEditSession' do
32
+ expect(@instance).to be_instance_of(CloudmersiveConvertApiClient::DocumentTransformEditSession)
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 "edit_session_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
+ end
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: 2.2.1
4
+ version: 2.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cloudmersive
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-26 00:00:00.000000000 Z
11
+ date: 2021-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -246,6 +246,8 @@ files:
246
246
  - "./docs/DetectLineEndingsResponse.md"
247
247
  - "./docs/DisableSharedWorkbookRequest.md"
248
248
  - "./docs/DisableSharedWorkbookResponse.md"
249
+ - "./docs/DocumentEditingEditSession.md"
250
+ - "./docs/DocumentTransformEditSession.md"
249
251
  - "./docs/DocumentValidationError.md"
250
252
  - "./docs/DocumentValidationResult.md"
251
253
  - "./docs/DocxBody.md"
@@ -532,6 +534,8 @@ files:
532
534
  - "./lib/cloudmersive-convert-api-client/models/detect_line_endings_response.rb"
533
535
  - "./lib/cloudmersive-convert-api-client/models/disable_shared_workbook_request.rb"
534
536
  - "./lib/cloudmersive-convert-api-client/models/disable_shared_workbook_response.rb"
537
+ - "./lib/cloudmersive-convert-api-client/models/document_editing_edit_session.rb"
538
+ - "./lib/cloudmersive-convert-api-client/models/document_transform_edit_session.rb"
535
539
  - "./lib/cloudmersive-convert-api-client/models/document_validation_error.rb"
536
540
  - "./lib/cloudmersive-convert-api-client/models/document_validation_result.rb"
537
541
  - "./lib/cloudmersive-convert-api-client/models/docx_body.rb"
@@ -806,6 +810,8 @@ files:
806
810
  - "./spec/models/detect_line_endings_response_spec.rb"
807
811
  - "./spec/models/disable_shared_workbook_request_spec.rb"
808
812
  - "./spec/models/disable_shared_workbook_response_spec.rb"
813
+ - "./spec/models/document_editing_edit_session_spec.rb"
814
+ - "./spec/models/document_transform_edit_session_spec.rb"
809
815
  - "./spec/models/document_validation_error_spec.rb"
810
816
  - "./spec/models/document_validation_result_spec.rb"
811
817
  - "./spec/models/docx_body_spec.rb"