refactor/removed getTransactionRequestTypesImpl

This commit is contained in:
hongwei 2024-10-22 17:59:36 +02:00
parent 36003c13fa
commit c091ab5c83
4 changed files with 3 additions and 25 deletions

View File

@ -892,15 +892,7 @@ trait Connector extends MdcLoggable {
def getTransactionRequestTypes(initiator : User, fromAccount : BankAccount, callContext: Option[CallContext]) : Box[List[TransactionRequestType]] =
LocalMappedConnector.getTransactionRequestTypes(initiator : User, fromAccount : BankAccount, callContext: Option[CallContext])
protected def getTransactionRequestTypesImpl(fromAccount : BankAccount) : Box[List[TransactionRequestType]] = {
//TODO: write logic / data access
// Get Transaction Request Types from Props "transactionRequests_supported_types". Default is empty string
val validTransactionRequestTypes = APIUtil.getPropsValue("transactionRequests_supported_types", "").split(",").map(x => TransactionRequestType(x)).toList
Full(validTransactionRequestTypes)
}
//Note: Now we use validateChallengeAnswer instead, new methods validate over kafka, and move the allowed_attempts guard into API level.
//It is only used for V140 and V200, has been deprecated from V210.
@deprecated

View File

@ -419,7 +419,6 @@ object ConnectorBuilderUtil {
"makePaymentImpl",
"saveTransactionRequestStatusImpl",
"getTransactionRequestStatusesImpl",
"getTransactionRequestTypesImpl"
).distinct
val omitMethods = List(

View File

@ -4960,17 +4960,9 @@ object LocalMappedConnector extends Connector with MdcLoggable {
TransactionRequests.transactionRequestProvider.vend.getTransactionRequest(transactionRequestId).map(transactionRequest => (transactionRequest, callContext))
override def getTransactionRequestTypes(initiator: User, fromAccount: BankAccount, callContext: Option[CallContext]): Box[List[TransactionRequestType]] = {
for {
transactionRequestTypes <- getTransactionRequestTypesImpl(fromAccount)
} yield transactionRequestTypes
Full(APIUtil.getPropsValue("transactionRequests_supported_types", "").split(",").map(x => TransactionRequestType(x)).toList)
}
override def getTransactionRequestTypesImpl(fromAccount: BankAccount): Box[List[TransactionRequestType]] = {
// Get Transaction Request Types from Props "transactionRequests_supported_types". Default is empty string
val validTransactionRequestTypes = APIUtil.getPropsValue("transactionRequests_supported_types", "").split(",").map(x => TransactionRequestType(x)).toList
Full(validTransactionRequestTypes)
}
//Note: Now we use validateChallengeAnswer instead, new methods validate over kafka, and move the allowed_attempts guard into API level.
//It is only used for V140 and V200, has been deprecated from V210.
@deprecated

View File

@ -1174,11 +1174,6 @@ case class InBoundGetTransactionRequestTypes(status: Status, data: List[Transact
override val inboundAdapterCallContext: InboundAdapterCallContext = InboundAdapterCallContext()
}
case class OutBoundGetTransactionRequestTypesImpl(fromAccount: BankAccount) extends TopicTrait
case class InBoundGetTransactionRequestTypesImpl(status: Status, data: List[TransactionRequestType]) extends InBoundTrait[List[TransactionRequestType]] {
override val inboundAdapterCallContext: InboundAdapterCallContext = InboundAdapterCallContext()
}
case class OutBoundCreateTransactionAfterChallenge(outboundAdapterCallContext: OutboundAdapterCallContext, initiator: User, transReqId: TransactionRequestId) extends TopicTrait
case class InBoundCreateTransactionAfterChallenge(status: Status, data: TransactionRequest) extends InBoundTrait[TransactionRequest] {
override val inboundAdapterCallContext: InboundAdapterCallContext = InboundAdapterCallContext()