ach_client 0.5.1 → 0.5.2

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
  SHA1:
3
- metadata.gz: 3c30eaaf8153eb00c471359ea9f62e2de57de6bc
4
- data.tar.gz: 32228d3962ca02a87486da80d5c7208acfa85131
3
+ metadata.gz: e39e1785104fd318567822771daffe0f439f9f65
4
+ data.tar.gz: 75e2babc7151aab7be0cfe06f7a6c89774e9a558
5
5
  SHA512:
6
- metadata.gz: 12bc454fa2b392ecb8fef23070c43dd1056ad178eb6f6120185fbd98b3b4309b28ba972556a730d6de66942c36941a34494b696a3268e2067629f7afdb045fd6
7
- data.tar.gz: f08f3a7b91b8c07542c8f87d367f460465dde1f167385c3e2c13b3690753946d4341a241728570ef1b991c46a1c2fef68eab4e5d778759f65f97e04b6ea84c72
6
+ metadata.gz: bd1d87a43792f35f605f303f47509855d2ff814d59c4f502f90c9c782fcbb4f41300883b4ba22eb3414d6f1d4117e4a1b4842f04b6460e5d55a33fda334b1250
7
+ data.tar.gz: 4c2711dc6bbac757216c623cd27752274cb031455896b7347eb8c3c37d05fda9e4ce500a3a83aea4f78dc5a2e6e14c6f0159c552dd5928a807e1ae8cac5d12bf
data/.gitignore CHANGED
@@ -7,3 +7,4 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ *.gem
@@ -3,6 +3,12 @@ module AchClient
3
3
  # See config/return_codes.yml for our list.
4
4
  class ReturnCode
5
5
 
6
+ # The first character in a correction code
7
+ CORRECTION_START_CHARACTER = 'C'
8
+
9
+ # The first character in an internal return code
10
+ INTERNAL_START_CHARACTER = 'X'
11
+
6
12
  attr_accessor :code,
7
13
  :description,
8
14
  :reason
@@ -16,5 +22,17 @@ module AchClient
16
22
  @description = description
17
23
  @reason = reason
18
24
  end
25
+
26
+ # @return Whether or not this return is a correction/notice of change
27
+ def correction?
28
+ @code.start_with?(CORRECTION_START_CHARACTER)
29
+ end
30
+
31
+ # @return Whether or not the return is internal
32
+ # An "internal" return means that the ACH provider knew that the ACH
33
+ # would fail and didn't bother to send it to their upstream provider
34
+ def internal?
35
+ @code.start_with?(INTERNAL_START_CHARACTER)
36
+ end
19
37
  end
20
38
  end
@@ -1,4 +1,4 @@
1
1
  module AchClient
2
2
  # Increment this when changes are published
3
- VERSION = '0.5.1'
3
+ VERSION = '0.5.2'
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: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zach Cotter
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-01-24 00:00:00.000000000 Z
11
+ date: 2017-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ach