cloudmersive-convert-api-client 2.2.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fba3cb8a7de3e8fab314a139ec29ca76066790439ed4cc5275b119dad3a7498b
4
- data.tar.gz: d7eef3ee1e23e2f2774cc4ead5376f536c84f1f6172632088260cd253e8e1d4c
3
+ metadata.gz: aca03b0a392d0630380546ff0bd26723a2e7e194f53d0422494cef35a8419010
4
+ data.tar.gz: 6b61c4210bc45ce5ed9b0271ebb16ddbcdb21543c696a95c13a31aa239200833
5
5
  SHA512:
6
- metadata.gz: aca4dafc5d350728aa0eef2efe280524396e501eca6106be6621f10a42bc6f985622b9246c8cd4725d37288eff65e1596490e6446f82f8459499b70d497b3d89
7
- data.tar.gz: c15e4f545f8d6e886d3ae895336af1a64172ee5012df7ed50319e81dcfb9310242eb722ff335339fe5b1da0dbe12a42fa0d4d9d97129ba061c9fb5505f86acc1
6
+ metadata.gz: fd75154a4a59b3d7b0c73f3028df7bc1cbc06578c6218af16816457358e2426d87cba86579885d56459a7fe9a326b5c44a61de9518b5b70ab70aa95e0912b8ab
7
+ data.tar.gz: a51879f112974e63d6118dd43e484aecdbd9e7776642839c08fd9a016f48bac72a622035e7e490981bd4024d57c991a6d00b46043a6839a00825d81d37fdd88e
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.0
10
+ - Package version: 2.2.1
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.0.gem
26
+ gem install ./cloudmersive-convert-api-client-2.2.1.gem
27
27
  ```
28
- (for development, run `gem install --dev ./cloudmersive-convert-api-client-2.2.0.gem` to install the development dependencies)
28
+ (for development, run `gem install --dev ./cloudmersive-convert-api-client-2.2.1.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.0'
34
+ gem 'cloudmersive-convert-api-client', '~> 2.2.1'
35
35
 
36
36
  ### Install from Git
37
37
 
@@ -329,6 +329,7 @@ Class | Method | HTTP request | Description
329
329
  *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
