fastbound-ruby 1.1.6 → 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/lib/fastbound-ruby/disposition.rb +1 -1
- data/lib/fastbound-ruby/response.rb +8 -2
- data/lib/fastbound-ruby/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: af707e8890f47d21e549e2bc1bf223efc2d72968ba9a35ef6d06b6c6baad135e
|
4
|
+
data.tar.gz: 3b6a4b14695a9e6cb8041718407d826456aa6e2713b8f67dc44e4edea10f3ac1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: adc4956cc9d7cbcc271e50d068c3b98756e5a8bc2a1ab7f914c5cee465fb3f2fdc27475ef42c0ed17f17198b9893483b38df506c5a83885d844a1fa329935c4c
|
7
|
+
data.tar.gz: f335db2ba18fca0a6a7f2837f73053ab0040f57d4ce16895c2dc128253e469acb3dc978a432d9f1f98a7e1342a478878cbfd458f0ed26afa03f3b2097ce1d286
|
@@ -152,7 +152,7 @@ module FastBound
|
|
152
152
|
post_request(@client, endpoint, commit_data)
|
153
153
|
end
|
154
154
|
|
155
|
-
def create_and_commit(disposition_data, items_data, contact_data = {}, commit_data =
|
155
|
+
def create_and_commit(disposition_data, items_data, contact_data = {}, commit_data = nil)
|
156
156
|
items_data.each { |item| requires!(item, :id) }
|
157
157
|
|
158
158
|
endpoint = ENDPOINTS[:create_and_commit]
|
@@ -12,7 +12,7 @@ module FastBound
|
|
12
12
|
when Net::HTTPNotFound
|
13
13
|
raise FastBound::Error::NotFound.new(@response.body)
|
14
14
|
when Net::HTTPNoContent
|
15
|
-
|
15
|
+
self.success = true
|
16
16
|
when Net::HTTPOK, Net::HTTPSuccess
|
17
17
|
self.success = true
|
18
18
|
_data = (JSON.parse(@response.body) if @response.body.present?)
|
@@ -28,7 +28,13 @@ module FastBound
|
|
28
28
|
puts "-- DEBUG: #{self}: RequestError: #{@response.inspect}"
|
29
29
|
end
|
30
30
|
|
31
|
-
|
31
|
+
error_message = begin
|
32
|
+
JSON.parse(@response.body)['errors'].map { |error| error['message'] }.join('. ')
|
33
|
+
rescue
|
34
|
+
[@response.message, @response.body].reject(&:blank?).join(" | ")
|
35
|
+
end
|
36
|
+
|
37
|
+
raise FastBound::Error::RequestError.new(error_message)
|
32
38
|
end
|
33
39
|
end
|
34
40
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastbound-ruby
|
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
|
- Jeffrey Dill
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|