| 1 |
package segment |
| 2 |
|
| 3 |
import ( |
| 4 |
"github.com/mitch000001/go-hbci/element" |
| 5 |
"gopkg.in/yaml.v3" |
| 6 |
) |
| 7 |
|
| 8 |
const TanBankParameterID = "HITANS" |
| 9 |
|
| 10 |
type TanBankParameter interface { |
| 11 |
BankSegment |
| 12 |
} |
| 13 |
|
| 14 |
//go:generate go run ../cmd/unmarshaler/unmarshaler_generator.go -segment TanBankParameterSegment -segment_interface TanBankParameter -segment_versions="TanBankParameterV6:6:Segment" |
| 15 |
|
| 16 |
type TanBankParameterSegment struct { |
| 17 |
TanBankParameter |
| 18 |
} |
| 19 |
|
| 20 |
// TanBankParameterV6 |
| 21 |
// |
| 22 |
// Zwei-Schritt-TAN-Einreichung, Parameter |
| 23 |
type TanBankParameterV6 struct { |
| 24 |
Segment |
| 25 |
MaxJobs *element.NumberDataElement |
| 26 |
MinSignatures *element.NumberDataElement |
| 27 |
SecurityClass *element.CodeDataElement |
| 28 |
Tan2StepSubmissionParameter *element.Tan2StepSubmissionParameterV6 |
| 29 |
} |
| 30 |
|
| 31 |
func (t *TanBankParameterV6) Version() int { return 6 } |
| 32 |
func (t *TanBankParameterV6) ID() string { return TanBankParameterID } |
| 33 |
func (t *TanBankParameterV6) referencedId() string { return ProcessingPreparationID } |
| 34 |
func (t *TanBankParameterV6) sender() string { return senderBank } |
| 35 |
|
| 36 |
func (t *TanBankParameterV6) elements() []element.DataElement { |
| 37 |
return []element.DataElement{ |
| 38 |
t.MaxJobs, |
| 39 |
t.MinSignatures, |
| 40 |
t.SecurityClass, |
| 41 |
t.Tan2StepSubmissionParameter, |
| 42 |
} |
| 43 |
} |
| 44 |
|
| 45 |
func (t *TanBankParameterV6) MarshalYAML() (interface{}, error) { |
| 46 |
return map[string]yaml.Marshaler{ |
| 47 |
"MaxJobs": t.MaxJobs, |
| 48 |
"MinSignatures": t.MinSignatures, |
| 49 |
"SecurityClass": t.SecurityClass, |
| 50 |
"Tan2StepSubmissionParameter": t.Tan2StepSubmissionParameter, |
| 51 |
}, nil |
| 52 |
} |