-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Skipping IMAD mandatory check (#283)
- Loading branch information
1 parent
18dce4c
commit c617d57
Showing
7 changed files
with
185 additions
and
2 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
examples/bankDrawDownRequest-read-skip-imad/bankDrawDownRequest.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{1500}30User ReqT | ||
{1510}1631 | ||
{2000}000001234567 | ||
{3100}121042882Wells Fargo NA | ||
{3400}231380104Citadel | ||
{3600}DRB | ||
{3320}Sender Reference | ||
{3500}Previous Message Ident | ||
{4000}D123456789 FI Name Address One Address Two Address Three | ||
{4100}D123456789 FI Name Address One Address Two Address Three | ||
{4200}31234 Name Address One Address Two Address Three | ||
{4320}Reference | ||
{4400}D123456789 debitDD Name Address One Address Two Address Three | ||
{5000}11234 Name Address One Address Two Address Three | ||
{5100}D123456789 FI Name Address One Address Two Address Three | ||
{5200}D123456789 FI Name Address One Address Two Address Three | ||
{5400}123456789 | ||
{6000}LineOne LineTwo LineThree LineFour | ||
{6100}Line Six | ||
{6200}Line Six | ||
{6210}LTRLine One Line Two Line Three Line Four Line Five Line Six | ||
{6300}Line One Line Two Line Three Line Four Line Five Line Six | ||
{6310}TLXLine One Line Two Line Three Line Four Line Five Line Six | ||
{6400}Line One Line Two Line Three Line Four Line Five Line Six | ||
{6410}LTRLine One Line Two Line Three Line Four Line Five Line Six | ||
{6420}CHECKAdditional Information | ||
{6500}Line One Line Two Line Three Line Four Line Five Line Six |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// Copyright 2020 The Moov Authors | ||
// Use of this source code is governed by an Apache License | ||
// license that can be found in the LICENSE file. | ||
|
||
package main | ||
|
||
import ( | ||
"fmt" | ||
"log" | ||
"os" | ||
"path/filepath" | ||
|
||
"github.com/moov-io/wire" | ||
) | ||
|
||
func main() { | ||
f, err := os.Open(filepath.Join("examples", "bankDrawDownRequest-read-skip-imad", "bankDrawDownRequest.txt")) | ||
if err != nil { | ||
log.Fatalf("Could not open FEDWireMessage: %s\n", err) | ||
|
||
} | ||
defer f.Close() | ||
r := wire.NewReader(f) | ||
|
||
opts := wire.ValidateOpts{ | ||
SkipMandatoryIMAD: true, | ||
} | ||
|
||
fwmFile, err := r.ReadWithOpts(&opts) | ||
if err != nil { | ||
log.Fatalf("Could not read FEDWireMessage: %s\n", err) | ||
} | ||
// ensure we have a validated file structure | ||
if err = fwmFile.Validate(); err != nil { | ||
log.Fatalf("Could not validate FEDWireMessage: %s\n", err) | ||
} | ||
|
||
if fwmFile.FEDWireMessage.InputMessageAccountabilityData != nil { | ||
log.Fatalf("IMAD doesn't existed in FEDWireMessage") | ||
} | ||
|
||
fmt.Printf("Sender Supplied: %v \n", fwmFile.FEDWireMessage.SenderSupplied) | ||
fmt.Printf("Type and Subtype: %v \n", fwmFile.FEDWireMessage.TypeSubType) | ||
fmt.Printf("Input Message Accountability Data: %v \n", fwmFile.FEDWireMessage.InputMessageAccountabilityData) | ||
fmt.Printf("Amount: %v \n", fwmFile.FEDWireMessage.Amount) | ||
fmt.Printf("Sender Depository Institution: %v \n", fwmFile.FEDWireMessage.SenderDepositoryInstitution) | ||
fmt.Printf("Receiver Depository Institution: %v \n", fwmFile.FEDWireMessage.ReceiverDepositoryInstitution) | ||
fmt.Printf("Business Function Code: %v \n", fwmFile.FEDWireMessage.BusinessFunctionCode) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters