diff --git a/src/main/scala/bootstrap/liftweb/Boot.scala b/src/main/scala/bootstrap/liftweb/Boot.scala
index 479d147d9..fe039315c 100644
--- a/src/main/scala/bootstrap/liftweb/Boot.scala
+++ b/src/main/scala/bootstrap/liftweb/Boot.scala
@@ -279,9 +279,6 @@ class Boot extends MdcLoggable {
enableVersionIfAllowed(ApiVersion.v2_2_0)
enableVersionIfAllowed(ApiVersion.v3_0_0)
enableVersionIfAllowed(ApiVersion.v3_1_0)
- enableVersionIfAllowed(ApiVersion.berlinGroupV1)
- enableVersionIfAllowed(ApiVersion.ukOpenBankingV200)
- enableVersionIfAllowed(ApiVersion.ukOpenBankingV310)
enableVersionIfAllowed(ApiVersion.apiBuilder)
// TODO Wrap these with enableVersionIfAllowed as well
diff --git a/src/main/scala/code/api/APIBuilder/APIBuilderModel.scala b/src/main/scala/code/api/APIBuilder/APIBuilderModel.scala
index b554e2e46..3e62dc3d8 100644
--- a/src/main/scala/code/api/APIBuilder/APIBuilderModel.scala
+++ b/src/main/scala/code/api/APIBuilder/APIBuilderModel.scala
@@ -543,7 +543,7 @@ trait APIMethods_APIBuilder
val ImplementationsBuilderAPI = new Object()
{
- val apiVersion: ApiVersion = ApiVersion.apiBuilder
+ val apiVersion = ApiVersion.apiBuilder
val resourceDocs = ArrayBuffer[ResourceDoc]()
val apiRelations = ArrayBuffer[ApiRelation]()
val codeContext = CodeContext(resourceDocs, apiRelations)
diff --git a/src/main/scala/code/api/Polish/v2_1_1_1/AISApi.scala b/src/main/scala/code/api/Polish/v2_1_1_1/AISApi.scala
new file mode 100644
index 000000000..1ffaf4115
--- /dev/null
+++ b/src/main/scala/code/api/Polish/v2_1_1_1/AISApi.scala
@@ -0,0 +1,673 @@
+package code.api.Polish.v2_1_1_1
+
+import code.api.APIFailureNewStyle
+import code.api.berlin.group.v1_3.JvalueCaseClass
+import net.liftweb.json
+import net.liftweb.json._
+import code.api.util.APIUtil.{defaultBankId, _}
+import code.api.util.{ApiVersion, NewStyle}
+import code.api.util.ErrorMessages._
+import code.api.util.ApiTag._
+import code.api.util.NewStyle.HttpCode
+import code.bankconnectors.Connector
+import code.model._
+import code.util.Helper
+import code.views.Views
+import net.liftweb.common.Full
+import net.liftweb.http.rest.RestHelper
+import com.github.dwickern.macros.NameOf.nameOf
+import scala.collection.immutable.Nil
+import scala.collection.mutable.ArrayBuffer
+import scala.concurrent.ExecutionContext.Implicits.global
+import scala.concurrent.Future
+import code.api.Polish.v2_1_1_1.OBP_PAPI_2_1_1_1
+import code.api.util.ApiTag
+
+object APIMethods_AISApi extends RestHelper {
+ val apiVersion = OBP_PAPI_2_1_1_1.apiVersion
+ val resourceDocs = ArrayBuffer[ResourceDoc]()
+ val apiRelations = ArrayBuffer[ApiRelation]()
+ protected implicit def JvalueToSuper(what: JValue): JvalueCaseClass = JvalueCaseClass(what)
+
+ val endpoints =
+ deleteConsent ::
+ getAccount ::
+ getAccounts ::
+ getHolds ::
+ getTransactionDetail ::
+ getTransactionsCancelled ::
+ getTransactionsDone ::
+ getTransactionsPending ::
+ getTransactionsRejected ::
+ getTransactionsScheduled ::
+ Nil
+
+
+ resourceDocs += ResourceDoc(
+ deleteConsent,
+ apiVersion,
+ nameOf(deleteConsent),
+ "POST",
+ "/accounts/v2_1_1.1/deleteConsent",
+ "Removes consent",
+ s"""${mockedDataText(true)}
+Removes consent""",
+ json.parse("""{
+ "consentId" : "consentId"
+}"""),
+ json.parse(""""""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("AIS") :: apiTagMockedData :: Nil
+ )
+
+ lazy val deleteConsent : OBPEndpoint = {
+ case "accounts":: "v2_1_1.1":: "deleteConsent" :: Nil JsonPost _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse(""""""), callContext)
+ }
+ }
+ }
+
+ resourceDocs += ResourceDoc(
+ getAccount,
+ apiVersion,
+ nameOf(getAccount),
+ "POST",
+ "/accounts/v2_1_1.1/getAccount",
+ "Get detailed information about user payment account",
+ s"""${mockedDataText(true)}
+User identification based on access token""",
+ json.parse("""{
+ "requestHeader" : "",
+ "accountNumber" : "accountNumber"
+}"""),
+ json.parse("""{
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ },
+ "account" : {
+ "auxData" : { },
+ "bank" : {
+ "address" : "",
+ "bicOrSwift" : "bicOrSwift",
+ "name" : "name"
+ },
+ "bookingBalance" : "bookingBalance",
+ "accountType" : {
+ "code" : "code",
+ "description" : "description"
+ },
+ "accountTypeName" : "accountTypeName",
+ "currency" : "currency",
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : "accountNumber",
+ "accountNameClient" : "accountNameClient",
+ "accountHolderType" : "individual",
+ "availableBalance" : "availableBalance"
+ }
+}"""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("AIS") :: apiTagMockedData :: Nil
+ )
+
+ lazy val getAccount : OBPEndpoint = {
+ case "accounts":: "v2_1_1.1":: "getAccount" :: Nil JsonPost _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse("""{
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ },
+ "account" : {
+ "auxData" : { },
+ "bank" : {
+ "address" : "",
+ "bicOrSwift" : "bicOrSwift",
+ "name" : "name"
+ },
+ "bookingBalance" : "bookingBalance",
+ "accountType" : {
+ "code" : "code",
+ "description" : "description"
+ },
+ "accountTypeName" : "accountTypeName",
+ "currency" : "currency",
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : "accountNumber",
+ "accountNameClient" : "accountNameClient",
+ "accountHolderType" : "individual",
+ "availableBalance" : "availableBalance"
+ }
+}"""), callContext)
+ }
+ }
+ }
+
+ resourceDocs += ResourceDoc(
+ getAccounts,
+ apiVersion,
+ nameOf(getAccounts),
+ "POST",
+ "/accounts/v2_1_1.1/getAccounts",
+ "Get information about all user's payment account",
+ s"""${mockedDataText(true)}
+User identification based on access token""",
+ json.parse("""{
+ "perPage" : 1,
+ "requestHeader" : "",
+ "pageId" : "pageId"
+}"""),
+ json.parse("""{
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ },
+ "pageInfo" : {
+ "previousPage" : "previousPage",
+ "nextPage" : "nextPage"
+ },
+ "accounts" : [ {
+ "accountType" : {
+ "code" : "code",
+ "description" : "description"
+ },
+ "accountTypeName" : "accountTypeName",
+ "accountNumber" : "accountNumber"
+ }, {
+ "accountType" : {
+ "code" : "code",
+ "description" : "description"
+ },
+ "accountTypeName" : "accountTypeName",
+ "accountNumber" : "accountNumber"
+ } ]
+}"""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("AIS") :: apiTagMockedData :: Nil
+ )
+
+ lazy val getAccounts : OBPEndpoint = {
+ case "accounts":: "v2_1_1.1":: "getAccounts" :: Nil JsonPost _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse("""{
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ },
+ "pageInfo" : {
+ "previousPage" : "previousPage",
+ "nextPage" : "nextPage"
+ },
+ "accounts" : [ {
+ "accountType" : {
+ "code" : "code",
+ "description" : "description"
+ },
+ "accountTypeName" : "accountTypeName",
+ "accountNumber" : "accountNumber"
+ }, {
+ "accountType" : {
+ "code" : "code",
+ "description" : "description"
+ },
+ "accountTypeName" : "accountTypeName",
+ "accountNumber" : "accountNumber"
+ } ]
+}"""), callContext)
+ }
+ }
+ }
+
+ resourceDocs += ResourceDoc(
+ getHolds,
+ apiVersion,
+ nameOf(getHolds),
+ "POST",
+ "/accounts/v2_1_1.1/getHolds",
+ "Get list of user's holded operations",
+ s"""${mockedDataText(true)}
+""",
+ json.parse(""""""""),
+ json.parse("""{
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ },
+ "pageInfo" : {
+ "previousPage" : "previousPage",
+ "nextPage" : "nextPage"
+ },
+ "holds" : [ "", "" ]
+}"""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("AIS") :: apiTagMockedData :: Nil
+ )
+
+ lazy val getHolds : OBPEndpoint = {
+ case "accounts":: "v2_1_1.1":: "getHolds" :: Nil JsonPost _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse("""{
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ },
+ "pageInfo" : {
+ "previousPage" : "previousPage",
+ "nextPage" : "nextPage"
+ },
+ "holds" : [ "", "" ]
+}"""), callContext)
+ }
+ }
+ }
+
+ resourceDocs += ResourceDoc(
+ getTransactionDetail,
+ apiVersion,
+ nameOf(getTransactionDetail),
+ "POST",
+ "/accounts/v2_1_1.1/getTransactionDetail",
+ "Get detailed information about user's single transaction",
+ s"""${mockedDataText(true)}
+""",
+ json.parse("""{
+ "itemId" : "itemId",
+ "requestHeader" : "",
+ "bookingDate" : "2000-01-23T04:56:07.000+00:00",
+ "accountNumber" : "accountNumber"
+}"""),
+ json.parse("""{
+ "baseInfo" : "",
+ "cardInfo" : {
+ "cardHolder" : "cardHolder",
+ "cardNumber" : "cardNumber"
+ },
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ },
+ "baseCurrency" : "baseCurrency",
+ "usedPaymentInstrumentId" : "usedPaymentInstrumentId",
+ "holdExpirationDate" : "2000-01-23T04:56:07.000+00:00",
+ "zusInfo" : {
+ "contributionType" : "contributionType",
+ "contributionId" : "contributionId",
+ "paymentTypeId" : "paymentTypeId",
+ "payerInfo" : {
+ "nip" : "nip",
+ "additionalPayorId" : "additionalPayorId",
+ "additionalPayorIdType" : "P"
+ },
+ "contributionPeriod" : "contributionPeriod",
+ "obligationId" : "obligationId"
+ },
+ "usInfo" : {
+ "periodId" : "periodId",
+ "periodType" : "periodType",
+ "payerInfo" : {
+ "payorId" : "payorId",
+ "payorIdType" : "N"
+ },
+ "formCode" : "formCode",
+ "year" : 6026,
+ "obligationId" : "obligationId"
+ },
+ "tppTransactionId" : "tppTransactionId",
+ "transactionRate" : [ {
+ "rate" : 0.8008281904610115,
+ "toCurrency" : "toCurrency",
+ "fromCurrency" : "fromCurrency"
+ }, {
+ "rate" : 0.8008281904610115,
+ "toCurrency" : "toCurrency",
+ "fromCurrency" : "fromCurrency"
+ } ],
+ "currencyDate" : "2000-01-23T04:56:07.000+00:00",
+ "rejectionReason" : "rejectionReason",
+ "amountBaseCurrency" : "amountBaseCurrency",
+ "tppName" : "tppName"
+}"""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("AIS") :: apiTagMockedData :: Nil
+ )
+
+ lazy val getTransactionDetail : OBPEndpoint = {
+ case "accounts":: "v2_1_1.1":: "getTransactionDetail" :: Nil JsonPost _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse("""{
+ "baseInfo" : "",
+ "cardInfo" : {
+ "cardHolder" : "cardHolder",
+ "cardNumber" : "cardNumber"
+ },
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ },
+ "baseCurrency" : "baseCurrency",
+ "usedPaymentInstrumentId" : "usedPaymentInstrumentId",
+ "holdExpirationDate" : "2000-01-23T04:56:07.000+00:00",
+ "zusInfo" : {
+ "contributionType" : "contributionType",
+ "contributionId" : "contributionId",
+ "paymentTypeId" : "paymentTypeId",
+ "payerInfo" : {
+ "nip" : "nip",
+ "additionalPayorId" : "additionalPayorId",
+ "additionalPayorIdType" : "P"
+ },
+ "contributionPeriod" : "contributionPeriod",
+ "obligationId" : "obligationId"
+ },
+ "usInfo" : {
+ "periodId" : "periodId",
+ "periodType" : "periodType",
+ "payerInfo" : {
+ "payorId" : "payorId",
+ "payorIdType" : "N"
+ },
+ "formCode" : "formCode",
+ "year" : 6026,
+ "obligationId" : "obligationId"
+ },
+ "tppTransactionId" : "tppTransactionId",
+ "transactionRate" : [ {
+ "rate" : 0.8008281904610115,
+ "toCurrency" : "toCurrency",
+ "fromCurrency" : "fromCurrency"
+ }, {
+ "rate" : 0.8008281904610115,
+ "toCurrency" : "toCurrency",
+ "fromCurrency" : "fromCurrency"
+ } ],
+ "currencyDate" : "2000-01-23T04:56:07.000+00:00",
+ "rejectionReason" : "rejectionReason",
+ "amountBaseCurrency" : "amountBaseCurrency",
+ "tppName" : "tppName"
+}"""), callContext)
+ }
+ }
+ }
+
+ resourceDocs += ResourceDoc(
+ getTransactionsCancelled,
+ apiVersion,
+ nameOf(getTransactionsCancelled),
+ "POST",
+ "/accounts/v2_1_1.1/getTransactionsCancelled",
+ "Get list of user cancelled transactions",
+ s"""${mockedDataText(true)}
+""",
+ json.parse(""""""""),
+ json.parse("""{
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ },
+ "pageInfo" : {
+ "previousPage" : "previousPage",
+ "nextPage" : "nextPage"
+ },
+ "transactions" : [ "", "" ]
+}"""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("AIS") :: apiTagMockedData :: Nil
+ )
+
+ lazy val getTransactionsCancelled : OBPEndpoint = {
+ case "accounts":: "v2_1_1.1":: "getTransactionsCancelled" :: Nil JsonPost _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse("""{
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ },
+ "pageInfo" : {
+ "previousPage" : "previousPage",
+ "nextPage" : "nextPage"
+ },
+ "transactions" : [ "", "" ]
+}"""), callContext)
+ }
+ }
+ }
+
+ resourceDocs += ResourceDoc(
+ getTransactionsDone,
+ apiVersion,
+ nameOf(getTransactionsDone),
+ "POST",
+ "/accounts/v2_1_1.1/getTransactionsDone",
+ "Get list of user done transactions",
+ s"""${mockedDataText(true)}
+""",
+ json.parse(""""""""),
+ json.parse("""{
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ },
+ "pageInfo" : {
+ "previousPage" : "previousPage",
+ "nextPage" : "nextPage"
+ },
+ "transactions" : [ "", "" ]
+}"""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("AIS") :: apiTagMockedData :: Nil
+ )
+
+ lazy val getTransactionsDone : OBPEndpoint = {
+ case "accounts":: "v2_1_1.1":: "getTransactionsDone" :: Nil JsonPost _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse("""{
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ },
+ "pageInfo" : {
+ "previousPage" : "previousPage",
+ "nextPage" : "nextPage"
+ },
+ "transactions" : [ "", "" ]
+}"""), callContext)
+ }
+ }
+ }
+
+ resourceDocs += ResourceDoc(
+ getTransactionsPending,
+ apiVersion,
+ nameOf(getTransactionsPending),
+ "POST",
+ "/accounts/v2_1_1.1/getTransactionsPending",
+ "Get list of user's pending transactions",
+ s"""${mockedDataText(true)}
+""",
+ json.parse(""""""""),
+ json.parse("""{
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ },
+ "pageInfo" : {
+ "previousPage" : "previousPage",
+ "nextPage" : "nextPage"
+ },
+ "transactions" : [ "", "" ]
+}"""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("AIS") :: apiTagMockedData :: Nil
+ )
+
+ lazy val getTransactionsPending : OBPEndpoint = {
+ case "accounts":: "v2_1_1.1":: "getTransactionsPending" :: Nil JsonPost _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse("""{
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ },
+ "pageInfo" : {
+ "previousPage" : "previousPage",
+ "nextPage" : "nextPage"
+ },
+ "transactions" : [ "", "" ]
+}"""), callContext)
+ }
+ }
+ }
+
+ resourceDocs += ResourceDoc(
+ getTransactionsRejected,
+ apiVersion,
+ nameOf(getTransactionsRejected),
+ "POST",
+ "/accounts/v2_1_1.1/getTransactionsRejected",
+ "Get list of user's rejected transactions",
+ s"""${mockedDataText(true)}
+""",
+ json.parse(""""""""),
+ json.parse("""{
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ },
+ "pageInfo" : {
+ "previousPage" : "previousPage",
+ "nextPage" : "nextPage"
+ },
+ "transactions" : [ "", "" ]
+}"""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("AIS") :: apiTagMockedData :: Nil
+ )
+
+ lazy val getTransactionsRejected : OBPEndpoint = {
+ case "accounts":: "v2_1_1.1":: "getTransactionsRejected" :: Nil JsonPost _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse("""{
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ },
+ "pageInfo" : {
+ "previousPage" : "previousPage",
+ "nextPage" : "nextPage"
+ },
+ "transactions" : [ "", "" ]
+}"""), callContext)
+ }
+ }
+ }
+
+ resourceDocs += ResourceDoc(
+ getTransactionsScheduled,
+ apiVersion,
+ nameOf(getTransactionsScheduled),
+ "POST",
+ "/accounts/v2_1_1.1/getTransactionsScheduled",
+ "Get list of user scheduled transactions",
+ s"""${mockedDataText(true)}
+""",
+ json.parse(""""""""),
+ json.parse("""{
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ },
+ "pageInfo" : {
+ "previousPage" : "previousPage",
+ "nextPage" : "nextPage"
+ },
+ "transactions" : [ "", "" ]
+}"""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("AIS") :: apiTagMockedData :: Nil
+ )
+
+ lazy val getTransactionsScheduled : OBPEndpoint = {
+ case "accounts":: "v2_1_1.1":: "getTransactionsScheduled" :: Nil JsonPost _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse("""{
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ },
+ "pageInfo" : {
+ "previousPage" : "previousPage",
+ "nextPage" : "nextPage"
+ },
+ "transactions" : [ "", "" ]
+}"""), callContext)
+ }
+ }
+ }
+
+}
+
+
+
diff --git a/src/main/scala/code/api/Polish/v2_1_1_1/ASApi.scala b/src/main/scala/code/api/Polish/v2_1_1_1/ASApi.scala
new file mode 100644
index 000000000..4e1fdd901
--- /dev/null
+++ b/src/main/scala/code/api/Polish/v2_1_1_1/ASApi.scala
@@ -0,0 +1,2916 @@
+package code.api.Polish.v2_1_1_1
+
+import code.api.APIFailureNewStyle
+import code.api.berlin.group.v1_3.JvalueCaseClass
+import net.liftweb.json
+import net.liftweb.json._
+import code.api.util.APIUtil.{defaultBankId, _}
+import code.api.util.{ApiVersion, NewStyle}
+import code.api.util.ErrorMessages._
+import code.api.util.ApiTag._
+import code.api.util.NewStyle.HttpCode
+import code.bankconnectors.Connector
+import code.model._
+import code.util.Helper
+import code.views.Views
+import net.liftweb.common.Full
+import net.liftweb.http.rest.RestHelper
+import com.github.dwickern.macros.NameOf.nameOf
+import scala.collection.immutable.Nil
+import scala.collection.mutable.ArrayBuffer
+import scala.concurrent.ExecutionContext.Implicits.global
+import scala.concurrent.Future
+import code.api.Polish.v2_1_1_1.OBP_PAPI_2_1_1_1
+import code.api.util.ApiTag
+
+object APIMethods_ASApi extends RestHelper {
+ val apiVersion = OBP_PAPI_2_1_1_1.apiVersion
+ val resourceDocs = ArrayBuffer[ResourceDoc]()
+ val apiRelations = ArrayBuffer[ApiRelation]()
+ protected implicit def JvalueToSuper(what: JValue): JvalueCaseClass = JvalueCaseClass(what)
+
+ val endpoints =
+ authorize ::
+ authorizeExt ::
+ token ::
+ Nil
+
+
+ resourceDocs += ResourceDoc(
+ authorize,
+ apiVersion,
+ nameOf(authorize),
+ "POST",
+ "/auth/v2_1_1.1/authorize",
+ "Requests OAuth2 authorization code",
+ s"""${mockedDataText(true)}
+Requests OAuth2 authorization code""",
+ json.parse("""{
+ "scope_details" : {
+ "consentId" : "consentId",
+ "scopeTimeLimit" : "2000-01-23T04:56:07.000+00:00",
+ "throttlingPolicy" : "psd2Regulatory",
+ "scopeGroupType" : "ais-accounts",
+ "privilegeList" : [ {
+ "pis:bundle" : {
+ "typeOfTransfers" : "domestic",
+ "scopeUsageLimit" : "single",
+ "taxTransfers" : [ {
+ "transferData" : "",
+ "usInfo" : {
+ "periodId" : "periodId",
+ "periodType" : "periodType",
+ "payerInfo" : {
+ "payorId" : "payorId",
+ "payorIdType" : "N"
+ },
+ "formCode" : "formCode",
+ "year" : 6026,
+ "obligationId" : "obligationId"
+ },
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ }, {
+ "transferData" : "",
+ "usInfo" : {
+ "periodId" : "periodId",
+ "periodType" : "periodType",
+ "payerInfo" : {
+ "payorId" : "payorId",
+ "payorIdType" : "N"
+ },
+ "formCode" : "formCode",
+ "year" : 6026,
+ "obligationId" : "obligationId"
+ },
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ } ],
+ "domesticTransfers" : [ {
+ "transferData" : "",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ }, {
+ "transferData" : "",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ } ],
+ "EEATransfers" : [ {
+ "transferData" : "",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "SEPA",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ }, {
+ "transferData" : "",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "SEPA",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ } ],
+ "transfersTotalAmount" : "transfersTotalAmount",
+ "nonEEATransfers" : [ {
+ "transferData" : "",
+ "transferCharges" : "transferCharges",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Swift",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "recipientBank" : {
+ "code" : "code",
+ "address" : "",
+ "bicOrSwift" : "bicOrSwift",
+ "countryCode" : "countryCode",
+ "name" : "name"
+ },
+ "hold" : true
+ }, {
+ "transferData" : "",
+ "transferCharges" : "transferCharges",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Swift",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "recipientBank" : {
+ "code" : "code",
+ "address" : "",
+ "bicOrSwift" : "bicOrSwift",
+ "countryCode" : "countryCode",
+ "name" : "name"
+ },
+ "hold" : true
+ } ]
+ },
+ "ais:getAccount" : {
+ "scopeUsageLimit" : "single"
+ },
+ "pis:cancelPayment" : {
+ "paymentId" : "paymentId",
+ "scopeUsageLimit" : "single",
+ "bundleId" : "bundleId"
+ },
+ "ais:getTransactionsPending" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "pis:getRecurringPayment" : {
+ "tppRecurringPaymentId" : "tppRecurringPaymentId",
+ "recurringPaymentId" : "recurringPaymentId",
+ "scopeUsageLimit" : "single"
+ },
+ "ais:getTransactionsDone" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "ais:getTransactionDetail" : {
+ "scopeUsageLimit" : "single"
+ },
+ "ais:getHolds" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "ais:getTransactionsCancelled" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "accountNumber" : { },
+ "pis:domestic" : {
+ "transferData" : "",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "scopeUsageLimit" : "single",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate"
+ },
+ "ais:getTransactionsScheduled" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "pis:nonEEA" : {
+ "transferData" : "",
+ "transferCharges" : "transferCharges",
+ "system" : "Swift",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "scopeUsageLimit" : "single",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "recipientBank" : {
+ "code" : "code",
+ "address" : "",
+ "bicOrSwift" : "bicOrSwift",
+ "countryCode" : "countryCode",
+ "name" : "name"
+ }
+ },
+ "pis:recurring" : {
+ "recurrence" : {
+ "endDate" : "2000-01-23",
+ "startDate" : "2000-01-23",
+ "frequency" : {
+ "periodType" : "day",
+ "periodValue" : 1
+ },
+ "dayOffOffsetType" : "before"
+ },
+ "nonEEAPayment" : {
+ "transferData" : "",
+ "transferCharges" : "transferCharges",
+ "system" : "Swift",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "recipientBank" : {
+ "code" : "code",
+ "address" : "",
+ "bicOrSwift" : "bicOrSwift",
+ "countryCode" : "countryCode",
+ "name" : "name"
+ },
+ "hold" : true
+ },
+ "domesticPayment" : {
+ "transferData" : "",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "hold" : true
+ },
+ "scopeUsageLimit" : "single",
+ "EEAPayment" : {
+ "transferData" : "",
+ "system" : "SEPA",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "hold" : true
+ },
+ "taxPayment" : {
+ "transferData" : "",
+ "usInfo" : {
+ "periodId" : "periodId",
+ "periodType" : "periodType",
+ "payerInfo" : {
+ "payorId" : "payorId",
+ "payorIdType" : "N"
+ },
+ "formCode" : "formCode",
+ "year" : 6026,
+ "obligationId" : "obligationId"
+ },
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "hold" : true
+ },
+ "typeOfPayment" : "domestic"
+ },
+ "pis:EEA" : {
+ "transferData" : "",
+ "system" : "SEPA",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "scopeUsageLimit" : "single",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate"
+ },
+ "ais:getTransactionsRejected" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "ais-accounts:getAccounts" : {
+ "scopeUsageLimit" : "single"
+ },
+ "pis:tax" : {
+ "transferData" : "",
+ "usInfo" : {
+ "periodId" : "periodId",
+ "periodType" : "periodType",
+ "payerInfo" : {
+ "payorId" : "payorId",
+ "payorIdType" : "N"
+ },
+ "formCode" : "formCode",
+ "year" : 6026,
+ "obligationId" : "obligationId"
+ },
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "scopeUsageLimit" : "single",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate"
+ },
+ "pis:getPayment" : {
+ "tppTransactionId" : "tppTransactionId",
+ "paymentId" : "paymentId",
+ "scopeUsageLimit" : "single"
+ },
+ "pis:getBundle" : {
+ "tppBundleId" : "tppBundleId",
+ "scopeUsageLimit" : "single",
+ "bundleId" : "bundleId"
+ },
+ "pis:cancelRecurringPayment" : {
+ "recurringPaymentId" : "recurringPaymentId",
+ "scopeUsageLimit" : "single"
+ }
+ }, {
+ "pis:bundle" : {
+ "typeOfTransfers" : "domestic",
+ "scopeUsageLimit" : "single",
+ "taxTransfers" : [ {
+ "transferData" : "",
+ "usInfo" : {
+ "periodId" : "periodId",
+ "periodType" : "periodType",
+ "payerInfo" : {
+ "payorId" : "payorId",
+ "payorIdType" : "N"
+ },
+ "formCode" : "formCode",
+ "year" : 6026,
+ "obligationId" : "obligationId"
+ },
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ }, {
+ "transferData" : "",
+ "usInfo" : {
+ "periodId" : "periodId",
+ "periodType" : "periodType",
+ "payerInfo" : {
+ "payorId" : "payorId",
+ "payorIdType" : "N"
+ },
+ "formCode" : "formCode",
+ "year" : 6026,
+ "obligationId" : "obligationId"
+ },
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ } ],
+ "domesticTransfers" : [ {
+ "transferData" : "",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ }, {
+ "transferData" : "",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ } ],
+ "EEATransfers" : [ {
+ "transferData" : "",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "SEPA",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ }, {
+ "transferData" : "",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "SEPA",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ } ],
+ "transfersTotalAmount" : "transfersTotalAmount",
+ "nonEEATransfers" : [ {
+ "transferData" : "",
+ "transferCharges" : "transferCharges",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Swift",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "recipientBank" : {
+ "code" : "code",
+ "address" : "",
+ "bicOrSwift" : "bicOrSwift",
+ "countryCode" : "countryCode",
+ "name" : "name"
+ },
+ "hold" : true
+ }, {
+ "transferData" : "",
+ "transferCharges" : "transferCharges",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Swift",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "recipientBank" : {
+ "code" : "code",
+ "address" : "",
+ "bicOrSwift" : "bicOrSwift",
+ "countryCode" : "countryCode",
+ "name" : "name"
+ },
+ "hold" : true
+ } ]
+ },
+ "ais:getAccount" : {
+ "scopeUsageLimit" : "single"
+ },
+ "pis:cancelPayment" : {
+ "paymentId" : "paymentId",
+ "scopeUsageLimit" : "single",
+ "bundleId" : "bundleId"
+ },
+ "ais:getTransactionsPending" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "pis:getRecurringPayment" : {
+ "tppRecurringPaymentId" : "tppRecurringPaymentId",
+ "recurringPaymentId" : "recurringPaymentId",
+ "scopeUsageLimit" : "single"
+ },
+ "ais:getTransactionsDone" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "ais:getTransactionDetail" : {
+ "scopeUsageLimit" : "single"
+ },
+ "ais:getHolds" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "ais:getTransactionsCancelled" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "accountNumber" : { },
+ "pis:domestic" : {
+ "transferData" : "",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "scopeUsageLimit" : "single",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate"
+ },
+ "ais:getTransactionsScheduled" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "pis:nonEEA" : {
+ "transferData" : "",
+ "transferCharges" : "transferCharges",
+ "system" : "Swift",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "scopeUsageLimit" : "single",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "recipientBank" : {
+ "code" : "code",
+ "address" : "",
+ "bicOrSwift" : "bicOrSwift",
+ "countryCode" : "countryCode",
+ "name" : "name"
+ }
+ },
+ "pis:recurring" : {
+ "recurrence" : {
+ "endDate" : "2000-01-23",
+ "startDate" : "2000-01-23",
+ "frequency" : {
+ "periodType" : "day",
+ "periodValue" : 1
+ },
+ "dayOffOffsetType" : "before"
+ },
+ "nonEEAPayment" : {
+ "transferData" : "",
+ "transferCharges" : "transferCharges",
+ "system" : "Swift",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "recipientBank" : {
+ "code" : "code",
+ "address" : "",
+ "bicOrSwift" : "bicOrSwift",
+ "countryCode" : "countryCode",
+ "name" : "name"
+ },
+ "hold" : true
+ },
+ "domesticPayment" : {
+ "transferData" : "",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "hold" : true
+ },
+ "scopeUsageLimit" : "single",
+ "EEAPayment" : {
+ "transferData" : "",
+ "system" : "SEPA",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "hold" : true
+ },
+ "taxPayment" : {
+ "transferData" : "",
+ "usInfo" : {
+ "periodId" : "periodId",
+ "periodType" : "periodType",
+ "payerInfo" : {
+ "payorId" : "payorId",
+ "payorIdType" : "N"
+ },
+ "formCode" : "formCode",
+ "year" : 6026,
+ "obligationId" : "obligationId"
+ },
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "hold" : true
+ },
+ "typeOfPayment" : "domestic"
+ },
+ "pis:EEA" : {
+ "transferData" : "",
+ "system" : "SEPA",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "scopeUsageLimit" : "single",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate"
+ },
+ "ais:getTransactionsRejected" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "ais-accounts:getAccounts" : {
+ "scopeUsageLimit" : "single"
+ },
+ "pis:tax" : {
+ "transferData" : "",
+ "usInfo" : {
+ "periodId" : "periodId",
+ "periodType" : "periodType",
+ "payerInfo" : {
+ "payorId" : "payorId",
+ "payorIdType" : "N"
+ },
+ "formCode" : "formCode",
+ "year" : 6026,
+ "obligationId" : "obligationId"
+ },
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "scopeUsageLimit" : "single",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate"
+ },
+ "pis:getPayment" : {
+ "tppTransactionId" : "tppTransactionId",
+ "paymentId" : "paymentId",
+ "scopeUsageLimit" : "single"
+ },
+ "pis:getBundle" : {
+ "tppBundleId" : "tppBundleId",
+ "scopeUsageLimit" : "single",
+ "bundleId" : "bundleId"
+ },
+ "pis:cancelRecurringPayment" : {
+ "recurringPaymentId" : "recurringPaymentId",
+ "scopeUsageLimit" : "single"
+ }
+ } ]
+ },
+ "scope" : "scope",
+ "response_type" : "response_type",
+ "requestHeader" : "",
+ "redirect_uri" : "redirect_uri",
+ "state" : "state",
+ "client_id" : "client_id"
+}"""),
+ json.parse("""{
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ },
+ "aspspRedirectUri" : "aspspRedirectUri"
+}"""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("AS") :: apiTagMockedData :: Nil
+ )
+
+ lazy val authorize : OBPEndpoint = {
+ case "auth":: "v2_1_1.1":: "authorize" :: Nil JsonPost _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse("""{
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ },
+ "aspspRedirectUri" : "aspspRedirectUri"
+}"""), callContext)
+ }
+ }
+ }
+
+ resourceDocs += ResourceDoc(
+ authorizeExt,
+ apiVersion,
+ nameOf(authorizeExt),
+ "POST",
+ "/auth/v2_1_1.1/authorizeExt",
+ "Requests OAuth2 authorization code based on One-time authorization code issued by External Authorization Tool",
+ s"""${mockedDataText(true)}
+Requests OAuth2 authorization code based One-time authorization code issued by External Authorization Tool. Authorization code will be delivered to TPP as callback request from ASPSP if PSU authentication is confirmed by EAT. Callback function must provide similar notification also in case of unsuccessful authentication or its abandonment.""",
+ json.parse("""{
+ "eatType" : {
+ "code" : "code",
+ "description" : "description"
+ },
+ "scope_details" : {
+ "consentId" : "consentId",
+ "scopeTimeLimit" : "2000-01-23T04:56:07.000+00:00",
+ "throttlingPolicy" : "psd2Regulatory",
+ "scopeGroupType" : "ais-accounts",
+ "privilegeList" : [ {
+ "pis:bundle" : {
+ "typeOfTransfers" : "domestic",
+ "scopeUsageLimit" : "single",
+ "taxTransfers" : [ {
+ "transferData" : "",
+ "usInfo" : {
+ "periodId" : "periodId",
+ "periodType" : "periodType",
+ "payerInfo" : {
+ "payorId" : "payorId",
+ "payorIdType" : "N"
+ },
+ "formCode" : "formCode",
+ "year" : 6026,
+ "obligationId" : "obligationId"
+ },
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ }, {
+ "transferData" : "",
+ "usInfo" : {
+ "periodId" : "periodId",
+ "periodType" : "periodType",
+ "payerInfo" : {
+ "payorId" : "payorId",
+ "payorIdType" : "N"
+ },
+ "formCode" : "formCode",
+ "year" : 6026,
+ "obligationId" : "obligationId"
+ },
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ } ],
+ "domesticTransfers" : [ {
+ "transferData" : "",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ }, {
+ "transferData" : "",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ } ],
+ "EEATransfers" : [ {
+ "transferData" : "",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "SEPA",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ }, {
+ "transferData" : "",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "SEPA",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ } ],
+ "transfersTotalAmount" : "transfersTotalAmount",
+ "nonEEATransfers" : [ {
+ "transferData" : "",
+ "transferCharges" : "transferCharges",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Swift",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "recipientBank" : {
+ "code" : "code",
+ "address" : "",
+ "bicOrSwift" : "bicOrSwift",
+ "countryCode" : "countryCode",
+ "name" : "name"
+ },
+ "hold" : true
+ }, {
+ "transferData" : "",
+ "transferCharges" : "transferCharges",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Swift",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "recipientBank" : {
+ "code" : "code",
+ "address" : "",
+ "bicOrSwift" : "bicOrSwift",
+ "countryCode" : "countryCode",
+ "name" : "name"
+ },
+ "hold" : true
+ } ]
+ },
+ "ais:getAccount" : {
+ "scopeUsageLimit" : "single"
+ },
+ "pis:cancelPayment" : {
+ "paymentId" : "paymentId",
+ "scopeUsageLimit" : "single",
+ "bundleId" : "bundleId"
+ },
+ "ais:getTransactionsPending" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "pis:getRecurringPayment" : {
+ "tppRecurringPaymentId" : "tppRecurringPaymentId",
+ "recurringPaymentId" : "recurringPaymentId",
+ "scopeUsageLimit" : "single"
+ },
+ "ais:getTransactionsDone" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "ais:getTransactionDetail" : {
+ "scopeUsageLimit" : "single"
+ },
+ "ais:getHolds" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "ais:getTransactionsCancelled" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "accountNumber" : { },
+ "pis:domestic" : {
+ "transferData" : "",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "scopeUsageLimit" : "single",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate"
+ },
+ "ais:getTransactionsScheduled" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "pis:nonEEA" : {
+ "transferData" : "",
+ "transferCharges" : "transferCharges",
+ "system" : "Swift",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "scopeUsageLimit" : "single",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "recipientBank" : {
+ "code" : "code",
+ "address" : "",
+ "bicOrSwift" : "bicOrSwift",
+ "countryCode" : "countryCode",
+ "name" : "name"
+ }
+ },
+ "pis:recurring" : {
+ "recurrence" : {
+ "endDate" : "2000-01-23",
+ "startDate" : "2000-01-23",
+ "frequency" : {
+ "periodType" : "day",
+ "periodValue" : 1
+ },
+ "dayOffOffsetType" : "before"
+ },
+ "nonEEAPayment" : {
+ "transferData" : "",
+ "transferCharges" : "transferCharges",
+ "system" : "Swift",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "recipientBank" : {
+ "code" : "code",
+ "address" : "",
+ "bicOrSwift" : "bicOrSwift",
+ "countryCode" : "countryCode",
+ "name" : "name"
+ },
+ "hold" : true
+ },
+ "domesticPayment" : {
+ "transferData" : "",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "hold" : true
+ },
+ "scopeUsageLimit" : "single",
+ "EEAPayment" : {
+ "transferData" : "",
+ "system" : "SEPA",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "hold" : true
+ },
+ "taxPayment" : {
+ "transferData" : "",
+ "usInfo" : {
+ "periodId" : "periodId",
+ "periodType" : "periodType",
+ "payerInfo" : {
+ "payorId" : "payorId",
+ "payorIdType" : "N"
+ },
+ "formCode" : "formCode",
+ "year" : 6026,
+ "obligationId" : "obligationId"
+ },
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "hold" : true
+ },
+ "typeOfPayment" : "domestic"
+ },
+ "pis:EEA" : {
+ "transferData" : "",
+ "system" : "SEPA",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "scopeUsageLimit" : "single",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate"
+ },
+ "ais:getTransactionsRejected" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "ais-accounts:getAccounts" : {
+ "scopeUsageLimit" : "single"
+ },
+ "pis:tax" : {
+ "transferData" : "",
+ "usInfo" : {
+ "periodId" : "periodId",
+ "periodType" : "periodType",
+ "payerInfo" : {
+ "payorId" : "payorId",
+ "payorIdType" : "N"
+ },
+ "formCode" : "formCode",
+ "year" : 6026,
+ "obligationId" : "obligationId"
+ },
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "scopeUsageLimit" : "single",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate"
+ },
+ "pis:getPayment" : {
+ "tppTransactionId" : "tppTransactionId",
+ "paymentId" : "paymentId",
+ "scopeUsageLimit" : "single"
+ },
+ "pis:getBundle" : {
+ "tppBundleId" : "tppBundleId",
+ "scopeUsageLimit" : "single",
+ "bundleId" : "bundleId"
+ },
+ "pis:cancelRecurringPayment" : {
+ "recurringPaymentId" : "recurringPaymentId",
+ "scopeUsageLimit" : "single"
+ }
+ }, {
+ "pis:bundle" : {
+ "typeOfTransfers" : "domestic",
+ "scopeUsageLimit" : "single",
+ "taxTransfers" : [ {
+ "transferData" : "",
+ "usInfo" : {
+ "periodId" : "periodId",
+ "periodType" : "periodType",
+ "payerInfo" : {
+ "payorId" : "payorId",
+ "payorIdType" : "N"
+ },
+ "formCode" : "formCode",
+ "year" : 6026,
+ "obligationId" : "obligationId"
+ },
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ }, {
+ "transferData" : "",
+ "usInfo" : {
+ "periodId" : "periodId",
+ "periodType" : "periodType",
+ "payerInfo" : {
+ "payorId" : "payorId",
+ "payorIdType" : "N"
+ },
+ "formCode" : "formCode",
+ "year" : 6026,
+ "obligationId" : "obligationId"
+ },
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ } ],
+ "domesticTransfers" : [ {
+ "transferData" : "",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ }, {
+ "transferData" : "",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ } ],
+ "EEATransfers" : [ {
+ "transferData" : "",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "SEPA",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ }, {
+ "transferData" : "",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "SEPA",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ } ],
+ "transfersTotalAmount" : "transfersTotalAmount",
+ "nonEEATransfers" : [ {
+ "transferData" : "",
+ "transferCharges" : "transferCharges",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Swift",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "recipientBank" : {
+ "code" : "code",
+ "address" : "",
+ "bicOrSwift" : "bicOrSwift",
+ "countryCode" : "countryCode",
+ "name" : "name"
+ },
+ "hold" : true
+ }, {
+ "transferData" : "",
+ "transferCharges" : "transferCharges",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Swift",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "recipientBank" : {
+ "code" : "code",
+ "address" : "",
+ "bicOrSwift" : "bicOrSwift",
+ "countryCode" : "countryCode",
+ "name" : "name"
+ },
+ "hold" : true
+ } ]
+ },
+ "ais:getAccount" : {
+ "scopeUsageLimit" : "single"
+ },
+ "pis:cancelPayment" : {
+ "paymentId" : "paymentId",
+ "scopeUsageLimit" : "single",
+ "bundleId" : "bundleId"
+ },
+ "ais:getTransactionsPending" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "pis:getRecurringPayment" : {
+ "tppRecurringPaymentId" : "tppRecurringPaymentId",
+ "recurringPaymentId" : "recurringPaymentId",
+ "scopeUsageLimit" : "single"
+ },
+ "ais:getTransactionsDone" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "ais:getTransactionDetail" : {
+ "scopeUsageLimit" : "single"
+ },
+ "ais:getHolds" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "ais:getTransactionsCancelled" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "accountNumber" : { },
+ "pis:domestic" : {
+ "transferData" : "",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "scopeUsageLimit" : "single",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate"
+ },
+ "ais:getTransactionsScheduled" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "pis:nonEEA" : {
+ "transferData" : "",
+ "transferCharges" : "transferCharges",
+ "system" : "Swift",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "scopeUsageLimit" : "single",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "recipientBank" : {
+ "code" : "code",
+ "address" : "",
+ "bicOrSwift" : "bicOrSwift",
+ "countryCode" : "countryCode",
+ "name" : "name"
+ }
+ },
+ "pis:recurring" : {
+ "recurrence" : {
+ "endDate" : "2000-01-23",
+ "startDate" : "2000-01-23",
+ "frequency" : {
+ "periodType" : "day",
+ "periodValue" : 1
+ },
+ "dayOffOffsetType" : "before"
+ },
+ "nonEEAPayment" : {
+ "transferData" : "",
+ "transferCharges" : "transferCharges",
+ "system" : "Swift",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "recipientBank" : {
+ "code" : "code",
+ "address" : "",
+ "bicOrSwift" : "bicOrSwift",
+ "countryCode" : "countryCode",
+ "name" : "name"
+ },
+ "hold" : true
+ },
+ "domesticPayment" : {
+ "transferData" : "",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "hold" : true
+ },
+ "scopeUsageLimit" : "single",
+ "EEAPayment" : {
+ "transferData" : "",
+ "system" : "SEPA",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "hold" : true
+ },
+ "taxPayment" : {
+ "transferData" : "",
+ "usInfo" : {
+ "periodId" : "periodId",
+ "periodType" : "periodType",
+ "payerInfo" : {
+ "payorId" : "payorId",
+ "payorIdType" : "N"
+ },
+ "formCode" : "formCode",
+ "year" : 6026,
+ "obligationId" : "obligationId"
+ },
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "hold" : true
+ },
+ "typeOfPayment" : "domestic"
+ },
+ "pis:EEA" : {
+ "transferData" : "",
+ "system" : "SEPA",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "scopeUsageLimit" : "single",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate"
+ },
+ "ais:getTransactionsRejected" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "ais-accounts:getAccounts" : {
+ "scopeUsageLimit" : "single"
+ },
+ "pis:tax" : {
+ "transferData" : "",
+ "usInfo" : {
+ "periodId" : "periodId",
+ "periodType" : "periodType",
+ "payerInfo" : {
+ "payorId" : "payorId",
+ "payorIdType" : "N"
+ },
+ "formCode" : "formCode",
+ "year" : 6026,
+ "obligationId" : "obligationId"
+ },
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "scopeUsageLimit" : "single",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate"
+ },
+ "pis:getPayment" : {
+ "tppTransactionId" : "tppTransactionId",
+ "paymentId" : "paymentId",
+ "scopeUsageLimit" : "single"
+ },
+ "pis:getBundle" : {
+ "tppBundleId" : "tppBundleId",
+ "scopeUsageLimit" : "single",
+ "bundleId" : "bundleId"
+ },
+ "pis:cancelRecurringPayment" : {
+ "recurringPaymentId" : "recurringPaymentId",
+ "scopeUsageLimit" : "single"
+ }
+ } ]
+ },
+ "scope" : "scope",
+ "response_type" : "response_type",
+ "requestHeader" : "",
+ "eatCode" : "eatCode",
+ "state" : "state",
+ "client_id" : "client_id"
+}"""),
+ json.parse(""""""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("AS") :: apiTagMockedData :: Nil
+ )
+
+ lazy val authorizeExt : OBPEndpoint = {
+ case "auth":: "v2_1_1.1":: "authorizeExt" :: Nil JsonPost _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse(""""""), callContext)
+ }
+ }
+ }
+
+ resourceDocs += ResourceDoc(
+ token,
+ apiVersion,
+ nameOf(token),
+ "POST",
+ "/auth/v2_1_1.1/token",
+ "Requests OAuth2 access token value",
+ s"""${mockedDataText(true)}
+Requests OAuth2 access token value""",
+ json.parse("""{
+ "refresh_token" : "refresh_token",
+ "user_ip" : "user_ip",
+ "grant_type" : "grant_type",
+ "scope_details" : {
+ "consentId" : "consentId",
+ "scopeTimeLimit" : "2000-01-23T04:56:07.000+00:00",
+ "throttlingPolicy" : "psd2Regulatory",
+ "scopeGroupType" : "ais-accounts",
+ "privilegeList" : [ {
+ "pis:bundle" : {
+ "typeOfTransfers" : "domestic",
+ "scopeUsageLimit" : "single",
+ "taxTransfers" : [ {
+ "transferData" : "",
+ "usInfo" : {
+ "periodId" : "periodId",
+ "periodType" : "periodType",
+ "payerInfo" : {
+ "payorId" : "payorId",
+ "payorIdType" : "N"
+ },
+ "formCode" : "formCode",
+ "year" : 6026,
+ "obligationId" : "obligationId"
+ },
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ }, {
+ "transferData" : "",
+ "usInfo" : {
+ "periodId" : "periodId",
+ "periodType" : "periodType",
+ "payerInfo" : {
+ "payorId" : "payorId",
+ "payorIdType" : "N"
+ },
+ "formCode" : "formCode",
+ "year" : 6026,
+ "obligationId" : "obligationId"
+ },
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ } ],
+ "domesticTransfers" : [ {
+ "transferData" : "",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ }, {
+ "transferData" : "",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ } ],
+ "EEATransfers" : [ {
+ "transferData" : "",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "SEPA",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ }, {
+ "transferData" : "",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "SEPA",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ } ],
+ "transfersTotalAmount" : "transfersTotalAmount",
+ "nonEEATransfers" : [ {
+ "transferData" : "",
+ "transferCharges" : "transferCharges",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Swift",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "recipientBank" : {
+ "code" : "code",
+ "address" : "",
+ "bicOrSwift" : "bicOrSwift",
+ "countryCode" : "countryCode",
+ "name" : "name"
+ },
+ "hold" : true
+ }, {
+ "transferData" : "",
+ "transferCharges" : "transferCharges",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Swift",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "recipientBank" : {
+ "code" : "code",
+ "address" : "",
+ "bicOrSwift" : "bicOrSwift",
+ "countryCode" : "countryCode",
+ "name" : "name"
+ },
+ "hold" : true
+ } ]
+ },
+ "ais:getAccount" : {
+ "scopeUsageLimit" : "single"
+ },
+ "pis:cancelPayment" : {
+ "paymentId" : "paymentId",
+ "scopeUsageLimit" : "single",
+ "bundleId" : "bundleId"
+ },
+ "ais:getTransactionsPending" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "pis:getRecurringPayment" : {
+ "tppRecurringPaymentId" : "tppRecurringPaymentId",
+ "recurringPaymentId" : "recurringPaymentId",
+ "scopeUsageLimit" : "single"
+ },
+ "ais:getTransactionsDone" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "ais:getTransactionDetail" : {
+ "scopeUsageLimit" : "single"
+ },
+ "ais:getHolds" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "ais:getTransactionsCancelled" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "accountNumber" : { },
+ "pis:domestic" : {
+ "transferData" : "",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "scopeUsageLimit" : "single",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate"
+ },
+ "ais:getTransactionsScheduled" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "pis:nonEEA" : {
+ "transferData" : "",
+ "transferCharges" : "transferCharges",
+ "system" : "Swift",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "scopeUsageLimit" : "single",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "recipientBank" : {
+ "code" : "code",
+ "address" : "",
+ "bicOrSwift" : "bicOrSwift",
+ "countryCode" : "countryCode",
+ "name" : "name"
+ }
+ },
+ "pis:recurring" : {
+ "recurrence" : {
+ "endDate" : "2000-01-23",
+ "startDate" : "2000-01-23",
+ "frequency" : {
+ "periodType" : "day",
+ "periodValue" : 1
+ },
+ "dayOffOffsetType" : "before"
+ },
+ "nonEEAPayment" : {
+ "transferData" : "",
+ "transferCharges" : "transferCharges",
+ "system" : "Swift",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "recipientBank" : {
+ "code" : "code",
+ "address" : "",
+ "bicOrSwift" : "bicOrSwift",
+ "countryCode" : "countryCode",
+ "name" : "name"
+ },
+ "hold" : true
+ },
+ "domesticPayment" : {
+ "transferData" : "",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "hold" : true
+ },
+ "scopeUsageLimit" : "single",
+ "EEAPayment" : {
+ "transferData" : "",
+ "system" : "SEPA",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "hold" : true
+ },
+ "taxPayment" : {
+ "transferData" : "",
+ "usInfo" : {
+ "periodId" : "periodId",
+ "periodType" : "periodType",
+ "payerInfo" : {
+ "payorId" : "payorId",
+ "payorIdType" : "N"
+ },
+ "formCode" : "formCode",
+ "year" : 6026,
+ "obligationId" : "obligationId"
+ },
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "hold" : true
+ },
+ "typeOfPayment" : "domestic"
+ },
+ "pis:EEA" : {
+ "transferData" : "",
+ "system" : "SEPA",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "scopeUsageLimit" : "single",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate"
+ },
+ "ais:getTransactionsRejected" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "ais-accounts:getAccounts" : {
+ "scopeUsageLimit" : "single"
+ },
+ "pis:tax" : {
+ "transferData" : "",
+ "usInfo" : {
+ "periodId" : "periodId",
+ "periodType" : "periodType",
+ "payerInfo" : {
+ "payorId" : "payorId",
+ "payorIdType" : "N"
+ },
+ "formCode" : "formCode",
+ "year" : 6026,
+ "obligationId" : "obligationId"
+ },
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "scopeUsageLimit" : "single",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate"
+ },
+ "pis:getPayment" : {
+ "tppTransactionId" : "tppTransactionId",
+ "paymentId" : "paymentId",
+ "scopeUsageLimit" : "single"
+ },
+ "pis:getBundle" : {
+ "tppBundleId" : "tppBundleId",
+ "scopeUsageLimit" : "single",
+ "bundleId" : "bundleId"
+ },
+ "pis:cancelRecurringPayment" : {
+ "recurringPaymentId" : "recurringPaymentId",
+ "scopeUsageLimit" : "single"
+ }
+ }, {
+ "pis:bundle" : {
+ "typeOfTransfers" : "domestic",
+ "scopeUsageLimit" : "single",
+ "taxTransfers" : [ {
+ "transferData" : "",
+ "usInfo" : {
+ "periodId" : "periodId",
+ "periodType" : "periodType",
+ "payerInfo" : {
+ "payorId" : "payorId",
+ "payorIdType" : "N"
+ },
+ "formCode" : "formCode",
+ "year" : 6026,
+ "obligationId" : "obligationId"
+ },
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ }, {
+ "transferData" : "",
+ "usInfo" : {
+ "periodId" : "periodId",
+ "periodType" : "periodType",
+ "payerInfo" : {
+ "payorId" : "payorId",
+ "payorIdType" : "N"
+ },
+ "formCode" : "formCode",
+ "year" : 6026,
+ "obligationId" : "obligationId"
+ },
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ } ],
+ "domesticTransfers" : [ {
+ "transferData" : "",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ }, {
+ "transferData" : "",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ } ],
+ "EEATransfers" : [ {
+ "transferData" : "",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "SEPA",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ }, {
+ "transferData" : "",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "SEPA",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ } ],
+ "transfersTotalAmount" : "transfersTotalAmount",
+ "nonEEATransfers" : [ {
+ "transferData" : "",
+ "transferCharges" : "transferCharges",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Swift",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "recipientBank" : {
+ "code" : "code",
+ "address" : "",
+ "bicOrSwift" : "bicOrSwift",
+ "countryCode" : "countryCode",
+ "name" : "name"
+ },
+ "hold" : true
+ }, {
+ "transferData" : "",
+ "transferCharges" : "transferCharges",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Swift",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "recipientBank" : {
+ "code" : "code",
+ "address" : "",
+ "bicOrSwift" : "bicOrSwift",
+ "countryCode" : "countryCode",
+ "name" : "name"
+ },
+ "hold" : true
+ } ]
+ },
+ "ais:getAccount" : {
+ "scopeUsageLimit" : "single"
+ },
+ "pis:cancelPayment" : {
+ "paymentId" : "paymentId",
+ "scopeUsageLimit" : "single",
+ "bundleId" : "bundleId"
+ },
+ "ais:getTransactionsPending" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "pis:getRecurringPayment" : {
+ "tppRecurringPaymentId" : "tppRecurringPaymentId",
+ "recurringPaymentId" : "recurringPaymentId",
+ "scopeUsageLimit" : "single"
+ },
+ "ais:getTransactionsDone" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "ais:getTransactionDetail" : {
+ "scopeUsageLimit" : "single"
+ },
+ "ais:getHolds" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "ais:getTransactionsCancelled" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "accountNumber" : { },
+ "pis:domestic" : {
+ "transferData" : "",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "scopeUsageLimit" : "single",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate"
+ },
+ "ais:getTransactionsScheduled" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "pis:nonEEA" : {
+ "transferData" : "",
+ "transferCharges" : "transferCharges",
+ "system" : "Swift",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "scopeUsageLimit" : "single",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "recipientBank" : {
+ "code" : "code",
+ "address" : "",
+ "bicOrSwift" : "bicOrSwift",
+ "countryCode" : "countryCode",
+ "name" : "name"
+ }
+ },
+ "pis:recurring" : {
+ "recurrence" : {
+ "endDate" : "2000-01-23",
+ "startDate" : "2000-01-23",
+ "frequency" : {
+ "periodType" : "day",
+ "periodValue" : 1
+ },
+ "dayOffOffsetType" : "before"
+ },
+ "nonEEAPayment" : {
+ "transferData" : "",
+ "transferCharges" : "transferCharges",
+ "system" : "Swift",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "recipientBank" : {
+ "code" : "code",
+ "address" : "",
+ "bicOrSwift" : "bicOrSwift",
+ "countryCode" : "countryCode",
+ "name" : "name"
+ },
+ "hold" : true
+ },
+ "domesticPayment" : {
+ "transferData" : "",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "hold" : true
+ },
+ "scopeUsageLimit" : "single",
+ "EEAPayment" : {
+ "transferData" : "",
+ "system" : "SEPA",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "hold" : true
+ },
+ "taxPayment" : {
+ "transferData" : "",
+ "usInfo" : {
+ "periodId" : "periodId",
+ "periodType" : "periodType",
+ "payerInfo" : {
+ "payorId" : "payorId",
+ "payorIdType" : "N"
+ },
+ "formCode" : "formCode",
+ "year" : 6026,
+ "obligationId" : "obligationId"
+ },
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "hold" : true
+ },
+ "typeOfPayment" : "domestic"
+ },
+ "pis:EEA" : {
+ "transferData" : "",
+ "system" : "SEPA",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "scopeUsageLimit" : "single",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate"
+ },
+ "ais:getTransactionsRejected" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 117
+ },
+ "ais-accounts:getAccounts" : {
+ "scopeUsageLimit" : "single"
+ },
+ "pis:tax" : {
+ "transferData" : "",
+ "usInfo" : {
+ "periodId" : "periodId",
+ "periodType" : "periodType",
+ "payerInfo" : {
+ "payorId" : "payorId",
+ "payorIdType" : "N"
+ },
+ "formCode" : "formCode",
+ "year" : 6026,
+ "obligationId" : "obligationId"
+ },
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "scopeUsageLimit" : "single",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate"
+ },
+ "pis:getPayment" : {
+ "tppTransactionId" : "tppTransactionId",
+ "paymentId" : "paymentId",
+ "scopeUsageLimit" : "single"
+ },
+ "pis:getBundle" : {
+ "tppBundleId" : "tppBundleId",
+ "scopeUsageLimit" : "single",
+ "bundleId" : "bundleId"
+ },
+ "pis:cancelRecurringPayment" : {
+ "recurringPaymentId" : "recurringPaymentId",
+ "scopeUsageLimit" : "single"
+ }
+ } ]
+ },
+ "scope" : "scope",
+ "is_user_session" : true,
+ "exchange_token" : "exchange_token",
+ "requestHeader" : "",
+ "redirect_uri" : "redirect_uri",
+ "Code" : "Code",
+ "client_id" : "client_id",
+ "user_agent" : "user_agent"
+}"""),
+ json.parse("""{
+ "access_token" : "access_token",
+ "refresh_token" : "refresh_token",
+ "scope_details" : {
+ "consentId" : "consentId",
+ "resource" : {
+ "accounts" : [ "accounts", "accounts" ]
+ },
+ "scopeTimeLimit" : "scopeTimeLimit",
+ "throttlingPolicy" : "psd2Regulatory",
+ "privilegeList" : {
+ "ais:getTransactionsDone" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 880
+ },
+ "ais:getHolds" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 880
+ },
+ "ais:getTransactionsRejected" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 880
+ },
+ "ais:getTransactionsCancelled" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 880
+ },
+ "ais:getTransactionsScheduled" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 880
+ },
+ "ais-accounts:getAccounts" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 880
+ },
+ "pis:tax" : {
+ "scopeUsageLimit" : "single"
+ },
+ "pis:getPayment" : {
+ "scopeUsageLimit" : "single"
+ },
+ "pis:domestic" : {
+ "scopeUsageLimit" : "single"
+ },
+ "ais:getTransactionDetail" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 880
+ },
+ "ais:getTransactionsPending" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 880
+ },
+ "pis:bundle" : {
+ "scopeUsageLimit" : "single"
+ }
+ }
+ },
+ "scope" : "scope",
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ },
+ "token_type" : "token_type",
+ "expires_in" : "expires_in"
+}"""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("AS") :: apiTagMockedData :: Nil
+ )
+
+ lazy val token : OBPEndpoint = {
+ case "auth":: "v2_1_1.1":: "token" :: Nil JsonPost _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse("""{
+ "access_token" : "access_token",
+ "refresh_token" : "refresh_token",
+ "scope_details" : {
+ "consentId" : "consentId",
+ "resource" : {
+ "accounts" : [ "accounts", "accounts" ]
+ },
+ "scopeTimeLimit" : "scopeTimeLimit",
+ "throttlingPolicy" : "psd2Regulatory",
+ "privilegeList" : {
+ "ais:getTransactionsDone" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 880
+ },
+ "ais:getHolds" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 880
+ },
+ "ais:getTransactionsRejected" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 880
+ },
+ "ais:getTransactionsCancelled" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 880
+ },
+ "ais:getTransactionsScheduled" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 880
+ },
+ "ais-accounts:getAccounts" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 880
+ },
+ "pis:tax" : {
+ "scopeUsageLimit" : "single"
+ },
+ "pis:getPayment" : {
+ "scopeUsageLimit" : "single"
+ },
+ "pis:domestic" : {
+ "scopeUsageLimit" : "single"
+ },
+ "ais:getTransactionDetail" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 880
+ },
+ "ais:getTransactionsPending" : {
+ "scopeUsageLimit" : "single",
+ "maxAllowedHistoryLong" : 880
+ },
+ "pis:bundle" : {
+ "scopeUsageLimit" : "single"
+ }
+ }
+ },
+ "scope" : "scope",
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ },
+ "token_type" : "token_type",
+ "expires_in" : "expires_in"
+}"""), callContext)
+ }
+ }
+ }
+
+}
+
+
+
diff --git a/src/main/scala/code/api/Polish/v2_1_1_1/CAFApi.scala b/src/main/scala/code/api/Polish/v2_1_1_1/CAFApi.scala
new file mode 100644
index 000000000..80d596377
--- /dev/null
+++ b/src/main/scala/code/api/Polish/v2_1_1_1/CAFApi.scala
@@ -0,0 +1,92 @@
+package code.api.Polish.v2_1_1_1
+
+import code.api.APIFailureNewStyle
+import code.api.berlin.group.v1_3.JvalueCaseClass
+import net.liftweb.json
+import net.liftweb.json._
+import code.api.util.APIUtil.{defaultBankId, _}
+import code.api.util.{ApiVersion, NewStyle}
+import code.api.util.ErrorMessages._
+import code.api.util.ApiTag._
+import code.api.util.NewStyle.HttpCode
+import code.bankconnectors.Connector
+import code.model._
+import code.util.Helper
+import code.views.Views
+import net.liftweb.common.Full
+import net.liftweb.http.rest.RestHelper
+import com.github.dwickern.macros.NameOf.nameOf
+import scala.collection.immutable.Nil
+import scala.collection.mutable.ArrayBuffer
+import scala.concurrent.ExecutionContext.Implicits.global
+import scala.concurrent.Future
+import code.api.Polish.v2_1_1_1.OBP_PAPI_2_1_1_1
+import code.api.util.ApiTag
+
+object APIMethods_CAFApi extends RestHelper {
+ val apiVersion = OBP_PAPI_2_1_1_1.apiVersion
+ val resourceDocs = ArrayBuffer[ResourceDoc]()
+ val apiRelations = ArrayBuffer[ApiRelation]()
+ protected implicit def JvalueToSuper(what: JValue): JvalueCaseClass = JvalueCaseClass(what)
+
+ val endpoints =
+ getConfirmationOfFunds ::
+ Nil
+
+
+ resourceDocs += ResourceDoc(
+ getConfirmationOfFunds,
+ apiVersion,
+ nameOf(getConfirmationOfFunds),
+ "POST",
+ "/confirmation/v2_1_1.1/getConfirmationOfFunds",
+ "Confirmation of the availability of funds",
+ s"""${mockedDataText(true)}
+Confirming the availability on the payers account of the amount necessary to execute the payment transaction, as defined in Art. 65 PSD2.""",
+ json.parse("""{
+ "amount" : "amount",
+ "requestHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "ipAddress" : "ipAddress",
+ "tppId" : "tppId",
+ "userAgent" : "userAgent"
+ },
+ "currency" : "currency",
+ "accountNumber" : "accountNumber"
+}"""),
+ json.parse("""{
+ "fundsAvailable" : true,
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ }
+}"""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("CAF") :: apiTagMockedData :: Nil
+ )
+
+ lazy val getConfirmationOfFunds : OBPEndpoint = {
+ case "confirmation":: "v2_1_1.1":: "getConfirmationOfFunds" :: Nil JsonPost _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse("""{
+ "fundsAvailable" : true,
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ }
+}"""), callContext)
+ }
+ }
+ }
+
+}
+
+
+
diff --git a/src/main/scala/code/api/Polish/v2_1_1_1/OBP_PAPI_2_1_1_1.scala b/src/main/scala/code/api/Polish/v2_1_1_1/OBP_PAPI_2_1_1_1.scala
new file mode 100644
index 000000000..9efd2c44c
--- /dev/null
+++ b/src/main/scala/code/api/Polish/v2_1_1_1/OBP_PAPI_2_1_1_1.scala
@@ -0,0 +1,82 @@
+/**
+ * Open Bank Project - API
+ * Copyright (C) 2011-2018, TESOBE Ltd
+ **
+ *This program is free software: you can redistribute it and/or modify
+ *it under the terms of the GNU Affero General Public License as published by
+ *the Free Software Foundation, either version 3 of the License, or
+ *(at your option) any later version.
+ **
+ *This program is distributed in the hope that it will be useful,
+ *but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ *GNU Affero General Public License for more details.
+ **
+ *You should have received a copy of the GNU Affero General Public License
+ *along with this program. If not, see .
+ **
+ *Email: contact@tesobe.com
+ *TESOBE Ltd
+ *Osloerstrasse 16/17
+ *Berlin 13359, Germany
+ **
+ *This product includes software developed at
+ *TESOBE (http://www.tesobe.com/)
+ * by
+ *Simon Redfern : simon AT tesobe DOT com
+ *Stefan Bethge : stefan AT tesobe DOT com
+ *Everett Sochowski : everett AT tesobe DOT com
+ *Ayoub Benali: ayoub AT tesobe DOT com
+ *
+ */
+package code.api.Polish.v2_1_1_1
+
+import code.api.OBPRestHelper
+import code.api.util.APIUtil.{OBPEndpoint, ResourceDoc, getAllowedEndpoints}
+import code.api.util.{ScannedApiVersion, ScannedApis}
+import code.util.Helper.MdcLoggable
+
+import code.api.Polish.v2_1_1_1.APIMethods_AISApi
+import code.api.Polish.v2_1_1_1.APIMethods_ASApi
+import code.api.Polish.v2_1_1_1.APIMethods_CAFApi
+import code.api.Polish.v2_1_1_1.APIMethods_PISApi
+
+import scala.collection.mutable.ArrayBuffer
+
+
+
+
+/*
+This file defines which endpoints from all the versions are available in v1
+ */
+object OBP_PAPI_2_1_1_1 extends OBPRestHelper with MdcLoggable with ScannedApis {
+ //please modify these three parameter if it is not correct.
+ override val apiVersion = ScannedApiVersion("polish-api", "PAPI", "v2.1.1.1")
+ val versionStatus = "DRAFT"
+
+ private[this] val endpoints =
+ APIMethods_AISApi.endpoints ++
+ APIMethods_ASApi.endpoints ++
+ APIMethods_CAFApi.endpoints ++
+ APIMethods_PISApi.endpoints
+
+ override val allResourceDocs: ArrayBuffer[ResourceDoc] =
+ APIMethods_AISApi.resourceDocs ++
+ APIMethods_ASApi.resourceDocs ++
+ APIMethods_CAFApi.resourceDocs ++
+ APIMethods_PISApi.resourceDocs
+
+ private[this] def findResourceDoc(pf: OBPEndpoint): Option[ResourceDoc] = {
+ allResourceDocs.find(_.partialFunction==pf)
+ }
+
+ // Filter the possible endpoints by the disabled / enabled Props settings and add them together
+ override val routes : List[OBPEndpoint] = getAllowedEndpoints(endpoints, allResourceDocs)
+
+ // Make them available for use!
+ routes.foreach(route => {
+ oauthServe((apiVersion.urlPrefix / version.vDottedApiVersion()).oPrefix{route}, findResourceDoc(route))
+ })
+
+ logger.info(s"version $version has been run! There are ${routes.length} routes.")
+}
diff --git a/src/main/scala/code/api/Polish/v2_1_1_1/PISApi.scala b/src/main/scala/code/api/Polish/v2_1_1_1/PISApi.scala
new file mode 100644
index 000000000..ca2e2b5a0
--- /dev/null
+++ b/src/main/scala/code/api/Polish/v2_1_1_1/PISApi.scala
@@ -0,0 +1,1074 @@
+package code.api.Polish.v2_1_1_1
+
+import code.api.APIFailureNewStyle
+import code.api.berlin.group.v1_3.JvalueCaseClass
+import net.liftweb.json
+import net.liftweb.json._
+import code.api.util.APIUtil.{defaultBankId, _}
+import code.api.util.{ApiVersion, NewStyle}
+import code.api.util.ErrorMessages._
+import code.api.util.ApiTag._
+import code.api.util.NewStyle.HttpCode
+import code.bankconnectors.Connector
+import code.model._
+import code.util.Helper
+import code.views.Views
+import net.liftweb.common.Full
+import net.liftweb.http.rest.RestHelper
+import com.github.dwickern.macros.NameOf.nameOf
+import scala.collection.immutable.Nil
+import scala.collection.mutable.ArrayBuffer
+import scala.concurrent.ExecutionContext.Implicits.global
+import scala.concurrent.Future
+import code.api.Polish.v2_1_1_1.OBP_PAPI_2_1_1_1
+import code.api.util.ApiTag
+
+object APIMethods_PISApi extends RestHelper {
+ val apiVersion = OBP_PAPI_2_1_1_1.apiVersion
+ val resourceDocs = ArrayBuffer[ResourceDoc]()
+ val apiRelations = ArrayBuffer[ApiRelation]()
+ protected implicit def JvalueToSuper(what: JValue): JvalueCaseClass = JvalueCaseClass(what)
+
+ val endpoints =
+ bundle ::
+ cancelPayments ::
+ cancelRecurringPayment ::
+ domestic ::
+ eEA ::
+ getBundle ::
+ getMultiplePayments ::
+ getPayment ::
+ getRecurringPayment ::
+ nonEEA ::
+ recurring ::
+ tax ::
+ Nil
+
+
+ resourceDocs += ResourceDoc(
+ bundle,
+ apiVersion,
+ nameOf(bundle),
+ "POST",
+ "/payments/v2_1_1.1/bundle",
+ "Initiate many transfers as bundle",
+ s"""${mockedDataText(true)}
+""",
+ json.parse("""{
+ "tppBundleId" : "tppBundleId",
+ "typeOfTransfers" : "domestic",
+ "taxTransfers" : [ {
+ "transferData" : "",
+ "usInfo" : {
+ "periodId" : "periodId",
+ "periodType" : "periodType",
+ "payerInfo" : {
+ "payorId" : "payorId",
+ "payorIdType" : "N"
+ },
+ "formCode" : "formCode",
+ "year" : 6026,
+ "obligationId" : "obligationId"
+ },
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ }, {
+ "transferData" : "",
+ "usInfo" : {
+ "periodId" : "periodId",
+ "periodType" : "periodType",
+ "payerInfo" : {
+ "payorId" : "payorId",
+ "payorIdType" : "N"
+ },
+ "formCode" : "formCode",
+ "year" : 6026,
+ "obligationId" : "obligationId"
+ },
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ } ],
+ "requestHeader" : "",
+ "domesticTransfers" : [ {
+ "transferData" : "",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ }, {
+ "transferData" : "",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ } ],
+ "EEATransfers" : [ {
+ "transferData" : "",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "SEPA",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ }, {
+ "transferData" : "",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "SEPA",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "hold" : true
+ } ],
+ "transfersTotalAmount" : "transfersTotalAmount",
+ "nonEEATransfers" : [ {
+ "transferData" : "",
+ "transferCharges" : "transferCharges",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Swift",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "recipientBank" : {
+ "code" : "code",
+ "address" : "",
+ "bicOrSwift" : "bicOrSwift",
+ "countryCode" : "countryCode",
+ "name" : "name"
+ },
+ "hold" : true
+ }, {
+ "transferData" : "",
+ "transferCharges" : "transferCharges",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Swift",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "recipientBank" : {
+ "code" : "code",
+ "address" : "",
+ "bicOrSwift" : "bicOrSwift",
+ "countryCode" : "countryCode",
+ "name" : "name"
+ },
+ "hold" : true
+ } ]
+}"""),
+ json.parse("""{
+ "payments" : [ {
+ "generalStatus" : { },
+ "tppTransactionId" : "tppTransactionId",
+ "detailedStatus" : "detailedStatus",
+ "paymentId" : "paymentId",
+ "executionMode" : "Immediate"
+ }, {
+ "generalStatus" : { },
+ "tppTransactionId" : "tppTransactionId",
+ "detailedStatus" : "detailedStatus",
+ "paymentId" : "paymentId",
+ "executionMode" : "Immediate"
+ } ],
+ "bundleId" : "bundleId",
+ "bundleDetailedStatus" : "bundleDetailedStatus",
+ "bundleStatus" : "inProgress"
+}"""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("PIS") :: apiTagMockedData :: Nil
+ )
+
+ lazy val bundle : OBPEndpoint = {
+ case "payments":: "v2_1_1.1":: "bundle" :: Nil JsonPost _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse("""{
+ "payments" : [ {
+ "generalStatus" : { },
+ "tppTransactionId" : "tppTransactionId",
+ "detailedStatus" : "detailedStatus",
+ "paymentId" : "paymentId",
+ "executionMode" : "Immediate"
+ }, {
+ "generalStatus" : { },
+ "tppTransactionId" : "tppTransactionId",
+ "detailedStatus" : "detailedStatus",
+ "paymentId" : "paymentId",
+ "executionMode" : "Immediate"
+ } ],
+ "bundleId" : "bundleId",
+ "bundleDetailedStatus" : "bundleDetailedStatus",
+ "bundleStatus" : "inProgress"
+}"""), callContext)
+ }
+ }
+ }
+
+ resourceDocs += ResourceDoc(
+ cancelPayments,
+ apiVersion,
+ nameOf(cancelPayments),
+ "POST",
+ "/payments/v2_1_1.1/cancelPayments",
+ "Cancelation of future dated payment",
+ s"""${mockedDataText(true)}
+""",
+ json.parse("""{
+ "paymentId" : "paymentId",
+ "bundleId" : "bundleId",
+ "requestHeader" : ""
+}"""),
+ json.parse("""{
+ "payments" : [ {
+ "generalStatus" : { },
+ "tppTransactionId" : "tppTransactionId",
+ "detailedStatus" : "detailedStatus",
+ "paymentId" : "paymentId",
+ "executionMode" : "Immediate"
+ }, {
+ "generalStatus" : { },
+ "tppTransactionId" : "tppTransactionId",
+ "detailedStatus" : "detailedStatus",
+ "paymentId" : "paymentId",
+ "executionMode" : "Immediate"
+ } ]
+}"""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("PIS") :: apiTagMockedData :: Nil
+ )
+
+ lazy val cancelPayments : OBPEndpoint = {
+ case "payments":: "v2_1_1.1":: "cancelPayments" :: Nil JsonPost _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse("""{
+ "payments" : [ {
+ "generalStatus" : { },
+ "tppTransactionId" : "tppTransactionId",
+ "detailedStatus" : "detailedStatus",
+ "paymentId" : "paymentId",
+ "executionMode" : "Immediate"
+ }, {
+ "generalStatus" : { },
+ "tppTransactionId" : "tppTransactionId",
+ "detailedStatus" : "detailedStatus",
+ "paymentId" : "paymentId",
+ "executionMode" : "Immediate"
+ } ]
+}"""), callContext)
+ }
+ }
+ }
+
+ resourceDocs += ResourceDoc(
+ cancelRecurringPayment,
+ apiVersion,
+ nameOf(cancelRecurringPayment),
+ "POST",
+ "/payments/v2_1_1.1/cancelRecurringPayment",
+ "Cancelation of recurring payment",
+ s"""${mockedDataText(true)}
+""",
+ json.parse("""{
+ "recurringPaymentId" : "recurringPaymentId",
+ "requestHeader" : ""
+}"""),
+ json.parse("""{
+ "tppRecurringPaymentId" : "tppRecurringPaymentId",
+ "recurringPaymentId" : "recurringPaymentId",
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ },
+ "recurringPaymentStatus" : "submitted",
+ "recurringPaymentDetailedStatus" : "recurringPaymentDetailedStatus"
+}"""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("PIS") :: apiTagMockedData :: Nil
+ )
+
+ lazy val cancelRecurringPayment : OBPEndpoint = {
+ case "payments":: "v2_1_1.1":: "cancelRecurringPayment" :: Nil JsonPost _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse("""{
+ "tppRecurringPaymentId" : "tppRecurringPaymentId",
+ "recurringPaymentId" : "recurringPaymentId",
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ },
+ "recurringPaymentStatus" : "submitted",
+ "recurringPaymentDetailedStatus" : "recurringPaymentDetailedStatus"
+}"""), callContext)
+ }
+ }
+ }
+
+ resourceDocs += ResourceDoc(
+ domestic,
+ apiVersion,
+ nameOf(domestic),
+ "POST",
+ "/payments/v2_1_1.1/domestic",
+ "Initiate domestic transfer",
+ s"""${mockedDataText(true)}
+""",
+ json.parse("""{
+ "transferData" : "",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate",
+ "requestHeader" : "",
+ "hold" : true
+}"""),
+ json.parse("""{
+ "generalStatus" : { },
+ "detailedStatus" : "detailedStatus",
+ "paymentId" : "paymentId",
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ }
+}"""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("PIS") :: apiTagMockedData :: Nil
+ )
+
+ lazy val domestic : OBPEndpoint = {
+ case "payments":: "v2_1_1.1":: "domestic" :: Nil JsonPost _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse("""{
+ "generalStatus" : { },
+ "detailedStatus" : "detailedStatus",
+ "paymentId" : "paymentId",
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ }
+}"""), callContext)
+ }
+ }
+ }
+
+ resourceDocs += ResourceDoc(
+ eEA,
+ apiVersion,
+ nameOf(eEA),
+ "POST",
+ "/payments/v2_1_1.1/EEA",
+ "Initiate SEPA foreign transfers",
+ s"""${mockedDataText(true)}
+""",
+ json.parse("""{
+ "transferData" : "",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "SEPA",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "requestHeader" : "",
+ "hold" : true
+}"""),
+ json.parse("""{
+ "generalStatus" : { },
+ "detailedStatus" : "detailedStatus",
+ "paymentId" : "paymentId",
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ }
+}"""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("PIS") :: apiTagMockedData :: Nil
+ )
+
+ lazy val eEA : OBPEndpoint = {
+ case "payments":: "v2_1_1.1":: "EEA" :: Nil JsonPost _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse("""{
+ "generalStatus" : { },
+ "detailedStatus" : "detailedStatus",
+ "paymentId" : "paymentId",
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ }
+}"""), callContext)
+ }
+ }
+ }
+
+ resourceDocs += ResourceDoc(
+ getBundle,
+ apiVersion,
+ nameOf(getBundle),
+ "POST",
+ "/payments/v2_1_1.1/getBundle",
+ "Get the status of bundle of payments",
+ s"""${mockedDataText(true)}
+""",
+ json.parse("""{
+ "tppBundleId" : "tppBundleId",
+ "transactionsIncluded" : true,
+ "bundleId" : "bundleId",
+ "requestHeader" : ""
+}"""),
+ json.parse("""{
+ "tppBundleId" : "tppBundleId",
+ "payments" : [ {
+ "generalStatus" : { },
+ "tppTransactionId" : "tppTransactionId",
+ "detailedStatus" : "detailedStatus",
+ "paymentId" : "paymentId",
+ "executionMode" : "Immediate"
+ }, {
+ "generalStatus" : { },
+ "tppTransactionId" : "tppTransactionId",
+ "detailedStatus" : "detailedStatus",
+ "paymentId" : "paymentId",
+ "executionMode" : "Immediate"
+ } ],
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ },
+ "bundleId" : "bundleId",
+ "bundleDetailedStatus" : "bundleDetailedStatus",
+ "bundleStatus" : "inProgress"
+}"""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("PIS") :: apiTagMockedData :: Nil
+ )
+
+ lazy val getBundle : OBPEndpoint = {
+ case "payments":: "v2_1_1.1":: "getBundle" :: Nil JsonPost _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse("""{
+ "tppBundleId" : "tppBundleId",
+ "payments" : [ {
+ "generalStatus" : { },
+ "tppTransactionId" : "tppTransactionId",
+ "detailedStatus" : "detailedStatus",
+ "paymentId" : "paymentId",
+ "executionMode" : "Immediate"
+ }, {
+ "generalStatus" : { },
+ "tppTransactionId" : "tppTransactionId",
+ "detailedStatus" : "detailedStatus",
+ "paymentId" : "paymentId",
+ "executionMode" : "Immediate"
+ } ],
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ },
+ "bundleId" : "bundleId",
+ "bundleDetailedStatus" : "bundleDetailedStatus",
+ "bundleStatus" : "inProgress"
+}"""), callContext)
+ }
+ }
+ }
+
+ resourceDocs += ResourceDoc(
+ getMultiplePayments,
+ apiVersion,
+ nameOf(getMultiplePayments),
+ "POST",
+ "/payments/v2_1_1.1/getMultiplePayments",
+ "Get the status of multiple payments",
+ s"""${mockedDataText(true)}
+""",
+ json.parse("""{
+ "payments" : [ {
+ "tppTransactionId" : "tppTransactionId",
+ "paymentId" : "paymentId",
+ "accessToken" : "accessToken"
+ }, {
+ "tppTransactionId" : "tppTransactionId",
+ "paymentId" : "paymentId",
+ "accessToken" : "accessToken"
+ } ],
+ "requestHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "ipAddress" : "ipAddress",
+ "tppId" : "tppId",
+ "userAgent" : "userAgent"
+ }
+}"""),
+ json.parse("""{
+ "payments" : [ {
+ "generalStatus" : { },
+ "tppTransactionId" : "tppTransactionId",
+ "detailedStatus" : "detailedStatus",
+ "paymentId" : "paymentId",
+ "executionMode" : "Immediate"
+ }, {
+ "generalStatus" : { },
+ "tppTransactionId" : "tppTransactionId",
+ "detailedStatus" : "detailedStatus",
+ "paymentId" : "paymentId",
+ "executionMode" : "Immediate"
+ } ],
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ }
+}"""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("PIS") :: apiTagMockedData :: Nil
+ )
+
+ lazy val getMultiplePayments : OBPEndpoint = {
+ case "payments":: "v2_1_1.1":: "getMultiplePayments" :: Nil JsonPost _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse("""{
+ "payments" : [ {
+ "generalStatus" : { },
+ "tppTransactionId" : "tppTransactionId",
+ "detailedStatus" : "detailedStatus",
+ "paymentId" : "paymentId",
+ "executionMode" : "Immediate"
+ }, {
+ "generalStatus" : { },
+ "tppTransactionId" : "tppTransactionId",
+ "detailedStatus" : "detailedStatus",
+ "paymentId" : "paymentId",
+ "executionMode" : "Immediate"
+ } ],
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ }
+}"""), callContext)
+ }
+ }
+ }
+
+ resourceDocs += ResourceDoc(
+ getPayment,
+ apiVersion,
+ nameOf(getPayment),
+ "POST",
+ "/payments/v2_1_1.1/getPayment",
+ "Get the status of payment",
+ s"""${mockedDataText(true)}
+""",
+ json.parse("""{
+ "tppTransactionId" : "tppTransactionId",
+ "paymentId" : "paymentId",
+ "requestHeader" : ""
+}"""),
+ json.parse(""""""""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("PIS") :: apiTagMockedData :: Nil
+ )
+
+ lazy val getPayment : OBPEndpoint = {
+ case "payments":: "v2_1_1.1":: "getPayment" :: Nil JsonPost _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse(""""""""), callContext)
+ }
+ }
+ }
+
+ resourceDocs += ResourceDoc(
+ getRecurringPayment,
+ apiVersion,
+ nameOf(getRecurringPayment),
+ "POST",
+ "/payments/v2_1_1.1/getRecurringPayment",
+ "Get the status of recurring payment",
+ s"""${mockedDataText(true)}
+""",
+ json.parse("""{
+ "tppRecurringPaymentId" : "tppRecurringPaymentId",
+ "recurringPaymentId" : "recurringPaymentId",
+ "requestHeader" : ""
+}"""),
+ json.parse("""{
+ "tppRecurringPaymentId" : "tppRecurringPaymentId",
+ "recurringPaymentId" : "recurringPaymentId",
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ },
+ "recurringPaymentStatus" : "submitted",
+ "recurringPaymentDetailedStatus" : "recurringPaymentDetailedStatus"
+}"""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("PIS") :: apiTagMockedData :: Nil
+ )
+
+ lazy val getRecurringPayment : OBPEndpoint = {
+ case "payments":: "v2_1_1.1":: "getRecurringPayment" :: Nil JsonPost _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse("""{
+ "tppRecurringPaymentId" : "tppRecurringPaymentId",
+ "recurringPaymentId" : "recurringPaymentId",
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ },
+ "recurringPaymentStatus" : "submitted",
+ "recurringPaymentDetailedStatus" : "recurringPaymentDetailedStatus"
+}"""), callContext)
+ }
+ }
+ }
+
+ resourceDocs += ResourceDoc(
+ nonEEA,
+ apiVersion,
+ nameOf(nonEEA),
+ "POST",
+ "/payments/v2_1_1.1/nonEEA",
+ "Initiate non SEPA foreign transfers",
+ s"""${mockedDataText(true)}
+""",
+ json.parse("""{
+ "transferData" : "",
+ "transferCharges" : "transferCharges",
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Swift",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "executionMode" : "Immediate",
+ "requestHeader" : "",
+ "recipientBank" : {
+ "code" : "code",
+ "address" : "",
+ "bicOrSwift" : "bicOrSwift",
+ "countryCode" : "countryCode",
+ "name" : "name"
+ },
+ "hold" : true
+}"""),
+ json.parse("""{
+ "generalStatus" : { },
+ "detailedStatus" : "detailedStatus",
+ "paymentId" : "paymentId",
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ }
+}"""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("PIS") :: apiTagMockedData :: Nil
+ )
+
+ lazy val nonEEA : OBPEndpoint = {
+ case "payments":: "v2_1_1.1":: "nonEEA" :: Nil JsonPost _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse("""{
+ "generalStatus" : { },
+ "detailedStatus" : "detailedStatus",
+ "paymentId" : "paymentId",
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ }
+}"""), callContext)
+ }
+ }
+ }
+
+ resourceDocs += ResourceDoc(
+ recurring,
+ apiVersion,
+ nameOf(recurring),
+ "POST",
+ "/payments/v2_1_1.1/recurring",
+ "Defines new recurring payment",
+ s"""${mockedDataText(true)}
+""",
+ json.parse("""{
+ "recurrence" : {
+ "endDate" : "2000-01-23",
+ "startDate" : "2000-01-23",
+ "frequency" : {
+ "periodType" : "day",
+ "periodValue" : 1
+ },
+ "dayOffOffsetType" : "before"
+ },
+ "tppRecurringPaymentId" : "tppRecurringPaymentId",
+ "nonEEAPayment" : {
+ "transferData" : "",
+ "transferCharges" : "transferCharges",
+ "system" : "Swift",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "recipientBank" : {
+ "code" : "code",
+ "address" : "",
+ "bicOrSwift" : "bicOrSwift",
+ "countryCode" : "countryCode",
+ "name" : "name"
+ },
+ "hold" : true
+ },
+ "domesticPayment" : {
+ "transferData" : "",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "hold" : true
+ },
+ "requestHeader" : "",
+ "EEAPayment" : {
+ "transferData" : "",
+ "system" : "SEPA",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ },
+ "accountNumber" : { }
+ },
+ "hold" : true
+ },
+ "taxPayment" : {
+ "transferData" : "",
+ "usInfo" : {
+ "periodId" : "periodId",
+ "periodType" : "periodType",
+ "payerInfo" : {
+ "payorId" : "payorId",
+ "payorIdType" : "N"
+ },
+ "formCode" : "formCode",
+ "year" : 6026,
+ "obligationId" : "obligationId"
+ },
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "hold" : true
+ },
+ "typeOfPayment" : "domestic"
+}"""),
+ json.parse("""{
+ "recurrence" : {
+ "endDate" : "2000-01-23",
+ "startDate" : "2000-01-23",
+ "frequency" : {
+ "periodType" : "day",
+ "periodValue" : 1
+ },
+ "dayOffOffsetType" : "before"
+ },
+ "recurringPaymentId" : "recurringPaymentId",
+ "recurringPaymentStatus" : "submitted",
+ "recurringPaymentDetailedStatus" : "recurringPaymentDetailedStatus"
+}"""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("PIS") :: apiTagMockedData :: Nil
+ )
+
+ lazy val recurring : OBPEndpoint = {
+ case "payments":: "v2_1_1.1":: "recurring" :: Nil JsonPost _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse("""{
+ "recurrence" : {
+ "endDate" : "2000-01-23",
+ "startDate" : "2000-01-23",
+ "frequency" : {
+ "periodType" : "day",
+ "periodValue" : 1
+ },
+ "dayOffOffsetType" : "before"
+ },
+ "recurringPaymentId" : "recurringPaymentId",
+ "recurringPaymentStatus" : "submitted",
+ "recurringPaymentDetailedStatus" : "recurringPaymentDetailedStatus"
+}"""), callContext)
+ }
+ }
+ }
+
+ resourceDocs += ResourceDoc(
+ tax,
+ apiVersion,
+ nameOf(tax),
+ "POST",
+ "/payments/v2_1_1.1/tax",
+ "Initiate tax transfer",
+ s"""${mockedDataText(true)}
+""",
+ json.parse("""{
+ "transferData" : "",
+ "usInfo" : {
+ "periodId" : "periodId",
+ "periodType" : "periodType",
+ "payerInfo" : {
+ "payorId" : "payorId",
+ "payorIdType" : "N"
+ },
+ "formCode" : "formCode",
+ "year" : 6026,
+ "obligationId" : "obligationId"
+ },
+ "tppTransactionId" : "tppTransactionId",
+ "system" : "Elixir",
+ "sender" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "deliveryMode" : "ExpressD0",
+ "recipient" : {
+ "nameAddress" : {
+ "value" : [ "value", "value", "value", "value" ]
+ }
+ },
+ "executionMode" : "Immediate",
+ "requestHeader" : "",
+ "hold" : true
+}"""),
+ json.parse("""{
+ "generalStatus" : { },
+ "detailedStatus" : "detailedStatus",
+ "paymentId" : "paymentId",
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ }
+}"""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("PIS") :: apiTagMockedData :: Nil
+ )
+
+ lazy val tax : OBPEndpoint = {
+ case "payments":: "v2_1_1.1":: "tax" :: Nil JsonPost _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse("""{
+ "generalStatus" : { },
+ "detailedStatus" : "detailedStatus",
+ "paymentId" : "paymentId",
+ "responseHeader" : {
+ "sendDate" : "2000-01-23T04:56:07.000+00:00",
+ "requestId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "isCallback" : true
+ }
+}"""), callContext)
+ }
+ }
+ }
+
+}
+
+
+
diff --git a/src/main/scala/code/api/ResourceDocs1_4_0/ResourceDocsAPIMethods.scala b/src/main/scala/code/api/ResourceDocs1_4_0/ResourceDocsAPIMethods.scala
index 677a0f514..f5200ad51 100644
--- a/src/main/scala/code/api/ResourceDocs1_4_0/ResourceDocsAPIMethods.scala
+++ b/src/main/scala/code/api/ResourceDocs1_4_0/ResourceDocsAPIMethods.scala
@@ -4,7 +4,6 @@ import java.util.UUID.randomUUID
import code.api.builder.OBP_APIBuilder
import code.api.UKOpenBanking.v2_0_0.OBP_UKOpenBanking_200
-import code.api.UKOpenBanking.v3_1_0.OBP_UKOpenBanking_310
import code.api.berlin.group.v1.OBP_BERLIN_GROUP_1
import code.api.berlin.group.v1_3.OBP_BERLIN_GROUP_1_3
import code.api.cache.Caching
@@ -56,7 +55,7 @@ trait ResourceDocsAPIMethods extends MdcLoggable with APIMethods220 with APIMeth
val emptyObjectJson = EmptyClassJson()
// val statedApiVersion : String = "1_4_0"
- val implementedInApiVersion : ApiVersion = ApiVersion.v1_4_0
+ val implementedInApiVersion = ApiVersion.v1_4_0
implicit val formats = new Formats {
val dateFormat = net.liftweb.json.DefaultFormats.dateFormat
@@ -115,9 +114,6 @@ trait ResourceDocsAPIMethods extends MdcLoggable with APIMethods220 with APIMeth
val resourceDocs = requestedApiVersion match {
case ApiVersion.`apiBuilder` => OBP_APIBuilder.allResourceDocs
- case ApiVersion.`ukOpenBankingV200` => OBP_UKOpenBanking_200.allResourceDocs
- case ApiVersion.`ukOpenBankingV310` => OBP_UKOpenBanking_310.allResourceDocs
- case ApiVersion.`berlinGroupV1` => OBP_BERLIN_GROUP_1.allResourceDocs
case ApiVersion.v3_1_0 => OBPAPI3_1_0.allResourceDocs
case ApiVersion.v3_0_0 => OBPAPI3_0_0.allResourceDocs
case ApiVersion.v2_2_0 => OBPAPI2_2_0.allResourceDocs
@@ -134,9 +130,6 @@ trait ResourceDocsAPIMethods extends MdcLoggable with APIMethods220 with APIMeth
val versionRoutes = requestedApiVersion match {
case ApiVersion.`apiBuilder` => OBP_APIBuilder.routes
- case ApiVersion.`ukOpenBankingV200` => OBP_UKOpenBanking_200.routes
- case ApiVersion.`ukOpenBankingV310` => OBP_UKOpenBanking_310.routes
- case ApiVersion.`berlinGroupV1` => OBP_BERLIN_GROUP_1.routes
case ApiVersion.v3_1_0 => OBPAPI3_1_0.routes
case ApiVersion.v3_0_0 => OBPAPI3_0_0.routes
case ApiVersion.v2_2_0 => OBPAPI2_2_0.routes
@@ -168,9 +161,6 @@ trait ResourceDocsAPIMethods extends MdcLoggable with APIMethods220 with APIMeth
requestedApiVersion match
{
case ApiVersion.`apiBuilder` => ;
- case ApiVersion.`ukOpenBankingV200` => ;
- case ApiVersion.`ukOpenBankingV310` => ;
- case ApiVersion.`berlinGroupV1` => ;
case version: ScannedApiVersion => ;
case _ => activePlusLocalResourceDocs ++= localResourceDocs
}
@@ -187,9 +177,6 @@ trait ResourceDocsAPIMethods extends MdcLoggable with APIMethods220 with APIMeth
x <- activePlusLocalResourceDocs
// This is the "implemented in" url
url = x.implementedInApiVersion match {
- case ApiVersion.`berlinGroupV1` => s"/berlin-group/${x.implementedInApiVersion.vDottedApiVersion}${x.requestUrl}"
- case ApiVersion.`ukOpenBankingV200` => s"/open-banking/${x.implementedInApiVersion.vDottedApiVersion}${x.requestUrl}"
- case ApiVersion.`ukOpenBankingV310` => s"/open-banking/${x.implementedInApiVersion.vDottedApiVersion}${x.requestUrl}"
case ApiVersion.`apiBuilder` => s"/api-builder/${x.implementedInApiVersion.vDottedApiVersion}${x.requestUrl}"
// We add the /obp/vX prefix here
case version: ScannedApiVersion => s"/${version.urlPrefix}/${x.implementedInApiVersion.vDottedApiVersion}${x.requestUrl}"
@@ -199,9 +186,6 @@ trait ResourceDocsAPIMethods extends MdcLoggable with APIMethods220 with APIMeth
specialInstructions = getSpecialInstructions(x.partialFunctionName),
requestUrl = url,
specifiedUrl = x.implementedInApiVersion match {
- case ApiVersion.`berlinGroupV1` => Some(url)
- case ApiVersion.`ukOpenBankingV200` => Some(url)
- case ApiVersion.`ukOpenBankingV310` => Some(url)
case ApiVersion.`apiBuilder` => Some(url)
// We add the /obp/vX prefix here - but this is the requested API version by the resource docs endpoint. i.e. we know this endpoint
// is also available here as well as the requestUrl. See the resource doc for resource doc!
diff --git a/src/main/scala/code/api/ResourceDocs1_4_0/SwaggerJSONFactory.scala b/src/main/scala/code/api/ResourceDocs1_4_0/SwaggerJSONFactory.scala
index d3baff370..c418ecf0b 100644
--- a/src/main/scala/code/api/ResourceDocs1_4_0/SwaggerJSONFactory.scala
+++ b/src/main/scala/code/api/ResourceDocs1_4_0/SwaggerJSONFactory.scala
@@ -303,7 +303,7 @@ object SwaggerJSONFactory {
//No longer need this special case since all transaction request Resource Docs have explicit URL
//case "createTransactionRequest" => s"${rd.apiVersion.toString }-${rd.apiFunction.toString}-${UUID.randomUUID().toString}"
// Note: The operationId should not start with a number becuase Javascript constructors may use it to build variables.
- case _ => s"v${rd.implementedInApiVersion.toString }-${rd.partialFunctionName.toString }"
+ case _ => s"${rd.implementedInApiVersion.fullyQualifiedVersion }-${rd.partialFunctionName.toString }"
},
//TODO, this is for Post Body
parameters =
diff --git a/src/main/scala/code/api/STET/v1_4/AISPApi.scala b/src/main/scala/code/api/STET/v1_4/AISPApi.scala
new file mode 100644
index 000000000..4bf7ebba0
--- /dev/null
+++ b/src/main/scala/code/api/STET/v1_4/AISPApi.scala
@@ -0,0 +1,335 @@
+package code.api.STET.v1_4
+
+import code.api.APIFailureNewStyle
+import code.api.berlin.group.v1_3.JvalueCaseClass
+import net.liftweb.json
+import net.liftweb.json._
+import code.api.util.APIUtil.{defaultBankId, _}
+import code.api.util.{ApiVersion, NewStyle}
+import code.api.util.ErrorMessages._
+import code.api.util.ApiTag._
+import code.api.util.NewStyle.HttpCode
+import code.bankconnectors.Connector
+import code.model._
+import code.util.Helper
+import code.views.Views
+import net.liftweb.common.Full
+import net.liftweb.http.rest.RestHelper
+import com.github.dwickern.macros.NameOf.nameOf
+import scala.collection.immutable.Nil
+import scala.collection.mutable.ArrayBuffer
+import scala.concurrent.ExecutionContext.Implicits.global
+import scala.concurrent.Future
+import code.api.STET.v1_4.OBP_STET_1_4
+import code.api.util.ApiTag
+
+object APIMethods_AISPApi extends RestHelper {
+ val apiVersion = OBP_STET_1_4.apiVersion
+ val resourceDocs = ArrayBuffer[ResourceDoc]()
+ val apiRelations = ArrayBuffer[ApiRelation]()
+ protected implicit def JvalueToSuper(what: JValue): JvalueCaseClass = JvalueCaseClass(what)
+
+ val endpoints =
+ accountsBalancesGet ::
+ accountsGet ::
+ accountsTransactionsGet ::
+ consentsPut ::
+ endUserIdentityGet ::
+ trustedBeneficiariesGet ::
+ Nil
+
+
+ resourceDocs += ResourceDoc(
+ accountsBalancesGet,
+ apiVersion,
+ nameOf(accountsBalancesGet),
+ "GET",
+ "/accounts/ACCOUNTRESOURCEID/balances",
+ "Retrieval of an account balances report (AISP)",
+ s"""${mockedDataText(true)}
+<h3>Description</h3>
+ This call returns a set of balances for a given PSU account that is specified by the AISP through an account resource Identification
+<h3>Prerequisites</h3>
+ <ul>
+ <li>The TPP has been registered by the Registration Authority for the AISP role</li>
+ <li>The TPP and the PSU have a contract that has been enrolled by the ASPSP
+ <ul style="list-style-type:circle;">
+ <li>At this step, the ASPSP has delivered an OAUTH2 “Authorization Code” or “Resource Owner Password” access token to the TPP (cf. § 3.4.2).</li>
+ </ul>
+ </li>
+ <li>The TPP and the ASPSP have successfully processed a mutual check and authentication</li>
+ <li>The TPP has presented its OAUTH2 “Authorization Code” or “Resource Owner Password” access token which allows the ASPSP to identify the relevant PSU and retrieve the linked PSU context (cf. § 3.4.2) if any.</li>
+ <li>The ASPSP takes into account the access token that establishes the link between the PSU and the AISP.</li>
+ <li>The TPP has previously retrieved the list of available accounts for the PSU</li>
+ </ul>
+<h3>Business flow</h3>
+ The AISP requests the ASPSP on one of the PSU’s accounts.<br />
+ The ASPSP answers by providing a list of balances on this account.
+ <ul>
+ <li>The ASPSP must provide at least the accounting balance on the account.</li>
+ <li>The ASPSP can provide other balance restitutions, e.g. instant balance, as well, if possible.</li>
+ <li>Actually, from the PSD2 perspective, any other balances that are provided through the Web-Banking service of the ASPSP must also be provided by this ASPSP through the API.</li>
+ </ul>
+""",
+ json.parse(""""""),
+ json.parse(""""""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("AISP") :: apiTagMockedData :: Nil
+ )
+
+ lazy val accountsBalancesGet : OBPEndpoint = {
+ case "accounts" :: accountresourceid:: "balances" :: Nil JsonGet _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse(""""""), callContext)
+ }
+ }
+ }
+
+ resourceDocs += ResourceDoc(
+ accountsGet,
+ apiVersion,
+ nameOf(accountsGet),
+ "GET",
+ "/accounts",
+ "Retrieval of the PSU accounts (AISP)",
+ s"""${mockedDataText(true)}
+<h3>Description</h3>
+ This call returns all payment accounts that are relevant the PSU on behalf of whom the AISP is connected.
+ Thanks to HYPERMEDIA, each account is returned with the links aiming to ease access to the relevant transactions and balances.
+ The result may be subject to pagination (i.e. retrieving a partial result in case of having too many results) through a set of pages by the ASPSP. Thereafter, the AISP may ask for the first, next, previous or last page of results.
+<h3>Prerequisites</h3>
+ <ul>
+ <li>The TPP has been registered by the Registration Authority for the AISP role.</li>
+ <li>The TPP and the PSU have a contract that has been enrolled by the ASPSP</li>
+ <ul>
+ <li>At this step, the ASPSP has delivered an OAUTH2 "Authorization Code" or "Resource Owner Password" access token to the TPP (cf. § 3.4.2).</li>
+ </ul>
+ <li>The TPP and the ASPSP have successfully processed a mutual check and authentication</li>
+ <li>The TPP has presented its OAUTH2 "Authorization Code" or "Resource Owner Password" access token which allows the ASPSP to identify the relevant PSU and retrieve the linked PSU context (cf. § 3.4.2) if any.</li>
+ <li>The ASPSP takes into account the access token that establishes the link between the PSU and the AISP.</li>
+ </ul>
+<h3>Business Flow</h3>
+ The TPP sends a request to the ASPSP for retrieving the list of the PSU payment accounts.
+ The ASPSP computes the relevant PSU accounts and builds the answer as an accounts list.
+ The result may be subject to pagination in order to avoid an excessive result set.
+ Each payment account will be provided with its characteristics.
+""",
+ json.parse(""""""),
+ json.parse(""""""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("AISP") :: apiTagMockedData :: Nil
+ )
+
+ lazy val accountsGet : OBPEndpoint = {
+ case "accounts" :: Nil JsonGet _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse(""""""), callContext)
+ }
+ }
+ }
+
+ resourceDocs += ResourceDoc(
+ accountsTransactionsGet,
+ apiVersion,
+ nameOf(accountsTransactionsGet),
+ "GET",
+ "/accounts/ACCOUNTRESOURCEID/transactions",
+ "Retrieval of an account transaction set (AISP)",
+ s"""${mockedDataText(true)}
+<h3>Description</h3>
+ This call returns transactions for an account for a given PSU account that is specified by the AISP through an account resource identification.
+ The request may use some filter parameter in order to restrict the query
+ <ul>
+ <li>on a given imputation date range</li>
+ <li>past a given incremental technical identification</li>
+ </ul>
+ The result may be subject to pagination (i.e. retrieving a partial result in case of having too many results) through a set of pages by the ASPSP. Thereafter, the AISP may ask for the first, next, previous or last page of results.
+<h3>Prerequisites</h3>
+ <ul>
+ <li>The TPP has been registered by the Registration Authority for the AISP role</li>
+ <li>The TPP and the PSU have a contract that has been enrolled by the ASPSP</li>
+ <ul>
+ <li>At this step, the ASPSP has delivered an OAUTH2 "Authorization Code" or "Resource Owner Password" access token to the TPP (cf. § 3.4.2).</li>
+ </ul>
+ <li>The TPP and the ASPSP have successfully processed a mutual check and authentication </li>
+ <li>The TPP has presented its OAUTH2 "Authorization Code" or "Resource Owner Password" access token which allows the ASPSP to identify the relevant PSU and retrieve the linked PSU context (cf. § 3.4.2) is any.</li>
+ <li>The ASPSP takes into account the access token that establishes the link between the PSU and the AISP.</li>
+ <li>The TPP has previously retrieved the list of available accounts for the PSU</li>
+ </ul>
+<h3>Business flow</h3>
+ The AISP requests the ASPSP on one of the PSU’s accounts. It may specify some selection criteria.
+ The ASPSP answers by a set of transactions that matches the query. The result may be subject to pagination in order to avoid an excessive result set.
+""",
+ json.parse(""""""),
+ json.parse(""""""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("AISP") :: apiTagMockedData :: Nil
+ )
+
+ lazy val accountsTransactionsGet : OBPEndpoint = {
+ case "accounts" :: accountresourceid:: "transactions" :: Nil JsonGet _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse(""""""), callContext)
+ }
+ }
+ }
+
+ resourceDocs += ResourceDoc(
+ consentsPut,
+ apiVersion,
+ nameOf(consentsPut),
+ "PUT",
+ "/consents",
+ "Forwarding the PSU consent (AISP)",
+ s"""${mockedDataText(true)}
+<h3>Description</h3>
+ In the mixed detailed consent on accounts
+ <ul>
+ <li>the AISP captures the consent of the PSU</li>
+ <li>then it forwards this consent to the ASPSP</li>
+ </ul>
+ This consent replaces any prior consent that was previously sent by the AISP.
+<h3>Prerequisites</h3>
+ <ul>
+ <li>The TPP has been registered by the Registration Authority for the AISP role.</li>
+ <li>The TPP and the PSU have a contract that has been enrolled by the ASPSP</li>
+ <ul>
+ <li>At this step, the ASPSP has delivered an OAUTH2 "Authorization Code" or "Resource Owner Password" access token to the TPP (cf. § 3.4.2).</li>
+ </ul>
+ <li>The TPP and the ASPSP have successfully processed a mutual check and authentication</li>
+ <li>The TPP has presented its OAUTH2 "Authorization Code" or "Resource Owner Password" access token which allows the ASPSP to identify the relevant PSU and retrieve the linked PSU context (cf. § 3.4.2) if any.</li>
+ <li>The ASPSP takes into account the access token that establishes the link between the PSU and the AISP.</li>
+ </ul>
+<h3>Business Flow</h3>
+ The PSU specifies to the AISP which of his/her accounts will be accessible and which functionalities should be available.
+ The AISP forwards these settings to the ASPSP.
+ The ASPSP answers by HTTP201 return code.
+""",
+ json.parse("""{
+ "balances" : [ {
+ "iban" : "YY64COJH41059545330222956960771321"
+ } ],
+ "trustedBeneficiaries" : true,
+ "psuIdentity" : true
+}"""),
+ json.parse(""""""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("AISP") :: apiTagMockedData :: Nil
+ )
+
+ lazy val consentsPut : OBPEndpoint = {
+ case "consents" :: Nil JsonPut _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse(""""""), callContext)
+ }
+ }
+ }
+
+ resourceDocs += ResourceDoc(
+ endUserIdentityGet,
+ apiVersion,
+ nameOf(endUserIdentityGet),
+ "GET",
+ "/end-user-identity",
+ "Retrieval of the identity of the end-user (AISP)",
+ s"""${mockedDataText(true)}
+<h3>Description</h3>
+ This call returns the identity of the PSU (end-user).
+<h3>Prerequisites</h3>
+ <ul>
+ <li>The TPP has been registered by the Registration Authority for the AISP role.</li>
+ <li>The TPP and the PSU have a contract that has been enrolled by the ASPSP</li>
+ <ul>
+ <li>At this step, the ASPSP has delivered an OAUTH2 "Authorization Code" or "Resource Owner Password" access token to the TPP (cf. § 3.4.2).</li>
+ </ul>
+ <li>The TPP and the ASPSP have successfully processed a mutual check and authentication</li>
+ <li>The TPP has presented its OAUTH2 "Authorization Code" or "Resource Owner Password" access token which allows the ASPSP to identify the relevant PSU and retrieve the linked PSU context (cf. § 3.4.2) if any.</li>
+ <li>The ASPSP takes into account the access token that establishes the link between the PSU and the AISP.</li>
+ </ul>
+<h3>Business Flow</h3>
+ The AISP asks for the identity of the PSU.
+ The ASPSP answers with the identity, i.e. first and last names of the end-user.
+""",
+ json.parse(""""""),
+ json.parse(""""""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("AISP") :: apiTagMockedData :: Nil
+ )
+
+ lazy val endUserIdentityGet : OBPEndpoint = {
+ case "end-user-identity" :: Nil JsonGet _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse(""""""), callContext)
+ }
+ }
+ }
+
+ resourceDocs += ResourceDoc(
+ trustedBeneficiariesGet,
+ apiVersion,
+ nameOf(trustedBeneficiariesGet),
+ "GET",
+ "/trusted-beneficiaries",
+ "Retrieval of the trusted beneficiaries list (AISP)",
+ s"""${mockedDataText(true)}
+<h3>Description</h3>
+ This call returns all trusted beneficiaries that have been set by the PSU.
+ Those beneficiaries can benefit from an SCA exemption during payment initiation.
+ The result may be subject to pagination (i.e. retrieving a partial result in case of having too many results) through a set of pages by the ASPSP. Thereafter, the AISP may ask for the first, next, previous or last page of results.
+<h3>Prerequisites</h3>
+ <ul>
+ <li>The TPP has been registered by the Registration Authority for the AISP role.</li>
+ <li>The TPP and the PSU have a contract that has been enrolled by the ASPSP</li>
+ <ul>
+ <li>At this step, the ASPSP has delivered an OAUTH2 "Authorization Code" or "Resource Owner Password" access token to the TPP (cf. § 3.4.2).</li>
+ </ul>
+ <li>The TPP and the ASPSP have successfully processed a mutual check and authentication</li>
+ <li>The TPP has presented its OAUTH2 "Authorization Code" or "Resource Owner Password" access token which allows the ASPSP to identify the relevant PSU and retrieve the linked PSU context (cf. § 3.4.2) if any.</li>
+ <li>The ASPSP takes into account the access token that establishes the link between the PSU and the AISP.</li>
+ </ul>
+<h3>Business Flow</h3>
+ The AISP asks for the trusted beneficiaries list.
+ The ASPSP answers with a list of beneficiary details structure.
+""",
+ json.parse(""""""),
+ json.parse(""""""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("AISP") :: apiTagMockedData :: Nil
+ )
+
+ lazy val trustedBeneficiariesGet : OBPEndpoint = {
+ case "trusted-beneficiaries" :: Nil JsonGet _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse(""""""), callContext)
+ }
+ }
+ }
+
+}
+
+
+
diff --git a/src/main/scala/code/api/STET/v1_4/CBPIIApi.scala b/src/main/scala/code/api/STET/v1_4/CBPIIApi.scala
new file mode 100644
index 000000000..b7bf1d729
--- /dev/null
+++ b/src/main/scala/code/api/STET/v1_4/CBPIIApi.scala
@@ -0,0 +1,93 @@
+package code.api.STET.v1_4
+
+import code.api.APIFailureNewStyle
+import code.api.berlin.group.v1_3.JvalueCaseClass
+import net.liftweb.json
+import net.liftweb.json._
+import code.api.util.APIUtil.{defaultBankId, _}
+import code.api.util.{ApiVersion, NewStyle}
+import code.api.util.ErrorMessages._
+import code.api.util.ApiTag._
+import code.api.util.NewStyle.HttpCode
+import code.bankconnectors.Connector
+import code.model._
+import code.util.Helper
+import code.views.Views
+import net.liftweb.common.Full
+import net.liftweb.http.rest.RestHelper
+import com.github.dwickern.macros.NameOf.nameOf
+import scala.collection.immutable.Nil
+import scala.collection.mutable.ArrayBuffer
+import scala.concurrent.ExecutionContext.Implicits.global
+import scala.concurrent.Future
+import code.api.STET.v1_4.OBP_STET_1_4
+import code.api.util.ApiTag
+
+object APIMethods_CBPIIApi extends RestHelper {
+ val apiVersion = OBP_STET_1_4.apiVersion
+ val resourceDocs = ArrayBuffer[ResourceDoc]()
+ val apiRelations = ArrayBuffer[ApiRelation]()
+ protected implicit def JvalueToSuper(what: JValue): JvalueCaseClass = JvalueCaseClass(what)
+
+ val endpoints =
+ fundsConfirmationsPost ::
+ Nil
+
+
+ resourceDocs += ResourceDoc(
+ fundsConfirmationsPost,
+ apiVersion,
+ nameOf(fundsConfirmationsPost),
+ "POST",
+ "/funds-confirmations",
+ "Payment coverage check request (CBPII)",
+ s"""${mockedDataText(true)}
+<h3>Description</h3>
+The CBPII can ask an ASPSP to check if a given amount can be covered by the liquidity that is available on a PSU cash account or payment card.
+<h3>Prerequisites</h3>
+<ul>
+ <li>The TPP has been registered by the Registration Authority for the CBPII role</li>
+ <li>The TPP and the PSU have a contract that has been registered by the ASPSP</li>
+ <ul>
+ <li>At this step, the ASPSP has delivered an "Authorization Code", a "Resource Owner Password" or a "Client Credential" OAUTH2 access token to the TPP (cf. § 3.4.2).</li>
+ <li>Each ASPSP has to implement either the "Authorization Code"/"Resource Owner Password" or the "Client Credential" OAUTH2 access token model.</li>
+ <li>Doing this, it will edit the [security] section on this path in order to specify which model it has chosen</li>
+ </ul>
+ <li>The TPP and the ASPSP have successfully processed a mutual check and authentication </li>
+ <li>The TPP has presented its OAUTH2 "Authorization Code", "Resource Owner Password" or "Client Credential" access token which allows the ASPSP to identify the relevant PSU.</li>
+</ul>
+<h3>Business flow</h3>
+The CBPII requests the ASPSP for a payment coverage check against either a bank account or a card primary identifier.
+The ASPSP answers with a structure embedding the original request and the result as a Boolean.
+""",
+ json.parse("""{
+ "paymentCoverageRequestId" : "MyCoverage123456",
+ "instructedAmount" : {
+ "currency" : "EUR",
+ "amount" : "12345"
+ },
+ "accountId" : {
+ "iban" : "YY13RDHN98392489481620896668799742"
+ }
+}"""),
+ json.parse(""""""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("CBPII") :: apiTagMockedData :: Nil
+ )
+
+ lazy val fundsConfirmationsPost : OBPEndpoint = {
+ case "funds-confirmations" :: Nil JsonPost _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse(""""""), callContext)
+ }
+ }
+ }
+
+}
+
+
+
diff --git a/src/main/scala/code/api/STET/v1_4/OBP_STET_1_4.scala b/src/main/scala/code/api/STET/v1_4/OBP_STET_1_4.scala
new file mode 100644
index 000000000..a8a6d8b90
--- /dev/null
+++ b/src/main/scala/code/api/STET/v1_4/OBP_STET_1_4.scala
@@ -0,0 +1,79 @@
+/**
+ * Open Bank Project - API
+ * Copyright (C) 2011-2018, TESOBE Ltd
+ **
+ *This program is free software: you can redistribute it and/or modify
+ *it under the terms of the GNU Affero General Public License as published by
+ *the Free Software Foundation, either version 3 of the License, or
+ *(at your option) any later version.
+ **
+ *This program is distributed in the hope that it will be useful,
+ *but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ *GNU Affero General Public License for more details.
+ **
+ *You should have received a copy of the GNU Affero General Public License
+ *along with this program. If not, see .
+ **
+ *Email: contact@tesobe.com
+ *TESOBE Ltd
+ *Osloerstrasse 16/17
+ *Berlin 13359, Germany
+ **
+ *This product includes software developed at
+ *TESOBE (http://www.tesobe.com/)
+ * by
+ *Simon Redfern : simon AT tesobe DOT com
+ *Stefan Bethge : stefan AT tesobe DOT com
+ *Everett Sochowski : everett AT tesobe DOT com
+ *Ayoub Benali: ayoub AT tesobe DOT com
+ *
+ */
+package code.api.STET.v1_4
+
+import code.api.OBPRestHelper
+import code.api.util.APIUtil.{OBPEndpoint, ResourceDoc, getAllowedEndpoints}
+import code.api.util.{ScannedApiVersion, ScannedApis}
+import code.util.Helper.MdcLoggable
+
+import code.api.STET.v1_4.APIMethods_AISPApi
+import code.api.STET.v1_4.APIMethods_CBPIIApi
+import code.api.STET.v1_4.APIMethods_PISPApi
+
+import scala.collection.mutable.ArrayBuffer
+
+
+
+
+/*
+This file defines which endpoints from all the versions are available in v1
+ */
+object OBP_STET_1_4 extends OBPRestHelper with MdcLoggable with ScannedApis {
+ //please modify these three parameter if it is not correct.
+ override val apiVersion = ScannedApiVersion("stet", "STET", "v1.4")
+ val versionStatus = "DRAFT"
+
+ private[this] val endpoints =
+ APIMethods_AISPApi.endpoints ++
+ APIMethods_CBPIIApi.endpoints ++
+ APIMethods_PISPApi.endpoints
+
+ override val allResourceDocs: ArrayBuffer[ResourceDoc] =
+ APIMethods_AISPApi.resourceDocs ++
+ APIMethods_CBPIIApi.resourceDocs ++
+ APIMethods_PISPApi.resourceDocs
+
+ private[this] def findResourceDoc(pf: OBPEndpoint): Option[ResourceDoc] = {
+ allResourceDocs.find(_.partialFunction==pf)
+ }
+
+ // Filter the possible endpoints by the disabled / enabled Props settings and add them together
+ override val routes : List[OBPEndpoint] = getAllowedEndpoints(endpoints, allResourceDocs)
+
+ // Make them available for use!
+ routes.foreach(route => {
+ oauthServe((apiVersion.urlPrefix / version.vDottedApiVersion()).oPrefix{route}, findResourceDoc(route))
+ })
+
+ logger.info(s"version $version has been run! There are ${routes.length} routes.")
+}
diff --git a/src/main/scala/code/api/STET/v1_4/PISPApi.scala b/src/main/scala/code/api/STET/v1_4/PISPApi.scala
new file mode 100644
index 000000000..cbc89a6f8
--- /dev/null
+++ b/src/main/scala/code/api/STET/v1_4/PISPApi.scala
@@ -0,0 +1,706 @@
+
+package code.api.STET.v1_4
+
+import code.api.APIFailureNewStyle
+import code.api.berlin.group.v1_3.JvalueCaseClass
+import net.liftweb.json
+import net.liftweb.json._
+import code.api.util.APIUtil.{defaultBankId, _}
+import code.api.util.{ApiVersion, NewStyle}
+import code.api.util.ErrorMessages._
+import code.api.util.ApiTag._
+import code.api.util.NewStyle.HttpCode
+import code.bankconnectors.Connector
+import code.model._
+import code.util.Helper
+import code.views.Views
+import net.liftweb.common.Full
+import net.liftweb.http.rest.RestHelper
+import com.github.dwickern.macros.NameOf.nameOf
+import scala.collection.immutable.Nil
+import scala.collection.mutable.ArrayBuffer
+import scala.concurrent.ExecutionContext.Implicits.global
+import scala.concurrent.Future
+import code.api.STET.v1_4.OBP_STET_1_4
+import code.api.util.ApiTag
+
+object APIMethods_PISPApi extends RestHelper {
+ val apiVersion = OBP_STET_1_4.apiVersion
+ val resourceDocs = ArrayBuffer[ResourceDoc]()
+ val apiRelations = ArrayBuffer[ApiRelation]()
+ protected implicit def JvalueToSuper(what: JValue): JvalueCaseClass = JvalueCaseClass(what)
+
+ val endpoints =
+ paymentRequestConfirmationPost ::
+ paymentRequestPut ::
+ paymentRequestsGet ::
+ paymentRequestsPost ::
+ Nil
+
+
+ resourceDocs += ResourceDoc(
+ paymentRequestConfirmationPost,
+ apiVersion,
+ nameOf(paymentRequestConfirmationPost),
+ "POST",
+ "/payment-requests/PAYMENTREQUESTRESOURCEID/confirmation",
+ "Confirmation of a payment request or a modification request (PISP)",
+ s"""${mockedDataText(true)}
+<h3>Description</h3>
+ The PISP confirms one of the following requests<br>
+ <ul>
+ <li>payment request on behalf of a merchant</li>
+ <li>transfer request on behalf of the account's owner</li>
+ <li>standing-order request on behalf of the account's owner</li>
+ </ul>
+ The ASPSP answers with a status of the relevant request and the subsequent Credit Transfer.
+<h3>Prerequisites</h3>
+ <ul>
+ <li> The TPP has been registered by the Registration Authority for the PISP role</li>
+ <li> The TPP was provided with an OAUTH2 "Client Credential" access token by the ASPSP (cf. § 3.4.3).</li>
+ <li> The TPP has previously posted a Request which has been saved by the ASPSP (cf. § 4.5.3)</li>
+ <ul>
+ <li>The ASPSP has answered with a location link to the saved Payment Request (cf. § 4.5.4)</li>
+ <li> The TPP has retrieved the saved request in order to get the relevant resource Ids (cf. § 4.6).</li>
+ </ul>
+ <li> The TPP and the ASPSP have successfully processed a mutual check and authentication </li>
+ <li> The TPP has presented its "OAUTH2 Client Credential" access token </li>
+ </ul>
+<h3>Business flow</h3>
+ Once the PSU has been authenticated, it is the due to the PISP to confirm the Request to the ASPSP in order to complete the process flow.<br>
+ In REDIRECT and DECOUPLED approach, this confirmation is not a prerequisite to the execution of the Credit Transfer.<br>
+""",
+ json.parse("""{
+ "psuAuthenticationFactor" : "JJKJKJ788GKJKJBK"
+}"""),
+ json.parse(""""""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("PISP") :: apiTagMockedData :: Nil
+ )
+
+ lazy val paymentRequestConfirmationPost : OBPEndpoint = {
+ case "payment-requests" :: paymentrequestresourceid:: "confirmation" :: Nil JsonPost _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse(""""""), callContext)
+ }
+ }
+ }
+
+ resourceDocs += ResourceDoc(
+ paymentRequestPut,
+ apiVersion,
+ nameOf(paymentRequestPut),
+ "PUT",
+ "/payment-requests/PAYMENTREQUESTRESOURCEID",
+ "Modification of a Payment/Transfer Request (PISP)",
+ s"""${mockedDataText(true)}
+<h3>Description</h3>
+The PISP sent a Payment/Transfer Request through a POST command.<br>
+ The ASPSP registered the Payment/Transfer Request, updated if necessary the relevant identifiers in order to avoid duplicates and returned the location of the updated Request.<br>
+ The PISP got the Payment/Transfer Request that has been updated with the resource identifiers, and eventually the status of the Payment/Transfer Request and the status of the subsequent credit transfer.<br>
+ The PISP request for the payment cancellation (global cancellation) or for some payment instructions cancellation (partial cancellation)<br>
+ No other modification of the Payment/Transfer Request is allowed.<br/>
+<h3>Prerequisites</h3>
+<ul>
+ <li>The TPP was registered by the Registration Authority for the PISP role</li>
+ <li>The TPP was provided with an OAUTH2 "Client Credential" access token by the ASPSP (cf. § 3.4.3).</li>
+ <li>The TPP previously posted a Payment/Transfer Request which was saved by the ASPSP (cf. § 4.5.3)</li>
+ <ul>
+ <li>The ASPSP answered with a location link to the saved Payment/Transfer Request (cf. § 4.5.4)</li>
+ <li>The PISP retrieved the saved Payment/Transfer Request (cf. § 4.5.4)</li>
+ </ul>
+ <li>The TPP and the ASPSP successfully processed a mutual check and authentication </li>
+ <li>The TPP presented its "OAUTH2 Client Credential" access token.</li>
+ <li>The TPP presented the payment/transfer request.</li>
+ <li>The PSU was successfully authenticated.</li>
+</ul>
+<h3>Business flow</h3>
+the following cases can be applied:
+<ul>
+ <li>Case of a payment with multiple instructions or a standing order, the PISP asks to cancel the whole Payment/Transfer or Standing Order Request including all non-executed payment instructions by setting the [paymentInformationStatus] to "RJCT" and the relevant [statusReasonInformation] to "DS02" at payment level.</li>
+ <li>Case of a payment with multiple instructions, the PISP asks to cancel one or several payment instructions by setting the [transactionStatus] to "RJCT" and the relevant [statusReasonInformation] to "DS02" at each relevant instruction level.</li>
+</ul>
+Since the modification request needs a PSU authentication before committing, the modification request includes:</li>
+ <ul>
+ <li>The specification of the authentication approaches that are supported by the PISP (any combination of "REDIRECT", "EMBEDDED" and "DECOUPLED" values).</li>
+ <li>In case of possible REDIRECT or DECOUPLED authentication approach, one or two call-back URLs to be used by the ASPSP at the finalisation of the authentication and consent process :</li>
+ <ul>
+ <li>The first call-back URL will be called by the ASPSP if the Transfer Request is processed without any error or rejection by the PSU</li>
+ <li>The second call-back URL is to be used by the ASPSP in case of processing error or rejection by the PSU. Since this second URL is optional, the PISP might not provide it. In this case, the ASPSP will use the same URL for any processing result.</li>
+ <li>Both call-back URLS must be used in a TLS-secured request.</li>
+ </ul>
+ <li>In case of possible "EMBEDDED" or "DECOUPLED" approaches, a PSU identifier that can be processed by the ASPSP for PSU recognition.</li>
+ </ul>
+ <li>The ASPSP saves the updated Payment/Transfer Request and answers to the PISP. The answer embeds </li>
+ <ul>
+ <li>The specification of the chosen authentication approach taking into account both the PISP and the PSU capabilities.</li>
+ <li>In case of chosen REDIRECT authentication approach, the URL to be used by the PISP for redirecting the PSU in order to perform an authentication.</li>
+ </ul>
+</ul>
+<h3>Authentication flows for both use cases</h3>
+<h4>Redirect authentication approach </h4>
+When the chosen authentication approach within the ASPSP answers is set to "REDIRECT":<br>
+<ul>
+ <li>The PISP redirects the PSU to the ASPSP which authenticates the PSU </li>
+ <li>The ASPSP asks the PSU to give (or deny) his/her consent to the Payment Request global or partial Cancellation</li>
+ <li>The ASPSP is then able to initiate the subsequent cancellation</li>
+ <li>The ASPSP redirects the PSU to the PISP using one of the call-back URLs provided within the posted Payment Request cancellation</li>
+</ul>
+If the PSU neither gives nor denies his/her consent, the Cancellation Request shall expire and is then rejected to the PISP. The expiration delay is specified by each ASPSP.<br>
+<h4>Decoupled authentication approach</h4>
+When the chosen authentication approach is "DECOUPLED":<br>
+<ul>
+ <li>Based on the PSU identifier provided within the Payment Request by the PISP, the ASPSP provides the PSU with the Cancellation Request details and challenges the PSU for a Strong Customer Authentication on a decoupled device or application.</li>
+ <li>The PSU confirms or not the Payment Request global or partial Cancellation</li>
+ <li>The ASPSP is then able to initiate the subsequent cancellation</li>
+ <li>The ASPSP notifies the PISP about the finalisation of the authentication and cancellation process by using one of the call-back URLs provided within the posted Payment Request</li>
+</ul>
+If the PSU neither gives nor denies his/her consent, the Cancellation Request shall expire and is then rejected to the PISP. The expiration delay is specified by each ASPSP.<br>
+<h4>Embedded authentication approach</h4>
+When the chosen authentication approach within the ASPSP answers is set to "EMBEDDED":<br>
+<ul>
+ <li>The TPP informs the PSU that a challenge is needed for completing the Payment Request cancellation processing. This challenge will be one of the following:</li>
+ <ul>
+ <li>A One-Time-Password sent by the ASPSP to the PSU on a separate device or application.</li>
+ <li>A response computed by a specific device on base of a challenge sent by the ASPSP to the PSU on a separate device or application.</li>
+ </ul>
+ <li>The PSU unlock the device or application through a "knowledge factor" and/or an "inherence factor" (biometric), retrieves the cancellation details.</li>
+ <li>The PSU confirms or not the Payment Request global or partial Cancellation</li>
+ <li>When agreeing the Payment Request cancellation, the PSU enters the resulting authentication factor through the PISP interface which will forward it to the ASPSP through a confirmation request (cf. § 4.7)</li>
+</ul>
+Case of the PSU neither gives nor denies his/her consent, the Cancellation Request shall expire and is then rejected to the PISP. The expiration delay is specified by each ASPSP.<br>
+""",
+ json.parse("""{
+ "paymentInformationId" : "MyPmtInfId",
+ "creationDateTime" : "2018-03-31T13:25:22.527+02:00",
+ "numberOfTransactions" : 1,
+ "initiatingParty" : {
+ "name" : "MyPreferedPisp",
+ "postalAddress" : {
+ "country" : "FR",
+ "addressLine" : [ "18 rue de la DSP2", "75008 PARIS" ]
+ },
+ "organisationId" : {
+ "identification" : "12FR5",
+ "schemeName" : "COID",
+ "issuer" : "ACPR"
+ }
+ },
+ "paymentTypeInformation" : {
+ "serviceLevel" : "SEPA",
+ "localInstrument" : "INST",
+ "categoryPurpose" : "DVPM"
+ },
+ "debtor" : {
+ "name" : "MyCustomer",
+ "postalAddress" : {
+ "country" : "FR",
+ "addressLine" : [ "18 rue de la DSP2", "75008 PARIS" ]
+ },
+ "privateId" : {
+ "identification" : "FD37G",
+ "schemeName" : "BANK",
+ "issuer" : "BICXYYTTZZZ"
+ }
+ },
+ "creditor" : {
+ "name" : "myMerchant",
+ "postalAddress" : {
+ "country" : "FR",
+ "addressLine" : [ "18 rue de la DSP2", "75008 PARIS" ]
+ },
+ "organisationId" : {
+ "identification" : "852126789",
+ "schemeName" : "SIREN",
+ "issuer" : "FR"
+ }
+ },
+ "creditorAccount" : {
+ "iban" : "YY64COJH41059545330222956960771321"
+ },
+ "ultimateCreditor" : {
+ "name" : "myPreferedUltimateMerchant",
+ "postalAddress" : {
+ "country" : "FR",
+ "addressLine" : [ "18 rue de la DSP2", "75008 PARIS" ]
+ },
+ "organisationId" : {
+ "identification" : "85212678900025",
+ "schemeName" : "SIRET",
+ "issuer" : "FR"
+ }
+ },
+ "purpose" : "COMC",
+ "chargeBearer" : "SLEV",
+ "creditTransferTransaction" : [ {
+ "paymentId" : {
+ "instructionId" : "MyInstrId",
+ "endToEndId" : "MyEndToEndId"
+ },
+ "requestedExecutionDate" : "2016-12-31T00:00:00.000+01:00",
+ "instructedAmount" : {
+ "currency" : "EUR",
+ "amount" : "124.35"
+ },
+ "remittanceInformation" : [ "MyRemittanceInformation" ]
+ } ],
+ "supplementaryData" : {
+ "acceptedAuthenticationApproach" : [ "REDIRECT", "DECOUPLED" ],
+ "successfulReportUrl" : "http://myPisp/PaymentSuccess",
+ "unsuccessfulReportUrl" : "http://myPisp/PaymentFailure"
+ }
+}"""),
+ json.parse("""{
+ "appliedAuthenticationApproach" : {
+ "appliedAuthenticationApproach" : "REDIRECT"
+ },
+ "_links" : {
+ "consentApproval" : {
+ "href" : "https://psd2.aspsp/consent-approval"
+ }
+ }
+}"""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("PISP") :: apiTagMockedData :: Nil
+ )
+
+ lazy val paymentRequestPut : OBPEndpoint = {
+ case "payment-requests" :: paymentrequestresourceid :: Nil JsonPut _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse("""{
+ "appliedAuthenticationApproach" : {
+ "appliedAuthenticationApproach" : "REDIRECT"
+ },
+ "_links" : {
+ "consentApproval" : {
+ "href" : "https://psd2.aspsp/consent-approval"
+ }
+ }
+}"""), callContext)
+ }
+ }
+ }
+
+ resourceDocs += ResourceDoc(
+ paymentRequestsGet,
+ apiVersion,
+ nameOf(paymentRequestsGet),
+ "GET",
+ "/payment-requests/PAYMENTREQUESTRESOURCEID",
+ "Retrieval of a payment request (PISP)",
+ s"""${mockedDataText(true)}
+<h3>Description</h3>
+The following use cases can be applied:
+<ul>
+ <li>retrieval of a payment request on behalf of a merchant</li>
+ <li>retrieval of a transfer request on behalf of the account's owner</li>
+ <li>retrieval of a standing-order request on behalf of the account's owner</li>
+</ul>
+The PISP has sent a Request through a POST command. <br>
+ The ASPSP has registered the Request, updated if necessary the relevant identifiers in order to avoid duplicates and returned the location of the updated Request.<br>
+ The PISP gets the Request that has been updated with the resource identifiers, and eventually the status of the Payment/Transfer Request and the status of the subsequent credit transfer.<br>
+<h3>Prerequisites</h3>
+<ul>
+ <li>The TPP has been registered by the Registration Authority for the PISP role</li>
+ <li>The TPP was provided with an OAUTH2 "Client Credential" access token by the ASPSP (cf. § 3.4.3).</li>
+ <li>The TPP has previously posted a Request which has been saved by the ASPSP (cf. § 4.5.3)</li>
+ <ul>
+ <li>The ASPSP has answered with a location link to the saved Payment/Transfer Request (cf. § 4.5.4)</li>
+ </ul>
+ <li>The TPP and the ASPSP have successfully processed a mutual check and authentication </li>
+ <li>The TPP has presented its "OAUTH2 Client Credential" access token</li>
+</ul>
+<h3>Business flow</h3>
+The PISP asks to retrieve the Payment/Transfer Request that has been saved by the ASPSP. The PISP uses the location link provided by the ASPSP in response of the posting of this request.<br>
+The ASPSP returns the previously posted Payment/Transfer Request which is enriched with:<br>
+<ul>
+ <li>The resource identifiers given by the ASPSP</li>
+ <li>The status information of the Payment Request and of the subsequent credit transfer</li>
+</ul>
+The status information must be available during at least 30 calendar days after the posting of the Payment Request. However, the ASPSP may increase this availability duration, based on its own rules.<br>
+""",
+ json.parse(""""""),
+ json.parse(""""""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("PISP") :: apiTagMockedData :: Nil
+ )
+
+ lazy val paymentRequestsGet : OBPEndpoint = {
+ case "payment-requests" :: paymentrequestresourceid :: Nil JsonGet _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse(""""""), callContext)
+ }
+ }
+ }
+
+ resourceDocs += ResourceDoc(
+ paymentRequestsPost,
+ apiVersion,
+ nameOf(paymentRequestsPost),
+ "POST",
+ "/payment-requests",
+ "Payment request initiation (PISP)",
+ s"""${mockedDataText(true)}
+<h3>Description</h3>
+The following use cases can be applied:
+<ul>
+ <li>payment request on behalf of a merchant</li>
+ <li>transfer request on behalf of the account's owner</li>
+ <li>standing-order request on behalf of the account's owner</li>
+</ul>
+<h4>Data content</h4>
+ A payment request or a transfer request might embed several payment instructions having
+ <ul>
+ <li>one single execution date or multiple execution dates</li>
+ <ul>
+ <li>case of one single execution date, this date must be set at the payment level</li>
+ <li>case of multiple execution dates, those dates must be set at each payment instruction level</li>
+ </ul>
+ <li>one single beneficiary or multiple beneficiaries</li>
+ <ul>
+ <li>case of one single beneficiary, this beneficiary must be set at the payment level</li>
+ <li>case of multiple beneficiaries, those beneficiaries must be set at each payment instruction level</li>
+ </ul>
+ </ul>
+ Having at the same time multiple beneficiaries and multiple execution date might not be a relevant business case, although it is technically allowed.<br/>
+ Each implementation will have to specify which business use cases are actually supported.<br/>
+ A standing order request must embed one single payment instruction and must address one single beneficiary.
+ <ul>
+ <li>The beneficiary must be set at the payment level</li>
+ <li>The standing order specific characteristics (start date, periodicity...) must be set at the instruction level</li>
+ </ul>
+ Payment request can rely for execution on different payment instruments:
+ - SEPA Credit Transfer (SCT)
+ - Domestic Credit Transfer in a non Euro-currency
+ - International payment
+ The following table indicates how to use the different fields, depending on the payment instrument:
+ <table border="1">
+ <thead>
+ <tr>
+ <td>Structure</td>
+ <td>SEPA payments</td>
+ <td>Domestic payments in non-euro currency</td>
+ <td>International payments</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>PaymentTypeInformation/ InstructionPriority (payment
+ level)</td>
+ <td>"HIGH" for high-priority SCT<br />"NORM" for other SCT<br />Ignored
+ for SCTInst
+ </td>
+ <td>"HIGH" for high-priority CT<br />"NORM" or ignored for
+ other CT<br>
+ </td>
+ <td>"HIGH" for high-priority payments<br />"NORM" or ignored
+ for other payments<br>
+ </td>
+ </tr>
+ <tr>
+ <td>PaymentTypeInformation/ ServiceLevel (payment level)</td>
+ <td>"SEPA" for SCT and SCTInst</td>
+ <td>ignored</td>
+ <td>ignored</td>
+ </tr>
+ <tr>
+ <td>PaymentTypeInformation/ CategoryPurpose (payment level)</td>
+ <td colspan="2">"CASH" for transfer request<br />"DVPM" for
+ payment request on behalf of a merchant
+ </td>
+ <td>"CORT" for generic international payments<br />"INTC" for
+ transfers between two branches within the same company<br />"TREA"
+ for treasury transfers
+ </td>
+ </tr>
+ <tr>
+ <td>PaymentTypeInformation/ LocalInstrument (payment level)</td>
+ <td>"INST" pour les SCTInst<br />Otherwise ignored
+ </td>
+ <td colspan="2">ignored or valued with ISO20022 external code
+ list values</td>
+ </tr>
+ <tr>
+ <td>RequestedExecutionDate (either at payment or transaction
+ level)</td>
+ <td colspan="3">Mandatory (indicates the date on debit on the
+ ordering party account)</td>
+ </tr>
+ <tr>
+ <td>InstructedAmount (at each transaction level)</td>
+ <td colspan="3">Mandatory</td>
+ </tr>
+ <tr>
+ <td>ChargeBearer (at each transaction level)</td>
+ <td>"SLEV" for SCT and SCTInst</td>
+ <td>"SLEV" or "SHAR"</td>
+ <td>"CRED", "DEBT" or "SHAR"</td>
+ </tr>
+ <tr>
+ <td>Purpose (at payment level)</td>
+ <td colspan="3">Optional</td>
+ </tr>
+ <tr>
+ <td>RegulatoryReportingCode (at each transaction level)</td>
+ <td colspan="2">Not used</td>
+ <td>Mandatory (possibly multiple values)</td>
+ </tr>
+ <tr>
+ <td>RemittanceInformation</td>
+ <td colspan="3">Optional<br />Unstructured</td>
+ </tr>
+ <tr>
+ <td>Debtor (at payment level)</td>
+ <td>Mandatory<br />2 address lines only
+ </td>
+ <td colspan="2">Mandatory<br />4 address lines only
+ </td>
+ </tr>
+ <tr>
+ <td>DebtorAccount (at payment level)</td>
+ <td>Optional</td>
+ <td colspan="2">Optional<br />Account currency may be
+ specified
+ </td>
+ </tr>
+ <tr>
+ <td>DebtorAgent (at payment level)</td>
+ <td colspan="3">Optional</td>
+ </tr>
+ <tr>
+ <td>Creditor (either at payment or transaction level)</td>
+ <td colspan="3">Mandatory<br />2 address lines only
+ </td>
+ </tr>
+ <tr>
+ <td>CreditorAccount (either at payment or transaction level)</td>
+ <td>Mandatory</td>
+ <td colspan="2">Mandatory<br />Account currency may be
+ specified
+ </td>
+ </tr>
+ <tr>
+ <td>CreditorAgent (either at payment or transaction level)</td>
+ <td colspan="3">Optional</td>
+ </tr>
+ <tr>
+ <td>UltimateCreditor (either at payment or transaction level)</td>
+ <td colspan="3">Optional</td>
+ </tr>
+ <tr>
+ <td>ClearingSystemId et ClearingSystemMemberId (either at
+ payment or transaction level)</td>
+ <td colspan="2">Not used</td>
+ <td>Optional</td>
+ </tr>
+ </tbody>
+ </table>
+ <br/>
+<h4>Prerequisites for all use cases</h4>
+<ul>
+ <li>The TPP has been registered by the Registration Authority for the PISP role</li>
+ <li>The TPP was provided with an OAUTH2 "Client Credential" access token by the ASPSP (cf. § 3.4.3).</li>
+ <li>The TPP and the ASPSP have successfully processed a mutual check and authentication </li>
+ <li>The TPP has presented its "OAUTH2 Client Credential" access token</li>
+</ul>
+<h4>Business flow</h4>
+ <h5>Payment Request use case</h5>
+ The PISP forwards a payment request on behalf of a merchant.<br>
+ The PSU buys some goods or services on an e-commerce website held by a merchant. Among other payment method, the merchant suggests the use of a PISP service. As there is obviously a contract between the merchant and the PISP, there is no need of such a contract between the PSU and this PISP to initiate the process.<br>
+ Case of the PSU that chooses to use the PISP service:<br>
+ <ul>
+ <li>The merchant forwards the requested payment characteristics to the PISP and redirects the PSU to the PISP portal.</li>
+ <li>The PISP requests from the PSU which ASPSP will be used.</li>
+ <li>The PISP prepares the Payment Request and sends this request to the ASPSP.</li>
+ <li>The Request can embed several payment instructions having different requested execution date.</li>
+ <li>The beneficiary, as being the merchant, is set at the payment level.</li>
+ </ul>
+ <h5>Transfer Request use case</h5>
+ The PISP forwards a transfer request on behalf of the owner of the account.
+ <ul>
+ <li>The PSU provides the PISP with all information needed for the transfer.</li>
+ <li>The PISP prepares the Transfer Request and sends this request to the relevant ASPSP that holds the debtor account.</li>
+ <li>The Request can embed several payment instructions having different beneficiaries.</li>
+ <li>The requested execution date, as being the same for all instructions, is set at the payment level.</li>
+ </ul>
+ <h5>Standing Order Request use case</h5>
+ The PISP forwards a Standing Order request on behalf of the owner of the account.
+ <ul>
+ <li>The PSU provides the PISP with all information needed for the Standing Order.</li>
+ <li>The PISP prepares the Standing Order Request and sends this request to the relevant ASPSP that holds the debtor account.</li>
+ <li>The Request embeds one single payment instruction with</li>
+ <ul>
+ <li>The requested execution date of the first occurrence</li>
+ <li>The requested execution frequency of the payment in order to compute further execution dates</li>
+ <li>An execution rule to handle cases when the computed execution dates cannot be processed (e.g. bank holydays)</li>
+ <li>An optional end date for closing the standing Order</li>
+ </ul>
+ </ul>
+<h4>Authentication flows for all use cases</h4>
+ As the request posted by the PISP to the ASPSP needs a PSU authentication before execution, this request will include:
+ <ul>
+ <li>The specification of the authentication approaches that are supported by the PISP (any combination of "REDIRECT", "EMBEDDED" and "DECOUPLED" values).</li>
+ <li>In case of possible REDIRECT or DECOUPLED authentication approach, one or two call-back URLs to be used by the ASPSP at the finalisation of the authentication and consent process :</li>
+ <ul>
+ <li>The first call-back URL will be called by the ASPSP if the Payment Request is processed without any error or rejection by the PSU</li>
+ <li>The second call-back URL is to be used by the ASPSP in case of processing error or rejection by the PSU. Since this second URL is optional, the PISP might not provide it. In this case, the ASPSP will use the same URL for any processing result.</li>
+ <li>Both call-back URLS must be used in a TLS-secured request.</li>
+ </ul>
+ <li>In case of possible "EMBEDDED" or "DECOUPLED" approaches, the PSU identifier that can be processed by the ASPSP for PSU recognition must have been set within the request body [debtor] structure.</li>
+ </ul>
+ The ASPSP saves the request and answers to the PISP. The answer embeds:
+ <ul>
+ <li>A location link of the saved Request that will be further used to retrieve the Request and its status information.</li>
+ <li>The specification of the chosen authentication approach taking into account both the PISP and the PSU capabilities.</li>
+ <li>In case of chosen REDIRECT authentication approach, the URL to be used by the PISP for redirecting the PSU in order to perform a authentication.</li>
+ </ul>
+ Case of the PSU neither gives nor denies his/her consent, the Request shall expire and is then rejected to the PISP. The expiration delay is specified by each ASPSP.<br>
+ <h5>Redirect authentication approach </h5>
+ When the chosen authentication approach within the ASPSP answers is set to "REDIRECT":<br>
+ <ul>
+ <li>The PISP redirects the PSU to the ASPSP which authenticates the PSU </li>
+ <li>The ASPSP asks the PSU to give (or deny) his/her consent to the Payment Request</li>
+ <li>The PSU chooses or confirms which of his/her accounts shall be used by the ASPSP for the future Credit Transfer.</li>
+ <li>The ASPSP is then able to initiate the subsequent Credit Transfer</li>
+ <li>The ASPSP redirects the PSU to the PISP using one of the call-back URLs provided within the posted Payment Request</li>
+ </ul>
+ <img src="https://www.stet.eu//assets/files/documents-api/pisp-redirect-authentication.png" />
+ <img src="https://www.stet.eu//assets/files/documents-api/pisp-redirect-authentication2.png" />
+ <h5>Decoupled authentication approach</h5>
+ When the chosen authentication approach is "DECOUPLED":<br>
+ <ul>
+ <li>Based on the PSU identifier provided within the Payment Request by the PISP, the ASPSP gives the PSU with the Payment Request details and challenges the PSU for a Strong Customer Authentication on a decoupled device or application.</li>
+ <li>The PSU chooses or confirms which of his/her accounts shall be used by the ASPSP for the future Credit Transfer.</li>
+ <li>The ASPSP is then able to initiate the subsequent Credit Transfer</li>
+ <li>The ASPSP notifies the PISP about the finalisation of the authentication and consent process by using one of the call-back URLs provided within the posted Payment Request</li>
+ </ul>
+ <img src="https://www.stet.eu//assets/files/documents-api/pisp-decoupled-authentication.png" />
+ <img src="https://www.stet.eu//assets/files/documents-api/pisp-decoupled-authentication2.png" />
+ <h5>Embedded authentication approach</h5>
+ When the chosen authentication approach within the ASPSP answers is set to "EMBEDDED":<br>
+ <ul>
+ <li>The TPP informs the PSU that a challenge is needed for completing the Payment Request processing. This challenge will be one of the following:</li>
+ <ul>
+ <li>A One-Time-Password sent by the ASPSP to the PSU on a separate device or application.</li>
+ <li>A response computed by a specific device on base of a challenge sent by the ASPSP to the PSU on a separate device or application.</li>
+ </ul>
+ <li>The PSU unlock the device or application through a "knowledge factor" and/or an "inherence factor" (biometric), retrieves the Payment Request details and processes the data sent by the ASPSP; </li>
+ <li>The PSU might choose or confirm which of his/her accounts shall be used by the ASPSP for the future Credit Transfer when the device or application allows it.</li>
+ <li>When agreeing the Payment Request, the PSU enters the resulting authentication factor through the PISP interface which will forward it to the ASPSP through a confirmation request (cf. § 4.7)</li>
+ </ul>
+ <img src="https://www.stet.eu//assets/files/documents-api/pisp-embedded-authentication.png" />
+ <img src="https://www.stet.eu//assets/files/documents-api/pisp-embedded-authentication2.png" />
+""",
+ json.parse("""{
+ "paymentInformationId" : "MyPmtInfId",
+ "creationDateTime" : "2018-03-31T13:25:22.527+02:00",
+ "numberOfTransactions" : 1,
+ "initiatingParty" : {
+ "name" : "MyPreferedPisp",
+ "postalAddress" : {
+ "country" : "FR",
+ "addressLine" : [ "18 rue de la DSP2", "75008 PARIS" ]
+ },
+ "organisationId" : {
+ "identification" : "12FR5",
+ "schemeName" : "COID",
+ "issuer" : "ACPR"
+ }
+ },
+ "paymentTypeInformation" : {
+ "serviceLevel" : "SEPA",
+ "localInstrument" : "INST",
+ "categoryPurpose" : "DVPM"
+ },
+ "debtor" : {
+ "name" : "MyCustomer",
+ "postalAddress" : {
+ "country" : "FR",
+ "addressLine" : [ "18 rue de la DSP2", "75008 PARIS" ]
+ },
+ "privateId" : {
+ "identification" : "FD37G",
+ "schemeName" : "BANK",
+ "issuer" : "BICXYYTTZZZ"
+ }
+ },
+ "creditor" : {
+ "name" : "myMerchant",
+ "postalAddress" : {
+ "country" : "FR",
+ "addressLine" : [ "18 rue de la DSP2", "75008 PARIS" ]
+ },
+ "organisationId" : {
+ "identification" : "852126789",
+ "schemeName" : "SIREN",
+ "issuer" : "FR"
+ }
+ },
+ "creditorAccount" : {
+ "iban" : "YY64COJH41059545330222956960771321"
+ },
+ "ultimateCreditor" : {
+ "name" : "myPreferedUltimateMerchant",
+ "postalAddress" : {
+ "country" : "FR",
+ "addressLine" : [ "18 rue de la DSP2", "75008 PARIS" ]
+ },
+ "organisationId" : {
+ "identification" : "85212678900025",
+ "schemeName" : "SIRET",
+ "issuer" : "FR"
+ }
+ },
+ "purpose" : "COMC",
+ "chargeBearer" : "SLEV",
+ "creditTransferTransaction" : [ {
+ "paymentId" : {
+ "instructionId" : "MyInstrId",
+ "endToEndId" : "MyEndToEndId"
+ },
+ "requestedExecutionDate" : "2016-12-31T00:00:00.000+01:00",
+ "instructedAmount" : {
+ "currency" : "EUR",
+ "amount" : "124.35"
+ },
+ "remittanceInformation" : [ "MyRemittanceInformation" ]
+ } ],
+ "supplementaryData" : {
+ "acceptedAuthenticationApproach" : [ "REDIRECT", "DECOUPLED" ],
+ "successfulReportUrl" : "http://myPisp/PaymentSuccess",
+ "unsuccessfulReportUrl" : "http://myPisp/PaymentFailure"
+ }
+}"""),
+ json.parse(""""""),
+ List(UserNotLoggedIn, UnknownError),
+ Catalogs(notCore, notPSD2, notOBWG),
+ ApiTag("PISP") :: apiTagMockedData :: Nil
+ )
+
+ lazy val paymentRequestsPost : OBPEndpoint = {
+ case "payment-requests" :: Nil JsonPost _ => {
+ cc =>
+ for {
+ (Full(u), callContext) <- authorizeEndpoint(UserNotLoggedIn, cc)
+ } yield {
+ (json.parse(""""""), callContext)
+ }
+ }
+ }
+
+}
+
+
+
diff --git a/src/main/scala/code/api/UKOpenBanking/v2_0_0/APIMethods_UKOpenBanking_200.scala b/src/main/scala/code/api/UKOpenBanking/v2_0_0/APIMethods_UKOpenBanking_200.scala
index 039f4eb44..3e560a72f 100644
--- a/src/main/scala/code/api/UKOpenBanking/v2_0_0/APIMethods_UKOpenBanking_200.scala
+++ b/src/main/scala/code/api/UKOpenBanking/v2_0_0/APIMethods_UKOpenBanking_200.scala
@@ -18,12 +18,9 @@ import scala.collection.mutable.ArrayBuffer
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
-trait APIMethods_UKOpenBanking_200 {
- //needs to be a RestHelper to get access to JsonGet, JsonPost, etc.
- self: RestHelper =>
+object APIMethods_UKOpenBanking_200 extends RestHelper{
- val ImplementationsUKOpenBanking200 = new Object() {
- val implementedInApiVersion: ApiVersion = ApiVersion.ukOpenBankingV200 // was noV
+ val implementedInApiVersion = OBP_UKOpenBanking_200.apiVersion
val resourceDocs = ArrayBuffer[ResourceDoc]()
val apiRelations = ArrayBuffer[ApiRelation]()
@@ -238,9 +235,6 @@ trait APIMethods_UKOpenBanking_200 {
}
}
}
-
- }
-
}
diff --git a/src/main/scala/code/api/UKOpenBanking/v2_0_0/OBP_UKOpenBanking_200.scala b/src/main/scala/code/api/UKOpenBanking/v2_0_0/OBP_UKOpenBanking_200.scala
index 852ac735b..16b04f919 100644
--- a/src/main/scala/code/api/UKOpenBanking/v2_0_0/OBP_UKOpenBanking_200.scala
+++ b/src/main/scala/code/api/UKOpenBanking/v2_0_0/OBP_UKOpenBanking_200.scala
@@ -28,11 +28,11 @@ package code.api.UKOpenBanking.v2_0_0
import code.api.OBPRestHelper
import code.api.util.APIUtil.{OBPEndpoint, ResourceDoc, getAllowedEndpoints}
-import code.api.util.ApiVersion
+import code.api.util.{ScannedApiVersion, ScannedApis}
import code.util.Helper.MdcLoggable
import scala.collection.immutable.Nil
-
+import code.api.UKOpenBanking.v2_0_0.APIMethods_UKOpenBanking_200._
/*
@@ -40,32 +40,32 @@ This file defines which endpoints from all the versions are available in v1
*/
-object OBP_UKOpenBanking_200 extends OBPRestHelper with APIMethods_UKOpenBanking_200 with MdcLoggable {
+object OBP_UKOpenBanking_200 extends OBPRestHelper with MdcLoggable with ScannedApis{
- val version = ApiVersion.ukOpenBankingV200
+ override val apiVersion = ScannedApiVersion("open-banking", "UK", "v2.0")
val versionStatus = "DRAFT"
- val endpointsOf200 =
- ImplementationsUKOpenBanking200.getAccountList ::
- ImplementationsUKOpenBanking200.getAccountTransactions ::
- ImplementationsUKOpenBanking200.getAccount ::
- ImplementationsUKOpenBanking200.getAccountBalances ::
- ImplementationsUKOpenBanking200.getBalances ::
- Nil
+ val allEndpoints =
+ getAccountList ::
+ getAccountTransactions ::
+ getAccount ::
+ getAccountBalances ::
+ getBalances ::
+ Nil
- val allResourceDocs = ImplementationsUKOpenBanking200.resourceDocs
+ override val allResourceDocs = resourceDocs
def findResourceDoc(pf: OBPEndpoint): Option[ResourceDoc] = {
allResourceDocs.find(_.partialFunction==pf)
}
// Filter the possible endpoints by the disabled / enabled Props settings and add them together
- val routes : List[OBPEndpoint] = getAllowedEndpoints(endpointsOf200, ImplementationsUKOpenBanking200.resourceDocs)
+ override val routes : List[OBPEndpoint] = getAllowedEndpoints(allEndpoints,resourceDocs)
// Make them available for use!
routes.foreach(route => {
- oauthServe(("open-banking" / version.vDottedApiVersion()).oPrefix{route}, findResourceDoc(route))
+ oauthServe((apiVersion.urlPrefix / version.vDottedApiVersion()).oPrefix{route}, findResourceDoc(route))
})
logger.info(s"version $version has been run! There are ${routes.length} routes.")
diff --git a/src/main/scala/code/api/UKOpenBanking/v3_1_0/AccountAccessApi.scala b/src/main/scala/code/api/UKOpenBanking/v3_1_0/AccountAccessApi.scala
index 8e9e64aad..243cc87dd 100644
--- a/src/main/scala/code/api/UKOpenBanking/v3_1_0/AccountAccessApi.scala
+++ b/src/main/scala/code/api/UKOpenBanking/v3_1_0/AccountAccessApi.scala
@@ -1,27 +1,33 @@
package code.api.UKOpenBanking.v3_1_0
+import code.api.APIFailureNewStyle
import code.api.berlin.group.v1_3.JvalueCaseClass
-import code.api.util.APIUtil._
-import code.api.util.ApiTag._
-import code.api.util.ApiVersion
-import code.api.util.ErrorMessages._
-import com.github.dwickern.macros.NameOf.nameOf
-import net.liftweb.common.Full
-import net.liftweb.http.rest.RestHelper
import net.liftweb.json
import net.liftweb.json._
-
+import code.api.berlin.group.v1_3.JSONFactory_BERLIN_GROUP_1_3
+import code.api.util.APIUtil.{defaultBankId, _}
+import code.api.util.{ApiVersion, NewStyle}
+import code.api.util.ErrorMessages._
+import code.api.util.ApiTag._
+import code.api.util.NewStyle.HttpCode
+import code.bankconnectors.Connector
+import code.model._
+import code.util.Helper
+import code.views.Views
+import net.liftweb.common.Full
+import net.liftweb.http.rest.RestHelper
+import com.github.dwickern.macros.NameOf.nameOf
import scala.collection.immutable.Nil
import scala.collection.mutable.ArrayBuffer
import scala.concurrent.ExecutionContext.Implicits.global
+import scala.concurrent.Future
+import code.api.UKOpenBanking.v3_1_0.OBP_UKOpenBanking_310
+import code.api.util.ApiTag
-trait APIMethods_AccountAccessApi { self: RestHelper =>
- val ImplementationsAccountAccessApi = new Object() {
- val apiVersion: ApiVersion = ApiVersion.ukOpenBankingV310
+object APIMethods_AccountAccessApi extends RestHelper {
+ val apiVersion = OBP_UKOpenBanking_310.apiVersion
val resourceDocs = ArrayBuffer[ResourceDoc]()
val apiRelations = ArrayBuffer[ApiRelation]()
- val codeContext = CodeContext(resourceDocs, apiRelations)
- implicit val formats = net.liftweb.json.DefaultFormats
protected implicit def JvalueToSuper(what: JValue): JvalueCaseClass = JvalueCaseClass(what)
val endpoints =
@@ -67,7 +73,7 @@ trait APIMethods_AccountAccessApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagAccountAccess :: apiTagMockedData :: Nil
+ ApiTag("Account Access") :: apiTagMockedData :: Nil
)
lazy val createAccountAccessConsents : OBPEndpoint = {
@@ -117,7 +123,7 @@ trait APIMethods_AccountAccessApi { self: RestHelper =>
json.parse(""""""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagAccountAccess :: apiTagMockedData :: Nil
+ ApiTag("Account Access") :: apiTagMockedData :: Nil
)
lazy val deleteAccountAccessConsentsConsentId : OBPEndpoint = {
@@ -167,7 +173,7 @@ trait APIMethods_AccountAccessApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagAccountAccess :: apiTagMockedData :: Nil
+ ApiTag("Account Access") :: apiTagMockedData :: Nil
)
lazy val getAccountAccessConsentsConsentId : OBPEndpoint = {
@@ -204,7 +210,6 @@ trait APIMethods_AccountAccessApi { self: RestHelper =>
}
}
- }
}
diff --git a/src/main/scala/code/api/UKOpenBanking/v3_1_0/AccountsApi.scala b/src/main/scala/code/api/UKOpenBanking/v3_1_0/AccountsApi.scala
index f46de2dd6..e78cadcc0 100644
--- a/src/main/scala/code/api/UKOpenBanking/v3_1_0/AccountsApi.scala
+++ b/src/main/scala/code/api/UKOpenBanking/v3_1_0/AccountsApi.scala
@@ -21,14 +21,13 @@ import scala.collection.immutable.Nil
import scala.collection.mutable.ArrayBuffer
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
+import code.api.UKOpenBanking.v3_1_0.OBP_UKOpenBanking_310
+import code.api.util.ApiTag
-trait APIMethods_AccountsApi { self: RestHelper =>
- val ImplementationsAccountsApi = new Object() {
- val apiVersion: ApiVersion = ApiVersion.ukOpenBankingV310
+object APIMethods_AccountsApi extends RestHelper {
+ val apiVersion = OBP_UKOpenBanking_310.apiVersion
val resourceDocs = ArrayBuffer[ResourceDoc]()
val apiRelations = ArrayBuffer[ApiRelation]()
- val codeContext = CodeContext(resourceDocs, apiRelations)
- implicit val formats = net.liftweb.json.DefaultFormats
protected implicit def JvalueToSuper(what: JValue): JvalueCaseClass = JvalueCaseClass(what)
val endpoints =
@@ -109,7 +108,7 @@ trait APIMethods_AccountsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagAccounts :: apiTagMockedData :: Nil
+ ApiTag("Accounts") :: apiTagMockedData :: Nil
)
lazy val getAccounts : OBPEndpoint = {
@@ -254,7 +253,7 @@ trait APIMethods_AccountsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagAccounts :: apiTagMockedData :: Nil
+ ApiTag("Accounts") :: apiTagMockedData :: Nil
)
lazy val getAccountsAccountId : OBPEndpoint = {
@@ -327,7 +326,6 @@ trait APIMethods_AccountsApi { self: RestHelper =>
}
}
- }
}
diff --git a/src/main/scala/code/api/UKOpenBanking/v3_1_0/BalancesApi.scala b/src/main/scala/code/api/UKOpenBanking/v3_1_0/BalancesApi.scala
index 066ba4a70..a873f8e0c 100644
--- a/src/main/scala/code/api/UKOpenBanking/v3_1_0/BalancesApi.scala
+++ b/src/main/scala/code/api/UKOpenBanking/v3_1_0/BalancesApi.scala
@@ -21,14 +21,13 @@ import scala.collection.immutable.Nil
import scala.collection.mutable.ArrayBuffer
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
+import code.api.UKOpenBanking.v3_1_0.OBP_UKOpenBanking_310
+import code.api.util.ApiTag
-trait APIMethods_BalancesApi { self: RestHelper =>
- val ImplementationsBalancesApi = new Object() {
- val apiVersion: ApiVersion = ApiVersion.ukOpenBankingV310
+object APIMethods_BalancesApi extends RestHelper {
+ val apiVersion = OBP_UKOpenBanking_310.apiVersion
val resourceDocs = ArrayBuffer[ResourceDoc]()
val apiRelations = ArrayBuffer[ApiRelation]()
- val codeContext = CodeContext(resourceDocs, apiRelations)
- implicit val formats = net.liftweb.json.DefaultFormats
protected implicit def JvalueToSuper(what: JValue): JvalueCaseClass = JvalueCaseClass(what)
val endpoints =
@@ -113,7 +112,7 @@ trait APIMethods_BalancesApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagBalances :: apiTagMockedData :: Nil
+ ApiTag("Balances") :: apiTagMockedData :: Nil
)
lazy val getAccountsAccountIdBalances : OBPEndpoint = {
@@ -266,7 +265,7 @@ trait APIMethods_BalancesApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagBalances :: apiTagMockedData :: Nil
+ ApiTag("Balances") :: apiTagMockedData :: Nil
)
lazy val getBalances : OBPEndpoint = {
@@ -343,7 +342,6 @@ trait APIMethods_BalancesApi { self: RestHelper =>
}
}
- }
}
diff --git a/src/main/scala/code/api/UKOpenBanking/v3_1_0/BeneficiariesApi.scala b/src/main/scala/code/api/UKOpenBanking/v3_1_0/BeneficiariesApi.scala
index 04d324430..0f69e7b4b 100644
--- a/src/main/scala/code/api/UKOpenBanking/v3_1_0/BeneficiariesApi.scala
+++ b/src/main/scala/code/api/UKOpenBanking/v3_1_0/BeneficiariesApi.scala
@@ -21,14 +21,13 @@ import scala.collection.immutable.Nil
import scala.collection.mutable.ArrayBuffer
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
+import code.api.UKOpenBanking.v3_1_0.OBP_UKOpenBanking_310
+import code.api.util.ApiTag
-trait APIMethods_BeneficiariesApi { self: RestHelper =>
- val ImplementationsBeneficiariesApi = new Object() {
- val apiVersion: ApiVersion = ApiVersion.ukOpenBankingV310
+object APIMethods_BeneficiariesApi extends RestHelper {
+ val apiVersion = OBP_UKOpenBanking_310.apiVersion
val resourceDocs = ArrayBuffer[ResourceDoc]()
val apiRelations = ArrayBuffer[ApiRelation]()
- val codeContext = CodeContext(resourceDocs, apiRelations)
- implicit val formats = net.liftweb.json.DefaultFormats
protected implicit def JvalueToSuper(what: JValue): JvalueCaseClass = JvalueCaseClass(what)
val endpoints =
@@ -119,7 +118,7 @@ trait APIMethods_BeneficiariesApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagBeneficiaries :: apiTagMockedData :: Nil
+ ApiTag("Beneficiaries") :: apiTagMockedData :: Nil
)
lazy val getAccountsAccountIdBeneficiaries : OBPEndpoint = {
@@ -284,7 +283,7 @@ trait APIMethods_BeneficiariesApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagBeneficiaries :: apiTagMockedData :: Nil
+ ApiTag("Beneficiaries") :: apiTagMockedData :: Nil
)
lazy val getBeneficiaries : OBPEndpoint = {
@@ -367,7 +366,6 @@ trait APIMethods_BeneficiariesApi { self: RestHelper =>
}
}
- }
}
diff --git a/src/main/scala/code/api/UKOpenBanking/v3_1_0/DirectDebitsApi.scala b/src/main/scala/code/api/UKOpenBanking/v3_1_0/DirectDebitsApi.scala
index a8a077ad4..d245430f9 100644
--- a/src/main/scala/code/api/UKOpenBanking/v3_1_0/DirectDebitsApi.scala
+++ b/src/main/scala/code/api/UKOpenBanking/v3_1_0/DirectDebitsApi.scala
@@ -21,14 +21,13 @@ import scala.collection.immutable.Nil
import scala.collection.mutable.ArrayBuffer
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
+import code.api.UKOpenBanking.v3_1_0.OBP_UKOpenBanking_310
+import code.api.util.ApiTag
-trait APIMethods_DirectDebitsApi { self: RestHelper =>
- val ImplementationsDirectDebitsApi = new Object() {
- val apiVersion: ApiVersion = ApiVersion.ukOpenBankingV310
+object APIMethods_DirectDebitsApi extends RestHelper {
+ val apiVersion = OBP_UKOpenBanking_310.apiVersion
val resourceDocs = ArrayBuffer[ResourceDoc]()
val apiRelations = ArrayBuffer[ApiRelation]()
- val codeContext = CodeContext(resourceDocs, apiRelations)
- implicit val formats = net.liftweb.json.DefaultFormats
protected implicit def JvalueToSuper(what: JValue): JvalueCaseClass = JvalueCaseClass(what)
val endpoints =
@@ -87,7 +86,7 @@ trait APIMethods_DirectDebitsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagDirectDebits :: apiTagMockedData :: Nil
+ ApiTag("Direct Debits") :: apiTagMockedData :: Nil
)
lazy val getAccountsAccountIdDirectDebits : OBPEndpoint = {
@@ -188,7 +187,7 @@ trait APIMethods_DirectDebitsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagDirectDebits :: apiTagMockedData :: Nil
+ ApiTag("Direct Debits") :: apiTagMockedData :: Nil
)
lazy val getDirectDebits : OBPEndpoint = {
@@ -239,7 +238,6 @@ trait APIMethods_DirectDebitsApi { self: RestHelper =>
}
}
- }
}
diff --git a/src/main/scala/code/api/UKOpenBanking/v3_1_0/DomesticPaymentsApi.scala b/src/main/scala/code/api/UKOpenBanking/v3_1_0/DomesticPaymentsApi.scala
index cd7c6c58e..9e39492a2 100644
--- a/src/main/scala/code/api/UKOpenBanking/v3_1_0/DomesticPaymentsApi.scala
+++ b/src/main/scala/code/api/UKOpenBanking/v3_1_0/DomesticPaymentsApi.scala
@@ -1,9 +1,10 @@
-package code.api.builder.DomesticPaymentsApi
+package code.api.UKOpenBanking.v3_1_0
import code.api.APIFailureNewStyle
import code.api.berlin.group.v1_3.JvalueCaseClass
import net.liftweb.json
import net.liftweb.json._
+import code.api.berlin.group.v1_3.JSONFactory_BERLIN_GROUP_1_3
import code.api.util.APIUtil.{defaultBankId, _}
import code.api.util.{ApiVersion, NewStyle}
import code.api.util.ErrorMessages._
@@ -20,14 +21,13 @@ import scala.collection.immutable.Nil
import scala.collection.mutable.ArrayBuffer
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
+import code.api.UKOpenBanking.v3_1_0.OBP_UKOpenBanking_310
+import code.api.util.ApiTag
-trait APIMethods_DomesticPaymentsApi { self: RestHelper =>
- val ImplementationsDomesticPaymentsApi = new Object() {
- val apiVersion: ApiVersion = ApiVersion.ukOpenBankingV310
+object APIMethods_DomesticPaymentsApi extends RestHelper {
+ val apiVersion = OBP_UKOpenBanking_310.apiVersion
val resourceDocs = ArrayBuffer[ResourceDoc]()
val apiRelations = ArrayBuffer[ApiRelation]()
- val codeContext = CodeContext(resourceDocs, apiRelations)
- implicit val formats = net.liftweb.json.DefaultFormats
protected implicit def JvalueToSuper(what: JValue): JvalueCaseClass = JvalueCaseClass(what)
val endpoints =
@@ -143,7 +143,7 @@ trait APIMethods_DomesticPaymentsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagDomesticPayments :: apiTagMockedData :: Nil
+ ApiTag("Domestic Payments") :: apiTagMockedData :: Nil
)
lazy val createDomesticPaymentConsents : OBPEndpoint = {
@@ -341,7 +341,7 @@ trait APIMethods_DomesticPaymentsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagDomesticPayments :: apiTagMockedData :: Nil
+ ApiTag("Domestic Payments") :: apiTagMockedData :: Nil
)
lazy val createDomesticPayments : OBPEndpoint = {
@@ -539,7 +539,7 @@ trait APIMethods_DomesticPaymentsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagDomesticPayments :: apiTagMockedData :: Nil
+ ApiTag("Domestic Payments") :: apiTagMockedData :: Nil
)
lazy val getDomesticPaymentConsentsConsentId : OBPEndpoint = {
@@ -676,7 +676,7 @@ trait APIMethods_DomesticPaymentsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagDomesticPayments :: apiTagMockedData :: Nil
+ ApiTag("Domestic Payments") :: apiTagMockedData :: Nil
)
lazy val getDomesticPaymentConsentsConsentIdFundsConfirmation : OBPEndpoint = {
@@ -802,7 +802,7 @@ trait APIMethods_DomesticPaymentsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagDomesticPayments :: apiTagMockedData :: Nil
+ ApiTag("Domestic Payments") :: apiTagMockedData :: Nil
)
lazy val getDomesticPaymentsDomesticPaymentId : OBPEndpoint = {
@@ -896,7 +896,6 @@ trait APIMethods_DomesticPaymentsApi { self: RestHelper =>
}
}
- }
}
diff --git a/src/main/scala/code/api/UKOpenBanking/v3_1_0/DomesticScheduledPaymentsApi.scala b/src/main/scala/code/api/UKOpenBanking/v3_1_0/DomesticScheduledPaymentsApi.scala
index d70c36dc0..325e9ee53 100644
--- a/src/main/scala/code/api/UKOpenBanking/v3_1_0/DomesticScheduledPaymentsApi.scala
+++ b/src/main/scala/code/api/UKOpenBanking/v3_1_0/DomesticScheduledPaymentsApi.scala
@@ -1,27 +1,33 @@
-package code.api.builder.DomesticScheduledPaymentsApi
+package code.api.UKOpenBanking.v3_1_0
+import code.api.APIFailureNewStyle
import code.api.berlin.group.v1_3.JvalueCaseClass
-import code.api.util.APIUtil._
-import code.api.util.ApiTag._
-import code.api.util.ApiVersion
-import code.api.util.ErrorMessages._
-import com.github.dwickern.macros.NameOf.nameOf
-import net.liftweb.common.Full
-import net.liftweb.http.rest.RestHelper
import net.liftweb.json
import net.liftweb.json._
-
+import code.api.berlin.group.v1_3.JSONFactory_BERLIN_GROUP_1_3
+import code.api.util.APIUtil.{defaultBankId, _}
+import code.api.util.{ApiVersion, NewStyle}
+import code.api.util.ErrorMessages._
+import code.api.util.ApiTag._
+import code.api.util.NewStyle.HttpCode
+import code.bankconnectors.Connector
+import code.model._
+import code.util.Helper
+import code.views.Views
+import net.liftweb.common.Full
+import net.liftweb.http.rest.RestHelper
+import com.github.dwickern.macros.NameOf.nameOf
import scala.collection.immutable.Nil
import scala.collection.mutable.ArrayBuffer
import scala.concurrent.ExecutionContext.Implicits.global
+import scala.concurrent.Future
+import code.api.UKOpenBanking.v3_1_0.OBP_UKOpenBanking_310
+import code.api.util.ApiTag
-trait APIMethods_DomesticScheduledPaymentsApi { self: RestHelper =>
- val ImplementationsDomesticScheduledPaymentsApi = new Object() {
- val apiVersion: ApiVersion = ApiVersion.ukOpenBankingV310
+object APIMethods_DomesticScheduledPaymentsApi extends RestHelper {
+ val apiVersion = OBP_UKOpenBanking_310.apiVersion
val resourceDocs = ArrayBuffer[ResourceDoc]()
val apiRelations = ArrayBuffer[ApiRelation]()
- val codeContext = CodeContext(resourceDocs, apiRelations)
- implicit val formats = net.liftweb.json.DefaultFormats
protected implicit def JvalueToSuper(what: JValue): JvalueCaseClass = JvalueCaseClass(what)
val endpoints =
@@ -138,7 +144,7 @@ trait APIMethods_DomesticScheduledPaymentsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagDomesticScheduledPayments :: apiTagMockedData :: Nil
+ ApiTag("Domestic Scheduled Payments") :: apiTagMockedData :: Nil
)
lazy val createDomesticScheduledPaymentConsents : OBPEndpoint = {
@@ -339,7 +345,7 @@ trait APIMethods_DomesticScheduledPaymentsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagDomesticScheduledPayments :: apiTagMockedData :: Nil
+ ApiTag("Domestic Scheduled Payments") :: apiTagMockedData :: Nil
)
lazy val createDomesticScheduledPayments : OBPEndpoint = {
@@ -540,7 +546,7 @@ trait APIMethods_DomesticScheduledPaymentsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagDomesticScheduledPayments :: apiTagMockedData :: Nil
+ ApiTag("Domestic Scheduled Payments") :: apiTagMockedData :: Nil
)
lazy val getDomesticScheduledPaymentConsentsConsentId : OBPEndpoint = {
@@ -741,7 +747,7 @@ trait APIMethods_DomesticScheduledPaymentsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagDomesticScheduledPayments :: apiTagMockedData :: Nil
+ ApiTag("Domestic Scheduled Payments") :: apiTagMockedData :: Nil
)
lazy val getDomesticScheduledPaymentsDomesticScheduledPaymentId : OBPEndpoint = {
@@ -836,7 +842,6 @@ trait APIMethods_DomesticScheduledPaymentsApi { self: RestHelper =>
}
}
- }
}
diff --git a/src/main/scala/code/api/UKOpenBanking/v3_1_0/DomesticStandingOrdersApi.scala b/src/main/scala/code/api/UKOpenBanking/v3_1_0/DomesticStandingOrdersApi.scala
index 475610b4d..694e18422 100644
--- a/src/main/scala/code/api/UKOpenBanking/v3_1_0/DomesticStandingOrdersApi.scala
+++ b/src/main/scala/code/api/UKOpenBanking/v3_1_0/DomesticStandingOrdersApi.scala
@@ -1,9 +1,10 @@
-package code.api.builder.DomesticStandingOrdersApi
+package code.api.UKOpenBanking.v3_1_0
import code.api.APIFailureNewStyle
import code.api.berlin.group.v1_3.JvalueCaseClass
import net.liftweb.json
import net.liftweb.json._
+import code.api.berlin.group.v1_3.JSONFactory_BERLIN_GROUP_1_3
import code.api.util.APIUtil.{defaultBankId, _}
import code.api.util.{ApiVersion, NewStyle}
import code.api.util.ErrorMessages._
@@ -20,14 +21,13 @@ import scala.collection.immutable.Nil
import scala.collection.mutable.ArrayBuffer
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
+import code.api.UKOpenBanking.v3_1_0.OBP_UKOpenBanking_310
+import code.api.util.ApiTag
-trait APIMethods_DomesticStandingOrdersApi { self: RestHelper =>
- val ImplementationsDomesticStandingOrdersApi = new Object() {
- val apiVersion: ApiVersion = ApiVersion.ukOpenBankingV310
+object APIMethods_DomesticStandingOrdersApi extends RestHelper {
+ val apiVersion = OBP_UKOpenBanking_310.apiVersion
val resourceDocs = ArrayBuffer[ResourceDoc]()
val apiRelations = ArrayBuffer[ApiRelation]()
- val codeContext = CodeContext(resourceDocs, apiRelations)
- implicit val formats = net.liftweb.json.DefaultFormats
protected implicit def JvalueToSuper(what: JValue): JvalueCaseClass = JvalueCaseClass(what)
val endpoints =
@@ -135,7 +135,7 @@ trait APIMethods_DomesticStandingOrdersApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagDomesticStandingOrders :: apiTagMockedData :: Nil
+ ApiTag("Domestic Standing Orders") :: apiTagMockedData :: Nil
)
lazy val createDomesticStandingOrderConsents : OBPEndpoint = {
@@ -318,7 +318,7 @@ trait APIMethods_DomesticStandingOrdersApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagDomesticStandingOrders :: apiTagMockedData :: Nil
+ ApiTag("Domestic Standing Orders") :: apiTagMockedData :: Nil
)
lazy val createDomesticStandingOrders : OBPEndpoint = {
@@ -501,7 +501,7 @@ trait APIMethods_DomesticStandingOrdersApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagDomesticStandingOrders :: apiTagMockedData :: Nil
+ ApiTag("Domestic Standing Orders") :: apiTagMockedData :: Nil
)
lazy val getDomesticStandingOrderConsentsConsentId : OBPEndpoint = {
@@ -684,7 +684,7 @@ trait APIMethods_DomesticStandingOrdersApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagDomesticStandingOrders :: apiTagMockedData :: Nil
+ ApiTag("Domestic Standing Orders") :: apiTagMockedData :: Nil
)
lazy val getDomesticStandingOrdersDomesticStandingOrderId : OBPEndpoint = {
@@ -770,7 +770,6 @@ trait APIMethods_DomesticStandingOrdersApi { self: RestHelper =>
}
}
- }
}
diff --git a/src/main/scala/code/api/UKOpenBanking/v3_1_0/FilePaymentsApi.scala b/src/main/scala/code/api/UKOpenBanking/v3_1_0/FilePaymentsApi.scala
index 4b8aaa607..da61b0a1c 100644
--- a/src/main/scala/code/api/UKOpenBanking/v3_1_0/FilePaymentsApi.scala
+++ b/src/main/scala/code/api/UKOpenBanking/v3_1_0/FilePaymentsApi.scala
@@ -1,9 +1,10 @@
-package code.api.builder.FilePaymentsApi
+package code.api.UKOpenBanking.v3_1_0
import code.api.APIFailureNewStyle
import code.api.berlin.group.v1_3.JvalueCaseClass
import net.liftweb.json
import net.liftweb.json._
+import code.api.berlin.group.v1_3.JSONFactory_BERLIN_GROUP_1_3
import code.api.util.APIUtil.{defaultBankId, _}
import code.api.util.{ApiVersion, NewStyle}
import code.api.util.ErrorMessages._
@@ -20,14 +21,13 @@ import scala.collection.immutable.Nil
import scala.collection.mutable.ArrayBuffer
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
+import code.api.UKOpenBanking.v3_1_0.OBP_UKOpenBanking_310
+import code.api.util.ApiTag
-trait APIMethods_FilePaymentsApi { self: RestHelper =>
- val ImplementationsFilePaymentsApi = new Object() {
- val apiVersion: ApiVersion = ApiVersion.ukOpenBankingV310
+object APIMethods_FilePaymentsApi extends RestHelper {
+ val apiVersion = OBP_UKOpenBanking_310.apiVersion
val resourceDocs = ArrayBuffer[ResourceDoc]()
val apiRelations = ArrayBuffer[ApiRelation]()
- val codeContext = CodeContext(resourceDocs, apiRelations)
- implicit val formats = net.liftweb.json.DefaultFormats
protected implicit def JvalueToSuper(what: JValue): JvalueCaseClass = JvalueCaseClass(what)
val endpoints =
@@ -112,7 +112,7 @@ trait APIMethods_FilePaymentsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagFilePayments :: apiTagMockedData :: Nil
+ ApiTag("File Payments") :: apiTagMockedData :: Nil
)
lazy val createFilePaymentConsents : OBPEndpoint = {
@@ -197,7 +197,7 @@ trait APIMethods_FilePaymentsApi { self: RestHelper =>
json.parse(""""""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagFilePayments :: apiTagMockedData :: Nil
+ ApiTag("File Payments") :: apiTagMockedData :: Nil
)
lazy val createFilePaymentConsentsConsentIdFile : OBPEndpoint = {
@@ -285,7 +285,7 @@ trait APIMethods_FilePaymentsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagFilePayments :: apiTagMockedData :: Nil
+ ApiTag("File Payments") :: apiTagMockedData :: Nil
)
lazy val createFilePayments : OBPEndpoint = {
@@ -431,7 +431,7 @@ trait APIMethods_FilePaymentsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagFilePayments :: apiTagMockedData :: Nil
+ ApiTag("File Payments") :: apiTagMockedData :: Nil
)
lazy val getFilePaymentConsentsConsentId : OBPEndpoint = {
@@ -516,7 +516,7 @@ trait APIMethods_FilePaymentsApi { self: RestHelper =>
json.parse(""""""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagFilePayments :: apiTagMockedData :: Nil
+ ApiTag("File Payments") :: apiTagMockedData :: Nil
)
lazy val getFilePaymentConsentsConsentIdFile : OBPEndpoint = {
@@ -604,7 +604,7 @@ trait APIMethods_FilePaymentsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagFilePayments :: apiTagMockedData :: Nil
+ ApiTag("File Payments") :: apiTagMockedData :: Nil
)
lazy val getFilePaymentsFilePaymentId : OBPEndpoint = {
@@ -692,7 +692,7 @@ trait APIMethods_FilePaymentsApi { self: RestHelper =>
json.parse(""""""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagFilePayments :: apiTagMockedData :: Nil
+ ApiTag("File Payments") :: apiTagMockedData :: Nil
)
lazy val getFilePaymentsFilePaymentIdReportFile : OBPEndpoint = {
@@ -706,7 +706,6 @@ trait APIMethods_FilePaymentsApi { self: RestHelper =>
}
}
- }
}
diff --git a/src/main/scala/code/api/UKOpenBanking/v3_1_0/FundsConfirmationsApi.scala b/src/main/scala/code/api/UKOpenBanking/v3_1_0/FundsConfirmationsApi.scala
index 0ca5748b5..d653652df 100644
--- a/src/main/scala/code/api/UKOpenBanking/v3_1_0/FundsConfirmationsApi.scala
+++ b/src/main/scala/code/api/UKOpenBanking/v3_1_0/FundsConfirmationsApi.scala
@@ -1,9 +1,10 @@
-package code.api.builder.FundsConfirmationsApi
+package code.api.UKOpenBanking.v3_1_0
import code.api.APIFailureNewStyle
import code.api.berlin.group.v1_3.JvalueCaseClass
import net.liftweb.json
import net.liftweb.json._
+import code.api.berlin.group.v1_3.JSONFactory_BERLIN_GROUP_1_3
import code.api.util.APIUtil.{defaultBankId, _}
import code.api.util.{ApiVersion, NewStyle}
import code.api.util.ErrorMessages._
@@ -20,14 +21,13 @@ import scala.collection.immutable.Nil
import scala.collection.mutable.ArrayBuffer
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
+import code.api.UKOpenBanking.v3_1_0.OBP_UKOpenBanking_310
+import code.api.util.ApiTag
-trait APIMethods_FundsConfirmationsApi { self: RestHelper =>
- val ImplementationsFundsConfirmationsApi = new Object() {
- val apiVersion: ApiVersion = ApiVersion.ukOpenBankingV310
+object APIMethods_FundsConfirmationsApi extends RestHelper {
+ val apiVersion = OBP_UKOpenBanking_310.apiVersion
val resourceDocs = ArrayBuffer[ResourceDoc]()
val apiRelations = ArrayBuffer[ApiRelation]()
- val codeContext = CodeContext(resourceDocs, apiRelations)
- implicit val formats = net.liftweb.json.DefaultFormats
protected implicit def JvalueToSuper(what: JValue): JvalueCaseClass = JvalueCaseClass(what)
val endpoints =
@@ -76,7 +76,7 @@ trait APIMethods_FundsConfirmationsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagFundsConfirmations :: apiTagMockedData :: Nil
+ ApiTag("Funds Confirmations") :: apiTagMockedData :: Nil
)
lazy val createFundsConfirmationConsents : OBPEndpoint = {
@@ -151,7 +151,7 @@ trait APIMethods_FundsConfirmationsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagFundsConfirmations :: apiTagMockedData :: Nil
+ ApiTag("Funds Confirmations") :: apiTagMockedData :: Nil
)
lazy val createFundsConfirmations : OBPEndpoint = {
@@ -201,7 +201,7 @@ trait APIMethods_FundsConfirmationsApi { self: RestHelper =>
json.parse(""""""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagFundsConfirmations :: apiTagMockedData :: Nil
+ ApiTag("Funds Confirmations") :: apiTagMockedData :: Nil
)
lazy val deleteFundsConfirmationConsentsConsentId : OBPEndpoint = {
@@ -253,7 +253,7 @@ trait APIMethods_FundsConfirmationsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagFundsConfirmations :: apiTagMockedData :: Nil
+ ApiTag("Funds Confirmations") :: apiTagMockedData :: Nil
)
lazy val getFundsConfirmationConsentsConsentId : OBPEndpoint = {
@@ -292,7 +292,6 @@ trait APIMethods_FundsConfirmationsApi { self: RestHelper =>
}
}
- }
}
diff --git a/src/main/scala/code/api/UKOpenBanking/v3_1_0/InternationalPaymentsApi.scala b/src/main/scala/code/api/UKOpenBanking/v3_1_0/InternationalPaymentsApi.scala
index 0a1ec5786..67fa734ae 100644
--- a/src/main/scala/code/api/UKOpenBanking/v3_1_0/InternationalPaymentsApi.scala
+++ b/src/main/scala/code/api/UKOpenBanking/v3_1_0/InternationalPaymentsApi.scala
@@ -1,4 +1,4 @@
-package code.api.builder.InternationalPaymentsApi
+package code.api.UKOpenBanking.v3_1_0
import code.api.APIFailureNewStyle
import code.api.berlin.group.v1_3.JvalueCaseClass
@@ -21,14 +21,13 @@ import scala.collection.immutable.Nil
import scala.collection.mutable.ArrayBuffer
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
+import code.api.UKOpenBanking.v3_1_0.OBP_UKOpenBanking_310
+import code.api.util.ApiTag
-trait APIMethods_InternationalPaymentsApi { self: RestHelper =>
- val ImplementationsInternationalPaymentsApi = new Object() {
- val apiVersion: ApiVersion = ApiVersion.ukOpenBankingV310
+object APIMethods_InternationalPaymentsApi extends RestHelper {
+ val apiVersion = OBP_UKOpenBanking_310.apiVersion
val resourceDocs = ArrayBuffer[ResourceDoc]()
val apiRelations = ArrayBuffer[ApiRelation]()
- val codeContext = CodeContext(resourceDocs, apiRelations)
- implicit val formats = net.liftweb.json.DefaultFormats
protected implicit def JvalueToSuper(what: JValue): JvalueCaseClass = JvalueCaseClass(what)
val endpoints =
@@ -180,7 +179,7 @@ trait APIMethods_InternationalPaymentsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagInternationalPayments :: apiTagMockedData :: Nil
+ ApiTag("International Payments") :: apiTagMockedData :: Nil
)
lazy val createInternationalPaymentConsents : OBPEndpoint = {
@@ -450,7 +449,7 @@ trait APIMethods_InternationalPaymentsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagInternationalPayments :: apiTagMockedData :: Nil
+ ApiTag("International Payments") :: apiTagMockedData :: Nil
)
lazy val createInternationalPayments : OBPEndpoint = {
@@ -720,7 +719,7 @@ trait APIMethods_InternationalPaymentsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagInternationalPayments :: apiTagMockedData :: Nil
+ ApiTag("International Payments") :: apiTagMockedData :: Nil
)
lazy val getInternationalPaymentConsentsConsentId : OBPEndpoint = {
@@ -893,7 +892,7 @@ trait APIMethods_InternationalPaymentsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagInternationalPayments :: apiTagMockedData :: Nil
+ ApiTag("International Payments") :: apiTagMockedData :: Nil
)
lazy val getInternationalPaymentConsentsConsentIdFundsConfirmation : OBPEndpoint = {
@@ -1055,7 +1054,7 @@ trait APIMethods_InternationalPaymentsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagInternationalPayments :: apiTagMockedData :: Nil
+ ApiTag("International Payments") :: apiTagMockedData :: Nil
)
lazy val getInternationalPaymentsInternationalPaymentId : OBPEndpoint = {
@@ -1185,7 +1184,6 @@ trait APIMethods_InternationalPaymentsApi { self: RestHelper =>
}
}
- }
}
diff --git a/src/main/scala/code/api/UKOpenBanking/v3_1_0/InternationalScheduledPaymentsApi.scala b/src/main/scala/code/api/UKOpenBanking/v3_1_0/InternationalScheduledPaymentsApi.scala
index 931db3158..40ecc130f 100644
--- a/src/main/scala/code/api/UKOpenBanking/v3_1_0/InternationalScheduledPaymentsApi.scala
+++ b/src/main/scala/code/api/UKOpenBanking/v3_1_0/InternationalScheduledPaymentsApi.scala
@@ -1,4 +1,4 @@
-package code.api.builder.InternationalScheduledPaymentsApi
+package code.api.UKOpenBanking.v3_1_0
import code.api.APIFailureNewStyle
import code.api.berlin.group.v1_3.JvalueCaseClass
@@ -21,14 +21,13 @@ import scala.collection.immutable.Nil
import scala.collection.mutable.ArrayBuffer
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
+import code.api.UKOpenBanking.v3_1_0.OBP_UKOpenBanking_310
+import code.api.util.ApiTag
-trait APIMethods_InternationalScheduledPaymentsApi { self: RestHelper =>
- val ImplementationsInternationalScheduledPaymentsApi = new Object() {
- val apiVersion: ApiVersion = ApiVersion.ukOpenBankingV310
+object APIMethods_InternationalScheduledPaymentsApi extends RestHelper {
+ val apiVersion = OBP_UKOpenBanking_310.apiVersion
val resourceDocs = ArrayBuffer[ResourceDoc]()
val apiRelations = ArrayBuffer[ApiRelation]()
- val codeContext = CodeContext(resourceDocs, apiRelations)
- implicit val formats = net.liftweb.json.DefaultFormats
protected implicit def JvalueToSuper(what: JValue): JvalueCaseClass = JvalueCaseClass(what)
val endpoints =
@@ -182,7 +181,7 @@ trait APIMethods_InternationalScheduledPaymentsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagInternationalScheduledPayments :: apiTagMockedData :: Nil
+ ApiTag("International Scheduled Payments") :: apiTagMockedData :: Nil
)
lazy val createInternationalScheduledPaymentConsents : OBPEndpoint = {
@@ -455,7 +454,7 @@ trait APIMethods_InternationalScheduledPaymentsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagInternationalScheduledPayments :: apiTagMockedData :: Nil
+ ApiTag("International Scheduled Payments") :: apiTagMockedData :: Nil
)
lazy val createInternationalScheduledPayments : OBPEndpoint = {
@@ -728,7 +727,7 @@ trait APIMethods_InternationalScheduledPaymentsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagInternationalScheduledPayments :: apiTagMockedData :: Nil
+ ApiTag("International Scheduled Payments") :: apiTagMockedData :: Nil
)
lazy val getInternationalScheduledPaymentConsentsConsentId : OBPEndpoint = {
@@ -903,7 +902,7 @@ trait APIMethods_InternationalScheduledPaymentsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagInternationalScheduledPayments :: apiTagMockedData :: Nil
+ ApiTag("International Scheduled Payments") :: apiTagMockedData :: Nil
)
lazy val getInternationalScheduledPaymentConsentsConsentIdFundsConfirmation : OBPEndpoint = {
@@ -1066,7 +1065,7 @@ trait APIMethods_InternationalScheduledPaymentsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagInternationalScheduledPayments :: apiTagMockedData :: Nil
+ ApiTag("International Scheduled Payments") :: apiTagMockedData :: Nil
)
lazy val getInternationalScheduledPaymentsInternationalScheduledPaymentId : OBPEndpoint = {
@@ -1197,7 +1196,6 @@ trait APIMethods_InternationalScheduledPaymentsApi { self: RestHelper =>
}
}
- }
}
diff --git a/src/main/scala/code/api/UKOpenBanking/v3_1_0/InternationalStandingOrdersApi.scala b/src/main/scala/code/api/UKOpenBanking/v3_1_0/InternationalStandingOrdersApi.scala
index f6bfc7f20..8afc5fce2 100644
--- a/src/main/scala/code/api/UKOpenBanking/v3_1_0/InternationalStandingOrdersApi.scala
+++ b/src/main/scala/code/api/UKOpenBanking/v3_1_0/InternationalStandingOrdersApi.scala
@@ -1,4 +1,4 @@
-package code.api.builder.InternationalStandingOrdersApi
+package code.api.UKOpenBanking.v3_1_0
import code.api.APIFailureNewStyle
import code.api.berlin.group.v1_3.JvalueCaseClass
@@ -21,14 +21,13 @@ import scala.collection.immutable.Nil
import scala.collection.mutable.ArrayBuffer
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
+import code.api.UKOpenBanking.v3_1_0.OBP_UKOpenBanking_310
+import code.api.util.ApiTag
-trait APIMethods_InternationalStandingOrdersApi { self: RestHelper =>
- val ImplementationsInternationalStandingOrdersApi = new Object() {
- val apiVersion: ApiVersion = ApiVersion.ukOpenBankingV310
+object APIMethods_InternationalStandingOrdersApi extends RestHelper {
+ val apiVersion = OBP_UKOpenBanking_310.apiVersion
val resourceDocs = ArrayBuffer[ResourceDoc]()
val apiRelations = ArrayBuffer[ApiRelation]()
- val codeContext = CodeContext(resourceDocs, apiRelations)
- implicit val formats = net.liftweb.json.DefaultFormats
protected implicit def JvalueToSuper(what: JValue): JvalueCaseClass = JvalueCaseClass(what)
val endpoints =
@@ -163,7 +162,7 @@ trait APIMethods_InternationalStandingOrdersApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagInternationalStandingOrders :: apiTagMockedData :: Nil
+ ApiTag("International Standing Orders") :: apiTagMockedData :: Nil
)
lazy val createInternationalStandingOrderConsents : OBPEndpoint = {
@@ -400,7 +399,7 @@ trait APIMethods_InternationalStandingOrdersApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagInternationalStandingOrders :: apiTagMockedData :: Nil
+ ApiTag("International Standing Orders") :: apiTagMockedData :: Nil
)
lazy val createInternationalStandingOrders : OBPEndpoint = {
@@ -637,7 +636,7 @@ trait APIMethods_InternationalStandingOrdersApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagInternationalStandingOrders :: apiTagMockedData :: Nil
+ ApiTag("International Standing Orders") :: apiTagMockedData :: Nil
)
lazy val getInternationalStandingOrderConsentsConsentId : OBPEndpoint = {
@@ -874,7 +873,7 @@ trait APIMethods_InternationalStandingOrdersApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagInternationalStandingOrders :: apiTagMockedData :: Nil
+ ApiTag("International Standing Orders") :: apiTagMockedData :: Nil
)
lazy val getInternationalStandingOrdersInternationalStandingOrderPaymentId : OBPEndpoint = {
@@ -987,7 +986,6 @@ trait APIMethods_InternationalStandingOrdersApi { self: RestHelper =>
}
}
- }
}
diff --git a/src/main/scala/code/api/UKOpenBanking/v3_1_0/OBP_UKOpenBanking_310.scala b/src/main/scala/code/api/UKOpenBanking/v3_1_0/OBP_UKOpenBanking_310.scala
index 40ef65614..f70569da1 100644
--- a/src/main/scala/code/api/UKOpenBanking/v3_1_0/OBP_UKOpenBanking_310.scala
+++ b/src/main/scala/code/api/UKOpenBanking/v3_1_0/OBP_UKOpenBanking_310.scala
@@ -32,101 +32,85 @@
package code.api.UKOpenBanking.v3_1_0
import code.api.OBPRestHelper
-import code.api.builder.DomesticPaymentsApi.APIMethods_DomesticPaymentsApi
-import code.api.builder.DomesticScheduledPaymentsApi.APIMethods_DomesticScheduledPaymentsApi
-import code.api.builder.DomesticStandingOrdersApi.APIMethods_DomesticStandingOrdersApi
-import code.api.builder.FilePaymentsApi.APIMethods_FilePaymentsApi
-import code.api.builder.FundsConfirmationsApi.APIMethods_FundsConfirmationsApi
-import code.api.builder.InternationalPaymentsApi.APIMethods_InternationalPaymentsApi
-import code.api.builder.InternationalScheduledPaymentsApi.APIMethods_InternationalScheduledPaymentsApi
-import code.api.builder.InternationalStandingOrdersApi.APIMethods_InternationalStandingOrdersApi
+import code.api.builder.AccountInformationServiceAISApi.APIMethods_AccountInformationServiceAISApi
+import code.api.builder.CommonServicesApi.APIMethods_CommonServicesApi
+import code.api.builder.ConfirmationOfFundsServicePIISApi.APIMethods_ConfirmationOfFundsServicePIISApi
+import code.api.builder.PaymentInitiationServicePISApi.APIMethods_PaymentInitiationServicePISApi
+import code.api.builder.SigningBasketsApi.APIMethods_SigningBasketsApi
import code.api.util.APIUtil.{OBPEndpoint, ResourceDoc, getAllowedEndpoints}
-import code.api.util.ApiVersion
+import code.api.util.{APIUtil, ApiVersion, ScannedApiVersion, ScannedApis}
import code.util.Helper.MdcLoggable
-import scala.collection.immutable.Nil
+import code.api.UKOpenBanking.v3_1_0.APIMethods_FundsConfirmationsApi
+
+import scala.collection.mutable.ArrayBuffer
+
/*
This file defines which endpoints from all the versions are available in v1
*/
-
-
-object OBP_UKOpenBanking_310 extends OBPRestHelper with MdcLoggable
- with APIMethods_AccountAccessApi
- with APIMethods_AccountsApi
- with APIMethods_BalancesApi
- with APIMethods_BeneficiariesApi
- with APIMethods_DirectDebitsApi
- with APIMethods_OffersApi
- with APIMethods_PartysApi
- with APIMethods_ProductsApi
- with APIMethods_ScheduledPaymentsApi
- with APIMethods_StandingOrdersApi
- with APIMethods_StatementsApi
- with APIMethods_TransactionsApi
- with APIMethods_DomesticPaymentsApi
- with APIMethods_DomesticScheduledPaymentsApi
- with APIMethods_DomesticStandingOrdersApi
- with APIMethods_FilePaymentsApi
- with APIMethods_InternationalPaymentsApi
- with APIMethods_InternationalScheduledPaymentsApi
- with APIMethods_InternationalStandingOrdersApi
- with APIMethods_FundsConfirmationsApi{
-
- val version = ApiVersion.ukOpenBankingV310
+object OBP_UKOpenBanking_310 extends OBPRestHelper with MdcLoggable with ScannedApis {
+ //please modify these three parameter if it is not correct.
+ override val apiVersion = ScannedApiVersion("open-banking", "UK", "v3.1")
val versionStatus = "DRAFT"
- val endpointsOf1_3 =
- ImplementationsAccountAccessApi.endpoints ++
- ImplementationsAccountsApi.endpoints ++
- ImplementationsBalancesApi.endpoints ++
- ImplementationsBeneficiariesApi.endpoints ++
- ImplementationsDirectDebitsApi.endpoints ++
- ImplementationsOffersApi.endpoints ++
- ImplementationsPartysApi.endpoints ++
- ImplementationsProductsApi.endpoints ++
- ImplementationsDomesticPaymentsApi.endpoints ++
- ImplementationsDomesticScheduledPaymentsApi.endpoints ++
- ImplementationsDomesticStandingOrdersApi.endpoints ++
- ImplementationsFilePaymentsApi.endpoints ++
- ImplementationsInternationalPaymentsApi.endpoints ++
- ImplementationsInternationalScheduledPaymentsApi.endpoints ++
- ImplementationsInternationalStandingOrdersApi.endpoints ++
- ImplementationsFundsConfirmationsApi.endpoints
-
- val allResourceDocs =
- ImplementationsAccountAccessApi.resourceDocs ++
- ImplementationsAccountsApi.resourceDocs ++
- ImplementationsBalancesApi.resourceDocs ++
- ImplementationsBeneficiariesApi.resourceDocs ++
- ImplementationsDirectDebitsApi.resourceDocs ++
- ImplementationsOffersApi.resourceDocs ++
- ImplementationsPartysApi.resourceDocs ++
- ImplementationsProductsApi.resourceDocs ++
- ImplementationsScheduledPaymentsApi.resourceDocs ++
- ImplementationsDomesticPaymentsApi.resourceDocs ++
- ImplementationsDomesticScheduledPaymentsApi.resourceDocs ++
- ImplementationsDomesticStandingOrdersApi.resourceDocs ++
- ImplementationsFilePaymentsApi.resourceDocs ++
- ImplementationsInternationalPaymentsApi.resourceDocs ++
- ImplementationsInternationalScheduledPaymentsApi.resourceDocs ++
- ImplementationsInternationalStandingOrdersApi.resourceDocs ++
- ImplementationsFundsConfirmationsApi.resourceDocs
-
- def findResourceDoc(pf: OBPEndpoint): Option[ResourceDoc] = {
+ private[this] val endpoints =
+ APIMethods_AccountAccessApi.endpoints ++
+ APIMethods_AccountsApi.endpoints ++
+ APIMethods_BalancesApi.endpoints ++
+ APIMethods_BeneficiariesApi.endpoints ++
+ APIMethods_DirectDebitsApi.endpoints ++
+ APIMethods_DomesticPaymentsApi.endpoints ++
+ APIMethods_DomesticScheduledPaymentsApi.endpoints ++
+ APIMethods_DomesticStandingOrdersApi.endpoints ++
+ APIMethods_FilePaymentsApi.endpoints ++
+ APIMethods_FundsConfirmationsApi.endpoints ++
+ APIMethods_InternationalPaymentsApi.endpoints ++
+ APIMethods_InternationalScheduledPaymentsApi.endpoints ++
+ APIMethods_InternationalStandingOrdersApi.endpoints ++
+ APIMethods_OffersApi.endpoints ++
+ APIMethods_PartysApi.endpoints ++
+ APIMethods_ProductsApi.endpoints ++
+ APIMethods_ScheduledPaymentsApi.endpoints ++
+ APIMethods_StandingOrdersApi.endpoints ++
+ APIMethods_StatementsApi.endpoints ++
+ APIMethods_TransactionsApi.endpoints
+
+ override val allResourceDocs: ArrayBuffer[ResourceDoc] =
+ APIMethods_AccountAccessApi.resourceDocs ++
+ APIMethods_AccountsApi.resourceDocs ++
+ APIMethods_BalancesApi.resourceDocs ++
+ APIMethods_BeneficiariesApi.resourceDocs ++
+ APIMethods_DirectDebitsApi.resourceDocs ++
+ APIMethods_DomesticPaymentsApi.resourceDocs ++
+ APIMethods_DomesticScheduledPaymentsApi.resourceDocs ++
+ APIMethods_DomesticStandingOrdersApi.resourceDocs ++
+ APIMethods_FilePaymentsApi.resourceDocs ++
+ APIMethods_FundsConfirmationsApi.resourceDocs ++
+ APIMethods_InternationalPaymentsApi.resourceDocs ++
+ APIMethods_InternationalScheduledPaymentsApi.resourceDocs ++
+ APIMethods_InternationalStandingOrdersApi.resourceDocs ++
+ APIMethods_OffersApi.resourceDocs ++
+ APIMethods_PartysApi.resourceDocs ++
+ APIMethods_ProductsApi.resourceDocs ++
+ APIMethods_ScheduledPaymentsApi.resourceDocs ++
+ APIMethods_StandingOrdersApi.resourceDocs ++
+ APIMethods_StatementsApi.resourceDocs ++
+ APIMethods_TransactionsApi.resourceDocs
+
+ private[this] def findResourceDoc(pf: OBPEndpoint): Option[ResourceDoc] = {
allResourceDocs.find(_.partialFunction==pf)
}
// Filter the possible endpoints by the disabled / enabled Props settings and add them together
- val routes : List[OBPEndpoint] = getAllowedEndpoints(endpointsOf1_3, allResourceDocs)
+ override val routes : List[OBPEndpoint] = getAllowedEndpoints(endpoints, allResourceDocs)
// Make them available for use!
routes.foreach(route => {
- oauthServe(("open-banking" / version.vDottedApiVersion()).oPrefix{route}, findResourceDoc(route))
+ oauthServe((apiVersion.urlPrefix / version.vDottedApiVersion()).oPrefix{route}, findResourceDoc(route))
})
logger.info(s"version $version has been run! There are ${routes.length} routes.")
-
}
diff --git a/src/main/scala/code/api/UKOpenBanking/v3_1_0/OffersApi.scala b/src/main/scala/code/api/UKOpenBanking/v3_1_0/OffersApi.scala
index dfda06f9d..5b800a254 100644
--- a/src/main/scala/code/api/UKOpenBanking/v3_1_0/OffersApi.scala
+++ b/src/main/scala/code/api/UKOpenBanking/v3_1_0/OffersApi.scala
@@ -21,14 +21,13 @@ import scala.collection.immutable.Nil
import scala.collection.mutable.ArrayBuffer
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
+import code.api.UKOpenBanking.v3_1_0.OBP_UKOpenBanking_310
+import code.api.util.ApiTag
-trait APIMethods_OffersApi { self: RestHelper =>
- val ImplementationsOffersApi = new Object() {
- val apiVersion: ApiVersion = ApiVersion.ukOpenBankingV310
+object APIMethods_OffersApi extends RestHelper {
+ val apiVersion = OBP_UKOpenBanking_310.apiVersion
val resourceDocs = ArrayBuffer[ResourceDoc]()
val apiRelations = ArrayBuffer[ApiRelation]()
- val codeContext = CodeContext(resourceDocs, apiRelations)
- implicit val formats = net.liftweb.json.DefaultFormats
protected implicit def JvalueToSuper(what: JValue): JvalueCaseClass = JvalueCaseClass(what)
val endpoints =
@@ -103,7 +102,7 @@ trait APIMethods_OffersApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagOffers :: apiTagMockedData :: Nil
+ ApiTag("Offers") :: apiTagMockedData :: Nil
)
lazy val getAccountsAccountIdOffers : OBPEndpoint = {
@@ -236,7 +235,7 @@ trait APIMethods_OffersApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagOffers :: apiTagMockedData :: Nil
+ ApiTag("Offers") :: apiTagMockedData :: Nil
)
lazy val getOffers : OBPEndpoint = {
@@ -303,7 +302,6 @@ trait APIMethods_OffersApi { self: RestHelper =>
}
}
- }
}
diff --git a/src/main/scala/code/api/UKOpenBanking/v3_1_0/PartysApi.scala b/src/main/scala/code/api/UKOpenBanking/v3_1_0/PartysApi.scala
index aa7c06735..39acde027 100644
--- a/src/main/scala/code/api/UKOpenBanking/v3_1_0/PartysApi.scala
+++ b/src/main/scala/code/api/UKOpenBanking/v3_1_0/PartysApi.scala
@@ -21,14 +21,13 @@ import scala.collection.immutable.Nil
import scala.collection.mutable.ArrayBuffer
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
+import code.api.UKOpenBanking.v3_1_0.OBP_UKOpenBanking_310
+import code.api.util.ApiTag
-trait APIMethods_PartysApi { self: RestHelper =>
- val ImplementationsPartysApi = new Object() {
- val apiVersion: ApiVersion = ApiVersion.ukOpenBankingV310
+object APIMethods_PartysApi extends RestHelper {
+ val apiVersion = OBP_UKOpenBanking_310.apiVersion
val resourceDocs = ArrayBuffer[ResourceDoc]()
val apiRelations = ArrayBuffer[ApiRelation]()
- val codeContext = CodeContext(resourceDocs, apiRelations)
- implicit val formats = net.liftweb.json.DefaultFormats
protected implicit def JvalueToSuper(what: JValue): JvalueCaseClass = JvalueCaseClass(what)
val endpoints =
@@ -92,7 +91,7 @@ trait APIMethods_PartysApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagPartys :: apiTagMockedData :: Nil
+ ApiTag("Partys") :: apiTagMockedData :: Nil
)
lazy val getAccountsAccountIdParty : OBPEndpoint = {
@@ -203,7 +202,7 @@ trait APIMethods_PartysApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagPartys :: apiTagMockedData :: Nil
+ ApiTag("Partys") :: apiTagMockedData :: Nil
)
lazy val getParty : OBPEndpoint = {
@@ -259,7 +258,6 @@ trait APIMethods_PartysApi { self: RestHelper =>
}
}
- }
}
diff --git a/src/main/scala/code/api/UKOpenBanking/v3_1_0/ProductsApi.scala b/src/main/scala/code/api/UKOpenBanking/v3_1_0/ProductsApi.scala
index cb8827e14..23835bd34 100644
--- a/src/main/scala/code/api/UKOpenBanking/v3_1_0/ProductsApi.scala
+++ b/src/main/scala/code/api/UKOpenBanking/v3_1_0/ProductsApi.scala
@@ -21,14 +21,13 @@ import scala.collection.immutable.Nil
import scala.collection.mutable.ArrayBuffer
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
+import code.api.UKOpenBanking.v3_1_0.OBP_UKOpenBanking_310
+import code.api.util.ApiTag
-trait APIMethods_ProductsApi { self: RestHelper =>
- val ImplementationsProductsApi = new Object() {
- val apiVersion: ApiVersion = ApiVersion.ukOpenBankingV310
+object APIMethods_ProductsApi extends RestHelper {
+ val apiVersion = OBP_UKOpenBanking_310.apiVersion
val resourceDocs = ArrayBuffer[ResourceDoc]()
val apiRelations = ArrayBuffer[ApiRelation]()
- val codeContext = CodeContext(resourceDocs, apiRelations)
- implicit val formats = net.liftweb.json.DefaultFormats
protected implicit def JvalueToSuper(what: JValue): JvalueCaseClass = JvalueCaseClass(what)
val endpoints =
@@ -49,7 +48,7 @@ trait APIMethods_ProductsApi { self: RestHelper =>
json.parse(""""""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagProducts :: apiTagMockedData :: Nil
+ ApiTag("Products") :: apiTagMockedData :: Nil
)
lazy val getAccountsAccountIdProduct : OBPEndpoint = {
@@ -70,12 +69,13 @@ trait APIMethods_ProductsApi { self: RestHelper =>
"GET",
"/products",
"Get Products",
- s"""${mockedDataText(true)}""",
+ s"""${mockedDataText(true)}
+""",
json.parse(""""""),
json.parse(""""""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagProducts :: apiTagMockedData :: Nil
+ ApiTag("Products") :: apiTagMockedData :: Nil
)
lazy val getProducts : OBPEndpoint = {
@@ -89,7 +89,6 @@ trait APIMethods_ProductsApi { self: RestHelper =>
}
}
- }
}
diff --git a/src/main/scala/code/api/UKOpenBanking/v3_1_0/ScheduledPaymentsApi.scala b/src/main/scala/code/api/UKOpenBanking/v3_1_0/ScheduledPaymentsApi.scala
index 15292c935..dec4df1cd 100644
--- a/src/main/scala/code/api/UKOpenBanking/v3_1_0/ScheduledPaymentsApi.scala
+++ b/src/main/scala/code/api/UKOpenBanking/v3_1_0/ScheduledPaymentsApi.scala
@@ -21,14 +21,13 @@ import scala.collection.immutable.Nil
import scala.collection.mutable.ArrayBuffer
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
+import code.api.UKOpenBanking.v3_1_0.OBP_UKOpenBanking_310
+import code.api.util.ApiTag
-trait APIMethods_ScheduledPaymentsApi { self: RestHelper =>
- val ImplementationsScheduledPaymentsApi = new Object() {
- val apiVersion: ApiVersion = ApiVersion.ukOpenBankingV310
+object APIMethods_ScheduledPaymentsApi extends RestHelper {
+ val apiVersion = OBP_UKOpenBanking_310.apiVersion
val resourceDocs = ArrayBuffer[ResourceDoc]()
val apiRelations = ArrayBuffer[ApiRelation]()
- val codeContext = CodeContext(resourceDocs, apiRelations)
- implicit val formats = net.liftweb.json.DefaultFormats
protected implicit def JvalueToSuper(what: JValue): JvalueCaseClass = JvalueCaseClass(what)
val endpoints =
@@ -105,7 +104,7 @@ trait APIMethods_ScheduledPaymentsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagScheduledPayments :: apiTagMockedData :: Nil
+ ApiTag("Scheduled Payments") :: apiTagMockedData :: Nil
)
lazy val getAccountsAccountIdScheduledPayments : OBPEndpoint = {
@@ -242,7 +241,7 @@ trait APIMethods_ScheduledPaymentsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagScheduledPayments :: apiTagMockedData :: Nil
+ ApiTag("Scheduled Payments") :: apiTagMockedData :: Nil
)
lazy val getScheduledPayments : OBPEndpoint = {
@@ -311,7 +310,6 @@ trait APIMethods_ScheduledPaymentsApi { self: RestHelper =>
}
}
- }
}
diff --git a/src/main/scala/code/api/UKOpenBanking/v3_1_0/StandingOrdersApi.scala b/src/main/scala/code/api/UKOpenBanking/v3_1_0/StandingOrdersApi.scala
index 6d0e16b1e..938b8275f 100644
--- a/src/main/scala/code/api/UKOpenBanking/v3_1_0/StandingOrdersApi.scala
+++ b/src/main/scala/code/api/UKOpenBanking/v3_1_0/StandingOrdersApi.scala
@@ -21,14 +21,13 @@ import scala.collection.immutable.Nil
import scala.collection.mutable.ArrayBuffer
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
+import code.api.UKOpenBanking.v3_1_0.OBP_UKOpenBanking_310
+import code.api.util.ApiTag
-trait APIMethods_StandingOrdersApi { self: RestHelper =>
- val ImplementationsStandingOrdersApi = new Object() {
- val apiVersion: ApiVersion = ApiVersion.ukOpenBankingV310
+object APIMethods_StandingOrdersApi extends RestHelper {
+ val apiVersion = OBP_UKOpenBanking_310.apiVersion
val resourceDocs = ArrayBuffer[ResourceDoc]()
val apiRelations = ArrayBuffer[ApiRelation]()
- val codeContext = CodeContext(resourceDocs, apiRelations)
- implicit val formats = net.liftweb.json.DefaultFormats
protected implicit def JvalueToSuper(what: JValue): JvalueCaseClass = JvalueCaseClass(what)
val endpoints =
@@ -129,7 +128,7 @@ trait APIMethods_StandingOrdersApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagStandingOrders :: apiTagMockedData :: Nil
+ ApiTag("Standing Orders") :: apiTagMockedData :: Nil
)
lazy val getAccountsAccountIdStandingOrders : OBPEndpoint = {
@@ -314,7 +313,7 @@ trait APIMethods_StandingOrdersApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagStandingOrders :: apiTagMockedData :: Nil
+ ApiTag("Standing Orders") :: apiTagMockedData :: Nil
)
lazy val getStandingOrders : OBPEndpoint = {
@@ -407,7 +406,6 @@ trait APIMethods_StandingOrdersApi { self: RestHelper =>
}
}
- }
}
diff --git a/src/main/scala/code/api/UKOpenBanking/v3_1_0/StatementsApi.scala b/src/main/scala/code/api/UKOpenBanking/v3_1_0/StatementsApi.scala
index 829f589ed..07935b67c 100644
--- a/src/main/scala/code/api/UKOpenBanking/v3_1_0/StatementsApi.scala
+++ b/src/main/scala/code/api/UKOpenBanking/v3_1_0/StatementsApi.scala
@@ -21,14 +21,13 @@ import scala.collection.immutable.Nil
import scala.collection.mutable.ArrayBuffer
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
+import code.api.UKOpenBanking.v3_1_0.OBP_UKOpenBanking_310
+import code.api.util.ApiTag
-trait APIMethods_StatementsApi { self: RestHelper =>
- val ImplementationsStatementsApi = new Object() {
- val apiVersion: ApiVersion = ApiVersion.ukOpenBankingV310
+object APIMethods_StatementsApi extends RestHelper {
+ val apiVersion = OBP_UKOpenBanking_310.apiVersion
val resourceDocs = ArrayBuffer[ResourceDoc]()
val apiRelations = ArrayBuffer[ApiRelation]()
- val codeContext = CodeContext(resourceDocs, apiRelations)
- implicit val formats = net.liftweb.json.DefaultFormats
protected implicit def JvalueToSuper(what: JValue): JvalueCaseClass = JvalueCaseClass(what)
val endpoints =
@@ -244,7 +243,7 @@ trait APIMethods_StatementsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagStatements :: apiTagMockedData :: Nil
+ ApiTag("Statements") :: apiTagMockedData :: Nil
)
lazy val getAccountsAccountIdStatements : OBPEndpoint = {
@@ -653,7 +652,7 @@ trait APIMethods_StatementsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagStatements :: apiTagMockedData :: Nil
+ ApiTag("Statements") :: apiTagMockedData :: Nil
)
lazy val getAccountsAccountIdStatementsStatementId : OBPEndpoint = {
@@ -871,7 +870,7 @@ trait APIMethods_StatementsApi { self: RestHelper =>
json.parse(""""""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagStatements :: apiTagMockedData :: Nil
+ ApiTag("Statements") :: apiTagMockedData :: Nil
)
lazy val getAccountsAccountIdStatementsStatementIdFile : OBPEndpoint = {
@@ -1121,7 +1120,7 @@ trait APIMethods_StatementsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagStatements :: apiTagMockedData :: Nil
+ ApiTag("Statements") ::ApiTag("Transactions") :: apiTagMockedData :: Nil
)
lazy val getAccountsAccountIdStatementsStatementIdTransactions : OBPEndpoint = {
@@ -1562,7 +1561,7 @@ trait APIMethods_StatementsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagStatements :: apiTagMockedData :: Nil
+ ApiTag("Statements") :: apiTagMockedData :: Nil
)
lazy val getStatements : OBPEndpoint = {
@@ -1767,7 +1766,6 @@ trait APIMethods_StatementsApi { self: RestHelper =>
}
}
- }
}
diff --git a/src/main/scala/code/api/UKOpenBanking/v3_1_0/TransactionsApi.scala b/src/main/scala/code/api/UKOpenBanking/v3_1_0/TransactionsApi.scala
index 6113b317c..8b2551fe7 100644
--- a/src/main/scala/code/api/UKOpenBanking/v3_1_0/TransactionsApi.scala
+++ b/src/main/scala/code/api/UKOpenBanking/v3_1_0/TransactionsApi.scala
@@ -21,14 +21,13 @@ import scala.collection.immutable.Nil
import scala.collection.mutable.ArrayBuffer
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
+import code.api.UKOpenBanking.v3_1_0.OBP_UKOpenBanking_310
+import code.api.util.ApiTag
-trait APIMethods_TransactionsApi { self: RestHelper =>
- val ImplementationsTransactionsApi = new Object() {
- val apiVersion: ApiVersion = ApiVersion.ukOpenBankingV310
+object APIMethods_TransactionsApi extends RestHelper {
+ val apiVersion = OBP_UKOpenBanking_310.apiVersion
val resourceDocs = ArrayBuffer[ResourceDoc]()
val apiRelations = ArrayBuffer[ApiRelation]()
- val codeContext = CodeContext(resourceDocs, apiRelations)
- implicit val formats = net.liftweb.json.DefaultFormats
protected implicit def JvalueToSuper(what: JValue): JvalueCaseClass = JvalueCaseClass(what)
val endpoints =
@@ -274,7 +273,7 @@ trait APIMethods_TransactionsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagTransactions :: apiTagMockedData :: Nil
+ ApiTag("Statements") ::ApiTag("Transactions") :: apiTagMockedData :: Nil
)
lazy val getAccountsAccountIdStatementsStatementIdTransactions : OBPEndpoint = {
@@ -747,7 +746,7 @@ trait APIMethods_TransactionsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagTransactions :: apiTagMockedData :: Nil
+ ApiTag("Transactions") :: apiTagMockedData :: Nil
)
lazy val getAccountsAccountIdTransactions : OBPEndpoint = {
@@ -1220,7 +1219,7 @@ trait APIMethods_TransactionsApi { self: RestHelper =>
}"""),
List(UserNotLoggedIn, UnknownError),
Catalogs(notCore, notPSD2, notOBWG),
- apiTagTransactions :: apiTagMockedData :: Nil
+ ApiTag("Transactions") :: apiTagMockedData :: Nil
)
lazy val getTransactions : OBPEndpoint = {
@@ -1457,7 +1456,6 @@ trait APIMethods_TransactionsApi { self: RestHelper =>
}
}
- }
}
diff --git a/src/main/scala/code/api/berlin/group/v1/APIMethods_BERLIN_GROUP_1.scala b/src/main/scala/code/api/berlin/group/v1/APIMethods_BERLIN_GROUP_1.scala
index 8b42c7620..e78a72e06 100644
--- a/src/main/scala/code/api/berlin/group/v1/APIMethods_BERLIN_GROUP_1.scala
+++ b/src/main/scala/code/api/berlin/group/v1/APIMethods_BERLIN_GROUP_1.scala
@@ -19,12 +19,8 @@ import scala.collection.mutable.ArrayBuffer
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
-trait APIMethods_BERLIN_GROUP_1 {
- //needs to be a RestHelper to get access to JsonGet, JsonPost, etc.
- self: RestHelper =>
-
- val Implementations1 = new Object() {
- val implementedInApiVersion: ApiVersion = ApiVersion.berlinGroupV1
+object APIMethods_BERLIN_GROUP_1 extends RestHelper{
+ val implementedInApiVersion = OBP_BERLIN_GROUP_1.apiVersion
val resourceDocs = ArrayBuffer[ResourceDoc]()
val apiRelations = ArrayBuffer[ApiRelation]()
@@ -177,10 +173,5 @@ trait APIMethods_BERLIN_GROUP_1 {
}
}
}
- }
-}
-
-
-object APIMethods_BERLIN_GROUP_1 {
-}
+}
\ No newline at end of file
diff --git a/src/main/scala/code/api/berlin/group/v1/OBP_BERLIN_GROUP_1.scala b/src/main/scala/code/api/berlin/group/v1/OBP_BERLIN_GROUP_1.scala
index eeb9bb92b..3be2f5132 100644
--- a/src/main/scala/code/api/berlin/group/v1/OBP_BERLIN_GROUP_1.scala
+++ b/src/main/scala/code/api/berlin/group/v1/OBP_BERLIN_GROUP_1.scala
@@ -28,8 +28,9 @@ package code.api.berlin.group.v1
import code.api.OBPRestHelper
import code.api.util.APIUtil.{OBPEndpoint, ResourceDoc, getAllowedEndpoints}
-import code.api.util.ApiVersion
+import code.api.util.{ApiVersion, ScannedApiVersion, ScannedApis}
import code.util.Helper.MdcLoggable
+import code.api.berlin.group.v1.APIMethods_BERLIN_GROUP_1._
import scala.collection.immutable.Nil
@@ -40,32 +41,33 @@ This file defines which endpoints from all the versions are available in v1
*/
-object OBP_BERLIN_GROUP_1 extends OBPRestHelper with APIMethods_BERLIN_GROUP_1 with MdcLoggable {
+object OBP_BERLIN_GROUP_1 extends OBPRestHelper with MdcLoggable with ScannedApis{
- val version = ApiVersion.berlinGroupV1
+ override val apiVersion = ScannedApiVersion("berlin-group", "BG", "v1")
val versionStatus = "DRAFT"
- val endpointsOf1 =
- Implementations1.getAccountList ::
- Implementations1.getAccountBalances ::
- Implementations1.getTransactionList ::
+ val allEndpoints =
+ getAccountList ::
+ getAccountBalances ::
+ getAccountBalances ::
+ getTransactionList ::
Nil
- val allResourceDocs = Implementations1.resourceDocs
+ override val allResourceDocs = resourceDocs
def findResourceDoc(pf: OBPEndpoint): Option[ResourceDoc] = {
allResourceDocs.find(_.partialFunction==pf)
}
// Filter the possible endpoints by the disabled / enabled Props settings and add them together
- val routes : List[OBPEndpoint] = getAllowedEndpoints(endpointsOf1, Implementations1.resourceDocs)
+ override val routes : List[OBPEndpoint] = getAllowedEndpoints(allEndpoints,resourceDocs)
// Make them available for use!
routes.foreach(route => {
- oauthServe(("berlin-group" / version.toString).oPrefix{route}, findResourceDoc(route))
+ oauthServe((apiVersion.urlPrefix / apiVersion.toString).oPrefix{route}, findResourceDoc(route))
})
- logger.info(s"version $version has been run! There are ${routes.length} routes.")
+ logger.info(s"version $apiVersion has been run! There are ${routes.length} routes.")
}
diff --git a/src/main/scala/code/api/berlin/group/v1_3/AccountInformationServiceAISApi.scala b/src/main/scala/code/api/berlin/group/v1_3/AccountInformationServiceAISApi.scala
index 6ff978eb7..db07bb424 100644
--- a/src/main/scala/code/api/berlin/group/v1_3/AccountInformationServiceAISApi.scala
+++ b/src/main/scala/code/api/berlin/group/v1_3/AccountInformationServiceAISApi.scala
@@ -23,7 +23,7 @@ import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
object APIMethods_AccountInformationServiceAISApi extends RestHelper {
- val apiVersion: ApiVersion = OBP_BERLIN_GROUP_1_3.version
+ val apiVersion = OBP_BERLIN_GROUP_1_3.apiVersion
val resourceDocs = ArrayBuffer[ResourceDoc]()
val apiRelations = ArrayBuffer[ApiRelation]()
protected implicit def JvalueToSuper(what: JValue): JvalueCaseClass = JvalueCaseClass(what)
diff --git a/src/main/scala/code/api/berlin/group/v1_3/CommonServicesApi.scala b/src/main/scala/code/api/berlin/group/v1_3/CommonServicesApi.scala
index a26f31fc2..6a187124f 100644
--- a/src/main/scala/code/api/berlin/group/v1_3/CommonServicesApi.scala
+++ b/src/main/scala/code/api/berlin/group/v1_3/CommonServicesApi.scala
@@ -23,7 +23,7 @@ import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
object APIMethods_CommonServicesApi extends RestHelper {
- val apiVersion: ApiVersion = OBP_BERLIN_GROUP_1_3.version
+ val apiVersion = OBP_BERLIN_GROUP_1_3.apiVersion
val resourceDocs = ArrayBuffer[ResourceDoc]()
val apiRelations = ArrayBuffer[ApiRelation]()
val codeContext = CodeContext(resourceDocs, apiRelations)
diff --git a/src/main/scala/code/api/berlin/group/v1_3/ConfirmationOfFundsServicePIISApi.scala b/src/main/scala/code/api/berlin/group/v1_3/ConfirmationOfFundsServicePIISApi.scala
index 710ceaa23..a769d3192 100644
--- a/src/main/scala/code/api/berlin/group/v1_3/ConfirmationOfFundsServicePIISApi.scala
+++ b/src/main/scala/code/api/berlin/group/v1_3/ConfirmationOfFundsServicePIISApi.scala
@@ -23,7 +23,7 @@ import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
object APIMethods_ConfirmationOfFundsServicePIISApi extends RestHelper {
- val apiVersion: ApiVersion = OBP_BERLIN_GROUP_1_3.version
+ val apiVersion = OBP_BERLIN_GROUP_1_3.apiVersion
val resourceDocs = ArrayBuffer[ResourceDoc]()
val apiRelations = ArrayBuffer[ApiRelation]()
protected implicit def JvalueToSuper(what: JValue): JvalueCaseClass = JvalueCaseClass(what)
diff --git a/src/main/scala/code/api/berlin/group/v1_3/OBP_BERLIN_GROUP_1_3.scala b/src/main/scala/code/api/berlin/group/v1_3/OBP_BERLIN_GROUP_1_3.scala
index 596299e26..aba8f4e2a 100644
--- a/src/main/scala/code/api/berlin/group/v1_3/OBP_BERLIN_GROUP_1_3.scala
+++ b/src/main/scala/code/api/berlin/group/v1_3/OBP_BERLIN_GROUP_1_3.scala
@@ -51,7 +51,7 @@ This file defines which endpoints from all the versions are available in v1
*/
object OBP_BERLIN_GROUP_1_3 extends OBPRestHelper with MdcLoggable with ScannedApis {
- override val apiVersion = ScannedApiVersion("berlin-group", "v", "1.3 Dec 20th 2018")
+ override val apiVersion = ScannedApiVersion("berlin-group", "BG", "v1.3")
val versionStatus = "DRAFT"
private[this] val endpoints =
diff --git a/src/main/scala/code/api/berlin/group/v1_3/PaymentInitiationServicePISApi.scala b/src/main/scala/code/api/berlin/group/v1_3/PaymentInitiationServicePISApi.scala
index 05ff6c59f..c4b24dc2e 100644
--- a/src/main/scala/code/api/berlin/group/v1_3/PaymentInitiationServicePISApi.scala
+++ b/src/main/scala/code/api/berlin/group/v1_3/PaymentInitiationServicePISApi.scala
@@ -23,7 +23,7 @@ import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
object APIMethods_PaymentInitiationServicePISApi extends RestHelper {
- val apiVersion: ApiVersion = OBP_BERLIN_GROUP_1_3.version
+ val apiVersion = OBP_BERLIN_GROUP_1_3.apiVersion
val resourceDocs = ArrayBuffer[ResourceDoc]()
val apiRelations = ArrayBuffer[ApiRelation]()
protected implicit def JvalueToSuper(what: JValue): JvalueCaseClass = JvalueCaseClass(what)
diff --git a/src/main/scala/code/api/berlin/group/v1_3/SigningBasketsApi.scala b/src/main/scala/code/api/berlin/group/v1_3/SigningBasketsApi.scala
index 9528ec89a..17e1a3578 100644
--- a/src/main/scala/code/api/berlin/group/v1_3/SigningBasketsApi.scala
+++ b/src/main/scala/code/api/berlin/group/v1_3/SigningBasketsApi.scala
@@ -23,7 +23,7 @@ import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
object APIMethods_SigningBasketsApi extends RestHelper {
- val apiVersion: ApiVersion = OBP_BERLIN_GROUP_1_3.version
+ val apiVersion = OBP_BERLIN_GROUP_1_3.apiVersion
val resourceDocs = ArrayBuffer[ResourceDoc]()
val apiRelations = ArrayBuffer[ApiRelation]()
protected implicit def JvalueToSuper(what: JValue): JvalueCaseClass = JvalueCaseClass(what)
diff --git a/src/main/scala/code/api/builder/APIMethods_APIBuilder.scala b/src/main/scala/code/api/builder/APIMethods_APIBuilder.scala
index 1ef09c07e..d1ee7d537 100644
--- a/src/main/scala/code/api/builder/APIMethods_APIBuilder.scala
+++ b/src/main/scala/code/api/builder/APIMethods_APIBuilder.scala
@@ -16,7 +16,7 @@ import scala.collection.immutable.Nil
import scala.collection.mutable.ArrayBuffer
trait APIMethods_APIBuilder { self: RestHelper =>
val ImplementationsBuilderAPI = new Object() {
- val apiVersion: ApiVersion = ApiVersion.apiBuilder
+ val apiVersion = ApiVersion.apiBuilder
val resourceDocs = ArrayBuffer[ResourceDoc]()
val apiRelations = ArrayBuffer[ApiRelation]()
val codeContext = CodeContext(resourceDocs, apiRelations)
diff --git a/src/main/scala/code/api/util/APIUtil.scala b/src/main/scala/code/api/util/APIUtil.scala
index 2bf6b90e9..9646f4596 100644
--- a/src/main/scala/code/api/util/APIUtil.scala
+++ b/src/main/scala/code/api/util/APIUtil.scala
@@ -39,7 +39,6 @@ import code.api.Constant._
import code.api.JSONFactoryGateway.PayloadOfJwtJSON
import code.api.OAuthHandshake._
import code.api.UKOpenBanking.v2_0_0.OBP_UKOpenBanking_200
-import code.api.UKOpenBanking.v3_1_0.OBP_UKOpenBanking_310
import code.api.berlin.group.v1.OBP_BERLIN_GROUP_1
import code.api.berlin.group.v1_3.OBP_BERLIN_GROUP_1_3
import code.api.oauth1a.Arithmetics
@@ -1031,7 +1030,7 @@ object APIUtil extends MdcLoggable {
// Used to document the API calls
case class ResourceDoc(
partialFunction : OBPEndpoint, // PartialFunction[Req, Box[User] => Box[JsonResponse]],
- implementedInApiVersion: ApiVersion, // TODO: Use ApiVersion enumeration instead of string
+ implementedInApiVersion: ScannedApiVersion, // TODO: Use ApiVersion enumeration instead of string
partialFunctionName: String, // The string name of the partial function that implements this resource. Could use it to link to the source code that implements the call
requestVerb: String, // GET, POST etc. TODO: Constrain to GET, POST etc.
requestUrl: String, // The URL. THIS GETS MODIFIED TO include the implemented in prefix e.g. /obp/vX.X). Starts with / No trailing slash.
@@ -1656,9 +1655,6 @@ Returns a string showed to the developer
case ApiVersion.v2_2_0 => LiftRules.statelessDispatch.append(v2_2_0.OBPAPI2_2_0)
case ApiVersion.v3_0_0 => LiftRules.statelessDispatch.append(v3_0_0.OBPAPI3_0_0)
case ApiVersion.v3_1_0 => LiftRules.statelessDispatch.append(v3_1_0.OBPAPI3_1_0)
- case ApiVersion.`berlinGroupV1` => LiftRules.statelessDispatch.append(OBP_BERLIN_GROUP_1)
- case ApiVersion.`ukOpenBankingV200` => LiftRules.statelessDispatch.append(OBP_UKOpenBanking_200)
- case ApiVersion.`ukOpenBankingV310` => LiftRules.statelessDispatch.append(OBP_UKOpenBanking_310)
case ApiVersion.`apiBuilder` => LiftRules.statelessDispatch.append(OBP_APIBuilder)
case version: ScannedApiVersion => LiftRules.statelessDispatch.append(ScannedApis.versionMapScannedApis(version))
case _ => logger.info(s"There is no ${version.toString}")
diff --git a/src/main/scala/code/api/util/ApiVersion.scala b/src/main/scala/code/api/util/ApiVersion.scala
index 71feb85e7..efb8a5e9f 100644
--- a/src/main/scala/code/api/util/ApiVersion.scala
+++ b/src/main/scala/code/api/util/ApiVersion.scala
@@ -1,5 +1,7 @@
package code.api.util
+import code.api.Constant.ApiPathZero
+
sealed trait ApiVersion {
def dottedApiVersion() : String = this.toString.replace("_", ".").replace("v","")
def vDottedApiVersion() : String = this.toString.replace("_", ".")
@@ -11,87 +13,49 @@ sealed trait ApiVersion {
}
/**
- * this version object created according swagger file info.title and info.version
- * @param urlPrefix api url prefix part, not include "/"
- * @param appName parsed from swagger file info.title, is appName variable in swagger-codegen
- * @param appVersion parsed from swagger file infor.version, is version variable in wagger-codegen
+ * We need more fields for the versions. now, we support many standards: UKOpenBanking, BerlinGroup.
+ * For each standard, we need its own `fullyQualifiedVersion`
+ * @param urlPrefix : eg: `obp` or 'berlin`-group``
+ * @param apiStandard eg: obp or `BG` or `UK`
+ * @param apiShortVersion eg: `v1.2.1` or `v2.0`
+ *
*/
-case class ScannedApiVersion(urlPrefix: String, appName: String, appVersion: String) extends ApiVersion{
- override def toString() = {
- // extract number part of version, e.g "here is version 1.3 final" -> "1.3"
- val version = appVersion.replaceAll(".*?(\\b\\d+\\..+?\\b).*", "$1")
- // extract name from appName, e.g: "The customer api" -> "The_customer"
- val name = appName.replaceFirst("(?i)api", "").trim.replaceAll("\\s+", "_")
- //TODO the version name role will cooperate with API-Explorer, current name role is temporary.
- // avoid starts with _ or end with _, and avoid v_ e.g: v_1.3
- (name+"_"+version).replaceAll("^_|_$|(v)_", "$1")
- }
+case class ScannedApiVersion(urlPrefix: String, apiStandard: String, apiShortVersion: String) extends ApiVersion{
+
+ val fullyQualifiedVersion = s"${apiStandard.toUpperCase}$apiShortVersion"
+
+ override def toString() = apiShortVersion
}
object ApiVersion {
- case class V1_0() extends ApiVersion
- lazy val v1_0 = V1_0()
- case class V1_1() extends ApiVersion
- lazy val v1_1 = V1_1()
- case class V1_2() extends ApiVersion
- lazy val v1_2 = V1_2()
- case class V1_2_1() extends ApiVersion
- lazy val v1_2_1 = V1_2_1()
- case class V1_3_0() extends ApiVersion
- lazy val v1_3_0 = V1_3_0()
- case class V1_4_0() extends ApiVersion
- lazy val v1_4_0 = V1_4_0()
- case class V2_0_0() extends ApiVersion
- lazy val v2_0_0 = V2_0_0()
- case class V2_1_0() extends ApiVersion
- lazy val v2_1_0 = V2_1_0()
- case class V2_2_0() extends ApiVersion
- lazy val v2_2_0 = V2_2_0()
- case class V3_0_0() extends ApiVersion
- lazy val v3_0_0 = V3_0_0()
- case class V3_3_0() extends ApiVersion
- lazy val v3_1_0 = V3_1_0()
- case class V3_1_0() extends ApiVersion
- lazy val v3_3_0 = V3_3_0()
+
+ //Special versions
case class ImporterApi() extends ApiVersion
lazy val importerApi = ImporterApi()
case class AccountsApi() extends ApiVersion
lazy val accountsApi = AccountsApi()
case class BankMockApi() extends ApiVersion
lazy val bankMockApi = BankMockApi()
- case class BerlinGroupV1() extends ApiVersion {
- override def toString() = "v1"
- //override def toString() = "berlin_group_v1" // TODO don't want to confuse with OBP
- }
- lazy val berlinGroupV1 = BerlinGroupV1()
- case class UKOpenBankingV200() extends ApiVersion {
- override def toString() = "v2_0"
- // override def toString() = "uk_v2.0.0" // TODO don't want to confuse with OBP
- }
- lazy val ukOpenBankingV200 = UKOpenBankingV200()
-
- case class UKOpenBankingV310() extends ApiVersion {
- override def toString() = "v3_1"
- // override def toString() = "uk_v2.0.0" // TODO don't want to confuse with OBP
- }
- lazy val ukOpenBankingV310 = UKOpenBankingV310()
+ //OBP Standard
+ val v1_2_1 = ScannedApiVersion(ApiPathZero,"obp","v1.2.1")
+ val v1_3_0 = ScannedApiVersion(ApiPathZero,"obp","v1.3.0")
+ val v1_4_0 = ScannedApiVersion(ApiPathZero,"obp","v1.4.0")
+ val v2_0_0 = ScannedApiVersion(ApiPathZero,"obp","v2.0.0")
+ val v2_1_0 = ScannedApiVersion(ApiPathZero,"obp","v2.1.0")
+ val v2_2_0 = ScannedApiVersion(ApiPathZero,"obp","v2.2.0")
+ val v3_0_0 = ScannedApiVersion(ApiPathZero,"obp","v3.0.0")
+ val v3_1_0 = ScannedApiVersion(ApiPathZero,"obp","v3.1.0")
+
case class OpenIdConnect1() extends ApiVersion
lazy val openIdConnect1 = OpenIdConnect1()
case class Sandbox() extends ApiVersion
lazy val sandbox = Sandbox()
- case class APIBuilder() extends ApiVersion {
- override def toString() = "b1"
- //override def toString() = "api_builder_v1" // TODO don't want to confuse with OBP
- }
- lazy val apiBuilder = APIBuilder()
-
+ lazy val apiBuilder = ScannedApiVersion("api-builder","obp","b1")
+ val scabbedApis = ScannedApis.versionMapScannedApis.keysIterator.toList
private val versions =
-// v1_0 ::
-// v1_1 ::
-// v1_2 ::
v1_2_1 ::
v1_3_0 ::
v1_4_0 ::
@@ -100,20 +64,35 @@ object ApiVersion {
v2_2_0 ::
v3_0_0 ::
v3_1_0 ::
- v3_3_0 ::
importerApi ::
accountsApi ::
bankMockApi ::
openIdConnect1 ::
sandbox ::
- berlinGroupV1 ::
- ukOpenBankingV200 ::
- ukOpenBankingV310 ::
apiBuilder::
- ScannedApis.versionMapScannedApis.keysIterator.toList // all the scanned version
+ scabbedApis
def valueOf(value: String): ApiVersion = {
- versions.filter(_.vDottedApiVersion == value) match {
+
+ //This `match` is used for compatibility. Before we do not take care for the BerlinGroup and UKOpenBanking versions carefully.
+ // eg: v1 ==BGv1, v1.3 ==BGv1.3, v2.0 == UKv2.0
+ // Now, we use the BerlinGroup standard version in OBP. But we need still make sure old version system is working.
+ val compatibilityVersion = value match {
+ case v1_2_1.fullyQualifiedVersion => v1_2_1.apiShortVersion
+ case v1_3_0.fullyQualifiedVersion => v1_3_0.apiShortVersion
+ case v1_4_0.fullyQualifiedVersion => v1_4_0.apiShortVersion
+ case v2_0_0.fullyQualifiedVersion => v2_0_0.apiShortVersion
+ case v2_1_0.fullyQualifiedVersion => v2_1_0.apiShortVersion
+ case v2_2_0.fullyQualifiedVersion => v2_2_0.apiShortVersion
+ case v3_0_0.fullyQualifiedVersion => v3_0_0.apiShortVersion
+ case v3_1_0.fullyQualifiedVersion => v3_1_0.apiShortVersion
+ case apiBuilder.fullyQualifiedVersion => apiBuilder.apiShortVersion
+ case version if(scabbedApis.map(_.fullyQualifiedVersion).contains(version))
+ =>scabbedApis.filter(_.fullyQualifiedVersion==version).head.apiShortVersion
+ case _=> value
+ }
+
+ versions.filter(_.vDottedApiVersion == compatibilityVersion) match {
case x :: Nil => x // We find exactly one Role
case x :: _ => throw new Exception("Duplicated version: " + x) // We find more than one Role
case _ => throw new IllegalArgumentException("Incorrect ApiVersion value: " + value) // There is no Role
diff --git a/src/main/scala/code/api/v1_2_1/APIMethods121.scala b/src/main/scala/code/api/v1_2_1/APIMethods121.scala
index 88d89042c..aa0e27581 100644
--- a/src/main/scala/code/api/v1_2_1/APIMethods121.scala
+++ b/src/main/scala/code/api/v1_2_1/APIMethods121.scala
@@ -107,7 +107,7 @@ trait APIMethods121 {
val resourceDocs = ArrayBuffer[ResourceDoc]()
val emptyObjectJson = EmptyClassJson()
- val apiVersion : ApiVersion = ApiVersion.v1_2_1 // was String "1_2_1"
+ val apiVersion = ApiVersion.v1_2_1 // was String "1_2_1"
val apiVersionStatus : String = "STABLE"
resourceDocs += ResourceDoc(
diff --git a/src/main/scala/code/api/v1_3_0/APIMethods130.scala b/src/main/scala/code/api/v1_3_0/APIMethods130.scala
index 8287fd6bb..7ff86ec30 100644
--- a/src/main/scala/code/api/v1_3_0/APIMethods130.scala
+++ b/src/main/scala/code/api/v1_3_0/APIMethods130.scala
@@ -21,7 +21,7 @@ trait APIMethods130 {
val resourceDocs = ArrayBuffer[ResourceDoc]()
val emptyObjectJson = EmptyClassJson()
- val apiVersion : ApiVersion = ApiVersion.v1_3_0 // was String "1_3_0"
+ val apiVersion = ApiVersion.v1_3_0 // was String "1_3_0"
resourceDocs += ResourceDoc(
diff --git a/src/main/scala/code/api/v1_4_0/APIMethods140.scala b/src/main/scala/code/api/v1_4_0/APIMethods140.scala
index 5f1ad0b41..1ebdccd4e 100644
--- a/src/main/scala/code/api/v1_4_0/APIMethods140.scala
+++ b/src/main/scala/code/api/v1_4_0/APIMethods140.scala
@@ -54,7 +54,7 @@ trait APIMethods140 extends MdcLoggable with APIMethods130 with APIMethods121{
val resourceDocs = ArrayBuffer[ResourceDoc]()
val emptyObjectJson = EmptyClassJson()
- val apiVersion : ApiVersion = ApiVersion.v1_4_0 // was noV i.e. "1_4_0"
+ val apiVersion = ApiVersion.v1_4_0 // was noV i.e. "1_4_0"
val apiVersionStatus : String = "STABLE"
resourceDocs += ResourceDoc(
diff --git a/src/main/scala/code/api/v1_4_0/JSONFactory1_4_0.scala b/src/main/scala/code/api/v1_4_0/JSONFactory1_4_0.scala
index 24d52ab77..f2ead4c13 100644
--- a/src/main/scala/code/api/v1_4_0/JSONFactory1_4_0.scala
+++ b/src/main/scala/code/api/v1_4_0/JSONFactory1_4_0.scala
@@ -365,7 +365,7 @@ object JSONFactory1_4_0 {
// We return html rather than markdown to the consumer so they don't have to bother with these questions.
ResourceDocJson(
- operation_id = s"v${rd.implementedInApiVersion.toString}-${rd.partialFunctionName.toString}",
+ operation_id = s"${rd.implementedInApiVersion.fullyQualifiedVersion}-${rd.partialFunctionName.toString}",
request_verb = rd.requestVerb,
request_url = rd.requestUrl,
summary = rd.summary,
diff --git a/src/main/scala/code/api/v2_0_0/APIMethods200.scala b/src/main/scala/code/api/v2_0_0/APIMethods200.scala
index aafeb450a..3a0a21605 100644
--- a/src/main/scala/code/api/v2_0_0/APIMethods200.scala
+++ b/src/main/scala/code/api/v2_0_0/APIMethods200.scala
@@ -119,7 +119,7 @@ trait APIMethods200 {
val apiRelations = ArrayBuffer[ApiRelation]()
val emptyObjectJson = EmptyClassJson()
- val apiVersion: ApiVersion = ApiVersion.v2_0_0 // was String "2_0_0"
+ val apiVersion = ApiVersion.v2_0_0 // was String "2_0_0"
val codeContext = CodeContext(resourceDocs, apiRelations)
diff --git a/src/main/scala/code/api/v2_1_0/APIMethods210.scala b/src/main/scala/code/api/v2_1_0/APIMethods210.scala
index 3860cd370..d7aa622f9 100644
--- a/src/main/scala/code/api/v2_1_0/APIMethods210.scala
+++ b/src/main/scala/code/api/v2_1_0/APIMethods210.scala
@@ -68,7 +68,7 @@ trait APIMethods210 {
val apiRelations = ArrayBuffer[ApiRelation]()
val emptyObjectJson = EmptyClassJson()
- val apiVersion: util.ApiVersion = util.ApiVersion.v2_1_0 // was String "2_1_0"
+ val apiVersion = util.ApiVersion.v2_1_0 // was String "2_1_0"
val codeContext = CodeContext(resourceDocs, apiRelations)
diff --git a/src/main/scala/code/api/v2_2_0/APIMethods220.scala b/src/main/scala/code/api/v2_2_0/APIMethods220.scala
index 025c3652c..6a29fc8be 100644
--- a/src/main/scala/code/api/v2_2_0/APIMethods220.scala
+++ b/src/main/scala/code/api/v2_2_0/APIMethods220.scala
@@ -43,7 +43,7 @@ trait APIMethods220 {
val apiRelations = ArrayBuffer[ApiRelation]()
val emptyObjectJson = EmptyClassJson()
- val implementedInApiVersion: ApiVersion = ApiVersion.v2_2_0 // was String "2_2_0"
+ val implementedInApiVersion = ApiVersion.v2_2_0 // was String "2_2_0"
val codeContext = CodeContext(resourceDocs, apiRelations)
diff --git a/src/main/scala/code/api/v3_0_0/APIMethods300.scala b/src/main/scala/code/api/v3_0_0/APIMethods300.scala
index efe45c531..2e8cb830d 100644
--- a/src/main/scala/code/api/v3_0_0/APIMethods300.scala
+++ b/src/main/scala/code/api/v3_0_0/APIMethods300.scala
@@ -49,7 +49,7 @@ trait APIMethods300 {
val Implementations3_0_0 = new Object() {
- val implementedInApiVersion: ApiVersion = ApiVersion.v3_0_0 // was noV
+ val implementedInApiVersion = ApiVersion.v3_0_0 // was noV
val resourceDocs = ArrayBuffer[ResourceDoc]()
val apiRelations = ArrayBuffer[ApiRelation]()
diff --git a/src/main/scala/code/api/v3_0_0/custom/APIMethodsCustom300.scala b/src/main/scala/code/api/v3_0_0/custom/APIMethodsCustom300.scala
index 2513e523f..b2999f3ad 100644
--- a/src/main/scala/code/api/v3_0_0/custom/APIMethodsCustom300.scala
+++ b/src/main/scala/code/api/v3_0_0/custom/APIMethodsCustom300.scala
@@ -14,7 +14,7 @@ trait CustomAPIMethods300 {
def endpointsOfCustom3_0_0 = createTransactionRequestTransferToReferenceAccountCustom :: Nil
- val apiVersion: ApiVersion = ApiVersion.v3_0_0
+ val apiVersion = ApiVersion.v3_0_0
val resourceDocs = ArrayBuffer[ResourceDoc]()
val apiRelations = ArrayBuffer[ApiRelation]()
val codeContext = CodeContext(resourceDocs, apiRelations)
diff --git a/src/main/scala/code/api/v3_1_0/APIMethods310.scala b/src/main/scala/code/api/v3_1_0/APIMethods310.scala
index 6d12cc306..c89045fcb 100644
--- a/src/main/scala/code/api/v3_1_0/APIMethods310.scala
+++ b/src/main/scala/code/api/v3_1_0/APIMethods310.scala
@@ -48,7 +48,7 @@ trait APIMethods310 {
class Implementations310 {
- val implementedInApiVersion: ApiVersion = ApiVersion.v3_1_0
+ val implementedInApiVersion = ApiVersion.v3_1_0
val resourceDocs = ArrayBuffer[ResourceDoc]()
val apiRelations = ArrayBuffer[ApiRelation]()