330
  *CloudmersiveConvertApiClient::SplitDocumentApi* | [**split_document_xlsx**](docs/SplitDocumentApi.md#split_document_xlsx) | **POST** /convert/split/xlsx | Split a single Excel XLSX into Separate Worksheets
331
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
332
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
333
334
  *CloudmersiveConvertApiClient::ValidateDocumentApi* | [**validate_document_autodetect_validation**](docs/ValidateDocumentApi.md#validate_document_autodetect_validation) | **POST** /convert/validate/autodetect | Autodetect content type and validate
334
335
  *CloudmersiveConvertApiClient::ValidateDocumentApi* | [**validate_document_csv_validation**](docs/ValidateDocumentApi.md#validate_document_csv_validation) | **POST** /convert/validate/csv | Validate a CSV file document (CSV)
@@ -430,6 +431,9 @@ Class | Method | HTTP request | Description
430
431
  - [CloudmersiveConvertApiClient::DocxTable](docs/DocxTable.md)
431
432
  - [CloudmersiveConvertApiClient::DocxTableCell](docs/DocxTableCell.md)
432
433
  - [CloudmersiveConvertApiClient::DocxTableRow](docs/DocxTableRow.md)
434
+ - [CloudmersiveConvertApiClient::DocxTableTableFillRequest](docs/DocxTableTableFillRequest.md)
435
+ - [CloudmersiveConvertApiClient::DocxTableTableFillTableCell](docs/DocxTableTableFillTableCell.md)
436
+ - [CloudmersiveConvertApiClient::DocxTableTableFillTableRow](docs/DocxTableTableFillTableRow.md)
433
437
  - [CloudmersiveConvertApiClient::DocxTemplateApplicationRequest](docs/DocxTemplateApplicationRequest.md)
434
438
  - [CloudmersiveConvertApiClient::DocxTemplateOperation](docs/DocxTemplateOperation.md)
435
439
  - [CloudmersiveConvertApiClient::DocxText](docs/DocxText.md)
@@ -0,0 +1,12 @@
1
+ # CloudmersiveConvertApiClient::DocxTableTableFillRequest
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
+ **table_start_tag** | **String** | Start tag that delineates the beginning of the table | [optional]
9
+ **table_end_tag** | **String** | End tag that delineates the end of the table | [optional]
10
+ **data_to_fill_in** | [**Array<DocxTableTableFillTableRow>**](DocxTableTableFillTableRow.md) | Data set to populate the table with | [optional]
11
+
12
+
@@ -0,0 +1,9 @@
1
+ # CloudmersiveConvertApiClient::DocxTableTableFillTableCell
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **target_tag** | **String** | Target tag to replace | [optional]
7
+ **replacement_value** | **String** | Replacement value for the target tag | [optional]
8
+
9
+
@@ -0,0 +1,8 @@
1
+ # CloudmersiveConvertApiClient::DocxTableTableFillTableRow
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **cells** | [**Array<DocxTableTableFillTableCell>**](DocxTableTableFillTableCell.md) | Cells in the row to fill in | [optional]
7
+
8
+
@@ -5,6 +5,7 @@ All URIs are relative to *https://api.cloudmersive.com*
5
5
  Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
7
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
8
9
  [**transform_document_pptx_replace**](TransformDocumentApi.md#transform_document_pptx_replace) | **POST** /convert/transform/pptx/replace-all | Replace string in PowerPoint PPTX presentation
9
10
 
10
11
 
@@ -73,6 +74,60 @@ Name | Type | Description | Notes
73
74
 
74
75
 
75
76
 
77
+ # **transform_document_docx_table_fill_in**
78
+ > String transform_document_docx_table_fill_in(request)
79
+
80
+ Fill in data in a table in a Word DOCX document
81
+
82
+ Replace placeholder rows ina table in an Office Word Document (docx) using one or more templates
83
+
84
+ ### Example
85
+ ```ruby
86
+ # load the gem
87
+ require 'cloudmersive-convert-api-client'
88
+ # setup authorization
89
+ CloudmersiveConvertApiClient.configure do |config|
90
+ # Configure API key authorization: Apikey
91
+ config.api_key['Apikey'] = 'YOUR API KEY'
92
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
93
+ #config.api_key_prefix['Apikey'] = 'Bearer'
94
+ end
95
+
96
+ api_instance = CloudmersiveConvertApiClient::TransformDocumentApi.new
97
+
98
+ request = CloudmersiveConvertApiClient::DocxTableTableFillRequest.new # DocxTableTableFillRequest |
99
+
100
+
101
+ begin
102
+ #Fill in data in a table in a Word DOCX document
103
+ result = api_instance.transform_document_docx_table_fill_in(request)
104
+ p result
105
+ rescue CloudmersiveConvertApiClient::ApiError => e
106
+ puts "Exception when calling TransformDocumentApi->transform_document_docx_table_fill_in: #{e}"
107
+ end
108
+ ```
109
+
110
+ ### Parameters
111
+
112
+ Name | Type | Description | Notes
113
+ ------------- | ------------- | ------------- | -------------
114
+ **request** | [**DocxTableTableFillRequest**](DocxTableTableFillRequest.md)| |
115
+
116
+ ### Return type
117
+
118
+ **String**
119
+
120
+ ### Authorization
121
+
122
+ [Apikey](../README.md#Apikey)
123
+
124
+ ### HTTP request headers
125
+
126
+ - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
127
+ - **Accept**: application/octet-stream
128
+
129
+
130
+
76
131
  # **transform_document_pptx_replace**
77
132
  > String transform_document_pptx_replace(match_string, replace_string, opts)
78
133
 
@@ -83,6 +83,9 @@ require 'cloudmersive-convert-api-client/models/docx_style'
83
83
  require 'cloudmersive-convert-api-client/models/docx_table'
84
84
  require 'cloudmersive-convert-api-client/models/docx_table_cell'
85
85
  require 'cloudmersive-convert-api-client/models/docx_table_row'
86
+ require 'cloudmersive-convert-api-client/models/docx_table_table_fill_request'
87
+ require 'cloudmersive-convert-api-client/models/docx_table_table_fill_table_cell'
88
+ require 'cloudmersive-convert-api-client/models/docx_table_table_fill_table_row'
86
89
  require 'cloudmersive-convert-api-client/models/docx_template_application_request'
87
90
  require 'cloudmersive-convert-api-client/models/docx_template_operation'
88
91
  require 'cloudmersive-convert-api-client/models/docx_text'
@@ -88,6 +88,60 @@ 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
92
+ # Replace placeholder rows ina table in an Office Word Document (docx) using one or more templates
93
+ # @param request
94
+ # @param [Hash] opts the optional parameters
95
+ # @return [String]
96
+ def transform_document_docx_table_fill_in(request, opts = {})
97
+ data, _status_code, _headers = transform_document_docx_table_fill_in_with_http_info(request, opts)
98
+ data
99
+ end
100
+
101
+ # Fill in data in a table in a Word DOCX document
102
+ # Replace placeholder rows ina table in an Office Word Document (docx) using one or more templates
103
+ # @param request
104
+ # @param [Hash] opts the optional parameters
105
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
106
+ def transform_document_docx_table_fill_in_with_http_info(request, opts = {})
107
+ if @api_client.config.debugging
108
+ @api_client.config.logger.debug 'Calling API: TransformDocumentApi.transform_document_docx_table_fill_in ...'
109
+ end
110
+ # verify the required parameter 'request' is set
111
+ if @api_client.config.client_side_validation && request.nil?
112
+ fail ArgumentError, "Missing the required parameter 'request' when calling TransformDocumentApi.transform_document_docx_table_fill_in"
113
+ end
114
+ # resource path
115
+ local_var_path = '/convert/transform/docx/table/fill/data'
116
+
117
+ # query parameters
118
+ query_params = {}
119
+
120
+ # header parameters
121
+ header_params = {}
122
+ # HTTP header 'Accept' (if needed)
123
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
124
+ # HTTP header 'Content-Type'
125
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
126
+
127
+ # form parameters
128
+ form_params = {}
129
+
130
+ # http body (model)
131
+ post_body = @api_client.object_to_http_body(request)
132
+ auth_names = ['Apikey']
133
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
134
+ :header_params => header_params,
135
+ :query_params => query_params,
136
+ :form_params => form_params,
137
+ :body => post_body,
138
+ :auth_names => auth_names,
139
+ :return_type => 'String')
140
+ if @api_client.config.debugging
141
+ @api_client.config.logger.debug "API called: TransformDocumentApi#transform_document_docx_table_fill_in\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
142
+ end
143
+ return data, status_code, headers
144
+ end
91
145
  # Replace string in PowerPoint PPTX presentation
92
146
  # Replace all instances of a string in an Office PowerPoint Document (pptx)
93
147
  # @param match_string String to search for and match against, to be replaced
@@ -0,0 +1,243 @@
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 DocxTableTableFillRequest
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
+ # Start tag that delineates the beginning of the table
25
+ attr_accessor :table_start_tag
26
+
27
+ # End tag that delineates the end of the table
28
+ attr_accessor :table_end_tag
29
+
30
+ # Data set to populate the table with
31
+ attr_accessor :data_to_fill_in
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'input_file_url' => :'InputFileUrl',
37
+ :'input_file_data' => :'InputFileData',
38
+ :'table_start_tag' => :'TableStartTag',
39
+ :'table_end_tag' => :'TableEndTag',
40
+ :'data_to_fill_in' => :'DataToFillIn'
41
+ }
42
+ end
43
+
44
+ # Attribute type mapping.
45
+ def self.swagger_types
46
+ {
47
+ :'input_file_url' => :'String',
48
+ :'input_file_data' => :'String',
49
+ :'table_start_tag' => :'String',
50
+ :'table_end_tag' => :'String',
51
+ :'data_to_fill_in' => :'Array<DocxTableTableFillTableRow>'
52
+ }
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param [Hash] attributes Model attributes in the form of hash
57
+ def initialize(attributes = {})
58
+ return unless attributes.is_a?(Hash)
59
+
60
+ # convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
62
+
63
+ if attributes.has_key?(:'InputFileUrl')
64
+ self.input_file_url = attributes[:'InputFileUrl']
65
+ end
66
+
67
+ if attributes.has_key?(:'InputFileData')
68
+ self.input_file_data = attributes[:'InputFileData']
69
+ end
70
+
71
+ if attributes.has_key?(:'TableStartTag')
72
+ self.table_start_tag = attributes[:'TableStartTag']
73
+ end
74
+
75
+ if attributes.has_key?(:'TableEndTag')
76
+ self.table_end_tag = attributes[:'TableEndTag']
77
+ end
78
+
79
+ if attributes.has_key?(:'DataToFillIn')
80
+ if (value = attributes[:'DataToFillIn']).is_a?(Array)
81
+ self.data_to_fill_in = value
82
+ end
83
+ end
84
+ end
85
+
86
+ # Show invalid properties with the reasons. Usually used together with valid?
87
+ # @return Array for valid properties with the reasons
88
+ def list_invalid_properties
89
+ invalid_properties = Array.new
90
+ 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}=)?$/)
91
+ 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}=)?$/.')
92
+ end
93
+
94
+ invalid_properties
95
+ end
96
+
97
+ # Check to see if the all the properties in the model are valid
98
+ # @return true if the model is valid
99
+ def valid?
100
+ 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}=)?$/)
101
+ true
102
+ end
103
+
104
+ # Custom attribute writer method with validation
105
+ # @param [Object] input_file_data Value to be assigned
106
+ def input_file_data=(input_file_data)
107
+ 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}=)?$/)
108
+ 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}=)?$/.'
109
+ end
110
+
111
+ @input_file_data = input_file_data
112
+ end
113
+
114
+ # Checks equality by comparing each attribute.
115
+ # @param [Object] Object to be compared
116
+ def ==(o)
117
+ return true if self.equal?(o)
118
+ self.class == o.class &&
119
+ input_file_url == o.input_file_url &&
120
+ input_file_data == o.input_file_data &&
121
+ table_start_tag == o.table_start_tag &&
122
+ table_end_tag == o.table_end_tag &&
123
+ data_to_fill_in == o.data_to_fill_in
124
+ end
125
+
126
+ # @see the `==` method
127
+ # @param [Object] Object to be compared
128
+ def eql?(o)
129
+ self == o
130
+ end
131
+
132
+ # Calculates hash code according to all attributes.
133
+ # @return [Fixnum] Hash code
134
+ def hash
135
+ [input_file_url, input_file_data, table_start_tag, table_end_tag, data_to_fill_in].hash
136
+ end
137
+
138
+ # Builds the object from hash
139
+ # @param [Hash] attributes Model attributes in the form of hash
140
+ # @return [Object] Returns the model itself
141
+ def build_from_hash(attributes)
142
+ return nil unless attributes.is_a?(Hash)
143
+ self.class.swagger_types.each_pair do |key, type|
144
+ if type =~ /\AArray<(.*)>/i
145
+ # check to ensure the input is an array given that the attribute
146
+ # is documented as an array but the input is not
147
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
148
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
149
+ end
150
+ elsif !attributes[self.class.attribute_map[key]].nil?
151
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
152
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
153
+ end
154
+
155
+ self
156
+ end
157
+
158
+ # Deserializes the data based on type
159
+ # @param string type Data type
160
+ # @param string value Value to be deserialized
161
+ # @return [Object] Deserialized data
162
+ def _deserialize(type, value)
163
+ case type.to_sym
164
+ when :DateTime
165
+ DateTime.parse(value)
166
+ when :Date
167
+ Date.parse(value)
168
+ when :String
169
+ value.to_s
170
+ when :Integer
171
+ value.to_i
172
+ when :Float
173
+ value.to_f
174
+ when :BOOLEAN
175
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
176
+ true
177
+ else
178
+ false
179
+ end
180
+ when :Object
181
+ # generic object (usually a Hash), return directly
182
+ value
183
+ when /\AArray<(?<inner_type>.+)>\z/
184
+ inner_type = Regexp.last_match[:inner_type]
185
+ value.map { |v| _deserialize(inner_type, v) }
186
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
187
+ k_type = Regexp.last_match[:k_type]
188
+ v_type = Regexp.last_match[:v_type]
189
+ {}.tap do |hash|
190
+ value.each do |k, v|
191
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
192
+ end
193
+ end
194
+ else # model
195
+ temp_model = CloudmersiveConvertApiClient.const_get(type).new
196
+ temp_model.build_from_hash(value)
197
+ end
198
+ end
199
+
200
+ # Returns the string representation of the object
201
+ # @return [String] String presentation of the object
202
+ def to_s
203
+ to_hash.to_s
204
+ end
205
+
206
+ # to_body is an alias to to_hash (backward compatibility)
207
+ # @return [Hash] Returns the object in the form of hash
208
+ def to_body
209
+ to_hash
210
+ end
211
+
212
+ # Returns the object in the form of hash
213
+ # @return [Hash] Returns the object in the form of hash
214
+ def to_hash
215
+ hash = {}
216
+ self.class.attribute_map.each_pair do |attr, param|
217
+ value = self.send(attr)
218
+ next if value.nil?
219
+ hash[param] = _to_hash(value)
220
+ end
221
+ hash
222
+ end
223
+
224
+ # Outputs non-array value in the form of hash
225
+ # For object, use to_hash. Otherwise, just return the value
226
+ # @param [Object] value Any valid value
227
+ # @return [Hash] Returns the value in the form of hash
228
+ def _to_hash(value)
229
+ if value.is_a?(Array)
230
+ value.compact.map { |v| _to_hash(v) }
231
+ elsif value.is_a?(Hash)
232
+ {}.tap do |hash|
233
+ value.each { |k, v| hash[k] = _to_hash(v) }
234
+ end
235
+ elsif value.respond_to? :to_hash
236
+ value.to_hash
237
+ else
238
+ value
239
+ end
240
+ end
241
+
242
+ end
243
+ 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
+ # Cell data to fill in to the DOCX Table
17
+ class DocxTableTableFillTableCell
18
+ # Target tag to replace
19
+ attr_accessor :target_tag
20
+
21
+ # Replacement value for the target tag
22
+ attr_accessor :replacement_value
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'target_tag' => :'TargetTag',
28
+ :'replacement_value' => :'ReplacementValue'
29
+ }
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.swagger_types
34
+ {
35
+ :'target_tag' => :'String',
36
+ :'replacement_value' => :'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?(:'TargetTag')
49
+ self.target_tag = attributes[:'TargetTag']
50
+ end
51
+
52
+ if attributes.has_key?(:'ReplacementValue')
53
+ self.replacement_value = attributes[:'ReplacementValue']
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
+ target_tag == o.target_tag &&
76
+ replacement_value == o.replacement_value
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
+ [target_tag, replacement_value].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,188 @@
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
+ # Row data to fill in to the DOCX Table
17
+ class DocxTableTableFillTableRow
18
+ # Cells in the row to fill in
19
+ attr_accessor :cells
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'cells' => :'Cells'
25
+ }
26
+ end
27
+
28
+ # Attribute type mapping.
29
+ def self.swagger_types
30
+ {
31
+ :'cells' => :'Array<DocxTableTableFillTableCell>'
32
+ }
33
+ end
34
+
35
+ # Initializes the object
36
+ # @param [Hash] attributes Model attributes in the form of hash
37
+ def initialize(attributes = {})
38
+ return unless attributes.is_a?(Hash)
39
+
40
+ # convert string to symbol for hash key
41
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
42
+
43
+ if attributes.has_key?(:'Cells')
44
+ if (value = attributes[:'Cells']).is_a?(Array)
45
+ self.cells = value
46
+ end
47
+ end
48
+ end
49
+
50
+ # Show invalid properties with the reasons. Usually used together with valid?
51
+ # @return Array for valid properties with the reasons
52
+ def list_invalid_properties
53
+ invalid_properties = Array.new
54
+ invalid_properties
55
+ end
56
+
57
+ # Check to see if the all the properties in the model are valid
58
+ # @return true if the model is valid
59
+ def valid?
60
+ true
61
+ end
62
+
63
+ # Checks equality by comparing each attribute.
64
+ # @param [Object] Object to be compared
65
+ def ==(o)
66
+ return true if self.equal?(o)
67
+ self.class == o.class &&
68
+ cells == o.cells
69
+ end
70
+
71
+ # @see the `==` method
72
+ # @param [Object] Object to be compared
73
+ def eql?(o)
74
+ self == o
75
+ end
76
+
77
+ # Calculates hash code according to all attributes.
78
+ # @return [Fixnum] Hash code
79
+ def hash
80
+ [cells].hash
81
+ end
82
+
83
+ # Builds the object from hash
84
+ # @param [Hash] attributes Model attributes in the form of hash
85
+ # @return [Object] Returns the model itself
86
+ def build_from_hash(attributes)
87
+ return nil unless attributes.is_a?(Hash)
88
+ self.class.swagger_types.each_pair do |key, type|
89
+ if type =~ /\AArray<(.*)>/i
90
+ # check to ensure the input is an array given that the attribute
91
+ # is documented as an array but the input is not
92
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
93
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
94
+ end
95
+ elsif !attributes[self.class.attribute_map[key]].nil?
96
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
97
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
98
+ end
99
+
100
+ self
101
+ end
102
+
103
+ # Deserializes the data based on type
104
+ # @param string type Data type
105
+ # @param string value Value to be deserialized
106
+ # @return [Object] Deserialized data
107
+ def _deserialize(type, value)
108
+ case type.to_sym
109
+ when :DateTime
110
+ DateTime.parse(value)
111
+ when :Date
112
+ Date.parse(value)
113
+ when :String
114
+ value.to_s
115
+ when :Integer
116
+ value.to_i
117
+ when :Float
118
+ value.to_f
119
+ when :BOOLEAN
120
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
121
+ true
122
+ else
123
+ false
124
+ end
125
+ when :Object
126
+ # generic object (usually a Hash), return directly
127
+ value
128
+ when /\AArray<(?<inner_type>.+)>\z/
129
+ inner_type = Regexp.last_match[:inner_type]
130
+ value.map { |v| _deserialize(inner_type, v) }
131
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
132
+ k_type = Regexp.last_match[:k_type]
133
+ v_type = Regexp.last_match[:v_type]
134
+ {}.tap do |hash|
135
+ value.each do |k, v|
136
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
137
+ end
138
+ end
139
+ else # model
140
+ temp_model = CloudmersiveConvertApiClient.const_get(type).new
141
+ temp_model.build_from_hash(value)
142
+ end
143
+ end
144
+
145
+ # Returns the string representation of the object
146
+ # @return [String] String presentation of the object
147
+ def to_s
148
+ to_hash.to_s
149
+ end
150
+
151
+ # to_body is an alias to to_hash (backward compatibility)
152
+ # @return [Hash] Returns the object in the form of hash
153
+ def to_body
154
+ to_hash
155
+ end
156
+
157
+ # Returns the object in the form of hash
158
+ # @return [Hash] Returns the object in the form of hash
159
+ def to_hash
160
+ hash = {}
161
+ self.class.attribute_map.each_pair do |attr, param|
162
+ value = self.send(attr)
163
+ next if value.nil?
164
+ hash[param] = _to_hash(value)
165
+ end
166
+ hash
167
+ end
168
+
169
+ # Outputs non-array value in the form of hash
170
+ # For object, use to_hash. Otherwise, just return the value
171
+ # @param [Object] value Any valid value
172
+ # @return [Hash] Returns the value in the form of hash
173
+ def _to_hash(value)
174
+ if value.is_a?(Array)
175
+ value.compact.map { |v| _to_hash(v) }
176
+ elsif value.is_a?(Hash)
177
+ {}.tap do |hash|
178
+ value.each { |k, v| hash[k] = _to_hash(v) }
179
+ end
180
+ elsif value.respond_to? :to_hash
181
+ value.to_hash
182
+ else
183
+ value
184
+ end
185
+ end
186
+
187
+ end
188
+ end
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.14
11
11
  =end
