roqua-rom-api 2.3.1 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -5
- data/lib/roqua/rom_api/update_response.rb +7 -7
- data/lib/roqua/rom_api/version.rb +1 -1
- data/spec/lib/roqua/rom_api/update_response_spec.rb +2 -2
- metadata +14 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 477f788af8448ee3fa2a41f20352eef3328dc09e712671437db727ea80da013d
|
4
|
+
data.tar.gz: 5067b2d36c85318641c47dfc7f7ae53e52257448b5de0fcf66ed4f2b928b6c06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17dd22e0f74ec2d4e47e816f0f7d103691ce14266411ce3db3f140a363e4c24c0c9c4a3b72329b8d90aa61b652914555392474e14b8f4081a7c0bbc43c50c30b
|
7
|
+
data.tar.gz: edfd436ed08cc2df027f8369d54f1d056c02fdcb7d1279aef3f7bddc7ef75d3deffc213c1bc7858d79501c97de820c39f76ef818ef1aec93dad7d2b982dd8471
|
data/README.md
CHANGED
@@ -109,17 +109,18 @@ To store an externally filled out questionnaire run:
|
|
109
109
|
|
110
110
|
outcome = Roqua::RomApi::CreateResponse.run questionnaire_key: 'questionnaire_key',
|
111
111
|
dossier_id: 'dossier_id',
|
112
|
-
|
112
|
+
external_id: '230',
|
113
|
+
answer_data: {some: 'answer_data'}
|
113
114
|
|
114
115
|
### [Update](http://docs.roqua.net/developer/rom/dossier/responses/#update-a-response)
|
115
116
|
|
116
117
|
To store external data on an existing pending response:
|
117
118
|
|
118
|
-
outcome = Roqua::RomApi::
|
119
|
+
outcome = Roqua::RomApi::UpdateResponse.run questionnaire_key: 'questionnaire_key',
|
119
120
|
dossier_id: 'dossier_id',
|
120
|
-
|
121
|
-
answer_data: {some: '
|
122
|
-
|
121
|
+
external_id: "230", # response id,
|
122
|
+
answer_data: {some: 'answer_data'}
|
123
|
+
n
|
123
124
|
## [NonResponses](http://docs.roqua.net/developer/rom/dossier/non_responses/)
|
124
125
|
|
125
126
|
* [List](Roqua/RomApi/ListNonResponses.html)
|
@@ -2,16 +2,16 @@ module Roqua
|
|
2
2
|
module RomApi
|
3
3
|
# @api private
|
4
4
|
class UpdateResponse < Endpoint
|
5
|
-
string
|
6
|
-
string
|
7
|
-
|
8
|
-
hash
|
9
|
-
time
|
10
|
-
time
|
5
|
+
string :questionnaire_key
|
6
|
+
string :dossier_id
|
7
|
+
string :external_id
|
8
|
+
hash :answer_data, strip: false
|
9
|
+
time :filled_out_at, default: nil
|
10
|
+
time :started_at, default: nil
|
11
11
|
|
12
12
|
def execute
|
13
13
|
validate_response_for do
|
14
|
-
basic_auth_session.patch "/dossiers/#{dossier_id}/responses/#{
|
14
|
+
basic_auth_session.patch "/dossiers/#{dossier_id}/responses/#{external_id}",
|
15
15
|
questionnaire_key: questionnaire_key,
|
16
16
|
answer_data: answer_data,
|
17
17
|
filled_out_at: (filled_out_at.to_i if filled_out_at),
|
@@ -18,7 +18,7 @@ describe UpdateResponse do
|
|
18
18
|
started_at: started_at.to_i
|
19
19
|
UpdateResponse.run! dossier_id: 'some_dossier_id',
|
20
20
|
questionnaire_key: 'some_questionnaire_key',
|
21
|
-
|
21
|
+
external_id: "230",
|
22
22
|
answer_data: {some: 'answer_data'},
|
23
23
|
filled_out_at: filled_out_at,
|
24
24
|
started_at: started_at
|
@@ -30,7 +30,7 @@ describe UpdateResponse do
|
|
30
30
|
answer_data: {some: 'answer_data'},
|
31
31
|
respondent: 'patient',
|
32
32
|
started_at: started_at,
|
33
|
-
|
33
|
+
external_id: "230"
|
34
34
|
expect(response).to be_a(Response)
|
35
35
|
expect(response.questionnaire_name).to eq('Some Questionnaire')
|
36
36
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roqua-rom-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Esposito
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2022-
|
15
|
+
date: 2022-10-10 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: httparty
|
@@ -32,30 +32,36 @@ dependencies:
|
|
32
32
|
name: active_interaction
|
33
33
|
requirement: !ruby/object:Gem::Requirement
|
34
34
|
requirements:
|
35
|
-
- - "
|
35
|
+
- - ">="
|
36
36
|
- !ruby/object:Gem::Version
|
37
37
|
version: '4.0'
|
38
|
+
- - "<"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '6'
|
38
41
|
type: :runtime
|
39
42
|
prerelease: false
|
40
43
|
version_requirements: !ruby/object:Gem::Requirement
|
41
44
|
requirements:
|
42
|
-
- - "
|
45
|
+
- - ">="
|
43
46
|
- !ruby/object:Gem::Version
|
44
47
|
version: '4.0'
|
48
|
+
- - "<"
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: '6'
|
45
51
|
- !ruby/object:Gem::Dependency
|
46
52
|
name: activemodel
|
47
53
|
requirement: !ruby/object:Gem::Requirement
|
48
54
|
requirements:
|
49
|
-
- - "
|
55
|
+
- - ">="
|
50
56
|
- !ruby/object:Gem::Version
|
51
|
-
version: '
|
57
|
+
version: '0'
|
52
58
|
type: :runtime
|
53
59
|
prerelease: false
|
54
60
|
version_requirements: !ruby/object:Gem::Requirement
|
55
61
|
requirements:
|
56
|
-
- - "
|
62
|
+
- - ">="
|
57
63
|
- !ruby/object:Gem::Version
|
58
|
-
version: '
|
64
|
+
version: '0'
|
59
65
|
- !ruby/object:Gem::Dependency
|
60
66
|
name: virtus
|
61
67
|
requirement: !ruby/object:Gem::Requirement
|