Skip to content
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,18 @@ object SwaggerDefinitionsJSON {

lazy val regulatedEntitiesJsonV510: RegulatedEntitiesJsonV510 = RegulatedEntitiesJsonV510(List(regulatedEntityJsonV510))
lazy val regulatedEntityJsonV510: RegulatedEntityJsonV510 = RegulatedEntityJsonV510(
entity_id = "0af807d7-3c39-43ef-9712-82bcfde1b9ca",
certificate_authority_ca_owner_id = "CY_CBC",
entity_certificate_public_key = "-----BEGIN CERTIFICATE-----MIICsjCCAZqgAwIBAgIGAYwQ62R0MA0GCSqGSIb3DQEBCwUAMBoxGDAWBgNVBAMMD2FwcC5leGFtcGxlLmNvbTAeFw0yMzExMjcxMzE1MTFaFw0yNTExMjYxMzE1MTFaMBoxGDAWBgNVBAMMD2FwcC5leGFtcGxlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK9WIodZHWzKyCcf9YfWEhPURbfO6zKuMqzHN27GdqHsVVEGxP4F/J4mso+0ENcRr6ur4u81iREaVdCc40rHDHVJNEtniD8Icbz7tcsqAewIVhc/q6WXGqImJpCq7hA0m247dDsaZT0lb/MVBiMoJxDEmAE/GYYnWTEn84R35WhJsMvuQ7QmLvNg6RkChY6POCT/YKe9NKwa1NqI1U+oA5RFzAaFtytvZCE3jtp+aR0brL7qaGfgxm6B7dEpGyhg0NcVCV7xMQNq2JxZTVdAr6lcsRGaAFulakmW3aNnmK+L35Wu8uW+OxNxwUuC6f3b4FVBa276FMuUTRfu7gc+k6kCAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAAU5CjEyAoyTn7PgFpQD48ZNPuUsEQ19gzYgJvHMzFIoZ7jKBodjO5mCzWBcR7A4mpeAsdyiNBl2sTiZscSnNqxk61jVzP5Ba1D7XtOjjr7+3iqowrThj6BY40QqhYh/6BSY9fDzVZQiHnvlo6ZUM5kUK6OavZOovKlp5DIl5sGqoP0qAJnpQ4nhB2WVVsKfPlOXc+2KSsbJ23g9l8zaTMr+X0umlvfEKqyEl1Fa2L1dO0y/KFQ+ILmxcZLpRdq1hRAjd0quq9qGC8ucXhRWDgM4hslVpau0da68g0aItWNez3mc5lB82b3dcZpFMzO41bgw7gvw10AvvTfQDqEYIuQ==-----END CERTIFICATE-----",
entity_name = "EXAMPLE COMPANY LTD",
entity_code = "PSD_PICY_CBC!12345",
entity_type = "PSD_PI",
entity_address = "EXAMPLE COMPANY LTD, 5 SOME STREET",
entity_town_city = "SOME CITY",
entity_post_code = "1060",
entity_country = "CY",
entity_web_site = "www.example.com",
services = json.parse("""[{"CY":["PS_010","PS_020","PS_03C","PS_04C"]}]"""),
entity_id = entityIdExample.value,
certificate_authority_ca_owner_id = certificateAuthorityCaOwnerIdExample.value,
entity_certificate_public_key = entityCertificatePublicKeyExample.value,
entity_name = entityNameExample.value,
entity_code = entityCodeExample.value,
entity_type = entityTypeExample.value,
entity_address = entityAddressExample.value,
entity_town_city = entityTownCityExample.value,
entity_post_code = entityPostCodeExample.value,
entity_country = entityCountryExample.value,
entity_web_site = entityWebSiteExample.value,
services = json.parse(servicesExample.value),
attributes = Some(List(RegulatedEntityAttributeSimple(
attributeType=attributeTypeExample.value,
name=attributeNameExample.value,
Expand All @@ -69,17 +69,17 @@ object SwaggerDefinitionsJSON {
)

lazy val regulatedEntityPostJsonV510: RegulatedEntityPostJsonV510 = RegulatedEntityPostJsonV510(
certificate_authority_ca_owner_id = "CY_CBC",
entity_certificate_public_key = "-----BEGIN CERTIFICATE-----MIICsjCCAZqgAwIBAgIGAYwQ62R0MA0GCSqGSIb3DQEBCwUAMBoxGDAWBgNVBAMMD2FwcC5leGFtcGxlLmNvbTAeFw0yMzExMjcxMzE1MTFaFw0yNTExMjYxMzE1MTFaMBoxGDAWBgNVBAMMD2FwcC5leGFtcGxlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK9WIodZHWzKyCcf9YfWEhPURbfO6zKuMqzHN27GdqHsVVEGxP4F/J4mso+0ENcRr6ur4u81iREaVdCc40rHDHVJNEtniD8Icbz7tcsqAewIVhc/q6WXGqImJpCq7hA0m247dDsaZT0lb/MVBiMoJxDEmAE/GYYnWTEn84R35WhJsMvuQ7QmLvNg6RkChY6POCT/YKe9NKwa1NqI1U+oA5RFzAaFtytvZCE3jtp+aR0brL7qaGfgxm6B7dEpGyhg0NcVCV7xMQNq2JxZTVdAr6lcsRGaAFulakmW3aNnmK+L35Wu8uW+OxNxwUuC6f3b4FVBa276FMuUTRfu7gc+k6kCAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAAU5CjEyAoyTn7PgFpQD48ZNPuUsEQ19gzYgJvHMzFIoZ7jKBodjO5mCzWBcR7A4mpeAsdyiNBl2sTiZscSnNqxk61jVzP5Ba1D7XtOjjr7+3iqowrThj6BY40QqhYh/6BSY9fDzVZQiHnvlo6ZUM5kUK6OavZOovKlp5DIl5sGqoP0qAJnpQ4nhB2WVVsKfPlOXc+2KSsbJ23g9l8zaTMr+X0umlvfEKqyEl1Fa2L1dO0y/KFQ+ILmxcZLpRdq1hRAjd0quq9qGC8ucXhRWDgM4hslVpau0da68g0aItWNez3mc5lB82b3dcZpFMzO41bgw7gvw10AvvTfQDqEYIuQ==-----END CERTIFICATE-----",
entity_name = "EXAMPLE COMPANY LTD",
entity_code = "PSD_PICY_CBC!12345",
entity_type = "PSD_PI",
entity_address = "EXAMPLE COMPANY LTD, 5 SOME STREET",
entity_town_city = "SOME CITY",
entity_post_code = "1060",
entity_country = "CY",
entity_web_site = "www.example.com",
services = json.parse("""[{"CY":["PS_010","PS_020","PS_03C","PS_04C"]}]"""),
certificate_authority_ca_owner_id = certificateAuthorityCaOwnerIdExample.value,
entity_certificate_public_key = entityCertificatePublicKeyExample.value,
entity_name = entityNameExample.value,
entity_code = entityCodeExample.value,
entity_type = entityTypeExample.value,
entity_address = entityAddressExample.value,
entity_town_city = entityTownCityExample.value,
entity_post_code = entityPostCodeExample.value,
entity_country = entityCountryExample.value,
entity_web_site = entityWebSiteExample.value,
services = json.parse(servicesExample.value),
attributes = Some(List(RegulatedEntityAttributeSimple(
attributeType=attributeTypeExample.value,
name=attributeNameExample.value,
Expand Down Expand Up @@ -5645,11 +5645,31 @@ object SwaggerDefinitionsJSON {
legal_name = legalNameExample.value,
agent_number = agentNumberExample.value
)

lazy val minimalAgentsJsonV510 = MinimalAgentsJsonV510(
agents = List(minimalAgentJsonV510)
)

lazy val regulatedEntityAttributeRequestJsonV510 = RegulatedEntityAttributeRequestJsonV510(
name = regulatedEntityAttributeNameExample.value,
attribute_type = regulatedEntityAttributeTypeExample.value,
value = regulatedEntityAttributeValueExample.value,
is_active = Some(isActiveExample.value.toBoolean)
)

lazy val regulatedEntityAttributeResponseJsonV510 = RegulatedEntityAttributeResponseJsonV510(
regulated_entity_id = entityIdExample.value,
regulated_entity_attribute_id = regulatedEntityAttributeIdExample.value,
name = nameExample.value,
attribute_type = typeExample.value,
value = valueExample.value,
is_active = Some(activeExample.value.toBoolean)
)

lazy val regulatedEntityAttributesJsonV510 = RegulatedEntityAttributesJsonV510(
List(regulatedEntityAttributeResponseJsonV510)
)

//The common error or success format.
//Just some helper format to use in Json
case class NotSupportedYet()
Expand Down
15 changes: 15 additions & 0 deletions obp-api/src/main/scala/code/api/util/ApiRole.scala
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,21 @@ object ApiRole extends MdcLoggable{
case class CanDeleteSystemView(requiresBankId: Boolean = false) extends ApiRole
lazy val canDeleteSystemView = CanDeleteSystemView()

case class CanGetRegulatedEntityAttribute(requiresBankId: Boolean = false) extends ApiRole
lazy val canGetRegulatedEntityAttribute = CanGetRegulatedEntityAttribute()

case class CanGetRegulatedEntityAttributes(requiresBankId: Boolean = false) extends ApiRole
lazy val canGetRegulatedEntityAttributes = CanGetRegulatedEntityAttributes()

case class CanCreateRegulatedEntityAttribute(requiresBankId: Boolean = false) extends ApiRole
lazy val canCreateRegulatedEntityAttribute = CanCreateRegulatedEntityAttribute()

case class CanUpdateRegulatedEntityAttribute(requiresBankId: Boolean = false) extends ApiRole
lazy val canUpdateRegulatedEntityAttribute = CanUpdateRegulatedEntityAttribute()

case class CanDeleteRegulatedEntityAttribute(requiresBankId: Boolean = false) extends ApiRole
lazy val canDeleteRegulatedEntityAttribute = CanDeleteRegulatedEntityAttribute()


case class CanGetMethodRoutings(requiresBankId: Boolean = false) extends ApiRole
lazy val canGetMethodRoutings = CanGetMethodRoutings()
Expand Down
2 changes: 1 addition & 1 deletion obp-api/src/main/scala/code/api/util/ErrorMessages.scala
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ object ErrorMessages {
val CustomerNumberAlreadyExists = "OBP-30006: Customer Number already exists. Please specify a different value for BANK_ID or CUSTOMER_NUMBER."
val CustomerAlreadyExistsForUser = "OBP-30007: The User is already linked to a Customer at the bank specified by BANK_ID"
val UserCustomerLinksNotFoundForUser = "OBP-30008: User Customer Link not found by USER_ID"
val AtmNotFoundByAtmId = "OBP-30009: ATM not found. Please specify a valid value for ATM_ID."
val AtmNotFoundByAtmId = "OBP-30009: ATM not found. ATMPlease specify a valid value for ATM_ID."
val BranchNotFoundByBranchId = "OBP-300010: Branch not found. Please specify a valid value for BRANCH_ID. Or License may not be set. meta.license.id and meta.license.name can not be empty"
val ProductNotFoundByProductCode = "OBP-30011: Product not found. Please specify a valid value for PRODUCT_CODE."
val CounterpartyNotFoundByIban = "OBP-30012: Counterparty not found. Please specify a valid value for IBAN."
Expand Down
Loading