ibanomat 0.0.3 → 0.0.4

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: 3f5f1bfa20c5af8ddc3e591e42b8364f91e313d8
4
- data.tar.gz: b790004707a5dbeaf96a1a64577680902b4b587d
3
+ metadata.gz: 0074f1dbe1d07df7b83de3a8d12ff0fb6295dfda
4
+ data.tar.gz: 8cae4b2c18edee6225ba1378fb449f040f15a81f
5
5
  SHA512:
6
- metadata.gz: 28e3ff1caee316103608a3ca1289258526f34fc58fb56b6b0f21eb5080ea033c610782bb8a0e5a2f6759132e61b96ad4f97b06e651726cff40453610ec98ab6c
7
- data.tar.gz: db9274ac7b509dfdbd36777366b0a5974b9abbdc7b919405553b72b98eb687b8edad341f7fd3eeb4f074507e62161742149e715a3562257f65a345ffc6079a2f
6
+ metadata.gz: 5a3139b3a776ea0fd4e399489a395631019ffab67d46a7dc8e393fe8f6c2ac6a242763dbd31f8680a02b9c4708e248b4e94cb6c6684cbe70eb2dd85ec5a2b98e
7
+ data.tar.gz: f2f9bbed4bc67df5a1c83e1f45ddbe409ef8bb7488c4b82619c1c0856f60587ef85fde6cbf4361bd29f78e59e6e0653bcf5a853e73451e75dd137417068cfc68
data/README.md CHANGED
@@ -28,15 +28,20 @@ Or install it yourself as:
28
28
  ## Usage
29
29
 
30
30
  ```ruby
31
- Ibanomat.find :bank_code => '37040044', :bank_account_number => '0532013000'
31
+ Ibanomat.find :bank_code => '37040044', :bank_account_number => '532013000'
32
32
  # =>
33
33
  # {
34
- # :bank_name => 'Commerzbank',
35
- # :bic => 'COBADEFFXXX',
36
- # :iban => 'DE89370400440532013000'
34
+ # :bank_name => 'Commerzbank',
35
+ # :bic => 'COBADEFFXXX',
36
+ # :iban => 'DE89370400440532013000',
37
+ # :bank-code => '37040044',
38
+ # :bank_account_number => '0532013000',
39
+ # :return_code => '00'
37
40
  # }
38
41
  ```
39
42
 
43
+ A `return_code` other than '00' indicates a warning or error.
44
+
40
45
 
41
46
  ## Contributing
42
47
 
@@ -18,15 +18,13 @@ module Ibanomat
18
18
  if response.code == 200
19
19
  hash = JSON.parse(response)
20
20
 
21
- case hash['RetCode']
22
- when '00'
23
- { :bank_name => hash['Institutsname'],
24
- :bic => hash['BIC'],
25
- :iban => hash['IBAN']
26
- }
27
- else
28
- :error
29
- end
21
+ { :bank_name => hash['Institutsname'],
22
+ :bic => hash['BIC'],
23
+ :iban => hash['IBAN'],
24
+ :bank_code => hash['BLZ'],
25
+ :bank_account_number => hash['KtoNr'],
26
+ :return_code => hash['RetCode']
27
+ }
30
28
  end
31
29
  end
32
30
  end
@@ -1,3 +1,3 @@
1
1
  module Ibanomat
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
data/spec/client_spec.rb CHANGED
@@ -55,8 +55,8 @@ describe Ibanomat do
55
55
  to_return(:status => 200, :body => json_response)
56
56
  end
57
57
 
58
- it 'should return error' do
59
- subject.should == :error
58
+ it 'should return error code' do
59
+ subject[:return_code].should == '10'
60
60
  end
61
61
  end
62
62
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ibanomat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Georg Ledermann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-30 00:00:00.000000000 Z
11
+ date: 2013-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client