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
|
package domain
// AccountConnection represents an identification for a bank account
type AccountConnection struct {
AccountID string
SubAccountCharacteristics string
CountryCode int
BankID string
}
// InternationalAccountConnection represents an international identification
// for a bank account
type InternationalAccountConnection struct {
IBAN string
BIC string
AccountID string
SubAccountCharacteristics string
BankID BankID
}
// ToAccountConnection transforms i into an AccountConnection
func (i InternationalAccountConnection) ToAccountConnection() AccountConnection {
return AccountConnection{
AccountID: i.AccountID,
SubAccountCharacteristics: i.SubAccountCharacteristics,
CountryCode: i.BankID.CountryCode,
BankID: i.BankID.ID,
}
}
|