cloudmersive-convert-api-client 2.2.2 → 2.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -4
- data/docs/DocxTableSingleTableFill.md +10 -0
- data/docs/DocxTableTableFillMultiRequest.md +10 -0
- data/docs/TransformDocumentApi.md +55 -0
- data/lib/cloudmersive-convert-api-client/api/transform_document_api.rb +54 -0
- data/lib/cloudmersive-convert-api-client/models/docx_table_single_table_fill.rb +208 -0
- data/lib/cloudmersive-convert-api-client/models/docx_table_table_fill_multi_request.rb +223 -0
- data/lib/cloudmersive-convert-api-client/version.rb +1 -1
- data/lib/cloudmersive-convert-api-client.rb +2 -0
- data/spec/api/transform_document_api_spec.rb +12 -0
- data/spec/models/docx_table_single_table_fill_spec.rb +53 -0
- data/spec/models/docx_table_table_fill_multi_request_spec.rb +53 -0
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d04663be07d2325db820df2f804191d40cc98142b7911d5b9fe38cdc839b444
|
4
|
+
data.tar.gz: 38ff522b6e239465685988cac35a6fe4389130823509c8372a00e3d37d9ee7f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a65439264897bcf13b4659cd1954523989ce9ab71f97a1686b8df598920645d70f0980b6230d472fa1644008e76c90ba51a3ff2b46e2735780ad3b2a5f3c34fb
|
7
|
+
data.tar.gz: 3a5f66ddd154cd36e884a8cd946a3325426a8719ecf82b772091d208774809f2f3626560df867e1cf2d99433b052846c8ffbcee853bbf42ce113f4cda40f74b0
|
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.
|
10
|
+
- Package version: 2.2.3
|
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.
|
26
|
+
gem install ./cloudmersive-convert-api-client-2.2.3.gem
|
27
27
|
```
|
28
|
-
(for development, run `gem install --dev ./cloudmersive-convert-api-client-2.2.
|
28
|
+
(for development, run `gem install --dev ./cloudmersive-convert-api-client-2.2.3.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.
|
34
|
+
gem 'cloudmersive-convert-api-client', '~> 2.2.3'
|
35
35
|
|
36
36
|
### Install from Git
|
37
37
|
|
@@ -333,6 +333,7 @@ Class | Method | HTTP request | Description
|
|
333
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
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
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_docx_table_fill_in_multi**](docs/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
|
336
337
|
*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
|
337
338
|
*CloudmersiveConvertApiClient::ValidateDocumentApi* | [**validate_document_autodetect_validation**](docs/ValidateDocumentApi.md#validate_document_autodetect_validation) | **POST** /convert/validate/autodetect | Autodetect content type and validate
|
338
339
|
*CloudmersiveConvertApiClient::ValidateDocumentApi* | [**validate_document_csv_validation**](docs/ValidateDocumentApi.md#validate_document_csv_validation) | **POST** /convert/validate/csv | Validate a CSV file document (CSV)
|
@@ -436,6 +437,8 @@ Class | Method | HTTP request | Description
|
|
436
437
|
- [CloudmersiveConvertApiClient::DocxTable](docs/DocxTable.md)
|
437
438
|
- [CloudmersiveConvertApiClient::DocxTableCell](docs/DocxTableCell.md)
|
438
439
|
- [CloudmersiveConvertApiClient::DocxTableRow](docs/DocxTableRow.md)
|
440
|
+
- [CloudmersiveConvertApiClient::DocxTableSingleTableFill](docs/DocxTableSingleTableFill.md)
|
441
|
+
- [CloudmersiveConvertApiClient::DocxTableTableFillMultiRequest](docs/DocxTableTableFillMultiRequest.md)
|
439
442
|
- [CloudmersiveConvertApiClient::DocxTableTableFillRequest](docs/DocxTableTableFillRequest.md)
|
440
443
|
- [CloudmersiveConvertApiClient::DocxTableTableFillTableCell](docs/DocxTableTableFillTableCell.md)
|
441
444
|
- [CloudmersiveConvertApiClient::DocxTableTableFillTableRow](docs/DocxTableTableFillTableRow.md)
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# CloudmersiveConvertApiClient::DocxTableSingleTableFill
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**table_start_tag** | **String** | Start tag that delineates the beginning of the table | [optional]
|
7
|
+
**table_end_tag** | **String** | End tag that delineates the end of the table | [optional]
|
8
|
+
**data_to_fill_in** | [**Array<DocxTableTableFillTableRow>**](DocxTableTableFillTableRow.md) | Data set to populate the table with | [optional]
|
9
|
+
|
10
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# CloudmersiveConvertApiClient::DocxTableTableFillMultiRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**input_file_url** | **String** | Optional; Input URL of the document; use BeginEditing to create this | [optional]
|
7
|
+
**input_file_data** | **String** | Optional; Input Word Document file content for the operation | [optional]
|
8
|
+
**tables_to_fill** | [**Array<DocxTableSingleTableFill>**](DocxTableSingleTableFill.md) | Tables and datasets to fill into the document | [optional]
|
9
|
+
|
10
|
+
|
@@ -8,6 +8,7 @@ Method | HTTP request | Description
|
|
8
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
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
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
|
11
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
|
12
13
|
|
13
14
|
|
@@ -249,6 +250,60 @@ Name | Type | Description | Notes
|
|
249
250
|
|
250
251
|
|
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
|
+
|
252
307
|
# **transform_document_pptx_replace**
|
253
308
|
> String transform_document_pptx_replace(match_string, replace_string, opts)
|
254
309
|
|
@@ -265,6 +265,60 @@ module CloudmersiveConvertApiClient
|
|
265
265
|
end
|
266
266
|
return data, status_code, headers
|
267
267
|
end
|
268
|
+
# Fill in data in multiple tables in a Word DOCX document, return result
|
269
|
+
# Replace placeholder rows in multiple tables in an Office Word Document (docx) using one or more templates
|
270
|
+
# @param request
|
271
|
+
# @param [Hash] opts the optional parameters
|
272
|
+
# @return [Object]
|
273
|
+
def transform_document_docx_table_fill_in_multi(request, opts = {})
|
274
|
+
data, _status_code, _headers = transform_document_docx_table_fill_in_multi_with_http_info(request, opts)
|
275
|
+
data
|
276
|
+
end
|
277
|
+
|
278
|
+
# Fill in data in multiple tables in a Word DOCX document, return result
|
279
|
+
# Replace placeholder rows in multiple tables in an Office Word Document (docx) using one or more templates
|
280
|
+
# @param request
|
281
|
+
# @param [Hash] opts the optional parameters
|
282
|
+
# @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
|
283
|
+
def transform_document_docx_table_fill_in_multi_with_http_info(request, opts = {})
|
284
|
+
if @api_client.config.debugging
|
285
|
+
@api_client.config.logger.debug 'Calling API: TransformDocumentApi.transform_document_docx_table_fill_in_multi ...'
|
286
|
+
end
|
287
|
+
# verify the required parameter 'request' is set
|
288
|
+
if @api_client.config.client_side_validation && request.nil?
|
289
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling TransformDocumentApi.transform_document_docx_table_fill_in_multi"
|
290
|
+
end
|
291
|
+
# resource path
|
292
|
+
local_var_path = '/convert/transform/docx/table/fill/data/multi'
|
293
|
+
|
294
|
+
# query parameters
|
295
|
+
query_params = {}
|
296
|
+
|
297
|
+
# header parameters
|
298
|
+
header_params = {}
|
299
|
+
# HTTP header 'Accept' (if needed)
|
300
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
|
301
|
+
# HTTP header 'Content-Type'
|
302
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
|
303
|
+
|
304
|
+
# form parameters
|
305
|
+
form_params = {}
|
306
|
+
|
307
|
+
# http body (model)
|
308
|
+
post_body = @api_client.object_to_http_body(request)
|
309
|
+
auth_names = ['Apikey']
|
310
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
311
|
+
:header_params => header_params,
|
312
|
+
:query_params => query_params,
|
313
|
+
:form_params => form_params,
|
314
|
+
:body => post_body,
|
315
|
+
:auth_names => auth_names,
|
316
|
+
:return_type => 'Object')
|
317
|
+
if @api_client.config.debugging
|
318
|
+
@api_client.config.logger.debug "API called: TransformDocumentApi#transform_document_docx_table_fill_in_multi\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
319
|
+
end
|
320
|
+
return data, status_code, headers
|
321
|
+
end
|
268
322
|
# Replace string in PowerPoint PPTX presentation, return result
|
269
323
|
# Replace all instances of a string in an Office PowerPoint Document (pptx)
|
270
324
|
# @param match_string String to search for and match against, to be replaced
|
@@ -0,0 +1,208 @@
|
|
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
|
+
# Single table fill request in a multi-table fill operation
|
17
|
+
class DocxTableSingleTableFill
|
18
|
+
# Start tag that delineates the beginning of the table
|
19
|
+
attr_accessor :table_start_tag
|
20
|
+
|
21
|
+
# End tag that delineates the end of the table
|
22
|
+
attr_accessor :table_end_tag
|
23
|
+
|
24
|
+
# Data set to populate the table with
|
25
|
+
attr_accessor :data_to_fill_in
|
26
|
+
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
28
|
+
def self.attribute_map
|
29
|
+
{
|
30
|
+
:'table_start_tag' => :'TableStartTag',
|
31
|
+
:'table_end_tag' => :'TableEndTag',
|
32
|
+
:'data_to_fill_in' => :'DataToFillIn'
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
# Attribute type mapping.
|
37
|
+
def self.swagger_types
|
38
|
+
{
|
39
|
+
:'table_start_tag' => :'String',
|
40
|
+
:'table_end_tag' => :'String',
|
41
|
+
:'data_to_fill_in' => :'Array<DocxTableTableFillTableRow>'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# Initializes the object
|
46
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
47
|
+
def initialize(attributes = {})
|
48
|
+
return unless attributes.is_a?(Hash)
|
49
|
+
|
50
|
+
# convert string to symbol for hash key
|
51
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
52
|
+
|
53
|
+
if attributes.has_key?(:'TableStartTag')
|
54
|
+
self.table_start_tag = attributes[:'TableStartTag']
|
55
|
+
end
|
56
|
+
|
57
|
+
if attributes.has_key?(:'TableEndTag')
|
58
|
+
self.table_end_tag = attributes[:'TableEndTag']
|
59
|
+
end
|
60
|
+
|
61
|
+
if attributes.has_key?(:'DataToFillIn')
|
62
|
+
if (value = attributes[:'DataToFillIn']).is_a?(Array)
|
63
|
+
self.data_to_fill_in = value
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
69
|
+
# @return Array for valid properties with the reasons
|
70
|
+
def list_invalid_properties
|
71
|
+
invalid_properties = Array.new
|
72
|
+
invalid_properties
|
73
|
+
end
|
74
|
+
|
75
|
+
# Check to see if the all the properties in the model are valid
|
76
|
+
# @return true if the model is valid
|
77
|
+
def valid?
|
78
|
+
true
|
79
|
+
end
|
80
|
+
|
81
|
+
# Checks equality by comparing each attribute.
|
82
|
+
# @param [Object] Object to be compared
|
83
|
+
def ==(o)
|
84
|
+
return true if self.equal?(o)
|
85
|
+
self.class == o.class &&
|
86
|
+
table_start_tag == o.table_start_tag &&
|
87
|
+
table_end_tag == o.table_end_tag &&
|
88
|
+
data_to_fill_in == o.data_to_fill_in
|
89
|
+
end
|
90
|
+
|
91
|
+
# @see the `==` method
|
92
|
+
# @param [Object] Object to be compared
|
93
|
+
def eql?(o)
|
94
|
+
self == o
|
95
|
+
end
|
96
|
+
|
97
|
+
# Calculates hash code according to all attributes.
|
98
|
+
# @return [Fixnum] Hash code
|
99
|
+
def hash
|
100
|
+
[table_start_tag, table_end_tag, data_to_fill_in].hash
|
101
|
+
end
|
102
|
+
|
103
|
+
# Builds the object from hash
|
104
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
105
|
+
# @return [Object] Returns the model itself
|
106
|
+
def build_from_hash(attributes)
|
107
|
+
return nil unless attributes.is_a?(Hash)
|
108
|
+
self.class.swagger_types.each_pair do |key, type|
|
109
|
+
if type =~ /\AArray<(.*)>/i
|
110
|
+
# check to ensure the input is an array given that the attribute
|
111
|
+
# is documented as an array but the input is not
|
112
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
113
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
114
|
+
end
|
115
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
116
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
117
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
118
|
+
end
|
119
|
+
|
120
|
+
self
|
121
|
+
end
|
122
|
+
|
123
|
+
# Deserializes the data based on type
|
124
|
+
# @param string type Data type
|
125
|
+
# @param string value Value to be deserialized
|
126
|
+
# @return [Object] Deserialized data
|
127
|
+
def _deserialize(type, value)
|
128
|
+
case type.to_sym
|
129
|
+
when :DateTime
|
130
|
+
DateTime.parse(value)
|
131
|
+
when :Date
|
132
|
+
Date.parse(value)
|
133
|
+
when :String
|
134
|
+
value.to_s
|
135
|
+
when :Integer
|
136
|
+
value.to_i
|
137
|
+
when :Float
|
138
|
+
value.to_f
|
139
|
+
when :BOOLEAN
|
140
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
141
|
+
true
|
142
|
+
else
|
143
|
+
false
|
144
|
+
end
|
145
|
+
when :Object
|
146
|
+
# generic object (usually a Hash), return directly
|
147
|
+
value
|
148
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
149
|
+
inner_type = Regexp.last_match[:inner_type]
|
150
|
+
value.map { |v| _deserialize(inner_type, v) }
|
151
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
152
|
+
k_type = Regexp.last_match[:k_type]
|
153
|
+
v_type = Regexp.last_match[:v_type]
|
154
|
+
{}.tap do |hash|
|
155
|
+
value.each do |k, v|
|
156
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
157
|
+
end
|
158
|
+
end
|
159
|
+
else # model
|
160
|
+
temp_model = CloudmersiveConvertApiClient.const_get(type).new
|
161
|
+
temp_model.build_from_hash(value)
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
# Returns the string representation of the object
|
166
|
+
# @return [String] String presentation of the object
|
167
|
+
def to_s
|
168
|
+
to_hash.to_s
|
169
|
+
end
|
170
|
+
|
171
|
+
# to_body is an alias to to_hash (backward compatibility)
|
172
|
+
# @return [Hash] Returns the object in the form of hash
|
173
|
+
def to_body
|
174
|
+
to_hash
|
175
|
+
end
|
176
|
+
|
177
|
+
# Returns the object in the form of hash
|
178
|
+
# @return [Hash] Returns the object in the form of hash
|
179
|
+
def to_hash
|
180
|
+
hash = {}
|
181
|
+
self.class.attribute_map.each_pair do |attr, param|
|
182
|
+
value = self.send(attr)
|
183
|
+
next if value.nil?
|
184
|
+
hash[param] = _to_hash(value)
|
185
|
+
end
|
186
|
+
hash
|
187
|
+
end
|
188
|
+
|
189
|
+
# Outputs non-array value in the form of hash
|
190
|
+
# For object, use to_hash. Otherwise, just return the value
|
191
|
+
# @param [Object] value Any valid value
|
192
|
+
# @return [Hash] Returns the value in the form of hash
|
193
|
+
def _to_hash(value)
|
194
|
+
if value.is_a?(Array)
|
195
|
+
value.compact.map { |v| _to_hash(v) }
|
196
|
+
elsif value.is_a?(Hash)
|
197
|
+
{}.tap do |hash|
|
198
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
199
|
+
end
|
200
|
+
elsif value.respond_to? :to_hash
|
201
|
+
value.to_hash
|
202
|
+
else
|
203
|
+
value
|
204
|
+
end
|
205
|
+
end
|
206
|
+
|
207
|
+
end
|
208
|
+
end
|
@@ -0,0 +1,223 @@
|
|
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
|
+
# Request to update data in a table in a Word DOCX Document
|
17
|
+
class DocxTableTableFillMultiRequest
|
18
|
+
# Optional; Input URL of the document; use BeginEditing to create this
|
19
|
+
attr_accessor :input_file_url
|
20
|
+
|
21
|
+
# Optional; Input Word Document file content for the operation
|
22
|
+
attr_accessor :input_file_data
|
23
|
+
|
24
|
+
# Tables and datasets to fill into the document
|
25
|
+
attr_accessor :tables_to_fill
|
26
|
+
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
28
|
+
def self.attribute_map
|
29
|
+
{
|
30
|
+
:'input_file_url' => :'InputFileUrl',
|
31
|
+
:'input_file_data' => :'InputFileData',
|
32
|
+
:'tables_to_fill' => :'TablesToFill'
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
# Attribute type mapping.
|
37
|
+
def self.swagger_types
|
38
|
+
{
|
39
|
+
:'input_file_url' => :'String',
|
40
|
+
:'input_file_data' => :'String',
|
41
|
+
:'tables_to_fill' => :'Array<DocxTableSingleTableFill>'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# Initializes the object
|
46
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
47
|
+
def initialize(attributes = {})
|
48
|
+
return unless attributes.is_a?(Hash)
|
49
|
+
|
50
|
+
# convert string to symbol for hash key
|
51
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
52
|
+
|
53
|
+
if attributes.has_key?(:'InputFileUrl')
|
54
|
+
self.input_file_url = attributes[:'InputFileUrl']
|
55
|
+
end
|
56
|
+
|
57
|
+
if attributes.has_key?(:'InputFileData')
|
58
|
+
self.input_file_data = attributes[:'InputFileData']
|
59
|
+
end
|
60
|
+
|
61
|
+
if attributes.has_key?(:'TablesToFill')
|
62
|
+
if (value = attributes[:'TablesToFill']).is_a?(Array)
|
63
|
+
self.tables_to_fill = value
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
69
|
+
# @return Array for valid properties with the reasons
|
70
|
+
def list_invalid_properties
|
71
|
+
invalid_properties = Array.new
|
72
|
+
if !@input_file_data.nil? && @input_file_data !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
|
73
|
+
invalid_properties.push('invalid value for "input_file_data", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.')
|
74
|
+
end
|
75
|
+
|
76
|
+
invalid_properties
|
77
|
+
end
|
78
|
+
|
79
|
+
# Check to see if the all the properties in the model are valid
|
80
|
+
# @return true if the model is valid
|
81
|
+
def valid?
|
82
|
+
return false if !@input_file_data.nil? && @input_file_data !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
|
83
|
+
true
|
84
|
+
end
|
85
|
+
|
86
|
+
# Custom attribute writer method with validation
|
87
|
+
# @param [Object] input_file_data Value to be assigned
|
88
|
+
def input_file_data=(input_file_data)
|
89
|
+
if !input_file_data.nil? && input_file_data !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
|
90
|
+
fail ArgumentError, 'invalid value for "input_file_data", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.'
|
91
|
+
end
|
92
|
+
|
93
|
+
@input_file_data = input_file_data
|
94
|
+
end
|
95
|
+
|
96
|
+
# Checks equality by comparing each attribute.
|
97
|
+
# @param [Object] Object to be compared
|
98
|
+
def ==(o)
|
99
|
+
return true if self.equal?(o)
|
100
|
+
self.class == o.class &&
|
101
|
+
input_file_url == o.input_file_url &&
|
102
|
+
input_file_data == o.input_file_data &&
|
103
|
+
tables_to_fill == o.tables_to_fill
|
104
|
+
end
|
105
|
+
|
106
|
+
# @see the `==` method
|
107
|
+
# @param [Object] Object to be compared
|
108
|
+
def eql?(o)
|
109
|
+
self == o
|
110
|
+
end
|
111
|
+
|
112
|
+
# Calculates hash code according to all attributes.
|
113
|
+
# @return [Fixnum] Hash code
|
114
|
+
def hash
|
115
|
+
[input_file_url, input_file_data, tables_to_fill].hash
|
116
|
+
end
|
117
|
+
|
118
|
+
# Builds the object from hash
|
119
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
120
|
+
# @return [Object] Returns the model itself
|
121
|
+
def build_from_hash(attributes)
|
122
|
+
return nil unless attributes.is_a?(Hash)
|
123
|
+
self.class.swagger_types.each_pair do |key, type|
|
124
|
+
if type =~ /\AArray<(.*)>/i
|
125
|
+
# check to ensure the input is an array given that the attribute
|
126
|
+
# is documented as an array but the input is not
|
127
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
128
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
129
|
+
end
|
130
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
131
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
132
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
133
|
+
end
|
134
|
+
|
135
|
+
self
|
136
|
+
end
|
137
|
+
|
138
|
+
# Deserializes the data based on type
|
139
|
+
# @param string type Data type
|
140
|
+
# @param string value Value to be deserialized
|
141
|
+
# @return [Object] Deserialized data
|
142
|
+
def _deserialize(type, value)
|
143
|
+
case type.to_sym
|
144
|
+
when :DateTime
|
145
|
+
DateTime.parse(value)
|
146
|
+
when :Date
|
147
|
+
Date.parse(value)
|
148
|
+
when :String
|
149
|
+
value.to_s
|
150
|
+
when :Integer
|
151
|
+
value.to_i
|
152
|
+
when :Float
|
153
|
+
value.to_f
|
154
|
+
when :BOOLEAN
|
155
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
156
|
+
true
|
157
|
+
else
|
158
|
+
false
|
159
|
+
end
|
160
|
+
when :Object
|
161
|
+
# generic object (usually a Hash), return directly
|
162
|
+
value
|
163
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
164
|
+
inner_type = Regexp.last_match[:inner_type]
|
165
|
+
value.map { |v| _deserialize(inner_type, v) }
|
166
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
167
|
+
k_type = Regexp.last_match[:k_type]
|
168
|
+
v_type = Regexp.last_match[:v_type]
|
169
|
+
{}.tap do |hash|
|
170
|
+
value.each do |k, v|
|
171
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
172
|
+
end
|
173
|
+
end
|
174
|
+
else # model
|
175
|
+
temp_model = CloudmersiveConvertApiClient.const_get(type).new
|
176
|
+
temp_model.build_from_hash(value)
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
# Returns the string representation of the object
|
181
|
+
# @return [String] String presentation of the object
|
182
|
+
def to_s
|
183
|
+
to_hash.to_s
|
184
|
+
end
|
185
|
+
|
186
|
+
# to_body is an alias to to_hash (backward compatibility)
|
187
|
+
# @return [Hash] Returns the object in the form of hash
|
188
|
+
def to_body
|
189
|
+
to_hash
|
190
|
+
end
|
191
|
+
|
192
|
+
# Returns the object in the form of hash
|
193
|
+
# @return [Hash] Returns the object in the form of hash
|
194
|
+
def to_hash
|
195
|
+
hash = {}
|
196
|
+
self.class.attribute_map.each_pair do |attr, param|
|
197
|
+
value = self.send(attr)
|
198
|
+
next if value.nil?
|
199
|
+
hash[param] = _to_hash(value)
|
200
|
+
end
|
201
|
+
hash
|
202
|
+
end
|
203
|
+
|
204
|
+
# Outputs non-array value in the form of hash
|
205
|
+
# For object, use to_hash. Otherwise, just return the value
|
206
|
+
# @param [Object] value Any valid value
|
207
|
+
# @return [Hash] Returns the value in the form of hash
|
208
|
+
def _to_hash(value)
|
209
|
+
if value.is_a?(Array)
|
210
|
+
value.compact.map { |v| _to_hash(v) }
|
211
|
+
elsif value.is_a?(Hash)
|
212
|
+
{}.tap do |hash|
|
213
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
214
|
+
end
|
215
|
+
elsif value.respond_to? :to_hash
|
216
|
+
value.to_hash
|
217
|
+
else
|
218
|
+
value
|
219
|
+
end
|
220
|
+
end
|
221
|
+
|
222
|
+
end
|
223
|
+
end
|
@@ -85,6 +85,8 @@ require 'cloudmersive-convert-api-client/models/docx_style'
|
|
85
85
|
require 'cloudmersive-convert-api-client/models/docx_table'
|
86
86
|
require 'cloudmersive-convert-api-client/models/docx_table_cell'
|
87
87
|
require 'cloudmersive-convert-api-client/models/docx_table_row'
|
88
|
+
require 'cloudmersive-convert-api-client/models/docx_table_single_table_fill'
|
89
|
+
require 'cloudmersive-convert-api-client/models/docx_table_table_fill_multi_request'
|
88
90
|
require 'cloudmersive-convert-api-client/models/docx_table_table_fill_request'
|
89
91
|
require 'cloudmersive-convert-api-client/models/docx_table_table_fill_table_cell'
|
90
92
|
require 'cloudmersive-convert-api-client/models/docx_table_table_fill_table_row'
|
@@ -88,6 +88,18 @@ describe 'TransformDocumentApi' do
|
|
88
88
|
end
|
89
89
|
end
|
90
90
|
|
91
|
+
# unit tests for transform_document_docx_table_fill_in_multi
|
92
|
+
# Fill in data in multiple tables in a Word DOCX document, return result
|
93
|
+
# Replace placeholder rows in multiple tables in an Office Word Document (docx) using one or more templates
|
94
|
+
# @param request
|
95
|
+
# @param [Hash] opts the optional parameters
|
96
|
+
# @return [Object]
|
97
|
+
describe 'transform_document_docx_table_fill_in_multi test' do
|
98
|
+
it 'should work' do
|
99
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
91
103
|
# unit tests for transform_document_pptx_replace
|
92
104
|
# Replace string in PowerPoint PPTX presentation, return result
|
93
105
|
# Replace all instances of a string in an Office PowerPoint Document (pptx)
|
@@ -0,0 +1,53 @@
|
|
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::DocxTableSingleTableFill
|
18
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'DocxTableSingleTableFill' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = CloudmersiveConvertApiClient::DocxTableSingleTableFill.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of DocxTableSingleTableFill' do
|
31
|
+
it 'should create an instance of DocxTableSingleTableFill' do
|
32
|
+
expect(@instance).to be_instance_of(CloudmersiveConvertApiClient::DocxTableSingleTableFill)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "table_start_tag"' 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 "table_end_tag"' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
describe 'test attribute "data_to_fill_in"' do
|
48
|
+
it 'should work' do
|
49
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
@@ -0,0 +1,53 @@
|
|
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::DocxTableTableFillMultiRequest
|
18
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'DocxTableTableFillMultiRequest' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = CloudmersiveConvertApiClient::DocxTableTableFillMultiRequest.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of DocxTableTableFillMultiRequest' do
|
31
|
+
it 'should create an instance of DocxTableTableFillMultiRequest' do
|
32
|
+
expect(@instance).to be_instance_of(CloudmersiveConvertApiClient::DocxTableTableFillMultiRequest)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "input_file_url"' do
|
36
|
+
it 'should work' do
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe 'test attribute "input_file_data"' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
describe 'test attribute "tables_to_fill"' do
|
48
|
+
it 'should work' do
|
49
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
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.
|
4
|
+
version: 2.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cloudmersive
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -276,6 +276,8 @@ files:
|
|
276
276
|
- "./docs/DocxTable.md"
|
277
277
|
- "./docs/DocxTableCell.md"
|
278
278
|
- "./docs/DocxTableRow.md"
|
279
|
+
- "./docs/DocxTableSingleTableFill.md"
|
280
|
+
- "./docs/DocxTableTableFillMultiRequest.md"
|
279
281
|
- "./docs/DocxTableTableFillRequest.md"
|
280
282
|
- "./docs/DocxTableTableFillTableCell.md"
|
281
283
|
- "./docs/DocxTableTableFillTableRow.md"
|
@@ -564,6 +566,8 @@ files:
|
|
564
566
|
- "./lib/cloudmersive-convert-api-client/models/docx_table.rb"
|
565
567
|
- "./lib/cloudmersive-convert-api-client/models/docx_table_cell.rb"
|
566
568
|
- "./lib/cloudmersive-convert-api-client/models/docx_table_row.rb"
|
569
|
+
- "./lib/cloudmersive-convert-api-client/models/docx_table_single_table_fill.rb"
|
570
|
+
- "./lib/cloudmersive-convert-api-client/models/docx_table_table_fill_multi_request.rb"
|
567
571
|
- "./lib/cloudmersive-convert-api-client/models/docx_table_table_fill_request.rb"
|
568
572
|
- "./lib/cloudmersive-convert-api-client/models/docx_table_table_fill_table_cell.rb"
|
569
573
|
- "./lib/cloudmersive-convert-api-client/models/docx_table_table_fill_table_row.rb"
|
@@ -839,7 +843,9 @@ files:
|
|
839
843
|
- "./spec/models/docx_style_spec.rb"
|
840
844
|
- "./spec/models/docx_table_cell_spec.rb"
|
841
845
|
- "./spec/models/docx_table_row_spec.rb"
|
846
|
+
- "./spec/models/docx_table_single_table_fill_spec.rb"
|
842
847
|
- "./spec/models/docx_table_spec.rb"
|
848
|
+
- "./spec/models/docx_table_table_fill_multi_request_spec.rb"
|
843
849
|
- "./spec/models/docx_table_table_fill_request_spec.rb"
|
844
850
|
- "./spec/models/docx_table_table_fill_table_cell_spec.rb"
|
845
851
|
- "./spec/models/docx_table_table_fill_table_row_spec.rb"
|