ach_client 5.2.0 → 5.3.0

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
  SHA256:
3
- metadata.gz: 40121de7140eb005aa1d705a2df4c32c4e0ddd9f1bf1fc47a5cfa3db4c4714a4
4
- data.tar.gz: 7668ac3bd707b921e6efa0870e0e385c35f49d67db457d2a17731df5ff9de354
3
+ metadata.gz: f0c6e8de15bdf5d69e152454ab5d58fb30ca39e2e1a9e7aeacfdc7ec7af683cf
4
+ data.tar.gz: 617d7adefc31e9297963d191c0976fab619bcfcaa697abafe3062ca687b4f7a0
5
5
  SHA512:
6
- metadata.gz: e4e47bbf496b0730676d00352eedddf635ddf693d21dba7e0e099802bedd9c71e1da4e6696f5081cc7ce3f35bdc628ca255365e0e29731ef1c0bc7f1b79b5a9c
7
- data.tar.gz: 0bf340837047df6cd8816084258dfa1c6ae2cbaa16b9d0e82175ef8222a4490a184259564c77d6b16fdc5399a1098b7593d714b9e18f4e470c89fdf88a54f2eb
6
+ metadata.gz: 7f7ab91c3fcc6a7c19f741677768ca26fbdae0f727105ebb9dbecabc005e990c425bec9bda12777594397bc7745b0cb0a0e6c1f6c783c49a0c6c166c065695cc
7
+ data.tar.gz: 381f5b25afece2d14d6aff80757e4324bfe16139f8fb38ae30f61038e165ef0b92fdb695e7865e9031a7cab634161b0a81bf2a64ab912ad05f647624ec6082c4
@@ -12,6 +12,15 @@ module AchClient
12
12
  end
13
13
  end
14
14
  end
15
+
16
+ def self.icheck_date_format(date_string)
17
+ return unless date_string
18
+ begin
19
+ Date.strptime(date_string, "%m/%d/%Y")
20
+ rescue Date::Error
21
+ return date_string
22
+ end
23
+ end
15
24
  end
16
25
  end
17
- end
26
+ end
@@ -28,13 +28,13 @@ module AchClient
28
28
  # N - no, it hasn't settled yet
29
29
  AchClient::ProcessingAchResponse.new(
30
30
  amount: record[AMOUNT_COLUMN],
31
- date: record[DATE_COLUMN]
31
+ date: Helpers::Utils.icheck_date_format(record[DATE_COLUMN])
32
32
  )
33
33
  when 'Y'
34
34
  # Y - yes, it has settled
35
35
  AchClient::SettledAchResponse.new(
36
36
  amount: record[AMOUNT_COLUMN],
37
- date: record[DATE_COLUMN]
37
+ date: Helpers::Utils.icheck_date_format(record[DATE_COLUMN])
38
38
  )
39
39
  else
40
40
  # If it starts with R, it is probably a return, in which case the
@@ -44,7 +44,7 @@ module AchClient
44
44
  if record[1].start_with?('R')
45
45
  AchClient::ReturnedAchResponse.new(
46
46
  amount: record[AMOUNT_COLUMN],
47
- date: record[DATE_COLUMN],
47
+ date: Helpers::Utils.icheck_date_format(record[DATE_COLUMN]),
48
48
  return_code: AchClient::ReturnCodes.find_by(
49
49
  code: record[STATUS_COLUMN][RETURN_CODE_INDEX]
50
50
  )
@@ -1,4 +1,4 @@
1
1
  module AchClient
2
2
  # Increment this when changes are published
3
- VERSION = '5.2.0'
3
+ VERSION = '5.3.0'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ach_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.0
4
+ version: 5.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zach Cotter
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-06-05 00:00:00.000000000 Z
11
+ date: 2023-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ach