mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 13:07:02 +00:00
refactor/Change queryTags => attributes
This commit is contained in:
parent
e73b7cfa02
commit
aa47cbac14
@ -8,7 +8,7 @@
|
||||
<groupId>com.tesobe</groupId>
|
||||
<artifactId>obp-parent</artifactId>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
<version>1.7.0</version>
|
||||
<version>1.7.1</version>
|
||||
</parent>
|
||||
<artifactId>obp-api</artifactId>
|
||||
<packaging>war</packaging>
|
||||
|
||||
@ -15,6 +15,7 @@ import com.openbankproject.commons.model.{BankAccount, TransactionRequest, User}
|
||||
import net.liftweb.common.Full
|
||||
import net.liftweb.json.JValue
|
||||
|
||||
import scala.collection.immutable
|
||||
import scala.collection.immutable.List
|
||||
|
||||
case class JvalueCaseClass(jvalueToCaseclass: JValue)
|
||||
@ -293,7 +294,7 @@ object JSONFactory_BERLIN_GROUP_1_3 extends CustomJsonFormats {
|
||||
}
|
||||
|
||||
def createCardAccountListJson(bankAccounts: List[BankAccount], user: User): CoreCardAccountsJsonV13 = {
|
||||
CoreCardAccountsJsonV13(bankAccounts.filter(_.queryTags.getOrElse(List("")).contains("Card")).map {
|
||||
CoreCardAccountsJsonV13(bankAccounts.filter(_.attributes.map(_.map(_.name)) == "CashAccountType").map {
|
||||
x =>
|
||||
val (iBan: String, bBan: String) = getIbanAndBban(x)
|
||||
|
||||
|
||||
@ -327,6 +327,15 @@ object ExampleValue {
|
||||
|
||||
lazy val cbsErrorCodeExample = ConnectorField("500-OFFLINE", "An error code returned by the CBS")
|
||||
|
||||
lazy val attributeNameExample = ConnectorField("STATUS", s"Transaction attribute name")
|
||||
glossaryItems += makeGlossaryItem("Transaction.attributeName", attributeNameExample)
|
||||
|
||||
lazy val attributeTypeExample = ConnectorField("STRING", s"Transaction attribute type.")
|
||||
glossaryItems += makeGlossaryItem("Transaction.attributeType", attributeTypeExample)
|
||||
|
||||
lazy val attributeValueExample = ConnectorField("closed", s"Transaction attribute value.")
|
||||
glossaryItems += makeGlossaryItem("Transaction.attributeValue", attributeValueExample)
|
||||
|
||||
//------------------------------------------------------------
|
||||
// TODO @Simon please fix the follow example values to reasonable values
|
||||
lazy val dateOfBirthExample = ConnectorField("2018-03-09", "customer birthday")
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -7,7 +7,7 @@
|
||||
<groupId>com.tesobe</groupId>
|
||||
<artifactId>obp-parent</artifactId>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
<version>1.7.0</version>
|
||||
<version>1.7.1</version>
|
||||
</parent>
|
||||
<artifactId>obp-commons</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
@ -200,7 +200,7 @@ trait BankAccount{
|
||||
//Because of in OBP side, we just have one account table, no difference for different types of accounts.
|
||||
//So here, we introduce the field for the OBP presentation layer to filter the accounts.
|
||||
//also @`Reads a list of card accounts` in Berlin group V1.3 ..
|
||||
def queryTags : Option[List[String]] = None
|
||||
def attributes : Option[List[Attribute]] = None
|
||||
}
|
||||
|
||||
//This class is used for propagate the BankAccount as the parameters over different methods.
|
||||
@ -294,6 +294,11 @@ case class Iban(
|
||||
iban: String
|
||||
)
|
||||
|
||||
case class Attribute(
|
||||
name: String,
|
||||
`type`: String,
|
||||
value: String
|
||||
)
|
||||
case class AccountRule(
|
||||
scheme: String,
|
||||
value: String
|
||||
|
||||
@ -129,7 +129,7 @@ case class BankAccountCommons(
|
||||
accountRules :List[AccountRule],
|
||||
@optional
|
||||
accountHolder :String,
|
||||
override val queryTags : Option[List[String]] = None) extends BankAccount
|
||||
override val attributes : Option[List[Attribute]] = None) extends BankAccount
|
||||
|
||||
object BankAccountCommons extends Converter[BankAccount, BankAccountCommons]
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user