fulfil-io 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/fulfil/client.rb +9 -0
- data/lib/fulfil/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 520488638d7340fb0278fc798770d821f87f0a7427765118c418f2db16877af1
|
4
|
+
data.tar.gz: 7c1dfb2aac58524eef56a7d38729ffd01f3350ff3413bd7e0b6fa8bf6ab37411
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 035bc157721ab0b620cf30b99afdaf3825a2f8732e289a7b9e2b309bc99d25ec81cd3f1612ce88df4dcdb98a05a56fff295e8461f7a525e741e5d3200be8c9b6
|
7
|
+
data.tar.gz: 0bb63dba2c5ee6d608d7b4d5b22895538ea288dde9423fac5bf133c37b24bb3a00b68dd2329a1b1874d0293e755165d0ce033df72e319de3e7204d9461de151c
|
data/CHANGELOG.md
CHANGED
data/lib/fulfil/client.rb
CHANGED
@@ -78,6 +78,13 @@ module Fulfil
|
|
78
78
|
parse(result: result)
|
79
79
|
end
|
80
80
|
|
81
|
+
def delete(model:, id:)
|
82
|
+
uri = URI(model_url(model: model, id: id))
|
83
|
+
|
84
|
+
result = request(verb: :delete, endpoint: uri)
|
85
|
+
parse(result: result)
|
86
|
+
end
|
87
|
+
|
81
88
|
private
|
82
89
|
|
83
90
|
def parse(result: nil, results: [])
|
@@ -109,6 +116,8 @@ module Fulfil
|
|
109
116
|
|
110
117
|
if response.status.ok? || response.status.created?
|
111
118
|
response.parse
|
119
|
+
elsif response.code == 204
|
120
|
+
[]
|
112
121
|
elsif response.code == 401
|
113
122
|
error = response.parse
|
114
123
|
raise NotAuthorizedError, "Not authorized: #{error['error']}: #{error['error_description']}"
|
data/lib/fulfil/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fulfil-io
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Moore
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-
|
12
|
+
date: 2021-11-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: http
|
@@ -134,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
134
134
|
- !ruby/object:Gem::Version
|
135
135
|
version: '0'
|
136
136
|
requirements: []
|
137
|
-
rubygems_version: 3.1.
|
137
|
+
rubygems_version: 3.1.6
|
138
138
|
signing_key:
|
139
139
|
specification_version: 4
|
140
140
|
summary: Interact with the Fulfil.io API
|