et_ccd_client 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/et_ccd_client/client.rb +13 -0
- data/lib/et_ccd_client/config.rb +4 -0
- data/lib/et_ccd_client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f341d2dcaac700c1d7202cfc351e57f4f40bb0ccc79cb54faff299158b92a81f
|
4
|
+
data.tar.gz: 4c1e8fccab6dc0e0e3f5518161015533b4bd9f67747c67e949d725403f0cc0e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '068d689c2fe2b9bc67a0e2f0ed015270dcd52fbe916b641b93a231ac65ec75c88f4660092bc78a06128610e1c9e6ea13e3fac0b26cb8761a94a4f68072a8a3f9'
|
7
|
+
data.tar.gz: d189b257e0f9e4a5c9c6be7eb436dfc7c5b8e5e5d5e960199dfcc375feb4041308a09baae3763ecfb1acd223b742212d64366b112295e308eefaf6777a10694e
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
et_ccd_client (0.3.
|
4
|
+
et_ccd_client (0.3.4)
|
5
5
|
addressable (~> 2.6)
|
6
6
|
connection_pool (~> 2.2, >= 2.2.2)
|
7
7
|
rest-client (~> 2.0, >= 2.0.2)
|
@@ -14,7 +14,7 @@ GEM
|
|
14
14
|
addressable (2.7.0)
|
15
15
|
public_suffix (>= 2.0.2, < 5.0)
|
16
16
|
ast (2.4.0)
|
17
|
-
connection_pool (2.2.
|
17
|
+
connection_pool (2.2.5)
|
18
18
|
crack (0.4.5)
|
19
19
|
rexml
|
20
20
|
diff-lcs (1.3)
|
data/lib/et_ccd_client/client.rb
CHANGED
@@ -95,6 +95,19 @@ module EtCcdClient
|
|
95
95
|
end
|
96
96
|
end
|
97
97
|
|
98
|
+
# Find a case by its id
|
99
|
+
# @param [String] case_id The id to find
|
100
|
+
# @param [String] case_type_id The case type ID to set the search scope to
|
101
|
+
#
|
102
|
+
# @return [Array<Hash>] The json response from the server
|
103
|
+
def caseworker_case(case_id, case_type_id:, extra_headers: {})
|
104
|
+
logger.tagged('EtCcdClient::Client') do
|
105
|
+
tpl = Addressable::Template.new(config.case_url)
|
106
|
+
url = tpl.expand(uid: idam_client.user_details['id'], jid: config.jurisdiction_id, ctid: case_type_id, case_id: case_id).to_s
|
107
|
+
get_request_with_login(url, log_subject: 'Caseworker get by id', extra_headers: extra_headers.merge(headers_from_idam_client))
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
98
111
|
# Search for the latest case matching the reference. Useful for testing
|
99
112
|
# @param [String] reference The reference number to search for
|
100
113
|
# @param [String] case_type_id The case type ID to set the search scope to
|
data/lib/et_ccd_client/config.rb
CHANGED
@@ -30,6 +30,10 @@ module EtCcdClient
|
|
30
30
|
"#{data_store_base_url}#{cases_path}"
|
31
31
|
end
|
32
32
|
|
33
|
+
def case_url
|
34
|
+
"#{cases_url}/{case_id}"
|
35
|
+
end
|
36
|
+
|
33
37
|
def cases_pagination_metadata_url
|
34
38
|
"#{data_store_base_url}/caseworkers/{uid}/jurisdictions/{jid}/case-types/{ctid}/cases/pagination_metadata{?query*}"
|
35
39
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: et_ccd_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gary Taylor
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|