basecomm_sdk 1.0.1 → 1.1.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba51c915adccc5a3c7f56d56ebde75fa00154c45
|
4
|
+
data.tar.gz: 5b35a46622196279e6341737f11581046818cdd8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c172f05889c6471d9869c65725e235aaa9afd8315d0b7500bc953b9302381d67c71d697eb1e08b91938921cd98c935410d978b9e1ca6d80d2cefb49acb7d94b2
|
7
|
+
data.tar.gz: 3e50ba0cab3fd9d2e03bc9f242d229e7e0c6cc1207d9281030cfc927b18cdb1ecce8cedc318dc596d04c6a6e5cc29c9a9fc5ff8a5fdd2f57bddcfcdc2c970c59
|
data/CHANGELOG
CHANGED
@@ -30,7 +30,7 @@ module BasecommSdk
|
|
30
30
|
:account_type, :routing_number, :account_number, :account_name,
|
31
31
|
:return_code, :trace, :merchant_transaction_id, :bank_account_token,
|
32
32
|
:micr_data, :amount, :effective_date, :settlement_date, :return_date,
|
33
|
-
:recurring_indicator
|
33
|
+
:recurring_indicator, :failed_reason
|
34
34
|
|
35
35
|
attr_accessor :custom_field1, :custom_field2, :custom_field3,
|
36
36
|
:custom_field4, :custom_field5, :custom_field6, :custom_field7,
|
data/lib/basecomm_sdk/version.rb
CHANGED
@@ -90,6 +90,18 @@ module BasecommSdk
|
|
90
90
|
end
|
91
91
|
end
|
92
92
|
|
93
|
+
context '.failed?' do
|
94
|
+
it 'has an associated failed_reason' do
|
95
|
+
bat = described_class.from_json(bat_failed_json)
|
96
|
+
expect(bat.failed_reason).to be_a(Hash)
|
97
|
+
end
|
98
|
+
|
99
|
+
it 'returns true for a failure' do
|
100
|
+
bat = described_class.from_json(bat_failed_json)
|
101
|
+
expect(bat.failed?).to eq(true)
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
93
105
|
context '.settled?' do
|
94
106
|
it 'returns false for a correction' do
|
95
107
|
bat = described_class.from_json(bat_correction_json)
|
@@ -45,6 +45,20 @@ shared_context 'bat_response_methods' do
|
|
45
45
|
).to_json
|
46
46
|
end
|
47
47
|
|
48
|
+
def bat_failed_json(opts = {})
|
49
|
+
base = bat_hash(
|
50
|
+
status_name: 'FAILED',
|
51
|
+
status_description: 'Failed Transaction'
|
52
|
+
)
|
53
|
+
|
54
|
+
base['bank_account_transaction'].merge!(
|
55
|
+
"bank_account_transaction_failed_reason" => {
|
56
|
+
"bank_account_number" => "Account Number must be at least 5 digits"
|
57
|
+
})
|
58
|
+
|
59
|
+
base.to_json
|
60
|
+
end
|
61
|
+
|
48
62
|
def bat_settled_json(opts = {})
|
49
63
|
bat_hash(
|
50
64
|
status_name: 'SETTLED',
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: basecomm_sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Blackburn
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-03-
|
12
|
+
date: 2015-03-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: dotenv
|
@@ -338,7 +338,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
338
338
|
version: '0'
|
339
339
|
requirements: []
|
340
340
|
rubyforge_project:
|
341
|
-
rubygems_version: 2.
|
341
|
+
rubygems_version: 2.2.2
|
342
342
|
signing_key:
|
343
343
|
specification_version: 4
|
344
344
|
summary: Ruby client gem for Base Commerce ACH provider
|