form_api 1.1.0 → 1.2.0
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 +5 -5
- data/Gemfile.lock +1 -1
- data/README.md +8 -7
- data/docs/CombinedSubmissionData.md +1 -1
- data/docs/CreateSubmissionData.md +1 -0
- data/docs/CreateSubmissionDataBatchV1.md +12 -0
- data/docs/CreateSubmissionResponse.md +0 -1
- data/docs/PDFApi.md +5 -5
- data/docs/Submission.md +1 -0
- data/docs/SubmissionDataRequest.md +3 -3
- data/docs/SubmissionDataRequestData.md +12 -0
- data/lib/form_api.rb +2 -1
- data/lib/form_api/api/pdf_api.rb +12 -12
- data/lib/form_api/models/combined_submission_data.rb +1 -1
- data/lib/form_api/models/create_submission_data.rb +15 -4
- data/lib/form_api/models/create_submission_data_batch_v1.rb +224 -0
- data/lib/form_api/models/create_submission_response.rb +1 -12
- data/lib/form_api/models/submission.rb +15 -4
- data/lib/form_api/models/submission_data_request.rb +1 -11
- data/lib/form_api/models/{create_submission_batch_v1_submissions_response.rb → submission_data_request_data.rb} +40 -56
- data/lib/form_api/version.rb +1 -1
- data/spec/api/pdf_api_integration_spec.rb +41 -0
- data/spec/api/pdf_api_spec_original.skipped.rb +4 -4
- data/spec/models/{create_submission_batch_v1_submissions_response_spec.rb → create_submission_data_batch_v1_spec.rb} +21 -13
- data/spec/models/create_submission_data_spec.rb +6 -0
- data/spec/models/create_submission_response_spec.rb +0 -6
- data/spec/models/submission_data_request_data_spec.rb +65 -0
- data/spec/models/submission_spec.rb +6 -0
- metadata +11 -7
- data/docs/CreateSubmissionBatchV1SubmissionsResponse.md +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f6c112bcd18aa30cc3bbe6d81cefd3b9b82382cf7b645ef7844905d594e47c4e
|
4
|
+
data.tar.gz: b14d3023317b5e8eda5d8db3c62fe0537c61213c07c058a6330e8ec44b6ab716
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2844d4d2d9744c40a40a78df852f6b59a8fce19210204995fa5e983c17fd14b526f3a671ed8a28609de6ee5ee1b17593d49c186a7fc252e003c6bfc3b59701c9
|
7
|
+
data.tar.gz: 2602eda92790f3aa9cd7c2cfdc76714d47441821077b49577b304ec32a4ade0502bb629a6e7aba1ab3666f9786beadcdf30494a6648e58d876e342036a11a959
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -7,7 +7,7 @@ No description provided (generated by Openapi Generator https://github.com/opena
|
|
7
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
8
8
|
|
9
9
|
- API version: v1
|
10
|
-
- Package version: 1.
|
10
|
+
- Package version: 1.2.0
|
11
11
|
- Build package: io.formapi.codegen.FormApiRubyClientCodegen
|
12
12
|
|
13
13
|
## Installation
|
@@ -23,15 +23,15 @@ gem build form_api.gemspec
|
|
23
23
|
Then either install the gem locally:
|
24
24
|
|
25
25
|
```shell
|
26
|
-
gem install ./form_api-1.
|
26
|
+
gem install ./form_api-1.2.0.gem
|
27
27
|
```
|
28
|
-
(for development, run `gem install --dev ./form_api-1.
|
28
|
+
(for development, run `gem install --dev ./form_api-1.2.0.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 'form_api', '~> 1.
|
34
|
+
gem 'form_api', '~> 1.2.0'
|
35
35
|
|
36
36
|
### Install from Git
|
37
37
|
|
@@ -63,11 +63,11 @@ end
|
|
63
63
|
|
64
64
|
api_instance = FormAPI::PDFApi.new
|
65
65
|
template_id = 'tpl_000000000000000001' # String |
|
66
|
-
|
66
|
+
create_submission_data_batch_v1 = nil # Array<CreateSubmissionDataBatchV1> |
|
67
67
|
|
68
68
|
begin
|
69
69
|
#Generates multiple PDFs
|
70
|
-
result = api_instance.batch_generate_pdf_v1(template_id,
|
70
|
+
result = api_instance.batch_generate_pdf_v1(template_id, create_submission_data_batch_v1)
|
71
71
|
p result
|
72
72
|
rescue FormAPI::ApiError => e
|
73
73
|
puts "Exception when calling PDFApi->batch_generate_pdf_v1: #{e}"
|
@@ -105,9 +105,9 @@ Class | Method | HTTP request | Description
|
|
105
105
|
- [FormAPI::CreateCombinedSubmissionResponse](docs/CreateCombinedSubmissionResponse.md)
|
106
106
|
- [FormAPI::CreateSubmissionBatchResponse](docs/CreateSubmissionBatchResponse.md)
|
107
107
|
- [FormAPI::CreateSubmissionBatchSubmissionsResponse](docs/CreateSubmissionBatchSubmissionsResponse.md)
|
108
|
-
- [FormAPI::CreateSubmissionBatchV1SubmissionsResponse](docs/CreateSubmissionBatchV1SubmissionsResponse.md)
|
109
108
|
- [FormAPI::CreateSubmissionData](docs/CreateSubmissionData.md)
|
110
109
|
- [FormAPI::CreateSubmissionDataBatchRequest](docs/CreateSubmissionDataBatchRequest.md)
|
110
|
+
- [FormAPI::CreateSubmissionDataBatchV1](docs/CreateSubmissionDataBatchV1.md)
|
111
111
|
- [FormAPI::CreateSubmissionDataRequestTokenResponse](docs/CreateSubmissionDataRequestTokenResponse.md)
|
112
112
|
- [FormAPI::CreateSubmissionDataRequestTokenResponseToken](docs/CreateSubmissionDataRequestTokenResponseToken.md)
|
113
113
|
- [FormAPI::CreateSubmissionResponse](docs/CreateSubmissionResponse.md)
|
@@ -117,6 +117,7 @@ Class | Method | HTTP request | Description
|
|
117
117
|
- [FormAPI::SubmissionBatch](docs/SubmissionBatch.md)
|
118
118
|
- [FormAPI::SubmissionBatchData](docs/SubmissionBatchData.md)
|
119
119
|
- [FormAPI::SubmissionDataRequest](docs/SubmissionDataRequest.md)
|
120
|
+
- [FormAPI::SubmissionDataRequestData](docs/SubmissionDataRequestData.md)
|
120
121
|
- [FormAPI::Template](docs/Template.md)
|
121
122
|
|
122
123
|
|
@@ -8,5 +8,6 @@ Name | Type | Description | Notes
|
|
8
8
|
**html** | **String** | | [optional]
|
9
9
|
**css** | **String** | | [optional]
|
10
10
|
**metadata** | **Object** | | [optional]
|
11
|
+
**data_requests** | [**Array<SubmissionDataRequestData>**](SubmissionDataRequestData.md) | | [optional]
|
11
12
|
|
12
13
|
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# FormAPI::CreateSubmissionDataBatchV1
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**test** | **BOOLEAN** | | [optional]
|
7
|
+
**data** | **Object** | |
|
8
|
+
**html** | **String** | | [optional]
|
9
|
+
**css** | **String** | | [optional]
|
10
|
+
**metadata** | **Object** | | [optional]
|
11
|
+
|
12
|
+
|
@@ -5,7 +5,6 @@ Name | Type | Description | Notes
|
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
6
|
**submission** | [**Submission**](Submission.md) | | [optional]
|
7
7
|
**errors** | **Array<String>** | | [optional]
|
8
|
-
**data_requests** | [**Array<SubmissionDataRequest>**](SubmissionDataRequest.md) | | [optional]
|
9
8
|
**status** | **String** | | [optional]
|
10
9
|
|
11
10
|
|
data/docs/PDFApi.md
CHANGED
@@ -20,7 +20,7 @@ Method | HTTP request | Description
|
|
20
20
|
|
21
21
|
|
22
22
|
# **batch_generate_pdf_v1**
|
23
|
-
> Array<
|
23
|
+
> Array<CreateSubmissionResponse> batch_generate_pdf_v1(template_id, create_submission_data_batch_v1)
|
24
24
|
|
25
25
|
Generates multiple PDFs
|
26
26
|
|
@@ -37,11 +37,11 @@ end
|
|
37
37
|
|
38
38
|
api_instance = FormAPI::PDFApi.new
|
39
39
|
template_id = 'tpl_000000000000000001' # String |
|
40
|
-
|
40
|
+
create_submission_data_batch_v1 = nil # Array<CreateSubmissionDataBatchV1> |
|
41
41
|
|
42
42
|
begin
|
43
43
|
#Generates multiple PDFs
|
44
|
-
result = api_instance.batch_generate_pdf_v1(template_id,
|
44
|
+
result = api_instance.batch_generate_pdf_v1(template_id, create_submission_data_batch_v1)
|
45
45
|
p result
|
46
46
|
rescue FormAPI::ApiError => e
|
47
47
|
puts "Exception when calling PDFApi->batch_generate_pdf_v1: #{e}"
|
@@ -53,11 +53,11 @@ end
|
|
53
53
|
Name | Type | Description | Notes
|
54
54
|
------------- | ------------- | ------------- | -------------
|
55
55
|
**template_id** | **String**| |
|
56
|
-
**
|
56
|
+
**create_submission_data_batch_v1** | [**Array<CreateSubmissionDataBatchV1>**](Array.md)| |
|
57
57
|
|
58
58
|
### Return type
|
59
59
|
|
60
|
-
[**Array<
|
60
|
+
[**Array<CreateSubmissionResponse>**](CreateSubmissionResponse.md)
|
61
61
|
|
62
62
|
### Authorization
|
63
63
|
|
data/docs/Submission.md
CHANGED
@@ -12,5 +12,6 @@ Name | Type | Description | Notes
|
|
12
12
|
**metadata** | **Object** | | [optional]
|
13
13
|
**download_url** | **String** | | [optional]
|
14
14
|
**batch_id** | **String** | | [optional]
|
15
|
+
**data_requests** | [**Array<SubmissionDataRequest>**](SubmissionDataRequest.md) | | [optional]
|
15
16
|
|
16
17
|
|
@@ -6,11 +6,11 @@ Name | Type | Description | Notes
|
|
6
6
|
**id** | **String** | |
|
7
7
|
**name** | **String** | |
|
8
8
|
**email** | **String** | |
|
9
|
-
**order** | **
|
9
|
+
**order** | **Integer** | |
|
10
10
|
**fields** | **Array<String>** | |
|
11
11
|
**metadata** | **Object** | |
|
12
12
|
**state** | **String** | |
|
13
|
-
**viewed_at** | **String** | |
|
14
|
-
**completed_at** | **String** | |
|
13
|
+
**viewed_at** | **String** | | [optional]
|
14
|
+
**completed_at** | **String** | | [optional]
|
15
15
|
|
16
16
|
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# FormAPI::SubmissionDataRequestData
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**metadata** | **Object** | | [optional]
|
7
|
+
**name** | **String** | | [optional]
|
8
|
+
**fields** | **Array<String>** | | [optional]
|
9
|
+
**email** | **String** | | [optional]
|
10
|
+
**order** | **Integer** | | [optional]
|
11
|
+
|
12
|
+
|
data/lib/form_api.rb
CHANGED
@@ -24,9 +24,9 @@ require 'form_api/models/combined_submission_data'
|
|
24
24
|
require 'form_api/models/create_combined_submission_response'
|
25
25
|
require 'form_api/models/create_submission_batch_response'
|
26
26
|
require 'form_api/models/create_submission_batch_submissions_response'
|
27
|
-
require 'form_api/models/create_submission_batch_v1_submissions_response'
|
28
27
|
require 'form_api/models/create_submission_data'
|
29
28
|
require 'form_api/models/create_submission_data_batch_request'
|
29
|
+
require 'form_api/models/create_submission_data_batch_v1'
|
30
30
|
require 'form_api/models/create_submission_data_request_token_response'
|
31
31
|
require 'form_api/models/create_submission_data_request_token_response_token'
|
32
32
|
require 'form_api/models/create_submission_response'
|
@@ -36,6 +36,7 @@ require 'form_api/models/submission'
|
|
36
36
|
require 'form_api/models/submission_batch'
|
37
37
|
require 'form_api/models/submission_batch_data'
|
38
38
|
require 'form_api/models/submission_data_request'
|
39
|
+
require 'form_api/models/submission_data_request_data'
|
39
40
|
require 'form_api/models/template'
|
40
41
|
|
41
42
|
# APIs
|
data/lib/form_api/api/pdf_api.rb
CHANGED
@@ -21,20 +21,20 @@ module FormAPI
|
|
21
21
|
end
|
22
22
|
# Generates multiple PDFs
|
23
23
|
# @param template_id
|
24
|
-
# @param
|
24
|
+
# @param create_submission_data_batch_v1
|
25
25
|
# @param [Hash] opts the optional parameters
|
26
|
-
# @return [Array<
|
27
|
-
def batch_generate_pdf_v1(template_id,
|
28
|
-
data, _status_code, _headers = batch_generate_pdf_v1_with_http_info(template_id,
|
26
|
+
# @return [Array<CreateSubmissionResponse>]
|
27
|
+
def batch_generate_pdf_v1(template_id, create_submission_data_batch_v1, opts = {})
|
28
|
+
data, _status_code, _headers = batch_generate_pdf_v1_with_http_info(template_id, create_submission_data_batch_v1, opts)
|
29
29
|
data
|
30
30
|
end
|
31
31
|
|
32
32
|
# Generates multiple PDFs
|
33
33
|
# @param template_id
|
34
|
-
# @param
|
34
|
+
# @param create_submission_data_batch_v1
|
35
35
|
# @param [Hash] opts the optional parameters
|
36
|
-
# @return [Array<(Array<
|
37
|
-
def batch_generate_pdf_v1_with_http_info(template_id,
|
36
|
+
# @return [Array<(Array<CreateSubmissionResponse>, Fixnum, Hash)>] Array<CreateSubmissionResponse> data, response status code and response headers
|
37
|
+
def batch_generate_pdf_v1_with_http_info(template_id, create_submission_data_batch_v1, opts = {})
|
38
38
|
if @api_client.config.debugging
|
39
39
|
@api_client.config.logger.debug 'Calling API: PDFApi.batch_generate_pdf_v1 ...'
|
40
40
|
end
|
@@ -42,9 +42,9 @@ module FormAPI
|
|
42
42
|
if @api_client.config.client_side_validation && template_id.nil?
|
43
43
|
fail ArgumentError, "Missing the required parameter 'template_id' when calling PDFApi.batch_generate_pdf_v1"
|
44
44
|
end
|
45
|
-
# verify the required parameter '
|
46
|
-
if @api_client.config.client_side_validation &&
|
47
|
-
fail ArgumentError, "Missing the required parameter '
|
45
|
+
# verify the required parameter 'create_submission_data_batch_v1' is set
|
46
|
+
if @api_client.config.client_side_validation && create_submission_data_batch_v1.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'create_submission_data_batch_v1' when calling PDFApi.batch_generate_pdf_v1"
|
48
48
|
end
|
49
49
|
# resource path
|
50
50
|
local_var_path = '/templates/{template_id}/submissions/batch'.sub('{' + 'template_id' + '}', template_id.to_s)
|
@@ -63,7 +63,7 @@ module FormAPI
|
|
63
63
|
form_params = {}
|
64
64
|
|
65
65
|
# http body (model)
|
66
|
-
post_body = @api_client.object_to_http_body(
|
66
|
+
post_body = @api_client.object_to_http_body(create_submission_data_batch_v1)
|
67
67
|
auth_names = ['api_token_basic']
|
68
68
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
69
69
|
:header_params => header_params,
|
@@ -71,7 +71,7 @@ module FormAPI
|
|
71
71
|
:form_params => form_params,
|
72
72
|
:body => post_body,
|
73
73
|
:auth_names => auth_names,
|
74
|
-
:return_type => 'Array<
|
74
|
+
:return_type => 'Array<CreateSubmissionResponse>')
|
75
75
|
if @api_client.config.debugging
|
76
76
|
@api_client.config.logger.debug "API called: PDFApi#batch_generate_pdf_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
77
77
|
end
|
@@ -24,6 +24,8 @@ module FormAPI
|
|
24
24
|
|
25
25
|
attr_accessor :metadata
|
26
26
|
|
27
|
+
attr_accessor :data_requests
|
28
|
+
|
27
29
|
# Attribute mapping from ruby-style variable name to JSON key.
|
28
30
|
def self.attribute_map
|
29
31
|
{
|
@@ -31,7 +33,8 @@ module FormAPI
|
|
31
33
|
:'data' => :'data',
|
32
34
|
:'html' => :'html',
|
33
35
|
:'css' => :'css',
|
34
|
-
:'metadata' => :'metadata'
|
36
|
+
:'metadata' => :'metadata',
|
37
|
+
:'data_requests' => :'data_requests'
|
35
38
|
}
|
36
39
|
end
|
37
40
|
|
@@ -42,7 +45,8 @@ module FormAPI
|
|
42
45
|
:'data' => :'Object',
|
43
46
|
:'html' => :'String',
|
44
47
|
:'css' => :'String',
|
45
|
-
:'metadata' => :'Object'
|
48
|
+
:'metadata' => :'Object',
|
49
|
+
:'data_requests' => :'Array<SubmissionDataRequestData>'
|
46
50
|
}
|
47
51
|
end
|
48
52
|
|
@@ -73,6 +77,12 @@ module FormAPI
|
|
73
77
|
if attributes.has_key?(:'metadata')
|
74
78
|
self.metadata = attributes[:'metadata']
|
75
79
|
end
|
80
|
+
|
81
|
+
if attributes.has_key?(:'data_requests')
|
82
|
+
if (value = attributes[:'data_requests']).is_a?(Array)
|
83
|
+
self.data_requests = value
|
84
|
+
end
|
85
|
+
end
|
76
86
|
end
|
77
87
|
|
78
88
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -102,7 +112,8 @@ module FormAPI
|
|
102
112
|
data == o.data &&
|
103
113
|
html == o.html &&
|
104
114
|
css == o.css &&
|
105
|
-
metadata == o.metadata
|
115
|
+
metadata == o.metadata &&
|
116
|
+
data_requests == o.data_requests
|
106
117
|
end
|
107
118
|
|
108
119
|
# @see the `==` method
|
@@ -114,7 +125,7 @@ module FormAPI
|
|
114
125
|
# Calculates hash code according to all attributes.
|
115
126
|
# @return [Fixnum] Hash code
|
116
127
|
def hash
|
117
|
-
[test, data, html, css, metadata].hash
|
128
|
+
[test, data, html, css, metadata, data_requests].hash
|
118
129
|
end
|
119
130
|
|
120
131
|
# Builds the object from hash
|
@@ -0,0 +1,224 @@
|
|
1
|
+
=begin
|
2
|
+
#API V1
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
OpenAPI spec version: v1
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 3.3.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module FormAPI
|
16
|
+
class CreateSubmissionDataBatchV1
|
17
|
+
attr_accessor :test
|
18
|
+
|
19
|
+
attr_accessor :data
|
20
|
+
|
21
|
+
attr_accessor :html
|
22
|
+
|
23
|
+
attr_accessor :css
|
24
|
+
|
25
|
+
attr_accessor :metadata
|
26
|
+
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
28
|
+
def self.attribute_map
|
29
|
+
{
|
30
|
+
:'test' => :'test',
|
31
|
+
:'data' => :'data',
|
32
|
+
:'html' => :'html',
|
33
|
+
:'css' => :'css',
|
34
|
+
:'metadata' => :'metadata'
|
35
|
+
}
|
36
|
+
end
|
37
|
+
|
38
|
+
# Attribute type mapping.
|
39
|
+
def self.openapi_types
|
40
|
+
{
|
41
|
+
:'test' => :'BOOLEAN',
|
42
|
+
:'data' => :'Object',
|
43
|
+
:'html' => :'String',
|
44
|
+
:'css' => :'String',
|
45
|
+
:'metadata' => :'Object'
|
46
|
+
}
|
47
|
+
end
|
48
|
+
|
49
|
+
# Initializes the object
|
50
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
51
|
+
def initialize(attributes = {})
|
52
|
+
return unless attributes.is_a?(Hash)
|
53
|
+
|
54
|
+
# convert string to symbol for hash key
|
55
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
56
|
+
|
57
|
+
if attributes.has_key?(:'test')
|
58
|
+
self.test = attributes[:'test']
|
59
|
+
end
|
60
|
+
|
61
|
+
if attributes.has_key?(:'data')
|
62
|
+
self.data = attributes[:'data']
|
63
|
+
end
|
64
|
+
|
65
|
+
if attributes.has_key?(:'html')
|
66
|
+
self.html = attributes[:'html']
|
67
|
+
end
|
68
|
+
|
69
|
+
if attributes.has_key?(:'css')
|
70
|
+
self.css = attributes[:'css']
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.has_key?(:'metadata')
|
74
|
+
self.metadata = attributes[:'metadata']
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
79
|
+
# @return Array for valid properties with the reasons
|
80
|
+
def list_invalid_properties
|
81
|
+
invalid_properties = Array.new
|
82
|
+
if @data.nil?
|
83
|
+
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
84
|
+
end
|
85
|
+
|
86
|
+
invalid_properties
|
87
|
+
end
|
88
|
+
|
89
|
+
# Check to see if the all the properties in the model are valid
|
90
|
+
# @return true if the model is valid
|
91
|
+
def valid?
|
92
|
+
return false if @data.nil?
|
93
|
+
true
|
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
|
+
test == o.test &&
|
102
|
+
data == o.data &&
|
103
|
+
html == o.html &&
|
104
|
+
css == o.css &&
|
105
|
+
metadata == o.metadata
|
106
|
+
end
|
107
|
+
|
108
|
+
# @see the `==` method
|
109
|
+
# @param [Object] Object to be compared
|
110
|
+
def eql?(o)
|
111
|
+
self == o
|
112
|
+
end
|
113
|
+
|
114
|
+
# Calculates hash code according to all attributes.
|
115
|
+
# @return [Fixnum] Hash code
|
116
|
+
def hash
|
117
|
+
[test, data, html, css, metadata].hash
|
118
|
+
end
|
119
|
+
|
120
|
+
# Builds the object from hash
|
121
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
122
|
+
# @return [Object] Returns the model itself
|
123
|
+
def build_from_hash(attributes)
|
124
|
+
return nil unless attributes.is_a?(Hash)
|
125
|
+
self.class.openapi_types.each_pair do |key, type|
|
126
|
+
if type =~ /\AArray<(.*)>/i
|
127
|
+
# check to ensure the input is an array given that the the attribute
|
128
|
+
# is documented as an array but the input is not
|
129
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
130
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
131
|
+
end
|
132
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
133
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
134
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
135
|
+
end
|
136
|
+
|
137
|
+
self
|
138
|
+
end
|
139
|
+
|
140
|
+
# Deserializes the data based on type
|
141
|
+
# @param string type Data type
|
142
|
+
# @param string value Value to be deserialized
|
143
|
+
# @return [Object] Deserialized data
|
144
|
+
def _deserialize(type, value)
|
145
|
+
case type.to_sym
|
146
|
+
when :DateTime
|
147
|
+
DateTime.parse(value)
|
148
|
+
when :Date
|
149
|
+
Date.parse(value)
|
150
|
+
when :String
|
151
|
+
value.to_s
|
152
|
+
when :Integer
|
153
|
+
value.to_i
|
154
|
+
when :Float
|
155
|
+
value.to_f
|
156
|
+
when :BOOLEAN
|
157
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
158
|
+
true
|
159
|
+
else
|
160
|
+
false
|
161
|
+
end
|
162
|
+
when :Object
|
163
|
+
# generic object (usually a Hash), return directly
|
164
|
+
value
|
165
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
166
|
+
inner_type = Regexp.last_match[:inner_type]
|
167
|
+
value.map { |v| _deserialize(inner_type, v) }
|
168
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
169
|
+
k_type = Regexp.last_match[:k_type]
|
170
|
+
v_type = Regexp.last_match[:v_type]
|
171
|
+
{}.tap do |hash|
|
172
|
+
value.each do |k, v|
|
173
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
174
|
+
end
|
175
|
+
end
|
176
|
+
else # model
|
177
|
+
temp_model = FormAPI.const_get(type).new
|
178
|
+
temp_model.build_from_hash(value)
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
# Returns the string representation of the object
|
183
|
+
# @return [String] String presentation of the object
|
184
|
+
def to_s
|
185
|
+
to_hash.to_s
|
186
|
+
end
|
187
|
+
|
188
|
+
# to_body is an alias to to_hash (backward compatibility)
|
189
|
+
# @return [Hash] Returns the object in the form of hash
|
190
|
+
def to_body
|
191
|
+
to_hash
|
192
|
+
end
|
193
|
+
|
194
|
+
# Returns the object in the form of hash
|
195
|
+
# @return [Hash] Returns the object in the form of hash
|
196
|
+
def to_hash
|
197
|
+
hash = {}
|
198
|
+
self.class.attribute_map.each_pair do |attr, param|
|
199
|
+
value = self.send(attr)
|
200
|
+
next if value.nil?
|
201
|
+
hash[param] = _to_hash(value)
|
202
|
+
end
|
203
|
+
hash
|
204
|
+
end
|
205
|
+
|
206
|
+
# Outputs non-array value in the form of hash
|
207
|
+
# For object, use to_hash. Otherwise, just return the value
|
208
|
+
# @param [Object] value Any valid value
|
209
|
+
# @return [Hash] Returns the value in the form of hash
|
210
|
+
def _to_hash(value)
|
211
|
+
if value.is_a?(Array)
|
212
|
+
value.compact.map { |v| _to_hash(v) }
|
213
|
+
elsif value.is_a?(Hash)
|
214
|
+
{}.tap do |hash|
|
215
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
216
|
+
end
|
217
|
+
elsif value.respond_to? :to_hash
|
218
|
+
value.to_hash
|
219
|
+
else
|
220
|
+
value
|
221
|
+
end
|
222
|
+
end
|
223
|
+
end
|
224
|
+
end
|
@@ -18,8 +18,6 @@ module FormAPI
|
|
18
18
|
|
19
19
|
attr_accessor :errors
|
20
20
|
|
21
|
-
attr_accessor :data_requests
|
22
|
-
|
23
21
|
attr_accessor :status
|
24
22
|
|
25
23
|
class EnumAttributeValidator
|
@@ -49,7 +47,6 @@ module FormAPI
|
|
49
47
|
{
|
50
48
|
:'submission' => :'submission',
|
51
49
|
:'errors' => :'errors',
|
52
|
-
:'data_requests' => :'data_requests',
|
53
50
|
:'status' => :'status'
|
54
51
|
}
|
55
52
|
end
|
@@ -59,7 +56,6 @@ module FormAPI
|
|
59
56
|
{
|
60
57
|
:'submission' => :'Submission',
|
61
58
|
:'errors' => :'Array<String>',
|
62
|
-
:'data_requests' => :'Array<SubmissionDataRequest>',
|
63
59
|
:'status' => :'String'
|
64
60
|
}
|
65
61
|
end
|
@@ -82,12 +78,6 @@ module FormAPI
|
|
82
78
|
end
|
83
79
|
end
|
84
80
|
|
85
|
-
if attributes.has_key?(:'data_requests')
|
86
|
-
if (value = attributes[:'data_requests']).is_a?(Array)
|
87
|
-
self.data_requests = value
|
88
|
-
end
|
89
|
-
end
|
90
|
-
|
91
81
|
if attributes.has_key?(:'status')
|
92
82
|
self.status = attributes[:'status']
|
93
83
|
end
|
@@ -125,7 +115,6 @@ module FormAPI
|
|
125
115
|
self.class == o.class &&
|
126
116
|
submission == o.submission &&
|
127
117
|
errors == o.errors &&
|
128
|
-
data_requests == o.data_requests &&
|
129
118
|
status == o.status
|
130
119
|
end
|
131
120
|
|
@@ -138,7 +127,7 @@ module FormAPI
|
|
138
127
|
# Calculates hash code according to all attributes.
|
139
128
|
# @return [Fixnum] Hash code
|
140
129
|
def hash
|
141
|
-
[submission, errors,
|
130
|
+
[submission, errors, status].hash
|
142
131
|
end
|
143
132
|
|
144
133
|
# Builds the object from hash
|
@@ -32,6 +32,8 @@ module FormAPI
|
|
32
32
|
|
33
33
|
attr_accessor :batch_id
|
34
34
|
|
35
|
+
attr_accessor :data_requests
|
36
|
+
|
35
37
|
class EnumAttributeValidator
|
36
38
|
attr_reader :datatype
|
37
39
|
attr_reader :allowable_values
|
@@ -65,7 +67,8 @@ module FormAPI
|
|
65
67
|
:'state' => :'state',
|
66
68
|
:'metadata' => :'metadata',
|
67
69
|
:'download_url' => :'download_url',
|
68
|
-
:'batch_id' => :'batch_id'
|
70
|
+
:'batch_id' => :'batch_id',
|
71
|
+
:'data_requests' => :'data_requests'
|
69
72
|
}
|
70
73
|
end
|
71
74
|
|
@@ -80,7 +83,8 @@ module FormAPI
|
|
80
83
|
:'state' => :'String',
|
81
84
|
:'metadata' => :'Object',
|
82
85
|
:'download_url' => :'String',
|
83
|
-
:'batch_id' => :'String'
|
86
|
+
:'batch_id' => :'String',
|
87
|
+
:'data_requests' => :'Array<SubmissionDataRequest>'
|
84
88
|
}
|
85
89
|
end
|
86
90
|
|
@@ -127,6 +131,12 @@ module FormAPI
|
|
127
131
|
if attributes.has_key?(:'batch_id')
|
128
132
|
self.batch_id = attributes[:'batch_id']
|
129
133
|
end
|
134
|
+
|
135
|
+
if attributes.has_key?(:'data_requests')
|
136
|
+
if (value = attributes[:'data_requests']).is_a?(Array)
|
137
|
+
self.data_requests = value
|
138
|
+
end
|
139
|
+
end
|
130
140
|
end
|
131
141
|
|
132
142
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -187,7 +197,8 @@ module FormAPI
|
|
187
197
|
state == o.state &&
|
188
198
|
metadata == o.metadata &&
|
189
199
|
download_url == o.download_url &&
|
190
|
-
batch_id == o.batch_id
|
200
|
+
batch_id == o.batch_id &&
|
201
|
+
data_requests == o.data_requests
|
191
202
|
end
|
192
203
|
|
193
204
|
# @see the `==` method
|
@@ -199,7 +210,7 @@ module FormAPI
|
|
199
210
|
# Calculates hash code according to all attributes.
|
200
211
|
# @return [Fixnum] Hash code
|
201
212
|
def hash
|
202
|
-
[id, test, expired, expires_at, processed_at, state, metadata, download_url, batch_id].hash
|
213
|
+
[id, test, expired, expires_at, processed_at, state, metadata, download_url, batch_id, data_requests].hash
|
203
214
|
end
|
204
215
|
|
205
216
|
# Builds the object from hash
|
@@ -75,7 +75,7 @@ module FormAPI
|
|
75
75
|
:'id' => :'String',
|
76
76
|
:'name' => :'String',
|
77
77
|
:'email' => :'String',
|
78
|
-
:'order' => :'
|
78
|
+
:'order' => :'Integer',
|
79
79
|
:'fields' => :'Array<String>',
|
80
80
|
:'metadata' => :'Object',
|
81
81
|
:'state' => :'String',
|
@@ -163,14 +163,6 @@ module FormAPI
|
|
163
163
|
invalid_properties.push('invalid value for "state", state cannot be nil.')
|
164
164
|
end
|
165
165
|
|
166
|
-
if @viewed_at.nil?
|
167
|
-
invalid_properties.push('invalid value for "viewed_at", viewed_at cannot be nil.')
|
168
|
-
end
|
169
|
-
|
170
|
-
if @completed_at.nil?
|
171
|
-
invalid_properties.push('invalid value for "completed_at", completed_at cannot be nil.')
|
172
|
-
end
|
173
|
-
|
174
166
|
invalid_properties
|
175
167
|
end
|
176
168
|
|
@@ -186,8 +178,6 @@ module FormAPI
|
|
186
178
|
return false if @state.nil?
|
187
179
|
state_validator = EnumAttributeValidator.new('String', ['pending', 'complete'])
|
188
180
|
return false unless state_validator.valid?(@state)
|
189
|
-
return false if @viewed_at.nil?
|
190
|
-
return false if @completed_at.nil?
|
191
181
|
true
|
192
182
|
end
|
193
183
|
|
@@ -13,50 +13,36 @@ OpenAPI Generator version: 3.3.0-SNAPSHOT
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module FormAPI
|
16
|
-
class
|
17
|
-
attr_accessor :
|
18
|
-
|
19
|
-
attr_accessor :errors
|
20
|
-
|
21
|
-
attr_accessor :status
|
22
|
-
|
23
|
-
class EnumAttributeValidator
|
24
|
-
attr_reader :datatype
|
25
|
-
attr_reader :allowable_values
|
26
|
-
|
27
|
-
def initialize(datatype, allowable_values)
|
28
|
-
@allowable_values = allowable_values.map do |value|
|
29
|
-
case datatype.to_s
|
30
|
-
when /Integer/i
|
31
|
-
value.to_i
|
32
|
-
when /Float/i
|
33
|
-
value.to_f
|
34
|
-
else
|
35
|
-
value
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
16
|
+
class SubmissionDataRequestData
|
17
|
+
attr_accessor :metadata
|
39
18
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
19
|
+
attr_accessor :name
|
20
|
+
|
21
|
+
attr_accessor :fields
|
22
|
+
|
23
|
+
attr_accessor :email
|
24
|
+
|
25
|
+
attr_accessor :order
|
44
26
|
|
45
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
46
28
|
def self.attribute_map
|
47
29
|
{
|
48
|
-
:'
|
49
|
-
:'
|
50
|
-
:'
|
30
|
+
:'metadata' => :'metadata',
|
31
|
+
:'name' => :'name',
|
32
|
+
:'fields' => :'fields',
|
33
|
+
:'email' => :'email',
|
34
|
+
:'order' => :'order'
|
51
35
|
}
|
52
36
|
end
|
53
37
|
|
54
38
|
# Attribute type mapping.
|
55
39
|
def self.openapi_types
|
56
40
|
{
|
57
|
-
:'
|
58
|
-
:'
|
59
|
-
:'
|
41
|
+
:'metadata' => :'Object',
|
42
|
+
:'name' => :'String',
|
43
|
+
:'fields' => :'Array<String>',
|
44
|
+
:'email' => :'String',
|
45
|
+
:'order' => :'Integer'
|
60
46
|
}
|
61
47
|
end
|
62
48
|
|
@@ -68,18 +54,26 @@ module FormAPI
|
|
68
54
|
# convert string to symbol for hash key
|
69
55
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
70
56
|
|
71
|
-
if attributes.has_key?(:'
|
72
|
-
self.
|
57
|
+
if attributes.has_key?(:'metadata')
|
58
|
+
self.metadata = attributes[:'metadata']
|
73
59
|
end
|
74
60
|
|
75
|
-
if attributes.has_key?(:'
|
76
|
-
|
77
|
-
|
61
|
+
if attributes.has_key?(:'name')
|
62
|
+
self.name = attributes[:'name']
|
63
|
+
end
|
64
|
+
|
65
|
+
if attributes.has_key?(:'fields')
|
66
|
+
if (value = attributes[:'fields']).is_a?(Array)
|
67
|
+
self.fields = value
|
78
68
|
end
|
79
69
|
end
|
80
70
|
|
81
|
-
if attributes.has_key?(:'
|
82
|
-
self.
|
71
|
+
if attributes.has_key?(:'email')
|
72
|
+
self.email = attributes[:'email']
|
73
|
+
end
|
74
|
+
|
75
|
+
if attributes.has_key?(:'order')
|
76
|
+
self.order = attributes[:'order']
|
83
77
|
end
|
84
78
|
end
|
85
79
|
|
@@ -93,29 +87,19 @@ module FormAPI
|
|
93
87
|
# Check to see if the all the properties in the model are valid
|
94
88
|
# @return true if the model is valid
|
95
89
|
def valid?
|
96
|
-
status_validator = EnumAttributeValidator.new('String', ['success', 'error'])
|
97
|
-
return false unless status_validator.valid?(@status)
|
98
90
|
true
|
99
91
|
end
|
100
92
|
|
101
|
-
# Custom attribute writer method checking allowed values (enum).
|
102
|
-
# @param [Object] status Object to be assigned
|
103
|
-
def status=(status)
|
104
|
-
validator = EnumAttributeValidator.new('String', ['success', 'error'])
|
105
|
-
unless validator.valid?(status)
|
106
|
-
fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.'
|
107
|
-
end
|
108
|
-
@status = status
|
109
|
-
end
|
110
|
-
|
111
93
|
# Checks equality by comparing each attribute.
|
112
94
|
# @param [Object] Object to be compared
|
113
95
|
def ==(o)
|
114
96
|
return true if self.equal?(o)
|
115
97
|
self.class == o.class &&
|
116
|
-
|
117
|
-
|
118
|
-
|
98
|
+
metadata == o.metadata &&
|
99
|
+
name == o.name &&
|
100
|
+
fields == o.fields &&
|
101
|
+
email == o.email &&
|
102
|
+
order == o.order
|
119
103
|
end
|
120
104
|
|
121
105
|
# @see the `==` method
|
@@ -127,7 +111,7 @@ module FormAPI
|
|
127
111
|
# Calculates hash code according to all attributes.
|
128
112
|
# @return [Fixnum] Hash code
|
129
113
|
def hash
|
130
|
-
[
|
114
|
+
[metadata, name, fields, email, order].hash
|
131
115
|
end
|
132
116
|
|
133
117
|
# Builds the object from hash
|
data/lib/form_api/version.rb
CHANGED
@@ -204,6 +204,47 @@ describe 'PDFApi' do
|
|
204
204
|
expect(submission.state).to eq 'pending'
|
205
205
|
end
|
206
206
|
end
|
207
|
+
# integration tests for generate_pdf with data requests
|
208
|
+
# Generates a new PDF
|
209
|
+
# @param template_id
|
210
|
+
# @param create_submission_data
|
211
|
+
# @param [Hash] opts the optional parameters
|
212
|
+
# @return [CreateSubmissionResponse]
|
213
|
+
describe 'generate_pdf test with data_requests' do
|
214
|
+
it 'should work' do
|
215
|
+
template_id = 'tpl_000000000000000001'
|
216
|
+
response = api_instance.generate_pdf(template_id,
|
217
|
+
data: {
|
218
|
+
title: 'Test PDF',
|
219
|
+
},
|
220
|
+
data_requests: [
|
221
|
+
{
|
222
|
+
name: 'John Smith',
|
223
|
+
email: 'jsmith@example.com',
|
224
|
+
fields: ['description'],
|
225
|
+
order: 1,
|
226
|
+
}
|
227
|
+
]
|
228
|
+
)
|
229
|
+
expect(response.status).to eq 'success'
|
230
|
+
submission = response.submission
|
231
|
+
expect(submission.id).to start_with 'sub_'
|
232
|
+
expect(submission.expired).to eq false
|
233
|
+
expect(submission.state).to eq 'waiting_for_data_requests'
|
234
|
+
|
235
|
+
data_requests = submission.data_requests
|
236
|
+
expect(data_requests.count).to eq 1
|
237
|
+
data_request = data_requests.first
|
238
|
+
|
239
|
+
expect(data_request.id).to start_with 'drq_'
|
240
|
+
expect(data_request.state).to eq 'pending'
|
241
|
+
expect(data_request.fields).to eq ['description']
|
242
|
+
expect(data_request.order).to eq 1
|
243
|
+
expect(data_request.name).to eq 'John Smith'
|
244
|
+
expect(data_request.email).to eq 'jsmith@example.com'
|
245
|
+
end
|
246
|
+
end
|
247
|
+
|
207
248
|
# integration tests for get_combined_submission
|
208
249
|
# Check the status of a combined submission (merged PDFs)
|
209
250
|
# @param combined_submission_id
|
@@ -41,14 +41,14 @@ describe 'PDFApi' do
|
|
41
41
|
# integration tests for batch_generate_pdf_v1
|
42
42
|
# Generates multiple PDFs
|
43
43
|
# @param template_id
|
44
|
-
# @param
|
44
|
+
# @param create_submission_data_batch_v1
|
45
45
|
# @param [Hash] opts the optional parameters
|
46
|
-
# @return [Array<
|
46
|
+
# @return [Array<CreateSubmissionResponse>]
|
47
47
|
describe 'batch_generate_pdf_v1 test' do
|
48
48
|
it 'should work' do
|
49
49
|
template_id = 'tpl_000000000000000001' # String |
|
50
|
-
|
51
|
-
result = api_instance.batch_generate_pdf_v1(template_id,
|
50
|
+
create_submission_data_batch_v1 = nil # Array<CreateSubmissionDataBatchV1> |
|
51
|
+
result = api_instance.batch_generate_pdf_v1(template_id, create_submission_data_batch_v1)
|
52
52
|
expect(result).to_not be_nil
|
53
53
|
end
|
54
54
|
end
|
@@ -14,43 +14,51 @@ require 'spec_helper'
|
|
14
14
|
require 'json'
|
15
15
|
require 'date'
|
16
16
|
|
17
|
-
# Unit tests for FormAPI::
|
17
|
+
# Unit tests for FormAPI::CreateSubmissionDataBatchV1
|
18
18
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
19
|
# Please update as you see appropriate
|
20
|
-
describe '
|
20
|
+
describe 'CreateSubmissionDataBatchV1' do
|
21
21
|
before do
|
22
22
|
# run before each test
|
23
|
-
@instance = FormAPI::
|
23
|
+
@instance = FormAPI::CreateSubmissionDataBatchV1.new
|
24
24
|
end
|
25
25
|
|
26
26
|
after do
|
27
27
|
# run after each test
|
28
28
|
end
|
29
29
|
|
30
|
-
describe 'test an instance of
|
31
|
-
it 'should create an instance of
|
32
|
-
expect(@instance).to be_instance_of(FormAPI::
|
30
|
+
describe 'test an instance of CreateSubmissionDataBatchV1' do
|
31
|
+
it 'should create an instance of CreateSubmissionDataBatchV1' do
|
32
|
+
expect(@instance).to be_instance_of(FormAPI::CreateSubmissionDataBatchV1)
|
33
33
|
end
|
34
34
|
end
|
35
|
-
describe 'test attribute "
|
35
|
+
describe 'test attribute "test"' do
|
36
36
|
it 'should work' do
|
37
37
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
|
-
describe 'test attribute "
|
41
|
+
describe 'test attribute "data"' do
|
42
42
|
it 'should work' do
|
43
43
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
|
-
describe 'test attribute "
|
47
|
+
describe 'test attribute "html"' 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 "css"' 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 "metadata"' do
|
48
60
|
it 'should work' do
|
49
61
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
50
|
-
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["success", "error"])
|
51
|
-
# validator.allowable_values.each do |value|
|
52
|
-
# expect { @instance.status = value }.not_to raise_error
|
53
|
-
# end
|
54
62
|
end
|
55
63
|
end
|
56
64
|
|
@@ -44,12 +44,6 @@ describe 'CreateSubmissionResponse' do
|
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
|
-
describe 'test attribute "data_requests"' 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
47
|
describe 'test attribute "status"' do
|
54
48
|
it 'should work' do
|
55
49
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -0,0 +1,65 @@
|
|
1
|
+
=begin
|
2
|
+
#API V1
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
OpenAPI spec version: v1
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 3.3.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for FormAPI::SubmissionDataRequestData
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'SubmissionDataRequestData' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = FormAPI::SubmissionDataRequestData.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of SubmissionDataRequestData' do
|
31
|
+
it 'should create an instance of SubmissionDataRequestData' do
|
32
|
+
expect(@instance).to be_instance_of(FormAPI::SubmissionDataRequestData)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "metadata"' 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 "name"' 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 "fields"' 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 "email"' 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 "order"' 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
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: form_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Form Applications, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-10-
|
11
|
+
date: 2018-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -213,9 +213,9 @@ files:
|
|
213
213
|
- docs/CreateCombinedSubmissionResponse.md
|
214
214
|
- docs/CreateSubmissionBatchResponse.md
|
215
215
|
- docs/CreateSubmissionBatchSubmissionsResponse.md
|
216
|
-
- docs/CreateSubmissionBatchV1SubmissionsResponse.md
|
217
216
|
- docs/CreateSubmissionData.md
|
218
217
|
- docs/CreateSubmissionDataBatchRequest.md
|
218
|
+
- docs/CreateSubmissionDataBatchV1.md
|
219
219
|
- docs/CreateSubmissionDataRequestTokenResponse.md
|
220
220
|
- docs/CreateSubmissionDataRequestTokenResponseToken.md
|
221
221
|
- docs/CreateSubmissionResponse.md
|
@@ -226,6 +226,7 @@ files:
|
|
226
226
|
- docs/SubmissionBatch.md
|
227
227
|
- docs/SubmissionBatchData.md
|
228
228
|
- docs/SubmissionDataRequest.md
|
229
|
+
- docs/SubmissionDataRequestData.md
|
229
230
|
- docs/Template.md
|
230
231
|
- form_api.gemspec
|
231
232
|
- git_push.sh
|
@@ -242,9 +243,9 @@ files:
|
|
242
243
|
- lib/form_api/models/create_combined_submission_response.rb
|
243
244
|
- lib/form_api/models/create_submission_batch_response.rb
|
244
245
|
- lib/form_api/models/create_submission_batch_submissions_response.rb
|
245
|
-
- lib/form_api/models/create_submission_batch_v1_submissions_response.rb
|
246
246
|
- lib/form_api/models/create_submission_data.rb
|
247
247
|
- lib/form_api/models/create_submission_data_batch_request.rb
|
248
|
+
- lib/form_api/models/create_submission_data_batch_v1.rb
|
248
249
|
- lib/form_api/models/create_submission_data_request_token_response.rb
|
249
250
|
- lib/form_api/models/create_submission_data_request_token_response_token.rb
|
250
251
|
- lib/form_api/models/create_submission_response.rb
|
@@ -254,6 +255,7 @@ files:
|
|
254
255
|
- lib/form_api/models/submission_batch.rb
|
255
256
|
- lib/form_api/models/submission_batch_data.rb
|
256
257
|
- lib/form_api/models/submission_data_request.rb
|
258
|
+
- lib/form_api/models/submission_data_request_data.rb
|
257
259
|
- lib/form_api/models/template.rb
|
258
260
|
- lib/form_api/version.rb
|
259
261
|
- spec/api/client_integration_spec.rb
|
@@ -268,8 +270,8 @@ files:
|
|
268
270
|
- spec/models/create_combined_submission_response_spec.rb
|
269
271
|
- spec/models/create_submission_batch_response_spec.rb
|
270
272
|
- spec/models/create_submission_batch_submissions_response_spec.rb
|
271
|
-
- spec/models/create_submission_batch_v1_submissions_response_spec.rb
|
272
273
|
- spec/models/create_submission_data_batch_request_spec.rb
|
274
|
+
- spec/models/create_submission_data_batch_v1_spec.rb
|
273
275
|
- spec/models/create_submission_data_request_token_response_spec.rb
|
274
276
|
- spec/models/create_submission_data_request_token_response_token_spec.rb
|
275
277
|
- spec/models/create_submission_data_spec.rb
|
@@ -278,6 +280,7 @@ files:
|
|
278
280
|
- spec/models/invalid_request_spec.rb
|
279
281
|
- spec/models/submission_batch_data_spec.rb
|
280
282
|
- spec/models/submission_batch_spec.rb
|
283
|
+
- spec/models/submission_data_request_data_spec.rb
|
281
284
|
- spec/models/submission_data_request_spec.rb
|
282
285
|
- spec/models/submission_spec.rb
|
283
286
|
- spec/models/template_spec.rb
|
@@ -302,7 +305,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
302
305
|
version: '0'
|
303
306
|
requirements: []
|
304
307
|
rubyforge_project:
|
305
|
-
rubygems_version: 2.6
|
308
|
+
rubygems_version: 2.7.6
|
306
309
|
signing_key:
|
307
310
|
specification_version: 4
|
308
311
|
summary: FormAPI API Client
|
@@ -319,8 +322,8 @@ test_files:
|
|
319
322
|
- spec/models/create_combined_submission_response_spec.rb
|
320
323
|
- spec/models/create_submission_batch_response_spec.rb
|
321
324
|
- spec/models/create_submission_batch_submissions_response_spec.rb
|
322
|
-
- spec/models/create_submission_batch_v1_submissions_response_spec.rb
|
323
325
|
- spec/models/create_submission_data_batch_request_spec.rb
|
326
|
+
- spec/models/create_submission_data_batch_v1_spec.rb
|
324
327
|
- spec/models/create_submission_data_request_token_response_spec.rb
|
325
328
|
- spec/models/create_submission_data_request_token_response_token_spec.rb
|
326
329
|
- spec/models/create_submission_data_spec.rb
|
@@ -329,6 +332,7 @@ test_files:
|
|
329
332
|
- spec/models/invalid_request_spec.rb
|
330
333
|
- spec/models/submission_batch_data_spec.rb
|
331
334
|
- spec/models/submission_batch_spec.rb
|
335
|
+
- spec/models/submission_data_request_data_spec.rb
|
332
336
|
- spec/models/submission_data_request_spec.rb
|
333
337
|
- spec/models/submission_spec.rb
|
334
338
|
- spec/models/template_spec.rb
|
@@ -1,10 +0,0 @@
|
|
1
|
-
# FormAPI::CreateSubmissionBatchV1SubmissionsResponse
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
Name | Type | Description | Notes
|
5
|
-
------------ | ------------- | ------------- | -------------
|
6
|
-
**submission** | [**Submission**](Submission.md) | | [optional]
|
7
|
-
**errors** | **Array<String>** | | [optional]
|
8
|
-
**status** | **String** | | [optional]
|
9
|
-
|
10
|
-
|