mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 15:47:01 +00:00
feature/added new method getChallengesByBasketId to StoredProcedureConnector_vDec2019
This commit is contained in:
parent
35d0315899
commit
43bb59e992
@ -359,6 +359,7 @@ object ConnectorBuilderUtil {
|
||||
"createDirectDebit",
|
||||
"deleteCustomerAttribute",
|
||||
"getPhysicalCardsForUser",
|
||||
"getChallengesByBasketId",
|
||||
|
||||
// The follow methods's parameter or return type are special
|
||||
"getCurrentFxRate",
|
||||
|
||||
@ -75,7 +75,7 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
val connectorName = "stored_procedure_vDec2019"
|
||||
|
||||
//---------------- dynamic start -------------------please don't modify this line
|
||||
// ---------- created on 2024-07-30T13:47:52Z
|
||||
// ---------- created on 2024-08-07T12:43:02Z
|
||||
|
||||
messageDocs += getAdapterInfoDoc
|
||||
def getAdapterInfoDoc = MessageDoc(
|
||||
@ -706,6 +706,44 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
response.map(convertToTuple[List[ChallengeCommons]](callContext))
|
||||
}
|
||||
|
||||
messageDocs += getChallengesByBasketIdDoc
|
||||
def getChallengesByBasketIdDoc = MessageDoc(
|
||||
process = "obp.getChallengesByBasketId",
|
||||
messageFormat = messageFormat,
|
||||
description = "Get Challenges By Basket Id",
|
||||
outboundTopic = None,
|
||||
inboundTopic = None,
|
||||
exampleOutboundMessage = (
|
||||
OutBoundGetChallengesByBasketId(outboundAdapterCallContext=MessageDocsSwaggerDefinitions.outboundAdapterCallContext,
|
||||
basketId=basketIdExample.value)
|
||||
),
|
||||
exampleInboundMessage = (
|
||||
InBoundGetChallengesByBasketId(inboundAdapterCallContext=MessageDocsSwaggerDefinitions.inboundAdapterCallContext,
|
||||
status=MessageDocsSwaggerDefinitions.inboundStatus,
|
||||
data=List( ChallengeCommons(challengeId=challengeIdExample.value,
|
||||
transactionRequestId=transactionRequestIdExample.value,
|
||||
expectedAnswer="string",
|
||||
expectedUserId="string",
|
||||
salt="string",
|
||||
successful=true,
|
||||
challengeType=challengeTypeExample.value,
|
||||
consentId=Some(consentIdExample.value),
|
||||
basketId=Some(basketIdExample.value),
|
||||
scaMethod=Some(com.openbankproject.commons.model.enums.StrongCustomerAuthentication.SMS),
|
||||
scaStatus=Some(com.openbankproject.commons.model.enums.StrongCustomerAuthenticationStatus.example),
|
||||
authenticationMethodId=Some("string"),
|
||||
attemptCounter=123)))
|
||||
),
|
||||
adapterImplementation = Some(AdapterImplementation("- Core", 1))
|
||||
)
|
||||
|
||||
override def getChallengesByBasketId(basketId: String, callContext: Option[CallContext]): OBPReturnType[Box[List[ChallengeTrait]]] = {
|
||||
import com.openbankproject.commons.dto.{InBoundGetChallengesByBasketId => InBound, OutBoundGetChallengesByBasketId => OutBound}
|
||||
val req = OutBound(callContext.map(_.toOutboundAdapterCallContext).orNull, basketId)
|
||||
val response: Future[Box[InBound]] = sendRequest[InBound]("obp_get_challenges_by_basket_id", req, callContext)
|
||||
response.map(convertToTuple[List[ChallengeCommons]](callContext))
|
||||
}
|
||||
|
||||
messageDocs += getChallengeDoc
|
||||
def getChallengeDoc = MessageDoc(
|
||||
process = "obp.getChallenge",
|
||||
@ -1304,9 +1342,7 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
|
||||
override def checkBankAccountExists(bankId: BankId, accountId: AccountId, callContext: Option[CallContext]): OBPReturnType[Box[BankAccount]] = {
|
||||
import com.openbankproject.commons.dto.{InBoundCheckBankAccountExists => InBound, OutBoundCheckBankAccountExists => OutBound}
|
||||
logger.debug(s"StoredProcedureConnector_vDec2019.checkBankAccountExists.callContext : $callContext")
|
||||
val req = OutBound(callContext.map(_.toOutboundAdapterCallContext).orNull, bankId, accountId)
|
||||
logger.debug(s"StoredProcedureConnector_vDec2019.checkBankAccountExists.req : $req")
|
||||
val response: Future[Box[InBound]] = sendRequest[InBound]("obp_check_bank_account_exists", req, callContext)
|
||||
response.map(convertToTuple[BankAccountCommons](callContext))
|
||||
}
|
||||
@ -6739,8 +6775,8 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
response.map(convertToTuple[Boolean](callContext))
|
||||
}
|
||||
|
||||
// ---------- created on 2024-07-30T13:47:52Z
|
||||
//---------------- dynamic end ---------------------please don't modify this line
|
||||
// ---------- created on 2024-08-07T12:43:02Z
|
||||
//---------------- dynamic end ---------------------please don't modify this line
|
||||
|
||||
private val availableOperation = DynamicEntityOperation.values.map(it => s""""$it"""").mkString("[", ", ", "]")
|
||||
|
||||
|
||||
@ -1431,6 +1431,9 @@ case class InBoundGetChallengesByTransactionRequestId(inboundAdapterCallContext:
|
||||
case class OutBoundGetChallengesByConsentId(outboundAdapterCallContext: OutboundAdapterCallContext, consentId: String) extends TopicTrait
|
||||
case class InBoundGetChallengesByConsentId(inboundAdapterCallContext: InboundAdapterCallContext, status: Status, data: List[ChallengeCommons]) extends InBoundTrait[List[ChallengeCommons]]
|
||||
|
||||
case class OutBoundGetChallengesByBasketId(outboundAdapterCallContext: OutboundAdapterCallContext, basketId: String) extends TopicTrait
|
||||
case class InBoundGetChallengesByBasketId(inboundAdapterCallContext: InboundAdapterCallContext, status: Status, data: List[ChallengeCommons]) extends InBoundTrait[List[ChallengeCommons]]
|
||||
|
||||
case class OutBoundGetCounterpartyByIbanAndBankAccountId(outboundAdapterCallContext: OutboundAdapterCallContext, iban: String, bankId: BankId, accountId: AccountId) extends TopicTrait
|
||||
case class InBoundGetCounterpartyByIbanAndBankAccountId(inboundAdapterCallContext: InboundAdapterCallContext, status: Status, data: CounterpartyTraitCommons) extends InBoundTrait[CounterpartyTraitCommons]
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user