cloudmersive-convert-api-client 2.2.0 → 2.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +28 -7
  3. data/docs/DocumentEditingEditSession.md +9 -0
  4. data/docs/DocumentTransformEditSession.md +9 -0
  5. data/docs/DocxContentControl.md +8 -0
  6. data/docs/DocxSetFormFieldsRequest.md +10 -0
  7. data/docs/DocxTableSingleTableFill.md +10 -0
  8. data/docs/DocxTableTableFillMultiRequest.md +10 -0
  9. data/docs/DocxTableTableFillRequest.md +12 -0
  10. data/docs/DocxTableTableFillTableCell.md +9 -0
  11. data/docs/DocxTableTableFillTableRow.md +8 -0
  12. data/docs/EditDocumentApi.md +223 -3
  13. data/docs/FillHandlebarFormField.md +9 -0
  14. data/docs/GetDocxContentControlsResponse.md +9 -0
  15. data/docs/GetDocxGetFormFieldsResponse.md +10 -0
  16. data/docs/HandlebarFormField.md +8 -0
  17. data/docs/TransformDocumentApi.md +237 -6
  18. data/lib/cloudmersive-convert-api-client/api/edit_document_api.rb +220 -2
  19. data/lib/cloudmersive-convert-api-client/api/transform_document_api.rb +235 -4
  20. data/lib/cloudmersive-convert-api-client/models/document_editing_edit_session.rb +196 -0
  21. data/lib/cloudmersive-convert-api-client/models/document_transform_edit_session.rb +196 -0
  22. data/lib/cloudmersive-convert-api-client/models/docx_content_control.rb +186 -0
  23. data/lib/cloudmersive-convert-api-client/models/docx_set_form_fields_request.rb +223 -0
  24. data/lib/cloudmersive-convert-api-client/models/docx_table_single_table_fill.rb +208 -0
  25. data/lib/cloudmersive-convert-api-client/models/docx_table_table_fill_multi_request.rb +223 -0
  26. data/lib/cloudmersive-convert-api-client/models/docx_table_table_fill_request.rb +243 -0
  27. data/lib/cloudmersive-convert-api-client/models/docx_table_table_fill_table_cell.rb +196 -0
  28. data/lib/cloudmersive-convert-api-client/models/docx_table_table_fill_table_row.rb +188 -0
  29. data/lib/cloudmersive-convert-api-client/models/fill_handlebar_form_field.rb +196 -0
  30. data/lib/cloudmersive-convert-api-client/models/get_docx_content_controls_response.rb +198 -0
  31. data/lib/cloudmersive-convert-api-client/models/get_docx_get_form_fields_response.rb +210 -0
  32. data/lib/cloudmersive-convert-api-client/models/handlebar_form_field.rb +186 -0
  33. data/lib/cloudmersive-convert-api-client/version.rb +1 -1
  34. data/lib/cloudmersive-convert-api-client.rb +13 -0
  35. data/spec/api/edit_document_api_spec.rb +49 -1
  36. data/spec/api/transform_document_api_spec.rb +54 -2
  37. data/spec/models/document_editing_edit_session_spec.rb +47 -0
  38. data/spec/models/document_transform_edit_session_spec.rb +47 -0
  39. data/spec/models/docx_content_control_spec.rb +41 -0
  40. data/spec/models/docx_set_form_fields_request_spec.rb +53 -0
  41. data/spec/models/docx_table_single_table_fill_spec.rb +53 -0
  42. data/spec/models/docx_table_table_fill_multi_request_spec.rb +53 -0
  43. data/spec/models/docx_table_table_fill_request_spec.rb +65 -0
  44. data/spec/models/docx_table_table_fill_table_cell_spec.rb +47 -0
  45. data/spec/models/docx_table_table_fill_table_row_spec.rb +41 -0
  46. data/spec/models/fill_handlebar_form_field_spec.rb +47 -0
  47. data/spec/models/get_docx_content_controls_response_spec.rb +47 -0
  48. data/spec/models/get_docx_get_form_fields_response_spec.rb +53 -0
  49. data/spec/models/handlebar_form_field_spec.rb +41 -0
  50. metadata +41 -2
