paypal_client 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/paypal_client/errors.rb +7 -3
- data/lib/paypal_client/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d31b2b79278165f30b18b07b8d40df217a414293
|
4
|
+
data.tar.gz: 033a6d000030f641fbf581526dad322f97af55e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8eced35999811ccc9cc34df48827cb900c9ffb59cabd9614fb08129411faaadf45508b3fdea1e006aebf6d42ab410d4f5b1981e5b13e1b977709972241d6007
|
7
|
+
data.tar.gz: 559bf306927dea26d87677527af8d4c1f5af78c88b6a1da3d96137928f4059b77623e45a83b1f75c79ae0217c4735983d77f3740199d3fae1ecdadd533c131c4
|
data/CHANGELOG.md
ADDED
data/lib/paypal_client/errors.rb
CHANGED
@@ -8,10 +8,10 @@ module PaypalClient
|
|
8
8
|
attr_reader :code
|
9
9
|
attr_reader :http_body
|
10
10
|
attr_reader :http_status
|
11
|
-
attr_reader :
|
11
|
+
attr_reader :error_message
|
12
12
|
|
13
|
-
def initialize(
|
14
|
-
@
|
13
|
+
def initialize(error_message = nil, http_status: nil, http_body: nil, code: nil)
|
14
|
+
@error_message = error_message
|
15
15
|
@http_status = http_status
|
16
16
|
@http_body = http_body
|
17
17
|
@code = code
|
@@ -25,6 +25,10 @@ module PaypalClient
|
|
25
25
|
extra << " body: #{http_body}" unless http_body.nil?
|
26
26
|
"#<#{self.class.name}: #{message}#{extra.join}>"
|
27
27
|
end
|
28
|
+
|
29
|
+
def message
|
30
|
+
"#{code}: #{error_message} (#{http_status})"
|
31
|
+
end
|
28
32
|
end
|
29
33
|
|
30
34
|
class InvalidRequest < Error; end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paypal_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dennis van der Vliet
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -105,6 +105,7 @@ files:
|
|
105
105
|
- ".gitignore"
|
106
106
|
- ".rspec"
|
107
107
|
- ".travis.yml"
|
108
|
+
- CHANGELOG.md
|
108
109
|
- CODE_OF_CONDUCT.md
|
109
110
|
- Gemfile
|
110
111
|
- README.md
|