basecomm_sdk 1.1.6 → 1.1.7
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 +4 -4
- data/CHANGELOG +4 -0
- data/README.md +1 -1
- data/lib/basecomm_sdk/bank_account_transaction.rb +4 -2
- data/lib/basecomm_sdk/version.rb +1 -1
- data/spec/lib/basecomm_sdk/bank_account_transaction_spec.rb +9 -8
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dbf7365333973a1e8379b6bb2848db5299184dbb
|
4
|
+
data.tar.gz: 9b5235ab28864cd3dd878fe02f8295ae23aed324
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56acd7e96ed26f2dbbb77e5c0614d3097ca951c6875ce533903a91612bf51017880be291e2f1370174495c4c0184ed13005e083784486716f301997faeb73705
|
7
|
+
data.tar.gz: 09c277cc003d66d0baa4a946f0b2df4e66e6ad5331982f33622a1cb00c8849791fcff37f3de7883f9c38692765ada596cf8acc486ac9fcda9ff6914ac231ea8a
|
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.7**
|
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
|
|
@@ -64,7 +64,7 @@ module BasecommSdk
|
|
64
64
|
end
|
65
65
|
|
66
66
|
def status_date
|
67
|
-
case status_name
|
67
|
+
the_date = case status_name
|
68
68
|
when STATUS[:xs_bat_status_created]
|
69
69
|
creation_date
|
70
70
|
when STATUS[:xs_bat_status_returned]
|
@@ -75,7 +75,9 @@ module BasecommSdk
|
|
75
75
|
effective_date
|
76
76
|
else
|
77
77
|
Time.now.strftime('%m/%d/%Y %H:%M:%S')
|
78
|
-
|
78
|
+
end
|
79
|
+
|
80
|
+
DateTime.strptime(the_date, '%m/%d/%Y %H:%M:%S')
|
79
81
|
end
|
80
82
|
|
81
83
|
def account_name=(name)
|
data/lib/basecomm_sdk/version.rb
CHANGED
@@ -124,30 +124,31 @@ module BasecommSdk
|
|
124
124
|
context '.status_date' do
|
125
125
|
it 'returns settlement_date if settled' do
|
126
126
|
bat = described_class.from_json(bat_settled_json)
|
127
|
-
expect(bat.status_date).to eq(bat.settlement_date)
|
127
|
+
expect(bat.status_date).to eq(DateTime.strptime(bat.settlement_date, '%m/%d/%Y %H:%M:%S'))
|
128
128
|
end
|
129
129
|
|
130
130
|
it 'returns return_date if returned (or corrected)' do
|
131
131
|
bat = described_class.from_json(bat_returned_json)
|
132
|
-
expect(bat.status_date).to eq(bat.return_date)
|
132
|
+
expect(bat.status_date).to eq(DateTime.strptime(bat.return_date, '%m/%d/%Y %H:%M:%S'))
|
133
133
|
end
|
134
134
|
|
135
135
|
it 'returns effective_date for initiated' do
|
136
|
-
Timecop.freeze(Time.now)
|
137
136
|
bat = described_class.from_json(bat_initiated_json)
|
138
|
-
expect(bat.status_date).to eq(bat.effective_date)
|
137
|
+
expect(bat.status_date).to eq(DateTime.strptime(bat.effective_date, '%m/%d/%Y %H:%M:%S'))
|
139
138
|
end
|
140
139
|
|
141
140
|
it 'returns created_date for created' do
|
142
|
-
Timecop.freeze(Time.now)
|
143
141
|
bat = described_class.from_json(bat_created_json)
|
144
|
-
expect(bat.status_date).to eq(bat.creation_date)
|
142
|
+
expect(bat.status_date).to eq(DateTime.strptime(bat.creation_date, '%m/%d/%Y %H:%M:%S'))
|
145
143
|
end
|
146
144
|
|
147
145
|
it 'returns now by default' do
|
148
|
-
|
146
|
+
now = Time.now
|
147
|
+
Timecop.freeze(now)
|
149
148
|
bat = described_class.from_json(bat_failed_json)
|
150
|
-
|
149
|
+
now_string = now.strftime('%m/%d/%Y %H:%M:%S')
|
150
|
+
expect(bat.status_date).to eq(DateTime.strptime(now_string, '%m/%d/%Y %H:%M:%S'))
|
151
|
+
Timecop.return
|
151
152
|
end
|
152
153
|
end
|
153
154
|
|