fulfillment-api 1.1.7 → 1.1.9
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/Gemfile.lock +1 -1
- data/lib/fulfillment/resources/organizations.rb +23 -3
- data/lib/fulfillment/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: af35aee7889699e3f8011e79420e61565c96869d4c0fd66a54c9c8e96599c594
|
4
|
+
data.tar.gz: 3a6c00bb93c2f78a17352bfdab1eedc8288af82ee7491240756968a64f317d7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3adf3eb7b70bfd0960a582fbc33358c48bca6da8217993b6abffdf72c544de9ff20364f98a0d6497bd755ac86101e692b469324392131245c5226099d955e037
|
7
|
+
data.tar.gz: 3b3db9c3130083de6ba62ecfcce5e15d53e35bec45505f83d7bcfafce7a02c42df895c3e53fe5fdb92bf3e08f9b0281e0a7e993256993d88a9fcabae7b024422
|
data/Gemfile.lock
CHANGED
@@ -3,9 +3,20 @@ module Fulfillment
|
|
3
3
|
module Organizations
|
4
4
|
extend self
|
5
5
|
|
6
|
-
def find_all
|
7
|
-
|
8
|
-
|
6
|
+
def find_all(params = {})
|
7
|
+
limit_to_type = params["type"]
|
8
|
+
request = "organizations"
|
9
|
+
|
10
|
+
if limit_to_type
|
11
|
+
request = ["types", limit_to_type, "organizations"].compact.join("/")
|
12
|
+
end
|
13
|
+
|
14
|
+
response = Request.new(request).get
|
15
|
+
output = response.body
|
16
|
+
|
17
|
+
output = reformat_ids_to_include_type(output, limit_to_type) if limit_to_type
|
18
|
+
|
19
|
+
output
|
9
20
|
end
|
10
21
|
|
11
22
|
def find(organization_id, type_name = nil)
|
@@ -21,6 +32,15 @@ module Fulfillment
|
|
21
32
|
).post
|
22
33
|
response.body
|
23
34
|
end
|
35
|
+
|
36
|
+
private
|
37
|
+
|
38
|
+
def reformat_ids_to_include_type(ids, type)
|
39
|
+
ids.each_with_object({}) do |id, obj|
|
40
|
+
obj[id] = [type]
|
41
|
+
obj
|
42
|
+
end
|
43
|
+
end
|
24
44
|
end
|
25
45
|
end
|
26
46
|
end
|
data/lib/fulfillment/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fulfillment-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt White
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|