diff --git a/src/main/scala/code/api/util/ExampleValue.scala b/src/main/scala/code/api/util/ExampleValue.scala new file mode 100644 index 000000000..df3e97813 --- /dev/null +++ b/src/main/scala/code/api/util/ExampleValue.scala @@ -0,0 +1,20 @@ +package code.api.util + +object ExampleValue { + + case class ConnectorField(value: String, description: String) { + + def verbose: String = { + + s"${value} :: ${description}".toString + } + + } + + val bankIdExample = ConnectorField("bankId1", "bankId is a string that MUST uniquely identify the bank on this OBP instance. It COULD be a UUID but is generally a short string that easily identifies the bank / brand it represents.") + + +} + + + diff --git a/src/main/scala/code/bankconnectors/vSept2018/KafkaMappedConnector_vSept2018.scala b/src/main/scala/code/bankconnectors/vSept2018/KafkaMappedConnector_vSept2018.scala index d54fcfbc3..e6a599ced 100644 --- a/src/main/scala/code/bankconnectors/vSept2018/KafkaMappedConnector_vSept2018.scala +++ b/src/main/scala/code/bankconnectors/vSept2018/KafkaMappedConnector_vSept2018.scala @@ -59,6 +59,8 @@ import scala.concurrent.Future import scala.concurrent.duration._ import scala.language.postfixOps +import code.api.util.ExampleValue._ + trait KafkaMappedConnector_vSept2018 extends Connector with KafkaHelper with MdcLoggable { implicit override val nameOfConnector = KafkaMappedConnector_vSept2018.toString @@ -672,7 +674,7 @@ trait KafkaMappedConnector_vSept2018 extends Connector with KafkaHelper with Mdc exampleOutboundMessage = decompose( OutboundCheckBankAccountExists( authInfoExample, - "bankId", + bankIdExample.verbose, "accountId" ) ), @@ -680,7 +682,7 @@ trait KafkaMappedConnector_vSept2018 extends Connector with KafkaHelper with Mdc InboundCheckBankAccountExists( authInfoExample, statusExample, - Some(InboundAccountSept2018("", cbsToken = "cbsToken", bankId = "gh.29.uk", branchId = "222", accountId = "8ca8a7e4-6d02-48e3-a029-0b2bf89de9f0", accountNumber = "123", accountType = "AC", balanceAmount = "50", balanceCurrency = "EUR", owners = "Susan" :: " Frank" :: Nil, viewsToGenerate = "Public" :: "Accountant" :: "Auditor" :: Nil, bankRoutingScheme = "iban", bankRoutingAddress = "bankRoutingAddress", branchRoutingScheme = "branchRoutingScheme", branchRoutingAddress = " branchRoutingAddress", accountRoutingScheme = "accountRoutingScheme", accountRoutingAddress = "accountRoutingAddress", accountRouting = Nil, accountRules = Nil))) + Some(InboundAccountSept2018("", cbsToken = "cbsToken", bankId = bankIdExample.verbose, branchId = "222", accountId = "8ca8a7e4-6d02-48e3-a029-0b2bf89de9f0", accountNumber = "123", accountType = "AC", balanceAmount = "50", balanceCurrency = "EUR", owners = "Susan" :: " Frank" :: Nil, viewsToGenerate = "Public" :: "Accountant" :: "Auditor" :: Nil, bankRoutingScheme = "iban", bankRoutingAddress = "bankRoutingAddress", branchRoutingScheme = "branchRoutingScheme", branchRoutingAddress = " branchRoutingAddress", accountRoutingScheme = "accountRoutingScheme", accountRoutingAddress = "accountRoutingAddress", accountRouting = Nil, accountRules = Nil))) ) ) override def checkBankAccountExists(bankId: BankId, accountId: AccountId, @CacheKeyOmit callContext: Option[CallContext])= saveConnectorMetric {