cashbox 0.0.4 → 0.0.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 23497cd87f1ec61debc6905584ae3547d61a20a3
4
- data.tar.gz: 5add6426a9172e5bf3093c3b8e54a49a5a6bcf53
3
+ metadata.gz: eea2fe2bf560e28602b73b23043c7b2654be2460
4
+ data.tar.gz: 389011c01c0e46eb327d755c7f8b7bdf81b55f9e
5
5
  SHA512:
6
- metadata.gz: 2fd47a7115fa142ed5236de2370358dcbcb39db14c2404fc268ca8bfac52ad75259475cd0ea833279c2e48b50927fb71ad03a043d7a25622e4defba6c07f2287
7
- data.tar.gz: 9bd22124938a022727abc709c30489c4cb9c00280a81e49d2a25b442f4c0c7513286f8840002752abd90597c75ad407306725fc8dea0185a93f8537aaaf9ed7f
6
+ metadata.gz: f244472872cbf4fa153cc7117a42b5e42886782b2cf996eea36df4df47f7659668e4109dfd0fc0473a0110c0404f73e2b5e133c10697c539c414d0b3e283a784
7
+ data.tar.gz: 36890f774015570b13e7f5059768c18bff48f9a1d74633ba984a5efd25b59daf36ed3ecef1d7ebfc4b83e3ec1aff450a6fb10b459706e1459e81b7ec73c5a045
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cashbox (0.0.3)
4
+ cashbox (0.0.4)
5
5
  activesupport
6
6
  addressable
7
7
  hashie
@@ -10,7 +10,7 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- activesupport (5.1.6)
13
+ activesupport (5.2.0)
14
14
  concurrent-ruby (~> 1.0, >= 1.0.2)
15
15
  i18n (>= 0.7, < 2)
16
16
  minitest (~> 5.1)
data/lib/cashbox.rb CHANGED
@@ -42,7 +42,7 @@ module Cashbox
42
42
 
43
43
  eager_autoload do
44
44
  autoload :VERSION
45
- autoload :Exception
45
+ autoload :Error
46
46
  autoload :Type
47
47
  autoload :Request
48
48
  autoload :Repository
@@ -0,0 +1,4 @@
1
+ module Cashbox
2
+ class Error < Exception
3
+ end
4
+ end
@@ -9,6 +9,7 @@ module Cashbox
9
9
  property :credit_card, coerce: Cashbox::CreditCard
10
10
  property :paypal, coerce: Cashbox::PayPal
11
11
  property :primary
12
+ property :active
12
13
  property :type
13
14
  end
14
15
  end
@@ -67,6 +67,8 @@ module Cashbox
67
67
  hash['data'].map do |data|
68
68
  @instance.class.new(data)
69
69
  end
70
+ when 'Error'
71
+ raise Cashbox::Error.new(hash['message'])
70
72
  else
71
73
  @instance.deep_merge!(hash)
72
74
  end
@@ -1,3 +1,3 @@
1
1
  module Cashbox
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cashbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathon Storer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-09 00:00:00.000000000 Z
11
+ date: 2018-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -173,7 +173,7 @@ files:
173
173
  - lib/cashbox.rb
174
174
  - lib/cashbox/concern/objectable.rb
175
175
  - lib/cashbox/concern/persistable.rb
176
- - lib/cashbox/exception.rb
176
+ - lib/cashbox/error.rb
177
177
  - lib/cashbox/model/account.rb
178
178
  - lib/cashbox/model/address.rb
179
179
  - lib/cashbox/model/billing_plan.rb
@@ -221,7 +221,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
221
221
  version: '0'
222
222
  requirements: []
223
223
  rubyforge_project:
224
- rubygems_version: 2.5.2
224
+ rubygems_version: 2.6.8
225
225
  signing_key:
226
226
  specification_version: 4
227
227
  summary: Cashbox Rest Client
@@ -1,4 +0,0 @@
1
- module Cashbox
2
- class Exception < Exception
3
- end
4
- end