Skip to content

Commit

Permalink
Merge pull request #2427 from hongwei1/develop
Browse files Browse the repository at this point in the history
refactor/add two new BG connector methods
  • Loading branch information
simonredfern authored Sep 23, 2024
2 parents 343dd56 + 368c931 commit 34e2c23
Show file tree
Hide file tree
Showing 39 changed files with 1,067 additions and 544 deletions.
3 changes: 2 additions & 1 deletion obp-api/src/main/resources/props/sample.props.template
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,8 @@ database_messages_scheduler_interval=3600
ReadTransactionsBasic,\
ReadTransactionsDebits,\
ReadTransactionsDetail, \
ReadAccountsBerlinGroup
ReadAccountsBerlinGroup, \
InitiatePaymentsBerlinGroup
# -----------------------------------------------------------------------------


Expand Down
17 changes: 10 additions & 7 deletions obp-api/src/main/scala/bootstrap/liftweb/Boot.scala
Original file line number Diff line number Diff line change
Expand Up @@ -286,19 +286,22 @@ class Boot extends MdcLoggable {

APIUtil.getPropsValue("additional_system_views") match {
case Full(value) =>
val viewSetUKOpenBanking = value.split(",").map(_.trim).toList
val viewsUKOpenBanking = List(
SYSTEM_READ_ACCOUNTS_BASIC_VIEW_ID, SYSTEM_READ_ACCOUNTS_DETAIL_VIEW_ID,
SYSTEM_READ_BALANCES_VIEW_ID, SYSTEM_READ_TRANSACTIONS_BASIC_VIEW_ID,
SYSTEM_READ_TRANSACTIONS_DEBITS_VIEW_ID, SYSTEM_READ_TRANSACTIONS_DETAIL_VIEW_ID,
val additionalSystemViewsFromProps = value.split(",").map(_.trim).toList
val additionalSystemViews = List(
SYSTEM_READ_ACCOUNTS_BASIC_VIEW_ID,
SYSTEM_READ_ACCOUNTS_DETAIL_VIEW_ID,
SYSTEM_READ_BALANCES_VIEW_ID,
SYSTEM_READ_TRANSACTIONS_BASIC_VIEW_ID,
SYSTEM_READ_TRANSACTIONS_DEBITS_VIEW_ID,
SYSTEM_READ_TRANSACTIONS_DETAIL_VIEW_ID,
SYSTEM_READ_ACCOUNTS_BERLIN_GROUP_VIEW_ID,
SYSTEM_READ_BALANCES_BERLIN_GROUP_VIEW_ID,
SYSTEM_READ_TRANSACTIONS_BERLIN_GROUP_VIEW_ID,
SYSTEM_INITIATE_PAYMENTS_BERLIN_GROUP_VIEW_ID
)
for {
systemView <- viewSetUKOpenBanking
if viewsUKOpenBanking.exists(_ == systemView)
systemView <- additionalSystemViewsFromProps
if additionalSystemViews.exists(_ == systemView)
} {
Views.views.vend.getOrCreateSystemView(systemView)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ import code.connectormethod.{JsonConnectorMethod, JsonConnectorMethodMethodBody}
import code.dynamicMessageDoc.JsonDynamicMessageDoc
import code.dynamicResourceDoc.JsonDynamicResourceDoc
import code.sandbox.SandboxData
import code.transactionrequests.TransactionRequests.TransactionRequestTypes._
import com.openbankproject.commons.model.enums.TransactionRequestTypes._
import com.openbankproject.commons.model.enums.PaymentServiceTypes._
import com.github.dwickern.macros.NameOf.nameOf
import com.openbankproject.commons.model
import com.openbankproject.commons.model.PinResetReason.{FORGOT, GOOD_SECURITY_PRACTICE}
Expand Down Expand Up @@ -620,31 +621,6 @@ object SwaggerDefinitionsJSON {
description = descriptionExample.value
)

val transactionRequest = TransactionRequest(
id= transactionRequestIdSwagger,
`type`= "String",
from= transactionRequestAccount,
body= transactionRequestBodyAllTypes,
transaction_ids= "String",
status= "String",
start_date= DateWithDayExampleObject,
end_date= DateWithDayExampleObject,
challenge= transactionRequestChallenge,
charge= transactionRequestCharge,
charge_policy= "String",
counterparty_id= counterpartyIdSwagger,
name= "String",
this_bank_id= bankIdSwagger,
this_account_id= accountIdSwagger,
this_view_id= viewIdSwagger,
other_account_routing_scheme= counterpartyOtherAccountRoutingSchemeExample.value,
other_account_routing_address= counterpartyOtherAccountRoutingAddressExample.value,
other_bank_routing_scheme= counterpartyOtherBankRoutingSchemeExample.value,
other_bank_routing_address= counterpartyOtherBankRoutingAddressExample.value,
is_beneficiary= true,
future_date = Some(futureDateExample.value)
)

val adapterImplementationJson = AdapterImplementationJson("CORE",3)

val messageDocJson = MessageDocJson(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ object JSONFactory_BERLIN_GROUP_1_3 extends CustomJsonFormats {
)
}

def createTransactionRequestJson(transactionRequest : TransactionRequest) : InitiatePaymentResponseJson = {
def createTransactionRequestJson(transactionRequest : TransactionRequestBGV1) : InitiatePaymentResponseJson = {
// - 'ACCC': 'AcceptedSettlementCompleted' -
// Settlement on the creditor's account has been completed.
// - 'ACCP': 'AcceptedCustomerProfile' -
Expand Down
Loading

0 comments on commit 34e2c23

Please sign in to comment.