Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor/add two new BG connector methods #2427

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading