Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add const values for batch header.service class code #394

Merged
merged 12 commits into from
Dec 6, 2018

Conversation

bkmoovio
Copy link
Contributor

@bkmoovio bkmoovio commented Dec 6, 2018

Constant values for ServiceClassCode
DebitsOnly
CreditsOnly
MixedDebitsandCredits
AutomatedAccountingAdvices
Update Comments
CreditsOnly
Constants for ServiceClassCode
Allow only credits, so error should be returned for DebitsOnly
@codecov-io
Copy link

codecov-io commented Dec 6, 2018

Codecov Report

Merging #394 into master will not change coverage.
The diff coverage is 98.03%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #394   +/-   ##
=======================================
  Coverage   85.17%   85.17%           
=======================================
  Files         107      107           
  Lines        6785     6785           
=======================================
  Hits         5779     5779           
  Misses        723      723           
  Partials      283      283
Impacted Files Coverage Δ
batchCTX.go 100% <ø> (ø) ⬆️
iatBatchHeader.go 100% <ø> (ø) ⬆️
batchHeader.go 98.29% <ø> (ø) ⬆️
iatBatch.go 94.07% <0%> (ø) ⬆️
test/ach-cie-write/main.go 86.04% <100%> (ø) ⬆️
test/ach-boc-write/main.go 83.33% <100%> (ø) ⬆️
cmd/writeACH/main.go 58.33% <100%> (ø) ⬆️
test/ach-iat-write/main.go 93.54% <100%> (ø) ⬆️
batchCOR.go 95.23% <100%> (ø) ⬆️
test/ach-ccd-write/main.go 87.23% <100%> (ø) ⬆️
... and 33 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e1246a0...04887ba. Read the comment docs.

Update text
// ServiceClassCode ACH Mixed Debits and Credits ‘200’
// ACH Credits Only ‘220’
// ACH Debits Only ‘225'
// Constant AutomatedAccountingAdvices: 280
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be commented out?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll remove!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since this in adv control, I'll have it be this

// This should be the same as BatchHeader ServiceClassCode for ADV: AutomatedAccountingAdvices.

@@ -60,7 +58,8 @@ func (bc *ADVBatchControl) Parse(record string) {

// 1-1 Always "8"
bc.recordType = "8"
// 2-4 This is the same as the "Service code" field in previous Batch Header Record
// 2-4 This is the same as the "Service code" field in previous Batch Header Record -
// AutomatedAccountingAdvices: 280
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this comment need to be here? Not sure what it tells me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I'll remove. No problem!

@@ -49,12 +49,12 @@ func BenchmarkMockADVBatchControl(b *testing.B) {

// TestParseADVBatchControl parses a known Batch ControlRecord string.
func testParseADVBatchControl(t testing.TB) {
var line = "822500000100053200010000000000000001050000000000000000000000T-BANK 076401250000001"
var line = "828000000100053200010000000000000001050000000000000000000000T-BANK 076401250000001"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Good catch!

GoDoc update
Code Comment Updates
@bkmoovio bkmoovio merged commit e4f7177 into master Dec 6, 2018
@bkmoovio bkmoovio deleted the Add-const-values-for-BatchHeader.ServiceClassCode branch December 6, 2018 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants