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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 114fef4fab02f2da43e422615fb0d80edff7bb4e
4
- data.tar.gz: 448d08ed8b3025c4f4d14ea93ac36efcc0e03725
3
+ metadata.gz: d31b2b79278165f30b18b07b8d40df217a414293
4
+ data.tar.gz: 033a6d000030f641fbf581526dad322f97af55e1
5
5
  SHA512:
6
- metadata.gz: 7ee81de3aaa594ee3f992ddd196360091d8ba33159a598a808f9500982324e7da878e81e94bab01d9d54a2af1464ba263f097b0dbcfa2ec7616fed79ec9b1e53
7
- data.tar.gz: 490d3240ae8197d8d8d2874bfa163a13d9b6f1e66fc3e6097fb738e31409b11499aa3e2ff8c282a2d846255e785b50bf7152180b87b762ec221a04354e94a719
6
+ metadata.gz: b8eced35999811ccc9cc34df48827cb900c9ffb59cabd9614fb08129411faaadf45508b3fdea1e006aebf6d42ab410d4f5b1981e5b13e1b977709972241d6007
7
+ data.tar.gz: 559bf306927dea26d87677527af8d4c1f5af78c88b6a1da3d96137928f4059b77623e45a83b1f75c79ae0217c4735983d77f3740199d3fae1ecdadd533c131c4
data/CHANGELOG.md ADDED
@@ -0,0 +1,4 @@
1
+ # Changelog
2
+
3
+ ## 0.3.1 - 08-01-2019
4
+ * [#3](https://github.com/dennisvdvliet/paypal_client/pull/3) Make error messages in exception more useful
@@ -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 :message
11
+ attr_reader :error_message
12
12
 
13
- def initialize(message = nil, http_status: nil, http_body: nil, code: nil)
14
- @message = message
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
@@ -1,3 +1,3 @@
1
1
  module PaypalClient
2
- VERSION = '0.3.0'.freeze
2
+ VERSION = '0.3.1'.freeze
3
3
  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.0
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-04 00:00:00.000000000 Z
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