Skip to content

Commit

Permalink
SASS-8272: DES clean up and fix 1938 API (#49)
Browse files Browse the repository at this point in the history
Fix API 1938, Clean up DES API connectors and references and upgrade dependencies
  • Loading branch information
arunkumar461 authored May 21, 2024
1 parent ea25df0 commit b51ce7c
Show file tree
Hide file tree
Showing 15 changed files with 8 additions and 433 deletions.
4 changes: 0 additions & 4 deletions app/config/AppConfig.scala
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,4 @@ class AppConfig @Inject()(servicesConfig: ServicesConfig) {
lazy val useEncryption: Boolean = servicesConfig.getBoolean("useEncryption")

def authorisationTokenFor(apiVersion: String): String = servicesConfig.getString(authorisationTokenKey + s".$apiVersion")

lazy val desBaseUrl: String = servicesConfig.baseUrl(serviceName = "des")
lazy val desEnvironment: String = servicesConfig.getString(key = "microservice.services.des.environment")
lazy val desAuthorisationToken: String = servicesConfig.getString(key = "microservice.services.des.authorisation-token")
}
45 changes: 0 additions & 45 deletions app/connectors/DESConnector.scala

This file was deleted.

55 changes: 0 additions & 55 deletions app/connectors/DataExchangeServiceConnector.scala

This file was deleted.

8 changes: 2 additions & 6 deletions app/connectors/IntegrationFrameworkConnector.scala
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ class IntegrationFrameworkConnector @Inject()(httpClient: HttpClient,

def getAllStateBenefitsData(taxYear: Int, nino: String)
(implicit hc: HeaderCarrier): Future[Either[ApiError, Option[AllStateBenefitsData]]] = {
val (url, apiVersion) = if (shouldUse2324(taxYear)) {
(new URL(s"$baseUrl/income-tax/income/state-benefits/23-24/$nino"), getApi2324Version)
val (url, apiVersion) = if (isAfter2324Api(taxYear)) {
(new URL(s"$baseUrl/income-tax/income/state-benefits/${asTys(taxYear)}/$nino"), getApi2324Version)
} else {
(new URL(s"$baseUrl/income-tax/income/state-benefits/$nino/${toTaxYearParam(taxYear)}"), getApiVersion)
}
Expand Down Expand Up @@ -209,10 +209,6 @@ class IntegrationFrameworkConnector @Inject()(httpClient: HttpClient,
s"${taxYear - 1}-${taxYear.toString takeRight 2}"
}

private def shouldUse2324(taxYear: Int): Boolean = {
taxYear == 2024
}

private def isAfter2324Api(taxYear: Int): Boolean = {
taxYear >= 2024
}
Expand Down
38 changes: 0 additions & 38 deletions app/services/DESService.scala

This file was deleted.

8 changes: 0 additions & 8 deletions conf/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,6 @@ microservice {
port = 8500
}

des {
host = "localhost"
environment = "test"
authorisation-token = "secret"
port = 9303
#This is the port for the income-tax-submission-stub
}

integration-framework {
host = "localhost"
environment = "test"
Expand Down
67 changes: 0 additions & 67 deletions it/test/connectors/DataExchangeServiceConnectorISpec.scala

This file was deleted.

4 changes: 2 additions & 2 deletions project/AppDependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import sbt.*

object AppDependencies {

private val bootstrapBackendPlay30Version = "8.5.0"
private val hmrcMongoPlay30Version = "1.7.0"
private val bootstrapBackendPlay30Version = "8.6.0"
private val hmrcMongoPlay30Version = "1.9.0"

val compile: Seq[ModuleID] = Seq(
"uk.gov.hmrc" %% "bootstrap-backend-play-30" % bootstrapBackendPlay30Version,
Expand Down
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ ThisBuild / libraryDependencySchemes ++= Seq(
"org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always
)

addSbtPlugin("uk.gov.hmrc" % "sbt-auto-build" % "3.20.0")
addSbtPlugin("uk.gov.hmrc" % "sbt-auto-build" % "3.21.0")
addSbtPlugin("uk.gov.hmrc" % "sbt-distributables" % "2.5.0")
addSbtPlugin("org.playframework" % "sbt-plugin" % "3.0.2")
addSbtPlugin("org.playframework" % "sbt-plugin" % "3.0.3")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.9")
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0")
70 changes: 0 additions & 70 deletions test/connectors/DESConnectorSpec.scala

This file was deleted.

Loading

0 comments on commit b51ce7c

Please sign in to comment.