12
12
 
13
13
  module CloudmersiveConvertApiClient
14
- VERSION = '2.2.0'
14
+ VERSION = '2.2.1'
15
15
  end
@@ -48,6 +48,18 @@ describe 'TransformDocumentApi' do
48
48
  end
49
49
  end
50
50
 
51
+ # unit tests for transform_document_docx_table_fill_in
52
+ # Fill in data in a table in a Word DOCX document
53
+ # Replace placeholder rows ina table in an Office Word Document (docx) using one or more templates
54
+ # @param request
55
+ # @param [Hash] opts the optional parameters
56
+ # @return [String]
57
+ describe 'transform_document_docx_table_fill_in test' do
58
+ it 'should work' do
59
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
60
+ end
61
+ end
62
+
51
63
  # unit tests for transform_document_pptx_replace
52
64
  # Replace string in PowerPoint PPTX presentation
53
65
  # Replace all instances of a string in an Office PowerPoint Document (pptx)
@@ -0,0 +1,65 @@
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::DocxTableTableFillRequest
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'DocxTableTableFillRequest' do
21
+ before do
22
+ # run before each test
23
+ @instance = CloudmersiveConvertApiClient::DocxTableTableFillRequest.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of DocxTableTableFillRequest' do
31
+ it 'should create an instance of DocxTableTableFillRequest' do
32
+ expect(@instance).to be_instance_of(CloudmersiveConvertApiClient::DocxTableTableFillRequest)
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 "table_start_tag"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
53
+ describe 'test attribute "table_end_tag"' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
59
+ describe 'test attribute "data_to_fill_in"' do
60
+ it 'should work' do
61
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
62
+ end
63
+ end
64
+
65
+ end
@@ -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::DocxTableTableFillTableCell
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'DocxTableTableFillTableCell' do
21
+ before do
22
+ # run before each test
23
+ @instance = CloudmersiveConvertApiClient::DocxTableTableFillTableCell.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of DocxTableTableFillTableCell' do
31
+ it 'should create an instance of DocxTableTableFillTableCell' do
32
+ expect(@instance).to be_instance_of(CloudmersiveConvertApiClient::DocxTableTableFillTableCell)
33
+ end
34
+ end
35
+ describe 'test attribute "target_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 "replacement_value"' 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,41 @@
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::DocxTableTableFillTableRow
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'DocxTableTableFillTableRow' do
21
+ before do
22
+ # run before each test
23
+ @instance = CloudmersiveConvertApiClient::DocxTableTableFillTableRow.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of DocxTableTableFillTableRow' do
31
+ it 'should create an instance of DocxTableTableFillTableRow' do
32
+ expect(@instance).to be_instance_of(CloudmersiveConvertApiClient::DocxTableTableFillTableRow)
33
+ end
34
+ end
35
+ describe 'test attribute "cells"' 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
+ 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.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cloudmersive
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-28 00:00:00.000000000 Z
11
+ date: 2021-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -274,6 +274,9 @@ files:
274
274
  - "./docs/DocxTable.md"
