Made clearer that sendMessageAndHandleResponse() starts a new dialog
This commit is contained in:
parent
0888166466
commit
4ec366f7cd
|
@ -70,7 +70,8 @@ open class FinTsClientDeprecated @JvmOverloads constructor(
|
||||||
return@retrieveBasicDataLikeUsersTanMethods
|
return@retrieveBasicDataLikeUsersTanMethods
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Second dialog: some banks require that in order to initialize a dialog with strong customer authorization TAN media is required */
|
/* Second dialog, executed in retrieveBasicDataLikeUsersTanMethods() if required: some banks require that in order to initialize a dialog with
|
||||||
|
strong customer authorization TAN media is required */
|
||||||
|
|
||||||
addAccountGetAccountsAndTransactions(context, parameter, callback)
|
addAccountGetAccountsAndTransactions(context, parameter, callback)
|
||||||
}
|
}
|
||||||
|
|
|
@ -176,7 +176,7 @@ open class FinTsJobExecutor(
|
||||||
|
|
||||||
open fun getTransactionsAsync(context: JobContext, parameter: GetAccountTransactionsParameter, callback: (GetAccountTransactionsResponse) -> Unit) {
|
open fun getTransactionsAsync(context: JobContext, parameter: GetAccountTransactionsParameter, callback: (GetAccountTransactionsResponse) -> Unit) {
|
||||||
|
|
||||||
val dialogContext = context.startNewDialog()
|
val dialogContext = context.startNewDialog() // TODO: initDialogWithStrongCustomerAuthentication() also starts a new dialog in initDialogWithStrongCustomerAuthenticationAfterSuccessfulPreconditionChecks()
|
||||||
|
|
||||||
initDialogWithStrongCustomerAuthentication(context) { initDialogResponse ->
|
initDialogWithStrongCustomerAuthentication(context) { initDialogResponse ->
|
||||||
|
|
||||||
|
@ -296,7 +296,7 @@ open class FinTsJobExecutor(
|
||||||
protected open fun getTanMediaList(context: JobContext, tanMediaKind: TanMedienArtVersion = TanMedienArtVersion.Alle, tanMediumClass: TanMediumKlasse = TanMediumKlasse.AlleMedien,
|
protected open fun getTanMediaList(context: JobContext, tanMediaKind: TanMedienArtVersion = TanMedienArtVersion.Alle, tanMediumClass: TanMediumKlasse = TanMediumKlasse.AlleMedien,
|
||||||
preferredTanMedium: String? = null, callback: (GetTanMediaListResponse) -> Unit) {
|
preferredTanMedium: String? = null, callback: (GetTanMediaListResponse) -> Unit) {
|
||||||
|
|
||||||
sendMessageAndHandleResponse(context, CustomerSegmentId.TanMediaList, false, {
|
sendMessageInNewDialogAndHandleResponse(context, CustomerSegmentId.TanMediaList, false, {
|
||||||
messageBuilder.createGetTanMediaListMessage(context, tanMediaKind, tanMediumClass)
|
messageBuilder.createGetTanMediaListMessage(context, tanMediaKind, tanMediumClass)
|
||||||
}) { response ->
|
}) { response ->
|
||||||
handleGetTanMediaListResponse(context, response, preferredTanMedium, callback)
|
handleGetTanMediaListResponse(context, response, preferredTanMedium, callback)
|
||||||
|
@ -344,7 +344,7 @@ open class FinTsJobExecutor(
|
||||||
protected open fun sendChangeTanMediumMessage(context: JobContext, newActiveTanMedium: TanGeneratorTanMedium, enteredAtc: EnterTanGeneratorAtcResult?,
|
protected open fun sendChangeTanMediumMessage(context: JobContext, newActiveTanMedium: TanGeneratorTanMedium, enteredAtc: EnterTanGeneratorAtcResult?,
|
||||||
callback: (BankResponse) -> Unit) {
|
callback: (BankResponse) -> Unit) {
|
||||||
|
|
||||||
sendMessageAndHandleResponse(context, null, true, {
|
sendMessageInNewDialogAndHandleResponse(context, null, true, {
|
||||||
messageBuilder.createChangeTanMediumMessage(context, newActiveTanMedium, enteredAtc?.tan, enteredAtc?.atc)
|
messageBuilder.createChangeTanMediumMessage(context, newActiveTanMedium, enteredAtc?.tan, enteredAtc?.atc)
|
||||||
}, callback)
|
}, callback)
|
||||||
}
|
}
|
||||||
|
@ -352,7 +352,7 @@ open class FinTsJobExecutor(
|
||||||
|
|
||||||
open fun doBankTransferAsync(context: JobContext, bankTransferData: BankTransferData, callback: (FinTsClientResponse) -> Unit) {
|
open fun doBankTransferAsync(context: JobContext, bankTransferData: BankTransferData, callback: (FinTsClientResponse) -> Unit) {
|
||||||
|
|
||||||
sendMessageAndHandleResponse(context, null, true, {
|
sendMessageInNewDialogAndHandleResponse(context, null, true, {
|
||||||
val updatedAccount = getUpdatedAccount(context, context.account!!)
|
val updatedAccount = getUpdatedAccount(context, context.account!!)
|
||||||
messageBuilder.createBankTransferMessage(context, bankTransferData, updatedAccount)
|
messageBuilder.createBankTransferMessage(context, bankTransferData, updatedAccount)
|
||||||
}) { response ->
|
}) { response ->
|
||||||
|
@ -521,7 +521,7 @@ open class FinTsJobExecutor(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected open fun sendMessageAndHandleResponse(context: JobContext, segmentForNonStrongCustomerAuthenticationTwoStepTanProcess: CustomerSegmentId? = null,
|
protected open fun sendMessageInNewDialogAndHandleResponse(context: JobContext, segmentForNonStrongCustomerAuthenticationTwoStepTanProcess: CustomerSegmentId? = null,
|
||||||
closeDialog: Boolean = true, createMessage: () -> MessageBuilderResult, callback: (BankResponse) -> Unit) {
|
closeDialog: Boolean = true, createMessage: () -> MessageBuilderResult, callback: (BankResponse) -> Unit) {
|
||||||
|
|
||||||
context.startNewDialog(closeDialog)
|
context.startNewDialog(closeDialog)
|
||||||
|
|
Loading…
Reference in New Issue