buckaroo_client 0.0.2.pre → 0.0.3

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: 0324f802888c1a0a0219e7923950f10a819ed4bf
4
- data.tar.gz: d920477e08d8125aa1c221431703ae55df9ef4ca
3
+ metadata.gz: 2f1b088538314d16b8ce012bddff2d61482c13a2
4
+ data.tar.gz: 3a6a2e308f5c16e5d1d2d1336e412a550a6a7360
5
5
  SHA512:
6
- metadata.gz: 0307ca5efde632a01d05eb4cb0d1b19bca077383b16fe1a7a5e0815fbb006117946bb940208c4e2801d9e3d39a84730e0cef03f983b5f8db23cbd22ec8a35920
7
- data.tar.gz: 932151723e044db8b30d1b47a5fba7c1ce74d80987aca1eda9470ee7b3b521fc23a71456cc507fe18d0546fff8b3493c7a81def251b8ea25591628a5c8a24497
6
+ metadata.gz: 3544b99b2c47923ad0422e02dd1be10c6ee8d8c3a0748f95b6813befb92ad399105383974e3db0baf3e4c8639d9cf3bd12e82c31cb33eba61026c42834f247ca
7
+ data.tar.gz: a5459b083707e0af1a097096387b58fa1ec5fb7962e0a378d61a224069cd203c47b86cdd23b2dd3a145c71b9795b09597908dd9924634dcc41ba1c2e76c57bc0
@@ -3,6 +3,11 @@ require 'forwardable'
3
3
  module BuckarooClient
4
4
  module Service
5
5
  class InvoiceSpecification
6
+ def initialize(args = {})
7
+ args.each do |key, value|
8
+ self.send "#{key}=", value
9
+ end
10
+ end
6
11
 
7
12
  def servicecode
8
13
  'InvoiceSpecification'
@@ -1,3 +1,3 @@
1
1
  module BuckarooClient
2
- VERSION = "0.0.2.pre"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -14,6 +14,16 @@ describe BuckarooClient::Service::InvoiceSpecification do
14
14
  }.merge(opts)
15
15
  end
16
16
 
17
+ describe '#initialize' do
18
+ it 'allows empty attributes Hash to be passed in' do
19
+ expect { described_class.new({}) }.not_to raise_error
20
+ end
21
+
22
+ it 'raises error on invalid attributes' do
23
+ expect { described_class.new(invalid_name: 'Some Text') }.to raise_error
24
+ end
25
+ end
26
+
17
27
  describe 'servicecode' do
18
28
  it 'defaults to InvoiceSpecification' do
19
29
  expect(subject.servicecode).to eq 'InvoiceSpecification'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: buckaroo_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2.pre
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Floris Huetink
@@ -130,9 +130,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
130
130
  version: '0'
131
131
  required_rubygems_version: !ruby/object:Gem::Requirement
132
132
  requirements:
133
- - - ">"
133
+ - - ">="
134
134
  - !ruby/object:Gem::Version
135
- version: 1.3.1
135
+ version: '0'
136
136
  requirements: []
137
137
  rubyforge_project:
138
138
  rubygems_version: 2.4.5