lob 1.9.1 → 1.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/lob/v1/bank_account.rb +4 -0
- data/lib/lob/version.rb +1 -1
- data/spec/lob/v1/bank_account_spec.rb +17 -0
- data/spec/lob/v1/check_spec.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cdc58b192a30897179b9f0b8b2229115e3e26b94
|
4
|
+
data.tar.gz: ce6dbe15de20924629d3390ebbcb388c51f6001a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86a27b72507cf64f2eca79f6d75708304108ddda1b0601138111fa7c058ec6829e44c2255c656bd354d5579f9298cacaaa9243056b9165d26333c90b528412c3
|
7
|
+
data.tar.gz: ccec81496d6cf6204274d0b58e6f0c6054d8b9135447eaf2620ff6e44ba4fa3a1fddd8857291a83468ad271cd038eea1f6a70ba2da71cf606088cd3af89e0898
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
## [**1.9.2**](https://github.com/lob/lob-ruby/releases/tag/v1.9.2)
|
2
|
+
- [**#94**] (https://github.com/lob/lob-ruby/pull/94) added bank account verify support
|
3
|
+
|
1
4
|
## [**1.9.1**](https://github.com/lob/lob-ruby/releases/tag/v1.9.1)
|
2
5
|
- [**#92**] (https://github.com/lob/lob-ruby/pull/92) don't fix prawn version
|
3
6
|
|
data/lib/lob/v1/bank_account.rb
CHANGED
@@ -30,6 +30,10 @@ module Lob
|
|
30
30
|
Lob.submit :delete, bank_account_url(bank_account_id)
|
31
31
|
end
|
32
32
|
|
33
|
+
def verify(bank_account_id, options = {})
|
34
|
+
Lob.submit :post, "#{bank_account_url(bank_account_id)}/verify", options
|
35
|
+
end
|
36
|
+
|
33
37
|
private
|
34
38
|
|
35
39
|
def bank_account_url(bank_account_id = nil)
|
data/lib/lob/version.rb
CHANGED
@@ -111,4 +111,21 @@ describe Lob::V1::BankAccount do
|
|
111
111
|
end
|
112
112
|
end
|
113
113
|
end
|
114
|
+
|
115
|
+
describe "verify" do
|
116
|
+
it "should verify a bank account" do
|
117
|
+
VCR.use_cassette('verify_bank_account') do
|
118
|
+
new_bank_account = subject.bank_accounts.create(
|
119
|
+
routing_number: @sample_bank_account_params[:routing_number],
|
120
|
+
bank_address: @sample_address_params.clone,
|
121
|
+
account_number: @sample_bank_account_params[:account_number],
|
122
|
+
account_address: @sample_address_params.clone,
|
123
|
+
signatory: "John Doe"
|
124
|
+
)
|
125
|
+
|
126
|
+
verify_result = subject.bank_accounts.verify(new_bank_account["id"], amounts: [12, 34])
|
127
|
+
assert_equal(new_bank_account["id"], verify_result["id"])
|
128
|
+
end
|
129
|
+
end
|
130
|
+
end
|
114
131
|
end
|
data/spec/lob/v1/check_spec.rb
CHANGED
@@ -35,6 +35,8 @@ describe Lob::V1::Check do
|
|
35
35
|
signatory: "John Doe"
|
36
36
|
)
|
37
37
|
|
38
|
+
subject.bank_accounts.verify(new_bank_account["id"], amounts: [1, 2])
|
39
|
+
|
38
40
|
new_check = subject.checks.create(
|
39
41
|
bank_account: new_bank_account["id"],
|
40
42
|
to: @sample_address_params,
|
@@ -61,6 +63,8 @@ describe Lob::V1::Check do
|
|
61
63
|
signatory: "John Doe"
|
62
64
|
)
|
63
65
|
|
66
|
+
subject.bank_accounts.verify(new_bank_account["id"], amounts: [1, 2])
|
67
|
+
|
64
68
|
result = subject.checks.create(
|
65
69
|
bank_account: new_bank_account["id"],
|
66
70
|
to: new_address["id"],
|
@@ -86,6 +90,8 @@ describe Lob::V1::Check do
|
|
86
90
|
signatory: "John Doe"
|
87
91
|
)
|
88
92
|
|
93
|
+
subject.bank_accounts.verify(new_bank_account["id"], amounts: [1, 2])
|
94
|
+
|
89
95
|
new_check = subject.checks.create(
|
90
96
|
bank_account: new_bank_account["id"],
|
91
97
|
to: new_address["id"],
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lob
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lob
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|