| 1 |
package domain |
| 2 |
|
| 3 |
// AccountConnection represents an identification for a bank account |
| 4 |
type AccountConnection struct { |
| 5 |
AccountID string |
| 6 |
SubAccountCharacteristics string |
| 7 |
CountryCode int |
| 8 |
BankID string |
| 9 |
} |
| 10 |
|
| 11 |
// InternationalAccountConnection represents an international identification |
| 12 |
// for a bank account |
| 13 |
type InternationalAccountConnection struct { |
| 14 |
IBAN string |
| 15 |
BIC string |
| 16 |
AccountID string |
| 17 |
SubAccountCharacteristics string |
| 18 |
BankID BankID |
| 19 |
} |
| 20 |
|
| 21 |
// ToAccountConnection transforms i into an AccountConnection |
| 22 |
func (i InternationalAccountConnection) ToAccountConnection() AccountConnection { |
| 23 |
return AccountConnection{ |
| 24 |
AccountID: i.AccountID, |
| 25 |
SubAccountCharacteristics: i.SubAccountCharacteristics, |
| 26 |
CountryCode: i.BankID.CountryCode, |
| 27 |
BankID: i.BankID.ID, |
| 28 |
} |
| 29 |
} |