Added clarification about Dialogsprache
This commit is contained in:
parent
8247584a61
commit
a2ac04f424
|
@ -3,6 +3,13 @@ package net.codinux.banking.fints.messages.datenelemente.implementierte
|
|||
|
||||
enum class Dialogsprache(override val code: String) : ICodeEnum {
|
||||
|
||||
/**
|
||||
* Der Kunde darf lediglich ein Sprachkennzeichen einstellen, das im Rahmen
|
||||
* der BPD vom Kreditinstitut an das Kundensystem übermittelt wurde.
|
||||
* Wenn noch keine BPD vorliegen, sollte das Kundenprodukt mit Hilfe eines
|
||||
* anonymen Dialogs die aktuelle BPD des Instituts ermitteln und die Standardsprache des Instituts einstellen, die in den Bankparameterdaten mitgeteilt
|
||||
* wird. Falls die BPD nicht abgerufen werden kann, ist der Wert „0“ einzustellen. Das Kreditinstitut antwortet in diesem Fall in seiner Standardsprache.
|
||||
*/
|
||||
Default("0"),
|
||||
|
||||
German("1"),
|
||||
|
|
|
@ -72,6 +72,13 @@ open class ModelMapper(
|
|||
}
|
||||
}
|
||||
|
||||
response.getFirstSegmentById<CommunicationInfo>(InstituteSegmentId.CommunicationInfo)?.let { communicationInfo ->
|
||||
// actually it's the default language, not the selected one, but we don't offer a way to select language
|
||||
// and expect in first message, where language is set to 0 = signal that we don't know bank server's supported
|
||||
// languages, we simply use bank's default language, which is returned in BPD (and is always except one bank German anyway)
|
||||
bank.selectedLanguage = communicationInfo.defaultLanguage
|
||||
}
|
||||
|
||||
response.getFirstSegmentById<ReceivedSynchronization>(InstituteSegmentId.Synchronization)?.let { synchronization ->
|
||||
synchronization.customerSystemId?.let {
|
||||
bank.customerSystemId = it
|
||||
|
@ -124,12 +131,6 @@ open class ModelMapper(
|
|||
// TODO: may also make use of other info
|
||||
}
|
||||
|
||||
response.getFirstSegmentById<CommunicationInfo>(InstituteSegmentId.CommunicationInfo)?.let { communicationInfo ->
|
||||
if (bank.selectedLanguage != communicationInfo.defaultLanguage) {
|
||||
bank.selectedLanguage = communicationInfo.defaultLanguage
|
||||
}
|
||||
}
|
||||
|
||||
val supportedJobs = response.supportedJobs
|
||||
if (supportedJobs.isNotEmpty()) { // if allowedJobsForBank is empty than bank didn't send any allowed job
|
||||
for (account in bank.accounts) {
|
||||
|
|
Loading…
Reference in New Issue