Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions api-test/ApiConfig.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -1171,6 +1171,44 @@
},
"response": []
},
{
"name": "getCreditorInstitutionsByIban",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"getCreditorInstitutionsByIban\", function () {",
" pm.response.to.have.status(200);",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{api-config-host}}/{{api-config-base-path}}/ibans/:iban/",
"host": [
"{{api-config-host}}"
],
"path": [
"{{api-config-base-path}}",
"ibans",
":iban"
],
"variable": [
{
"key": "iban",
"value": "{{iban}}"
}
]
}
},
"response": []
},
{
"name": "geByIban",
"event": [
Expand Down
23 changes: 22 additions & 1 deletion openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -19026,6 +19026,13 @@
"type": "string",
"example": "Comune di Lorem Ipsum"
},
"description": {
"maxLength": 255,
"minLength": 0,
"type": "string",
"description": "The description of the Creditor Institution",
"example": "Comune di Roma"
},
"cbill_code": {
"type": "string",
"example": "1234567890100"
Expand Down Expand Up @@ -20031,6 +20038,13 @@
"type": "string",
"example": "Comune di Lorem Ipsum"
},
"description": {
"maxLength": 255,
"minLength": 0,
"type": "string",
"description": "The description of the Creditor Institution",
"example": "Comune di Roma"
},
"application_code": {
"type": "integer",
"format": "int64"
Expand Down Expand Up @@ -20445,6 +20459,13 @@
"minLength": 0,
"type": "string",
"example": "Comune di Lorem Ipsum"
},
"description": {
"maxLength": 255,
"minLength": 0,
"type": "string",
"description": "The description of the Creditor Institution",
"example": "Comune di Roma"
}
}
},
Expand Down Expand Up @@ -21144,4 +21165,4 @@
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public StationCreditorInstitution convert(
return StationCreditorInstitution.builder()
.creditorInstitutionCode(pa.getIdDominio())
.businessName(pa.getRagioneSociale())
.description(pa.getDescription())
.enabled(pa.getEnabled())
.auxDigit(source.getAuxDigit())
.applicationCode(source.getProgressivo())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public CreditorInstitution convert(MappingContext<Pa, CreditorInstitution> conte
.creditorInstitutionCode(pa.getIdDominio())
.enabled(pa.getEnabled())
.businessName(CommonUtil.deNull((pa.getRagioneSociale())))
.description(pa.getDescription())
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public CreditorInstitutionDetails convert(
.creditorInstitutionCode(pa.getIdDominio())
.enabled(pa.getEnabled())
.businessName(CommonUtil.deNull(pa.getRagioneSociale()))
.description(pa.getDescription())
.cbillCode(pa.getCbill())
.address(
CreditorInstitutionAddress.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,11 @@ public class CreditorInstitution {
@NotNull
@Size(max = 70)
private String businessName;

@JsonProperty("description")
@Schema(
example = "Comune di Roma",
description = "The description of the Creditor Institution")
@Size(max = 255)
private String description;
}
1 change: 1 addition & 0 deletions src/test/java/it/gov/pagopa/apiconfig/TestUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ public static Pa getMockPa() {
.idDominio("00168480242")
.enabled(true)
.ragioneSociale("Comune di Bassano del Grappa")
.description("Comune di Bassano del Grappa")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the difference between ragione sociale and description?

Copy link
Collaborator Author

@dylantangredi-jakala dylantangredi-jakala Jan 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point because looking at the h2 mock data from the src/resources/h2/data-h2.sql file, ragioneSociale and description are always populated with the same string. It is just a guess but maybe in production the description field would be used in a different and specific way but I don't have the means to check.

.cbill("56I10")
.capDomicilioFiscale("00111")
.pagamentoPressoPsp(true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
{
"creditor_institution_code": "00168480242",
"enabled": true,
"business_name": "Comune di Bassano del Grappa"
"business_name": "Comune di Bassano del Grappa",
"description": "Comune di Bassano del Grappa"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
{
"creditor_institution_code": "00168480242",
"enabled": true,
"business_name": "Comune di Bassano del Grappa"
"business_name": "Comune di Bassano del Grappa",
"description": "Comune di Bassano del Grappa"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
{
"creditor_institution_code": "00168480242",
"enabled": true,
"business_name": "Comune di Bassano del Grappa"
"business_name": "Comune di Bassano del Grappa",
"description": "Comune di Bassano del Grappa"
}
],
"page_info": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
{
"creditor_institution_code": "00168480242",
"enabled": true,
"business_name": "Comune di Bassano del Grappa"
"business_name": "Comune di Bassano del Grappa",
"description": "Comune di Bassano del Grappa"
}
],
"page_info": {
Expand Down
Loading