dispatch-external-ids 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/dispatch/external_ids/version.rb +1 -1
- data/lib/dispatch/external_ids.rb +5 -6
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3ff64c0d87c937f09562b13cd16d0118d9a5c5c3
|
|
4
|
+
data.tar.gz: a6d4d1eb1513da5cea991ad50146f4bb4509db58
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 818d5ca26c946c54bf27e161fe35c20e0aaa3ff94a1c70ab1dcca69b467173a7dbc1c3124a1565bee5eeb273acf0cca3a2ff5e5b26a6b4b0fcb10df3de4a0594
|
|
7
|
+
data.tar.gz: 5d9ef33b1dc81b64e38067f39ed0e2a255186596815608ec5f1f6ac4ee9eeb6ee78c41895a92ed6b7c841ddcb96550a84195d24b7eb175e9292822222ba471bf
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
require 'dispatch/external_ids/version'
|
|
2
2
|
require 'httparty'
|
|
3
|
-
require 'pry'
|
|
4
3
|
|
|
5
4
|
module Dispatch
|
|
6
5
|
module ExternalIDs
|
|
7
|
-
|
|
6
|
+
|
|
8
7
|
class DispatchMe
|
|
9
8
|
include HTTParty
|
|
10
9
|
base_uri ENV['EXTERNAL_IDS_ENDPOINT_URL']
|
|
@@ -18,16 +17,16 @@ module Dispatch
|
|
|
18
17
|
},
|
|
19
18
|
access_token: access_token
|
|
20
19
|
}
|
|
21
|
-
|
|
20
|
+
|
|
22
21
|
res = get('/v1/records.json', { query: query })
|
|
23
22
|
res['records'] if res.code == 200
|
|
24
23
|
end
|
|
25
24
|
end
|
|
26
|
-
|
|
25
|
+
|
|
27
26
|
class ThirdParty
|
|
28
27
|
include HTTParty
|
|
29
28
|
base_uri ENV['EXTERNAL_IDS_ENDPOINT_URL']
|
|
30
|
-
|
|
29
|
+
|
|
31
30
|
def self.fetch(client:, entity:, id:, access_token: nil)
|
|
32
31
|
query = {
|
|
33
32
|
filter: {
|
|
@@ -37,7 +36,7 @@ module Dispatch
|
|
|
37
36
|
},
|
|
38
37
|
access_token: access_token
|
|
39
38
|
}
|
|
40
|
-
|
|
39
|
+
|
|
41
40
|
res = get('/v1/records.json', { query: query })
|
|
42
41
|
res['records'] if res.code == 200
|
|
43
42
|
end
|