From ccf38e2c0789094915b8adf3afcb30f623ee1732 Mon Sep 17 00:00:00 2001 From: dankito Date: Thu, 5 Sep 2024 22:40:03 +0200 Subject: [PATCH] Added clarification about the userId and made it nullable --- .../net/codinux/banking/client/model/UserAccount.kt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/UserAccount.kt b/BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/UserAccount.kt index 95710dc2..fb5b7afe 100644 --- a/BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/UserAccount.kt +++ b/BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/UserAccount.kt @@ -19,7 +19,17 @@ open class UserAccount( val bic: String, val customerName: String, - val userId: String = loginName, + /** + * The customer is the person or organisation that owns the account at the bank. + * + * The user is the person that access a customer's account via e.g. FinTS. The user may but not necessarily is + * identical with the customer. E.g. an employee from the bookkeeping departement or a tax consultant may only + * access an account for someone else. + * + * So in most cases the userId is identical with the customerId = loginName in our speech, but there are rare cases + * where the userId differs from customerId. + */ + val userId: String? = null, open val accounts: List = emptyList(),