generated from pagopa/template-java-spring-microservice
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[VAS-800] feat: Add new get creditor institution name API (#38)
* [VAS-800] Added new api to retrieved creditor institution business names. Do some refactor and added javadoc * [VAS-800] Added unit tests and fixed test packages * [VAS-800] updated openapi * [VAS-800] add constraint on body size and updated openapi * [VAS-800] updated api definition, unit test and openapi --------- Co-authored-by: giomella <[email protected]>
- Loading branch information
1 parent
1a7a7e8
commit 720d6f2
Showing
28 changed files
with
839 additions
and
508 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
23 changes: 23 additions & 0 deletions
23
...t/gov/pagopa/apiconfig/selfcareintegration/mapper/ConvertPaToCreditorInstitutionInfo.java
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,23 @@ | ||
package it.gov.pagopa.apiconfig.selfcareintegration.mapper; | ||
|
||
import it.gov.pagopa.apiconfig.selfcareintegration.model.creditorinstitution.CreditorInstitutionInfo; | ||
import it.gov.pagopa.apiconfig.starter.entity.Pa; | ||
import org.modelmapper.Converter; | ||
import org.modelmapper.spi.MappingContext; | ||
|
||
import javax.validation.Valid; | ||
|
||
/** | ||
* Converter class, define how to map the {@link Pa} entity into the {@link CreditorInstitutionInfo} model | ||
*/ | ||
public class ConvertPaToCreditorInstitutionInfo implements Converter<Pa, CreditorInstitutionInfo> { | ||
|
||
@Override | ||
public CreditorInstitutionInfo convert(MappingContext<Pa, CreditorInstitutionInfo> context) { | ||
@Valid Pa pa = context.getSource(); | ||
return CreditorInstitutionInfo.builder() | ||
.creditorInstitutionCode(pa.getIdDominio()) | ||
.businessName(pa.getRagioneSociale() != null ? pa.getRagioneSociale() : "") | ||
.build(); | ||
} | ||
} |
Oops, something went wrong.