-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #76 from hmrc/APIS-4758
APIS-4758 - Add PPNS Topic field type
- Loading branch information
Showing
42 changed files
with
819 additions
and
350 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
acceptance/uk/gov/hmrc/apisubscriptionfields/controller/Helper.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package uk.gov.hmrc.apisubscriptionfields.controller | ||
|
||
import uk.gov.hmrc.apisubscriptionfields.model.{Types, FieldDefinition} | ||
import cats.data.{NonEmptyList => NEL} | ||
|
||
trait Helper { | ||
def makeSubscriptionFieldsRequest(fields: Types.Fields): SubscriptionFieldsRequest = SubscriptionFieldsRequest(fields) | ||
def makeFieldDefinitionsRequest(definitions: NEL[FieldDefinition]): FieldDefinitionsRequest = FieldDefinitionsRequest(definitions) | ||
} | ||
|
||
object Helper extends Helper |
34 changes: 34 additions & 0 deletions
34
app/uk/gov/hmrc/apisubscriptionfields/config/ApplicationConfig.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright 2020 HM Revenue & Customs | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package uk.gov.hmrc.apisubscriptionfields.config | ||
|
||
import com.google.inject.{ImplementedBy, Inject, Singleton} | ||
import play.api.Configuration | ||
|
||
@ImplementedBy(classOf[ApplicationConfigImpl]) | ||
trait ApplicationConfig { | ||
def pushPullNotificationServiceURL: String | ||
} | ||
|
||
@Singleton | ||
class ApplicationConfigImpl @Inject()(config: Configuration) extends ApplicationConfig { | ||
private val HOCON = config.underlying | ||
|
||
// Moving away from complex layers configurations | ||
val pushPullNotificationServiceURL = HOCON.getString("microservice.services.push-pull-notification.uri") | ||
} | ||
|
33 changes: 33 additions & 0 deletions
33
app/uk/gov/hmrc/apisubscriptionfields/connector/JsonFormatters.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright 2020 HM Revenue & Customs | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package uk.gov.hmrc.apisubscriptionfields.connector | ||
|
||
import play.api.libs.json._ | ||
import uk.gov.hmrc.apisubscriptionfields.model.{ClientId, TopicId} | ||
|
||
trait JsonFormatters { | ||
implicit val clientIdJF = Json.valueFormat[ClientId] | ||
implicit val topicIdJF = Json.valueFormat[TopicId] | ||
|
||
implicit val createTopicRequestJF = Json.format[CreateTopicRequest] | ||
implicit val createTopicResponseJF = Json.format[CreateTopicResponse] | ||
implicit val subscribersRequestJF = Json.format[SubscribersRequest] | ||
implicit val updateSubscribersRequestJF = Json.format[UpdateSubscribersRequest] | ||
implicit val updateSubscribersResponseJF = Json.format[UpdateSubscribersResponse] | ||
} | ||
|
||
object JsonFormatters extends JsonFormatters |
Oops, something went wrong.