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

Only fail validation of cash letter control for settlementDate field if it is not a return type #185

Merged
merged 2 commits into from
Jul 7, 2021

Conversation

SaraAdineh
Copy link
Contributor

@SaraAdineh SaraAdineh commented Jul 7, 2021

Here is the original discussion on this matter.

According to different specs, the SettlementDate is a conditional field. Currently, the parser requires this field to exist. Having this field present for Return bundles does not make sense hence why they are defined to be conditional.

There were two approaches to take:

  1. To remove this check completely.
  2. To not have it required for Return documents which are indicated by CollectionTypeIndicator.

I went with the second approach.

Screen Shot 2021-07-06 at 9 47 08 PM

@SaraAdineh SaraAdineh requested a review from atonks2 as a code owner July 7, 2021 04:54
@adamdecaf
Copy link
Member

I like the idea of passing contextual knowledge over to Validate. It looks like we'll need to do more of this to support all X9 specs.

@adamdecaf adamdecaf merged commit 7b8efd5 into moov-io:master Jul 7, 2021
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.

2 participants