form_api 1.2.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,5 +11,5 @@ OpenAPI Generator version: 3.3.0-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module FormAPI
14
- VERSION = '1.2.0'
14
+ VERSION = '1.3.0'
15
15
  end
@@ -223,6 +223,7 @@ describe 'PDFApi' do
223
223
  email: 'jsmith@example.com',
224
224
  fields: ['description'],
225
225
  order: 1,
226
+ auth_type: 'email_link',
226
227
  }
227
228
  ]
228
229
  )
@@ -273,10 +274,47 @@ describe 'PDFApi' do
273
274
  expect(data_request.fields).to eq ['description']
274
275
  expect(data_request.metadata).to eq(user_id: 123)
275
276
  expect(data_request.state).to eq 'pending'
276
- expect(data_request.viewed_at).to eq '2018-10-23T13:00:00Z'
277
+ expect(data_request.viewed_at).to be_nil
277
278
  expect(data_request.completed_at).to be_nil
278
279
  end
279
280
  end
281
+
282
+ # integration tests for update_data_request
283
+ # Update a submission data request
284
+ # @param data_request_id
285
+ # @param [Hash] opts the optional parameters
286
+ # @return [SubmissionDataRequest]
287
+ describe 'get_data_request test' do
288
+ it 'should work' do
289
+ data_request_id = 'drq_000000000000000001' # String |
290
+ response = api_instance.update_data_request(
291
+ data_request_id,
292
+ name: 'Harry Smith',
293
+ email: 'hsmith@example.com',
294
+ order: 2,
295
+ fields: ['title'],
296
+ metadata: { user_id: 345 },
297
+ auth_type: 'oauth',
298
+ auth_provider: 'twitter',
299
+ auth_session_started_at: '2018-10-23T13:00:00Z'
300
+ )
301
+ expect(response.status).to eq 'success'
302
+ data_request = response.data_request
303
+ expect(data_request.id).to start_with 'drq_'
304
+ # Not allowed to update order, name, email, etc.
305
+ expect(data_request.order).to eq 1
306
+ expect(data_request.name).to eq 'John Doe'
307
+ expect(data_request.email).to eq 'jdoe@example.com'
308
+ expect(data_request.fields).to eq ['description']
309
+ expect(data_request.metadata).to eq(user_id: 345)
310
+ expect(data_request.state).to eq 'pending'
311
+ expect(data_request.viewed_at).to be_nil
312
+ expect(data_request.completed_at).to be_nil
313
+ expect(data_request.auth_type).to eq 'oauth'
314
+ expect(data_request.auth_provider).to eq 'twitter'
315
+ expect(data_request.auth_session_started_at).to eq '2018-10-23T13:00:00Z'
316
+ end
317
+ end
280
318
  # integration tests for get_submission
281
319
  # Check the status of a PDF
282
320
  # @param submission_id
@@ -204,4 +204,18 @@ describe 'PDFApi' do
204
204
  expect(result).to_not be_nil
205
205
  end
206
206
  end
207
+ # integration tests for update_data_request
208
+ # Update a submission data request
209
+ # @param data_request_id
210
+ # @param update_submission_data_request_data
211
+ # @param [Hash] opts the optional parameters
212
+ # @return [UpdateDataRequestResponse]
213
+ describe 'update_data_request test' do
214
+ it 'should work' do
215
+ data_request_id = 'drq_000000000000000001' # String |
216
+ update_submission_data_request_data = FormAPI::UpdateSubmissionDataRequestData.new # UpdateSubmissionDataRequestData |
217
+ result = api_instance.update_data_request(data_request_id, update_submission_data_request_data)
218
+ expect(result).to_not be_nil
219
+ end
220
+ end
207
221
  end
