refactor Messagedocs for GetCoreBankAccounts

This commit is contained in:
tawoe 2019-01-22 14:03:50 +01:00
parent d07002fd81
commit ef9b1ebfbe
2 changed files with 18 additions and 10 deletions

View File

@ -41,7 +41,7 @@ object ExampleValue {
val customerNumberExample = ConnectorField("5987953", s"The human friendly customer identifier that MUST uniquely identify the Customer at the Bank ID. Customer Number is NOT used in URLs.")
glossaryItems += makeGlossaryItem("Adapter.customerNumber", customerNumberExample)
val labelExample = ConnectorField("My Account", s"A lable that describes the Account")
val legalNameExample = ConnectorField("Eveline Tripman", s"The legal name of the Customer.")
glossaryItems += makeGlossaryItem("Adapter.legalName", legalNameExample)

View File

@ -183,6 +183,7 @@ trait KafkaMappedConnector_vSept2018 extends Connector with KafkaHelper with Mdc
List(internalBasicCustomerExample),
List(internalBasicUserExample)
)
val accountRoutingExample = AccountRouting("AccountNumber",accountNumberExample.value)
val authViewExample = AuthView(viewBasicExample, accountBasicExample)
val authViewsExample = List(authViewExample)
val basicCustomerExample = BasicCustomer(customerIdExample.value,customerNumberExample.value,legalNameExample.value)
@ -920,20 +921,27 @@ trait KafkaMappedConnector_vSept2018 extends Connector with KafkaHelper with Mdc
process = "obp.get.coreBankAccounts",
messageFormat = messageFormat,
description = "Get bank Accounts available to the User (without Metadata)",
outboundTopic = Some(Topics.createTopicByClassName(OutboundGetAccountbyAccountID.getClass.getSimpleName).request),
inboundTopic = Some(Topics.createTopicByClassName(OutboundGetAccountbyAccountID.getClass.getSimpleName).response),
outboundTopic = Some(Topics.createTopicByClassName(OutboundGetCoreBankAccounts.getClass.getSimpleName).request),
inboundTopic = Some(Topics.createTopicByClassName(OutboundGetCoreBankAccounts.getClass.getSimpleName).response),
exampleOutboundMessage = decompose(
OutboundGetAccountbyAccountID(
OutboundGetCoreBankAccounts(
authInfoExample,
bankIdExample.value,
accountIdExample.value
List(BankIdAccountId(BankId(bankIdExample.value),
AccountId(accountIdExample.value))
)
),
)),
exampleInboundMessage = decompose(
InboundGetAccountbyAccountID(
InboundGetCoreBankAccounts(
inboundAuthInfoExample,
statusExample,
Some(inboundAccountSept2018Example))),
List(InternalInboundCoreAccount(
errorCodeExample,
inboundStatusMessagesExample,
accountIdExample.value,
labelExample.value,
bankIdExample.value,
accountTypeExample.value,
List(accountRoutingExample)
)))),
adapterImplementation = Some(AdapterImplementation("Accounts", 1))
)
override def getCoreBankAccounts(BankIdAccountIds: List[BankIdAccountId], @CacheKeyOmit callContext: Option[CallContext]) : Box[(List[CoreAccount], Option[CallContext])] = saveConnectorMetric{