Skip to content

Commit

Permalink
refactor/added two connector methods for StoredProcedureConnector_vDe…
Browse files Browse the repository at this point in the history
…c2019
  • Loading branch information
hongwei1 committed Sep 20, 2024
1 parent 3827d8f commit 368c931
Show file tree
Hide file tree
Showing 25 changed files with 238 additions and 51 deletions.
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
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,16 @@ import code.api.berlin.group.v1_3.model._
import code.bankconnectors.Connector
import code.fx.fx
import code.api.Constant._
import code.transactionrequests.TransactionRequests.PaymentServiceTypes.PaymentServiceTypes
import code.transactionrequests.TransactionRequests.TransactionRequestTypes.{SEPA_CREDIT_TRANSFERS, TransactionRequestTypes}
import code.transactionrequests.TransactionRequests.{PaymentServiceTypes, TransactionRequestTypes}
import code.util.Helper
import code.views.Views
import com.github.dwickern.macros.NameOf.nameOf
import com.openbankproject.commons.ExecutionContext.Implicits.global
import com.openbankproject.commons.model._
import com.openbankproject.commons.model.enums.ChallengeType.BERLIN_GROUP_PAYMENT_CHALLENGE
import com.openbankproject.commons.model.enums.TransactionRequestStatus._
import com.openbankproject.commons.model.enums.{ChallengeType, StrongCustomerAuthenticationStatus, SuppliedAnswerType, TransactionRequestStatus}
import com.openbankproject.commons.model.enums.{ChallengeType, StrongCustomerAuthenticationStatus, SuppliedAnswerType, TransactionRequestStatus,TransactionRequestTypes,PaymentServiceTypes}
import com.openbankproject.commons.model.enums.TransactionRequestTypes._
import com.openbankproject.commons.model.enums.PaymentServiceTypes._
import com.openbankproject.commons.util.ApiVersion
import net.liftweb
import net.liftweb.common.Box.tryo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import code.api.util.ErrorMessages._
import code.api.util.NewStyle.HttpCode
import code.api.util._
import code.endpointMapping.EndpointMappingCommons
import code.transactionrequests.TransactionRequests.TransactionRequestTypes.{apply => _}
import com.openbankproject.commons.model.enums.TransactionRequestTypes._
import code.util.Helper
import com.openbankproject.commons.ExecutionContext.Implicits.global
import com.openbankproject.commons.model._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import code.api.util.ErrorMessages._
import code.api.util.NewStyle.HttpCode
import code.api.util._
import code.endpointMapping.EndpointMappingCommons
import code.transactionrequests.TransactionRequests.TransactionRequestTypes.{apply => _}
import com.openbankproject.commons.model.enums.TransactionRequestTypes._
import com.openbankproject.commons.model.enums.PaymentServiceTypes._
import code.util.Helper
import com.openbankproject.commons.ExecutionContext.Implicits.global
import com.openbankproject.commons.model._
Expand Down
5 changes: 2 additions & 3 deletions obp-api/src/main/scala/code/api/util/NewStyle.scala
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ import com.github.dwickern.macros.NameOf.nameOf
import com.openbankproject.commons.dto.{CustomerAndAttribute, ProductCollectionItemsTree}
import com.openbankproject.commons.model.enums.StrongCustomerAuthentication.SCA
import com.openbankproject.commons.model.enums.StrongCustomerAuthenticationStatus.SCAStatus
import com.openbankproject.commons.model.enums.TransactionRequestTypes._
import com.openbankproject.commons.model.enums.PaymentServiceTypes._
import com.openbankproject.commons.model.enums._
import com.openbankproject.commons.model.{AccountApplication, Bank, Customer, CustomerAddress, Product, ProductCollection, ProductCollectionItem, TaxResidence, UserAuthContext, UserAuthContextUpdate, _}
import com.tesobe.CacheKeyFromArguments
Expand Down Expand Up @@ -79,9 +81,6 @@ import code.dynamicMessageDoc.{DynamicMessageDocProvider, JsonDynamicMessageDoc}
import code.dynamicResourceDoc.{DynamicResourceDocProvider, JsonDynamicResourceDoc}
import code.endpointMapping.{EndpointMappingProvider, EndpointMappingT}
import code.endpointTag.EndpointTagT
import code.transactionrequests.TransactionRequests.{PaymentServiceTypes, TransactionRequestTypes}
import code.transactionrequests.TransactionRequests.PaymentServiceTypes.PaymentServiceTypes
import code.transactionrequests.TransactionRequests.TransactionRequestTypes.TransactionRequestTypes
import code.util.Helper.MdcLoggable
import code.views.system.AccountAccess
import com.openbankproject.commons.model.enums.SuppliedAnswerType
Expand Down
2 changes: 1 addition & 1 deletion obp-api/src/main/scala/code/api/v1_4_0/APIMethods140.scala
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ trait APIMethods140 extends MdcLoggable with APIMethods130 with APIMethods121{
"Get all Transaction Requests",
"",
emptyObjectJson,
List(transactionRequestJson),
transactionRequestJson,
List(
UserNotLoggedIn,
BankNotFound,
Expand Down
8 changes: 5 additions & 3 deletions obp-api/src/main/scala/code/api/v2_1_0/APIMethods210.scala
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@ import code.fx.fx
import code.metrics.APIMetrics
import code.model.{BankAccountX, BankX, Consumer, UserX, toUserExtended}
import code.sandbox.SandboxData
import code.transactionrequests.TransactionRequests.TransactionRequestTypes
import code.usercustomerlinks.UserCustomerLink
import code.users.Users
import code.util.Helper.booleanToBox
import code.views.Views
import code.views.system.ViewDefinition
import com.github.dwickern.macros.NameOf.nameOf
import com.openbankproject.commons.model._
import com.openbankproject.commons.model.enums.{ChallengeType, SuppliedAnswerType}
import com.openbankproject.commons.model.enums.{ChallengeType, SuppliedAnswerType, TransactionRequestTypes}
import com.openbankproject.commons.model.enums.TransactionRequestTypes._
import com.openbankproject.commons.model.enums.PaymentServiceTypes._
import com.openbankproject.commons.util.ApiVersion
import net.liftweb.json.Extraction
import net.liftweb.util.Helpers.tryo
Expand All @@ -48,7 +49,8 @@ import code.api.util.ApiRole._
import code.api.util.ErrorMessages._
import code.api.{APIFailure, ChargePolicy}
import code.sandbox.{OBPDataImport, SandboxDataImport}
import code.transactionrequests.TransactionRequests.TransactionRequestTypes._
import com.openbankproject.commons.model.enums.TransactionRequestTypes._
import com.openbankproject.commons.model.enums.PaymentServiceTypes._
import code.util.Helper
import code.util.Helper._
import net.liftweb.common.{Box, Full}
Expand Down
4 changes: 2 additions & 2 deletions obp-api/src/main/scala/code/api/v4_0_0/APIMethods400.scala
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ import code.scope.Scope
import code.snippet.{WebUIPlaceholder, WebUITemplate}
import code.transactionChallenge.MappedExpectedChallengeAnswer
import code.transactionrequests.MappedTransactionRequestProvider
import code.transactionrequests.TransactionRequests.TransactionRequestTypes
import code.transactionrequests.TransactionRequests.TransactionRequestTypes.{apply => _, _}
import code.usercustomerlinks.UserCustomerLink
import code.userlocks.UserLocksProvider
import code.users.Users
Expand All @@ -87,6 +85,8 @@ import com.openbankproject.commons.model.enums.ChallengeType.OBP_TRANSACTION_REQ
import com.openbankproject.commons.model.enums.DynamicEntityOperation._
import com.openbankproject.commons.model.enums.{TransactionRequestStatus, _}
import com.openbankproject.commons.model._
import com.openbankproject.commons.model.enums.TransactionRequestTypes._
import com.openbankproject.commons.model.enums.PaymentServiceTypes._
import com.openbankproject.commons.util.{ApiVersion, JsonUtils, ScannedApiVersion}
import deletion._
import net.liftweb.common._
Expand Down
5 changes: 4 additions & 1 deletion obp-api/src/main/scala/code/api/v5_0_0/APIMethods500.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ import code.entitlement.Entitlement
import code.metrics.APIMetrics
import code.model._
import code.model.dataAccess.BankAccountCreation
import code.transactionrequests.TransactionRequests.TransactionRequestTypes.{apply => _}
import com.openbankproject.commons.model.enums.TransactionRequestTypes._
import com.openbankproject.commons.model.enums.TransactionRequestTypes
import code.util.Helper
import code.util.Helper.{SILENCE_IS_GOLDEN, booleanToFuture}
import code.views.Views
Expand All @@ -32,6 +33,8 @@ import com.openbankproject.commons.ExecutionContext.Implicits.global
import com.openbankproject.commons.model.enums.StrongCustomerAuthentication
import com.openbankproject.commons.model._
import com.openbankproject.commons.util.ApiVersion
import com.openbankproject.commons.model.enums.TransactionRequestTypes._
import com.openbankproject.commons.model.enums.PaymentServiceTypes._
import net.liftweb.common.{Empty, Full}
import net.liftweb.http.Req
import net.liftweb.http.rest.RestHelper
Expand Down
3 changes: 2 additions & 1 deletion obp-api/src/main/scala/code/api/v5_1_0/APIMethods510.scala
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import code.metrics.APIMetrics
import code.model.{AppType, BankAccountX}
import code.model.dataAccess.MappedBankAccount
import code.regulatedentities.MappedRegulatedEntityProvider
import code.transactionrequests.TransactionRequests.TransactionRequestTypes.{apply => _}
import code.userlocks.UserLocksProvider
import code.users.Users
import code.util.Helper
Expand All @@ -45,6 +44,8 @@ import code.views.system.{AccountAccess, ViewDefinition}
import com.github.dwickern.macros.NameOf.nameOf
import com.openbankproject.commons.ExecutionContext.Implicits.global
import com.openbankproject.commons.model.enums.{AtmAttributeType, UserAttributeType}
import com.openbankproject.commons.model.enums.TransactionRequestTypes._
import com.openbankproject.commons.model.enums.PaymentServiceTypes._
import com.openbankproject.commons.model._
import com.openbankproject.commons.util.{ApiVersion, ScannedApiVersion}
import net.liftweb.common.Full
Expand Down
4 changes: 2 additions & 2 deletions obp-api/src/main/scala/code/bankconnectors/Connector.scala
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ import code.model.toUserExtended
import code.productfee.ProductFeeX
import code.standingorders.StandingOrderTrait
import code.transactionrequests.TransactionRequests
import code.transactionrequests.TransactionRequests.PaymentServiceTypes.PaymentServiceTypes
import code.transactionrequests.TransactionRequests.TransactionRequestTypes._
import com.openbankproject.commons.model.enums.TransactionRequestTypes._
import com.openbankproject.commons.model.enums.PaymentServiceTypes._
import code.transactionrequests.TransactionRequests._
import code.users.{UserAttribute, Users}
import code.util.Helper._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,8 @@ object ConnectorBuilderUtil {

"createChallenges",
"createTransactionRequestv400",
"createTransactionRequestSepaCreditTransfersBGV1",
"createTransactionRequestPeriodicSepaCreditTransfersBGV1",
"getCustomersByCustomerPhoneNumber",
"getTransactionAttributeById",
"createOrUpdateCustomerAttribute",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,10 @@ import code.transaction.MappedTransaction
import code.transactionChallenge.{Challenges, MappedExpectedChallengeAnswer}
import code.transactionRequestAttribute.TransactionRequestAttributeX
import code.transactionattribute.TransactionAttributeX
import code.transactionrequests.TransactionRequests.PaymentServiceTypes.PaymentServiceTypes
import code.transactionrequests.TransactionRequests.TransactionRequestTypes._
import code.transactionrequests.TransactionRequests.TransactionRequestTypes
import com.openbankproject.commons.model.enums.TransactionRequestTypes._
import com.openbankproject.commons.model.enums.TransactionRequestTypes
import com.openbankproject.commons.model.enums.PaymentServiceTypes._
import com.openbankproject.commons.model.enums.PaymentServiceTypes
import code.transactionrequests._
import code.users.{UserAttribute, UserAttributeProvider, Users}
import code.util.Helper
Expand All @@ -84,6 +85,8 @@ import com.openbankproject.commons.model.enums.StrongCustomerAuthentication.SCA
import com.openbankproject.commons.model.enums.StrongCustomerAuthenticationStatus.SCAStatus
import com.openbankproject.commons.model.enums.SuppliedAnswerType
import com.openbankproject.commons.model.enums.{TransactionRequestStatus, _}
import com.openbankproject.commons.model.enums.TransactionRequestTypes._
import com.openbankproject.commons.model.enums.PaymentServiceTypes._
import com.openbankproject.commons.model.{AccountApplication, AccountAttribute, ConsentImplicitSCAT, DirectDebitTrait, FXRate, Product, ProductAttribute, ProductCollectionItem, TaxResidence, TransactionRequestCommonBodyJSON, _}
import com.tesobe.CacheKeyFromArguments
import com.tesobe.model.UpdateBankAccount
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import code.api.util.APIUtil._
import code.api.util.ErrorMessages._
import code.api.util._
import code.bankconnectors.LocalMappedConnector._
import code.transactionrequests.TransactionRequests.PaymentServiceTypes.PaymentServiceTypes
import code.transactionrequests.TransactionRequests.TransactionRequestTypes._
import code.transactionrequests._
import code.util.Helper
import code.util.Helper._
import com.openbankproject.commons.ExecutionContext.Implicits.global
import com.openbankproject.commons.model._
import com.openbankproject.commons.model.enums.TransactionRequestStatus
import com.openbankproject.commons.model.enums.TransactionRequestTypes
import com.openbankproject.commons.model.enums.PaymentServiceTypes
import net.liftweb.common._
import net.liftweb.json.Serialization.write
import net.liftweb.json.{NoTypeHints, Serialization}
Expand Down
Loading

0 comments on commit 368c931

Please sign in to comment.