@@ -0,0 +1,121 @@
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::CreateSubmissionDataRequestData
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'CreateSubmissionDataRequestData' do
21
+ before do
22
+ # run before each test
23
+ @instance = FormAPI::CreateSubmissionDataRequestData.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of CreateSubmissionDataRequestData' do
31
+ it 'should create an instance of CreateSubmissionDataRequestData' do
32
+ expect(@instance).to be_instance_of(FormAPI::CreateSubmissionDataRequestData)
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 "auth_type"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["none", "password", "oauth", "email_link", "phone_number", "ldap", "saml"])
45
+ # validator.allowable_values.each do |value|
46
+ # expect { @instance.auth_type = value }.not_to raise_error
47
+ # end
48
+ end
49
+ end
50
+
51
+ describe 'test attribute "auth_second_factor_type"' do
52
+ it 'should work' do
53
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
54
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["none", "phone_number", "totp", "mobile_push", "security_key", "fingerprint"])
55
+ # validator.allowable_values.each do |value|
56
+ # expect { @instance.auth_second_factor_type = value }.not_to raise_error
57
+ # end
58
+ end
59
+ end
60
+
61
+ describe 'test attribute "auth_phone_number_hash"' do
62
+ it 'should work' do
63
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
64
+ end
65
+ end
66
+
67
+ describe 'test attribute "auth_session_started_at"' do
68
+ it 'should work' do
69
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
70
+ end
71
+ end
72
+
73
+ describe 'test attribute "auth_user_id_hash"' do
74
+ it 'should work' do
75
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
76
+ end
77
+ end
78
+
79
+ describe 'test attribute "auth_session_id_hash"' do
80
+ it 'should work' do
81
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
82
+ end
83
+ end
84
+
85
+ describe 'test attribute "auth_username_hash"' do
86
+ it 'should work' do
87
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
88
+ end
89
+ end
90
+
91
+ describe 'test attribute "name"' do
92
+ it 'should work' do
93
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
94
+ end
95
+ end
96
+
97
+ describe 'test attribute "fields"' do
98
+ it 'should work' do
99
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
100
+ end
101
+ end
102
+
103
+ describe 'test attribute "email"' do
104
+ it 'should work' do
105
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
106
+ end
107
+ end
108
+
109
+ describe 'test attribute "auth_provider"' do
110
+ it 'should work' do
111
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
112
+ end
113
+ end
114
+
115
+ describe 'test attribute "order"' do
116
+ it 'should work' do
117
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
118
+ end
119
+ end
120
+
121
+ end
@@ -71,7 +71,7 @@ describe 'SubmissionDataRequest' do
71
71
  describe 'test attribute "state"' do
72
72
  it 'should work' do
73
73
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
74
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["pending", "complete"])
74
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["pending", "completed"])
75
75
  # validator.allowable_values.each do |value|
76
76
  # expect { @instance.state = value }.not_to raise_error
77
77
  # end
@@ -90,4 +90,60 @@ describe 'SubmissionDataRequest' do
90
90
  end
91
91
  end
92
92
 
93
+ describe 'test attribute "auth_type"' do
94
+ it 'should work' do
95
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
96
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["none", "password", "oauth", "email_link", "phone_number", "ldap", "saml"])
97
+ # validator.allowable_values.each do |value|
98
+ # expect { @instance.auth_type = value }.not_to raise_error
99
+ # end
100
+ end
101
+ end
102
+
103
+ describe 'test attribute "auth_second_factor_type"' do
104
+ it 'should work' do
105
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
106
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["none", "phone_number", "totp", "mobile_push", "security_key", "fingerprint"])
107
+ # validator.allowable_values.each do |value|
108
+ # expect { @instance.auth_second_factor_type = value }.not_to raise_error
109
+ # end
110
+ end
111
+ end
112
+
113
+ describe 'test attribute "auth_provider"' do
114
+ it 'should work' do
115
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
116
+ end
117
+ end
118
+
119
+ describe 'test attribute "auth_session_started_at"' do
120
+ it 'should work' do
121
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
122
+ end
123
+ end
124
+
125
+ describe 'test attribute "auth_session_id_hash"' do
126
+ it 'should work' do
127
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
128
+ end
129
+ end
130
+
131
+ describe 'test attribute "auth_user_id_hash"' do
132
+ it 'should work' do
133
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
134
+ end
135
+ end
136
+
137
+ describe 'test attribute "auth_username_hash"' do
138
+ it 'should work' do
139
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
140
+ end
141
+ end
142
+
143
+ describe 'test attribute "auth_phone_number_hash"' do
144
+ it 'should work' do
145
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
146
+ end
147
+ end
148
+
93
149
  end