@@ -0,0 +1,9 @@
1
+ # CloudmersiveConvertApiClient::FillHandlebarFormField
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **field_name** | **String** | Name of the field without the curly braces, e.g. \"FieldName\" for a field that is included in the text of the DOCX as \"{{FieldName}}\" | [optional]
7
+ **value_to_fill** | **String** | Text value to fill in for the field in the resulting document | [optional]
8
+
9
+
@@ -0,0 +1,9 @@
1
+ # CloudmersiveConvertApiClient::GetDocxContentControlsResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **successful** | **BOOLEAN** | True if successful, false otherwise | [optional]
7
+ **content_controls** | [**Array<DocxContentControl>**](DocxContentControl.md) | Content controls in the DOCX | [optional]
8
+
9
+
@@ -0,0 +1,10 @@
1
+ # CloudmersiveConvertApiClient::GetDocxGetFormFieldsResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **successful** | **BOOLEAN** | True if successful, false otherwise | [optional]
7
+ **content_controls** | [**Array<DocxContentControl>**](DocxContentControl.md) | Content controls in the DOCX | [optional]
8
+ **handlebar_form_fields** | [**Array<HandlebarFormField>**](HandlebarFormField.md) | Form fields that comply with the Handlebar style, that is they are surrounded by two curly braces on either side such as \"{{FieldName}}\", in the DOCX | [optional]
9
+
10
+
@@ -0,0 +1,8 @@
1
+ # CloudmersiveConvertApiClient::HandlebarFormField
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **form_field_title** | **String** | Title of the handlebar style form field, such as \"FieldName\" in the case of \"{{FieldName}}\" | [optional]
7
+
8
+
@@ -4,14 +4,18 @@ 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_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_docx_table_fill_in_multi**](TransformDocumentApi.md#transform_document_docx_table_fill_in_multi) | **POST** /convert/transform/docx/table/fill/data/multi | Fill in data in multiple tables in a Word DOCX document, return result
12
+ [**transform_document_pptx_replace**](TransformDocumentApi.md#transform_document_pptx_replace) | **POST** /convert/transform/pptx/replace-all | Replace string in PowerPoint PPTX presentation, return result
9
13
 
10
14
 
11
15
  # **transform_document_docx_replace**
12
16
  > String transform_document_docx_replace(match_string, replace_string, opts)
13
17
 
14
- Replace string in Word DOCX document
18
+ Replace string in Word DOCX document, return result
15
19
 
16
20
  Replace all instances of a string in an Office Word Document (docx)
17
21
 
@@ -40,7 +44,7 @@ opts = {
40
44
  }
41
45
 
42
46
  begin
43
- #Replace string in Word DOCX document
47
+ #Replace string in Word DOCX document, return result
44
48
  result = api_instance.transform_document_docx_replace(match_string, replace_string, opts)
45
49
  p result
46
50
  rescue CloudmersiveConvertApiClient::ApiError => e
@@ -73,10 +77,237 @@ Name | Type | Description | Notes
73
77
 
74
78
 
75
79
 
80
+ # **transform_document_docx_replace_edit_session**
81
+ > DocumentTransformEditSession transform_document_docx_replace_edit_session(match_string, replace_string, opts)
82
+
83
+ Replace string in Word DOCX document, return edit session
84
+
85
+ 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.
86
+
87
+ ### Example
88
+ ```ruby
89
+ # load the gem
90
+ require 'cloudmersive-convert-api-client'
91
+ # setup authorization
92
+ CloudmersiveConvertApiClient.configure do |config|
93
+ # Configure API key authorization: Apikey
94
+ config.api_key['Apikey'] = 'YOUR API KEY'
95
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
96
+ #config.api_key_prefix['Apikey'] = 'Bearer'
97
+ end
98
+
99
+ api_instance = CloudmersiveConvertApiClient::TransformDocumentApi.new
100
+
101
+ match_string = 'match_string_example' # String | String to search for and match against, to be replaced
102
+
103
+ replace_string = 'replace_string_example' # String | String to replace the matched values with
104
+
105
+ opts = {
106
+ input_file: File.new('/path/to/file.txt'), # File | Optional: Input file to perform the operation on.
107
+ 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).
108
+ match_case: true # BOOLEAN | Optional: True if the case should be matched, false for case insensitive match. Default is false.
109
+ }
110
+
111
+ begin
112
+ #Replace string in Word DOCX document, return edit session
113
+ result = api_instance.transform_document_docx_replace_edit_session(match_string, replace_string, opts)
114
+ p result
115
+ rescue CloudmersiveConvertApiClient::ApiError => e
116
+ puts "Exception when calling TransformDocumentApi->transform_document_docx_replace_edit_session: #{e}"
117
+ end
118
+ ```
119
+
120
+ ### Parameters
121
+
122
+ Name | Type | Description | Notes
123
+ ------------- | ------------- | ------------- | -------------
124
+ **match_string** | **String**| String to search for and match against, to be replaced |
125
+ **replace_string** | **String**| String to replace the matched values with |
126
+ **input_file** | **File**| Optional: Input file to perform the operation on. | [optional]
127
+ **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]
128
+ **match_case** | **BOOLEAN**| Optional: True if the case should be matched, false for case insensitive match. Default is false. | [optional]
129
+
130
+ ### Return type
131
+
132
+ [**DocumentTransformEditSession**](DocumentTransformEditSession.md)
133
+
134
+ ### Authorization
135
+
136
+ [Apikey](../README.md#Apikey)
137
+
138
+ ### HTTP request headers
139
+
140
+ - **Content-Type**: Not defined
141
+ - **Accept**: application/json, text/json, application/xml, text/xml
142
+
143
+
144
+
145
+ # **transform_document_docx_table_fill_in**
146
+ > String transform_document_docx_table_fill_in(request)
147
+
148
+ Fill in data in a table in a Word DOCX document, return result
149
+
150
+ Replace placeholder rows ina table in an Office Word Document (docx) using one or more templates
151
+
152
+ ### Example
153
+ ```ruby
154
+ # load the gem
155
+ require 'cloudmersive-convert-api-client'
156
+ # setup authorization
157
+ CloudmersiveConvertApiClient.configure do |config|
158
+ # Configure API key authorization: Apikey
159
+ config.api_key['Apikey'] = 'YOUR API KEY'
160
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
161
+ #config.api_key_prefix['Apikey'] = 'Bearer'
162
+ end
163
+
164
+ api_instance = CloudmersiveConvertApiClient::TransformDocumentApi.new
165
+
166
+ request = CloudmersiveConvertApiClient::DocxTableTableFillRequest.new # DocxTableTableFillRequest |
167
+
168
+
169
+ begin
170
+ #Fill in data in a table in a Word DOCX document, return result
171
+ result = api_instance.transform_document_docx_table_fill_in(request)
172
+ p result
173
+ rescue CloudmersiveConvertApiClient::ApiError => e
174
+ puts "Exception when calling TransformDocumentApi->transform_document_docx_table_fill_in: #{e}"
175
+ end
176
+ ```
177
+
178
+ ### Parameters
179
+
180
+ Name | Type | Description | Notes
181
+ ------------- | ------------- | ------------- | -------------
182
+ **request** | [**DocxTableTableFillRequest**](DocxTableTableFillRequest.md)| |
183
+
184
+ ### Return type
185
+
186
+ **String**
187
+
188
+ ### Authorization
189
+
190
+ [Apikey](../README.md#Apikey)
191
+
192
+ ### HTTP request headers
193
+
194
+ - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
195
+ - **Accept**: application/octet-stream
196
+
197
+
198
+
199
+ # **transform_document_docx_table_fill_in_edit_session**
200
+ > DocumentTransformEditSession transform_document_docx_table_fill_in_edit_session(request)
201
+
202
+ Fill in data in a table in a Word DOCX document, return edit session
203
+
204
+ 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.
205
+
206
+ ### Example
207
+ ```ruby
208
+ # load the gem
209
+ require 'cloudmersive-convert-api-client'
210
+ # setup authorization
211
+ CloudmersiveConvertApiClient.configure do |config|
212
+ # Configure API key authorization: Apikey
213
+ config.api_key['Apikey'] = 'YOUR API KEY'
214
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
215
+ #config.api_key_prefix['Apikey'] = 'Bearer'
216
+ end
217
+
218
+ api_instance = CloudmersiveConvertApiClient::TransformDocumentApi.new
219
+
220
+ request = CloudmersiveConvertApiClient::DocxTableTableFillRequest.new # DocxTableTableFillRequest |
221
+
222
+
223
+ begin
224
+ #Fill in data in a table in a Word DOCX document, return edit session
225
+ result = api_instance.transform_document_docx_table_fill_in_edit_session(request)
226
+ p result
227
+ rescue CloudmersiveConvertApiClient::ApiError => e
228
+ puts "Exception when calling TransformDocumentApi->transform_document_docx_table_fill_in_edit_session: #{e}"
229
+ end
230
+ ```
231
+
232
+ ### Parameters
233
+
234
+ Name | Type | Description | Notes
235
+ ------------- | ------------- | ------------- | -------------
236
+ **request** | [**DocxTableTableFillRequest**](DocxTableTableFillRequest.md)| |
237
+
238
+ ### Return type
239
+
240
+ [**DocumentTransformEditSession**](DocumentTransformEditSession.md)
241
+
242
+ ### Authorization
243
+
244
+ [Apikey](../README.md#Apikey)
245
+
246
+ ### HTTP request headers
247
+
248
+ - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
249
+ - **Accept**: application/json, text/json, application/xml, text/xml
250
+
251
+
252
+
253
+ # **transform_document_docx_table_fill_in_multi**
254
+ > Object transform_document_docx_table_fill_in_multi(request)
255
+
256
+ Fill in data in multiple tables in a Word DOCX document, return result
257
+
258
+ Replace placeholder rows in multiple tables in an Office Word Document (docx) using one or more templates
259
+
260
+ ### Example
261
+ ```ruby
262
+ # load the gem
263
+ require 'cloudmersive-convert-api-client'
264
+ # setup authorization
265
+ CloudmersiveConvertApiClient.configure do |config|
266
+ # Configure API key authorization: Apikey
267
+ config.api_key['Apikey'] = 'YOUR API KEY'
268
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
269
+ #config.api_key_prefix['Apikey'] = 'Bearer'
270
+ end
271
+
272
+ api_instance = CloudmersiveConvertApiClient::TransformDocumentApi.new
273
+
274
+ request = CloudmersiveConvertApiClient::DocxTableTableFillMultiRequest.new # DocxTableTableFillMultiRequest |
275
+
276
+
277
+ begin
278
+ #Fill in data in multiple tables in a Word DOCX document, return result
279
+ result = api_instance.transform_document_docx_table_fill_in_multi(request)
280
+ p result
281
+ rescue CloudmersiveConvertApiClient::ApiError => e
282
+ puts "Exception when calling TransformDocumentApi->transform_document_docx_table_fill_in_multi: #{e}"
283
+ end
284
+ ```
285
+
286
+ ### Parameters
287
+
288
+ Name | Type | Description | Notes
289
+ ------------- | ------------- | ------------- | -------------
290
+ **request** | [**DocxTableTableFillMultiRequest**](DocxTableTableFillMultiRequest.md)| |
291
+
292
+ ### Return type
293
+
294
+ **Object**
295
+
296
+ ### Authorization
297
+
298
+ [Apikey](../README.md#Apikey)
299
+
300
+ ### HTTP request headers
301
+
302
+ - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
303
+ - **Accept**: application/octet-stream
304
+
305
+
306
+
76
307
  # **transform_document_pptx_replace**
77
308
  > String transform_document_pptx_replace(match_string, replace_string, opts)
78
309
 
79
- Replace string in PowerPoint PPTX presentation
310
+ Replace string in PowerPoint PPTX presentation, return result
80
311
 
81
312
  Replace all instances of a string in an Office PowerPoint Document (pptx)
82
313
 
@@ -105,7 +336,7 @@ opts = {
105
336
  }
106
337
 
107
338
  begin
108
- #Replace string in PowerPoint PPTX presentation
339
+ #Replace string in PowerPoint PPTX presentation, return result
109
340
  result = api_instance.transform_document_pptx_replace(match_string, replace_string, opts)
110
341
  p result
111
342
  rescue CloudmersiveConvertApiClient::ApiError => e
@@ -671,6 +671,116 @@ module CloudmersiveConvertApiClient
671
671
  end
672
672
  return data, status_code, headers
673
673
  end
674
+ # Get all content controls (form fields) and values in a Word DOCX document
675
+ # Returns all the content controls, used for creating form fields, in a Office Word Document (docx)
676
+ # @param input_file Input file to perform the operation on.
677
+ # @param [Hash] opts the optional parameters
678
+ # @return [GetDocxContentControlsResponse]
679
+ def edit_document_docx_get_content_controls(input_file, opts = {})
680
+ data, _status_code, _headers = edit_document_docx_get_content_controls_with_http_info(input_file, opts)
681
+ data
682
+ end
683
+
684
+ # Get all content controls (form fields) and values in a Word DOCX document
685
+ # Returns all the content controls, used for creating form fields, in a Office Word Document (docx)
686
+ # @param input_file Input file to perform the operation on.
687
+ # @param [Hash] opts the optional parameters
688
+ # @return [Array<(GetDocxContentControlsResponse, Fixnum, Hash)>] GetDocxContentControlsResponse data, response status code and response headers
689
+ def edit_document_docx_get_content_controls_with_http_info(input_file, opts = {})
690
+ if @api_client.config.debugging
691
+ @api_client.config.logger.debug 'Calling API: EditDocumentApi.edit_document_docx_get_content_controls ...'
692
+ end
693
+ # verify the required parameter 'input_file' is set
694
+ if @api_client.config.client_side_validation && input_file.nil?
695
+ fail ArgumentError, "Missing the required parameter 'input_file' when calling EditDocumentApi.edit_document_docx_get_content_controls"
696
+ end
697
+ # resource path
698
+ local_var_path = '/convert/edit/docx/get-content-controls'
699
+
700
+ # query parameters
701
+ query_params = {}
702
+
703
+ # header parameters
704
+ header_params = {}
705
+ # HTTP header 'Accept' (if needed)
706
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
707
+ # HTTP header 'Content-Type'
708
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
709
+
710
+ # form parameters
711
+ form_params = {}
712
+ form_params['inputFile'] = input_file
713
+
714
+ # http body (model)
715
+ post_body = nil
716
+ auth_names = ['Apikey']
717
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
718
+ :header_params => header_params,
719
+ :query_params => query_params,
720
+ :form_params => form_params,
721
+ :body => post_body,
722
+ :auth_names => auth_names,
723
+ :return_type => 'GetDocxContentControlsResponse')
724
+ if @api_client.config.debugging
725
+ @api_client.config.logger.debug "API called: EditDocumentApi#edit_document_docx_get_content_controls\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
726
+ end
727
+ return data, status_code, headers
728
+ end
729
+ # Get all form fields in a Word DOCX document
730
+ # Returns all the content controls, used for creating form fields, as well as handlebar style text-based form fields such as \"{{FieldName}}\", in a Office Word Document (docx)
731
+ # @param input_file Input file to perform the operation on.
732
+ # @param [Hash] opts the optional parameters
733
+ # @return [GetDocxGetFormFieldsResponse]
734
+ def edit_document_docx_get_form_fields(input_file, opts = {})
735
+ data, _status_code, _headers = edit_document_docx_get_form_fields_with_http_info(input_file, opts)
736
+ data
737
+ end
738
+
739
+ # Get all form fields in a Word DOCX document
740
+ # Returns all the content controls, used for creating form fields, as well as handlebar style text-based form fields such as \&quot;{{FieldName}}\&quot;, in a Office Word Document (docx)
741
+ # @param input_file Input file to perform the operation on.
742
+ # @param [Hash] opts the optional parameters
743
+ # @return [Array<(GetDocxGetFormFieldsResponse, Fixnum, Hash)>] GetDocxGetFormFieldsResponse data, response status code and response headers
744
+ def edit_document_docx_get_form_fields_with_http_info(input_file, opts = {})
745
+ if @api_client.config.debugging
746
+ @api_client.config.logger.debug 'Calling API: EditDocumentApi.edit_document_docx_get_form_fields ...'
747
+ end
748
+ # verify the required parameter 'input_file' is set
749
+ if @api_client.config.client_side_validation && input_file.nil?
750
+ fail ArgumentError, "Missing the required parameter 'input_file' when calling EditDocumentApi.edit_document_docx_get_form_fields"
751
+ end
752
+ # resource path
753
+ local_var_path = '/convert/edit/docx/get-form-fields'
754
+
755
+ # query parameters
756
+ query_params = {}
757
+
758
+ # header parameters
759
+ header_params = {}
760
+ # HTTP header 'Accept' (if needed)
761
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
762
+ # HTTP header 'Content-Type'
763
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
764
+
765
+ # form parameters
766
+ form_params = {}
767
+ form_params['inputFile'] = input_file
768
+
769
+ # http body (model)
770
+ post_body = nil
771
+ auth_names = ['Apikey']
772
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
773
+ :header_params => header_params,
774
+ :query_params => query_params,
775
+ :form_params => form_params,
776
+ :body => post_body,
777
+ :auth_names => auth_names,
778
+ :return_type => 'GetDocxGetFormFieldsResponse')
779
+ if @api_client.config.debugging
780
+ @api_client.config.logger.debug "API called: EditDocumentApi#edit_document_docx_get_form_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
781
+ end
782
+ return data, status_code, headers
783
+ end
674
784
  # Get content of a footer from a Word DOCX document
675
785
  # Returns the footer content from a Word Document (DOCX) format file
676
786
  # @param req_config Document input request
@@ -1700,7 +1810,7 @@ module CloudmersiveConvertApiClient
1700
1810
  end
1701
1811
  return data, status_code, headers
1702
1812
  end
1703
- # Replace multiple strings in Word DOCX document
1813
+ # Replace multiple strings in Word DOCX document, return result
1704
1814
  # Replace all instances of multiple strings in an Office Word Document (docx)
1705
1815
  # @param req_config Document string replacement configuration input
1706
1816
  # @param [Hash] opts the optional parameters
@@ -1710,7 +1820,7 @@ module CloudmersiveConvertApiClient
1710
1820
  data
1711
1821
  end
1712
1822
 
1713
- # Replace multiple strings in Word DOCX document
1823
+ # Replace multiple strings in Word DOCX document, return result
1714
1824
  # Replace all instances of multiple strings in an Office Word Document (docx)
1715
1825
  # @param req_config Document string replacement configuration input
1716
1826
  # @param [Hash] opts the optional parameters
@@ -1754,6 +1864,60 @@ module CloudmersiveConvertApiClient
1754
1864
  end
1755
1865
  return data, status_code, headers
1756
1866
  end
1867
+ # Replace multiple strings in Word DOCX document, return edit session
1868
+ # 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.
1869
+ # @param req_config Document string replacement configuration input
1870
+ # @param [Hash] opts the optional parameters
1871
+ # @return [DocumentEditingEditSession]
1872
+ def edit_document_docx_replace_multi_edit_session(req_config, opts = {})
1873
+ data, _status_code, _headers = edit_document_docx_replace_multi_edit_session_with_http_info(req_config, opts)
1874
+ data
1875
+ end
1876
+
1877
+ # Replace multiple strings in Word DOCX document, return edit session
1878
+ # 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.
1879
+ # @param req_config Document string replacement configuration input
1880
+ # @param [Hash] opts the optional parameters
1881
+ # @return [Array<(DocumentEditingEditSession, Fixnum, Hash)>] DocumentEditingEditSession data, response status code and response headers
1882
+ def edit_document_docx_replace_multi_edit_session_with_http_info(req_config, opts = {})
1883
+ if @api_client.config.debugging
1884
+ @api_client.config.logger.debug 'Calling API: EditDocumentApi.edit_document_docx_replace_multi_edit_session ...'
1885
+ end
1886
+ # verify the required parameter 'req_config' is set
1887
+ if @api_client.config.client_side_validation && req_config.nil?
1888
+ fail ArgumentError, "Missing the required parameter 'req_config' when calling EditDocumentApi.edit_document_docx_replace_multi_edit_session"
1889
+ end
1890
+ # resource path
1891
+ local_var_path = '/convert/edit/docx/replace-all/multi/edit-session'
1892
+
1893
+ # query parameters
1894
+ query_params = {}
1895
+
1896
+ # header parameters
1897
+ header_params = {}
1898
+ # HTTP header 'Accept' (if needed)
1899
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
1900
+ # HTTP header 'Content-Type'
1901
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
1902
+
1903
+ # form parameters
1904
+ form_params = {}
1905
+
1906
+ # http body (model)
1907
+ post_body = @api_client.object_to_http_body(req_config)
1908
+ auth_names = ['Apikey']
1909
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1910
+ :header_params => header_params,
1911
+ :query_params => query_params,
1912
+ :form_params => form_params,
1913
+ :body => post_body,
1914
+ :auth_names => auth_names,
1915
+ :return_type => 'DocumentEditingEditSession')
1916
+ if @api_client.config.debugging
1917
+ @api_client.config.logger.debug "API called: EditDocumentApi#edit_document_docx_replace_multi_edit_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1918
+ end
1919
+ return data, status_code, headers
1920
+ end
1757
1921
  # Replace matching paragraphs in a Word DOCX document
1758
1922
  # 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
1923
  # @param req_config Document input request
@@ -1970,6 +2134,60 @@ module CloudmersiveConvertApiClient
1970
2134
  end
1971
2135
  return data, status_code, headers
1972
2136
  end
2137
+ # Set and fill values for form fields in a Word DOCX document
2138
+ # Modifies a Office Word Document (docx) by filling in form fields using the provided values.
2139
+ # @param req_config
2140
+ # @param [Hash] opts the optional parameters
2141
+ # @return [String]
2142
+ def edit_document_docx_set_form_fields(req_config, opts = {})
2143
+ data, _status_code, _headers = edit_document_docx_set_form_fields_with_http_info(req_config, opts)
2144
+ data
2145
+ end
2146
+
2147
+ # Set and fill values for form fields in a Word DOCX document
2148
+ # Modifies a Office Word Document (docx) by filling in form fields using the provided values.
2149
+ # @param req_config
2150
+ # @param [Hash] opts the optional parameters
2151
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
2152
+ def edit_document_docx_set_form_fields_with_http_info(req_config, opts = {})
2153
+ if @api_client.config.debugging
2154
+ @api_client.config.logger.debug 'Calling API: EditDocumentApi.edit_document_docx_set_form_fields ...'
2155
+ end
2156
+ # verify the required parameter 'req_config' is set
2157
+ if @api_client.config.client_side_validation && req_config.nil?
2158
+ fail ArgumentError, "Missing the required parameter 'req_config' when calling EditDocumentApi.edit_document_docx_set_form_fields"
2159
+ end
2160
+ # resource path
2161
+ local_var_path = '/convert/edit/docx/set-form-fields'
2162
+
2163
+ # query parameters
2164
+ query_params = {}
2165
+
2166
+ # header parameters
2167
+ header_params = {}
2168
+ # HTTP header 'Accept' (if needed)
2169
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
2170
+ # HTTP header 'Content-Type'
2171
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
2172
+
2173
+ # form parameters
2174
+ form_params = {}
2175
+
2176
+ # http body (model)
2177
+ post_body = @api_client.object_to_http_body(req_config)
2178
+ auth_names = ['Apikey']
2179
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2180
+ :header_params => header_params,
2181
+ :query_params => query_params,
2182
+ :form_params => form_params,
2183
+ :body => post_body,
2184
+ :auth_names => auth_names,
2185
+ :return_type => 'String')
2186
+ if @api_client.config.debugging
2187
+ @api_client.config.logger.debug "API called: EditDocumentApi#edit_document_docx_set_form_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2188
+ end
2189
+ return data, status_code, headers
2190
+ end
1973
2191
  # Set the header in a Word DOCX document
1974
2192
  # Set the header in a Word Document (DOCX). Call Finish Editing on the output URL to complete the operation.
1975
2193
  # @param req_config Document input request