/
fiBeneficiaryFI.go
59 lines (50 loc) · 1.57 KB
/
fiBeneficiaryFI.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// Copyright 2019 The Moov Authors
// Use of this source code is governed by an Apache License
// license that can be found in the LICENSE file.
package wire
import "strings"
// FIBeneficiaryFI is the financial institution beneficiary financial institution
type FIBeneficiaryFI struct {
// tag
tag string
// Financial Institution
FIToFI FiToFi `json:"fiToFI,omitempty"`
// validator is composed for data validation
validator
// converters is composed for WIRE to GoLang Converters
converters
}
// NewFIBeneficiaryFI returns a new FIBeneficiaryFI
func NewFIBeneficiaryFI() FIBeneficiaryFI {
bfi := FIBeneficiaryFI{
tag: TagFIBeneficiaryFI,
}
return bfi
}
// Parse takes the input string and parses the FIBeneficiaryFI values
//
// Parse provides no guarantee about all fields being filled in. Callers should make a Validate() call to confirm
// successful parsing and data validity.
func (bfi *FIBeneficiaryFI) Parse(record string) {
}
// String writes FIBeneficiaryFI
func (bfi *FIBeneficiaryFI) String() string {
var buf strings.Builder
// ToDo: Separator
buf.Grow(195)
buf.WriteString(bfi.tag)
return buf.String()
}
// Validate performs WIRE format rule checks on FIBeneficiaryFI and returns an error if not Validated
// The first error encountered is returned and stops that parsing.
func (bfi *FIBeneficiaryFI) Validate() error {
if err := bfi.fieldInclusion(); err != nil {
return err
}
return nil
}
// fieldInclusion validate mandatory fields. If fields are
// invalid the WIRE will return an error.
func (bfi *FIBeneficiaryFI) fieldInclusion() error {
return nil
}