@@ -14,51 +14,43 @@ require 'spec_helper'
14
14
  require 'json'
15
15
  require 'date'
16
16
 
17
- # Unit tests for FormAPI::SubmissionDataRequestData
17
+ # Unit tests for FormAPI::UpdateDataRequestResponse
18
18
  # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
19
  # Please update as you see appropriate
20
- describe 'SubmissionDataRequestData' do
20
+ describe 'UpdateDataRequestResponse' do
21
21
  before do
22
22
  # run before each test
23
- @instance = FormAPI::SubmissionDataRequestData.new
23
+ @instance = FormAPI::UpdateDataRequestResponse.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 SubmissionDataRequestData' do
31
- it 'should create an instance of SubmissionDataRequestData' do
32
- expect(@instance).to be_instance_of(FormAPI::SubmissionDataRequestData)
30
+ describe 'test an instance of UpdateDataRequestResponse' do
31
+ it 'should create an instance of UpdateDataRequestResponse' do
32
+ expect(@instance).to be_instance_of(FormAPI::UpdateDataRequestResponse)
33
33
  end
34
34
  end
35
- describe 'test attribute "metadata"' do
35
+ describe 'test attribute "data_request"' 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 "name"' do
41
+ describe 'test attribute "errors"' 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 "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
47
+ describe 'test attribute "status"' do
60
48
  it 'should work' do
61
49
  # 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
62
54
  end
63
55
  end
64
56
 
@@ -0,0 +1,121 @@
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::UpdateSubmissionDataRequestData
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'UpdateSubmissionDataRequestData' do
21
+ before do
22
+ # run before each test
23
+ @instance = FormAPI::UpdateSubmissionDataRequestData.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of UpdateSubmissionDataRequestData' do
31
+ it 'should create an instance of UpdateSubmissionDataRequestData' do
32
+ expect(@instance).to be_instance_of(FormAPI::UpdateSubmissionDataRequestData)
33
+ end
34
+ end
35
+ describe 'test attribute "name"' 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 "email"' 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 "order"' 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 "fields"' 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
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
+ describe 'test attribute "auth_type"' do
66
+ it 'should work' do
67
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
68
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["none", "password", "oauth", "email_link", "phone_number", "ldap", "saml"])
69
+ # validator.allowable_values.each do |value|
70
+ # expect { @instance.auth_type = value }.not_to raise_error
71
+ # end
72
+ end
73
+ end
74
+
75
+ describe 'test attribute "auth_second_factor_type"' do
76
+ it 'should work' do
77
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
78
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["none", "phone_number", "totp", "mobile_push", "security_key", "fingerprint"])
79
+ # validator.allowable_values.each do |value|
80
+ # expect { @instance.auth_second_factor_type = value }.not_to raise_error
81
+ # end
82
+ end
83
+ end
84
+
85
+ describe 'test attribute "auth_provider"' do
86
+ it 'should work' do
87
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
88
+ end
89
+ end
90
+
91
+ describe 'test attribute "auth_session_started_at"' do
92
+ it 'should work' do
93
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
94
+ end
95
+ end
96
+
97
+ describe 'test attribute "auth_session_id_hash"' do
98
+ it 'should work' do
99
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
100
+ end
101
+ end
102
+
103
+ describe 'test attribute "auth_user_id_hash"' do
104
+ it 'should work' do
105
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
106
+ end
107
+ end
108
+
109
+ describe 'test attribute "auth_username_hash"' do
110
+ it 'should work' do
111
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
112
+ end
113
+ end
114
+
115
+ describe 'test attribute "auth_phone_number_hash"' do
116
+ it 'should work' do
117
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
118
+ end
119
+ end
120
+
121
+ end