refactor/update routing scheme and address examples in banking model and JSON factory

This commit is contained in:
hongwei 2025-06-03 15:02:34 +02:00
parent 4336fdf64f
commit cdf1d50e7a
3 changed files with 6 additions and 10 deletions

View File

@ -462,7 +462,7 @@ object JSONFactory_BERLIN_GROUP_1_3 extends CustomJsonFormats with MdcLoggable{
def createTransactionJSON(bankAccount: BankAccount, transaction : ModeratedTransaction) : TransactionJsonV13 = {
val bookingDate = transaction.startDate.orNull
val valueDate = transaction.finishDate.orNull
val creditorName = bankAccount.label
val creditorName = transaction.otherBankAccount.map(_.label.display).getOrElse(null)
TransactionJsonV13(
transactionId = transaction.id.value,
creditorName = creditorName,

View File

@ -1460,7 +1460,7 @@ object ExampleValue {
lazy val distributionChannelExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("distribution_channel", distributionChannelExample)
lazy val otherAccountRoutingSchemeExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
lazy val otherAccountRoutingSchemeExample = ConnectorField("IBAN","otherAccountRoutingScheme string, eg: IBAN")
glossaryItems += makeGlossaryItem("other_account_routing_scheme", otherAccountRoutingSchemeExample)
lazy val generateAccountantsViewExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
@ -1714,7 +1714,7 @@ object ExampleValue {
lazy val canAddTransactionRequestToOwnAccountExample = ConnectorField(booleanFalse,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_add_transaction_request_to_own_account", canAddTransactionRequestToOwnAccountExample)
lazy val otherAccountRoutingAddressExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
lazy val otherAccountRoutingAddressExample = ConnectorField("DE89370400440532013000","OtherBankRoutingAddress string, eg IBAN value")
glossaryItems += makeGlossaryItem("other_account_routing_address", otherAccountRoutingAddressExample)
lazy val isFirehoseExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
@ -2472,8 +2472,8 @@ object ExampleValue {
// if these are duplicate with those examples, just delete the follow examples
lazy val counterpartyOtherBankRoutingSchemeExample = ConnectorField("OBP" ,"Counterparty otherBankRoutingScheme string")
lazy val counterpartyOtherBankRoutingAddressExample = ConnectorField("gh.29.uk", "Counterparty otherBankRoutingAddress string")
lazy val counterpartyOtherAccountRoutingSchemeExample = ConnectorField("OBP", "Counterparty otherAccountRoutingScheme string")
lazy val counterpartyOtherAccountRoutingAddressExample = ConnectorField("36f8a9e6-c2b1-407a-8bd0-421b7119307e", "Counterparty otherAccountRoutingAddress string")
lazy val counterpartyOtherAccountRoutingSchemeExample = ConnectorField("IBAN", "Counterparty otherAccountRoutingScheme string")
lazy val counterpartyOtherAccountRoutingAddressExample = ConnectorField("DE89370400440532013000", "Counterparty otherAccountRoutingAddress string")
lazy val counterpartyOtherAccountSecondaryRoutingSchemeExample = ConnectorField("IBAN", "Counterparty otherAccountSecondaryRoutingScheme string")
lazy val counterpartyOtherAccountSecondaryRoutingAddressExample = ConnectorField("DE89370400440532013000", "Counterparty otherAccountSecondaryRoutingAddress string")
lazy val counterpartyOtherAccountProviderExample = ConnectorField("Counterparty otherAccountProvider string", "fix me")

View File

@ -26,13 +26,11 @@ TESOBE (http://www.tesobe.com/)
*/
package com.openbankproject.commons.model
import java.util.Date
import com.openbankproject.commons.util.{OBPRequired, optional}
import java.security.AccessControlContext
import java.util.Date
import javax.security.auth.AuthPermission
import scala.collection.immutable.List
import scala.math.BigDecimal
trait Bank {
@ -289,9 +287,7 @@ case class Counterparty(
val otherBankRoutingScheme: String, // This is the scheme a consumer would use to specify the bank e.g. BIC
@optional
val otherBankRoutingAddress: Option[String], // The (BIC) value e.g. 67895
@optional
val otherAccountRoutingScheme: String, // This is the scheme a consumer would use to instruct a payment e.g. IBAN
@optional
val otherAccountRoutingAddress: Option[String], // The (IBAN) value e.g. 2349870987820374
@optional
val otherAccountProvider: String, // hasBankId and hasAccountId would refer to an OBP account