basecomm_sdk 1.1.4 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +4 -0
- data/README.md +1 -1
- data/basecomm_sdk.gemspec +1 -0
- data/lib/basecomm_sdk/bank_account_transaction.rb +9 -4
- data/lib/basecomm_sdk/version.rb +1 -1
- data/spec/lib/basecomm_sdk/bank_account_transaction_spec.rb +9 -2
- data/spec/spec_helper.rb +1 -0
- data/spec/support/shared_responses.rb +7 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7077053c37e3bff20c17dcf43fad28ba7a69259a
|
4
|
+
data.tar.gz: 9e96e414ff8d23ae43e76b6248a309f37b28179b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 854bb28168b558c648caa6dfa27920e304d10524e40720d26cc22f043a099b2f73b5e2f8277c9db237e20b3c381dabc36e0e1b3cdcdeb5d1764fc9b75fddb1e6
|
7
|
+
data.tar.gz: 0f4f3aac087d73c938bc51f04f80268c3d1c04cf3a7dcd30a5fc03de0f7e78edc453e452722ec10935dcc11d488eb44d5f649a718099ffa12da7c8e6930984b9
|
data/CHANGELOG
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Base Commerce SDK
|
2
2
|
|
3
|
-
**Version: 1.1.
|
3
|
+
**Version: 1.1.5**
|
4
4
|
|
5
5
|
A gem for interfacing with the [Base Commerce](http://www.basecommerce.com/) API. This gem was developed with their help and serves to provide a Gem wrapper around their own Ruby SDK. Please contact them for more information about the Ruby SDK.
|
6
6
|
|
data/basecomm_sdk.gemspec
CHANGED
@@ -64,10 +64,15 @@ module BasecommSdk
|
|
64
64
|
end
|
65
65
|
|
66
66
|
def status_date
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
67
|
+
case status_name
|
68
|
+
when STATUS[:xs_bat_status_returned]
|
69
|
+
return_date
|
70
|
+
when STATUS[:xs_bat_status_settled]
|
71
|
+
settlement_date
|
72
|
+
when STATUS[:xs_bat_status_initiated]
|
73
|
+
effective_date
|
74
|
+
else
|
75
|
+
Time.now.strftime('%m/%d/%Y %H:%M:%S')
|
71
76
|
end
|
72
77
|
end
|
73
78
|
|
data/lib/basecomm_sdk/version.rb
CHANGED
@@ -132,9 +132,16 @@ module BasecommSdk
|
|
132
132
|
expect(bat.status_date).to eq(bat.return_date)
|
133
133
|
end
|
134
134
|
|
135
|
-
it 'returns
|
135
|
+
it 'returns effective_date for initiated' do
|
136
|
+
Timecop.freeze(Time.now)
|
136
137
|
bat = described_class.from_json(bat_initiated_json)
|
137
|
-
expect(bat.status_date).to eq(bat.
|
138
|
+
expect(bat.status_date).to eq(bat.effective_date)
|
139
|
+
end
|
140
|
+
|
141
|
+
it 'returns now by default' do
|
142
|
+
Timecop.freeze(Time.now)
|
143
|
+
bat = described_class.from_json(bat_created_json)
|
144
|
+
expect(bat.status_date).to eq(Time.now.strftime('%m/%d/%Y %H:%M:%S'))
|
138
145
|
end
|
139
146
|
end
|
140
147
|
|
data/spec/spec_helper.rb
CHANGED
@@ -80,5 +80,12 @@ shared_context 'bat_response_methods' do
|
|
80
80
|
status_description: 'Initiated Transaction'
|
81
81
|
).to_json
|
82
82
|
end
|
83
|
+
|
84
|
+
def bat_created_json(opts = {})
|
85
|
+
bat_hash(
|
86
|
+
status_name: 'CREATED',
|
87
|
+
status_description: 'Created Transaction'
|
88
|
+
).to_json
|
89
|
+
end
|
83
90
|
end
|
84
91
|
# rubocop:enable all
|
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.1.
|
4
|
+
version: 1.1.5
|
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-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: dotenv
|
@@ -263,6 +263,20 @@ dependencies:
|
|
263
263
|
- - '>='
|
264
264
|
- !ruby/object:Gem::Version
|
265
265
|
version: '0'
|
266
|
+
- !ruby/object:Gem::Dependency
|
267
|
+
name: timecop
|
268
|
+
requirement: !ruby/object:Gem::Requirement
|
269
|
+
requirements:
|
270
|
+
- - '>='
|
271
|
+
- !ruby/object:Gem::Version
|
272
|
+
version: '0'
|
273
|
+
type: :development
|
274
|
+
prerelease: false
|
275
|
+
version_requirements: !ruby/object:Gem::Requirement
|
276
|
+
requirements:
|
277
|
+
- - '>='
|
278
|
+
- !ruby/object:Gem::Version
|
279
|
+
version: '0'
|
266
280
|
description: Ruby client gem for Base Commerce ACH provider
|
267
281
|
email:
|
268
282
|
- chris@gosimplefin.com
|