mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 16:56:56 +00:00
Example field values approach try out.
This commit is contained in:
parent
56653b045a
commit
59623811dd
20
src/main/scala/code/api/util/ExampleValue.scala
Normal file
20
src/main/scala/code/api/util/ExampleValue.scala
Normal file
@ -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.")
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user