form_api 1.4.1 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/README.md +7 -5
- data/docs/CombinedSubmission.md +1 -0
- data/docs/CombinedSubmissionAction.md +13 -0
- data/docs/PDFApi.md +2 -2
- data/docs/{Template1.md → PendingTemplate.md} +1 -1
- data/docs/Submission.md +1 -0
- data/docs/SubmissionAction.md +13 -0
- data/lib/form_api.rb +3 -1
- data/lib/form_api/api/pdf_api.rb +3 -3
- data/lib/form_api/models/combined_submission.rb +15 -4
- data/lib/form_api/models/combined_submission_action.rb +316 -0
- data/lib/form_api/models/{template1.rb → pending_template.rb} +1 -1
- data/lib/form_api/models/submission.rb +15 -4
- data/lib/form_api/models/submission_action.rb +316 -0
- data/lib/form_api/version.rb +1 -1
- data/spec/api/pdf_api_spec_original.skipped.rb +1 -1
- data/spec/models/combined_submission_action_spec.rb +83 -0
- data/spec/models/combined_submission_spec.rb +6 -0
- data/spec/models/{template1_spec.rb → pending_template_spec.rb} +6 -6
- data/spec/models/submission_action_spec.rb +83 -0
- data/spec/models/submission_spec.rb +6 -0
- metadata +14 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1d068243d4371605f24470720f416a32aa032b0a5425dad32314422a79042e1
|
4
|
+
data.tar.gz: 353135e261d59c05627316d8fa80caa95100058dfd06744d9a4fb27cb3142614
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5427b856c1276fdd3fedfa6d42ba1c693ac64191c581c7f18341aba34750edfac61ce947abe1efecda174e5232b46b5aabaf884e68b22bcb4f9af26cc67cb43b
|
7
|
+
data.tar.gz: 41625cf306eab595c13cc71882371443ed2dc31dbfa1cd2c83d65e69886523791e9aec316cab5a787745edd7bf323277a384367fedd7b6cca31b1df17e8c3a2e
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
### 1.5.0 [December 13, 2018]
|
2
|
+
* Fix model name for newly created Templates (PendingTemplate)
|
3
|
+
* Added "actions" to submission and combined_submission responses. Includes information about custom S3 uploads
|
4
|
+
|
1
5
|
### 1.4.1 [December 2, 2018]
|
2
6
|
* Fixed crash in 1.4.0, did not include all of the necessary files
|
3
7
|
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -7,7 +7,7 @@ FormAPI is a service that helps you fill out and sign PDF templates.
|
|
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.5.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.5.0.gem
|
27
27
|
```
|
28
|
-
(for development, run `gem install --dev ./form_api-1.
|
28
|
+
(for development, run `gem install --dev ./form_api-1.5.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.5.0'
|
35
35
|
|
36
36
|
### Install from Git
|
37
37
|
|
@@ -105,6 +105,7 @@ Class | Method | HTTP request | Description
|
|
105
105
|
- [FormAPI::AuthenticationError](docs/AuthenticationError.md)
|
106
106
|
- [FormAPI::AuthenticationSuccessResponse](docs/AuthenticationSuccessResponse.md)
|
107
107
|
- [FormAPI::CombinedSubmission](docs/CombinedSubmission.md)
|
108
|
+
- [FormAPI::CombinedSubmissionAction](docs/CombinedSubmissionAction.md)
|
108
109
|
- [FormAPI::CombinedSubmissionData](docs/CombinedSubmissionData.md)
|
109
110
|
- [FormAPI::CreateCombinedSubmissionResponse](docs/CreateCombinedSubmissionResponse.md)
|
110
111
|
- [FormAPI::CreateSubmissionBatchResponse](docs/CreateSubmissionBatchResponse.md)
|
@@ -118,12 +119,13 @@ Class | Method | HTTP request | Description
|
|
118
119
|
- [FormAPI::CreateSubmissionResponse](docs/CreateSubmissionResponse.md)
|
119
120
|
- [FormAPI::Error](docs/Error.md)
|
120
121
|
- [FormAPI::InvalidRequest](docs/InvalidRequest.md)
|
122
|
+
- [FormAPI::PendingTemplate](docs/PendingTemplate.md)
|
121
123
|
- [FormAPI::Submission](docs/Submission.md)
|
124
|
+
- [FormAPI::SubmissionAction](docs/SubmissionAction.md)
|
122
125
|
- [FormAPI::SubmissionBatch](docs/SubmissionBatch.md)
|
123
126
|
- [FormAPI::SubmissionBatchData](docs/SubmissionBatchData.md)
|
124
127
|
- [FormAPI::SubmissionDataRequest](docs/SubmissionDataRequest.md)
|
125
128
|
- [FormAPI::Template](docs/Template.md)
|
126
|
-
- [FormAPI::Template1](docs/Template1.md)
|
127
129
|
- [FormAPI::UpdateDataRequestResponse](docs/UpdateDataRequestResponse.md)
|
128
130
|
- [FormAPI::UpdateSubmissionDataRequestData](docs/UpdateSubmissionDataRequestData.md)
|
129
131
|
|
data/docs/CombinedSubmission.md
CHANGED
@@ -10,5 +10,6 @@ Name | Type | Description | Notes
|
|
10
10
|
**submission_ids** | **Array<String>** | | [optional]
|
11
11
|
**id** | **String** | | [optional]
|
12
12
|
**state** | **String** | | [optional]
|
13
|
+
**actions** | [**Array<CombinedSubmissionAction>**](CombinedSubmissionAction.md) | | [optional]
|
13
14
|
|
14
15
|
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# FormAPI::CombinedSubmissionAction
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**id** | **String** | |
|
7
|
+
**integration_id** | **String** | |
|
8
|
+
**state** | **String** | |
|
9
|
+
**action_category** | **String** | |
|
10
|
+
**action_type** | **String** | |
|
11
|
+
**result_data** | **Object** | |
|
12
|
+
|
13
|
+
|
data/docs/PDFApi.md
CHANGED
@@ -222,7 +222,7 @@ Name | Type | Description | Notes
|
|
222
222
|
|
223
223
|
|
224
224
|
# **create_template**
|
225
|
-
>
|
225
|
+
> PendingTemplate create_template(template_document, template_name)
|
226
226
|
|
227
227
|
Upload a new PDF template
|
228
228
|
|
@@ -259,7 +259,7 @@ Name | Type | Description | Notes
|
|
259
259
|
|
260
260
|
### Return type
|
261
261
|
|
262
|
-
[**
|
262
|
+
[**PendingTemplate**](PendingTemplate.md)
|
263
263
|
|
264
264
|
### Authorization
|
265
265
|
|
data/docs/Submission.md
CHANGED
@@ -13,5 +13,6 @@ Name | Type | Description | Notes
|
|
13
13
|
**download_url** | **String** | | [optional]
|
14
14
|
**batch_id** | **String** | | [optional]
|
15
15
|
**data_requests** | [**Array<SubmissionDataRequest>**](SubmissionDataRequest.md) | | [optional]
|
16
|
+
**actions** | [**Array<SubmissionAction>**](SubmissionAction.md) | | [optional]
|
16
17
|
|
17
18
|
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# FormAPI::SubmissionAction
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**id** | **String** | |
|
7
|
+
**integration_id** | **String** | |
|
8
|
+
**state** | **String** | |
|
9
|
+
**action_category** | **String** | |
|
10
|
+
**action_type** | **String** | |
|
11
|
+
**result_data** | **Object** | |
|
12
|
+
|
13
|
+
|
data/lib/form_api.rb
CHANGED
@@ -20,6 +20,7 @@ require 'form_api/configuration'
|
|
20
20
|
require 'form_api/models/authentication_error'
|
21
21
|
require 'form_api/models/authentication_success_response'
|
22
22
|
require 'form_api/models/combined_submission'
|
23
|
+
require 'form_api/models/combined_submission_action'
|
23
24
|
require 'form_api/models/combined_submission_data'
|
24
25
|
require 'form_api/models/create_combined_submission_response'
|
25
26
|
require 'form_api/models/create_submission_batch_response'
|
@@ -33,12 +34,13 @@ require 'form_api/models/create_submission_data_request_token_response_token'
|
|
33
34
|
require 'form_api/models/create_submission_response'
|
34
35
|
require 'form_api/models/error'
|
35
36
|
require 'form_api/models/invalid_request'
|
37
|
+
require 'form_api/models/pending_template'
|
36
38
|
require 'form_api/models/submission'
|
39
|
+
require 'form_api/models/submission_action'
|
37
40
|
require 'form_api/models/submission_batch'
|
38
41
|
require 'form_api/models/submission_batch_data'
|
39
42
|
require 'form_api/models/submission_data_request'
|
40
43
|
require 'form_api/models/template'
|
41
|
-
require 'form_api/models/template1'
|
42
44
|
require 'form_api/models/update_data_request_response'
|
43
45
|
require 'form_api/models/update_submission_data_request_data'
|
44
46
|
|
data/lib/form_api/api/pdf_api.rb
CHANGED
@@ -239,7 +239,7 @@ module FormAPI
|
|
239
239
|
# @param template_document
|
240
240
|
# @param template_name
|
241
241
|
# @param [Hash] opts the optional parameters
|
242
|
-
# @return [
|
242
|
+
# @return [PendingTemplate]
|
243
243
|
def create_template(template_document, template_name, opts = {})
|
244
244
|
data, _status_code, _headers = create_template_with_http_info(template_document, template_name, opts)
|
245
245
|
data
|
@@ -249,7 +249,7 @@ module FormAPI
|
|
249
249
|
# @param template_document
|
250
250
|
# @param template_name
|
251
251
|
# @param [Hash] opts the optional parameters
|
252
|
-
# @return [Array<(
|
252
|
+
# @return [Array<(PendingTemplate, Fixnum, Hash)>] PendingTemplate data, response status code and response headers
|
253
253
|
def create_template_with_http_info(template_document, template_name, opts = {})
|
254
254
|
if @api_client.config.debugging
|
255
255
|
@api_client.config.logger.debug 'Calling API: PDFApi.create_template ...'
|
@@ -289,7 +289,7 @@ module FormAPI
|
|
289
289
|
:form_params => form_params,
|
290
290
|
:body => post_body,
|
291
291
|
:auth_names => auth_names,
|
292
|
-
:return_type => '
|
292
|
+
:return_type => 'PendingTemplate')
|
293
293
|
if @api_client.config.debugging
|
294
294
|
@api_client.config.logger.debug "API called: PDFApi#create_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
295
295
|
end
|
@@ -28,6 +28,8 @@ module FormAPI
|
|
28
28
|
|
29
29
|
attr_accessor :state
|
30
30
|
|
31
|
+
attr_accessor :actions
|
32
|
+
|
31
33
|
class EnumAttributeValidator
|
32
34
|
attr_reader :datatype
|
33
35
|
attr_reader :allowable_values
|
@@ -59,7 +61,8 @@ module FormAPI
|
|
59
61
|
:'download_url' => :'download_url',
|
60
62
|
:'submission_ids' => :'submission_ids',
|
61
63
|
:'id' => :'id',
|
62
|
-
:'state' => :'state'
|
64
|
+
:'state' => :'state',
|
65
|
+
:'actions' => :'actions'
|
63
66
|
}
|
64
67
|
end
|
65
68
|
|
@@ -72,7 +75,8 @@ module FormAPI
|
|
72
75
|
:'download_url' => :'String',
|
73
76
|
:'submission_ids' => :'Array<String>',
|
74
77
|
:'id' => :'String',
|
75
|
-
:'state' => :'String'
|
78
|
+
:'state' => :'String',
|
79
|
+
:'actions' => :'Array<CombinedSubmissionAction>'
|
76
80
|
}
|
77
81
|
end
|
78
82
|
|
@@ -113,6 +117,12 @@ module FormAPI
|
|
113
117
|
if attributes.has_key?(:'state')
|
114
118
|
self.state = attributes[:'state']
|
115
119
|
end
|
120
|
+
|
121
|
+
if attributes.has_key?(:'actions')
|
122
|
+
if (value = attributes[:'actions']).is_a?(Array)
|
123
|
+
self.actions = value
|
124
|
+
end
|
125
|
+
end
|
116
126
|
end
|
117
127
|
|
118
128
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -151,7 +161,8 @@ module FormAPI
|
|
151
161
|
download_url == o.download_url &&
|
152
162
|
submission_ids == o.submission_ids &&
|
153
163
|
id == o.id &&
|
154
|
-
state == o.state
|
164
|
+
state == o.state &&
|
165
|
+
actions == o.actions
|
155
166
|
end
|
156
167
|
|
157
168
|
# @see the `==` method
|
@@ -163,7 +174,7 @@ module FormAPI
|
|
163
174
|
# Calculates hash code according to all attributes.
|
164
175
|
# @return [Fixnum] Hash code
|
165
176
|
def hash
|
166
|
-
[metadata, expired, expires_at, download_url, submission_ids, id, state].hash
|
177
|
+
[metadata, expired, expires_at, download_url, submission_ids, id, state, actions].hash
|
167
178
|
end
|
168
179
|
|
169
180
|
# Builds the object from hash
|
@@ -0,0 +1,316 @@
|
|
1
|
+
=begin
|
2
|
+
#API v1
|
3
|
+
|
4
|
+
#FormAPI is a service that helps you fill out and sign PDF templates.
|
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 CombinedSubmissionAction
|
17
|
+
attr_accessor :id
|
18
|
+
|
19
|
+
attr_accessor :integration_id
|
20
|
+
|
21
|
+
attr_accessor :state
|
22
|
+
|
23
|
+
attr_accessor :action_category
|
24
|
+
|
25
|
+
attr_accessor :action_type
|
26
|
+
|
27
|
+
attr_accessor :result_data
|
28
|
+
|
29
|
+
class EnumAttributeValidator
|
30
|
+
attr_reader :datatype
|
31
|
+
attr_reader :allowable_values
|
32
|
+
|
33
|
+
def initialize(datatype, allowable_values)
|
34
|
+
@allowable_values = allowable_values.map do |value|
|
35
|
+
case datatype.to_s
|
36
|
+
when /Integer/i
|
37
|
+
value.to_i
|
38
|
+
when /Float/i
|
39
|
+
value.to_f
|
40
|
+
else
|
41
|
+
value
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
def valid?(value)
|
47
|
+
!value || allowable_values.include?(value)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
52
|
+
def self.attribute_map
|
53
|
+
{
|
54
|
+
:'id' => :'id',
|
55
|
+
:'integration_id' => :'integration_id',
|
56
|
+
:'state' => :'state',
|
57
|
+
:'action_category' => :'action_category',
|
58
|
+
:'action_type' => :'action_type',
|
59
|
+
:'result_data' => :'result_data'
|
60
|
+
}
|
61
|
+
end
|
62
|
+
|
63
|
+
# Attribute type mapping.
|
64
|
+
def self.openapi_types
|
65
|
+
{
|
66
|
+
:'id' => :'String',
|
67
|
+
:'integration_id' => :'String',
|
68
|
+
:'state' => :'String',
|
69
|
+
:'action_category' => :'String',
|
70
|
+
:'action_type' => :'String',
|
71
|
+
:'result_data' => :'Object'
|
72
|
+
}
|
73
|
+
end
|
74
|
+
|
75
|
+
# Initializes the object
|
76
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
77
|
+
def initialize(attributes = {})
|
78
|
+
return unless attributes.is_a?(Hash)
|
79
|
+
|
80
|
+
# convert string to symbol for hash key
|
81
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
82
|
+
|
83
|
+
if attributes.has_key?(:'id')
|
84
|
+
self.id = attributes[:'id']
|
85
|
+
end
|
86
|
+
|
87
|
+
if attributes.has_key?(:'integration_id')
|
88
|
+
self.integration_id = attributes[:'integration_id']
|
89
|
+
end
|
90
|
+
|
91
|
+
if attributes.has_key?(:'state')
|
92
|
+
self.state = attributes[:'state']
|
93
|
+
end
|
94
|
+
|
95
|
+
if attributes.has_key?(:'action_category')
|
96
|
+
self.action_category = attributes[:'action_category']
|
97
|
+
end
|
98
|
+
|
99
|
+
if attributes.has_key?(:'action_type')
|
100
|
+
self.action_type = attributes[:'action_type']
|
101
|
+
end
|
102
|
+
|
103
|
+
if attributes.has_key?(:'result_data')
|
104
|
+
self.result_data = attributes[:'result_data']
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
109
|
+
# @return Array for valid properties with the reasons
|
110
|
+
def list_invalid_properties
|
111
|
+
invalid_properties = Array.new
|
112
|
+
if @id.nil?
|
113
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
114
|
+
end
|
115
|
+
|
116
|
+
if @integration_id.nil?
|
117
|
+
invalid_properties.push('invalid value for "integration_id", integration_id cannot be nil.')
|
118
|
+
end
|
119
|
+
|
120
|
+
if @state.nil?
|
121
|
+
invalid_properties.push('invalid value for "state", state cannot be nil.')
|
122
|
+
end
|
123
|
+
|
124
|
+
if @action_category.nil?
|
125
|
+
invalid_properties.push('invalid value for "action_category", action_category cannot be nil.')
|
126
|
+
end
|
127
|
+
|
128
|
+
if @action_type.nil?
|
129
|
+
invalid_properties.push('invalid value for "action_type", action_type cannot be nil.')
|
130
|
+
end
|
131
|
+
|
132
|
+
if @result_data.nil?
|
133
|
+
invalid_properties.push('invalid value for "result_data", result_data cannot be nil.')
|
134
|
+
end
|
135
|
+
|
136
|
+
invalid_properties
|
137
|
+
end
|
138
|
+
|
139
|
+
# Check to see if the all the properties in the model are valid
|
140
|
+
# @return true if the model is valid
|
141
|
+
def valid?
|
142
|
+
return false if @id.nil?
|
143
|
+
return false if @integration_id.nil?
|
144
|
+
return false if @state.nil?
|
145
|
+
state_validator = EnumAttributeValidator.new('String', ['pending', 'processed', 'failed', 'error'])
|
146
|
+
return false unless state_validator.valid?(@state)
|
147
|
+
return false if @action_category.nil?
|
148
|
+
action_category_validator = EnumAttributeValidator.new('String', ['notification', 'file_upload'])
|
149
|
+
return false unless action_category_validator.valid?(@action_category)
|
150
|
+
return false if @action_type.nil?
|
151
|
+
action_type_validator = EnumAttributeValidator.new('String', ['webhook', 'slack_webhook', 'email', 'aws_s3_upload'])
|
152
|
+
return false unless action_type_validator.valid?(@action_type)
|
153
|
+
return false if @result_data.nil?
|
154
|
+
true
|
155
|
+
end
|
156
|
+
|
157
|
+
# Custom attribute writer method checking allowed values (enum).
|
158
|
+
# @param [Object] state Object to be assigned
|
159
|
+
def state=(state)
|
160
|
+
validator = EnumAttributeValidator.new('String', ['pending', 'processed', 'failed', 'error'])
|
161
|
+
unless validator.valid?(state)
|
162
|
+
fail ArgumentError, 'invalid value for "state", must be one of #{validator.allowable_values}.'
|
163
|
+
end
|
164
|
+
@state = state
|
165
|
+
end
|
166
|
+
|
167
|
+
# Custom attribute writer method checking allowed values (enum).
|
168
|
+
# @param [Object] action_category Object to be assigned
|
169
|
+
def action_category=(action_category)
|
170
|
+
validator = EnumAttributeValidator.new('String', ['notification', 'file_upload'])
|
171
|
+
unless validator.valid?(action_category)
|
172
|
+
fail ArgumentError, 'invalid value for "action_category", must be one of #{validator.allowable_values}.'
|
173
|
+
end
|
174
|
+
@action_category = action_category
|
175
|
+
end
|
176
|
+
|
177
|
+
# Custom attribute writer method checking allowed values (enum).
|
178
|
+
# @param [Object] action_type Object to be assigned
|
179
|
+
def action_type=(action_type)
|
180
|
+
validator = EnumAttributeValidator.new('String', ['webhook', 'slack_webhook', 'email', 'aws_s3_upload'])
|
181
|
+
unless validator.valid?(action_type)
|
182
|
+
fail ArgumentError, 'invalid value for "action_type", must be one of #{validator.allowable_values}.'
|
183
|
+
end
|
184
|
+
@action_type = action_type
|
185
|
+
end
|
186
|
+
|
187
|
+
# Checks equality by comparing each attribute.
|
188
|
+
# @param [Object] Object to be compared
|
189
|
+
def ==(o)
|
190
|
+
return true if self.equal?(o)
|
191
|
+
self.class == o.class &&
|
192
|
+
id == o.id &&
|
193
|
+
integration_id == o.integration_id &&
|
194
|
+
state == o.state &&
|
195
|
+
action_category == o.action_category &&
|
196
|
+
action_type == o.action_type &&
|
197
|
+
result_data == o.result_data
|
198
|
+
end
|
199
|
+
|
200
|
+
# @see the `==` method
|
201
|
+
# @param [Object] Object to be compared
|
202
|
+
def eql?(o)
|
203
|
+
self == o
|
204
|
+
end
|
205
|
+
|
206
|
+
# Calculates hash code according to all attributes.
|
207
|
+
# @return [Fixnum] Hash code
|
208
|
+
def hash
|
209
|
+
[id, integration_id, state, action_category, action_type, result_data].hash
|
210
|
+
end
|
211
|
+
|
212
|
+
# Builds the object from hash
|
213
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
214
|
+
# @return [Object] Returns the model itself
|
215
|
+
def build_from_hash(attributes)
|
216
|
+
return nil unless attributes.is_a?(Hash)
|
217
|
+
self.class.openapi_types.each_pair do |key, type|
|
218
|
+
if type =~ /\AArray<(.*)>/i
|
219
|
+
# check to ensure the input is an array given that the the attribute
|
220
|
+
# is documented as an array but the input is not
|
221
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
222
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
223
|
+
end
|
224
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
225
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
226
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
227
|
+
end
|
228
|
+
|
229
|
+
self
|
230
|
+
end
|
231
|
+
|
232
|
+
# Deserializes the data based on type
|
233
|
+
# @param string type Data type
|
234
|
+
# @param string value Value to be deserialized
|
235
|
+
# @return [Object] Deserialized data
|
236
|
+
def _deserialize(type, value)
|
237
|
+
case type.to_sym
|
238
|
+
when :DateTime
|
239
|
+
DateTime.parse(value)
|
240
|
+
when :Date
|
241
|
+
Date.parse(value)
|
242
|
+
when :String
|
243
|
+
value.to_s
|
244
|
+
when :Integer
|
245
|
+
value.to_i
|
246
|
+
when :Float
|
247
|
+
value.to_f
|
248
|
+
when :BOOLEAN
|
249
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
250
|
+
true
|
251
|
+
else
|
252
|
+
false
|
253
|
+
end
|
254
|
+
when :Object
|
255
|
+
# generic object (usually a Hash), return directly
|
256
|
+
value
|
257
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
258
|
+
inner_type = Regexp.last_match[:inner_type]
|
259
|
+
value.map { |v| _deserialize(inner_type, v) }
|
260
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
261
|
+
k_type = Regexp.last_match[:k_type]
|
262
|
+
v_type = Regexp.last_match[:v_type]
|
263
|
+
{}.tap do |hash|
|
264
|
+
value.each do |k, v|
|
265
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
266
|
+
end
|
267
|
+
end
|
268
|
+
else # model
|
269
|
+
temp_model = FormAPI.const_get(type).new
|
270
|
+
temp_model.build_from_hash(value)
|
271
|
+
end
|
272
|
+
end
|
273
|
+
|
274
|
+
# Returns the string representation of the object
|
275
|
+
# @return [String] String presentation of the object
|
276
|
+
def to_s
|
277
|
+
to_hash.to_s
|
278
|
+
end
|
279
|
+
|
280
|
+
# to_body is an alias to to_hash (backward compatibility)
|
281
|
+
# @return [Hash] Returns the object in the form of hash
|
282
|
+
def to_body
|
283
|
+
to_hash
|
284
|
+
end
|
285
|
+
|
286
|
+
# Returns the object in the form of hash
|
287
|
+
# @return [Hash] Returns the object in the form of hash
|
288
|
+
def to_hash
|
289
|
+
hash = {}
|
290
|
+
self.class.attribute_map.each_pair do |attr, param|
|
291
|
+
value = self.send(attr)
|
292
|
+
next if value.nil?
|
293
|
+
hash[param] = _to_hash(value)
|
294
|
+
end
|
295
|
+
hash
|
296
|
+
end
|
297
|
+
|
298
|
+
# Outputs non-array value in the form of hash
|
299
|
+
# For object, use to_hash. Otherwise, just return the value
|
300
|
+
# @param [Object] value Any valid value
|
301
|
+
# @return [Hash] Returns the value in the form of hash
|
302
|
+
def _to_hash(value)
|
303
|
+
if value.is_a?(Array)
|
304
|
+
value.compact.map { |v| _to_hash(v) }
|
305
|
+
elsif value.is_a?(Hash)
|
306
|
+
{}.tap do |hash|
|
307
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
308
|
+
end
|
309
|
+
elsif value.respond_to? :to_hash
|
310
|
+
value.to_hash
|
311
|
+
else
|
312
|
+
value
|
313
|
+
end
|
314
|
+
end
|
315
|
+
end
|
316
|
+
end
|
@@ -34,6 +34,8 @@ module FormAPI
|
|
34
34
|
|
35
35
|
attr_accessor :data_requests
|
36
36
|
|
37
|
+
attr_accessor :actions
|
38
|
+
|
37
39
|
class EnumAttributeValidator
|
38
40
|
attr_reader :datatype
|
39
41
|
attr_reader :allowable_values
|
@@ -68,7 +70,8 @@ module FormAPI
|
|
68
70
|
:'metadata' => :'metadata',
|
69
71
|
:'download_url' => :'download_url',
|
70
72
|
:'batch_id' => :'batch_id',
|
71
|
-
:'data_requests' => :'data_requests'
|
73
|
+
:'data_requests' => :'data_requests',
|
74
|
+
:'actions' => :'actions'
|
72
75
|
}
|
73
76
|
end
|
74
77
|
|
@@ -84,7 +87,8 @@ module FormAPI
|
|
84
87
|
:'metadata' => :'Object',
|
85
88
|
:'download_url' => :'String',
|
86
89
|
:'batch_id' => :'String',
|
87
|
-
:'data_requests' => :'Array<SubmissionDataRequest>'
|
90
|
+
:'data_requests' => :'Array<SubmissionDataRequest>',
|
91
|
+
:'actions' => :'Array<SubmissionAction>'
|
88
92
|
}
|
89
93
|
end
|
90
94
|
|
@@ -137,6 +141,12 @@ module FormAPI
|
|
137
141
|
self.data_requests = value
|
138
142
|
end
|
139
143
|
end
|
144
|
+
|
145
|
+
if attributes.has_key?(:'actions')
|
146
|
+
if (value = attributes[:'actions']).is_a?(Array)
|
147
|
+
self.actions = value
|
148
|
+
end
|
149
|
+
end
|
140
150
|
end
|
141
151
|
|
142
152
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -198,7 +208,8 @@ module FormAPI
|
|
198
208
|
metadata == o.metadata &&
|
199
209
|
download_url == o.download_url &&
|
200
210
|
batch_id == o.batch_id &&
|
201
|
-
data_requests == o.data_requests
|
211
|
+
data_requests == o.data_requests &&
|
212
|
+
actions == o.actions
|
202
213
|
end
|
203
214
|
|
204
215
|
# @see the `==` method
|
@@ -210,7 +221,7 @@ module FormAPI
|
|
210
221
|
# Calculates hash code according to all attributes.
|
211
222
|
# @return [Fixnum] Hash code
|
212
223
|
def hash
|
213
|
-
[id, test, expired, expires_at, processed_at, state, metadata, download_url, batch_id, data_requests].hash
|
224
|
+
[id, test, expired, expires_at, processed_at, state, metadata, download_url, batch_id, data_requests, actions].hash
|
214
225
|
end
|
215
226
|
|
216
227
|
# Builds the object from hash
|
@@ -0,0 +1,316 @@
|
|
1
|
+
=begin
|
2
|
+
#API v1
|
3
|
+
|
4
|
+
#FormAPI is a service that helps you fill out and sign PDF templates.
|
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 SubmissionAction
|
17
|
+
attr_accessor :id
|
18
|
+
|
19
|
+
attr_accessor :integration_id
|
20
|
+
|
21
|
+
attr_accessor :state
|
22
|
+
|
23
|
+
attr_accessor :action_category
|
24
|
+
|
25
|
+
attr_accessor :action_type
|
26
|
+
|
27
|
+
attr_accessor :result_data
|
28
|
+
|
29
|
+
class EnumAttributeValidator
|
30
|
+
attr_reader :datatype
|
31
|
+
attr_reader :allowable_values
|
32
|
+
|
33
|
+
def initialize(datatype, allowable_values)
|
34
|
+
@allowable_values = allowable_values.map do |value|
|
35
|
+
case datatype.to_s
|
36
|
+
when /Integer/i
|
37
|
+
value.to_i
|
38
|
+
when /Float/i
|
39
|
+
value.to_f
|
40
|
+
else
|
41
|
+
value
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
def valid?(value)
|
47
|
+
!value || allowable_values.include?(value)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
52
|
+
def self.attribute_map
|
53
|
+
{
|
54
|
+
:'id' => :'id',
|
55
|
+
:'integration_id' => :'integration_id',
|
56
|
+
:'state' => :'state',
|
57
|
+
:'action_category' => :'action_category',
|
58
|
+
:'action_type' => :'action_type',
|
59
|
+
:'result_data' => :'result_data'
|
60
|
+
}
|
61
|
+
end
|
62
|
+
|
63
|
+
# Attribute type mapping.
|
64
|
+
def self.openapi_types
|
65
|
+
{
|
66
|
+
:'id' => :'String',
|
67
|
+
:'integration_id' => :'String',
|
68
|
+
:'state' => :'String',
|
69
|
+
:'action_category' => :'String',
|
70
|
+
:'action_type' => :'String',
|
71
|
+
:'result_data' => :'Object'
|
72
|
+
}
|
73
|
+
end
|
74
|
+
|
75
|
+
# Initializes the object
|
76
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
77
|
+
def initialize(attributes = {})
|
78
|
+
return unless attributes.is_a?(Hash)
|
79
|
+
|
80
|
+
# convert string to symbol for hash key
|
81
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
82
|
+
|
83
|
+
if attributes.has_key?(:'id')
|
84
|
+
self.id = attributes[:'id']
|
85
|
+
end
|
86
|
+
|
87
|
+
if attributes.has_key?(:'integration_id')
|
88
|
+
self.integration_id = attributes[:'integration_id']
|
89
|
+
end
|
90
|
+
|
91
|
+
if attributes.has_key?(:'state')
|
92
|
+
self.state = attributes[:'state']
|
93
|
+
end
|
94
|
+
|
95
|
+
if attributes.has_key?(:'action_category')
|
96
|
+
self.action_category = attributes[:'action_category']
|
97
|
+
end
|
98
|
+
|
99
|
+
if attributes.has_key?(:'action_type')
|
100
|
+
self.action_type = attributes[:'action_type']
|
101
|
+
end
|
102
|
+
|
103
|
+
if attributes.has_key?(:'result_data')
|
104
|
+
self.result_data = attributes[:'result_data']
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
109
|
+
# @return Array for valid properties with the reasons
|
110
|
+
def list_invalid_properties
|
111
|
+
invalid_properties = Array.new
|
112
|
+
if @id.nil?
|
113
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
114
|
+
end
|
115
|
+
|
116
|
+
if @integration_id.nil?
|
117
|
+
invalid_properties.push('invalid value for "integration_id", integration_id cannot be nil.')
|
118
|
+
end
|
119
|
+
|
120
|
+
if @state.nil?
|
121
|
+
invalid_properties.push('invalid value for "state", state cannot be nil.')
|
122
|
+
end
|
123
|
+
|
124
|
+
if @action_category.nil?
|
125
|
+
invalid_properties.push('invalid value for "action_category", action_category cannot be nil.')
|
126
|
+
end
|
127
|
+
|
128
|
+
if @action_type.nil?
|
129
|
+
invalid_properties.push('invalid value for "action_type", action_type cannot be nil.')
|
130
|
+
end
|
131
|
+
|
132
|
+
if @result_data.nil?
|
133
|
+
invalid_properties.push('invalid value for "result_data", result_data cannot be nil.')
|
134
|
+
end
|
135
|
+
|
136
|
+
invalid_properties
|
137
|
+
end
|
138
|
+
|
139
|
+
# Check to see if the all the properties in the model are valid
|
140
|
+
# @return true if the model is valid
|
141
|
+
def valid?
|
142
|
+
return false if @id.nil?
|
143
|
+
return false if @integration_id.nil?
|
144
|
+
return false if @state.nil?
|
145
|
+
state_validator = EnumAttributeValidator.new('String', ['pending', 'processed', 'failed', 'error'])
|
146
|
+
return false unless state_validator.valid?(@state)
|
147
|
+
return false if @action_category.nil?
|
148
|
+
action_category_validator = EnumAttributeValidator.new('String', ['notification', 'file_upload'])
|
149
|
+
return false unless action_category_validator.valid?(@action_category)
|
150
|
+
return false if @action_type.nil?
|
151
|
+
action_type_validator = EnumAttributeValidator.new('String', ['webhook', 'slack_webhook', 'email', 'aws_s3_upload'])
|
152
|
+
return false unless action_type_validator.valid?(@action_type)
|
153
|
+
return false if @result_data.nil?
|
154
|
+
true
|
155
|
+
end
|
156
|
+
|
157
|
+
# Custom attribute writer method checking allowed values (enum).
|
158
|
+
# @param [Object] state Object to be assigned
|
159
|
+
def state=(state)
|
160
|
+
validator = EnumAttributeValidator.new('String', ['pending', 'processed', 'failed', 'error'])
|
161
|
+
unless validator.valid?(state)
|
162
|
+
fail ArgumentError, 'invalid value for "state", must be one of #{validator.allowable_values}.'
|
163
|
+
end
|
164
|
+
@state = state
|
165
|
+
end
|
166
|
+
|
167
|
+
# Custom attribute writer method checking allowed values (enum).
|
168
|
+
# @param [Object] action_category Object to be assigned
|
169
|
+
def action_category=(action_category)
|
170
|
+
validator = EnumAttributeValidator.new('String', ['notification', 'file_upload'])
|
171
|
+
unless validator.valid?(action_category)
|
172
|
+
fail ArgumentError, 'invalid value for "action_category", must be one of #{validator.allowable_values}.'
|
173
|
+
end
|
174
|
+
@action_category = action_category
|
175
|
+
end
|
176
|
+
|
177
|
+
# Custom attribute writer method checking allowed values (enum).
|
178
|
+
# @param [Object] action_type Object to be assigned
|
179
|
+
def action_type=(action_type)
|
180
|
+
validator = EnumAttributeValidator.new('String', ['webhook', 'slack_webhook', 'email', 'aws_s3_upload'])
|
181
|
+
unless validator.valid?(action_type)
|
182
|
+
fail ArgumentError, 'invalid value for "action_type", must be one of #{validator.allowable_values}.'
|
183
|
+
end
|
184
|
+
@action_type = action_type
|
185
|
+
end
|
186
|
+
|
187
|
+
# Checks equality by comparing each attribute.
|
188
|
+
# @param [Object] Object to be compared
|
189
|
+
def ==(o)
|
190
|
+
return true if self.equal?(o)
|
191
|
+
self.class == o.class &&
|
192
|
+
id == o.id &&
|
193
|
+
integration_id == o.integration_id &&
|
194
|
+
state == o.state &&
|
195
|
+
action_category == o.action_category &&
|
196
|
+
action_type == o.action_type &&
|
197
|
+
result_data == o.result_data
|
198
|
+
end
|
199
|
+
|
200
|
+
# @see the `==` method
|
201
|
+
# @param [Object] Object to be compared
|
202
|
+
def eql?(o)
|
203
|
+
self == o
|
204
|
+
end
|
205
|
+
|
206
|
+
# Calculates hash code according to all attributes.
|
207
|
+
# @return [Fixnum] Hash code
|
208
|
+
def hash
|
209
|
+
[id, integration_id, state, action_category, action_type, result_data].hash
|
210
|
+
end
|
211
|
+
|
212
|
+
# Builds the object from hash
|
213
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
214
|
+
# @return [Object] Returns the model itself
|
215
|
+
def build_from_hash(attributes)
|
216
|
+
return nil unless attributes.is_a?(Hash)
|
217
|
+
self.class.openapi_types.each_pair do |key, type|
|
218
|
+
if type =~ /\AArray<(.*)>/i
|
219
|
+
# check to ensure the input is an array given that the the attribute
|
220
|
+
# is documented as an array but the input is not
|
221
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
222
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
223
|
+
end
|
224
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
225
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
226
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
227
|
+
end
|
228
|
+
|
229
|
+
self
|
230
|
+
end
|
231
|
+
|
232
|
+
# Deserializes the data based on type
|
233
|
+
# @param string type Data type
|
234
|
+
# @param string value Value to be deserialized
|
235
|
+
# @return [Object] Deserialized data
|
236
|
+
def _deserialize(type, value)
|
237
|
+
case type.to_sym
|
238
|
+
when :DateTime
|
239
|
+
DateTime.parse(value)
|
240
|
+
when :Date
|
241
|
+
Date.parse(value)
|
242
|
+
when :String
|
243
|
+
value.to_s
|
244
|
+
when :Integer
|
245
|
+
value.to_i
|
246
|
+
when :Float
|
247
|
+
value.to_f
|
248
|
+
when :BOOLEAN
|
249
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
250
|
+
true
|
251
|
+
else
|
252
|
+
false
|
253
|
+
end
|
254
|
+
when :Object
|
255
|
+
# generic object (usually a Hash), return directly
|
256
|
+
value
|
257
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
258
|
+
inner_type = Regexp.last_match[:inner_type]
|
259
|
+
value.map { |v| _deserialize(inner_type, v) }
|
260
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
261
|
+
k_type = Regexp.last_match[:k_type]
|
262
|
+
v_type = Regexp.last_match[:v_type]
|
263
|
+
{}.tap do |hash|
|
264
|
+
value.each do |k, v|
|
265
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
266
|
+
end
|
267
|
+
end
|
268
|
+
else # model
|
269
|
+
temp_model = FormAPI.const_get(type).new
|
270
|
+
temp_model.build_from_hash(value)
|
271
|
+
end
|
272
|
+
end
|
273
|
+
|
274
|
+
# Returns the string representation of the object
|
275
|
+
# @return [String] String presentation of the object
|
276
|
+
def to_s
|
277
|
+
to_hash.to_s
|
278
|
+
end
|
279
|
+
|
280
|
+
# to_body is an alias to to_hash (backward compatibility)
|
281
|
+
# @return [Hash] Returns the object in the form of hash
|
282
|
+
def to_body
|
283
|
+
to_hash
|
284
|
+
end
|
285
|
+
|
286
|
+
# Returns the object in the form of hash
|
287
|
+
# @return [Hash] Returns the object in the form of hash
|
288
|
+
def to_hash
|
289
|
+
hash = {}
|
290
|
+
self.class.attribute_map.each_pair do |attr, param|
|
291
|
+
value = self.send(attr)
|
292
|
+
next if value.nil?
|
293
|
+
hash[param] = _to_hash(value)
|
294
|
+
end
|
295
|
+
hash
|
296
|
+
end
|
297
|
+
|
298
|
+
# Outputs non-array value in the form of hash
|
299
|
+
# For object, use to_hash. Otherwise, just return the value
|
300
|
+
# @param [Object] value Any valid value
|
301
|
+
# @return [Hash] Returns the value in the form of hash
|
302
|
+
def _to_hash(value)
|
303
|
+
if value.is_a?(Array)
|
304
|
+
value.compact.map { |v| _to_hash(v) }
|
305
|
+
elsif value.is_a?(Hash)
|
306
|
+
{}.tap do |hash|
|
307
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
308
|
+
end
|
309
|
+
elsif value.respond_to? :to_hash
|
310
|
+
value.to_hash
|
311
|
+
else
|
312
|
+
value
|
313
|
+
end
|
314
|
+
end
|
315
|
+
end
|
316
|
+
end
|
data/lib/form_api/version.rb
CHANGED
@@ -93,7 +93,7 @@ describe 'PDFApi' do
|
|
93
93
|
# @param template_document
|
94
94
|
# @param template_name
|
95
95
|
# @param [Hash] opts the optional parameters
|
96
|
-
# @return [
|
96
|
+
# @return [PendingTemplate]
|
97
97
|
describe 'create_template test' do
|
98
98
|
it 'should work' do
|
99
99
|
template_document = File.new('/path/to/file') # File |
|
@@ -0,0 +1,83 @@
|
|
1
|
+
=begin
|
2
|
+
#API v1
|
3
|
+
|
4
|
+
#FormAPI is a service that helps you fill out and sign PDF templates.
|
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::CombinedSubmissionAction
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'CombinedSubmissionAction' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = FormAPI::CombinedSubmissionAction.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of CombinedSubmissionAction' do
|
31
|
+
it 'should create an instance of CombinedSubmissionAction' do
|
32
|
+
expect(@instance).to be_instance_of(FormAPI::CombinedSubmissionAction)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "id"' 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 "integration_id"' 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 "state"' do
|
48
|
+
it 'should work' do
|
49
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
50
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["pending", "processed", "failed", "error"])
|
51
|
+
# validator.allowable_values.each do |value|
|
52
|
+
# expect { @instance.state = value }.not_to raise_error
|
53
|
+
# end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
describe 'test attribute "action_category"' do
|
58
|
+
it 'should work' do
|
59
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
60
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["notification", "file_upload"])
|
61
|
+
# validator.allowable_values.each do |value|
|
62
|
+
# expect { @instance.action_category = value }.not_to raise_error
|
63
|
+
# end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
describe 'test attribute "action_type"' do
|
68
|
+
it 'should work' do
|
69
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
70
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["webhook", "slack_webhook", "email", "aws_s3_upload"])
|
71
|
+
# validator.allowable_values.each do |value|
|
72
|
+
# expect { @instance.action_type = value }.not_to raise_error
|
73
|
+
# end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
describe 'test attribute "result_data"' do
|
78
|
+
it 'should work' do
|
79
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
end
|
@@ -14,22 +14,22 @@ require 'spec_helper'
|
|
14
14
|
require 'json'
|
15
15
|
require 'date'
|
16
16
|
|
17
|
-
# Unit tests for FormAPI::
|
17
|
+
# Unit tests for FormAPI::PendingTemplate
|
18
18
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
19
|
# Please update as you see appropriate
|
20
|
-
describe '
|
20
|
+
describe 'PendingTemplate' do
|
21
21
|
before do
|
22
22
|
# run before each test
|
23
|
-
@instance = FormAPI::
|
23
|
+
@instance = FormAPI::PendingTemplate.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 PendingTemplate' do
|
31
|
+
it 'should create an instance of PendingTemplate' do
|
32
|
+
expect(@instance).to be_instance_of(FormAPI::PendingTemplate)
|
33
33
|
end
|
34
34
|
end
|
35
35
|
describe 'test attribute "expiration_interval"' do
|
@@ -0,0 +1,83 @@
|
|
1
|
+
=begin
|
2
|
+
#API v1
|
3
|
+
|
4
|
+
#FormAPI is a service that helps you fill out and sign PDF templates.
|
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::SubmissionAction
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'SubmissionAction' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = FormAPI::SubmissionAction.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of SubmissionAction' do
|
31
|
+
it 'should create an instance of SubmissionAction' do
|
32
|
+
expect(@instance).to be_instance_of(FormAPI::SubmissionAction)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "id"' 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 "integration_id"' 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 "state"' do
|
48
|
+
it 'should work' do
|
49
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
50
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["pending", "processed", "failed", "error"])
|
51
|
+
# validator.allowable_values.each do |value|
|
52
|
+
# expect { @instance.state = value }.not_to raise_error
|
53
|
+
# end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
describe 'test attribute "action_category"' do
|
58
|
+
it 'should work' do
|
59
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
60
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["notification", "file_upload"])
|
61
|
+
# validator.allowable_values.each do |value|
|
62
|
+
# expect { @instance.action_category = value }.not_to raise_error
|
63
|
+
# end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
describe 'test attribute "action_type"' do
|
68
|
+
it 'should work' do
|
69
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
70
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["webhook", "slack_webhook", "email", "aws_s3_upload"])
|
71
|
+
# validator.allowable_values.each do |value|
|
72
|
+
# expect { @instance.action_type = value }.not_to raise_error
|
73
|
+
# end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
describe 'test attribute "result_data"' do
|
78
|
+
it 'should work' do
|
79
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
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.5.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-12-
|
11
|
+
date: 2018-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -235,6 +235,7 @@ files:
|
|
235
235
|
- docs/AuthenticationError.md
|
236
236
|
- docs/AuthenticationSuccessResponse.md
|
237
237
|
- docs/CombinedSubmission.md
|
238
|
+
- docs/CombinedSubmissionAction.md
|
238
239
|
- docs/CombinedSubmissionData.md
|
239
240
|
- docs/CreateCombinedSubmissionResponse.md
|
240
241
|
- docs/CreateSubmissionBatchResponse.md
|
@@ -249,12 +250,13 @@ files:
|
|
249
250
|
- docs/Error.md
|
250
251
|
- docs/InvalidRequest.md
|
251
252
|
- docs/PDFApi.md
|
253
|
+
- docs/PendingTemplate.md
|
252
254
|
- docs/Submission.md
|
255
|
+
- docs/SubmissionAction.md
|
253
256
|
- docs/SubmissionBatch.md
|
254
257
|
- docs/SubmissionBatchData.md
|
255
258
|
- docs/SubmissionDataRequest.md
|
256
259
|
- docs/Template.md
|
257
|
-
- docs/Template1.md
|
258
260
|
- docs/UpdateDataRequestResponse.md
|
259
261
|
- docs/UpdateSubmissionDataRequestData.md
|
260
262
|
- form_api.gemspec
|
@@ -268,6 +270,7 @@ files:
|
|
268
270
|
- lib/form_api/models/authentication_error.rb
|
269
271
|
- lib/form_api/models/authentication_success_response.rb
|
270
272
|
- lib/form_api/models/combined_submission.rb
|
273
|
+
- lib/form_api/models/combined_submission_action.rb
|
271
274
|
- lib/form_api/models/combined_submission_data.rb
|
272
275
|
- lib/form_api/models/create_combined_submission_response.rb
|
273
276
|
- lib/form_api/models/create_submission_batch_response.rb
|
@@ -281,12 +284,13 @@ files:
|
|
281
284
|
- lib/form_api/models/create_submission_response.rb
|
282
285
|
- lib/form_api/models/error.rb
|
283
286
|
- lib/form_api/models/invalid_request.rb
|
287
|
+
- lib/form_api/models/pending_template.rb
|
284
288
|
- lib/form_api/models/submission.rb
|
289
|
+
- lib/form_api/models/submission_action.rb
|
285
290
|
- lib/form_api/models/submission_batch.rb
|
286
291
|
- lib/form_api/models/submission_batch_data.rb
|
287
292
|
- lib/form_api/models/submission_data_request.rb
|
288
293
|
- lib/form_api/models/template.rb
|
289
|
-
- lib/form_api/models/template1.rb
|
290
294
|
- lib/form_api/models/update_data_request_response.rb
|
291
295
|
- lib/form_api/models/update_submission_data_request_data.rb
|
292
296
|
- lib/form_api/version.rb
|
@@ -297,6 +301,7 @@ files:
|
|
297
301
|
- spec/configuration_spec.rb
|
298
302
|
- spec/models/authentication_error_spec.rb
|
299
303
|
- spec/models/authentication_success_response_spec.rb
|
304
|
+
- spec/models/combined_submission_action_spec.rb
|
300
305
|
- spec/models/combined_submission_data_spec.rb
|
301
306
|
- spec/models/combined_submission_spec.rb
|
302
307
|
- spec/models/create_combined_submission_response_spec.rb
|
@@ -311,11 +316,12 @@ files:
|
|
311
316
|
- spec/models/create_submission_response_spec.rb
|
312
317
|
- spec/models/error_spec.rb
|
313
318
|
- spec/models/invalid_request_spec.rb
|
319
|
+
- spec/models/pending_template_spec.rb
|
320
|
+
- spec/models/submission_action_spec.rb
|
314
321
|
- spec/models/submission_batch_data_spec.rb
|
315
322
|
- spec/models/submission_batch_spec.rb
|
316
323
|
- spec/models/submission_data_request_spec.rb
|
317
324
|
- spec/models/submission_spec.rb
|
318
|
-
- spec/models/template1_spec.rb
|
319
325
|
- spec/models/template_spec.rb
|
320
326
|
- spec/models/update_data_request_response_spec.rb
|
321
327
|
- spec/models/update_submission_data_request_data_spec.rb
|
@@ -352,6 +358,7 @@ test_files:
|
|
352
358
|
- spec/configuration_spec.rb
|
353
359
|
- spec/models/authentication_error_spec.rb
|
354
360
|
- spec/models/authentication_success_response_spec.rb
|
361
|
+
- spec/models/combined_submission_action_spec.rb
|
355
362
|
- spec/models/combined_submission_data_spec.rb
|
356
363
|
- spec/models/combined_submission_spec.rb
|
357
364
|
- spec/models/create_combined_submission_response_spec.rb
|
@@ -366,11 +373,12 @@ test_files:
|
|
366
373
|
- spec/models/create_submission_response_spec.rb
|
367
374
|
- spec/models/error_spec.rb
|
368
375
|
- spec/models/invalid_request_spec.rb
|
376
|
+
- spec/models/pending_template_spec.rb
|
377
|
+
- spec/models/submission_action_spec.rb
|
369
378
|
- spec/models/submission_batch_data_spec.rb
|
370
379
|
- spec/models/submission_batch_spec.rb
|
371
380
|
- spec/models/submission_data_request_spec.rb
|
372
381
|
- spec/models/submission_spec.rb
|
373
|
-
- spec/models/template1_spec.rb
|
374
382
|
- spec/models/template_spec.rb
|
375
383
|
- spec/models/update_data_request_response_spec.rb
|
376
384
|
- spec/models/update_submission_data_request_data_spec.rb
|