275
275
  - "./docs/DocxTableCell.md"
276
276
  - "./docs/DocxTableRow.md"
277
+ - "./docs/DocxTableTableFillRequest.md"
278
+ - "./docs/DocxTableTableFillTableCell.md"
279
+ - "./docs/DocxTableTableFillTableRow.md"
277
280
  - "./docs/DocxTemplateApplicationRequest.md"
278
281
  - "./docs/DocxTemplateOperation.md"
279
282
  - "./docs/DocxText.md"
@@ -557,6 +560,9 @@ files:
557
560
  - "./lib/cloudmersive-convert-api-client/models/docx_table.rb"
558
561
  - "./lib/cloudmersive-convert-api-client/models/docx_table_cell.rb"
559
562
  - "./lib/cloudmersive-convert-api-client/models/docx_table_row.rb"
563
+ - "./lib/cloudmersive-convert-api-client/models/docx_table_table_fill_request.rb"
564
+ - "./lib/cloudmersive-convert-api-client/models/docx_table_table_fill_table_cell.rb"
565
+ - "./lib/cloudmersive-convert-api-client/models/docx_table_table_fill_table_row.rb"
560
566
  - "./lib/cloudmersive-convert-api-client/models/docx_template_application_request.rb"
561
567
  - "./lib/cloudmersive-convert-api-client/models/docx_template_operation.rb"
562
568
  - "./lib/cloudmersive-convert-api-client/models/docx_text.rb"
@@ -828,6 +834,9 @@ files:
828
834
  - "./spec/models/docx_table_cell_spec.rb"
829
835
  - "./spec/models/docx_table_row_spec.rb"
830
836
  - "./spec/models/docx_table_spec.rb"
837
+ - "./spec/models/docx_table_table_fill_request_spec.rb"
838
+ - "./spec/models/docx_table_table_fill_table_cell_spec.rb"
839
+ - "./spec/models/docx_table_table_fill_table_row_spec.rb"
831
840
  - "./spec/models/docx_template_application_request_spec.rb"
832
841
  - "./spec/models/docx_template_operation_spec.rb"
833
842
  - "./spec/models/docx_text_spec.rb"