Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,81 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
val response: Future[Box[InBound]] = sendRequest[InBound]("obp_get_bank_accounts_for_user", req, callContext)
response.map(convertToTuple[List[InboundAccountCommons]](callContext))
}


messageDocs += checkExternalUserCredentialsDoc
def checkExternalUserCredentialsDoc = MessageDoc(
process = "obp.checkExternalUserCredentials",
messageFormat = messageFormat,
description = "Check External User Credentials",
outboundTopic = None,
inboundTopic = None,
exampleOutboundMessage = (
OutBoundCheckExternalUserCredentials(outboundAdapterCallContext=MessageDocsSwaggerDefinitions.outboundAdapterCallContext,
username=usernameExample.value,
password=passwordExample.value)
),
exampleInboundMessage = (
InBoundCheckExternalUserCredentials(inboundAdapterCallContext=MessageDocsSwaggerDefinitions.inboundAdapterCallContext,
status=MessageDocsSwaggerDefinitions.inboundStatus,
data= InboundExternalUser(aud=audExample.value,
exp=expExample.value,
iat=iatExample.value,
iss=issExample.value,
sub=subExample.value,
azp=Some("string"),
email=Some(emailExample.value),
emailVerified=Some(emailVerifiedExample.value),
name=Some(userNameExample.value),
userAuthContext=Some(List( BasicUserAuthContext(key=keyExample.value,
value=valueExample.value)))))
),
adapterImplementation = Some(AdapterImplementation("- Core", 1))
)

override def checkExternalUserCredentials(username: String, password: String, callContext: Option[CallContext]): Box[InboundExternalUser] = {
import com.openbankproject.commons.dto.{InBoundCheckExternalUserCredentials => InBound, OutBoundCheckExternalUserCredentials => OutBound}
val req = OutBound(callContext.map(_.toOutboundAdapterCallContext).orNull, username, password)
val response: Future[Box[InBound]] = sendRequest[InBound]("obp_check_external_user_credentials", req, callContext)
response.map(convertToTuple[InboundExternalUser](callContext))
}

messageDocs += checkExternalUserExistsDoc
def checkExternalUserExistsDoc = MessageDoc(
process = "obp.checkExternalUserExists",
messageFormat = messageFormat,
description = "Check External User Exists",
outboundTopic = None,
inboundTopic = None,
exampleOutboundMessage = (
OutBoundCheckExternalUserExists(outboundAdapterCallContext=MessageDocsSwaggerDefinitions.outboundAdapterCallContext,
username=usernameExample.value)
),
exampleInboundMessage = (
InBoundCheckExternalUserExists(inboundAdapterCallContext=MessageDocsSwaggerDefinitions.inboundAdapterCallContext,
status=MessageDocsSwaggerDefinitions.inboundStatus,
data= InboundExternalUser(aud=audExample.value,
exp=expExample.value,
iat=iatExample.value,
iss=issExample.value,
sub=subExample.value,
azp=Some("string"),
email=Some(emailExample.value),
emailVerified=Some(emailVerifiedExample.value),
name=Some(userNameExample.value),
userAuthContext=Some(List( BasicUserAuthContext(key=keyExample.value,
value=valueExample.value)))))
),
adapterImplementation = Some(AdapterImplementation("- Core", 1))
)

override def checkExternalUserExists(username: String, callContext: Option[CallContext]): Box[InboundExternalUser] = {
import com.openbankproject.commons.dto.{InBoundCheckExternalUserExists => InBound, OutBoundCheckExternalUserExists => OutBound}
val req = OutBound(callContext.map(_.toOutboundAdapterCallContext).orNull, username)
val response: Future[Box[InBound]] = sendRequest[InBound]("obp_check_external_user_exists", req, callContext)
response.map(convertToTuple[InboundExternalUser](callContext))
}

messageDocs += getBankAccountByIbanDoc
def getBankAccountByIbanDoc = MessageDoc(
process = "obp.getBankAccountByIban",
Expand Down Expand Up @@ -3725,6 +3799,37 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
response.map(convertToTuple[List[AtmTCommons]](callContext))
}

messageDocs += getCurrentFxRateDoc
def getCurrentFxRateDoc = MessageDoc(
process = "obp.getCurrentFxRate",
messageFormat = messageFormat,
description = "Get Current Fx Rate",
outboundTopic = None,
inboundTopic = None,
exampleOutboundMessage = (
OutBoundGetCurrentFxRate(outboundAdapterCallContext=MessageDocsSwaggerDefinitions.outboundAdapterCallContext,bankId=BankId(bankIdExample.value),
fromCurrencyCode=fromCurrencyCodeExample.value,
toCurrencyCode=toCurrencyCodeExample.value)
),
exampleInboundMessage = (
InBoundGetCurrentFxRate(inboundAdapterCallContext=MessageDocsSwaggerDefinitions.inboundAdapterCallContext,status=MessageDocsSwaggerDefinitions.inboundStatus,
data= FXRateCommons(bankId=BankId(bankIdExample.value),
fromCurrencyCode=fromCurrencyCodeExample.value,
toCurrencyCode=toCurrencyCodeExample.value,
conversionValue=conversionValueExample.value.toDouble,
inverseConversionValue=inverseConversionValueExample.value.toDouble,
effectiveDate=toDate(effectiveDateExample)))
),
adapterImplementation = Some(AdapterImplementation("- Core", 1))
)

override def getCurrentFxRate(bankId: BankId, fromCurrencyCode: String, toCurrencyCode: String, callContext: Option[CallContext]): Box[FXRate] = {
import com.openbankproject.commons.dto.{InBoundGetCurrentFxRate => InBound, OutBoundGetCurrentFxRate => OutBound}
val req = OutBound(callContext.map(_.toOutboundAdapterCallContext).orNull,bankId, fromCurrencyCode, toCurrencyCode)
val response: Future[Box[InBound]] = sendRequest[InBound]("obp_get_current_fx_rate", req, callContext)
response.map(convertToTuple[FXRateCommons](callContext))
}

messageDocs += createTransactionAfterChallengev300Doc
def createTransactionAfterChallengev300Doc = MessageDoc(
process = "obp.createTransactionAfterChallengev300",
Expand Down