mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 17:17:09 +00:00
refactor/re-generate all the connectors
This commit is contained in:
parent
2da41e6df8
commit
db8685f8bc
@ -23,7 +23,7 @@ import scala.collection.mutable.ArrayBuffer
|
||||
* create ms sql server stored procedure according messageDocs.
|
||||
*/
|
||||
object AdapterStubBuilder {
|
||||
specialMethods// do not delete this line, it is to modify "MappedWebUiPropsProvider"
|
||||
commonMethodNames// do not delete this line, it is to modify "MappedWebUiPropsProvider", to avoid access DB cause dataSource not found exception
|
||||
object StatusSerializer extends Serializer[Status] {
|
||||
|
||||
override def deserialize(implicit format: Formats): PartialFunction[(TypeInfo, JValue), Status] = Functions.doNothing
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -32,6 +32,7 @@ object MSsqlStoredProcedureBuilder {
|
||||
}
|
||||
|
||||
def main(args: Array[String]): Unit = {
|
||||
commonMethodNames// do not delete this line, it is to modify "MappedWebUiPropsProvider", to avoid access DB cause dataSource not found exception
|
||||
// Boot.scala set default TimeZone, So here need also fix the TimeZone to make example Date is a fix value,
|
||||
// not affect by local TimeZone.
|
||||
TimeZone.setDefault(TimeZone.getTimeZone("UTC"))
|
||||
@ -49,6 +50,10 @@ object MSsqlStoredProcedureBuilder {
|
||||
val path = new File(getClass.getResource("").toURI.toString.replaceFirst("target/.*", "").replace("file:", ""),
|
||||
"src/main/scala/code/bankconnectors/storedprocedure/MSsqlStoredProcedure.sql")
|
||||
val source = FileUtils.write(path, procedureNameToInbound, "utf-8")
|
||||
|
||||
|
||||
// After generatin the code, then exit
|
||||
sys.exit(0)
|
||||
}
|
||||
|
||||
def buildProcedure(processName: String, outBoundExample: String, inBoundExample: String) = {
|
||||
@ -80,4 +85,6 @@ object MSsqlStoredProcedureBuilder {
|
||||
|""".stripMargin
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -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-09-20T12:17:12Z
|
||||
// ---------- created on 2024-10-30T11:51:31Z
|
||||
|
||||
messageDocs += getAdapterInfoDoc
|
||||
def getAdapterInfoDoc = MessageDoc(
|
||||
@ -298,7 +298,7 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
OutBoundCreateChallenges(outboundAdapterCallContext=MessageDocsSwaggerDefinitions.outboundAdapterCallContext,
|
||||
bankId=BankId(bankIdExample.value),
|
||||
accountId=AccountId(accountIdExample.value),
|
||||
userIds=listExample.value.split("[,;]").toList,
|
||||
userIds=listExample.value.replace("[","").replace("]","").split(",").toList,
|
||||
transactionRequestType=TransactionRequestType(transactionRequestTypeExample.value),
|
||||
transactionRequestId=transactionRequestIdExample.value,
|
||||
scaMethod=Some(com.openbankproject.commons.model.enums.StrongCustomerAuthentication.SMS))
|
||||
@ -306,7 +306,7 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
exampleInboundMessage = (
|
||||
InBoundCreateChallenges(inboundAdapterCallContext=MessageDocsSwaggerDefinitions.inboundAdapterCallContext,
|
||||
status=MessageDocsSwaggerDefinitions.inboundStatus,
|
||||
data=listExample.value.split("[,;]").toList)
|
||||
data=listExample.value.replace("[","").replace("]","").split(",").toList)
|
||||
),
|
||||
adapterImplementation = Some(AdapterImplementation("- Core", 1))
|
||||
)
|
||||
@ -327,7 +327,7 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
inboundTopic = None,
|
||||
exampleOutboundMessage = (
|
||||
OutBoundCreateChallengesC2(outboundAdapterCallContext=MessageDocsSwaggerDefinitions.outboundAdapterCallContext,
|
||||
userIds=listExample.value.split("[,;]").toList,
|
||||
userIds=listExample.value.replace("[","").replace("]","").split(",").toList,
|
||||
challengeType=com.openbankproject.commons.model.enums.ChallengeType.example,
|
||||
transactionRequestId=Some(transactionRequestIdExample.value),
|
||||
scaMethod=Some(com.openbankproject.commons.model.enums.StrongCustomerAuthentication.SMS),
|
||||
@ -371,7 +371,7 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
inboundTopic = None,
|
||||
exampleOutboundMessage = (
|
||||
OutBoundCreateChallengesC3(outboundAdapterCallContext=MessageDocsSwaggerDefinitions.outboundAdapterCallContext,
|
||||
userIds=listExample.value.split("[,;]").toList,
|
||||
userIds=listExample.value.replace("[","").replace("]","").split(",").toList,
|
||||
challengeType=com.openbankproject.commons.model.enums.ChallengeType.example,
|
||||
transactionRequestId=Some(transactionRequestIdExample.value),
|
||||
scaMethod=Some(com.openbankproject.commons.model.enums.StrongCustomerAuthentication.SMS),
|
||||
@ -871,8 +871,8 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
accountType=accountTypeExample.value,
|
||||
balanceAmount=balanceAmountExample.value,
|
||||
balanceCurrency=balanceCurrencyExample.value,
|
||||
owners=inboundAccountOwnersExample.value.split("[,;]").toList,
|
||||
viewsToGenerate=inboundAccountViewsToGenerateExample.value.split("[,;]").toList,
|
||||
owners=inboundAccountOwnersExample.value.replace("[","").replace("]","").split(",").toList,
|
||||
viewsToGenerate=inboundAccountViewsToGenerateExample.value.replace("[","").replace("]","").split(",").toList,
|
||||
bankRoutingScheme=bankRoutingSchemeExample.value,
|
||||
bankRoutingAddress=bankRoutingAddressExample.value,
|
||||
branchRoutingScheme=branchRoutingSchemeExample.value,
|
||||
@ -889,81 +889,7 @@ 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",
|
||||
@ -1726,7 +1652,8 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
lastMarketingAgreementSignedDate=Some(toDate(dateExample))))
|
||||
),
|
||||
exampleInboundMessage = (
|
||||
InBoundGetPhysicalCardsForUser(inboundAdapterCallContext=MessageDocsSwaggerDefinitions.inboundAdapterCallContext, status=MessageDocsSwaggerDefinitions.inboundStatus,
|
||||
InBoundGetPhysicalCardsForUser(inboundAdapterCallContext=MessageDocsSwaggerDefinitions.inboundAdapterCallContext,
|
||||
status=MessageDocsSwaggerDefinitions.inboundStatus,
|
||||
data=List( PhysicalCard(cardId=cardIdExample.value,
|
||||
bankId=bankIdExample.value,
|
||||
bankCardNumber=bankCardNumberExample.value,
|
||||
@ -1740,7 +1667,7 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
cancelled=cancelledExample.value.toBoolean,
|
||||
onHotList=onHotListExample.value.toBoolean,
|
||||
technology=technologyExample.value,
|
||||
networks=networksExample.value.split("[,;]").toList,
|
||||
networks=networksExample.value.replace("[","").replace("]","").split(",").toList,
|
||||
allows=List(com.openbankproject.commons.model.CardAction.DEBIT),
|
||||
account= BankAccountCommons(accountId=AccountId(accountIdExample.value),
|
||||
accountType=accountTypeExample.value,
|
||||
@ -1808,7 +1735,7 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
cancelled=cancelledExample.value.toBoolean,
|
||||
onHotList=onHotListExample.value.toBoolean,
|
||||
technology=technologyExample.value,
|
||||
networks=networksExample.value.split("[,;]").toList,
|
||||
networks=networksExample.value.replace("[","").replace("]","").split(",").toList,
|
||||
allows=List(com.openbankproject.commons.model.CardAction.DEBIT),
|
||||
account= BankAccountCommons(accountId=AccountId(accountIdExample.value),
|
||||
accountType=accountTypeExample.value,
|
||||
@ -1924,7 +1851,7 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
cancelled=cancelledExample.value.toBoolean,
|
||||
onHotList=onHotListExample.value.toBoolean,
|
||||
technology=technologyExample.value,
|
||||
networks=networksExample.value.split("[,;]").toList,
|
||||
networks=networksExample.value.replace("[","").replace("]","").split(",").toList,
|
||||
allows=List(com.openbankproject.commons.model.CardAction.DEBIT),
|
||||
account= BankAccountCommons(accountId=AccountId(accountIdExample.value),
|
||||
accountType=accountTypeExample.value,
|
||||
@ -1984,8 +1911,8 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
cancelled=cancelledExample.value.toBoolean,
|
||||
onHotList=onHotListExample.value.toBoolean,
|
||||
technology=technologyExample.value,
|
||||
networks=networksExample.value.split("[,;]").toList,
|
||||
allows=allowsExample.value.split("[,;]").toList,
|
||||
networks=networksExample.value.replace("[","").replace("]","").split(",").toList,
|
||||
allows=allowsExample.value.replace("[","").replace("]","").split(",").toList,
|
||||
accountId=accountIdExample.value,
|
||||
bankId=bankIdExample.value,
|
||||
replacement=Some( CardReplacementInfo(requestedDate=toDate(requestedDateExample),
|
||||
@ -2014,7 +1941,7 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
cancelled=cancelledExample.value.toBoolean,
|
||||
onHotList=onHotListExample.value.toBoolean,
|
||||
technology=technologyExample.value,
|
||||
networks=networksExample.value.split("[,;]").toList,
|
||||
networks=networksExample.value.replace("[","").replace("]","").split(",").toList,
|
||||
allows=List(com.openbankproject.commons.model.CardAction.DEBIT),
|
||||
account= BankAccountCommons(accountId=AccountId(accountIdExample.value),
|
||||
accountType=accountTypeExample.value,
|
||||
@ -2075,8 +2002,8 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
cancelled=cancelledExample.value.toBoolean,
|
||||
onHotList=onHotListExample.value.toBoolean,
|
||||
technology=technologyExample.value,
|
||||
networks=networksExample.value.split("[,;]").toList,
|
||||
allows=allowsExample.value.split("[,;]").toList,
|
||||
networks=networksExample.value.replace("[","").replace("]","").split(",").toList,
|
||||
allows=allowsExample.value.replace("[","").replace("]","").split(",").toList,
|
||||
accountId=accountIdExample.value,
|
||||
bankId=bankIdExample.value,
|
||||
replacement=Some( CardReplacementInfo(requestedDate=toDate(requestedDateExample),
|
||||
@ -2103,7 +2030,7 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
cancelled=cancelledExample.value.toBoolean,
|
||||
onHotList=onHotListExample.value.toBoolean,
|
||||
technology=technologyExample.value,
|
||||
networks=networksExample.value.split("[,;]").toList,
|
||||
networks=networksExample.value.replace("[","").replace("]","").split(",").toList,
|
||||
allows=List(com.openbankproject.commons.model.CardAction.DEBIT),
|
||||
account= BankAccountCommons(accountId=AccountId(accountIdExample.value),
|
||||
accountType=accountTypeExample.value,
|
||||
@ -2212,6 +2139,33 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
response.map(convertToTuple[TransactionId](callContext))
|
||||
}
|
||||
|
||||
messageDocs += getChargeValueDoc
|
||||
def getChargeValueDoc = MessageDoc(
|
||||
process = "obp.getChargeValue",
|
||||
messageFormat = messageFormat,
|
||||
description = "Get Charge Value",
|
||||
outboundTopic = None,
|
||||
inboundTopic = None,
|
||||
exampleOutboundMessage = (
|
||||
OutBoundGetChargeValue(outboundAdapterCallContext=MessageDocsSwaggerDefinitions.outboundAdapterCallContext,
|
||||
chargeLevelAmount=BigDecimal("123.321"),
|
||||
transactionRequestCommonBodyAmount=BigDecimal("123.321"))
|
||||
),
|
||||
exampleInboundMessage = (
|
||||
InBoundGetChargeValue(inboundAdapterCallContext=MessageDocsSwaggerDefinitions.inboundAdapterCallContext,
|
||||
status=MessageDocsSwaggerDefinitions.inboundStatus,
|
||||
data="string")
|
||||
),
|
||||
adapterImplementation = Some(AdapterImplementation("- Core", 1))
|
||||
)
|
||||
|
||||
override def getChargeValue(chargeLevelAmount: BigDecimal, transactionRequestCommonBodyAmount: BigDecimal, callContext: Option[CallContext]): OBPReturnType[Box[String]] = {
|
||||
import com.openbankproject.commons.dto.{InBoundGetChargeValue => InBound, OutBoundGetChargeValue => OutBound}
|
||||
val req = OutBound(callContext.map(_.toOutboundAdapterCallContext).orNull, chargeLevelAmount, transactionRequestCommonBodyAmount)
|
||||
val response: Future[Box[InBound]] = sendRequest[InBound]("obp_get_charge_value", req, callContext)
|
||||
response.map(convertToTuple[String](callContext))
|
||||
}
|
||||
|
||||
messageDocs += createTransactionRequestv210Doc
|
||||
def createTransactionRequestv210Doc = MessageDoc(
|
||||
process = "obp.createTransactionRequestv210",
|
||||
@ -2668,6 +2622,89 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
response.map(convertToTuple[TransactionRequestBGV1](callContext))
|
||||
}
|
||||
|
||||
messageDocs += saveTransactionRequestTransactionDoc
|
||||
def saveTransactionRequestTransactionDoc = MessageDoc(
|
||||
process = "obp.saveTransactionRequestTransaction",
|
||||
messageFormat = messageFormat,
|
||||
description = "Save Transaction Request Transaction",
|
||||
outboundTopic = None,
|
||||
inboundTopic = None,
|
||||
exampleOutboundMessage = (
|
||||
OutBoundSaveTransactionRequestTransaction(outboundAdapterCallContext=MessageDocsSwaggerDefinitions.outboundAdapterCallContext,
|
||||
transactionRequestId=TransactionRequestId(transactionRequestIdExample.value),
|
||||
transactionId=TransactionId(transactionIdExample.value))
|
||||
),
|
||||
exampleInboundMessage = (
|
||||
InBoundSaveTransactionRequestTransaction(inboundAdapterCallContext=MessageDocsSwaggerDefinitions.inboundAdapterCallContext,
|
||||
status=MessageDocsSwaggerDefinitions.inboundStatus,
|
||||
data=true)
|
||||
),
|
||||
adapterImplementation = Some(AdapterImplementation("- Core", 1))
|
||||
)
|
||||
|
||||
override def saveTransactionRequestTransaction(transactionRequestId: TransactionRequestId, transactionId: TransactionId, callContext: Option[CallContext]): OBPReturnType[Box[Boolean]] = {
|
||||
import com.openbankproject.commons.dto.{InBoundSaveTransactionRequestTransaction => InBound, OutBoundSaveTransactionRequestTransaction => OutBound}
|
||||
val req = OutBound(callContext.map(_.toOutboundAdapterCallContext).orNull, transactionRequestId, transactionId)
|
||||
val response: Future[Box[InBound]] = sendRequest[InBound]("obp_save_transaction_request_transaction", req, callContext)
|
||||
response.map(convertToTuple[Boolean](callContext))
|
||||
}
|
||||
|
||||
messageDocs += saveTransactionRequestChallengeDoc
|
||||
def saveTransactionRequestChallengeDoc = MessageDoc(
|
||||
process = "obp.saveTransactionRequestChallenge",
|
||||
messageFormat = messageFormat,
|
||||
description = "Save Transaction Request Challenge",
|
||||
outboundTopic = None,
|
||||
inboundTopic = None,
|
||||
exampleOutboundMessage = (
|
||||
OutBoundSaveTransactionRequestChallenge(outboundAdapterCallContext=MessageDocsSwaggerDefinitions.outboundAdapterCallContext,
|
||||
transactionRequestId=TransactionRequestId(transactionRequestIdExample.value),
|
||||
challenge= TransactionRequestChallenge(id=challengeIdExample.value,
|
||||
allowed_attempts=123,
|
||||
challenge_type="string"))
|
||||
),
|
||||
exampleInboundMessage = (
|
||||
InBoundSaveTransactionRequestChallenge(inboundAdapterCallContext=MessageDocsSwaggerDefinitions.inboundAdapterCallContext,
|
||||
status=MessageDocsSwaggerDefinitions.inboundStatus,
|
||||
data=true)
|
||||
),
|
||||
adapterImplementation = Some(AdapterImplementation("- Core", 1))
|
||||
)
|
||||
|
||||
override def saveTransactionRequestChallenge(transactionRequestId: TransactionRequestId, challenge: TransactionRequestChallenge, callContext: Option[CallContext]): OBPReturnType[Box[Boolean]] = {
|
||||
import com.openbankproject.commons.dto.{InBoundSaveTransactionRequestChallenge => InBound, OutBoundSaveTransactionRequestChallenge => OutBound}
|
||||
val req = OutBound(callContext.map(_.toOutboundAdapterCallContext).orNull, transactionRequestId, challenge)
|
||||
val response: Future[Box[InBound]] = sendRequest[InBound]("obp_save_transaction_request_challenge", req, callContext)
|
||||
response.map(convertToTuple[Boolean](callContext))
|
||||
}
|
||||
|
||||
messageDocs += saveTransactionRequestStatusImplDoc
|
||||
def saveTransactionRequestStatusImplDoc = MessageDoc(
|
||||
process = "obp.saveTransactionRequestStatusImpl",
|
||||
messageFormat = messageFormat,
|
||||
description = "Save Transaction Request Status Impl",
|
||||
outboundTopic = None,
|
||||
inboundTopic = None,
|
||||
exampleOutboundMessage = (
|
||||
OutBoundSaveTransactionRequestStatusImpl(outboundAdapterCallContext=MessageDocsSwaggerDefinitions.outboundAdapterCallContext,
|
||||
transactionRequestId=TransactionRequestId(transactionRequestIdExample.value),
|
||||
status=statusExample.value)
|
||||
),
|
||||
exampleInboundMessage = (
|
||||
InBoundSaveTransactionRequestStatusImpl(inboundAdapterCallContext=MessageDocsSwaggerDefinitions.inboundAdapterCallContext,
|
||||
status=MessageDocsSwaggerDefinitions.inboundStatus,
|
||||
data=true)
|
||||
),
|
||||
adapterImplementation = Some(AdapterImplementation("- Core", 1))
|
||||
)
|
||||
|
||||
override def saveTransactionRequestStatusImpl(transactionRequestId: TransactionRequestId, status: String, callContext: Option[CallContext]): OBPReturnType[Box[Boolean]] = {
|
||||
import com.openbankproject.commons.dto.{InBoundSaveTransactionRequestStatusImpl => InBound, OutBoundSaveTransactionRequestStatusImpl => OutBound}
|
||||
val req = OutBound(callContext.map(_.toOutboundAdapterCallContext).orNull, transactionRequestId, status)
|
||||
val response: Future[Box[InBound]] = sendRequest[InBound]("obp_save_transaction_request_status_impl", req, callContext)
|
||||
response.map(convertToTuple[Boolean](callContext))
|
||||
}
|
||||
|
||||
messageDocs += getTransactionRequests210Doc
|
||||
def getTransactionRequests210Doc = MessageDoc(
|
||||
process = "obp.getTransactionRequests210",
|
||||
@ -2903,6 +2940,59 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
response.map(convertToTuple[TransactionRequest](callContext))
|
||||
}
|
||||
|
||||
messageDocs += getTransactionRequestTypesDoc
|
||||
def getTransactionRequestTypesDoc = MessageDoc(
|
||||
process = "obp.getTransactionRequestTypes",
|
||||
messageFormat = messageFormat,
|
||||
description = "Get Transaction Request Types",
|
||||
outboundTopic = None,
|
||||
inboundTopic = None,
|
||||
exampleOutboundMessage = (
|
||||
OutBoundGetTransactionRequestTypes(outboundAdapterCallContext=MessageDocsSwaggerDefinitions.outboundAdapterCallContext,
|
||||
initiator= UserCommons(userPrimaryKey=UserPrimaryKey(123),
|
||||
userId=userIdExample.value,
|
||||
idGivenByProvider="string",
|
||||
provider=providerExample.value,
|
||||
emailAddress=emailAddressExample.value,
|
||||
name=userNameExample.value,
|
||||
createdByConsentId=Some("string"),
|
||||
createdByUserInvitationId=Some("string"),
|
||||
isDeleted=Some(true),
|
||||
lastMarketingAgreementSignedDate=Some(toDate(dateExample))),
|
||||
fromAccount= BankAccountCommons(accountId=AccountId(accountIdExample.value),
|
||||
accountType=accountTypeExample.value,
|
||||
balance=BigDecimal(balanceExample.value),
|
||||
currency=currencyExample.value,
|
||||
name=bankAccountNameExample.value,
|
||||
label=labelExample.value,
|
||||
number=bankAccountNumberExample.value,
|
||||
bankId=BankId(bankIdExample.value),
|
||||
lastUpdate=toDate(bankAccountLastUpdateExample),
|
||||
branchId=branchIdExample.value,
|
||||
accountRoutings=List( AccountRouting(scheme=accountRoutingSchemeExample.value,
|
||||
address=accountRoutingAddressExample.value)),
|
||||
accountRules=List( AccountRule(scheme=accountRuleSchemeExample.value,
|
||||
value=accountRuleValueExample.value)),
|
||||
accountHolder=bankAccountAccountHolderExample.value,
|
||||
attributes=Some(List( Attribute(name=attributeNameExample.value,
|
||||
`type`=attributeTypeExample.value,
|
||||
value=attributeValueExample.value)))))
|
||||
),
|
||||
exampleInboundMessage = (
|
||||
InBoundGetTransactionRequestTypes(inboundAdapterCallContext=MessageDocsSwaggerDefinitions.inboundAdapterCallContext,
|
||||
status=MessageDocsSwaggerDefinitions.inboundStatus,
|
||||
data=List(TransactionRequestType(transactionRequestTypeExample.value)))
|
||||
),
|
||||
adapterImplementation = Some(AdapterImplementation("- Core", 1))
|
||||
)
|
||||
|
||||
override def getTransactionRequestTypes(initiator: User, fromAccount: BankAccount, callContext: Option[CallContext]): Box[(List[TransactionRequestType], Option[CallContext])] = {
|
||||
import com.openbankproject.commons.dto.{InBoundGetTransactionRequestTypes => InBound, OutBoundGetTransactionRequestTypes => OutBound}
|
||||
val req = OutBound(callContext.map(_.toOutboundAdapterCallContext).orNull, initiator, fromAccount)
|
||||
val response: Future[Box[InBound]] = sendRequest[InBound]("obp_get_transaction_request_types", req, callContext)
|
||||
response.map(convertToTuple[List[TransactionRequestType]](callContext))
|
||||
}
|
||||
|
||||
messageDocs += createTransactionAfterChallengeV210Doc
|
||||
def createTransactionAfterChallengeV210Doc = MessageDoc(
|
||||
process = "obp.createTransactionAfterChallengeV210",
|
||||
@ -3203,7 +3293,34 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
val response: Future[Box[InBound]] = sendRequest[InBound]("obp_create_bank_account", req, callContext)
|
||||
response.map(convertToTuple[BankAccountCommons](callContext))
|
||||
}
|
||||
|
||||
messageDocs += updateAccountLabelDoc
|
||||
def updateAccountLabelDoc = MessageDoc(
|
||||
process = "obp.updateAccountLabel",
|
||||
messageFormat = messageFormat,
|
||||
description = "Update Account Label",
|
||||
outboundTopic = None,
|
||||
inboundTopic = None,
|
||||
exampleOutboundMessage = (
|
||||
OutBoundUpdateAccountLabel(outboundAdapterCallContext=MessageDocsSwaggerDefinitions.outboundAdapterCallContext,
|
||||
bankId=BankId(bankIdExample.value),
|
||||
accountId=AccountId(accountIdExample.value),
|
||||
label=labelExample.value)
|
||||
),
|
||||
exampleInboundMessage = (
|
||||
InBoundUpdateAccountLabel(inboundAdapterCallContext=MessageDocsSwaggerDefinitions.inboundAdapterCallContext,
|
||||
status=MessageDocsSwaggerDefinitions.inboundStatus,
|
||||
data=true)
|
||||
),
|
||||
adapterImplementation = Some(AdapterImplementation("- Core", 1))
|
||||
)
|
||||
|
||||
override def updateAccountLabel(bankId: BankId, accountId: AccountId, label: String, callContext: Option[CallContext]): OBPReturnType[Box[Boolean]] = {
|
||||
import com.openbankproject.commons.dto.{InBoundUpdateAccountLabel => InBound, OutBoundUpdateAccountLabel => OutBound}
|
||||
val req = OutBound(callContext.map(_.toOutboundAdapterCallContext).orNull, bankId, accountId, label)
|
||||
val response: Future[Box[InBound]] = sendRequest[InBound]("obp_update_account_label", req, callContext)
|
||||
response.map(convertToTuple[Boolean](callContext))
|
||||
}
|
||||
|
||||
messageDocs += getProductsDoc
|
||||
def getProductsDoc = MessageDoc(
|
||||
@ -3213,12 +3330,14 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
outboundTopic = None,
|
||||
inboundTopic = None,
|
||||
exampleOutboundMessage = (
|
||||
OutBoundGetProducts(outboundAdapterCallContext=MessageDocsSwaggerDefinitions.outboundAdapterCallContext,bankId=BankId(bankIdExample.value),
|
||||
OutBoundGetProducts(outboundAdapterCallContext=MessageDocsSwaggerDefinitions.outboundAdapterCallContext,
|
||||
bankId=BankId(bankIdExample.value),
|
||||
params=List( GetProductsParam(name=nameExample.value,
|
||||
value=valueExample.value.split("[,;]").toList)))
|
||||
value=valueExample.value.replace("[","").replace("]","").split(",").toList)))
|
||||
),
|
||||
exampleInboundMessage = (
|
||||
InBoundGetProducts(inboundAdapterCallContext=MessageDocsSwaggerDefinitions.inboundAdapterCallContext, status=MessageDocsSwaggerDefinitions.inboundStatus,
|
||||
InBoundGetProducts(inboundAdapterCallContext=MessageDocsSwaggerDefinitions.inboundAdapterCallContext,
|
||||
status=MessageDocsSwaggerDefinitions.inboundStatus,
|
||||
data=List( ProductCommons(bankId=BankId(bankIdExample.value),
|
||||
code=ProductCode(productCodeExample.value),
|
||||
parentProductCode=ProductCode(parentProductCodeExample.value),
|
||||
@ -3238,7 +3357,7 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
|
||||
override def getProducts(bankId: BankId, params: List[GetProductsParam], callContext: Option[CallContext]): OBPReturnType[Box[List[Product]]] = {
|
||||
import com.openbankproject.commons.dto.{InBoundGetProducts => InBound, OutBoundGetProducts => OutBound}
|
||||
val req = OutBound(callContext.map(_.toOutboundAdapterCallContext).orNull,bankId, params)
|
||||
val req = OutBound(callContext.map(_.toOutboundAdapterCallContext).orNull, bankId, params)
|
||||
val response: Future[Box[InBound]] = sendRequest[InBound]("obp_get_products", req, callContext)
|
||||
response.map(convertToTuple[List[ProductCommons]](callContext))
|
||||
}
|
||||
@ -3251,11 +3370,13 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
outboundTopic = None,
|
||||
inboundTopic = None,
|
||||
exampleOutboundMessage = (
|
||||
OutBoundGetProduct(outboundAdapterCallContext=MessageDocsSwaggerDefinitions.outboundAdapterCallContext, bankId=BankId(bankIdExample.value),
|
||||
OutBoundGetProduct(outboundAdapterCallContext=MessageDocsSwaggerDefinitions.outboundAdapterCallContext,
|
||||
bankId=BankId(bankIdExample.value),
|
||||
productCode=ProductCode(productCodeExample.value))
|
||||
),
|
||||
exampleInboundMessage = (
|
||||
InBoundGetProduct(inboundAdapterCallContext=MessageDocsSwaggerDefinitions.inboundAdapterCallContext, status=MessageDocsSwaggerDefinitions.inboundStatus,
|
||||
InBoundGetProduct(inboundAdapterCallContext=MessageDocsSwaggerDefinitions.inboundAdapterCallContext,
|
||||
status=MessageDocsSwaggerDefinitions.inboundStatus,
|
||||
data= ProductCommons(bankId=BankId(bankIdExample.value),
|
||||
code=ProductCode(productCodeExample.value),
|
||||
parentProductCode=ProductCode(parentProductCodeExample.value),
|
||||
@ -3275,7 +3396,7 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
|
||||
override def getProduct(bankId: BankId, productCode: ProductCode, callContext: Option[CallContext]): OBPReturnType[Box[Product]] = {
|
||||
import com.openbankproject.commons.dto.{InBoundGetProduct => InBound, OutBoundGetProduct => OutBound}
|
||||
val req = OutBound(callContext.map(_.toOutboundAdapterCallContext).orNull,bankId, productCode)
|
||||
val req = OutBound(callContext.map(_.toOutboundAdapterCallContext).orNull, bankId, productCode)
|
||||
val response: Future[Box[InBound]] = sendRequest[InBound]("obp_get_product", req, callContext)
|
||||
response.map(convertToTuple[ProductCommons](callContext))
|
||||
}
|
||||
@ -3501,12 +3622,12 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
locatedAt=Some(locatedAtExample.value),
|
||||
moreInfo=Some(moreInfoExample.value),
|
||||
hasDepositCapability=Some(hasDepositCapabilityExample.value.toBoolean),
|
||||
supportedLanguages=Some(supportedLanguagesExample.value.split("[,;]").toList),
|
||||
services=Some(listExample.value.split("[,;]").toList),
|
||||
accessibilityFeatures=Some(accessibilityFeaturesExample.value.split("[,;]").toList),
|
||||
supportedCurrencies=Some(supportedCurrenciesExample.value.split("[,;]").toList),
|
||||
notes=Some(listExample.value.split("[,;]").toList),
|
||||
locationCategories=Some(listExample.value.split("[,;]").toList),
|
||||
supportedLanguages=Some(supportedLanguagesExample.value.replace("[","").replace("]","").split(",").toList),
|
||||
services=Some(listExample.value.replace("[","").replace("]","").split(",").toList),
|
||||
accessibilityFeatures=Some(accessibilityFeaturesExample.value.replace("[","").replace("]","").split(",").toList),
|
||||
supportedCurrencies=Some(supportedCurrenciesExample.value.replace("[","").replace("]","").split(",").toList),
|
||||
notes=Some(listExample.value.replace("[","").replace("]","").split(",").toList),
|
||||
locationCategories=Some(listExample.value.replace("[","").replace("]","").split(",").toList),
|
||||
minimumWithdrawal=Some("string"),
|
||||
branchIdentification=Some("string"),
|
||||
siteIdentification=Some(siteIdentification.value),
|
||||
@ -3582,12 +3703,12 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
locatedAt=Some(locatedAtExample.value),
|
||||
moreInfo=Some(moreInfoExample.value),
|
||||
hasDepositCapability=Some(hasDepositCapabilityExample.value.toBoolean),
|
||||
supportedLanguages=Some(supportedLanguagesExample.value.split("[,;]").toList),
|
||||
services=Some(listExample.value.split("[,;]").toList),
|
||||
accessibilityFeatures=Some(accessibilityFeaturesExample.value.split("[,;]").toList),
|
||||
supportedCurrencies=Some(supportedCurrenciesExample.value.split("[,;]").toList),
|
||||
notes=Some(listExample.value.split("[,;]").toList),
|
||||
locationCategories=Some(listExample.value.split("[,;]").toList),
|
||||
supportedLanguages=Some(supportedLanguagesExample.value.replace("[","").replace("]","").split(",").toList),
|
||||
services=Some(listExample.value.replace("[","").replace("]","").split(",").toList),
|
||||
accessibilityFeatures=Some(accessibilityFeaturesExample.value.replace("[","").replace("]","").split(",").toList),
|
||||
supportedCurrencies=Some(supportedCurrenciesExample.value.replace("[","").replace("]","").split(",").toList),
|
||||
notes=Some(listExample.value.replace("[","").replace("]","").split(",").toList),
|
||||
locationCategories=Some(listExample.value.replace("[","").replace("]","").split(",").toList),
|
||||
minimumWithdrawal=Some("string"),
|
||||
branchIdentification=Some("string"),
|
||||
siteIdentification=Some(siteIdentification.value),
|
||||
@ -3608,37 +3729,6 @@ 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",
|
||||
@ -4178,6 +4268,39 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
response.map(convertToTuple[CancelPayment](callContext))
|
||||
}
|
||||
|
||||
messageDocs += getTransactionRequestTypeChargesDoc
|
||||
def getTransactionRequestTypeChargesDoc = MessageDoc(
|
||||
process = "obp.getTransactionRequestTypeCharges",
|
||||
messageFormat = messageFormat,
|
||||
description = "Get Transaction Request Type Charges",
|
||||
outboundTopic = None,
|
||||
inboundTopic = None,
|
||||
exampleOutboundMessage = (
|
||||
OutBoundGetTransactionRequestTypeCharges(outboundAdapterCallContext=MessageDocsSwaggerDefinitions.outboundAdapterCallContext,
|
||||
bankId=BankId(bankIdExample.value),
|
||||
accountId=AccountId(accountIdExample.value),
|
||||
viewId=ViewId(viewIdExample.value),
|
||||
transactionRequestTypes=List(TransactionRequestType(transactionRequestTypesExample.value)))
|
||||
),
|
||||
exampleInboundMessage = (
|
||||
InBoundGetTransactionRequestTypeCharges(inboundAdapterCallContext=MessageDocsSwaggerDefinitions.inboundAdapterCallContext,
|
||||
status=MessageDocsSwaggerDefinitions.inboundStatus,
|
||||
data=List( TransactionRequestTypeChargeCommons(transactionRequestTypeId="string",
|
||||
bankId=bankIdExample.value,
|
||||
chargeCurrency="string",
|
||||
chargeAmount="string",
|
||||
chargeSummary="string")))
|
||||
),
|
||||
adapterImplementation = Some(AdapterImplementation("- Core", 1))
|
||||
)
|
||||
|
||||
override def getTransactionRequestTypeCharges(bankId: BankId, accountId: AccountId, viewId: ViewId, transactionRequestTypes: List[TransactionRequestType], callContext: Option[CallContext]): OBPReturnType[Box[List[TransactionRequestTypeCharge]]] = {
|
||||
import com.openbankproject.commons.dto.{InBoundGetTransactionRequestTypeCharges => InBound, OutBoundGetTransactionRequestTypeCharges => OutBound}
|
||||
val req = OutBound(callContext.map(_.toOutboundAdapterCallContext).orNull, bankId, accountId, viewId, transactionRequestTypes)
|
||||
val response: Future[Box[InBound]] = sendRequest[InBound]("obp_get_transaction_request_type_charges", req, callContext)
|
||||
response.map(convertToTuple[List[TransactionRequestTypeChargeCommons]](callContext))
|
||||
}
|
||||
|
||||
messageDocs += createCounterpartyDoc
|
||||
def createCounterpartyDoc = MessageDoc(
|
||||
process = "obp.createCounterparty",
|
||||
@ -4284,7 +4407,7 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
dateOfBirth=toDate(dateOfBirthExample),
|
||||
relationshipStatus=relationshipStatusExample.value,
|
||||
dependents=dependentsExample.value.toInt,
|
||||
dobOfDependents=dobOfDependentsExample.value.split("[,;]").map(parseDate).flatMap(_.toSeq).toList,
|
||||
dobOfDependents=dobOfDependentsExample.value.replace("[","").replace("]","").split(",").map(parseDate).flatMap(_.toSeq).toList,
|
||||
highestEducationAttained=highestEducationAttainedExample.value,
|
||||
employmentStatus=employmentStatusExample.value,
|
||||
kycStatus=kycStatusExample.value.toBoolean,
|
||||
@ -4311,7 +4434,7 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
dateOfBirth=toDate(dateOfBirthExample),
|
||||
relationshipStatus=relationshipStatusExample.value,
|
||||
dependents=dependentsExample.value.toInt,
|
||||
dobOfDependents=dobOfDependentsExample.value.split("[,;]").map(parseDate).flatMap(_.toSeq).toList,
|
||||
dobOfDependents=dobOfDependentsExample.value.replace("[","").replace("]","").split(",").map(parseDate).flatMap(_.toSeq).toList,
|
||||
highestEducationAttained=highestEducationAttainedExample.value,
|
||||
employmentStatus=employmentStatusExample.value,
|
||||
creditRating= CreditRating(rating=ratingExample.value,
|
||||
@ -4362,7 +4485,7 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
dateOfBirth=toDate(dateOfBirthExample),
|
||||
relationshipStatus=relationshipStatusExample.value,
|
||||
dependents=dependentsExample.value.toInt,
|
||||
dobOfDependents=dobOfDependentsExample.value.split("[,;]").map(parseDate).flatMap(_.toSeq).toList,
|
||||
dobOfDependents=dobOfDependentsExample.value.replace("[","").replace("]","").split(",").map(parseDate).flatMap(_.toSeq).toList,
|
||||
highestEducationAttained=highestEducationAttainedExample.value,
|
||||
employmentStatus=employmentStatusExample.value,
|
||||
creditRating= CreditRating(rating=ratingExample.value,
|
||||
@ -4414,7 +4537,7 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
dateOfBirth=toDate(dateOfBirthExample),
|
||||
relationshipStatus=relationshipStatusExample.value,
|
||||
dependents=dependentsExample.value.toInt,
|
||||
dobOfDependents=dobOfDependentsExample.value.split("[,;]").map(parseDate).flatMap(_.toSeq).toList,
|
||||
dobOfDependents=dobOfDependentsExample.value.replace("[","").replace("]","").split(",").map(parseDate).flatMap(_.toSeq).toList,
|
||||
highestEducationAttained=highestEducationAttainedExample.value,
|
||||
employmentStatus=employmentStatusExample.value,
|
||||
creditRating= CreditRating(rating=ratingExample.value,
|
||||
@ -4473,7 +4596,7 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
dateOfBirth=toDate(dateOfBirthExample),
|
||||
relationshipStatus=relationshipStatusExample.value,
|
||||
dependents=dependentsExample.value.toInt,
|
||||
dobOfDependents=dobOfDependentsExample.value.split("[,;]").map(parseDate).flatMap(_.toSeq).toList,
|
||||
dobOfDependents=dobOfDependentsExample.value.replace("[","").replace("]","").split(",").map(parseDate).flatMap(_.toSeq).toList,
|
||||
highestEducationAttained=highestEducationAttainedExample.value,
|
||||
employmentStatus=employmentStatusExample.value,
|
||||
creditRating= CreditRating(rating=ratingExample.value,
|
||||
@ -4521,7 +4644,7 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
dateOfBirth=toDate(dateOfBirthExample),
|
||||
relationshipStatus=relationshipStatusExample.value,
|
||||
dependents=dependentsExample.value.toInt,
|
||||
dobOfDependents=dobOfDependentsExample.value.split("[,;]").map(parseDate).flatMap(_.toSeq).toList,
|
||||
dobOfDependents=dobOfDependentsExample.value.replace("[","").replace("]","").split(",").map(parseDate).flatMap(_.toSeq).toList,
|
||||
highestEducationAttained=highestEducationAttainedExample.value,
|
||||
employmentStatus=employmentStatusExample.value,
|
||||
creditRating= CreditRating(rating=ratingExample.value,
|
||||
@ -4569,7 +4692,7 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
dateOfBirth=toDate(dateOfBirthExample),
|
||||
relationshipStatus=relationshipStatusExample.value,
|
||||
dependents=dependentsExample.value.toInt,
|
||||
dobOfDependents=dobOfDependentsExample.value.split("[,;]").map(parseDate).flatMap(_.toSeq).toList,
|
||||
dobOfDependents=dobOfDependentsExample.value.replace("[","").replace("]","").split(",").map(parseDate).flatMap(_.toSeq).toList,
|
||||
highestEducationAttained=highestEducationAttainedExample.value,
|
||||
employmentStatus=employmentStatusExample.value,
|
||||
creditRating= CreditRating(rating=ratingExample.value,
|
||||
@ -4618,7 +4741,7 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
dateOfBirth=toDate(dateOfBirthExample),
|
||||
relationshipStatus=relationshipStatusExample.value,
|
||||
dependents=dependentsExample.value.toInt,
|
||||
dobOfDependents=dobOfDependentsExample.value.split("[,;]").map(parseDate).flatMap(_.toSeq).toList,
|
||||
dobOfDependents=dobOfDependentsExample.value.replace("[","").replace("]","").split(",").map(parseDate).flatMap(_.toSeq).toList,
|
||||
highestEducationAttained=highestEducationAttainedExample.value,
|
||||
employmentStatus=employmentStatusExample.value,
|
||||
creditRating= CreditRating(rating=ratingExample.value,
|
||||
@ -4916,7 +5039,7 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
dateOfBirth=toDate(dateOfBirthExample),
|
||||
relationshipStatus=relationshipStatusExample.value,
|
||||
dependents=dependentsExample.value.toInt,
|
||||
dobOfDependents=dobOfDependentsExample.value.split("[,;]").map(parseDate).flatMap(_.toSeq).toList,
|
||||
dobOfDependents=dobOfDependentsExample.value.replace("[","").replace("]","").split(",").map(parseDate).flatMap(_.toSeq).toList,
|
||||
highestEducationAttained=highestEducationAttainedExample.value,
|
||||
employmentStatus=employmentStatusExample.value,
|
||||
creditRating= CreditRating(rating=ratingExample.value,
|
||||
@ -4965,7 +5088,7 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
dateOfBirth=toDate(dateOfBirthExample),
|
||||
relationshipStatus=relationshipStatusExample.value,
|
||||
dependents=dependentsExample.value.toInt,
|
||||
dobOfDependents=dobOfDependentsExample.value.split("[,;]").map(parseDate).flatMap(_.toSeq).toList,
|
||||
dobOfDependents=dobOfDependentsExample.value.replace("[","").replace("]","").split(",").map(parseDate).flatMap(_.toSeq).toList,
|
||||
highestEducationAttained=highestEducationAttainedExample.value,
|
||||
employmentStatus=employmentStatusExample.value,
|
||||
creditRating= CreditRating(rating=ratingExample.value,
|
||||
@ -5636,7 +5759,7 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
exampleInboundMessage = (
|
||||
InBoundGetCustomerIdsByAttributeNameValues(inboundAdapterCallContext=MessageDocsSwaggerDefinitions.inboundAdapterCallContext,
|
||||
status=MessageDocsSwaggerDefinitions.inboundStatus,
|
||||
data=listExample.value.split("[,;]").toList)
|
||||
data=listExample.value.replace("[","").replace("]","").split(",").toList)
|
||||
),
|
||||
adapterImplementation = Some(AdapterImplementation("- Core", 1))
|
||||
)
|
||||
@ -5668,7 +5791,7 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
dateOfBirth=toDate(dateOfBirthExample),
|
||||
relationshipStatus=relationshipStatusExample.value,
|
||||
dependents=dependentsExample.value.toInt,
|
||||
dobOfDependents=dobOfDependentsExample.value.split("[,;]").map(parseDate).flatMap(_.toSeq).toList,
|
||||
dobOfDependents=dobOfDependentsExample.value.replace("[","").replace("]","").split(",").map(parseDate).flatMap(_.toSeq).toList,
|
||||
highestEducationAttained=highestEducationAttainedExample.value,
|
||||
employmentStatus=employmentStatusExample.value,
|
||||
creditRating= CreditRating(rating=ratingExample.value,
|
||||
@ -5717,7 +5840,7 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
exampleInboundMessage = (
|
||||
InBoundGetTransactionIdsByAttributeNameValues(inboundAdapterCallContext=MessageDocsSwaggerDefinitions.inboundAdapterCallContext,
|
||||
status=MessageDocsSwaggerDefinitions.inboundStatus,
|
||||
data=listExample.value.split("[,;]").toList)
|
||||
data=listExample.value.replace("[","").replace("]","").split(",").toList)
|
||||
),
|
||||
adapterImplementation = Some(AdapterImplementation("- Core", 1))
|
||||
)
|
||||
@ -6026,7 +6149,7 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
exampleOutboundMessage = (
|
||||
OutBoundGetOrCreateProductCollection(outboundAdapterCallContext=MessageDocsSwaggerDefinitions.outboundAdapterCallContext,
|
||||
collectionCode=collectionCodeExample.value,
|
||||
productCodes=listExample.value.split("[,;]").toList)
|
||||
productCodes=listExample.value.replace("[","").replace("]","").split(",").toList)
|
||||
),
|
||||
exampleInboundMessage = (
|
||||
InBoundGetOrCreateProductCollection(inboundAdapterCallContext=MessageDocsSwaggerDefinitions.inboundAdapterCallContext,
|
||||
@ -6081,7 +6204,7 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
exampleOutboundMessage = (
|
||||
OutBoundGetOrCreateProductCollectionItem(outboundAdapterCallContext=MessageDocsSwaggerDefinitions.outboundAdapterCallContext,
|
||||
collectionCode=collectionCodeExample.value,
|
||||
memberProductCodes=listExample.value.split("[,;]").toList)
|
||||
memberProductCodes=listExample.value.replace("[","").replace("]","").split(",").toList)
|
||||
),
|
||||
exampleInboundMessage = (
|
||||
InBoundGetOrCreateProductCollectionItem(inboundAdapterCallContext=MessageDocsSwaggerDefinitions.inboundAdapterCallContext,
|
||||
@ -6830,8 +6953,8 @@ trait StoredProcedureConnector_vDec2019 extends Connector with MdcLoggable {
|
||||
response.map(convertToTuple[Boolean](callContext))
|
||||
}
|
||||
|
||||
// ---------- created on 2024-09-20T12:17:12Z
|
||||
//---------------- dynamic end ---------------------please don't modify this line
|
||||
// ---------- created on 2024-10-30T11:51:31Z
|
||||
//---------------- dynamic end ---------------------please don't modify this line
|
||||
|
||||
private val availableOperation = DynamicEntityOperation.values.map(it => s""""$it"""").mkString("[", ", ", "]")
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -7,20 +7,8 @@ import scala.language.postfixOps
|
||||
|
||||
object KafkaConnectorBuilder extends App {
|
||||
|
||||
val genMethodNames = List(
|
||||
// "getKycChecks",
|
||||
// "getKycDocuments",
|
||||
// "getKycMedias",
|
||||
// "getKycStatuses",
|
||||
// "createOrUpdateKycCheck",
|
||||
// "createOrUpdateKycDocument",
|
||||
// "createOrUpdateKycMedia",
|
||||
// "createOrUpdateKycStatus",
|
||||
// "createCustomer",
|
||||
"createBankAccount",
|
||||
)
|
||||
|
||||
generateMethods(genMethodNames,
|
||||
generateMethods(commonMethodNames,
|
||||
"src/main/scala/code/bankconnectors/vSept2018/KafkaMappedConnector_vSept2018.scala",
|
||||
"processRequest[InBound](req)", true)
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@ import java.util.UUID.randomUUID
|
||||
import code.api.APIFailure
|
||||
import code.api.Constant._
|
||||
import code.api.JSONFactoryGateway.PayloadOfJwtJSON
|
||||
import code.api.ResourceDocs1_4_0.SwaggerDefinitionsJSON
|
||||
import code.api.ResourceDocs1_4_0.{MessageDocsSwaggerDefinitions, SwaggerDefinitionsJSON}
|
||||
import code.api.cache.Caching
|
||||
import code.api.util.APIUtil._
|
||||
import code.api.util.ErrorMessages._
|
||||
@ -62,7 +62,10 @@ import scala.collection.immutable.{List, Nil}
|
||||
import com.openbankproject.commons.ExecutionContext.Implicits.global
|
||||
import com.openbankproject.commons.model.enums.AccountRoutingScheme
|
||||
import com.openbankproject.commons.util.{ApiVersion, RequiredFieldValidation}
|
||||
|
||||
import com.openbankproject.commons.ExecutionContext.Implicits.global
|
||||
import com.openbankproject.commons.dto.{InBoundTrait, _}
|
||||
import com.openbankproject.commons.model.enums.StrongCustomerAuthenticationStatus.SCAStatus
|
||||
import com.openbankproject.commons.model.enums._
|
||||
import scala.concurrent.{Await, Future}
|
||||
import scala.concurrent.duration._
|
||||
import scala.language.postfixOps
|
||||
@ -3003,789 +3006,62 @@ trait KafkaMappedConnector_vSept2018 extends Connector with KafkaHelper with Mdc
|
||||
|
||||
|
||||
//---------------- dynamic start -------------------please don't modify this line
|
||||
// ---------- created on Mon May 13 22:38:20 CST 2019
|
||||
// ---------- created on 2024-10-30T12:18:17Z
|
||||
|
||||
messageDocs += MessageDoc(
|
||||
messageDocs += createBankAccountDoc
|
||||
def createBankAccountDoc = MessageDoc(
|
||||
process = "obp.createBankAccount",
|
||||
messageFormat = messageFormat,
|
||||
description = "Create Bank Account",
|
||||
outboundTopic = Some(Topics.createTopicByClassName(OutBoundCreateBankAccount.getClass.getSimpleName).request),
|
||||
inboundTopic = Some(Topics.createTopicByClassName(OutBoundCreateBankAccount.getClass.getSimpleName).response),
|
||||
outboundTopic = Some(Topics.createTopicByClassName("OutBoundCreateBankAccount").request),
|
||||
inboundTopic = Some(Topics.createTopicByClassName("OutBoundCreateBankAccount").request),
|
||||
exampleOutboundMessage = (
|
||||
OutBoundCreateBankAccount(outboundAdapterCallContext= OutboundAdapterCallContext(correlationId="string",
|
||||
sessionId=Option("string"),
|
||||
consumerId=Option("string"),
|
||||
generalContext=Option(List( BasicGeneralContext(key="string",
|
||||
value="string"))),
|
||||
outboundAdapterAuthInfo=Option( OutboundAdapterAuthInfo(userId=Option("string"),
|
||||
username=Option("string"),
|
||||
linkedCustomers=Option(List( BasicLinkedCustomer(customerId="string",
|
||||
customerNumber="string",
|
||||
legalName="string"))),
|
||||
userAuthContext=Option(List( BasicUserAuthContext(key="string",
|
||||
value="string"))),
|
||||
authViews=Option(List( AuthView(view= ViewBasic(id="string",
|
||||
name="string",
|
||||
description="string"),
|
||||
account= AccountBasic(id="string",
|
||||
accountRoutings=List( AccountRouting(scheme="string",
|
||||
address="string")),
|
||||
customerOwners=List( InternalBasicCustomer(bankId="string",
|
||||
customerId="string",
|
||||
customerNumber="string",
|
||||
legalName="string",
|
||||
dateOfBirth=new Date())),
|
||||
userOwners=List( InternalBasicUser(userId="string",
|
||||
emailAddress="string",
|
||||
name="string"))))))))),
|
||||
bankId= BankId(value="string"),
|
||||
accountId= AccountId(value="string"),
|
||||
accountType="string",
|
||||
OutBoundCreateBankAccount(outboundAdapterCallContext=MessageDocsSwaggerDefinitions.outboundAdapterCallContext,
|
||||
bankId=BankId(bankIdExample.value),
|
||||
accountId=AccountId(accountIdExample.value),
|
||||
accountType=accountTypeExample.value,
|
||||
accountLabel="string",
|
||||
currency="string",
|
||||
currency=currencyExample.value,
|
||||
initialBalance=BigDecimal("123.321"),
|
||||
accountHolderName="string",
|
||||
branchId="string",
|
||||
accountRoutings=List(AccountRouting(accountRoutingSchemeExample.value, accountRoutingAddressExample.value))
|
||||
)
|
||||
branchId=branchIdExample.value,
|
||||
accountRoutings=List( AccountRouting(scheme=accountRoutingSchemeExample.value,
|
||||
address=accountRoutingAddressExample.value)))
|
||||
),
|
||||
exampleInboundMessage = (
|
||||
InBoundCreateBankAccount(inboundAdapterCallContext= InboundAdapterCallContext(correlationId="string",
|
||||
sessionId=Option("string"),
|
||||
generalContext=Option(List( BasicGeneralContext(key="string",
|
||||
value="string")))),
|
||||
status= Status(errorCode="",
|
||||
backendMessages=List( InboundStatusMessage(source="string",
|
||||
status="string",
|
||||
errorCode="",
|
||||
text="string"))),
|
||||
data= BankAccountCommons(accountId= AccountId(value="string"),
|
||||
accountType="string",
|
||||
balance=BigDecimal("123.321"),
|
||||
currency="string",
|
||||
name="string",
|
||||
label="string",
|
||||
number="string",
|
||||
bankId= BankId(value="string"),
|
||||
lastUpdate=new Date(),
|
||||
branchId="string",
|
||||
accountRoutings=List( AccountRouting(scheme="string",
|
||||
address="string")),
|
||||
accountRules=List( AccountRule(scheme="string",
|
||||
value="string")),
|
||||
accountHolder="string"))
|
||||
InBoundCreateBankAccount(inboundAdapterCallContext=MessageDocsSwaggerDefinitions.inboundAdapterCallContext,
|
||||
status=MessageDocsSwaggerDefinitions.inboundStatus,
|
||||
data= BankAccountCommons(accountId=AccountId(accountIdExample.value),
|
||||
accountType=accountTypeExample.value,
|
||||
balance=BigDecimal(balanceExample.value),
|
||||
currency=currencyExample.value,
|
||||
name=bankAccountNameExample.value,
|
||||
label=labelExample.value,
|
||||
number=bankAccountNumberExample.value,
|
||||
bankId=BankId(bankIdExample.value),
|
||||
lastUpdate=toDate(bankAccountLastUpdateExample),
|
||||
branchId=branchIdExample.value,
|
||||
accountRoutings=List( AccountRouting(scheme=accountRoutingSchemeExample.value,
|
||||
address=accountRoutingAddressExample.value)),
|
||||
accountRules=List( AccountRule(scheme=accountRuleSchemeExample.value,
|
||||
value=accountRuleValueExample.value)),
|
||||
accountHolder=bankAccountAccountHolderExample.value,
|
||||
attributes=Some(List( Attribute(name=attributeNameExample.value,
|
||||
`type`=attributeTypeExample.value,
|
||||
value=attributeValueExample.value)))))
|
||||
),
|
||||
adapterImplementation = Some(AdapterImplementation("Account", 1))
|
||||
adapterImplementation = Some(AdapterImplementation("- Core", 1))
|
||||
)
|
||||
|
||||
override def createBankAccount(bankId: BankId, accountId: AccountId, accountType: String, accountLabel: String, currency: String, initialBalance: BigDecimal, accountHolderName: String, branchId: String, accountRoutings: List[AccountRouting], callContext: Option[CallContext]): OBPReturnType[Box[BankAccount]] = {
|
||||
import com.openbankproject.commons.dto.{OutBoundCreateBankAccount => OutBound, InBoundCreateBankAccount => InBound}
|
||||
|
||||
val req = OutBound(callContext.map(_.toOutboundAdapterCallContext).get , bankId, accountId, accountType, accountLabel, currency, initialBalance, accountHolderName, branchId, accountRoutings)
|
||||
logger.debug(s"Kafka createBankAccount Req is: $req")
|
||||
processRequest[InBound](req) map (convertToTuple(callContext))
|
||||
import com.openbankproject.commons.dto.{InBoundCreateBankAccount => InBound, OutBoundCreateBankAccount => OutBound}
|
||||
val req = OutBound(callContext.map(_.toOutboundAdapterCallContext).orNull, bankId, accountId, accountType, accountLabel, currency, initialBalance, accountHolderName, branchId, accountRoutings)
|
||||
val response: Future[Box[InBound]] = processRequest[InBound](req)
|
||||
response.map(convertToTuple[BankAccountCommons](callContext))
|
||||
}
|
||||
|
||||
|
||||
messageDocs += MessageDoc(
|
||||
process = "obp.createCustomer",
|
||||
messageFormat = messageFormat,
|
||||
description = "Create Customer",
|
||||
outboundTopic = Some(Topics.createTopicByClassName(OutBoundCreateCustomer.getClass.getSimpleName).request),
|
||||
inboundTopic = Some(Topics.createTopicByClassName(OutBoundCreateCustomer.getClass.getSimpleName).response),
|
||||
exampleOutboundMessage = (
|
||||
OutBoundCreateCustomer(outboundAdapterCallContext= OutboundAdapterCallContext(correlationId="string",
|
||||
sessionId=Option("string"),
|
||||
consumerId=Option("string"),
|
||||
generalContext=Option(List( BasicGeneralContext(key="string",
|
||||
value="string"))),
|
||||
outboundAdapterAuthInfo=Option( OutboundAdapterAuthInfo(userId=Option("string"),
|
||||
username=Option("string"),
|
||||
linkedCustomers=Option(List( BasicLinkedCustomer(customerId="string",
|
||||
customerNumber="string",
|
||||
legalName="string"))),
|
||||
userAuthContext=Option(List( BasicUserAuthContext(key="string",
|
||||
value="string"))),
|
||||
authViews=Option(List( AuthView(view= ViewBasic(id="string",
|
||||
name="string",
|
||||
description="string"),
|
||||
account= AccountBasic(id="string",
|
||||
accountRoutings=List( AccountRouting(scheme="string",
|
||||
address="string")),
|
||||
customerOwners=List( InternalBasicCustomer(bankId="string",
|
||||
customerId="string",
|
||||
customerNumber="string",
|
||||
legalName="string",
|
||||
dateOfBirth=new Date())),
|
||||
userOwners=List( InternalBasicUser(userId="string",
|
||||
emailAddress="string",
|
||||
name="string"))))))))),
|
||||
bankId= BankId(value="string"),
|
||||
legalName="string",
|
||||
mobileNumber="string",
|
||||
email="string",
|
||||
faceImage= CustomerFaceImage(date=new Date(),
|
||||
url="string"),
|
||||
dateOfBirth=new Date(),
|
||||
relationshipStatus="string",
|
||||
dependents=123,
|
||||
dobOfDependents=List(new Date()),
|
||||
highestEducationAttained="string",
|
||||
employmentStatus="string",
|
||||
kycStatus=true,
|
||||
lastOkDate=new Date(),
|
||||
creditRating=Option( CreditRating(rating="string",
|
||||
source="string")),
|
||||
creditLimit=Option( AmountOfMoney(currency="string",
|
||||
amount="string")),
|
||||
title="string",
|
||||
branchId="string",
|
||||
nameSuffix="string")
|
||||
),
|
||||
exampleInboundMessage = (
|
||||
InBoundCreateCustomer(inboundAdapterCallContext= InboundAdapterCallContext(correlationId="string",
|
||||
sessionId=Option("string"),
|
||||
generalContext=Option(List( BasicGeneralContext(key="string",
|
||||
value="string")))),
|
||||
status= Status(errorCode="",
|
||||
backendMessages=List( InboundStatusMessage(source="string",
|
||||
status="string",
|
||||
errorCode="",
|
||||
text="string"))),
|
||||
data= CustomerCommons(customerId="string",
|
||||
bankId="string",
|
||||
number="string",
|
||||
legalName="string",
|
||||
mobileNumber="string",
|
||||
email="string",
|
||||
faceImage= CustomerFaceImage(date=new Date(),
|
||||
url="string"),
|
||||
dateOfBirth=new Date(),
|
||||
relationshipStatus="string",
|
||||
dependents=123,
|
||||
dobOfDependents=List(new Date()),
|
||||
highestEducationAttained="string",
|
||||
employmentStatus="string",
|
||||
creditRating= CreditRating(rating="string",
|
||||
source="string"),
|
||||
creditLimit= CreditLimit(currency="string",
|
||||
amount="string"),
|
||||
kycStatus=true,
|
||||
lastOkDate=new Date(),
|
||||
title="string",
|
||||
branchId="string",
|
||||
nameSuffix="string"))
|
||||
),
|
||||
adapterImplementation = Some(AdapterImplementation("Customer", 1))
|
||||
)
|
||||
override def createCustomer(bankId: BankId, legalName: String, mobileNumber: String, email: String, faceImage: CustomerFaceImageTrait, dateOfBirth: Date, relationshipStatus: String, dependents: Int, dobOfDependents: List[Date], highestEducationAttained: String, employmentStatus: String, kycStatus: Boolean, lastOkDate: Date, creditRating: Option[CreditRatingTrait], creditLimit: Option[AmountOfMoneyTrait], title: String, branchId: String, nameSuffix: String, callContext: Option[CallContext]): OBPReturnType[Box[Customer]] = {
|
||||
import com.openbankproject.commons.dto.{OutBoundCreateCustomer => OutBound, InBoundCreateCustomer => InBound}
|
||||
|
||||
val req = OutBound(callContext.map(_.toOutboundAdapterCallContext).get , bankId, legalName, mobileNumber, email, faceImage, dateOfBirth, relationshipStatus, dependents, dobOfDependents, highestEducationAttained, employmentStatus, kycStatus, lastOkDate, creditRating, creditLimit, title, branchId, nameSuffix)
|
||||
logger.debug(s"Kafka createCustomer Req is: $req")
|
||||
processRequest[InBound](req) map (convertToTuple(callContext))
|
||||
}
|
||||
|
||||
|
||||
messageDocs += MessageDoc(
|
||||
process = "obp.createOrUpdateKycCheck",
|
||||
messageFormat = messageFormat,
|
||||
description = "Create Or Update Kyc Check",
|
||||
outboundTopic = Some(Topics.createTopicByClassName(OutBoundCreateOrUpdateKycCheck.getClass.getSimpleName).request),
|
||||
inboundTopic = Some(Topics.createTopicByClassName(OutBoundCreateOrUpdateKycCheck.getClass.getSimpleName).response),
|
||||
exampleOutboundMessage = (
|
||||
OutBoundCreateOrUpdateKycCheck(outboundAdapterCallContext= OutboundAdapterCallContext(correlationId="string",
|
||||
sessionId=Option("string"),
|
||||
consumerId=Option("string"),
|
||||
generalContext=Option(List( BasicGeneralContext(key="string",
|
||||
value="string"))),
|
||||
outboundAdapterAuthInfo=Option( OutboundAdapterAuthInfo(userId=Option("string"),
|
||||
username=Option("string"),
|
||||
linkedCustomers=Option(List( BasicLinkedCustomer(customerId="string",
|
||||
customerNumber="string",
|
||||
legalName="string"))),
|
||||
userAuthContext=Option(List( BasicUserAuthContext(key="string",
|
||||
value="string"))),
|
||||
authViews=Option(List( AuthView(view= ViewBasic(id="string",
|
||||
name="string",
|
||||
description="string"),
|
||||
account= AccountBasic(id="string",
|
||||
accountRoutings=List( AccountRouting(scheme="string",
|
||||
address="string")),
|
||||
customerOwners=List( InternalBasicCustomer(bankId="string",
|
||||
customerId="string",
|
||||
customerNumber="string",
|
||||
legalName="string",
|
||||
dateOfBirth=new Date())),
|
||||
userOwners=List( InternalBasicUser(userId="string",
|
||||
emailAddress="string",
|
||||
name="string"))))))))),
|
||||
bankId="string",
|
||||
customerId="string",
|
||||
id="string",
|
||||
customerNumber="string",
|
||||
date=new Date(),
|
||||
how="string",
|
||||
staffUserId="string",
|
||||
mStaffName="string",
|
||||
mSatisfied=true,
|
||||
comments="string")
|
||||
),
|
||||
exampleInboundMessage = (
|
||||
InBoundCreateOrUpdateKycCheck(inboundAdapterCallContext= InboundAdapterCallContext(correlationId="string",
|
||||
sessionId=Option("string"),
|
||||
generalContext=Option(List( BasicGeneralContext(key="string",
|
||||
value="string")))),
|
||||
status= Status(errorCode="",
|
||||
backendMessages=List( InboundStatusMessage(source="string",
|
||||
status="string",
|
||||
errorCode="",
|
||||
text="string"))),
|
||||
data= KycCheckCommons(bankId="string",
|
||||
customerId="string",
|
||||
idKycCheck="string",
|
||||
customerNumber="string",
|
||||
date=new Date(),
|
||||
how="string",
|
||||
staffUserId="string",
|
||||
staffName="string",
|
||||
satisfied=true,
|
||||
comments="string"))
|
||||
),
|
||||
adapterImplementation = Some(AdapterImplementation("KYC", 1))
|
||||
)
|
||||
override def createOrUpdateKycCheck(bankId: String, customerId: String, id: String, customerNumber: String, date: Date, how: String, staffUserId: String, mStaffName: String, mSatisfied: Boolean, comments: String, callContext: Option[CallContext]): OBPReturnType[Box[KycCheck]] = {
|
||||
import com.openbankproject.commons.dto.{OutBoundCreateOrUpdateKycCheck => OutBound, InBoundCreateOrUpdateKycCheck => InBound}
|
||||
|
||||
val req = OutBound(callContext.map(_.toOutboundAdapterCallContext).get , bankId, customerId, id, customerNumber, date, how, staffUserId, mStaffName, mSatisfied, comments)
|
||||
logger.debug(s"Kafka createOrUpdateKycCheck Req is: $req")
|
||||
processRequest[InBound](req) map (convertToTuple(callContext))
|
||||
}
|
||||
|
||||
|
||||
messageDocs += MessageDoc(
|
||||
process = "obp.createOrUpdateKycDocument",
|
||||
messageFormat = messageFormat,
|
||||
description = "Create Or Update Kyc Document",
|
||||
outboundTopic = Some(Topics.createTopicByClassName(OutBoundCreateOrUpdateKycDocument.getClass.getSimpleName).request),
|
||||
inboundTopic = Some(Topics.createTopicByClassName(OutBoundCreateOrUpdateKycDocument.getClass.getSimpleName).response),
|
||||
exampleOutboundMessage = (
|
||||
OutBoundCreateOrUpdateKycDocument(outboundAdapterCallContext= OutboundAdapterCallContext(correlationId="string",
|
||||
sessionId=Option("string"),
|
||||
consumerId=Option("string"),
|
||||
generalContext=Option(List( BasicGeneralContext(key="string",
|
||||
value="string"))),
|
||||
outboundAdapterAuthInfo=Option( OutboundAdapterAuthInfo(userId=Option("string"),
|
||||
username=Option("string"),
|
||||
linkedCustomers=Option(List( BasicLinkedCustomer(customerId="string",
|
||||
customerNumber="string",
|
||||
legalName="string"))),
|
||||
userAuthContext=Option(List( BasicUserAuthContext(key="string",
|
||||
value="string"))),
|
||||
authViews=Option(List( AuthView(view= ViewBasic(id="string",
|
||||
name="string",
|
||||
description="string"),
|
||||
account= AccountBasic(id="string",
|
||||
accountRoutings=List( AccountRouting(scheme="string",
|
||||
address="string")),
|
||||
customerOwners=List( InternalBasicCustomer(bankId="string",
|
||||
customerId="string",
|
||||
customerNumber="string",
|
||||
legalName="string",
|
||||
dateOfBirth=new Date())),
|
||||
userOwners=List( InternalBasicUser(userId="string",
|
||||
emailAddress="string",
|
||||
name="string"))))))))),
|
||||
bankId="string",
|
||||
customerId="string",
|
||||
id="string",
|
||||
customerNumber="string",
|
||||
`type`="string",
|
||||
number="string",
|
||||
issueDate=new Date(),
|
||||
issuePlace="string",
|
||||
expiryDate=new Date())
|
||||
),
|
||||
exampleInboundMessage = (
|
||||
InBoundCreateOrUpdateKycDocument(inboundAdapterCallContext= InboundAdapterCallContext(correlationId="string",
|
||||
sessionId=Option("string"),
|
||||
generalContext=Option(List( BasicGeneralContext(key="string",
|
||||
value="string")))),
|
||||
status= Status(errorCode="",
|
||||
backendMessages=List( InboundStatusMessage(source="string",
|
||||
status="string",
|
||||
errorCode="",
|
||||
text="string"))),
|
||||
data= KycDocumentCommons(bankId="string",
|
||||
customerId="string",
|
||||
idKycDocument="string",
|
||||
customerNumber="string",
|
||||
`type`="string",
|
||||
number="string",
|
||||
issueDate=new Date(),
|
||||
issuePlace="string",
|
||||
expiryDate=new Date()))
|
||||
),
|
||||
adapterImplementation = Some(AdapterImplementation("KYC", 1))
|
||||
)
|
||||
override def createOrUpdateKycDocument(bankId: String, customerId: String, id: String, customerNumber: String, `type`: String, number: String, issueDate: Date, issuePlace: String, expiryDate: Date, callContext: Option[CallContext]): OBPReturnType[Box[KycDocument]] = {
|
||||
import com.openbankproject.commons.dto.{OutBoundCreateOrUpdateKycDocument => OutBound, InBoundCreateOrUpdateKycDocument => InBound}
|
||||
|
||||
val req = OutBound(callContext.map(_.toOutboundAdapterCallContext).get , bankId, customerId, id, customerNumber, `type`, number, issueDate, issuePlace, expiryDate)
|
||||
logger.debug(s"Kafka createOrUpdateKycDocument Req is: $req")
|
||||
processRequest[InBound](req) map (convertToTuple(callContext))
|
||||
}
|
||||
|
||||
|
||||
messageDocs += MessageDoc(
|
||||
process = "obp.createOrUpdateKycMedia",
|
||||
messageFormat = messageFormat,
|
||||
description = "Create Or Update Kyc Media",
|
||||
outboundTopic = Some(Topics.createTopicByClassName(OutBoundCreateOrUpdateKycMedia.getClass.getSimpleName).request),
|
||||
inboundTopic = Some(Topics.createTopicByClassName(OutBoundCreateOrUpdateKycMedia.getClass.getSimpleName).response),
|
||||
exampleOutboundMessage = (
|
||||
OutBoundCreateOrUpdateKycMedia(outboundAdapterCallContext= OutboundAdapterCallContext(correlationId="string",
|
||||
sessionId=Option("string"),
|
||||
consumerId=Option("string"),
|
||||
generalContext=Option(List( BasicGeneralContext(key="string",
|
||||
value="string"))),
|
||||
outboundAdapterAuthInfo=Option( OutboundAdapterAuthInfo(userId=Option("string"),
|
||||
username=Option("string"),
|
||||
linkedCustomers=Option(List( BasicLinkedCustomer(customerId="string",
|
||||
customerNumber="string",
|
||||
legalName="string"))),
|
||||
userAuthContext=Option(List( BasicUserAuthContext(key="string",
|
||||
value="string"))),
|
||||
authViews=Option(List( AuthView(view= ViewBasic(id="string",
|
||||
name="string",
|
||||
description="string"),
|
||||
account= AccountBasic(id="string",
|
||||
accountRoutings=List( AccountRouting(scheme="string",
|
||||
address="string")),
|
||||
customerOwners=List( InternalBasicCustomer(bankId="string",
|
||||
customerId="string",
|
||||
customerNumber="string",
|
||||
legalName="string",
|
||||
dateOfBirth=new Date())),
|
||||
userOwners=List( InternalBasicUser(userId="string",
|
||||
emailAddress="string",
|
||||
name="string"))))))))),
|
||||
bankId="string",
|
||||
customerId="string",
|
||||
id="string",
|
||||
customerNumber="string",
|
||||
`type`="string",
|
||||
url="string",
|
||||
date=new Date(),
|
||||
relatesToKycDocumentId="string",
|
||||
relatesToKycCheckId="string")
|
||||
),
|
||||
exampleInboundMessage = (
|
||||
InBoundCreateOrUpdateKycMedia(inboundAdapterCallContext= InboundAdapterCallContext(correlationId="string",
|
||||
sessionId=Option("string"),
|
||||
generalContext=Option(List( BasicGeneralContext(key="string",
|
||||
value="string")))),
|
||||
status= Status(errorCode="",
|
||||
backendMessages=List( InboundStatusMessage(source="string",
|
||||
status="string",
|
||||
errorCode="",
|
||||
text="string"))),
|
||||
data= KycMediaCommons(bankId="string",
|
||||
customerId="string",
|
||||
idKycMedia="string",
|
||||
customerNumber="string",
|
||||
`type`="string",
|
||||
url="string",
|
||||
date=new Date(),
|
||||
relatesToKycDocumentId="string",
|
||||
relatesToKycCheckId="string"))
|
||||
),
|
||||
adapterImplementation = Some(AdapterImplementation("KYC", 1))
|
||||
)
|
||||
override def createOrUpdateKycMedia(bankId: String, customerId: String, id: String, customerNumber: String, `type`: String, url: String, date: Date, relatesToKycDocumentId: String, relatesToKycCheckId: String, callContext: Option[CallContext]): OBPReturnType[Box[KycMedia]] = {
|
||||
import com.openbankproject.commons.dto.{OutBoundCreateOrUpdateKycMedia => OutBound, InBoundCreateOrUpdateKycMedia => InBound}
|
||||
|
||||
val req = OutBound(callContext.map(_.toOutboundAdapterCallContext).get , bankId, customerId, id, customerNumber, `type`, url, date, relatesToKycDocumentId, relatesToKycCheckId)
|
||||
logger.debug(s"Kafka createOrUpdateKycMedia Req is: $req")
|
||||
processRequest[InBound](req) map (convertToTuple(callContext))
|
||||
}
|
||||
|
||||
|
||||
messageDocs += MessageDoc(
|
||||
process = "obp.createOrUpdateKycStatus",
|
||||
messageFormat = messageFormat,
|
||||
description = "Create Or Update Kyc Status",
|
||||
outboundTopic = Some(Topics.createTopicByClassName(OutBoundCreateOrUpdateKycStatus.getClass.getSimpleName).request),
|
||||
inboundTopic = Some(Topics.createTopicByClassName(OutBoundCreateOrUpdateKycStatus.getClass.getSimpleName).response),
|
||||
exampleOutboundMessage = (
|
||||
OutBoundCreateOrUpdateKycStatus(outboundAdapterCallContext= OutboundAdapterCallContext(correlationId="string",
|
||||
sessionId=Option("string"),
|
||||
consumerId=Option("string"),
|
||||
generalContext=Option(List( BasicGeneralContext(key="string",
|
||||
value="string"))),
|
||||
outboundAdapterAuthInfo=Option( OutboundAdapterAuthInfo(userId=Option("string"),
|
||||
username=Option("string"),
|
||||
linkedCustomers=Option(List( BasicLinkedCustomer(customerId="string",
|
||||
customerNumber="string",
|
||||
legalName="string"))),
|
||||
userAuthContext=Option(List( BasicUserAuthContext(key="string",
|
||||
value="string"))),
|
||||
authViews=Option(List( AuthView(view= ViewBasic(id="string",
|
||||
name="string",
|
||||
description="string"),
|
||||
account= AccountBasic(id="string",
|
||||
accountRoutings=List( AccountRouting(scheme="string",
|
||||
address="string")),
|
||||
customerOwners=List( InternalBasicCustomer(bankId="string",
|
||||
customerId="string",
|
||||
customerNumber="string",
|
||||
legalName="string",
|
||||
dateOfBirth=new Date())),
|
||||
userOwners=List( InternalBasicUser(userId="string",
|
||||
emailAddress="string",
|
||||
name="string"))))))))),
|
||||
bankId="string",
|
||||
customerId="string",
|
||||
customerNumber="string",
|
||||
ok=true,
|
||||
date=new Date())
|
||||
),
|
||||
exampleInboundMessage = (
|
||||
InBoundCreateOrUpdateKycStatus(inboundAdapterCallContext= InboundAdapterCallContext(correlationId="string",
|
||||
sessionId=Option("string"),
|
||||
generalContext=Option(List( BasicGeneralContext(key="string",
|
||||
value="string")))),
|
||||
status= Status(errorCode="",
|
||||
backendMessages=List( InboundStatusMessage(source="string",
|
||||
status="string",
|
||||
errorCode="",
|
||||
text="string"))),
|
||||
data= KycStatusCommons(bankId="string",
|
||||
customerId="string",
|
||||
customerNumber="string",
|
||||
ok=true,
|
||||
date=new Date()))
|
||||
),
|
||||
adapterImplementation = Some(AdapterImplementation("KYC", 1))
|
||||
)
|
||||
override def createOrUpdateKycStatus(bankId: String, customerId: String, customerNumber: String, ok: Boolean, date: Date, callContext: Option[CallContext]): OBPReturnType[Box[KycStatus]] = {
|
||||
import com.openbankproject.commons.dto.{OutBoundCreateOrUpdateKycStatus => OutBound, InBoundCreateOrUpdateKycStatus => InBound}
|
||||
|
||||
val req = OutBound(callContext.map(_.toOutboundAdapterCallContext).get , bankId, customerId, customerNumber, ok, date)
|
||||
logger.debug(s"Kafka createOrUpdateKycStatus Req is: $req")
|
||||
processRequest[InBound](req) map (convertToTuple(callContext))
|
||||
}
|
||||
|
||||
|
||||
messageDocs += MessageDoc(
|
||||
process = "obp.getKycChecks",
|
||||
messageFormat = messageFormat,
|
||||
description = "Get Kyc Checks",
|
||||
outboundTopic = Some(Topics.createTopicByClassName(OutBoundGetKycChecks.getClass.getSimpleName).request),
|
||||
inboundTopic = Some(Topics.createTopicByClassName(OutBoundGetKycChecks.getClass.getSimpleName).response),
|
||||
exampleOutboundMessage = (
|
||||
OutBoundGetKycChecks(outboundAdapterCallContext= OutboundAdapterCallContext(correlationId="string",
|
||||
sessionId=Option("string"),
|
||||
consumerId=Option("string"),
|
||||
generalContext=Option(List( BasicGeneralContext(key="string",
|
||||
value="string"))),
|
||||
outboundAdapterAuthInfo=Option( OutboundAdapterAuthInfo(userId=Option("string"),
|
||||
username=Option("string"),
|
||||
linkedCustomers=Option(List( BasicLinkedCustomer(customerId="string",
|
||||
customerNumber="string",
|
||||
legalName="string"))),
|
||||
userAuthContext=Option(List( BasicUserAuthContext(key="string",
|
||||
value="string"))),
|
||||
authViews=Option(List( AuthView(view= ViewBasic(id="string",
|
||||
name="string",
|
||||
description="string"),
|
||||
account= AccountBasic(id="string",
|
||||
accountRoutings=List( AccountRouting(scheme="string",
|
||||
address="string")),
|
||||
customerOwners=List( InternalBasicCustomer(bankId="string",
|
||||
customerId="string",
|
||||
customerNumber="string",
|
||||
legalName="string",
|
||||
dateOfBirth=new Date())),
|
||||
userOwners=List( InternalBasicUser(userId="string",
|
||||
emailAddress="string",
|
||||
name="string"))))))))),
|
||||
customerId="string")
|
||||
),
|
||||
exampleInboundMessage = (
|
||||
InBoundGetKycChecks(inboundAdapterCallContext= InboundAdapterCallContext(correlationId="string",
|
||||
sessionId=Option("string"),
|
||||
generalContext=Option(List( BasicGeneralContext(key="string",
|
||||
value="string")))),
|
||||
status= Status(errorCode="",
|
||||
backendMessages=List( InboundStatusMessage(source="string",
|
||||
status="string",
|
||||
errorCode="",
|
||||
text="string"))),
|
||||
data=List( KycCheckCommons(bankId="string",
|
||||
customerId="string",
|
||||
idKycCheck="string",
|
||||
customerNumber="string",
|
||||
date=new Date(),
|
||||
how="string",
|
||||
staffUserId="string",
|
||||
staffName="string",
|
||||
satisfied=true,
|
||||
comments="string")))
|
||||
),
|
||||
adapterImplementation = Some(AdapterImplementation("KYC", 1))
|
||||
)
|
||||
override def getKycChecks(customerId: String, @CacheKeyOmit callContext: Option[CallContext]): OBPReturnType[Box[List[KycCheck]]] = writeMetricEndpointTiming {
|
||||
/**
|
||||
* Please note that "var cacheKey = (randomUUID().toString, randomUUID().toString, randomUUID().toString)"
|
||||
* is just a temporary value filed with UUID values in order to prevent any ambiguity.
|
||||
* The real value will be assigned by Macro during compile time at this line of a code:
|
||||
* https://github.com/OpenBankProject/scala-macros/blob/master/macros/src/main/scala/com/tesobe/CacheKeyFromArgumentsMacro.scala#L49
|
||||
*/
|
||||
var cacheKey = (randomUUID().toString, randomUUID().toString, randomUUID().toString)
|
||||
CacheKeyFromArguments.buildCacheKey {
|
||||
Caching.memoizeWithProvider(Some(cacheKey.toString()))(accountTTL second) {
|
||||
import com.openbankproject.commons.dto.{OutBoundGetKycChecks => OutBound, InBoundGetKycChecks => InBound}
|
||||
|
||||
val req = OutBound(callContext.map(_.toOutboundAdapterCallContext).get , customerId)
|
||||
logger.debug(s"Kafka getKycChecks Req is: $req")
|
||||
processRequest[InBound](req) map (convertToTuple(callContext))
|
||||
}
|
||||
|
||||
}
|
||||
}("getKycChecks")
|
||||
|
||||
|
||||
messageDocs += MessageDoc(
|
||||
process = "obp.getKycDocuments",
|
||||
messageFormat = messageFormat,
|
||||
description = "Get Kyc Documents",
|
||||
outboundTopic = Some(Topics.createTopicByClassName(OutBoundGetKycDocuments.getClass.getSimpleName).request),
|
||||
inboundTopic = Some(Topics.createTopicByClassName(OutBoundGetKycDocuments.getClass.getSimpleName).response),
|
||||
exampleOutboundMessage = (
|
||||
OutBoundGetKycDocuments(outboundAdapterCallContext= OutboundAdapterCallContext(correlationId="string",
|
||||
sessionId=Option("string"),
|
||||
consumerId=Option("string"),
|
||||
generalContext=Option(List( BasicGeneralContext(key="string",
|
||||
value="string"))),
|
||||
outboundAdapterAuthInfo=Option( OutboundAdapterAuthInfo(userId=Option("string"),
|
||||
username=Option("string"),
|
||||
linkedCustomers=Option(List( BasicLinkedCustomer(customerId="string",
|
||||
customerNumber="string",
|
||||
legalName="string"))),
|
||||
userAuthContext=Option(List( BasicUserAuthContext(key="string",
|
||||
value="string"))),
|
||||
authViews=Option(List( AuthView(view= ViewBasic(id="string",
|
||||
name="string",
|
||||
description="string"),
|
||||
account= AccountBasic(id="string",
|
||||
accountRoutings=List( AccountRouting(scheme="string",
|
||||
address="string")),
|
||||
customerOwners=List( InternalBasicCustomer(bankId="string",
|
||||
customerId="string",
|
||||
customerNumber="string",
|
||||
legalName="string",
|
||||
dateOfBirth=new Date())),
|
||||
userOwners=List( InternalBasicUser(userId="string",
|
||||
emailAddress="string",
|
||||
name="string"))))))))),
|
||||
customerId="string")
|
||||
),
|
||||
exampleInboundMessage = (
|
||||
InBoundGetKycDocuments(inboundAdapterCallContext= InboundAdapterCallContext(correlationId="string",
|
||||
sessionId=Option("string"),
|
||||
generalContext=Option(List( BasicGeneralContext(key="string",
|
||||
value="string")))),
|
||||
status= Status(errorCode="",
|
||||
backendMessages=List( InboundStatusMessage(source="string",
|
||||
status="string",
|
||||
errorCode="",
|
||||
text="string"))),
|
||||
data=List( KycDocumentCommons(bankId="string",
|
||||
customerId="string",
|
||||
idKycDocument="string",
|
||||
customerNumber="string",
|
||||
`type`="string",
|
||||
number="string",
|
||||
issueDate=new Date(),
|
||||
issuePlace="string",
|
||||
expiryDate=new Date())))
|
||||
),
|
||||
adapterImplementation = Some(AdapterImplementation("KYC", 1))
|
||||
)
|
||||
override def getKycDocuments(customerId: String, @CacheKeyOmit callContext: Option[CallContext]): OBPReturnType[Box[List[KycDocument]]] = writeMetricEndpointTiming {
|
||||
/**
|
||||
* Please note that "var cacheKey = (randomUUID().toString, randomUUID().toString, randomUUID().toString)"
|
||||
* is just a temporary value filed with UUID values in order to prevent any ambiguity.
|
||||
* The real value will be assigned by Macro during compile time at this line of a code:
|
||||
* https://github.com/OpenBankProject/scala-macros/blob/master/macros/src/main/scala/com/tesobe/CacheKeyFromArgumentsMacro.scala#L49
|
||||
*/
|
||||
var cacheKey = (randomUUID().toString, randomUUID().toString, randomUUID().toString)
|
||||
CacheKeyFromArguments.buildCacheKey {
|
||||
Caching.memoizeWithProvider(Some(cacheKey.toString()))(accountTTL second) {
|
||||
import com.openbankproject.commons.dto.{OutBoundGetKycDocuments => OutBound, InBoundGetKycDocuments => InBound}
|
||||
|
||||
val req = OutBound(callContext.map(_.toOutboundAdapterCallContext).get , customerId)
|
||||
logger.debug(s"Kafka getKycDocuments Req is: $req")
|
||||
processRequest[InBound](req) map (convertToTuple(callContext))
|
||||
}
|
||||
|
||||
}
|
||||
}("getKycDocuments")
|
||||
|
||||
|
||||
messageDocs += MessageDoc(
|
||||
process = "obp.getKycMedias",
|
||||
messageFormat = messageFormat,
|
||||
description = "Get Kyc Medias",
|
||||
outboundTopic = Some(Topics.createTopicByClassName(OutBoundGetKycMedias.getClass.getSimpleName).request),
|
||||
inboundTopic = Some(Topics.createTopicByClassName(OutBoundGetKycMedias.getClass.getSimpleName).response),
|
||||
exampleOutboundMessage = (
|
||||
OutBoundGetKycMedias(outboundAdapterCallContext= OutboundAdapterCallContext(correlationId="string",
|
||||
sessionId=Option("string"),
|
||||
consumerId=Option("string"),
|
||||
generalContext=Option(List( BasicGeneralContext(key="string",
|
||||
value="string"))),
|
||||
outboundAdapterAuthInfo=Option( OutboundAdapterAuthInfo(userId=Option("string"),
|
||||
username=Option("string"),
|
||||
linkedCustomers=Option(List( BasicLinkedCustomer(customerId="string",
|
||||
customerNumber="string",
|
||||
legalName="string"))),
|
||||
userAuthContext=Option(List( BasicUserAuthContext(key="string",
|
||||
value="string"))),
|
||||
authViews=Option(List( AuthView(view= ViewBasic(id="string",
|
||||
name="string",
|
||||
description="string"),
|
||||
account= AccountBasic(id="string",
|
||||
accountRoutings=List( AccountRouting(scheme="string",
|
||||
address="string")),
|
||||
customerOwners=List( InternalBasicCustomer(bankId="string",
|
||||
customerId="string",
|
||||
customerNumber="string",
|
||||
legalName="string",
|
||||
dateOfBirth=new Date())),
|
||||
userOwners=List( InternalBasicUser(userId="string",
|
||||
emailAddress="string",
|
||||
name="string"))))))))),
|
||||
customerId="string")
|
||||
),
|
||||
exampleInboundMessage = (
|
||||
InBoundGetKycMedias(inboundAdapterCallContext= InboundAdapterCallContext(correlationId="string",
|
||||
sessionId=Option("string"),
|
||||
generalContext=Option(List( BasicGeneralContext(key="string",
|
||||
value="string")))),
|
||||
status= Status(errorCode="",
|
||||
backendMessages=List( InboundStatusMessage(source="string",
|
||||
status="string",
|
||||
errorCode="",
|
||||
text="string"))),
|
||||
data=List( KycMediaCommons(bankId="string",
|
||||
customerId="string",
|
||||
idKycMedia="string",
|
||||
customerNumber="string",
|
||||
`type`="string",
|
||||
url="string",
|
||||
date=new Date(),
|
||||
relatesToKycDocumentId="string",
|
||||
relatesToKycCheckId="string")))
|
||||
),
|
||||
adapterImplementation = Some(AdapterImplementation("KYC", 1))
|
||||
)
|
||||
override def getKycMedias(customerId: String, @CacheKeyOmit callContext: Option[CallContext]): OBPReturnType[Box[List[KycMedia]]] = writeMetricEndpointTiming {
|
||||
/**
|
||||
* Please note that "var cacheKey = (randomUUID().toString, randomUUID().toString, randomUUID().toString)"
|
||||
* is just a temporary value filed with UUID values in order to prevent any ambiguity.
|
||||
* The real value will be assigned by Macro during compile time at this line of a code:
|
||||
* https://github.com/OpenBankProject/scala-macros/blob/master/macros/src/main/scala/com/tesobe/CacheKeyFromArgumentsMacro.scala#L49
|
||||
*/
|
||||
var cacheKey = (randomUUID().toString, randomUUID().toString, randomUUID().toString)
|
||||
CacheKeyFromArguments.buildCacheKey {
|
||||
Caching.memoizeWithProvider(Some(cacheKey.toString()))(accountTTL second) {
|
||||
import com.openbankproject.commons.dto.{OutBoundGetKycMedias => OutBound, InBoundGetKycMedias => InBound}
|
||||
|
||||
val req = OutBound(callContext.map(_.toOutboundAdapterCallContext).get , customerId)
|
||||
logger.debug(s"Kafka getKycMedias Req is: $req")
|
||||
processRequest[InBound](req) map (convertToTuple(callContext))
|
||||
}
|
||||
|
||||
}
|
||||
}("getKycMedias")
|
||||
|
||||
|
||||
messageDocs += MessageDoc(
|
||||
process = "obp.getKycStatuses",
|
||||
messageFormat = messageFormat,
|
||||
description = "Get Kyc Statuses",
|
||||
outboundTopic = Some(Topics.createTopicByClassName(OutBoundGetKycStatuses.getClass.getSimpleName).request),
|
||||
inboundTopic = Some(Topics.createTopicByClassName(OutBoundGetKycStatuses.getClass.getSimpleName).response),
|
||||
exampleOutboundMessage = (
|
||||
OutBoundGetKycStatuses(outboundAdapterCallContext= OutboundAdapterCallContext(correlationId="string",
|
||||
sessionId=Option("string"),
|
||||
consumerId=Option("string"),
|
||||
generalContext=Option(List( BasicGeneralContext(key="string",
|
||||
value="string"))),
|
||||
outboundAdapterAuthInfo=Option( OutboundAdapterAuthInfo(userId=Option("string"),
|
||||
username=Option("string"),
|
||||
linkedCustomers=Option(List( BasicLinkedCustomer(customerId="string",
|
||||
customerNumber="string",
|
||||
legalName="string"))),
|
||||
userAuthContext=Option(List( BasicUserAuthContext(key="string",
|
||||
value="string"))),
|
||||
authViews=Option(List( AuthView(view= ViewBasic(id="string",
|
||||
name="string",
|
||||
description="string"),
|
||||
account= AccountBasic(id="string",
|
||||
accountRoutings=List( AccountRouting(scheme="string",
|
||||
address="string")),
|
||||
customerOwners=List( InternalBasicCustomer(bankId="string",
|
||||
customerId="string",
|
||||
customerNumber="string",
|
||||
legalName="string",
|
||||
dateOfBirth=new Date())),
|
||||
userOwners=List( InternalBasicUser(userId="string",
|
||||
emailAddress="string",
|
||||
name="string"))))))))),
|
||||
customerId="string")
|
||||
),
|
||||
exampleInboundMessage = (
|
||||
InBoundGetKycStatuses(inboundAdapterCallContext= InboundAdapterCallContext(correlationId="string",
|
||||
sessionId=Option("string"),
|
||||
generalContext=Option(List( BasicGeneralContext(key="string",
|
||||
value="string")))),
|
||||
status= Status(errorCode="",
|
||||
backendMessages=List( InboundStatusMessage(source="string",
|
||||
status="string",
|
||||
errorCode="",
|
||||
text="string"))),
|
||||
data=List( KycStatusCommons(bankId="string",
|
||||
customerId="string",
|
||||
customerNumber="string",
|
||||
ok=true,
|
||||
date=new Date())))
|
||||
),
|
||||
adapterImplementation = Some(AdapterImplementation("KYC", 1))
|
||||
)
|
||||
override def getKycStatuses(customerId: String, @CacheKeyOmit callContext: Option[CallContext]): OBPReturnType[Box[List[KycStatus]]] = writeMetricEndpointTiming {
|
||||
/**
|
||||
* Please note that "var cacheKey = (randomUUID().toString, randomUUID().toString, randomUUID().toString)"
|
||||
* is just a temporary value filed with UUID values in order to prevent any ambiguity.
|
||||
* The real value will be assigned by Macro during compile time at this line of a code:
|
||||
* https://github.com/OpenBankProject/scala-macros/blob/master/macros/src/main/scala/com/tesobe/CacheKeyFromArgumentsMacro.scala#L49
|
||||
*/
|
||||
var cacheKey = (randomUUID().toString, randomUUID().toString, randomUUID().toString)
|
||||
CacheKeyFromArguments.buildCacheKey {
|
||||
Caching.memoizeWithProvider(Some(cacheKey.toString()))(accountTTL second) {
|
||||
import com.openbankproject.commons.dto.{OutBoundGetKycStatuses => OutBound, InBoundGetKycStatuses => InBound}
|
||||
|
||||
val req = OutBound(callContext.map(_.toOutboundAdapterCallContext).get , customerId)
|
||||
logger.debug(s"Kafka getKycStatuses Req is: $req")
|
||||
processRequest[InBound](req) map (convertToTuple(callContext))
|
||||
}
|
||||
|
||||
}
|
||||
}("getKycStatuses")
|
||||
|
||||
|
||||
//---------------- dynamic end ---------------------please don't modify this line
|
||||
|
||||
// ---------- created on 2024-10-30T12:18:17Z
|
||||
//---------------- dynamic end ---------------------please don't modify this line
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user