roqua-rom-api 2.3.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e81b0029f74f1759fa9f105c57299feee574b0e519a13c8a2b5e671251c17f94
4
- data.tar.gz: dad860d5231200bdbf797d6779a3615224a984546b5d1e8baef6f924441f8b9c
3
+ metadata.gz: 477f788af8448ee3fa2a41f20352eef3328dc09e712671437db727ea80da013d
4
+ data.tar.gz: 5067b2d36c85318641c47dfc7f7ae53e52257448b5de0fcf66ed4f2b928b6c06
5
5
  SHA512:
6
- metadata.gz: 6c34e10cde69f5a66c6af7039fc8674b156a230fd80ba48e000bffd56c450b3d55a78a25d652f5e38722262206dbd85ab5c085c52aff851db31fa7d68119f05b
7
- data.tar.gz: 498d5d4e6177a19fa2fa277dc23e71d7037cd93d1b1f4475b178489232e4697d63ee41df0c1333c8c2c489a2185417d24878b990be617b4fb341dc7d3b8670dc
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
- answer_data: {some: 'aswer_data'}
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::CreateResponse.run questionnaire_key: 'questionnaire_key',
119
+ outcome = Roqua::RomApi::UpdateResponse.run questionnaire_key: 'questionnaire_key',
119
120
  dossier_id: 'dossier_id',
120
- id: 230, # response id,
121
- answer_data: {some: 'aswer_data'}
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 :questionnaire_key
6
- string :dossier_id
7
- integer :id
8
- hash :answer_data, strip: false
9
- time :filled_out_at, default: nil
10
- time :started_at, default: nil
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/#{id}",
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),
@@ -1,5 +1,5 @@
1
1
  module Roqua
2
2
  module RomApi
3
- VERSION = '2.3.0'
3
+ VERSION = '3.0.1'
4
4
  end
5
5
  end
@@ -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
- id: 230,
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
- id: 230
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: 2.3.0
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-06-22 00:00:00.000000000 Z
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: '6.1'
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: '6.1'
64
+ version: '0'
59
65
  - !ruby/object:Gem::Dependency
60
66
  name: virtus
61
67
  requirement: !ruby/object:Gem::Requirement
@@ -268,7 +274,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
268
274
  - !ruby/object:Gem::Version
269
275
  version: '0'
270
276
  requirements: []
271
- rubygems_version: 3.3.8
277
+ rubygems_version: 3.1.4
272
278
  signing_key:
273
279
  specification_version: 4
274
280
  summary: API wrapper gem around RoQua's ROM API