-
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-1063] feat: get notice institutions api (#406)
Co-authored-by: giomella <giomella@emeal.nttdata.com>
- Loading branch information
1 parent
9cce196
commit ea0efdf
Showing
17 changed files
with
10,793 additions
and
11,634 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
22 changes: 22 additions & 0 deletions
22
...selfcare/pagopa/backoffice/mapper/ConvertDelegationExternalToCreditorInstitutionInfo.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,22 @@ | ||
package it.pagopa.selfcare.pagopa.backoffice.mapper; | ||
|
||
import it.pagopa.selfcare.pagopa.backoffice.model.creditorinstituions.CreditorInstitutionInfo; | ||
import it.pagopa.selfcare.pagopa.backoffice.model.institutions.DelegationExternal; | ||
import org.modelmapper.Converter; | ||
import org.modelmapper.spi.MappingContext; | ||
|
||
/** | ||
* Converter class that specify how to convert a {@link DelegationExternal} instance to a {@link CreditorInstitutionInfo} instance | ||
*/ | ||
public class ConvertDelegationExternalToCreditorInstitutionInfo implements Converter<DelegationExternal, CreditorInstitutionInfo> { | ||
|
||
@Override | ||
public CreditorInstitutionInfo convert(MappingContext<DelegationExternal, CreditorInstitutionInfo> context) { | ||
DelegationExternal model = context.getSource(); | ||
|
||
return CreditorInstitutionInfo.builder() | ||
.businessName(model.getInstitutionName()) | ||
.ciTaxCode(model.getTaxCode()) | ||
.build(); | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
.../pagopa/selfcare/pagopa/backoffice/model/creditorinstituions/CreditorInstitutionInfo.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,31 @@ | ||
package it.pagopa.selfcare.pagopa.backoffice.model.creditorinstituions; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import javax.validation.constraints.NotBlank; | ||
import javax.validation.constraints.NotNull; | ||
|
||
/** | ||
* Model that represent the name and tax code of a creditor institution | ||
*/ | ||
@Data | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class CreditorInstitutionInfo { | ||
|
||
@JsonProperty("business_name") | ||
@Schema(example = "Comune di Roma", description = "The business name of the creditor institution", requiredMode = Schema.RequiredMode.REQUIRED) | ||
@NotNull | ||
private String businessName; | ||
|
||
@JsonProperty("ci_tax_code") | ||
@Schema(example = "02438750586", description = "The tax code of the creditor institution", requiredMode = Schema.RequiredMode.REQUIRED) | ||
@NotBlank | ||
private String ciTaxCode; | ||
} |
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
Oops, something went wrong.