From e65741050a3225bf2da47272cfa5b4ff4b84dc46 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Wed, 10 Jan 2024 12:31:09 +0100 Subject: [PATCH 01/12] PAGOPA-1404 adding new biz api fiscalCode-iur --- .../controller/IPaymentsController.java | 16 +++++++++++++ .../controller/impl/PaymentsController.java | 8 +++++++ .../repository/BizEventsRepository.java | 9 ++++++-- .../service/IBizEventsService.java | 2 ++ .../service/impl/BizEventsService.java | 23 ++++++++++++++++++- .../service/BizEventsServiceTest.java | 6 ++--- 6 files changed, 58 insertions(+), 6 deletions(-) diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/controller/IPaymentsController.java b/src/main/java/it/gov/pagopa/bizeventsservice/controller/IPaymentsController.java index 94ec9cc2..998db0cb 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/controller/IPaymentsController.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/controller/IPaymentsController.java @@ -43,4 +43,20 @@ ResponseEntity getOrganizationReceipt( @NotBlank @PathVariable("iur") String iur, @Parameter(description = "The unique payment identification. Alphanumeric code that uniquely associates and identifies three key elements of a payment: reason, payer, amount", required = true) @NotBlank @PathVariable("iuv") String iuv); + + @Operation(summary = "The organization get the receipt for the creditor institution.", security = {@SecurityRequirement(name = "ApiKey")}, operationId = "getOrganizationReceipt") + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "Obtained receipt.", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, schema = @Schema(name = "CtReceipt", implementation = CtReceiptModelResponse.class))), + @ApiResponse(responseCode = "401", description = "Wrong or missing function key.", content = @Content(schema = @Schema())), + @ApiResponse(responseCode = "404", description = "Not found the receipt.", content = @Content(schema = @Schema(implementation = ProblemJson.class))), + @ApiResponse(responseCode = "422", description = "Unable to process the request.", content = @Content(schema = @Schema(implementation = ProblemJson.class))), + @ApiResponse(responseCode = "429", description = "Too many requests.", content = @Content(schema = @Schema())), + @ApiResponse(responseCode = "500", description = "Service unavailable.", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, schema = @Schema(implementation = ProblemJson.class)))}) + @GetMapping(value = "/organizations/{organizationfiscalcode}/receipts/{iur}", + produces = MediaType.APPLICATION_JSON_VALUE) + ResponseEntity getOrganizationReceipt( + @Parameter(description = "The fiscal code of the Organization.", required = true) + @NotBlank @PathVariable("organizationfiscalcode") String organizationFiscalCode, + @Parameter(description = "The unique reference of the operation assigned to the payment (Payment Token).", required = true) + @NotBlank @PathVariable("iur") String iur); } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/controller/impl/PaymentsController.java b/src/main/java/it/gov/pagopa/bizeventsservice/controller/impl/PaymentsController.java index 6bf7a636..2666d226 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/controller/impl/PaymentsController.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/controller/impl/PaymentsController.java @@ -26,4 +26,12 @@ public ResponseEntity getOrganizationReceipt(@NotBlank S HttpStatus.OK); } + @Override + public ResponseEntity getOrganizationReceipt(@NotBlank String organizationFiscalCode, + @NotBlank String iur) { + return new ResponseEntity<>( + bizEventsService.getOrganizationReceipt(organizationFiscalCode, iur), + HttpStatus.OK); + } + } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/repository/BizEventsRepository.java b/src/main/java/it/gov/pagopa/bizeventsservice/repository/BizEventsRepository.java index 4666896c..fb087bbf 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/repository/BizEventsRepository.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/repository/BizEventsRepository.java @@ -15,10 +15,15 @@ public interface BizEventsRepository extends CosmosRepository // TODO when available replace idPa with the paFiscalCode field @Query("select * from c where c.creditor.idPA = @organizationFiscalCode and c.paymentInfo.paymentToken = @iur and c.debtorPosition.iuv = @iuv and StringToNumber(c.debtorPosition.modelType) > 1") - List getBizEventByOrgFiscCodeAndIur(@Param("organizationFiscalCode") String organizationFiscalCode, - @Param("iur") String iur, @Param("iuv") String iuv); + List getBizEventByOrgFiscCodeIuvAndIur(@Param("organizationFiscalCode") String organizationFiscalCode, + @Param("iur") String iur, @Param("iuv") String iuv); @Query("select * from c where c.creditor.idPA = @organizationFiscalCode and c.debtorPosition.iuv = @iuv") List getBizEventByOrgFiscalCodeAndIuv(@Param("organizationFiscalCode") String organizationFiscalCode, @Param("iuv") String iuv); + + @Query("select value c from c JOIN t IN c.transferList where t.fiscalCodePA = @organizationFiscalCode and c.paymentInfo.paymentToken = @iur and StringToNumber(c.debtorPosition.modelType) > 1") + List getBizEventByOrgFiscCodeAndIur(@Param("organizationFiscalCode") String organizationFiscalCode, + @Param("iur") String iur); + } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/service/IBizEventsService.java b/src/main/java/it/gov/pagopa/bizeventsservice/service/IBizEventsService.java index 6a908948..ea7d7b69 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/service/IBizEventsService.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/service/IBizEventsService.java @@ -12,5 +12,7 @@ CtReceiptModelResponse getOrganizationReceipt(String organizationFiscalCode, BizEvent getBizEventByOrgFiscalCodeAndIuv(String organizationFiscalCode, String iuv); + CtReceiptModelResponse getOrganizationReceipt(String organizationFiscalCode, + String iur); } \ No newline at end of file diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/service/impl/BizEventsService.java b/src/main/java/it/gov/pagopa/bizeventsservice/service/impl/BizEventsService.java index b1cb0411..baf05e6a 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/service/impl/BizEventsService.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/service/impl/BizEventsService.java @@ -31,7 +31,7 @@ public BizEventsService(BizEventsRepository bizEventsRepository, ModelMapper mod public CtReceiptModelResponse getOrganizationReceipt(String organizationFiscalCode, String iur, String iuv) { // get biz event - List bizEventEntityList = bizEventsRepository.getBizEventByOrgFiscCodeAndIur(organizationFiscalCode, + List bizEventEntityList = bizEventsRepository.getBizEventByOrgFiscCodeIuvAndIur(organizationFiscalCode, iur, iuv); if (bizEventEntityList.isEmpty()) { @@ -72,4 +72,25 @@ else if (bizEventEntityList.size() > 1) { } return bizEventEntityList.get(0); } + + @Override + public CtReceiptModelResponse getOrganizationReceipt(String organizationFiscalCode, + String iur) { + // get biz event + List bizEventEntityList = bizEventsRepository.getBizEventByOrgFiscCodeAndIur(organizationFiscalCode, + iur); + + if (bizEventEntityList.isEmpty()) { + throw new AppException(AppError.BIZ_EVENT_NOT_FOUND, organizationFiscalCode, iur); + } + + // the query should always return only one element + else if (bizEventEntityList.size() > 1) { + throw new AppException(AppError.BIZ_EVENT_NOT_UNIQUE, organizationFiscalCode, iur); + } + + // the bizEventEntityList has only one element + return modelMapper.map(bizEventEntityList.get(0), CtReceiptModelResponse.class); + } + } diff --git a/src/test/java/it/gov/pagopa/bizeventsservice/service/BizEventsServiceTest.java b/src/test/java/it/gov/pagopa/bizeventsservice/service/BizEventsServiceTest.java index 9ebfe15e..6091e130 100644 --- a/src/test/java/it/gov/pagopa/bizeventsservice/service/BizEventsServiceTest.java +++ b/src/test/java/it/gov/pagopa/bizeventsservice/service/BizEventsServiceTest.java @@ -65,7 +65,7 @@ void setUp() { @Test void getOrganizationReceipt() { - when(bizEventsRepository.getBizEventByOrgFiscCodeAndIur(ORGANIZATION_FISCAL_CODE, IUR, IUV)) + when(bizEventsRepository.getBizEventByOrgFiscCodeIuvAndIur(ORGANIZATION_FISCAL_CODE, IUR, IUV)) .thenReturn(List.of(bizEventEntity)); CtReceiptModelResponse ctReceipt = bizEventsService.getOrganizationReceipt(ORGANIZATION_FISCAL_CODE, IUR, @@ -76,7 +76,7 @@ void getOrganizationReceipt() { @Test void getOrganizationReceipt_404() throws IOException { - when(bizEventsRepository.getBizEventByOrgFiscCodeAndIur(ORGANIZATION_FISCAL_CODE, IUR, IUV)) + when(bizEventsRepository.getBizEventByOrgFiscCodeIuvAndIur(ORGANIZATION_FISCAL_CODE, IUR, IUV)) .thenReturn(List.of(bizEventEntity)); AppException e = assertThrows(AppException.class, () -> bizEventsService.getOrganizationReceipt(ORGANIZATION_FISCAL_CODE, IUR, "fake_iuv")); @@ -86,7 +86,7 @@ void getOrganizationReceipt_404() throws IOException { @Test void getOrganizationReceipt_422() throws IOException { // mocking a fake save for duplicated entity - when(bizEventsRepository.getBizEventByOrgFiscCodeAndIur(ORGANIZATION_FISCAL_CODE, IUR, IUV)) + when(bizEventsRepository.getBizEventByOrgFiscCodeIuvAndIur(ORGANIZATION_FISCAL_CODE, IUR, IUV)) .thenReturn(List.of(bizEventEntity, bizEventEntityDuplicated)); AppException e = assertThrows(AppException.class, () -> bizEventsService.getOrganizationReceipt(ORGANIZATION_FISCAL_CODE, IUR, IUV)); From 6b60209912eec6cca3a22bc9ce671194344dd3bd Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Wed, 10 Jan 2024 12:42:10 +0100 Subject: [PATCH 02/12] PAGOPA-1404 fixing exception formatting --- .../gov/pagopa/bizeventsservice/exception/AppError.java | 6 ++++-- .../bizeventsservice/service/impl/BizEventsService.java | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/exception/AppError.java b/src/main/java/it/gov/pagopa/bizeventsservice/exception/AppError.java index fcf51a58..0829b675 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/exception/AppError.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/exception/AppError.java @@ -6,10 +6,12 @@ @Getter public enum AppError { - BIZ_EVENT_NOT_FOUND(HttpStatus.NOT_FOUND, "Biz Event not found", "Not found a biz event for the Organization Fiscal Code %s and IUR %s and IUV %s"), + BIZ_EVENT_NOT_FOUND_IUV_IUR(HttpStatus.NOT_FOUND, "Biz Event not found", "Not found a biz event for the Organization Fiscal Code %s and IUR %s and IUV %s"), + BIZ_EVENT_NOT_FOUND_IUR(HttpStatus.NOT_FOUND, "Biz Event not found", "Not found a biz event for the Organization Fiscal Code %s and IUR %s"), BIZ_EVENT_NOT_FOUND_WITH_ID(HttpStatus.NOT_FOUND, "Biz Event not found", "Not found a biz event with id %s"), BIZ_EVENT_NOT_FOUND_WITH_ORG_CF_AND_IUV(HttpStatus.NOT_FOUND, "Biz Event not found", "Not found a biz event for the Organization Fiscal Code %s and IUV %s"), - BIZ_EVENT_NOT_UNIQUE(HttpStatus.UNPROCESSABLE_ENTITY, "Biz Event is not unique", "More than one biz event was found for the Organization Fiscal Code %s and IUR %s and IUV %s"), + BIZ_EVENT_NOT_UNIQUE_IUV_IUR(HttpStatus.UNPROCESSABLE_ENTITY, "Biz Event is not unique", "More than one biz event was found for the Organization Fiscal Code %s and IUR %s and IUV %s"), + BIZ_EVENT_NOT_UNIQUE_IUR(HttpStatus.UNPROCESSABLE_ENTITY, "Biz Event is not unique", "More than one biz event was found for the Organization Fiscal Code %s and IUR %s"), BIZ_EVENT_NOT_UNIQUE_WITH_ORG_CF_AND_IUV(HttpStatus.UNPROCESSABLE_ENTITY, "Biz Event is not unique", "More than one biz event was found for the Organization Fiscal Code %s and IUV %s"), INTERNAL_SERVER_ERROR(HttpStatus.INTERNAL_SERVER_ERROR, "Internal Server Error", "Something was wrong"); diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/service/impl/BizEventsService.java b/src/main/java/it/gov/pagopa/bizeventsservice/service/impl/BizEventsService.java index baf05e6a..b4d86816 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/service/impl/BizEventsService.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/service/impl/BizEventsService.java @@ -35,11 +35,11 @@ public CtReceiptModelResponse getOrganizationReceipt(String organizationFiscalCo iur, iuv); if (bizEventEntityList.isEmpty()) { - throw new AppException(AppError.BIZ_EVENT_NOT_FOUND, organizationFiscalCode, iur, iuv); + throw new AppException(AppError.BIZ_EVENT_NOT_FOUND_IUV_IUR, organizationFiscalCode, iur, iuv); } // the query should always return only one element else if (bizEventEntityList.size() > 1) { - throw new AppException(AppError.BIZ_EVENT_NOT_UNIQUE, organizationFiscalCode, iur, iuv); + throw new AppException(AppError.BIZ_EVENT_NOT_UNIQUE_IUV_IUR, organizationFiscalCode, iur, iuv); } // the bizEventEntityList has only one element @@ -81,12 +81,12 @@ public CtReceiptModelResponse getOrganizationReceipt(String organizationFiscalCo iur); if (bizEventEntityList.isEmpty()) { - throw new AppException(AppError.BIZ_EVENT_NOT_FOUND, organizationFiscalCode, iur); + throw new AppException(AppError.BIZ_EVENT_NOT_FOUND_IUR, organizationFiscalCode, iur); } // the query should always return only one element else if (bizEventEntityList.size() > 1) { - throw new AppException(AppError.BIZ_EVENT_NOT_UNIQUE, organizationFiscalCode, iur); + throw new AppException(AppError.BIZ_EVENT_NOT_UNIQUE_IUR, organizationFiscalCode, iur); } // the bizEventEntityList has only one element From 4909bb058ff7b6d46e1028afb43e3e20074f7a0a Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Wed, 10 Jan 2024 14:41:43 +0100 Subject: [PATCH 03/12] PAGOPA-1404 adding junit tests --- .../controller/PaymentsControllerTest.java | 12 +++++-- .../service/BizEventsServiceTest.java | 35 +++++++++++++++++-- 2 files changed, 41 insertions(+), 6 deletions(-) diff --git a/src/test/java/it/gov/pagopa/bizeventsservice/controller/PaymentsControllerTest.java b/src/test/java/it/gov/pagopa/bizeventsservice/controller/PaymentsControllerTest.java index 4dd86783..e26a313f 100644 --- a/src/test/java/it/gov/pagopa/bizeventsservice/controller/PaymentsControllerTest.java +++ b/src/test/java/it/gov/pagopa/bizeventsservice/controller/PaymentsControllerTest.java @@ -12,6 +12,8 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.CsvSource; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; @@ -39,11 +41,15 @@ void setUp() throws IOException { // precondition CtReceiptModelResponse ctReceiptModel = TestUtil.readModelFromFile("receipts/getOrganizationReceipt.json", CtReceiptModelResponse.class); when(bizEventsService.getOrganizationReceipt(anyString(), anyString(), anyString())).thenReturn(ctReceiptModel); + when(bizEventsService.getOrganizationReceipt(anyString(), anyString())).thenReturn(ctReceiptModel); } - @Test - void getOrganizationReceipt() throws Exception { - String url = "/organizations/mock_organizationfiscalcode/receipts/mock_iur/paymentoptions/mock_iuv"; + @ParameterizedTest + @CsvSource({ + "/organizations/mock_organizationfiscalcode/receipts/mock_iur/paymentoptions/mock_iuv", + "/organizations/mock_organizationfiscalcode/receipts/mock_iur" + }) + void getOrganizationReceipt(String url) throws Exception { MvcResult result = mvc.perform(get(url).contentType(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON)) diff --git a/src/test/java/it/gov/pagopa/bizeventsservice/service/BizEventsServiceTest.java b/src/test/java/it/gov/pagopa/bizeventsservice/service/BizEventsServiceTest.java index 6091e130..7fa9e5b6 100644 --- a/src/test/java/it/gov/pagopa/bizeventsservice/service/BizEventsServiceTest.java +++ b/src/test/java/it/gov/pagopa/bizeventsservice/service/BizEventsServiceTest.java @@ -64,7 +64,7 @@ void setUp() { } @Test - void getOrganizationReceipt() { + void getOrganizationReceiptIuvIur() { when(bizEventsRepository.getBizEventByOrgFiscCodeIuvAndIur(ORGANIZATION_FISCAL_CODE, IUR, IUV)) .thenReturn(List.of(bizEventEntity)); @@ -75,7 +75,7 @@ void getOrganizationReceipt() { } @Test - void getOrganizationReceipt_404() throws IOException { + void getOrganizationReceiptIuvIur_404() throws IOException { when(bizEventsRepository.getBizEventByOrgFiscCodeIuvAndIur(ORGANIZATION_FISCAL_CODE, IUR, IUV)) .thenReturn(List.of(bizEventEntity)); @@ -84,7 +84,7 @@ void getOrganizationReceipt_404() throws IOException { } @Test - void getOrganizationReceipt_422() throws IOException { + void getOrganizationReceiptIuvIur_422() throws IOException { // mocking a fake save for duplicated entity when(bizEventsRepository.getBizEventByOrgFiscCodeIuvAndIur(ORGANIZATION_FISCAL_CODE, IUR, IUV)) .thenReturn(List.of(bizEventEntity, bizEventEntityDuplicated)); @@ -93,6 +93,35 @@ void getOrganizationReceipt_422() throws IOException { assertEquals(HttpStatus.UNPROCESSABLE_ENTITY, e.getHttpStatus()); } + @Test + void getOrganizationReceiptIur() { + when(bizEventsRepository.getBizEventByOrgFiscCodeAndIur(ORGANIZATION_FISCAL_CODE, IUR)) + .thenReturn(List.of(bizEventEntity)); + + CtReceiptModelResponse ctReceipt = bizEventsService.getOrganizationReceipt(ORGANIZATION_FISCAL_CODE, IUR); + assertEquals("85570ffebb13411b80d79f415641ec55", ctReceipt.getReceiptId()); + assertEquals("cash", ctReceipt.getPaymentMethod()); + } + + @Test + void getOrganizationReceiptIur_404() throws IOException { + when(bizEventsRepository.getBizEventByOrgFiscCodeAndIur(ORGANIZATION_FISCAL_CODE, IUR)) + .thenReturn(List.of(bizEventEntity)); + + AppException e = assertThrows(AppException.class, () -> bizEventsService.getOrganizationReceipt(ORGANIZATION_FISCAL_CODE,"fake_iur")); + assertEquals(HttpStatus.NOT_FOUND, e.getHttpStatus()); + } + + @Test + void getOrganizationReceiptIur_422() throws IOException { + // mocking a fake save for duplicated entity + when(bizEventsRepository.getBizEventByOrgFiscCodeAndIur(ORGANIZATION_FISCAL_CODE, IUR)) + .thenReturn(List.of(bizEventEntity, bizEventEntityDuplicated)); + + AppException e = assertThrows(AppException.class, () -> bizEventsService.getOrganizationReceipt(ORGANIZATION_FISCAL_CODE, IUR)); + assertEquals(HttpStatus.UNPROCESSABLE_ENTITY, e.getHttpStatus()); + } + @Test void getBizEventSuccess() { when(bizEventsRepository.findById(BIZ_EVENT_ID, new PartitionKey(BIZ_EVENT_ID))) From 2f256d76d7f1503ad597afe3eabbd400e7fc06cf Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Wed, 10 Jan 2024 15:44:16 +0100 Subject: [PATCH 04/12] PAGOPA-1404 solving sonar issues --- .../bizeventsservice/exception/AppError.java | 17 ++++++++++------- .../pagopa/bizeventsservice/util/Constants.java | 2 ++ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/exception/AppError.java b/src/main/java/it/gov/pagopa/bizeventsservice/exception/AppError.java index 0829b675..0cd61f5b 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/exception/AppError.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/exception/AppError.java @@ -3,16 +3,19 @@ import lombok.Getter; import org.springframework.http.HttpStatus; +import static it.gov.pagopa.bizeventsservice.util.Constants.BIZ_NOT_FOUND_HEADER; +import static it.gov.pagopa.bizeventsservice.util.Constants.BIZ_NOT_UNIQUE_HEADER; + @Getter public enum AppError { - BIZ_EVENT_NOT_FOUND_IUV_IUR(HttpStatus.NOT_FOUND, "Biz Event not found", "Not found a biz event for the Organization Fiscal Code %s and IUR %s and IUV %s"), - BIZ_EVENT_NOT_FOUND_IUR(HttpStatus.NOT_FOUND, "Biz Event not found", "Not found a biz event for the Organization Fiscal Code %s and IUR %s"), - BIZ_EVENT_NOT_FOUND_WITH_ID(HttpStatus.NOT_FOUND, "Biz Event not found", "Not found a biz event with id %s"), - BIZ_EVENT_NOT_FOUND_WITH_ORG_CF_AND_IUV(HttpStatus.NOT_FOUND, "Biz Event not found", "Not found a biz event for the Organization Fiscal Code %s and IUV %s"), - BIZ_EVENT_NOT_UNIQUE_IUV_IUR(HttpStatus.UNPROCESSABLE_ENTITY, "Biz Event is not unique", "More than one biz event was found for the Organization Fiscal Code %s and IUR %s and IUV %s"), - BIZ_EVENT_NOT_UNIQUE_IUR(HttpStatus.UNPROCESSABLE_ENTITY, "Biz Event is not unique", "More than one biz event was found for the Organization Fiscal Code %s and IUR %s"), - BIZ_EVENT_NOT_UNIQUE_WITH_ORG_CF_AND_IUV(HttpStatus.UNPROCESSABLE_ENTITY, "Biz Event is not unique", "More than one biz event was found for the Organization Fiscal Code %s and IUV %s"), + BIZ_EVENT_NOT_FOUND_IUV_IUR(HttpStatus.NOT_FOUND, BIZ_NOT_FOUND_HEADER, "Not found a biz event for the Organization Fiscal Code %s and IUR %s and IUV %s"), + BIZ_EVENT_NOT_FOUND_IUR(HttpStatus.NOT_FOUND, BIZ_NOT_FOUND_HEADER, "Not found a biz event for the Organization Fiscal Code %s and IUR %s"), + BIZ_EVENT_NOT_FOUND_WITH_ID(HttpStatus.NOT_FOUND, BIZ_NOT_FOUND_HEADER, "Not found a biz event with id %s"), + BIZ_EVENT_NOT_FOUND_WITH_ORG_CF_AND_IUV(HttpStatus.NOT_FOUND, BIZ_NOT_FOUND_HEADER, "Not found a biz event for the Organization Fiscal Code %s and IUV %s"), + BIZ_EVENT_NOT_UNIQUE_IUV_IUR(HttpStatus.UNPROCESSABLE_ENTITY, BIZ_NOT_UNIQUE_HEADER, "More than one biz event was found for the Organization Fiscal Code %s and IUR %s and IUV %s"), + BIZ_EVENT_NOT_UNIQUE_IUR(HttpStatus.UNPROCESSABLE_ENTITY, BIZ_NOT_UNIQUE_HEADER, "More than one biz event was found for the Organization Fiscal Code %s and IUR %s"), + BIZ_EVENT_NOT_UNIQUE_WITH_ORG_CF_AND_IUV(HttpStatus.UNPROCESSABLE_ENTITY, BIZ_NOT_UNIQUE_HEADER, "More than one biz event was found for the Organization Fiscal Code %s and IUV %s"), INTERNAL_SERVER_ERROR(HttpStatus.INTERNAL_SERVER_ERROR, "Internal Server Error", "Something was wrong"); public final HttpStatus httpStatus; diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/util/Constants.java b/src/main/java/it/gov/pagopa/bizeventsservice/util/Constants.java index 4f33fd2e..16d3d112 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/util/Constants.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/util/Constants.java @@ -7,5 +7,7 @@ public class Constants { public static final String HEADER_REQUEST_ID = "X-Request-Id"; + public static final String BIZ_NOT_FOUND_HEADER = "Biz Event not found"; + public static final String BIZ_NOT_UNIQUE_HEADER = "Biz Event is not unique"; } From 6be5e243f2844a70de4f6b1a4f4ef8cf1a9e96a7 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Wed, 10 Jan 2024 15:59:08 +0100 Subject: [PATCH 05/12] PAGOPA-1404 update openapi --- openapi/openapi.json | 2984 ++++++++++++++++++++++-------------------- 1 file changed, 1553 insertions(+), 1431 deletions(-) diff --git a/openapi/openapi.json b/openapi/openapi.json index 67a67f39..40bdef89 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -1,1497 +1,1619 @@ { - "openapi": "3.0.1", - "info": { - "title": "Biz-Events Service", - "description": "Microservice for exposing REST APIs about payment receipts.", - "termsOfService": "https://www.pagopa.gov.it/", - "version": "0.1.1" - }, - "servers": [ - { - "url": "http://localhost:8080", - "description": "Generated server url" - } - ], - "tags": [ - { - "name": "Actuator", - "description": "Monitor and interact", - "externalDocs": { - "description": "Spring Boot Actuator Web API Documentation", - "url": "https://docs.spring.io/spring-boot/docs/current/actuator-api/html/" - } - } - ], - "paths": { - "/actuator": { - "get": { - "tags": [ - "Actuator" - ], - "summary": "Actuator root web endpoint", - "operationId": "links", - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "openapi": "3.0.1", + "info": { + "title": "Biz-Events Service", + "description": "Microservice for exposing REST APIs about payment receipts.", + "termsOfService": "https://www.pagopa.gov.it/", + "version": "0.1.1" + }, + "servers": [ + { + "url": "http://localhost:8080", + "description": "Generated server url" + } + ], + "tags": [ + { + "name": "Actuator", + "description": "Monitor and interact", + "externalDocs": { + "description": "Spring Boot Actuator Web API Documentation", + "url": "https://docs.spring.io/spring-boot/docs/current/actuator-api/html/" + } + } + ], + "paths": { + "/actuator": { + "get": { + "tags": [ + "Actuator" + ], + "summary": "Actuator root web endpoint", + "operationId": "links", + "responses": { + "200": { + "description": "OK", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/vnd.spring-boot.actuator.v3+json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + } + } + } + }, + "application/vnd.spring-boot.actuator.v2+json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + } + } + } + }, + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + } + } + } + } + } + } } - } }, - "content": { - "application/vnd.spring-boot.actuator.v3+json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" } - } } - }, - "application/vnd.spring-boot.actuator.v2+json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" + ] + }, + "/actuator/health": { + "get": { + "tags": [ + "Actuator" + ], + "summary": "Actuator web endpoint 'health'", + "operationId": "health", + "responses": { + "200": { + "description": "OK", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/vnd.spring-boot.actuator.v3+json": { + "schema": { + "type": "object" + } + }, + "application/vnd.spring-boot.actuator.v2+json": { + "schema": { + "type": "object" + } + }, + "application/json": { + "schema": { + "type": "object" + } + } + } } - } } - }, - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" + }, + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" } - } } - } - } - } - } - }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } - } - ] - }, - "/actuator/health": { - "get": { - "tags": [ - "Actuator" - ], - "summary": "Actuator web endpoint 'health'", - "operationId": "health", - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + ] + }, + "/actuator/health/**": { + "get": { + "tags": [ + "Actuator" + ], + "summary": "Actuator web endpoint 'health-path'", + "operationId": "health-path", + "responses": { + "200": { + "description": "OK", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/vnd.spring-boot.actuator.v3+json": { + "schema": { + "type": "object" + } + }, + "application/vnd.spring-boot.actuator.v2+json": { + "schema": { + "type": "object" + } + }, + "application/json": { + "schema": { + "type": "object" + } + } + } + } } - } }, - "content": { - "application/vnd.spring-boot.actuator.v3+json": { - "schema": { - "type": "object" - } - }, - "application/vnd.spring-boot.actuator.v2+json": { - "schema": { - "type": "object" - } - }, - "application/json": { - "schema": { - "type": "object" + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } } - } - } - } - } - }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } - } - ] - }, - "/actuator/health/**": { - "get": { - "tags": [ - "Actuator" - ], - "summary": "Actuator web endpoint 'health-path'", - "operationId": "health-path", - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + ] + }, + "/actuator/info": { + "get": { + "tags": [ + "Actuator" + ], + "summary": "Actuator web endpoint 'info'", + "operationId": "info", + "responses": { + "200": { + "description": "OK", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/vnd.spring-boot.actuator.v3+json": { + "schema": { + "type": "object" + } + }, + "application/vnd.spring-boot.actuator.v2+json": { + "schema": { + "type": "object" + } + }, + "application/json": { + "schema": { + "type": "object" + } + } + } + } } - } }, - "content": { - "application/vnd.spring-boot.actuator.v3+json": { - "schema": { - "type": "object" - } - }, - "application/vnd.spring-boot.actuator.v2+json": { - "schema": { - "type": "object" - } - }, - "application/json": { - "schema": { - "type": "object" - } - } - } - } - } - }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } - } - ] - }, - "/actuator/info": { - "get": { - "tags": [ - "Actuator" - ], - "summary": "Actuator web endpoint 'info'", - "operationId": "info", - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } } - } + ] + }, + "/events/organizations/{organization-fiscal-code}/iuvs/{iuv}": { + "get": { + "tags": [ + "get BizEvent APIs" + ], + "summary": "Retrieve the biz-event given the organization fiscal code and IUV.", + "operationId": "getBizEventByOrganizationFiscalCodeAndIuv", + "parameters": [ + { + "name": "organization-fiscal-code", + "in": "path", + "description": "The fiscal code of the Organization.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "iuv", + "in": "path", + "description": "The unique payment identification. Alphanumeric code that uniquely associates and identifies three key elements of a payment: reason, payer, amount", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Obtained biz-event.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BizEvent" + } + } + } + }, + "401": { + "description": "Wrong or missing function key.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "Not found the biz-event.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "422": { + "description": "Unable to process the request.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "429": { + "description": "Too many requests.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "Service unavailable.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + } + }, + "security": [ + { + "ApiKey": [] + } + ] }, - "content": { - "application/vnd.spring-boot.actuator.v3+json": { - "schema": { - "type": "object" - } - }, - "application/vnd.spring-boot.actuator.v2+json": { - "schema": { - "type": "object" - } - }, - "application/json": { - "schema": { - "type": "object" - } - } - } - } - } - }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } - } - ] - }, - "/events/organizations/{organization-fiscal-code}/iuvs/{iuv}": { - "get": { - "tags": [ - "get BizEvent APIs" - ], - "summary": "Retrieve the biz-event given the organization fiscal code and IUV.", - "operationId": "getBizEventByOrganizationFiscalCodeAndIuv", - "parameters": [ - { - "name": "organization-fiscal-code", - "in": "path", - "description": "The fiscal code of the Organization.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "iuv", - "in": "path", - "description": "The unique payment identification. Alphanumeric code that uniquely associates and identifies three key elements of a payment: reason, payer, amount", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Obtained biz-event.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } } - } + ] + }, + "/events/{biz-event-id}": { + "get": { + "tags": [ + "get BizEvent APIs" + ], + "summary": "Retrieve the biz-event given its id.", + "operationId": "getBizEvent", + "parameters": [ + { + "name": "biz-event-id", + "in": "path", + "description": "The id of the biz-event.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Obtained biz-event.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BizEvent" + } + } + } + }, + "401": { + "description": "Wrong or missing function key.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "Not found the biz-event.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "422": { + "description": "Unable to process the request.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "429": { + "description": "Too many requests.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "Service unavailable.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + } + }, + "security": [ + { + "ApiKey": [] + } + ] }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BizEvent" - } - } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "Not found the biz-event.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } } - } + ] + }, + "/info": { + "get": { + "tags": [ + "Home" + ], + "summary": "health check", + "description": "Return OK if application is started", + "operationId": "healthCheck", + "responses": { + "200": { + "description": "OK", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppInfo" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "401": { + "description": "Unauthorized", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "403": { + "description": "Forbidden", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "429": { + "description": "Too many requests", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "Service unavailable", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + } + }, + "security": [ + { + "ApiKey": [] + } + ] }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "422": { - "description": "Unable to process the request.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } } - } + ] + }, + "/organizations/{organizationfiscalcode}/receipts/{iur}": { + "get": { + "tags": [ + "Payment Receipts REST APIs" + ], + "summary": "The organization get the receipt for the creditor institution.", + "operationId": "getOrganizationReceipt", + "parameters": [ + { + "name": "organizationfiscalcode", + "in": "path", + "description": "The fiscal code of the Organization.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "iur", + "in": "path", + "description": "The unique reference of the operation assigned to the payment (Payment Token).", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Obtained receipt.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CtReceiptModelResponse" + } + } + } + }, + "401": { + "description": "Wrong or missing function key.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "Not found the receipt.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "422": { + "description": "Unable to process the request.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "429": { + "description": "Too many requests.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "Service unavailable.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + } + }, + "security": [ + { + "ApiKey": [] + } + ] }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "429": { - "description": "Too many requests.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "Service unavailable.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } } - } + ] + }, + "/organizations/{organizationfiscalcode}/receipts/{iur}/paymentoptions/{iuv}": { + "get": { + "tags": [ + "Payment Receipts REST APIs" + ], + "summary": "The organization get the receipt for the creditor institution.", + "operationId": "getOrganizationReceipt_1", + "parameters": [ + { + "name": "organizationfiscalcode", + "in": "path", + "description": "The fiscal code of the Organization.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "iur", + "in": "path", + "description": "The unique reference of the operation assigned to the payment (Payment Token).", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "iuv", + "in": "path", + "description": "The unique payment identification. Alphanumeric code that uniquely associates and identifies three key elements of a payment: reason, payer, amount", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Obtained receipt.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CtReceiptModelResponse" + } + } + } + }, + "401": { + "description": "Wrong or missing function key.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "Not found the receipt.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "422": { + "description": "Unable to process the request.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "429": { + "description": "Too many requests.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "Service unavailable.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + } + }, + "security": [ + { + "ApiKey": [] + } + ] }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } } - } - } - } - }, - "security": [ - { - "ApiKey": [] - } - ] - }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } + ] } - ] }, - "/events/{biz-event-id}": { - "get": { - "tags": [ - "get BizEvent APIs" - ], - "summary": "Retrieve the biz-event given its id.", - "operationId": "getBizEvent", - "parameters": [ - { - "name": "biz-event-id", - "in": "path", - "description": "The id of the biz-event.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Obtained biz-event.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "components": { + "schemas": { + "ProblemJson": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized); example: Service Unavailable" + }, + "status": { + "maximum": 600, + "minimum": 100, + "type": "integer", + "description": "The HTTP status code generated by the origin server for this occurrence of the problem.", + "format": "int32", + "example": 200 + }, + "detail": { + "type": "string", + "description": "A human readable explanation specific to this occurrence of the problem.", + "example": "There was an error processing the request" + } } - } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BizEvent" - } - } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "Not found the biz-event.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "CtReceiptModelResponse": { + "required": [ + "channelDescription", + "companyName", + "creditorReferenceId", + "debtor", + "description", + "fiscalCode", + "idChannel", + "idPSP", + "noticeNumber", + "outcome", + "paymentAmount", + "pspCompanyName", + "receiptId", + "transferList" + ], + "type": "object", + "properties": { + "receiptId": { + "type": "string" + }, + "noticeNumber": { + "type": "string" + }, + "fiscalCode": { + "type": "string" + }, + "outcome": { + "type": "string" + }, + "creditorReferenceId": { + "type": "string" + }, + "paymentAmount": { + "type": "number" + }, + "description": { + "type": "string" + }, + "companyName": { + "type": "string" + }, + "officeName": { + "type": "string" + }, + "debtor": { + "$ref": "#/components/schemas/Debtor" + }, + "transferList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferPA" + } + }, + "idPSP": { + "type": "string" + }, + "pspFiscalCode": { + "type": "string" + }, + "pspPartitaIVA": { + "type": "string" + }, + "pspCompanyName": { + "type": "string" + }, + "idChannel": { + "type": "string" + }, + "channelDescription": { + "type": "string" + }, + "payer": { + "$ref": "#/components/schemas/Payer" + }, + "paymentMethod": { + "type": "string" + }, + "fee": { + "type": "number" + }, + "primaryCiIncurredFee": { + "type": "number" + }, + "idBundle": { + "type": "string" + }, + "idCiBundle": { + "type": "string" + }, + "paymentDateTime": { + "type": "string", + "format": "date" + }, + "applicationDate": { + "type": "string", + "format": "date" + }, + "transferDate": { + "type": "string", + "format": "date" + }, + "metadata": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MapEntry" + } + } } - } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "422": { - "description": "Unable to process the request.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "Debtor": { + "type": "object", + "properties": { + "fullName": { + "type": "string" + }, + "entityUniqueIdentifierType": { + "type": "string" + }, + "entityUniqueIdentifierValue": { + "type": "string" + }, + "streetName": { + "type": "string" + }, + "civicNumber": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "city": { + "type": "string" + }, + "stateProvinceRegion": { + "type": "string" + }, + "country": { + "type": "string" + }, + "eMail": { + "type": "string" + } } - } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "429": { - "description": "Too many requests.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "Service unavailable.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "MapEntry": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } } - } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - } - }, - "security": [ - { - "ApiKey": [] - } - ] - }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } - } - ] - }, - "/info": { - "get": { - "tags": [ - "Home" - ], - "summary": "health check", - "description": "Return OK if application is started", - "operationId": "healthCheck", - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "Payer": { + "type": "object", + "properties": { + "fullName": { + "type": "string" + }, + "entityUniqueIdentifierType": { + "type": "string" + }, + "entityUniqueIdentifierValue": { + "type": "string" + }, + "streetName": { + "type": "string" + }, + "civicNumber": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "city": { + "type": "string" + }, + "stateProvinceRegion": { + "type": "string" + }, + "country": { + "type": "string" + }, + "eMail": { + "type": "string" + } } - } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppInfo" - } - } - } - }, - "400": { - "description": "Bad Request", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "TransferPA": { + "required": [ + "fiscalCodePA", + "iban", + "mbdAttachment", + "remittanceInformation", + "transferAmount", + "transferCategory" + ], + "type": "object", + "properties": { + "idTransfer": { + "maximum": 5, + "minimum": 1, + "type": "integer", + "format": "int32" + }, + "transferAmount": { + "type": "number" + }, + "fiscalCodePA": { + "type": "string" + }, + "iban": { + "type": "string" + }, + "mbdAttachment": { + "type": "string" + }, + "remittanceInformation": { + "type": "string" + }, + "transferCategory": { + "type": "string" + }, + "metadata": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MapEntry" + } + } } - } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "AppInfo": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "version": { + "type": "string" + }, + "environment": { + "type": "string" + } } - } - } - }, - "401": { - "description": "Unauthorized", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, + "AuthRequest": { + "type": "object", + "properties": { + "authOutcome": { + "type": "string" + }, + "guid": { + "type": "string" + }, + "correlationId": { + "type": "string" + }, + "error": { + "type": "string" + }, + "auth_code": { + "type": "string" + } } - } - } - }, - "403": { - "description": "Forbidden", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, + "BizEvent": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "version": { + "type": "string" + }, + "idPaymentManager": { + "type": "string" + }, + "complete": { + "type": "string" + }, + "receiptId": { + "type": "string" + }, + "missingInfo": { + "type": "array", + "items": { + "type": "string" + } + }, + "debtorPosition": { + "$ref": "#/components/schemas/DebtorPosition" + }, + "creditor": { + "$ref": "#/components/schemas/Creditor" + }, + "psp": { + "$ref": "#/components/schemas/Psp" + }, + "debtor": { + "$ref": "#/components/schemas/Debtor" + }, + "payer": { + "$ref": "#/components/schemas/Payer" + }, + "paymentInfo": { + "$ref": "#/components/schemas/PaymentInfo" + }, + "transferList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Transfer" + } + }, + "transactionDetails": { + "$ref": "#/components/schemas/TransactionDetails" + }, + "eventStatus": { + "type": "string", + "enum": [ + "NA", + "RETRY", + "FAILED", + "DONE" + ] + }, + "eventRetryEnrichmentCount": { + "type": "integer", + "format": "int32" + } } - } - } - }, - "429": { - "description": "Too many requests", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, + "Creditor": { + "type": "object", + "properties": { + "idPA": { + "type": "string" + }, + "idBrokerPA": { + "type": "string" + }, + "idStation": { + "type": "string" + }, + "companyName": { + "type": "string" + }, + "officeName": { + "type": "string" + } } - } - } - }, - "500": { - "description": "Service unavailable", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, + "DebtorPosition": { + "type": "object", + "properties": { + "modelType": { + "type": "string" + }, + "noticeNumber": { + "type": "string" + }, + "iuv": { + "type": "string" + } } - } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "Details": { + "type": "object", + "properties": { + "blurredNumber": { + "type": "string" + }, + "holder": { + "type": "string" + }, + "circuit": { + "type": "string" + } } - } - } - } - }, - "security": [ - { - "ApiKey": [] - } - ] - }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } - } - ] - }, - "/organizations/{organizationfiscalcode}/receipts/{iur}/paymentoptions/{iuv}": { - "get": { - "tags": [ - "Payment Receipts REST APIs" - ], - "summary": "The organization get the receipt for the creditor institution.", - "operationId": "getOrganizationReceipt", - "parameters": [ - { - "name": "organizationfiscalcode", - "in": "path", - "description": "The fiscal code of the Organization.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "iur", - "in": "path", - "description": "The unique reference of the operation assigned to the payment (Payment Token).", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "iuv", - "in": "path", - "description": "The unique payment identification. Alphanumeric code that uniquely associates and identifies three key elements of a payment: reason, payer, amount", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Obtained receipt.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, + "Info": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "blurredNumber": { + "type": "string" + }, + "holder": { + "type": "string" + }, + "expireMonth": { + "type": "string" + }, + "expireYear": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "issuerAbi": { + "type": "string" + }, + "issuerName": { + "type": "string" + }, + "label": { + "type": "string" + } } - } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CtReceiptModelResponse" + "MBD": { + "type": "object", + "properties": { + "IUBD": { + "type": "string" + }, + "oraAcquisto": { + "type": "string" + }, + "importo": { + "type": "string" + }, + "tipoBollo": { + "type": "string" + }, + "MBDAttachment": { + "type": "string" + } } - } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, + "PaymentAuthorizationRequest": { + "type": "object", + "properties": { + "authOutcome": { + "type": "string" + }, + "requestId": { + "type": "string" + }, + "correlationId": { + "type": "string" + }, + "authCode": { + "type": "string" + }, + "paymentMethodType": { + "type": "string" + }, + "details": { + "$ref": "#/components/schemas/Details" + } } - } - } - }, - "404": { - "description": "Not found the receipt.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, + "PaymentInfo": { + "type": "object", + "properties": { + "paymentDateTime": { + "type": "string" + }, + "applicationDate": { + "type": "string" + }, + "transferDate": { + "type": "string" + }, + "dueDate": { + "type": "string" + }, + "paymentToken": { + "type": "string" + }, + "amount": { + "type": "string" + }, + "fee": { + "type": "string" + }, + "primaryCiIncurredFee": { + "type": "string" + }, + "idBundle": { + "type": "string" + }, + "idCiBundle": { + "type": "string" + }, + "totalNotice": { + "type": "string" + }, + "paymentMethod": { + "type": "string" + }, + "touchpoint": { + "type": "string" + }, + "remittanceInformation": { + "type": "string" + }, + "description": { + "type": "string" + }, + "metadata": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MapEntry" + } + } } - } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "Psp": { + "type": "object", + "properties": { + "idPsp": { + "type": "string" + }, + "idBrokerPsp": { + "type": "string" + }, + "idChannel": { + "type": "string" + }, + "psp": { + "type": "string" + }, + "pspPartitaIVA": { + "type": "string" + }, + "pspFiscalCode": { + "type": "string" + }, + "channelDescription": { + "type": "string" + } } - } - } - }, - "422": { - "description": "Unable to process the request.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, + "TransactionDetails": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" + }, + "paymentAuthorizationRequest": { + "$ref": "#/components/schemas/PaymentAuthorizationRequest" + }, + "wallet": { + "$ref": "#/components/schemas/WalletItem" + } } - } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "Transfer": { + "type": "object", + "properties": { + "idTransfer": { + "type": "string" + }, + "fiscalCodePA": { + "type": "string" + }, + "companyName": { + "type": "string" + }, + "amount": { + "type": "string" + }, + "transferCategory": { + "type": "string" + }, + "remittanceInformation": { + "type": "string" + }, + "metadata": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MapEntry" + } + }, + "IBAN": { + "type": "string" + }, + "MBD": { + "$ref": "#/components/schemas/MBD" + } } - } - } - }, - "429": { - "description": "Too many requests.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, + "User": { + "type": "object", + "properties": { + "fullName": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "F", + "G" + ] + }, + "fiscalCode": { + "type": "string" + }, + "notificationEmail": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "userStatus": { + "type": "string" + }, + "userStatusDescription": { + "type": "string" + } } - } - } - }, - "500": { - "description": "Service unavailable.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, + "WalletItem": { + "type": "object", + "properties": { + "idWallet": { + "type": "string" + }, + "walletType": { + "type": "string", + "enum": [ + "CARD", + "PAYPAL", + "BANCOMATPAY" + ] + }, + "enableableFunctions": { + "type": "array", + "items": { + "type": "string" + } + }, + "pagoPa": { + "type": "boolean" + }, + "onboardingChannel": { + "type": "string" + }, + "favourite": { + "type": "boolean" + }, + "createDate": { + "type": "string" + }, + "info": { + "$ref": "#/components/schemas/Info" + }, + "authRequest": { + "$ref": "#/components/schemas/AuthRequest" + } } - } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "Link": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "templated": { + "type": "boolean" + } } - } } - } }, - "security": [ - { - "ApiKey": [] - } - ] - }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } - } - ] - } - }, - "components": { - "schemas": { - "ProblemJson": { - "type": "object", - "properties": { - "title": { - "type": "string", - "description": "A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized); example: Service Unavailable" - }, - "status": { - "maximum": 600, - "minimum": 100, - "type": "integer", - "description": "The HTTP status code generated by the origin server for this occurrence of the problem.", - "format": "int32", - "example": 200 - }, - "detail": { - "type": "string", - "description": "A human readable explanation specific to this occurrence of the problem.", - "example": "There was an error processing the request" - } - } - }, - "CtReceiptModelResponse": { - "required": [ - "channelDescription", - "companyName", - "creditorReferenceId", - "debtor", - "description", - "fiscalCode", - "idChannel", - "idPSP", - "noticeNumber", - "outcome", - "paymentAmount", - "pspCompanyName", - "receiptId", - "transferList" - ], - "type": "object", - "properties": { - "receiptId": { - "type": "string" - }, - "noticeNumber": { - "type": "string" - }, - "fiscalCode": { - "type": "string" - }, - "outcome": { - "type": "string" - }, - "creditorReferenceId": { - "type": "string" - }, - "paymentAmount": { - "type": "number" - }, - "description": { - "type": "string" - }, - "companyName": { - "type": "string" - }, - "officeName": { - "type": "string" - }, - "debtor": { - "$ref": "#/components/schemas/Debtor" - }, - "transferList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransferPA" - } - }, - "idPSP": { - "type": "string" - }, - "pspFiscalCode": { - "type": "string" - }, - "pspPartitaIVA": { - "type": "string" - }, - "pspCompanyName": { - "type": "string" - }, - "idChannel": { - "type": "string" - }, - "channelDescription": { - "type": "string" - }, - "payer": { - "$ref": "#/components/schemas/Payer" - }, - "paymentMethod": { - "type": "string" - }, - "fee": { - "type": "number" - }, - "primaryCiIncurredFee": { - "type": "number" - }, - "idBundle": { - "type": "string" - }, - "idCiBundle": { - "type": "string" - }, - "paymentDateTime": { - "type": "string", - "format": "date" - }, - "applicationDate": { - "type": "string", - "format": "date" - }, - "transferDate": { - "type": "string", - "format": "date" - }, - "metadata": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MapEntry" - } - } - } - }, - "Debtor": { - "required": [ - "entityUniqueIdentifierType", - "entityUniqueIdentifierValue", - "fullName" - ], - "type": "object", - "properties": { - "entityUniqueIdentifierType": { - "type": "string", - "enum": [ - "F", - "G" - ] - }, - "entityUniqueIdentifierValue": { - "type": "string" - }, - "fullName": { - "type": "string" - }, - "streetName": { - "type": "string" - }, - "civicNumber": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "city": { - "type": "string" - }, - "stateProvinceRegion": { - "type": "string" - }, - "country": { - "type": "string" - }, - "email": { - "type": "string" - } - } - }, - "MapEntry": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "value": { - "type": "string" - } - } - }, - "Payer": { - "required": [ - "entityUniqueIdentifierType", - "entityUniqueIdentifierValue", - "fullName" - ], - "type": "object", - "properties": { - "entityUniqueIdentifierType": { - "type": "string", - "enum": [ - "F", - "G" - ] - }, - "entityUniqueIdentifierValue": { - "type": "string" - }, - "fullName": { - "type": "string" - }, - "streetName": { - "type": "string" - }, - "civicNumber": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "city": { - "type": "string" - }, - "stateProvinceRegion": { - "type": "string" - }, - "country": { - "type": "string" - }, - "email": { - "type": "string" - } - } - }, - "TransferPA": { - "required": [ - "fiscalCodePA", - "iban", - "mbdAttachment", - "remittanceInformation", - "transferAmount", - "transferCategory" - ], - "type": "object", - "properties": { - "idTransfer": { - "maximum": 5, - "minimum": 1, - "type": "integer", - "format": "int32" - }, - "transferAmount": { - "type": "number" - }, - "fiscalCodePA": { - "type": "string" - }, - "iban": { - "type": "string" - }, - "mbdAttachment": { - "type": "string" - }, - "remittanceInformation": { - "type": "string" - }, - "transferCategory": { - "type": "string" - }, - "metadata": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MapEntry" + "securitySchemes": { + "ApiKey": { + "type": "apiKey", + "description": "The API key to access this function app.", + "name": "Ocp-Apim-Subscription-Key", + "in": "header" } - } - } - }, - "AppInfo": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "version": { - "type": "string" - }, - "environment": { - "type": "string" - } } - }, - "AuthRequest": { - "type": "object", - "properties": { - "authOutcome": { - "type": "string" - }, - "guid": { - "type": "string" - }, - "correlationId": { - "type": "string" - }, - "error": { - "type": "string" - }, - "auth_code": { - "type": "string" - } - } - }, - "BizEvent": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "version": { - "type": "string" - }, - "idPaymentManager": { - "type": "string" - }, - "complete": { - "type": "string" - }, - "receiptId": { - "type": "string" - }, - "missingInfo": { - "type": "array", - "items": { - "type": "string" - } - }, - "debtorPosition": { - "$ref": "#/components/schemas/DebtorPosition" - }, - "creditor": { - "$ref": "#/components/schemas/Creditor" - }, - "psp": { - "$ref": "#/components/schemas/Psp" - }, - "debtor": { - "$ref": "#/components/schemas/Debtor" - }, - "payer": { - "$ref": "#/components/schemas/Payer" - }, - "paymentInfo": { - "$ref": "#/components/schemas/PaymentInfo" - }, - "transferList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Transfer" - } - }, - "transactionDetails": { - "$ref": "#/components/schemas/TransactionDetails" - }, - "eventStatus": { - "type": "string", - "enum": [ - "NA", - "RETRY", - "FAILED", - "DONE" - ] - }, - "eventRetryEnrichmentCount": { - "type": "integer", - "format": "int32" - } - } - }, - "Creditor": { - "type": "object", - "properties": { - "idPA": { - "type": "string" - }, - "idBrokerPA": { - "type": "string" - }, - "idStation": { - "type": "string" - }, - "companyName": { - "type": "string" - }, - "officeName": { - "type": "string" - } - } - }, - "DebtorPosition": { - "type": "object", - "properties": { - "modelType": { - "type": "string" - }, - "noticeNumber": { - "type": "string" - }, - "iuv": { - "type": "string" - } - } - }, - "Details": { - "type": "object", - "properties": { - "blurredNumber": { - "type": "string" - }, - "holder": { - "type": "string" - }, - "circuit": { - "type": "string" - } - } - }, - "Info": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "blurredNumber": { - "type": "string" - }, - "holder": { - "type": "string" - }, - "expireMonth": { - "type": "string" - }, - "expireYear": { - "type": "string" - }, - "brand": { - "type": "string" - }, - "issuerAbi": { - "type": "string" - }, - "issuerName": { - "type": "string" - }, - "label": { - "type": "string" - } - } - }, - "MBD": { - "type": "object", - "properties": { - "IUBD": { - "type": "string" - }, - "oraAcquisto": { - "type": "string" - }, - "importo": { - "type": "string" - }, - "tipoBollo": { - "type": "string" - }, - "MBDAttachment": { - "type": "string" - } - } - }, - "PaymentAuthorizationRequest": { - "type": "object", - "properties": { - "authOutcome": { - "type": "string" - }, - "requestId": { - "type": "string" - }, - "correlationId": { - "type": "string" - }, - "authCode": { - "type": "string" - }, - "paymentMethodType": { - "type": "string" - }, - "details": { - "$ref": "#/components/schemas/Details" - } - } - }, - "PaymentInfo": { - "type": "object", - "properties": { - "paymentDateTime": { - "type": "string" - }, - "applicationDate": { - "type": "string" - }, - "transferDate": { - "type": "string" - }, - "dueDate": { - "type": "string" - }, - "paymentToken": { - "type": "string" - }, - "amount": { - "type": "string" - }, - "fee": { - "type": "string" - }, - "primaryCiIncurredFee": { - "type": "string" - }, - "idBundle": { - "type": "string" - }, - "idCiBundle": { - "type": "string" - }, - "totalNotice": { - "type": "string" - }, - "paymentMethod": { - "type": "string" - }, - "touchpoint": { - "type": "string" - }, - "remittanceInformation": { - "type": "string" - }, - "description": { - "type": "string" - }, - "metadata": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MapEntry" - } - } - } - }, - "Psp": { - "type": "object", - "properties": { - "idPsp": { - "type": "string" - }, - "idBrokerPsp": { - "type": "string" - }, - "idChannel": { - "type": "string" - }, - "psp": { - "type": "string" - }, - "pspPartitaIVA": { - "type": "string" - }, - "pspFiscalCode": { - "type": "string" - }, - "channelDescription": { - "type": "string" - } - } - }, - "TransactionDetails": { - "type": "object", - "properties": { - "user": { - "$ref": "#/components/schemas/User" - }, - "paymentAuthorizationRequest": { - "$ref": "#/components/schemas/PaymentAuthorizationRequest" - }, - "wallet": { - "$ref": "#/components/schemas/WalletItem" - } - } - }, - "Transfer": { - "type": "object", - "properties": { - "idTransfer": { - "type": "string" - }, - "fiscalCodePA": { - "type": "string" - }, - "companyName": { - "type": "string" - }, - "amount": { - "type": "string" - }, - "transferCategory": { - "type": "string" - }, - "remittanceInformation": { - "type": "string" - }, - "metadata": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MapEntry" - } - }, - "IBAN": { - "type": "string" - }, - "MBD": { - "$ref": "#/components/schemas/MBD" - } - } - }, - "User": { - "type": "object", - "properties": { - "fullName": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "F", - "G" - ] - }, - "fiscalCode": { - "type": "string" - }, - "notificationEmail": { - "type": "string" - }, - "userId": { - "type": "string" - }, - "userStatus": { - "type": "string" - }, - "userStatusDescription": { - "type": "string" - } - } - }, - "WalletItem": { - "type": "object", - "properties": { - "idWallet": { - "type": "string" - }, - "walletType": { - "type": "string", - "enum": [ - "CARD", - "PAYPAL", - "BANCOMATPAY" - ] - }, - "enableableFunctions": { - "type": "array", - "items": { - "type": "string" - } - }, - "pagoPa": { - "type": "boolean" - }, - "onboardingChannel": { - "type": "string" - }, - "favourite": { - "type": "boolean" - }, - "createDate": { - "type": "string" - }, - "info": { - "$ref": "#/components/schemas/Info" - }, - "authRequest": { - "$ref": "#/components/schemas/AuthRequest" - } - } - }, - "Link": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "templated": { - "type": "boolean" - } - } - } - }, - "securitySchemes": { - "ApiKey": { - "type": "apiKey", - "description": "The API key to access this function app.", - "name": "Ocp-Apim-Subscription-Key", - "in": "header" - } } - } } From 9f868f8204edc27367ddb49662ef821be8e64367 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Thu, 11 Jan 2024 09:36:42 +0100 Subject: [PATCH 06/12] PAGOPA-1404 update openapi change operationId --- openapi/openapi.json | 4 ++-- .../bizeventsservice/controller/IPaymentsController.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/openapi/openapi.json b/openapi/openapi.json index 40bdef89..2814d222 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -628,7 +628,7 @@ "Payment Receipts REST APIs" ], "summary": "The organization get the receipt for the creditor institution.", - "operationId": "getOrganizationReceipt", + "operationId": "getOrganizationReceiptIur", "parameters": [ { "name": "organizationfiscalcode", @@ -768,7 +768,7 @@ "Payment Receipts REST APIs" ], "summary": "The organization get the receipt for the creditor institution.", - "operationId": "getOrganizationReceipt_1", + "operationId": "getOrganizationReceiptIuvIur", "parameters": [ { "name": "organizationfiscalcode", diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/controller/IPaymentsController.java b/src/main/java/it/gov/pagopa/bizeventsservice/controller/IPaymentsController.java index 998db0cb..0d11c976 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/controller/IPaymentsController.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/controller/IPaymentsController.java @@ -26,7 +26,7 @@ @Validated public interface IPaymentsController { - @Operation(summary = "The organization get the receipt for the creditor institution.", security = {@SecurityRequirement(name = "ApiKey")}, operationId = "getOrganizationReceipt") + @Operation(summary = "The organization get the receipt for the creditor institution.", security = {@SecurityRequirement(name = "ApiKey")}, operationId = "getOrganizationReceiptIuvIur") @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Obtained receipt.", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, schema = @Schema(name = "CtReceipt", implementation = CtReceiptModelResponse.class))), @ApiResponse(responseCode = "401", description = "Wrong or missing function key.", content = @Content(schema = @Schema())), @@ -44,7 +44,7 @@ ResponseEntity getOrganizationReceipt( @Parameter(description = "The unique payment identification. Alphanumeric code that uniquely associates and identifies three key elements of a payment: reason, payer, amount", required = true) @NotBlank @PathVariable("iuv") String iuv); - @Operation(summary = "The organization get the receipt for the creditor institution.", security = {@SecurityRequirement(name = "ApiKey")}, operationId = "getOrganizationReceipt") + @Operation(summary = "The organization get the receipt for the creditor institution.", security = {@SecurityRequirement(name = "ApiKey")}, operationId = "getOrganizationReceiptIur") @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Obtained receipt.", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, schema = @Schema(name = "CtReceipt", implementation = CtReceiptModelResponse.class))), @ApiResponse(responseCode = "401", description = "Wrong or missing function key.", content = @Content(schema = @Schema())), From 8445c10674f42468e9823dd39a303da5cb6df58f Mon Sep 17 00:00:00 2001 From: pagopa-github-bot Date: Thu, 11 Jan 2024 08:43:25 +0000 Subject: [PATCH 07/12] Bump to version 0.1.1-1-PAGOPA-1404-sviluppo-modifiche-get-organization-receipt [skip ci] --- helm/Chart.yaml | 4 +- helm/values-dev.yaml | 2 +- helm/values-prod.yaml | 2 +- helm/values-uat.yaml | 2 +- openapi/openapi.json | 3098 ++++++++++++++++++++--------------------- pom.xml | 2 +- 6 files changed, 1555 insertions(+), 1555 deletions(-) diff --git a/helm/Chart.yaml b/helm/Chart.yaml index e72170bd..40ea3cad 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: pagopa-biz-events-service description: Microservice for exposing REST APIs about payment receipts. type: application -version: 0.20.0 -appVersion: 0.1.1 +version: 0.21.0 +appVersion: 0.1.1-1-PAGOPA-1404-sviluppo-modifiche-get-organization-receipt dependencies: - name: microservice-chart version: 2.4.0 diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index 60a5494c..76c039d8 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "" image: repository: ghcr.io/pagopa/pagopa-biz-events-service - tag: "0.1.1" + tag: "0.1.1-1-PAGOPA-1404-sviluppo-modifiche-get-organization-receipt" pullPolicy: Always livenessProbe: httpGet: diff --git a/helm/values-prod.yaml b/helm/values-prod.yaml index 52b660a2..65775699 100644 --- a/helm/values-prod.yaml +++ b/helm/values-prod.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "" image: repository: ghcr.io/pagopa/pagopa-biz-events-service - tag: "0.1.1" + tag: "0.1.1-1-PAGOPA-1404-sviluppo-modifiche-get-organization-receipt" pullPolicy: Always livenessProbe: httpGet: diff --git a/helm/values-uat.yaml b/helm/values-uat.yaml index 63289ffe..3fd762a2 100644 --- a/helm/values-uat.yaml +++ b/helm/values-uat.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "" image: repository: ghcr.io/pagopa/pagopa-biz-events-service - tag: "0.1.1" + tag: "0.1.1-1-PAGOPA-1404-sviluppo-modifiche-get-organization-receipt" pullPolicy: Always livenessProbe: httpGet: diff --git a/openapi/openapi.json b/openapi/openapi.json index 2814d222..b5dee636 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -1,1619 +1,1619 @@ { - "openapi": "3.0.1", - "info": { - "title": "Biz-Events Service", - "description": "Microservice for exposing REST APIs about payment receipts.", - "termsOfService": "https://www.pagopa.gov.it/", - "version": "0.1.1" - }, - "servers": [ - { - "url": "http://localhost:8080", - "description": "Generated server url" - } - ], - "tags": [ - { - "name": "Actuator", - "description": "Monitor and interact", - "externalDocs": { - "description": "Spring Boot Actuator Web API Documentation", - "url": "https://docs.spring.io/spring-boot/docs/current/actuator-api/html/" - } - } - ], - "paths": { - "/actuator": { - "get": { - "tags": [ - "Actuator" - ], - "summary": "Actuator root web endpoint", - "operationId": "links", - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/vnd.spring-boot.actuator.v3+json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - } - } - } - }, - "application/vnd.spring-boot.actuator.v2+json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - } - } - } - }, - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - } - } - } - } - } - } + "openapi": "3.0.1", + "info": { + "title": "Biz-Events Service", + "description": "Microservice for exposing REST APIs about payment receipts.", + "termsOfService": "https://www.pagopa.gov.it/", + "version": "0.1.1-1-PAGOPA-1404-sviluppo-modifiche-get-organization-receipt" + }, + "servers": [ + { + "url": "http://localhost:8080", + "description": "Generated server url" + } + ], + "tags": [ + { + "name": "Actuator", + "description": "Monitor and interact", + "externalDocs": { + "description": "Spring Boot Actuator Web API Documentation", + "url": "https://docs.spring.io/spring-boot/docs/current/actuator-api/html/" + } + } + ], + "paths": { + "/actuator": { + "get": { + "tags": [ + "Actuator" + ], + "summary": "Actuator root web endpoint", + "operationId": "links", + "responses": { + "200": { + "description": "OK", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } + } }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" + "content": { + "application/vnd.spring-boot.actuator.v3+json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" } + } } - ] - }, - "/actuator/health": { - "get": { - "tags": [ - "Actuator" - ], - "summary": "Actuator web endpoint 'health'", - "operationId": "health", - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/vnd.spring-boot.actuator.v3+json": { - "schema": { - "type": "object" - } - }, - "application/vnd.spring-boot.actuator.v2+json": { - "schema": { - "type": "object" - } - }, - "application/json": { - "schema": { - "type": "object" - } - } - } + }, + "application/vnd.spring-boot.actuator.v2+json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" } + } } - }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" + }, + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" } + } } - ] - }, - "/actuator/health/**": { - "get": { - "tags": [ - "Actuator" - ], - "summary": "Actuator web endpoint 'health-path'", - "operationId": "health-path", - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/vnd.spring-boot.actuator.v3+json": { - "schema": { - "type": "object" - } - }, - "application/vnd.spring-boot.actuator.v2+json": { - "schema": { - "type": "object" - } - }, - "application/json": { - "schema": { - "type": "object" - } - } - } - } + } + } + } + } + }, + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } + } + ] + }, + "/actuator/health": { + "get": { + "tags": [ + "Actuator" + ], + "summary": "Actuator web endpoint 'health'", + "operationId": "health", + "responses": { + "200": { + "description": "OK", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } + } }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } + "content": { + "application/vnd.spring-boot.actuator.v3+json": { + "schema": { + "type": "object" } - ] - }, - "/actuator/info": { - "get": { - "tags": [ - "Actuator" - ], - "summary": "Actuator web endpoint 'info'", - "operationId": "info", - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/vnd.spring-boot.actuator.v3+json": { - "schema": { - "type": "object" - } - }, - "application/vnd.spring-boot.actuator.v2+json": { - "schema": { - "type": "object" - } - }, - "application/json": { - "schema": { - "type": "object" - } - } - } - } + }, + "application/vnd.spring-boot.actuator.v2+json": { + "schema": { + "type": "object" } - }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } + }, + "application/json": { + "schema": { + "type": "object" } - ] - }, - "/events/organizations/{organization-fiscal-code}/iuvs/{iuv}": { - "get": { - "tags": [ - "get BizEvent APIs" - ], - "summary": "Retrieve the biz-event given the organization fiscal code and IUV.", - "operationId": "getBizEventByOrganizationFiscalCodeAndIuv", - "parameters": [ - { - "name": "organization-fiscal-code", - "in": "path", - "description": "The fiscal code of the Organization.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "iuv", - "in": "path", - "description": "The unique payment identification. Alphanumeric code that uniquely associates and identifies three key elements of a payment: reason, payer, amount", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Obtained biz-event.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BizEvent" - } - } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "Not found the biz-event.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "422": { - "description": "Unable to process the request.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "429": { - "description": "Too many requests.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "Service unavailable.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - } - }, - "security": [ - { - "ApiKey": [] - } - ] - }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } + } + } + } + } + }, + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } + } + ] + }, + "/actuator/health/**": { + "get": { + "tags": [ + "Actuator" + ], + "summary": "Actuator web endpoint 'health-path'", + "operationId": "health-path", + "responses": { + "200": { + "description": "OK", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } - ] - }, - "/events/{biz-event-id}": { - "get": { - "tags": [ - "get BizEvent APIs" - ], - "summary": "Retrieve the biz-event given its id.", - "operationId": "getBizEvent", - "parameters": [ - { - "name": "biz-event-id", - "in": "path", - "description": "The id of the biz-event.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Obtained biz-event.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BizEvent" - } - } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "Not found the biz-event.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "422": { - "description": "Unable to process the request.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "429": { - "description": "Too many requests.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "Service unavailable.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - } - }, - "security": [ - { - "ApiKey": [] - } - ] + } }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } + "content": { + "application/vnd.spring-boot.actuator.v3+json": { + "schema": { + "type": "object" } - ] - }, - "/info": { - "get": { - "tags": [ - "Home" - ], - "summary": "health check", - "description": "Return OK if application is started", - "operationId": "healthCheck", - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppInfo" - } - } - } - }, - "400": { - "description": "Bad Request", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "401": { - "description": "Unauthorized", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "description": "Forbidden", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "description": "Too many requests", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "Service unavailable", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - } - }, - "security": [ - { - "ApiKey": [] - } - ] - }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } + }, + "application/vnd.spring-boot.actuator.v2+json": { + "schema": { + "type": "object" } - ] - }, - "/organizations/{organizationfiscalcode}/receipts/{iur}": { - "get": { - "tags": [ - "Payment Receipts REST APIs" - ], - "summary": "The organization get the receipt for the creditor institution.", - "operationId": "getOrganizationReceiptIur", - "parameters": [ - { - "name": "organizationfiscalcode", - "in": "path", - "description": "The fiscal code of the Organization.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "iur", - "in": "path", - "description": "The unique reference of the operation assigned to the payment (Payment Token).", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Obtained receipt.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CtReceiptModelResponse" - } - } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "Not found the receipt.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "422": { - "description": "Unable to process the request.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "429": { - "description": "Too many requests.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "Service unavailable.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - } - }, - "security": [ - { - "ApiKey": [] - } - ] - }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } + }, + "application/json": { + "schema": { + "type": "object" } - ] - }, - "/organizations/{organizationfiscalcode}/receipts/{iur}/paymentoptions/{iuv}": { - "get": { - "tags": [ - "Payment Receipts REST APIs" - ], - "summary": "The organization get the receipt for the creditor institution.", - "operationId": "getOrganizationReceiptIuvIur", - "parameters": [ - { - "name": "organizationfiscalcode", - "in": "path", - "description": "The fiscal code of the Organization.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "iur", - "in": "path", - "description": "The unique reference of the operation assigned to the payment (Payment Token).", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "iuv", - "in": "path", - "description": "The unique payment identification. Alphanumeric code that uniquely associates and identifies three key elements of a payment: reason, payer, amount", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Obtained receipt.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CtReceiptModelResponse" - } - } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "Not found the receipt.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "422": { - "description": "Unable to process the request.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "429": { - "description": "Too many requests.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "Service unavailable.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - } - }, - "security": [ - { - "ApiKey": [] - } - ] + } + } + } + } + }, + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } + } + ] + }, + "/actuator/info": { + "get": { + "tags": [ + "Actuator" + ], + "summary": "Actuator web endpoint 'info'", + "operationId": "info", + "responses": { + "200": { + "description": "OK", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } + "content": { + "application/vnd.spring-boot.actuator.v3+json": { + "schema": { + "type": "object" } - ] + }, + "application/vnd.spring-boot.actuator.v2+json": { + "schema": { + "type": "object" + } + }, + "application/json": { + "schema": { + "type": "object" + } + } + } + } + } + }, + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } } + ] }, - "components": { - "schemas": { - "ProblemJson": { - "type": "object", - "properties": { - "title": { - "type": "string", - "description": "A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized); example: Service Unavailable" - }, - "status": { - "maximum": 600, - "minimum": 100, - "type": "integer", - "description": "The HTTP status code generated by the origin server for this occurrence of the problem.", - "format": "int32", - "example": 200 - }, - "detail": { - "type": "string", - "description": "A human readable explanation specific to this occurrence of the problem.", - "example": "There was an error processing the request" - } + "/events/organizations/{organization-fiscal-code}/iuvs/{iuv}": { + "get": { + "tags": [ + "get BizEvent APIs" + ], + "summary": "Retrieve the biz-event given the organization fiscal code and IUV.", + "operationId": "getBizEventByOrganizationFiscalCodeAndIuv", + "parameters": [ + { + "name": "organization-fiscal-code", + "in": "path", + "description": "The fiscal code of the Organization.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "iuv", + "in": "path", + "description": "The unique payment identification. Alphanumeric code that uniquely associates and identifies three key elements of a payment: reason, payer, amount", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Obtained biz-event.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } + } }, - "CtReceiptModelResponse": { - "required": [ - "channelDescription", - "companyName", - "creditorReferenceId", - "debtor", - "description", - "fiscalCode", - "idChannel", - "idPSP", - "noticeNumber", - "outcome", - "paymentAmount", - "pspCompanyName", - "receiptId", - "transferList" - ], - "type": "object", - "properties": { - "receiptId": { - "type": "string" - }, - "noticeNumber": { - "type": "string" - }, - "fiscalCode": { - "type": "string" - }, - "outcome": { - "type": "string" - }, - "creditorReferenceId": { - "type": "string" - }, - "paymentAmount": { - "type": "number" - }, - "description": { - "type": "string" - }, - "companyName": { - "type": "string" - }, - "officeName": { - "type": "string" - }, - "debtor": { - "$ref": "#/components/schemas/Debtor" - }, - "transferList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransferPA" - } - }, - "idPSP": { - "type": "string" - }, - "pspFiscalCode": { - "type": "string" - }, - "pspPartitaIVA": { - "type": "string" - }, - "pspCompanyName": { - "type": "string" - }, - "idChannel": { - "type": "string" - }, - "channelDescription": { - "type": "string" - }, - "payer": { - "$ref": "#/components/schemas/Payer" - }, - "paymentMethod": { - "type": "string" - }, - "fee": { - "type": "number" - }, - "primaryCiIncurredFee": { - "type": "number" - }, - "idBundle": { - "type": "string" - }, - "idCiBundle": { - "type": "string" - }, - "paymentDateTime": { - "type": "string", - "format": "date" - }, - "applicationDate": { - "type": "string", - "format": "date" - }, - "transferDate": { - "type": "string", - "format": "date" - }, - "metadata": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MapEntry" - } - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BizEvent" } - }, - "Debtor": { - "type": "object", - "properties": { - "fullName": { - "type": "string" - }, - "entityUniqueIdentifierType": { - "type": "string" - }, - "entityUniqueIdentifierValue": { - "type": "string" - }, - "streetName": { - "type": "string" - }, - "civicNumber": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "city": { - "type": "string" - }, - "stateProvinceRegion": { - "type": "string" - }, - "country": { - "type": "string" - }, - "eMail": { - "type": "string" - } + } + } + }, + "401": { + "description": "Wrong or missing function key.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } - }, - "MapEntry": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "value": { - "type": "string" - } + } + } + }, + "404": { + "description": "Not found the biz-event.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } + } }, - "Payer": { - "type": "object", - "properties": { - "fullName": { - "type": "string" - }, - "entityUniqueIdentifierType": { - "type": "string" - }, - "entityUniqueIdentifierValue": { - "type": "string" - }, - "streetName": { - "type": "string" - }, - "civicNumber": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "city": { - "type": "string" - }, - "stateProvinceRegion": { - "type": "string" - }, - "country": { - "type": "string" - }, - "eMail": { - "type": "string" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "422": { + "description": "Unable to process the request.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } + } }, - "TransferPA": { - "required": [ - "fiscalCodePA", - "iban", - "mbdAttachment", - "remittanceInformation", - "transferAmount", - "transferCategory" - ], - "type": "object", - "properties": { - "idTransfer": { - "maximum": 5, - "minimum": 1, - "type": "integer", - "format": "int32" - }, - "transferAmount": { - "type": "number" - }, - "fiscalCodePA": { - "type": "string" - }, - "iban": { - "type": "string" - }, - "mbdAttachment": { - "type": "string" - }, - "remittanceInformation": { - "type": "string" - }, - "transferCategory": { - "type": "string" - }, - "metadata": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MapEntry" - } - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "429": { + "description": "Too many requests.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } + } + } + }, + "500": { + "description": "Service unavailable.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } }, - "AppInfo": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "version": { - "type": "string" - }, - "environment": { - "type": "string" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } + } + } + } + }, + "security": [ + { + "ApiKey": [] + } + ] + }, + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } + } + ] + }, + "/events/{biz-event-id}": { + "get": { + "tags": [ + "get BizEvent APIs" + ], + "summary": "Retrieve the biz-event given its id.", + "operationId": "getBizEvent", + "parameters": [ + { + "name": "biz-event-id", + "in": "path", + "description": "The id of the biz-event.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Obtained biz-event.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } }, - "AuthRequest": { - "type": "object", - "properties": { - "authOutcome": { - "type": "string" - }, - "guid": { - "type": "string" - }, - "correlationId": { - "type": "string" - }, - "error": { - "type": "string" - }, - "auth_code": { - "type": "string" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BizEvent" + } + } + } + }, + "401": { + "description": "Wrong or missing function key.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } + } + } + }, + "404": { + "description": "Not found the biz-event.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } }, - "BizEvent": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "version": { - "type": "string" - }, - "idPaymentManager": { - "type": "string" - }, - "complete": { - "type": "string" - }, - "receiptId": { - "type": "string" - }, - "missingInfo": { - "type": "array", - "items": { - "type": "string" - } - }, - "debtorPosition": { - "$ref": "#/components/schemas/DebtorPosition" - }, - "creditor": { - "$ref": "#/components/schemas/Creditor" - }, - "psp": { - "$ref": "#/components/schemas/Psp" - }, - "debtor": { - "$ref": "#/components/schemas/Debtor" - }, - "payer": { - "$ref": "#/components/schemas/Payer" - }, - "paymentInfo": { - "$ref": "#/components/schemas/PaymentInfo" - }, - "transferList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Transfer" - } - }, - "transactionDetails": { - "$ref": "#/components/schemas/TransactionDetails" - }, - "eventStatus": { - "type": "string", - "enum": [ - "NA", - "RETRY", - "FAILED", - "DONE" - ] - }, - "eventRetryEnrichmentCount": { - "type": "integer", - "format": "int32" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } + } + } + }, + "422": { + "description": "Unable to process the request.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } }, - "Creditor": { - "type": "object", - "properties": { - "idPA": { - "type": "string" - }, - "idBrokerPA": { - "type": "string" - }, - "idStation": { - "type": "string" - }, - "companyName": { - "type": "string" - }, - "officeName": { - "type": "string" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "429": { + "description": "Too many requests.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "Service unavailable.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } + } }, - "DebtorPosition": { - "type": "object", - "properties": { - "modelType": { - "type": "string" - }, - "noticeNumber": { - "type": "string" - }, - "iuv": { - "type": "string" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + } + }, + "security": [ + { + "ApiKey": [] + } + ] + }, + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } + } + ] + }, + "/info": { + "get": { + "tags": [ + "Home" + ], + "summary": "health check", + "description": "Return OK if application is started", + "operationId": "healthCheck", + "responses": { + "200": { + "description": "OK", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } + } }, - "Details": { - "type": "object", - "properties": { - "blurredNumber": { - "type": "string" - }, - "holder": { - "type": "string" - }, - "circuit": { - "type": "string" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppInfo" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } + } }, - "Info": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "blurredNumber": { - "type": "string" - }, - "holder": { - "type": "string" - }, - "expireMonth": { - "type": "string" - }, - "expireYear": { - "type": "string" - }, - "brand": { - "type": "string" - }, - "issuerAbi": { - "type": "string" - }, - "issuerName": { - "type": "string" - }, - "label": { - "type": "string" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } + } + } + }, + "401": { + "description": "Unauthorized", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "403": { + "description": "Forbidden", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "429": { + "description": "Too many requests", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "Service unavailable", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } }, - "MBD": { - "type": "object", - "properties": { - "IUBD": { - "type": "string" - }, - "oraAcquisto": { - "type": "string" - }, - "importo": { - "type": "string" - }, - "tipoBollo": { - "type": "string" - }, - "MBDAttachment": { - "type": "string" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } + } + } + } + }, + "security": [ + { + "ApiKey": [] + } + ] + }, + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } + } + ] + }, + "/organizations/{organizationfiscalcode}/receipts/{iur}": { + "get": { + "tags": [ + "Payment Receipts REST APIs" + ], + "summary": "The organization get the receipt for the creditor institution.", + "operationId": "getOrganizationReceiptIur", + "parameters": [ + { + "name": "organizationfiscalcode", + "in": "path", + "description": "The fiscal code of the Organization.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "iur", + "in": "path", + "description": "The unique reference of the operation assigned to the payment (Payment Token).", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Obtained receipt.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } }, - "PaymentAuthorizationRequest": { - "type": "object", - "properties": { - "authOutcome": { - "type": "string" - }, - "requestId": { - "type": "string" - }, - "correlationId": { - "type": "string" - }, - "authCode": { - "type": "string" - }, - "paymentMethodType": { - "type": "string" - }, - "details": { - "$ref": "#/components/schemas/Details" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CtReceiptModelResponse" + } + } + } + }, + "401": { + "description": "Wrong or missing function key.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } + } + } + }, + "404": { + "description": "Not found the receipt.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } }, - "PaymentInfo": { - "type": "object", - "properties": { - "paymentDateTime": { - "type": "string" - }, - "applicationDate": { - "type": "string" - }, - "transferDate": { - "type": "string" - }, - "dueDate": { - "type": "string" - }, - "paymentToken": { - "type": "string" - }, - "amount": { - "type": "string" - }, - "fee": { - "type": "string" - }, - "primaryCiIncurredFee": { - "type": "string" - }, - "idBundle": { - "type": "string" - }, - "idCiBundle": { - "type": "string" - }, - "totalNotice": { - "type": "string" - }, - "paymentMethod": { - "type": "string" - }, - "touchpoint": { - "type": "string" - }, - "remittanceInformation": { - "type": "string" - }, - "description": { - "type": "string" - }, - "metadata": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MapEntry" - } - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } + } + } + }, + "422": { + "description": "Unable to process the request.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } }, - "Psp": { - "type": "object", - "properties": { - "idPsp": { - "type": "string" - }, - "idBrokerPsp": { - "type": "string" - }, - "idChannel": { - "type": "string" - }, - "psp": { - "type": "string" - }, - "pspPartitaIVA": { - "type": "string" - }, - "pspFiscalCode": { - "type": "string" - }, - "channelDescription": { - "type": "string" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "429": { + "description": "Too many requests.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "Service unavailable.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } + } }, - "TransactionDetails": { - "type": "object", - "properties": { - "user": { - "$ref": "#/components/schemas/User" - }, - "paymentAuthorizationRequest": { - "$ref": "#/components/schemas/PaymentAuthorizationRequest" - }, - "wallet": { - "$ref": "#/components/schemas/WalletItem" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } + } + } + } + }, + "security": [ + { + "ApiKey": [] + } + ] + }, + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } + } + ] + }, + "/organizations/{organizationfiscalcode}/receipts/{iur}/paymentoptions/{iuv}": { + "get": { + "tags": [ + "Payment Receipts REST APIs" + ], + "summary": "The organization get the receipt for the creditor institution.", + "operationId": "getOrganizationReceiptIuvIur", + "parameters": [ + { + "name": "organizationfiscalcode", + "in": "path", + "description": "The fiscal code of the Organization.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "iur", + "in": "path", + "description": "The unique reference of the operation assigned to the payment (Payment Token).", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "iuv", + "in": "path", + "description": "The unique payment identification. Alphanumeric code that uniquely associates and identifies three key elements of a payment: reason, payer, amount", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Obtained receipt.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } }, - "Transfer": { - "type": "object", - "properties": { - "idTransfer": { - "type": "string" - }, - "fiscalCodePA": { - "type": "string" - }, - "companyName": { - "type": "string" - }, - "amount": { - "type": "string" - }, - "transferCategory": { - "type": "string" - }, - "remittanceInformation": { - "type": "string" - }, - "metadata": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MapEntry" - } - }, - "IBAN": { - "type": "string" - }, - "MBD": { - "$ref": "#/components/schemas/MBD" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CtReceiptModelResponse" + } + } + } + }, + "401": { + "description": "Wrong or missing function key.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } + } + } + }, + "404": { + "description": "Not found the receipt.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } }, - "User": { - "type": "object", - "properties": { - "fullName": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "F", - "G" - ] - }, - "fiscalCode": { - "type": "string" - }, - "notificationEmail": { - "type": "string" - }, - "userId": { - "type": "string" - }, - "userStatus": { - "type": "string" - }, - "userStatusDescription": { - "type": "string" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } + } + } + }, + "422": { + "description": "Unable to process the request.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } }, - "WalletItem": { - "type": "object", - "properties": { - "idWallet": { - "type": "string" - }, - "walletType": { - "type": "string", - "enum": [ - "CARD", - "PAYPAL", - "BANCOMATPAY" - ] - }, - "enableableFunctions": { - "type": "array", - "items": { - "type": "string" - } - }, - "pagoPa": { - "type": "boolean" - }, - "onboardingChannel": { - "type": "string" - }, - "favourite": { - "type": "boolean" - }, - "createDate": { - "type": "string" - }, - "info": { - "$ref": "#/components/schemas/Info" - }, - "authRequest": { - "$ref": "#/components/schemas/AuthRequest" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } + } + } + }, + "429": { + "description": "Too many requests.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "Service unavailable.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } }, - "Link": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "templated": { - "type": "boolean" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } + } } + } }, - "securitySchemes": { - "ApiKey": { - "type": "apiKey", - "description": "The API key to access this function app.", - "name": "Ocp-Apim-Subscription-Key", - "in": "header" + "security": [ + { + "ApiKey": [] + } + ] + }, + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } + } + ] + } + }, + "components": { + "schemas": { + "ProblemJson": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized); example: Service Unavailable" + }, + "status": { + "maximum": 600, + "minimum": 100, + "type": "integer", + "description": "The HTTP status code generated by the origin server for this occurrence of the problem.", + "format": "int32", + "example": 200 + }, + "detail": { + "type": "string", + "description": "A human readable explanation specific to this occurrence of the problem.", + "example": "There was an error processing the request" + } + } + }, + "CtReceiptModelResponse": { + "required": [ + "channelDescription", + "companyName", + "creditorReferenceId", + "debtor", + "description", + "fiscalCode", + "idChannel", + "idPSP", + "noticeNumber", + "outcome", + "paymentAmount", + "pspCompanyName", + "receiptId", + "transferList" + ], + "type": "object", + "properties": { + "receiptId": { + "type": "string" + }, + "noticeNumber": { + "type": "string" + }, + "fiscalCode": { + "type": "string" + }, + "outcome": { + "type": "string" + }, + "creditorReferenceId": { + "type": "string" + }, + "paymentAmount": { + "type": "number" + }, + "description": { + "type": "string" + }, + "companyName": { + "type": "string" + }, + "officeName": { + "type": "string" + }, + "debtor": { + "$ref": "#/components/schemas/Debtor" + }, + "transferList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferPA" + } + }, + "idPSP": { + "type": "string" + }, + "pspFiscalCode": { + "type": "string" + }, + "pspPartitaIVA": { + "type": "string" + }, + "pspCompanyName": { + "type": "string" + }, + "idChannel": { + "type": "string" + }, + "channelDescription": { + "type": "string" + }, + "payer": { + "$ref": "#/components/schemas/Payer" + }, + "paymentMethod": { + "type": "string" + }, + "fee": { + "type": "number" + }, + "primaryCiIncurredFee": { + "type": "number" + }, + "idBundle": { + "type": "string" + }, + "idCiBundle": { + "type": "string" + }, + "paymentDateTime": { + "type": "string", + "format": "date" + }, + "applicationDate": { + "type": "string", + "format": "date" + }, + "transferDate": { + "type": "string", + "format": "date" + }, + "metadata": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MapEntry" } + } + } + }, + "Debtor": { + "type": "object", + "properties": { + "fullName": { + "type": "string" + }, + "entityUniqueIdentifierType": { + "type": "string" + }, + "entityUniqueIdentifierValue": { + "type": "string" + }, + "streetName": { + "type": "string" + }, + "civicNumber": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "city": { + "type": "string" + }, + "stateProvinceRegion": { + "type": "string" + }, + "country": { + "type": "string" + }, + "eMail": { + "type": "string" + } } + }, + "MapEntry": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "Payer": { + "type": "object", + "properties": { + "fullName": { + "type": "string" + }, + "entityUniqueIdentifierType": { + "type": "string" + }, + "entityUniqueIdentifierValue": { + "type": "string" + }, + "streetName": { + "type": "string" + }, + "civicNumber": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "city": { + "type": "string" + }, + "stateProvinceRegion": { + "type": "string" + }, + "country": { + "type": "string" + }, + "eMail": { + "type": "string" + } + } + }, + "TransferPA": { + "required": [ + "fiscalCodePA", + "iban", + "mbdAttachment", + "remittanceInformation", + "transferAmount", + "transferCategory" + ], + "type": "object", + "properties": { + "idTransfer": { + "maximum": 5, + "minimum": 1, + "type": "integer", + "format": "int32" + }, + "transferAmount": { + "type": "number" + }, + "fiscalCodePA": { + "type": "string" + }, + "iban": { + "type": "string" + }, + "mbdAttachment": { + "type": "string" + }, + "remittanceInformation": { + "type": "string" + }, + "transferCategory": { + "type": "string" + }, + "metadata": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MapEntry" + } + } + } + }, + "AppInfo": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "version": { + "type": "string" + }, + "environment": { + "type": "string" + } + } + }, + "AuthRequest": { + "type": "object", + "properties": { + "authOutcome": { + "type": "string" + }, + "guid": { + "type": "string" + }, + "correlationId": { + "type": "string" + }, + "error": { + "type": "string" + }, + "auth_code": { + "type": "string" + } + } + }, + "BizEvent": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "version": { + "type": "string" + }, + "idPaymentManager": { + "type": "string" + }, + "complete": { + "type": "string" + }, + "receiptId": { + "type": "string" + }, + "missingInfo": { + "type": "array", + "items": { + "type": "string" + } + }, + "debtorPosition": { + "$ref": "#/components/schemas/DebtorPosition" + }, + "creditor": { + "$ref": "#/components/schemas/Creditor" + }, + "psp": { + "$ref": "#/components/schemas/Psp" + }, + "debtor": { + "$ref": "#/components/schemas/Debtor" + }, + "payer": { + "$ref": "#/components/schemas/Payer" + }, + "paymentInfo": { + "$ref": "#/components/schemas/PaymentInfo" + }, + "transferList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Transfer" + } + }, + "transactionDetails": { + "$ref": "#/components/schemas/TransactionDetails" + }, + "eventStatus": { + "type": "string", + "enum": [ + "NA", + "RETRY", + "FAILED", + "DONE" + ] + }, + "eventRetryEnrichmentCount": { + "type": "integer", + "format": "int32" + } + } + }, + "Creditor": { + "type": "object", + "properties": { + "idPA": { + "type": "string" + }, + "idBrokerPA": { + "type": "string" + }, + "idStation": { + "type": "string" + }, + "companyName": { + "type": "string" + }, + "officeName": { + "type": "string" + } + } + }, + "DebtorPosition": { + "type": "object", + "properties": { + "modelType": { + "type": "string" + }, + "noticeNumber": { + "type": "string" + }, + "iuv": { + "type": "string" + } + } + }, + "Details": { + "type": "object", + "properties": { + "blurredNumber": { + "type": "string" + }, + "holder": { + "type": "string" + }, + "circuit": { + "type": "string" + } + } + }, + "Info": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "blurredNumber": { + "type": "string" + }, + "holder": { + "type": "string" + }, + "expireMonth": { + "type": "string" + }, + "expireYear": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "issuerAbi": { + "type": "string" + }, + "issuerName": { + "type": "string" + }, + "label": { + "type": "string" + } + } + }, + "MBD": { + "type": "object", + "properties": { + "IUBD": { + "type": "string" + }, + "oraAcquisto": { + "type": "string" + }, + "importo": { + "type": "string" + }, + "tipoBollo": { + "type": "string" + }, + "MBDAttachment": { + "type": "string" + } + } + }, + "PaymentAuthorizationRequest": { + "type": "object", + "properties": { + "authOutcome": { + "type": "string" + }, + "requestId": { + "type": "string" + }, + "correlationId": { + "type": "string" + }, + "authCode": { + "type": "string" + }, + "paymentMethodType": { + "type": "string" + }, + "details": { + "$ref": "#/components/schemas/Details" + } + } + }, + "PaymentInfo": { + "type": "object", + "properties": { + "paymentDateTime": { + "type": "string" + }, + "applicationDate": { + "type": "string" + }, + "transferDate": { + "type": "string" + }, + "dueDate": { + "type": "string" + }, + "paymentToken": { + "type": "string" + }, + "amount": { + "type": "string" + }, + "fee": { + "type": "string" + }, + "primaryCiIncurredFee": { + "type": "string" + }, + "idBundle": { + "type": "string" + }, + "idCiBundle": { + "type": "string" + }, + "totalNotice": { + "type": "string" + }, + "paymentMethod": { + "type": "string" + }, + "touchpoint": { + "type": "string" + }, + "remittanceInformation": { + "type": "string" + }, + "description": { + "type": "string" + }, + "metadata": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MapEntry" + } + } + } + }, + "Psp": { + "type": "object", + "properties": { + "idPsp": { + "type": "string" + }, + "idBrokerPsp": { + "type": "string" + }, + "idChannel": { + "type": "string" + }, + "psp": { + "type": "string" + }, + "pspPartitaIVA": { + "type": "string" + }, + "pspFiscalCode": { + "type": "string" + }, + "channelDescription": { + "type": "string" + } + } + }, + "TransactionDetails": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" + }, + "paymentAuthorizationRequest": { + "$ref": "#/components/schemas/PaymentAuthorizationRequest" + }, + "wallet": { + "$ref": "#/components/schemas/WalletItem" + } + } + }, + "Transfer": { + "type": "object", + "properties": { + "idTransfer": { + "type": "string" + }, + "fiscalCodePA": { + "type": "string" + }, + "companyName": { + "type": "string" + }, + "amount": { + "type": "string" + }, + "transferCategory": { + "type": "string" + }, + "remittanceInformation": { + "type": "string" + }, + "metadata": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MapEntry" + } + }, + "IBAN": { + "type": "string" + }, + "MBD": { + "$ref": "#/components/schemas/MBD" + } + } + }, + "User": { + "type": "object", + "properties": { + "fullName": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "F", + "G" + ] + }, + "fiscalCode": { + "type": "string" + }, + "notificationEmail": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "userStatus": { + "type": "string" + }, + "userStatusDescription": { + "type": "string" + } + } + }, + "WalletItem": { + "type": "object", + "properties": { + "idWallet": { + "type": "string" + }, + "walletType": { + "type": "string", + "enum": [ + "CARD", + "PAYPAL", + "BANCOMATPAY" + ] + }, + "enableableFunctions": { + "type": "array", + "items": { + "type": "string" + } + }, + "pagoPa": { + "type": "boolean" + }, + "onboardingChannel": { + "type": "string" + }, + "favourite": { + "type": "boolean" + }, + "createDate": { + "type": "string" + }, + "info": { + "$ref": "#/components/schemas/Info" + }, + "authRequest": { + "$ref": "#/components/schemas/AuthRequest" + } + } + }, + "Link": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "templated": { + "type": "boolean" + } + } + } + }, + "securitySchemes": { + "ApiKey": { + "type": "apiKey", + "description": "The API key to access this function app.", + "name": "Ocp-Apim-Subscription-Key", + "in": "header" + } } + } } diff --git a/pom.xml b/pom.xml index 3bebdb67..fa11c558 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ it.gov.pagopa bizeventsservice - 0.1.1 + 0.1.1-1-PAGOPA-1404-sviluppo-modifiche-get-organization-receipt Biz-Events Service Microservice for exposing REST APIs about payment receipts. From 79ed21b80743f613ff841acf231833dbdcd28fa0 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Thu, 11 Jan 2024 10:04:27 +0100 Subject: [PATCH 08/12] PAGOPA-1404 update openapi change operation summary --- openapi/openapi.json | 3098 ++++++++--------- .../controller/IPaymentsController.java | 4 +- 2 files changed, 1551 insertions(+), 1551 deletions(-) diff --git a/openapi/openapi.json b/openapi/openapi.json index b5dee636..e83cf25f 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -1,1619 +1,1619 @@ { - "openapi": "3.0.1", - "info": { - "title": "Biz-Events Service", - "description": "Microservice for exposing REST APIs about payment receipts.", - "termsOfService": "https://www.pagopa.gov.it/", - "version": "0.1.1-1-PAGOPA-1404-sviluppo-modifiche-get-organization-receipt" - }, - "servers": [ - { - "url": "http://localhost:8080", - "description": "Generated server url" - } - ], - "tags": [ - { - "name": "Actuator", - "description": "Monitor and interact", - "externalDocs": { - "description": "Spring Boot Actuator Web API Documentation", - "url": "https://docs.spring.io/spring-boot/docs/current/actuator-api/html/" - } - } - ], - "paths": { - "/actuator": { - "get": { - "tags": [ - "Actuator" - ], - "summary": "Actuator root web endpoint", - "operationId": "links", - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/vnd.spring-boot.actuator.v3+json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - } - } - } - }, - "application/vnd.spring-boot.actuator.v2+json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - } - } - } - }, - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - } - } - } - } - } - } - } - }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } - } - ] + "openapi": "3.0.1", + "info": { + "title": "Biz-Events Service", + "description": "Microservice for exposing REST APIs about payment receipts.", + "termsOfService": "https://www.pagopa.gov.it/", + "version": "0.1.1-1-PAGOPA-1404-sviluppo-modifiche-get-organization-receipt" }, - "/actuator/health": { - "get": { - "tags": [ - "Actuator" - ], - "summary": "Actuator web endpoint 'health'", - "operationId": "health", - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/vnd.spring-boot.actuator.v3+json": { - "schema": { - "type": "object" - } - }, - "application/vnd.spring-boot.actuator.v2+json": { - "schema": { - "type": "object" - } - }, - "application/json": { - "schema": { - "type": "object" - } - } - } - } - } - }, - "parameters": [ + "servers": [ { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } - } - ] - }, - "/actuator/health/**": { - "get": { - "tags": [ - "Actuator" - ], - "summary": "Actuator web endpoint 'health-path'", - "operationId": "health-path", - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/vnd.spring-boot.actuator.v3+json": { - "schema": { - "type": "object" - } - }, - "application/vnd.spring-boot.actuator.v2+json": { - "schema": { - "type": "object" - } - }, - "application/json": { - "schema": { - "type": "object" - } - } - } - } + "url": "http://localhost:8080", + "description": "Generated server url" } - }, - "parameters": [ + ], + "tags": [ { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } - } - ] - }, - "/actuator/info": { - "get": { - "tags": [ - "Actuator" - ], - "summary": "Actuator web endpoint 'info'", - "operationId": "info", - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/vnd.spring-boot.actuator.v3+json": { - "schema": { - "type": "object" - } - }, - "application/vnd.spring-boot.actuator.v2+json": { - "schema": { - "type": "object" - } - }, - "application/json": { - "schema": { - "type": "object" - } - } + "name": "Actuator", + "description": "Monitor and interact", + "externalDocs": { + "description": "Spring Boot Actuator Web API Documentation", + "url": "https://docs.spring.io/spring-boot/docs/current/actuator-api/html/" } - } - } - }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } } - ] - }, - "/events/organizations/{organization-fiscal-code}/iuvs/{iuv}": { - "get": { - "tags": [ - "get BizEvent APIs" - ], - "summary": "Retrieve the biz-event given the organization fiscal code and IUV.", - "operationId": "getBizEventByOrganizationFiscalCodeAndIuv", - "parameters": [ - { - "name": "organization-fiscal-code", - "in": "path", - "description": "The fiscal code of the Organization.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "iuv", - "in": "path", - "description": "The unique payment identification. Alphanumeric code that uniquely associates and identifies three key elements of a payment: reason, payer, amount", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Obtained biz-event.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + ], + "paths": { + "/actuator": { + "get": { + "tags": [ + "Actuator" + ], + "summary": "Actuator root web endpoint", + "operationId": "links", + "responses": { + "200": { + "description": "OK", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/vnd.spring-boot.actuator.v3+json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + } + } + } + }, + "application/vnd.spring-boot.actuator.v2+json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + } + } + } + }, + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + } + } + } + } + } + } } - } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BizEvent" - } - } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } } - } - } - }, - "404": { - "description": "Not found the biz-event.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + ] + }, + "/actuator/health": { + "get": { + "tags": [ + "Actuator" + ], + "summary": "Actuator web endpoint 'health'", + "operationId": "health", + "responses": { + "200": { + "description": "OK", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/vnd.spring-boot.actuator.v3+json": { + "schema": { + "type": "object" + } + }, + "application/vnd.spring-boot.actuator.v2+json": { + "schema": { + "type": "object" + } + }, + "application/json": { + "schema": { + "type": "object" + } + } + } + } } - } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } } - } - } - }, - "422": { - "description": "Unable to process the request.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + ] + }, + "/actuator/health/**": { + "get": { + "tags": [ + "Actuator" + ], + "summary": "Actuator web endpoint 'health-path'", + "operationId": "health-path", + "responses": { + "200": { + "description": "OK", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/vnd.spring-boot.actuator.v3+json": { + "schema": { + "type": "object" + } + }, + "application/vnd.spring-boot.actuator.v2+json": { + "schema": { + "type": "object" + } + }, + "application/json": { + "schema": { + "type": "object" + } + } + } + } } - } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "429": { - "description": "Too many requests.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } } - } - } - }, - "500": { - "description": "Service unavailable.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + ] + }, + "/actuator/info": { + "get": { + "tags": [ + "Actuator" + ], + "summary": "Actuator web endpoint 'info'", + "operationId": "info", + "responses": { + "200": { + "description": "OK", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/vnd.spring-boot.actuator.v3+json": { + "schema": { + "type": "object" + } + }, + "application/vnd.spring-boot.actuator.v2+json": { + "schema": { + "type": "object" + } + }, + "application/json": { + "schema": { + "type": "object" + } + } + } + } } - } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } } - } - } - } + ] }, - "security": [ - { - "ApiKey": [] - } - ] - }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } - } - ] - }, - "/events/{biz-event-id}": { - "get": { - "tags": [ - "get BizEvent APIs" - ], - "summary": "Retrieve the biz-event given its id.", - "operationId": "getBizEvent", - "parameters": [ - { - "name": "biz-event-id", - "in": "path", - "description": "The id of the biz-event.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Obtained biz-event.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } + "/events/organizations/{organization-fiscal-code}/iuvs/{iuv}": { + "get": { + "tags": [ + "get BizEvent APIs" + ], + "summary": "Retrieve the biz-event given the organization fiscal code and IUV.", + "operationId": "getBizEventByOrganizationFiscalCodeAndIuv", + "parameters": [ + { + "name": "organization-fiscal-code", + "in": "path", + "description": "The fiscal code of the Organization.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "iuv", + "in": "path", + "description": "The unique payment identification. Alphanumeric code that uniquely associates and identifies three key elements of a payment: reason, payer, amount", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Obtained biz-event.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BizEvent" + } + } + } + }, + "401": { + "description": "Wrong or missing function key.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "Not found the biz-event.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "422": { + "description": "Unable to process the request.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "429": { + "description": "Too many requests.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "Service unavailable.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + } + }, + "security": [ + { + "ApiKey": [] + } + ] }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BizEvent" - } - } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "Not found the biz-event.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } } - } + ] + }, + "/events/{biz-event-id}": { + "get": { + "tags": [ + "get BizEvent APIs" + ], + "summary": "Retrieve the biz-event given its id.", + "operationId": "getBizEvent", + "parameters": [ + { + "name": "biz-event-id", + "in": "path", + "description": "The id of the biz-event.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Obtained biz-event.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BizEvent" + } + } + } + }, + "401": { + "description": "Wrong or missing function key.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "Not found the biz-event.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "422": { + "description": "Unable to process the request.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "429": { + "description": "Too many requests.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "Service unavailable.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + } + }, + "security": [ + { + "ApiKey": [] + } + ] }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "422": { - "description": "Unable to process the request.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } } - } + ] + }, + "/info": { + "get": { + "tags": [ + "Home" + ], + "summary": "health check", + "description": "Return OK if application is started", + "operationId": "healthCheck", + "responses": { + "200": { + "description": "OK", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppInfo" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "401": { + "description": "Unauthorized", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "403": { + "description": "Forbidden", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "429": { + "description": "Too many requests", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "Service unavailable", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + } + }, + "security": [ + { + "ApiKey": [] + } + ] }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "429": { - "description": "Too many requests.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "Service unavailable.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } } - } + ] + }, + "/organizations/{organizationfiscalcode}/receipts/{iur}": { + "get": { + "tags": [ + "Payment Receipts REST APIs" + ], + "summary": "The organization get the receipt for the creditor institution using IUR.", + "operationId": "getOrganizationReceiptIur", + "parameters": [ + { + "name": "organizationfiscalcode", + "in": "path", + "description": "The fiscal code of the Organization.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "iur", + "in": "path", + "description": "The unique reference of the operation assigned to the payment (Payment Token).", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Obtained receipt.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CtReceiptModelResponse" + } + } + } + }, + "401": { + "description": "Wrong or missing function key.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "Not found the receipt.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "422": { + "description": "Unable to process the request.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "429": { + "description": "Too many requests.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "Service unavailable.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + } + }, + "security": [ + { + "ApiKey": [] + } + ] }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } } - } - } - } + ] }, - "security": [ - { - "ApiKey": [] - } - ] - }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } + "/organizations/{organizationfiscalcode}/receipts/{iur}/paymentoptions/{iuv}": { + "get": { + "tags": [ + "Payment Receipts REST APIs" + ], + "summary": "The organization get the receipt for the creditor institution using IUV and IUR.", + "operationId": "getOrganizationReceiptIuvIur", + "parameters": [ + { + "name": "organizationfiscalcode", + "in": "path", + "description": "The fiscal code of the Organization.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "iur", + "in": "path", + "description": "The unique reference of the operation assigned to the payment (Payment Token).", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "iuv", + "in": "path", + "description": "The unique payment identification. Alphanumeric code that uniquely associates and identifies three key elements of a payment: reason, payer, amount", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Obtained receipt.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CtReceiptModelResponse" + } + } + } + }, + "401": { + "description": "Wrong or missing function key.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "Not found the receipt.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "422": { + "description": "Unable to process the request.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "429": { + "description": "Too many requests.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "Service unavailable.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + } + }, + "security": [ + { + "ApiKey": [] + } + ] + }, + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } + } + ] } - ] }, - "/info": { - "get": { - "tags": [ - "Home" - ], - "summary": "health check", - "description": "Return OK if application is started", - "operationId": "healthCheck", - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "components": { + "schemas": { + "ProblemJson": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized); example: Service Unavailable" + }, + "status": { + "maximum": 600, + "minimum": 100, + "type": "integer", + "description": "The HTTP status code generated by the origin server for this occurrence of the problem.", + "format": "int32", + "example": 200 + }, + "detail": { + "type": "string", + "description": "A human readable explanation specific to this occurrence of the problem.", + "example": "There was an error processing the request" + } } - } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppInfo" - } - } - } - }, - "400": { - "description": "Bad Request", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "CtReceiptModelResponse": { + "required": [ + "channelDescription", + "companyName", + "creditorReferenceId", + "debtor", + "description", + "fiscalCode", + "idChannel", + "idPSP", + "noticeNumber", + "outcome", + "paymentAmount", + "pspCompanyName", + "receiptId", + "transferList" + ], + "type": "object", + "properties": { + "receiptId": { + "type": "string" + }, + "noticeNumber": { + "type": "string" + }, + "fiscalCode": { + "type": "string" + }, + "outcome": { + "type": "string" + }, + "creditorReferenceId": { + "type": "string" + }, + "paymentAmount": { + "type": "number" + }, + "description": { + "type": "string" + }, + "companyName": { + "type": "string" + }, + "officeName": { + "type": "string" + }, + "debtor": { + "$ref": "#/components/schemas/Debtor" + }, + "transferList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferPA" + } + }, + "idPSP": { + "type": "string" + }, + "pspFiscalCode": { + "type": "string" + }, + "pspPartitaIVA": { + "type": "string" + }, + "pspCompanyName": { + "type": "string" + }, + "idChannel": { + "type": "string" + }, + "channelDescription": { + "type": "string" + }, + "payer": { + "$ref": "#/components/schemas/Payer" + }, + "paymentMethod": { + "type": "string" + }, + "fee": { + "type": "number" + }, + "primaryCiIncurredFee": { + "type": "number" + }, + "idBundle": { + "type": "string" + }, + "idCiBundle": { + "type": "string" + }, + "paymentDateTime": { + "type": "string", + "format": "date" + }, + "applicationDate": { + "type": "string", + "format": "date" + }, + "transferDate": { + "type": "string", + "format": "date" + }, + "metadata": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MapEntry" + } + } } - } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "401": { - "description": "Unauthorized", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "description": "Forbidden", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "description": "Too many requests", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "Service unavailable", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "Debtor": { + "type": "object", + "properties": { + "fullName": { + "type": "string" + }, + "entityUniqueIdentifierType": { + "type": "string" + }, + "entityUniqueIdentifierValue": { + "type": "string" + }, + "streetName": { + "type": "string" + }, + "civicNumber": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "city": { + "type": "string" + }, + "stateProvinceRegion": { + "type": "string" + }, + "country": { + "type": "string" + }, + "eMail": { + "type": "string" + } } - } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - } - }, - "security": [ - { - "ApiKey": [] - } - ] - }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } - } - ] - }, - "/organizations/{organizationfiscalcode}/receipts/{iur}": { - "get": { - "tags": [ - "Payment Receipts REST APIs" - ], - "summary": "The organization get the receipt for the creditor institution.", - "operationId": "getOrganizationReceiptIur", - "parameters": [ - { - "name": "organizationfiscalcode", - "in": "path", - "description": "The fiscal code of the Organization.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "iur", - "in": "path", - "description": "The unique reference of the operation assigned to the payment (Payment Token).", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Obtained receipt.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "MapEntry": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } } - } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CtReceiptModelResponse" - } - } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "Payer": { + "type": "object", + "properties": { + "fullName": { + "type": "string" + }, + "entityUniqueIdentifierType": { + "type": "string" + }, + "entityUniqueIdentifierValue": { + "type": "string" + }, + "streetName": { + "type": "string" + }, + "civicNumber": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "city": { + "type": "string" + }, + "stateProvinceRegion": { + "type": "string" + }, + "country": { + "type": "string" + }, + "eMail": { + "type": "string" + } } - } - } - }, - "404": { - "description": "Not found the receipt.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, + "TransferPA": { + "required": [ + "fiscalCodePA", + "iban", + "mbdAttachment", + "remittanceInformation", + "transferAmount", + "transferCategory" + ], + "type": "object", + "properties": { + "idTransfer": { + "maximum": 5, + "minimum": 1, + "type": "integer", + "format": "int32" + }, + "transferAmount": { + "type": "number" + }, + "fiscalCodePA": { + "type": "string" + }, + "iban": { + "type": "string" + }, + "mbdAttachment": { + "type": "string" + }, + "remittanceInformation": { + "type": "string" + }, + "transferCategory": { + "type": "string" + }, + "metadata": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MapEntry" + } + } } - } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "AppInfo": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "version": { + "type": "string" + }, + "environment": { + "type": "string" + } } - } - } - }, - "422": { - "description": "Unable to process the request.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, + "AuthRequest": { + "type": "object", + "properties": { + "authOutcome": { + "type": "string" + }, + "guid": { + "type": "string" + }, + "correlationId": { + "type": "string" + }, + "error": { + "type": "string" + }, + "auth_code": { + "type": "string" + } } - } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "BizEvent": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "version": { + "type": "string" + }, + "idPaymentManager": { + "type": "string" + }, + "complete": { + "type": "string" + }, + "receiptId": { + "type": "string" + }, + "missingInfo": { + "type": "array", + "items": { + "type": "string" + } + }, + "debtorPosition": { + "$ref": "#/components/schemas/DebtorPosition" + }, + "creditor": { + "$ref": "#/components/schemas/Creditor" + }, + "psp": { + "$ref": "#/components/schemas/Psp" + }, + "debtor": { + "$ref": "#/components/schemas/Debtor" + }, + "payer": { + "$ref": "#/components/schemas/Payer" + }, + "paymentInfo": { + "$ref": "#/components/schemas/PaymentInfo" + }, + "transferList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Transfer" + } + }, + "transactionDetails": { + "$ref": "#/components/schemas/TransactionDetails" + }, + "eventStatus": { + "type": "string", + "enum": [ + "NA", + "RETRY", + "FAILED", + "DONE" + ] + }, + "eventRetryEnrichmentCount": { + "type": "integer", + "format": "int32" + } } - } - } - }, - "429": { - "description": "Too many requests.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, + "Creditor": { + "type": "object", + "properties": { + "idPA": { + "type": "string" + }, + "idBrokerPA": { + "type": "string" + }, + "idStation": { + "type": "string" + }, + "companyName": { + "type": "string" + }, + "officeName": { + "type": "string" + } } - } - } - }, - "500": { - "description": "Service unavailable.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, + "DebtorPosition": { + "type": "object", + "properties": { + "modelType": { + "type": "string" + }, + "noticeNumber": { + "type": "string" + }, + "iuv": { + "type": "string" + } } - } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "Details": { + "type": "object", + "properties": { + "blurredNumber": { + "type": "string" + }, + "holder": { + "type": "string" + }, + "circuit": { + "type": "string" + } } - } - } - } - }, - "security": [ - { - "ApiKey": [] - } - ] - }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } - } - ] - }, - "/organizations/{organizationfiscalcode}/receipts/{iur}/paymentoptions/{iuv}": { - "get": { - "tags": [ - "Payment Receipts REST APIs" - ], - "summary": "The organization get the receipt for the creditor institution.", - "operationId": "getOrganizationReceiptIuvIur", - "parameters": [ - { - "name": "organizationfiscalcode", - "in": "path", - "description": "The fiscal code of the Organization.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "iur", - "in": "path", - "description": "The unique reference of the operation assigned to the payment (Payment Token).", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "iuv", - "in": "path", - "description": "The unique payment identification. Alphanumeric code that uniquely associates and identifies three key elements of a payment: reason, payer, amount", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Obtained receipt.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, + "Info": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "blurredNumber": { + "type": "string" + }, + "holder": { + "type": "string" + }, + "expireMonth": { + "type": "string" + }, + "expireYear": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "issuerAbi": { + "type": "string" + }, + "issuerName": { + "type": "string" + }, + "label": { + "type": "string" + } } - } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CtReceiptModelResponse" + "MBD": { + "type": "object", + "properties": { + "IUBD": { + "type": "string" + }, + "oraAcquisto": { + "type": "string" + }, + "importo": { + "type": "string" + }, + "tipoBollo": { + "type": "string" + }, + "MBDAttachment": { + "type": "string" + } } - } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, + "PaymentAuthorizationRequest": { + "type": "object", + "properties": { + "authOutcome": { + "type": "string" + }, + "requestId": { + "type": "string" + }, + "correlationId": { + "type": "string" + }, + "authCode": { + "type": "string" + }, + "paymentMethodType": { + "type": "string" + }, + "details": { + "$ref": "#/components/schemas/Details" + } } - } - } - }, - "404": { - "description": "Not found the receipt.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, + "PaymentInfo": { + "type": "object", + "properties": { + "paymentDateTime": { + "type": "string" + }, + "applicationDate": { + "type": "string" + }, + "transferDate": { + "type": "string" + }, + "dueDate": { + "type": "string" + }, + "paymentToken": { + "type": "string" + }, + "amount": { + "type": "string" + }, + "fee": { + "type": "string" + }, + "primaryCiIncurredFee": { + "type": "string" + }, + "idBundle": { + "type": "string" + }, + "idCiBundle": { + "type": "string" + }, + "totalNotice": { + "type": "string" + }, + "paymentMethod": { + "type": "string" + }, + "touchpoint": { + "type": "string" + }, + "remittanceInformation": { + "type": "string" + }, + "description": { + "type": "string" + }, + "metadata": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MapEntry" + } + } } - } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "Psp": { + "type": "object", + "properties": { + "idPsp": { + "type": "string" + }, + "idBrokerPsp": { + "type": "string" + }, + "idChannel": { + "type": "string" + }, + "psp": { + "type": "string" + }, + "pspPartitaIVA": { + "type": "string" + }, + "pspFiscalCode": { + "type": "string" + }, + "channelDescription": { + "type": "string" + } } - } - } - }, - "422": { - "description": "Unable to process the request.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, + "TransactionDetails": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" + }, + "paymentAuthorizationRequest": { + "$ref": "#/components/schemas/PaymentAuthorizationRequest" + }, + "wallet": { + "$ref": "#/components/schemas/WalletItem" + } } - } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "Transfer": { + "type": "object", + "properties": { + "idTransfer": { + "type": "string" + }, + "fiscalCodePA": { + "type": "string" + }, + "companyName": { + "type": "string" + }, + "amount": { + "type": "string" + }, + "transferCategory": { + "type": "string" + }, + "remittanceInformation": { + "type": "string" + }, + "metadata": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MapEntry" + } + }, + "IBAN": { + "type": "string" + }, + "MBD": { + "$ref": "#/components/schemas/MBD" + } } - } - } - }, - "429": { - "description": "Too many requests.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, + "User": { + "type": "object", + "properties": { + "fullName": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "F", + "G" + ] + }, + "fiscalCode": { + "type": "string" + }, + "notificationEmail": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "userStatus": { + "type": "string" + }, + "userStatusDescription": { + "type": "string" + } } - } - } - }, - "500": { - "description": "Service unavailable.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, + "WalletItem": { + "type": "object", + "properties": { + "idWallet": { + "type": "string" + }, + "walletType": { + "type": "string", + "enum": [ + "CARD", + "PAYPAL", + "BANCOMATPAY" + ] + }, + "enableableFunctions": { + "type": "array", + "items": { + "type": "string" + } + }, + "pagoPa": { + "type": "boolean" + }, + "onboardingChannel": { + "type": "string" + }, + "favourite": { + "type": "boolean" + }, + "createDate": { + "type": "string" + }, + "info": { + "$ref": "#/components/schemas/Info" + }, + "authRequest": { + "$ref": "#/components/schemas/AuthRequest" + } } - } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "Link": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "templated": { + "type": "boolean" + } } - } } - } }, - "security": [ - { - "ApiKey": [] - } - ] - }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } - } - ] - } - }, - "components": { - "schemas": { - "ProblemJson": { - "type": "object", - "properties": { - "title": { - "type": "string", - "description": "A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized); example: Service Unavailable" - }, - "status": { - "maximum": 600, - "minimum": 100, - "type": "integer", - "description": "The HTTP status code generated by the origin server for this occurrence of the problem.", - "format": "int32", - "example": 200 - }, - "detail": { - "type": "string", - "description": "A human readable explanation specific to this occurrence of the problem.", - "example": "There was an error processing the request" - } - } - }, - "CtReceiptModelResponse": { - "required": [ - "channelDescription", - "companyName", - "creditorReferenceId", - "debtor", - "description", - "fiscalCode", - "idChannel", - "idPSP", - "noticeNumber", - "outcome", - "paymentAmount", - "pspCompanyName", - "receiptId", - "transferList" - ], - "type": "object", - "properties": { - "receiptId": { - "type": "string" - }, - "noticeNumber": { - "type": "string" - }, - "fiscalCode": { - "type": "string" - }, - "outcome": { - "type": "string" - }, - "creditorReferenceId": { - "type": "string" - }, - "paymentAmount": { - "type": "number" - }, - "description": { - "type": "string" - }, - "companyName": { - "type": "string" - }, - "officeName": { - "type": "string" - }, - "debtor": { - "$ref": "#/components/schemas/Debtor" - }, - "transferList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransferPA" - } - }, - "idPSP": { - "type": "string" - }, - "pspFiscalCode": { - "type": "string" - }, - "pspPartitaIVA": { - "type": "string" - }, - "pspCompanyName": { - "type": "string" - }, - "idChannel": { - "type": "string" - }, - "channelDescription": { - "type": "string" - }, - "payer": { - "$ref": "#/components/schemas/Payer" - }, - "paymentMethod": { - "type": "string" - }, - "fee": { - "type": "number" - }, - "primaryCiIncurredFee": { - "type": "number" - }, - "idBundle": { - "type": "string" - }, - "idCiBundle": { - "type": "string" - }, - "paymentDateTime": { - "type": "string", - "format": "date" - }, - "applicationDate": { - "type": "string", - "format": "date" - }, - "transferDate": { - "type": "string", - "format": "date" - }, - "metadata": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MapEntry" + "securitySchemes": { + "ApiKey": { + "type": "apiKey", + "description": "The API key to access this function app.", + "name": "Ocp-Apim-Subscription-Key", + "in": "header" } - } - } - }, - "Debtor": { - "type": "object", - "properties": { - "fullName": { - "type": "string" - }, - "entityUniqueIdentifierType": { - "type": "string" - }, - "entityUniqueIdentifierValue": { - "type": "string" - }, - "streetName": { - "type": "string" - }, - "civicNumber": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "city": { - "type": "string" - }, - "stateProvinceRegion": { - "type": "string" - }, - "country": { - "type": "string" - }, - "eMail": { - "type": "string" - } } - }, - "MapEntry": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "value": { - "type": "string" - } - } - }, - "Payer": { - "type": "object", - "properties": { - "fullName": { - "type": "string" - }, - "entityUniqueIdentifierType": { - "type": "string" - }, - "entityUniqueIdentifierValue": { - "type": "string" - }, - "streetName": { - "type": "string" - }, - "civicNumber": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "city": { - "type": "string" - }, - "stateProvinceRegion": { - "type": "string" - }, - "country": { - "type": "string" - }, - "eMail": { - "type": "string" - } - } - }, - "TransferPA": { - "required": [ - "fiscalCodePA", - "iban", - "mbdAttachment", - "remittanceInformation", - "transferAmount", - "transferCategory" - ], - "type": "object", - "properties": { - "idTransfer": { - "maximum": 5, - "minimum": 1, - "type": "integer", - "format": "int32" - }, - "transferAmount": { - "type": "number" - }, - "fiscalCodePA": { - "type": "string" - }, - "iban": { - "type": "string" - }, - "mbdAttachment": { - "type": "string" - }, - "remittanceInformation": { - "type": "string" - }, - "transferCategory": { - "type": "string" - }, - "metadata": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MapEntry" - } - } - } - }, - "AppInfo": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "version": { - "type": "string" - }, - "environment": { - "type": "string" - } - } - }, - "AuthRequest": { - "type": "object", - "properties": { - "authOutcome": { - "type": "string" - }, - "guid": { - "type": "string" - }, - "correlationId": { - "type": "string" - }, - "error": { - "type": "string" - }, - "auth_code": { - "type": "string" - } - } - }, - "BizEvent": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "version": { - "type": "string" - }, - "idPaymentManager": { - "type": "string" - }, - "complete": { - "type": "string" - }, - "receiptId": { - "type": "string" - }, - "missingInfo": { - "type": "array", - "items": { - "type": "string" - } - }, - "debtorPosition": { - "$ref": "#/components/schemas/DebtorPosition" - }, - "creditor": { - "$ref": "#/components/schemas/Creditor" - }, - "psp": { - "$ref": "#/components/schemas/Psp" - }, - "debtor": { - "$ref": "#/components/schemas/Debtor" - }, - "payer": { - "$ref": "#/components/schemas/Payer" - }, - "paymentInfo": { - "$ref": "#/components/schemas/PaymentInfo" - }, - "transferList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Transfer" - } - }, - "transactionDetails": { - "$ref": "#/components/schemas/TransactionDetails" - }, - "eventStatus": { - "type": "string", - "enum": [ - "NA", - "RETRY", - "FAILED", - "DONE" - ] - }, - "eventRetryEnrichmentCount": { - "type": "integer", - "format": "int32" - } - } - }, - "Creditor": { - "type": "object", - "properties": { - "idPA": { - "type": "string" - }, - "idBrokerPA": { - "type": "string" - }, - "idStation": { - "type": "string" - }, - "companyName": { - "type": "string" - }, - "officeName": { - "type": "string" - } - } - }, - "DebtorPosition": { - "type": "object", - "properties": { - "modelType": { - "type": "string" - }, - "noticeNumber": { - "type": "string" - }, - "iuv": { - "type": "string" - } - } - }, - "Details": { - "type": "object", - "properties": { - "blurredNumber": { - "type": "string" - }, - "holder": { - "type": "string" - }, - "circuit": { - "type": "string" - } - } - }, - "Info": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "blurredNumber": { - "type": "string" - }, - "holder": { - "type": "string" - }, - "expireMonth": { - "type": "string" - }, - "expireYear": { - "type": "string" - }, - "brand": { - "type": "string" - }, - "issuerAbi": { - "type": "string" - }, - "issuerName": { - "type": "string" - }, - "label": { - "type": "string" - } - } - }, - "MBD": { - "type": "object", - "properties": { - "IUBD": { - "type": "string" - }, - "oraAcquisto": { - "type": "string" - }, - "importo": { - "type": "string" - }, - "tipoBollo": { - "type": "string" - }, - "MBDAttachment": { - "type": "string" - } - } - }, - "PaymentAuthorizationRequest": { - "type": "object", - "properties": { - "authOutcome": { - "type": "string" - }, - "requestId": { - "type": "string" - }, - "correlationId": { - "type": "string" - }, - "authCode": { - "type": "string" - }, - "paymentMethodType": { - "type": "string" - }, - "details": { - "$ref": "#/components/schemas/Details" - } - } - }, - "PaymentInfo": { - "type": "object", - "properties": { - "paymentDateTime": { - "type": "string" - }, - "applicationDate": { - "type": "string" - }, - "transferDate": { - "type": "string" - }, - "dueDate": { - "type": "string" - }, - "paymentToken": { - "type": "string" - }, - "amount": { - "type": "string" - }, - "fee": { - "type": "string" - }, - "primaryCiIncurredFee": { - "type": "string" - }, - "idBundle": { - "type": "string" - }, - "idCiBundle": { - "type": "string" - }, - "totalNotice": { - "type": "string" - }, - "paymentMethod": { - "type": "string" - }, - "touchpoint": { - "type": "string" - }, - "remittanceInformation": { - "type": "string" - }, - "description": { - "type": "string" - }, - "metadata": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MapEntry" - } - } - } - }, - "Psp": { - "type": "object", - "properties": { - "idPsp": { - "type": "string" - }, - "idBrokerPsp": { - "type": "string" - }, - "idChannel": { - "type": "string" - }, - "psp": { - "type": "string" - }, - "pspPartitaIVA": { - "type": "string" - }, - "pspFiscalCode": { - "type": "string" - }, - "channelDescription": { - "type": "string" - } - } - }, - "TransactionDetails": { - "type": "object", - "properties": { - "user": { - "$ref": "#/components/schemas/User" - }, - "paymentAuthorizationRequest": { - "$ref": "#/components/schemas/PaymentAuthorizationRequest" - }, - "wallet": { - "$ref": "#/components/schemas/WalletItem" - } - } - }, - "Transfer": { - "type": "object", - "properties": { - "idTransfer": { - "type": "string" - }, - "fiscalCodePA": { - "type": "string" - }, - "companyName": { - "type": "string" - }, - "amount": { - "type": "string" - }, - "transferCategory": { - "type": "string" - }, - "remittanceInformation": { - "type": "string" - }, - "metadata": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MapEntry" - } - }, - "IBAN": { - "type": "string" - }, - "MBD": { - "$ref": "#/components/schemas/MBD" - } - } - }, - "User": { - "type": "object", - "properties": { - "fullName": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "F", - "G" - ] - }, - "fiscalCode": { - "type": "string" - }, - "notificationEmail": { - "type": "string" - }, - "userId": { - "type": "string" - }, - "userStatus": { - "type": "string" - }, - "userStatusDescription": { - "type": "string" - } - } - }, - "WalletItem": { - "type": "object", - "properties": { - "idWallet": { - "type": "string" - }, - "walletType": { - "type": "string", - "enum": [ - "CARD", - "PAYPAL", - "BANCOMATPAY" - ] - }, - "enableableFunctions": { - "type": "array", - "items": { - "type": "string" - } - }, - "pagoPa": { - "type": "boolean" - }, - "onboardingChannel": { - "type": "string" - }, - "favourite": { - "type": "boolean" - }, - "createDate": { - "type": "string" - }, - "info": { - "$ref": "#/components/schemas/Info" - }, - "authRequest": { - "$ref": "#/components/schemas/AuthRequest" - } - } - }, - "Link": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "templated": { - "type": "boolean" - } - } - } - }, - "securitySchemes": { - "ApiKey": { - "type": "apiKey", - "description": "The API key to access this function app.", - "name": "Ocp-Apim-Subscription-Key", - "in": "header" - } } - } } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/controller/IPaymentsController.java b/src/main/java/it/gov/pagopa/bizeventsservice/controller/IPaymentsController.java index 0d11c976..c3f26058 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/controller/IPaymentsController.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/controller/IPaymentsController.java @@ -26,7 +26,7 @@ @Validated public interface IPaymentsController { - @Operation(summary = "The organization get the receipt for the creditor institution.", security = {@SecurityRequirement(name = "ApiKey")}, operationId = "getOrganizationReceiptIuvIur") + @Operation(summary = "The organization get the receipt for the creditor institution using IUV and IUR.", security = {@SecurityRequirement(name = "ApiKey")}, operationId = "getOrganizationReceiptIuvIur") @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Obtained receipt.", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, schema = @Schema(name = "CtReceipt", implementation = CtReceiptModelResponse.class))), @ApiResponse(responseCode = "401", description = "Wrong or missing function key.", content = @Content(schema = @Schema())), @@ -44,7 +44,7 @@ ResponseEntity getOrganizationReceipt( @Parameter(description = "The unique payment identification. Alphanumeric code that uniquely associates and identifies three key elements of a payment: reason, payer, amount", required = true) @NotBlank @PathVariable("iuv") String iuv); - @Operation(summary = "The organization get the receipt for the creditor institution.", security = {@SecurityRequirement(name = "ApiKey")}, operationId = "getOrganizationReceiptIur") + @Operation(summary = "The organization get the receipt for the creditor institution using IUR.", security = {@SecurityRequirement(name = "ApiKey")}, operationId = "getOrganizationReceiptIur") @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Obtained receipt.", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, schema = @Schema(name = "CtReceipt", implementation = CtReceiptModelResponse.class))), @ApiResponse(responseCode = "401", description = "Wrong or missing function key.", content = @Content(schema = @Schema())), From 59cf8bc2a7532df55225ecc594c73c46c69c0787 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Thu, 11 Jan 2024 14:21:10 +0100 Subject: [PATCH 09/12] PAGOPA-1404 deprecating old api --- .../bizeventsservice/controller/IPaymentsController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/controller/IPaymentsController.java b/src/main/java/it/gov/pagopa/bizeventsservice/controller/IPaymentsController.java index c3f26058..84fff8b7 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/controller/IPaymentsController.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/controller/IPaymentsController.java @@ -25,7 +25,9 @@ @RequestMapping @Validated public interface IPaymentsController { - + + // TODO: this API is included in the one using the path /organizations/{organizationfiscalcode}/receipts/{iur}, will be removed + @Deprecated @Operation(summary = "The organization get the receipt for the creditor institution using IUV and IUR.", security = {@SecurityRequirement(name = "ApiKey")}, operationId = "getOrganizationReceiptIuvIur") @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Obtained receipt.", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, schema = @Schema(name = "CtReceipt", implementation = CtReceiptModelResponse.class))), From 2f390b9d5bd44e2afaafa9074f967f4e98953f88 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Thu, 11 Jan 2024 14:24:59 +0100 Subject: [PATCH 10/12] PAGOPA-1404 solving sonar issue --- .../bizeventsservice/controller/IPaymentsController.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/controller/IPaymentsController.java b/src/main/java/it/gov/pagopa/bizeventsservice/controller/IPaymentsController.java index 84fff8b7..def83f76 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/controller/IPaymentsController.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/controller/IPaymentsController.java @@ -28,6 +28,9 @@ public interface IPaymentsController { // TODO: this API is included in the one using the path /organizations/{organizationfiscalcode}/receipts/{iur}, will be removed @Deprecated + /** + * @deprecated (API to be removed after the next SANP release) + */ @Operation(summary = "The organization get the receipt for the creditor institution using IUV and IUR.", security = {@SecurityRequirement(name = "ApiKey")}, operationId = "getOrganizationReceiptIuvIur") @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Obtained receipt.", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, schema = @Schema(name = "CtReceipt", implementation = CtReceiptModelResponse.class))), From 027d1598d30246f3f57f50be8619ae2457855c7c Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Thu, 11 Jan 2024 15:07:28 +0100 Subject: [PATCH 11/12] PAGOPA-1404 adding distinct --- .../pagopa/bizeventsservice/repository/BizEventsRepository.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/repository/BizEventsRepository.java b/src/main/java/it/gov/pagopa/bizeventsservice/repository/BizEventsRepository.java index fb087bbf..bc3f606a 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/repository/BizEventsRepository.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/repository/BizEventsRepository.java @@ -22,7 +22,7 @@ List getBizEventByOrgFiscCodeIuvAndIur(@Param("organizationFiscalCode" List getBizEventByOrgFiscalCodeAndIuv(@Param("organizationFiscalCode") String organizationFiscalCode, @Param("iuv") String iuv); - @Query("select value c from c JOIN t IN c.transferList where t.fiscalCodePA = @organizationFiscalCode and c.paymentInfo.paymentToken = @iur and StringToNumber(c.debtorPosition.modelType) > 1") + @Query("select distinct value c from c JOIN t IN c.transferList where t.fiscalCodePA = @organizationFiscalCode and c.paymentInfo.paymentToken = @iur and StringToNumber(c.debtorPosition.modelType) > 1") List getBizEventByOrgFiscCodeAndIur(@Param("organizationFiscalCode") String organizationFiscalCode, @Param("iur") String iur); From fdfae39215af0bdb97590eed9a266b6321db150e Mon Sep 17 00:00:00 2001 From: pagopa-github-bot Date: Thu, 11 Jan 2024 14:18:40 +0000 Subject: [PATCH 12/12] Bump to version 0.1.1-2-PAGOPA-1404-sviluppo-modifiche-get-organization-receipt [skip ci] --- helm/Chart.yaml | 4 +- helm/values-dev.yaml | 2 +- helm/values-prod.yaml | 2 +- helm/values-uat.yaml | 2 +- openapi/openapi.json | 3098 ++++++++++++++++++++--------------------- pom.xml | 2 +- 6 files changed, 1555 insertions(+), 1555 deletions(-) diff --git a/helm/Chart.yaml b/helm/Chart.yaml index 40ea3cad..4e4476ce 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: pagopa-biz-events-service description: Microservice for exposing REST APIs about payment receipts. type: application -version: 0.21.0 -appVersion: 0.1.1-1-PAGOPA-1404-sviluppo-modifiche-get-organization-receipt +version: 0.22.0 +appVersion: 0.1.1-2-PAGOPA-1404-sviluppo-modifiche-get-organization-receipt dependencies: - name: microservice-chart version: 2.4.0 diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index 76c039d8..0930ef62 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "" image: repository: ghcr.io/pagopa/pagopa-biz-events-service - tag: "0.1.1-1-PAGOPA-1404-sviluppo-modifiche-get-organization-receipt" + tag: "0.1.1-2-PAGOPA-1404-sviluppo-modifiche-get-organization-receipt" pullPolicy: Always livenessProbe: httpGet: diff --git a/helm/values-prod.yaml b/helm/values-prod.yaml index 65775699..fd1a27b6 100644 --- a/helm/values-prod.yaml +++ b/helm/values-prod.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "" image: repository: ghcr.io/pagopa/pagopa-biz-events-service - tag: "0.1.1-1-PAGOPA-1404-sviluppo-modifiche-get-organization-receipt" + tag: "0.1.1-2-PAGOPA-1404-sviluppo-modifiche-get-organization-receipt" pullPolicy: Always livenessProbe: httpGet: diff --git a/helm/values-uat.yaml b/helm/values-uat.yaml index 3fd762a2..c059695c 100644 --- a/helm/values-uat.yaml +++ b/helm/values-uat.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "" image: repository: ghcr.io/pagopa/pagopa-biz-events-service - tag: "0.1.1-1-PAGOPA-1404-sviluppo-modifiche-get-organization-receipt" + tag: "0.1.1-2-PAGOPA-1404-sviluppo-modifiche-get-organization-receipt" pullPolicy: Always livenessProbe: httpGet: diff --git a/openapi/openapi.json b/openapi/openapi.json index e83cf25f..4cf63c25 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -1,1619 +1,1619 @@ { - "openapi": "3.0.1", - "info": { - "title": "Biz-Events Service", - "description": "Microservice for exposing REST APIs about payment receipts.", - "termsOfService": "https://www.pagopa.gov.it/", - "version": "0.1.1-1-PAGOPA-1404-sviluppo-modifiche-get-organization-receipt" - }, - "servers": [ - { - "url": "http://localhost:8080", - "description": "Generated server url" - } - ], - "tags": [ - { - "name": "Actuator", - "description": "Monitor and interact", - "externalDocs": { - "description": "Spring Boot Actuator Web API Documentation", - "url": "https://docs.spring.io/spring-boot/docs/current/actuator-api/html/" - } - } - ], - "paths": { - "/actuator": { - "get": { - "tags": [ - "Actuator" - ], - "summary": "Actuator root web endpoint", - "operationId": "links", - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/vnd.spring-boot.actuator.v3+json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - } - } - } - }, - "application/vnd.spring-boot.actuator.v2+json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - } - } - } - }, - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - } - } - } - } - } - } + "openapi": "3.0.1", + "info": { + "title": "Biz-Events Service", + "description": "Microservice for exposing REST APIs about payment receipts.", + "termsOfService": "https://www.pagopa.gov.it/", + "version": "0.1.1-2-PAGOPA-1404-sviluppo-modifiche-get-organization-receipt" + }, + "servers": [ + { + "url": "http://localhost:8080", + "description": "Generated server url" + } + ], + "tags": [ + { + "name": "Actuator", + "description": "Monitor and interact", + "externalDocs": { + "description": "Spring Boot Actuator Web API Documentation", + "url": "https://docs.spring.io/spring-boot/docs/current/actuator-api/html/" + } + } + ], + "paths": { + "/actuator": { + "get": { + "tags": [ + "Actuator" + ], + "summary": "Actuator root web endpoint", + "operationId": "links", + "responses": { + "200": { + "description": "OK", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } + } }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" + "content": { + "application/vnd.spring-boot.actuator.v3+json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" } + } } - ] - }, - "/actuator/health": { - "get": { - "tags": [ - "Actuator" - ], - "summary": "Actuator web endpoint 'health'", - "operationId": "health", - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/vnd.spring-boot.actuator.v3+json": { - "schema": { - "type": "object" - } - }, - "application/vnd.spring-boot.actuator.v2+json": { - "schema": { - "type": "object" - } - }, - "application/json": { - "schema": { - "type": "object" - } - } - } + }, + "application/vnd.spring-boot.actuator.v2+json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" } + } } - }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" + }, + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" } + } } - ] - }, - "/actuator/health/**": { - "get": { - "tags": [ - "Actuator" - ], - "summary": "Actuator web endpoint 'health-path'", - "operationId": "health-path", - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/vnd.spring-boot.actuator.v3+json": { - "schema": { - "type": "object" - } - }, - "application/vnd.spring-boot.actuator.v2+json": { - "schema": { - "type": "object" - } - }, - "application/json": { - "schema": { - "type": "object" - } - } - } - } + } + } + } + } + }, + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } + } + ] + }, + "/actuator/health": { + "get": { + "tags": [ + "Actuator" + ], + "summary": "Actuator web endpoint 'health'", + "operationId": "health", + "responses": { + "200": { + "description": "OK", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } + } }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } + "content": { + "application/vnd.spring-boot.actuator.v3+json": { + "schema": { + "type": "object" } - ] - }, - "/actuator/info": { - "get": { - "tags": [ - "Actuator" - ], - "summary": "Actuator web endpoint 'info'", - "operationId": "info", - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/vnd.spring-boot.actuator.v3+json": { - "schema": { - "type": "object" - } - }, - "application/vnd.spring-boot.actuator.v2+json": { - "schema": { - "type": "object" - } - }, - "application/json": { - "schema": { - "type": "object" - } - } - } - } + }, + "application/vnd.spring-boot.actuator.v2+json": { + "schema": { + "type": "object" } - }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } + }, + "application/json": { + "schema": { + "type": "object" } - ] - }, - "/events/organizations/{organization-fiscal-code}/iuvs/{iuv}": { - "get": { - "tags": [ - "get BizEvent APIs" - ], - "summary": "Retrieve the biz-event given the organization fiscal code and IUV.", - "operationId": "getBizEventByOrganizationFiscalCodeAndIuv", - "parameters": [ - { - "name": "organization-fiscal-code", - "in": "path", - "description": "The fiscal code of the Organization.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "iuv", - "in": "path", - "description": "The unique payment identification. Alphanumeric code that uniquely associates and identifies three key elements of a payment: reason, payer, amount", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Obtained biz-event.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BizEvent" - } - } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "Not found the biz-event.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "422": { - "description": "Unable to process the request.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "429": { - "description": "Too many requests.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "Service unavailable.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - } - }, - "security": [ - { - "ApiKey": [] - } - ] - }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } + } + } + } + } + }, + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } + } + ] + }, + "/actuator/health/**": { + "get": { + "tags": [ + "Actuator" + ], + "summary": "Actuator web endpoint 'health-path'", + "operationId": "health-path", + "responses": { + "200": { + "description": "OK", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } - ] - }, - "/events/{biz-event-id}": { - "get": { - "tags": [ - "get BizEvent APIs" - ], - "summary": "Retrieve the biz-event given its id.", - "operationId": "getBizEvent", - "parameters": [ - { - "name": "biz-event-id", - "in": "path", - "description": "The id of the biz-event.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Obtained biz-event.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BizEvent" - } - } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "Not found the biz-event.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "422": { - "description": "Unable to process the request.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "429": { - "description": "Too many requests.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "Service unavailable.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - } - }, - "security": [ - { - "ApiKey": [] - } - ] + } }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } + "content": { + "application/vnd.spring-boot.actuator.v3+json": { + "schema": { + "type": "object" } - ] - }, - "/info": { - "get": { - "tags": [ - "Home" - ], - "summary": "health check", - "description": "Return OK if application is started", - "operationId": "healthCheck", - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppInfo" - } - } - } - }, - "400": { - "description": "Bad Request", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "401": { - "description": "Unauthorized", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "description": "Forbidden", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "description": "Too many requests", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "Service unavailable", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - } - }, - "security": [ - { - "ApiKey": [] - } - ] - }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } + }, + "application/vnd.spring-boot.actuator.v2+json": { + "schema": { + "type": "object" } - ] - }, - "/organizations/{organizationfiscalcode}/receipts/{iur}": { - "get": { - "tags": [ - "Payment Receipts REST APIs" - ], - "summary": "The organization get the receipt for the creditor institution using IUR.", - "operationId": "getOrganizationReceiptIur", - "parameters": [ - { - "name": "organizationfiscalcode", - "in": "path", - "description": "The fiscal code of the Organization.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "iur", - "in": "path", - "description": "The unique reference of the operation assigned to the payment (Payment Token).", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Obtained receipt.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CtReceiptModelResponse" - } - } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "Not found the receipt.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "422": { - "description": "Unable to process the request.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "429": { - "description": "Too many requests.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "Service unavailable.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - } - }, - "security": [ - { - "ApiKey": [] - } - ] - }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } + }, + "application/json": { + "schema": { + "type": "object" } - ] - }, - "/organizations/{organizationfiscalcode}/receipts/{iur}/paymentoptions/{iuv}": { - "get": { - "tags": [ - "Payment Receipts REST APIs" - ], - "summary": "The organization get the receipt for the creditor institution using IUV and IUR.", - "operationId": "getOrganizationReceiptIuvIur", - "parameters": [ - { - "name": "organizationfiscalcode", - "in": "path", - "description": "The fiscal code of the Organization.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "iur", - "in": "path", - "description": "The unique reference of the operation assigned to the payment (Payment Token).", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "iuv", - "in": "path", - "description": "The unique payment identification. Alphanumeric code that uniquely associates and identifies three key elements of a payment: reason, payer, amount", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Obtained receipt.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CtReceiptModelResponse" - } - } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "Not found the receipt.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "422": { - "description": "Unable to process the request.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "429": { - "description": "Too many requests.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "Service unavailable.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - } - }, - "security": [ - { - "ApiKey": [] - } - ] + } + } + } + } + }, + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } + } + ] + }, + "/actuator/info": { + "get": { + "tags": [ + "Actuator" + ], + "summary": "Actuator web endpoint 'info'", + "operationId": "info", + "responses": { + "200": { + "description": "OK", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } + "content": { + "application/vnd.spring-boot.actuator.v3+json": { + "schema": { + "type": "object" } - ] + }, + "application/vnd.spring-boot.actuator.v2+json": { + "schema": { + "type": "object" + } + }, + "application/json": { + "schema": { + "type": "object" + } + } + } + } + } + }, + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } } + ] }, - "components": { - "schemas": { - "ProblemJson": { - "type": "object", - "properties": { - "title": { - "type": "string", - "description": "A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized); example: Service Unavailable" - }, - "status": { - "maximum": 600, - "minimum": 100, - "type": "integer", - "description": "The HTTP status code generated by the origin server for this occurrence of the problem.", - "format": "int32", - "example": 200 - }, - "detail": { - "type": "string", - "description": "A human readable explanation specific to this occurrence of the problem.", - "example": "There was an error processing the request" - } + "/events/organizations/{organization-fiscal-code}/iuvs/{iuv}": { + "get": { + "tags": [ + "get BizEvent APIs" + ], + "summary": "Retrieve the biz-event given the organization fiscal code and IUV.", + "operationId": "getBizEventByOrganizationFiscalCodeAndIuv", + "parameters": [ + { + "name": "organization-fiscal-code", + "in": "path", + "description": "The fiscal code of the Organization.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "iuv", + "in": "path", + "description": "The unique payment identification. Alphanumeric code that uniquely associates and identifies three key elements of a payment: reason, payer, amount", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Obtained biz-event.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } + } }, - "CtReceiptModelResponse": { - "required": [ - "channelDescription", - "companyName", - "creditorReferenceId", - "debtor", - "description", - "fiscalCode", - "idChannel", - "idPSP", - "noticeNumber", - "outcome", - "paymentAmount", - "pspCompanyName", - "receiptId", - "transferList" - ], - "type": "object", - "properties": { - "receiptId": { - "type": "string" - }, - "noticeNumber": { - "type": "string" - }, - "fiscalCode": { - "type": "string" - }, - "outcome": { - "type": "string" - }, - "creditorReferenceId": { - "type": "string" - }, - "paymentAmount": { - "type": "number" - }, - "description": { - "type": "string" - }, - "companyName": { - "type": "string" - }, - "officeName": { - "type": "string" - }, - "debtor": { - "$ref": "#/components/schemas/Debtor" - }, - "transferList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransferPA" - } - }, - "idPSP": { - "type": "string" - }, - "pspFiscalCode": { - "type": "string" - }, - "pspPartitaIVA": { - "type": "string" - }, - "pspCompanyName": { - "type": "string" - }, - "idChannel": { - "type": "string" - }, - "channelDescription": { - "type": "string" - }, - "payer": { - "$ref": "#/components/schemas/Payer" - }, - "paymentMethod": { - "type": "string" - }, - "fee": { - "type": "number" - }, - "primaryCiIncurredFee": { - "type": "number" - }, - "idBundle": { - "type": "string" - }, - "idCiBundle": { - "type": "string" - }, - "paymentDateTime": { - "type": "string", - "format": "date" - }, - "applicationDate": { - "type": "string", - "format": "date" - }, - "transferDate": { - "type": "string", - "format": "date" - }, - "metadata": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MapEntry" - } - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BizEvent" } - }, - "Debtor": { - "type": "object", - "properties": { - "fullName": { - "type": "string" - }, - "entityUniqueIdentifierType": { - "type": "string" - }, - "entityUniqueIdentifierValue": { - "type": "string" - }, - "streetName": { - "type": "string" - }, - "civicNumber": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "city": { - "type": "string" - }, - "stateProvinceRegion": { - "type": "string" - }, - "country": { - "type": "string" - }, - "eMail": { - "type": "string" - } + } + } + }, + "401": { + "description": "Wrong or missing function key.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } - }, - "MapEntry": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "value": { - "type": "string" - } + } + } + }, + "404": { + "description": "Not found the biz-event.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } + } }, - "Payer": { - "type": "object", - "properties": { - "fullName": { - "type": "string" - }, - "entityUniqueIdentifierType": { - "type": "string" - }, - "entityUniqueIdentifierValue": { - "type": "string" - }, - "streetName": { - "type": "string" - }, - "civicNumber": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "city": { - "type": "string" - }, - "stateProvinceRegion": { - "type": "string" - }, - "country": { - "type": "string" - }, - "eMail": { - "type": "string" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "422": { + "description": "Unable to process the request.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } + } }, - "TransferPA": { - "required": [ - "fiscalCodePA", - "iban", - "mbdAttachment", - "remittanceInformation", - "transferAmount", - "transferCategory" - ], - "type": "object", - "properties": { - "idTransfer": { - "maximum": 5, - "minimum": 1, - "type": "integer", - "format": "int32" - }, - "transferAmount": { - "type": "number" - }, - "fiscalCodePA": { - "type": "string" - }, - "iban": { - "type": "string" - }, - "mbdAttachment": { - "type": "string" - }, - "remittanceInformation": { - "type": "string" - }, - "transferCategory": { - "type": "string" - }, - "metadata": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MapEntry" - } - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "429": { + "description": "Too many requests.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } + } + } + }, + "500": { + "description": "Service unavailable.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } }, - "AppInfo": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "version": { - "type": "string" - }, - "environment": { - "type": "string" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } + } + } + } + }, + "security": [ + { + "ApiKey": [] + } + ] + }, + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } + } + ] + }, + "/events/{biz-event-id}": { + "get": { + "tags": [ + "get BizEvent APIs" + ], + "summary": "Retrieve the biz-event given its id.", + "operationId": "getBizEvent", + "parameters": [ + { + "name": "biz-event-id", + "in": "path", + "description": "The id of the biz-event.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Obtained biz-event.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } }, - "AuthRequest": { - "type": "object", - "properties": { - "authOutcome": { - "type": "string" - }, - "guid": { - "type": "string" - }, - "correlationId": { - "type": "string" - }, - "error": { - "type": "string" - }, - "auth_code": { - "type": "string" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BizEvent" + } + } + } + }, + "401": { + "description": "Wrong or missing function key.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } + } + } + }, + "404": { + "description": "Not found the biz-event.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } }, - "BizEvent": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "version": { - "type": "string" - }, - "idPaymentManager": { - "type": "string" - }, - "complete": { - "type": "string" - }, - "receiptId": { - "type": "string" - }, - "missingInfo": { - "type": "array", - "items": { - "type": "string" - } - }, - "debtorPosition": { - "$ref": "#/components/schemas/DebtorPosition" - }, - "creditor": { - "$ref": "#/components/schemas/Creditor" - }, - "psp": { - "$ref": "#/components/schemas/Psp" - }, - "debtor": { - "$ref": "#/components/schemas/Debtor" - }, - "payer": { - "$ref": "#/components/schemas/Payer" - }, - "paymentInfo": { - "$ref": "#/components/schemas/PaymentInfo" - }, - "transferList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Transfer" - } - }, - "transactionDetails": { - "$ref": "#/components/schemas/TransactionDetails" - }, - "eventStatus": { - "type": "string", - "enum": [ - "NA", - "RETRY", - "FAILED", - "DONE" - ] - }, - "eventRetryEnrichmentCount": { - "type": "integer", - "format": "int32" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } + } + } + }, + "422": { + "description": "Unable to process the request.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } }, - "Creditor": { - "type": "object", - "properties": { - "idPA": { - "type": "string" - }, - "idBrokerPA": { - "type": "string" - }, - "idStation": { - "type": "string" - }, - "companyName": { - "type": "string" - }, - "officeName": { - "type": "string" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "429": { + "description": "Too many requests.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "Service unavailable.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } + } }, - "DebtorPosition": { - "type": "object", - "properties": { - "modelType": { - "type": "string" - }, - "noticeNumber": { - "type": "string" - }, - "iuv": { - "type": "string" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + } + }, + "security": [ + { + "ApiKey": [] + } + ] + }, + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } + } + ] + }, + "/info": { + "get": { + "tags": [ + "Home" + ], + "summary": "health check", + "description": "Return OK if application is started", + "operationId": "healthCheck", + "responses": { + "200": { + "description": "OK", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } + } }, - "Details": { - "type": "object", - "properties": { - "blurredNumber": { - "type": "string" - }, - "holder": { - "type": "string" - }, - "circuit": { - "type": "string" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppInfo" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } + } }, - "Info": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "blurredNumber": { - "type": "string" - }, - "holder": { - "type": "string" - }, - "expireMonth": { - "type": "string" - }, - "expireYear": { - "type": "string" - }, - "brand": { - "type": "string" - }, - "issuerAbi": { - "type": "string" - }, - "issuerName": { - "type": "string" - }, - "label": { - "type": "string" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } + } + } + }, + "401": { + "description": "Unauthorized", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "403": { + "description": "Forbidden", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "429": { + "description": "Too many requests", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "Service unavailable", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } }, - "MBD": { - "type": "object", - "properties": { - "IUBD": { - "type": "string" - }, - "oraAcquisto": { - "type": "string" - }, - "importo": { - "type": "string" - }, - "tipoBollo": { - "type": "string" - }, - "MBDAttachment": { - "type": "string" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } + } + } + } + }, + "security": [ + { + "ApiKey": [] + } + ] + }, + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } + } + ] + }, + "/organizations/{organizationfiscalcode}/receipts/{iur}": { + "get": { + "tags": [ + "Payment Receipts REST APIs" + ], + "summary": "The organization get the receipt for the creditor institution using IUR.", + "operationId": "getOrganizationReceiptIur", + "parameters": [ + { + "name": "organizationfiscalcode", + "in": "path", + "description": "The fiscal code of the Organization.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "iur", + "in": "path", + "description": "The unique reference of the operation assigned to the payment (Payment Token).", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Obtained receipt.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } }, - "PaymentAuthorizationRequest": { - "type": "object", - "properties": { - "authOutcome": { - "type": "string" - }, - "requestId": { - "type": "string" - }, - "correlationId": { - "type": "string" - }, - "authCode": { - "type": "string" - }, - "paymentMethodType": { - "type": "string" - }, - "details": { - "$ref": "#/components/schemas/Details" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CtReceiptModelResponse" + } + } + } + }, + "401": { + "description": "Wrong or missing function key.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } + } + } + }, + "404": { + "description": "Not found the receipt.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } }, - "PaymentInfo": { - "type": "object", - "properties": { - "paymentDateTime": { - "type": "string" - }, - "applicationDate": { - "type": "string" - }, - "transferDate": { - "type": "string" - }, - "dueDate": { - "type": "string" - }, - "paymentToken": { - "type": "string" - }, - "amount": { - "type": "string" - }, - "fee": { - "type": "string" - }, - "primaryCiIncurredFee": { - "type": "string" - }, - "idBundle": { - "type": "string" - }, - "idCiBundle": { - "type": "string" - }, - "totalNotice": { - "type": "string" - }, - "paymentMethod": { - "type": "string" - }, - "touchpoint": { - "type": "string" - }, - "remittanceInformation": { - "type": "string" - }, - "description": { - "type": "string" - }, - "metadata": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MapEntry" - } - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } + } + } + }, + "422": { + "description": "Unable to process the request.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } }, - "Psp": { - "type": "object", - "properties": { - "idPsp": { - "type": "string" - }, - "idBrokerPsp": { - "type": "string" - }, - "idChannel": { - "type": "string" - }, - "psp": { - "type": "string" - }, - "pspPartitaIVA": { - "type": "string" - }, - "pspFiscalCode": { - "type": "string" - }, - "channelDescription": { - "type": "string" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "429": { + "description": "Too many requests.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "Service unavailable.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } + } }, - "TransactionDetails": { - "type": "object", - "properties": { - "user": { - "$ref": "#/components/schemas/User" - }, - "paymentAuthorizationRequest": { - "$ref": "#/components/schemas/PaymentAuthorizationRequest" - }, - "wallet": { - "$ref": "#/components/schemas/WalletItem" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } + } + } + } + }, + "security": [ + { + "ApiKey": [] + } + ] + }, + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } + } + ] + }, + "/organizations/{organizationfiscalcode}/receipts/{iur}/paymentoptions/{iuv}": { + "get": { + "tags": [ + "Payment Receipts REST APIs" + ], + "summary": "The organization get the receipt for the creditor institution using IUV and IUR.", + "operationId": "getOrganizationReceiptIuvIur", + "parameters": [ + { + "name": "organizationfiscalcode", + "in": "path", + "description": "The fiscal code of the Organization.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "iur", + "in": "path", + "description": "The unique reference of the operation assigned to the payment (Payment Token).", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "iuv", + "in": "path", + "description": "The unique payment identification. Alphanumeric code that uniquely associates and identifies three key elements of a payment: reason, payer, amount", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Obtained receipt.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } }, - "Transfer": { - "type": "object", - "properties": { - "idTransfer": { - "type": "string" - }, - "fiscalCodePA": { - "type": "string" - }, - "companyName": { - "type": "string" - }, - "amount": { - "type": "string" - }, - "transferCategory": { - "type": "string" - }, - "remittanceInformation": { - "type": "string" - }, - "metadata": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MapEntry" - } - }, - "IBAN": { - "type": "string" - }, - "MBD": { - "$ref": "#/components/schemas/MBD" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CtReceiptModelResponse" + } + } + } + }, + "401": { + "description": "Wrong or missing function key.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" } + } + } + }, + "404": { + "description": "Not found the receipt.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } }, - "User": { - "type": "object", - "properties": { - "fullName": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "F", - "G" - ] - }, - "fiscalCode": { - "type": "string" - }, - "notificationEmail": { - "type": "string" - }, - "userId": { - "type": "string" - }, - "userStatus": { - "type": "string" - }, - "userStatusDescription": { - "type": "string" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } + } + } + }, + "422": { + "description": "Unable to process the request.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } }, - "WalletItem": { - "type": "object", - "properties": { - "idWallet": { - "type": "string" - }, - "walletType": { - "type": "string", - "enum": [ - "CARD", - "PAYPAL", - "BANCOMATPAY" - ] - }, - "enableableFunctions": { - "type": "array", - "items": { - "type": "string" - } - }, - "pagoPa": { - "type": "boolean" - }, - "onboardingChannel": { - "type": "string" - }, - "favourite": { - "type": "boolean" - }, - "createDate": { - "type": "string" - }, - "info": { - "$ref": "#/components/schemas/Info" - }, - "authRequest": { - "$ref": "#/components/schemas/AuthRequest" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } + } + } + }, + "429": { + "description": "Too many requests.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "Service unavailable.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } }, - "Link": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "templated": { - "type": "boolean" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } + } } + } }, - "securitySchemes": { - "ApiKey": { - "type": "apiKey", - "description": "The API key to access this function app.", - "name": "Ocp-Apim-Subscription-Key", - "in": "header" + "security": [ + { + "ApiKey": [] + } + ] + }, + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } + } + ] + } + }, + "components": { + "schemas": { + "ProblemJson": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized); example: Service Unavailable" + }, + "status": { + "maximum": 600, + "minimum": 100, + "type": "integer", + "description": "The HTTP status code generated by the origin server for this occurrence of the problem.", + "format": "int32", + "example": 200 + }, + "detail": { + "type": "string", + "description": "A human readable explanation specific to this occurrence of the problem.", + "example": "There was an error processing the request" + } + } + }, + "CtReceiptModelResponse": { + "required": [ + "channelDescription", + "companyName", + "creditorReferenceId", + "debtor", + "description", + "fiscalCode", + "idChannel", + "idPSP", + "noticeNumber", + "outcome", + "paymentAmount", + "pspCompanyName", + "receiptId", + "transferList" + ], + "type": "object", + "properties": { + "receiptId": { + "type": "string" + }, + "noticeNumber": { + "type": "string" + }, + "fiscalCode": { + "type": "string" + }, + "outcome": { + "type": "string" + }, + "creditorReferenceId": { + "type": "string" + }, + "paymentAmount": { + "type": "number" + }, + "description": { + "type": "string" + }, + "companyName": { + "type": "string" + }, + "officeName": { + "type": "string" + }, + "debtor": { + "$ref": "#/components/schemas/Debtor" + }, + "transferList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferPA" + } + }, + "idPSP": { + "type": "string" + }, + "pspFiscalCode": { + "type": "string" + }, + "pspPartitaIVA": { + "type": "string" + }, + "pspCompanyName": { + "type": "string" + }, + "idChannel": { + "type": "string" + }, + "channelDescription": { + "type": "string" + }, + "payer": { + "$ref": "#/components/schemas/Payer" + }, + "paymentMethod": { + "type": "string" + }, + "fee": { + "type": "number" + }, + "primaryCiIncurredFee": { + "type": "number" + }, + "idBundle": { + "type": "string" + }, + "idCiBundle": { + "type": "string" + }, + "paymentDateTime": { + "type": "string", + "format": "date" + }, + "applicationDate": { + "type": "string", + "format": "date" + }, + "transferDate": { + "type": "string", + "format": "date" + }, + "metadata": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MapEntry" } + } + } + }, + "Debtor": { + "type": "object", + "properties": { + "fullName": { + "type": "string" + }, + "entityUniqueIdentifierType": { + "type": "string" + }, + "entityUniqueIdentifierValue": { + "type": "string" + }, + "streetName": { + "type": "string" + }, + "civicNumber": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "city": { + "type": "string" + }, + "stateProvinceRegion": { + "type": "string" + }, + "country": { + "type": "string" + }, + "eMail": { + "type": "string" + } } + }, + "MapEntry": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "Payer": { + "type": "object", + "properties": { + "fullName": { + "type": "string" + }, + "entityUniqueIdentifierType": { + "type": "string" + }, + "entityUniqueIdentifierValue": { + "type": "string" + }, + "streetName": { + "type": "string" + }, + "civicNumber": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "city": { + "type": "string" + }, + "stateProvinceRegion": { + "type": "string" + }, + "country": { + "type": "string" + }, + "eMail": { + "type": "string" + } + } + }, + "TransferPA": { + "required": [ + "fiscalCodePA", + "iban", + "mbdAttachment", + "remittanceInformation", + "transferAmount", + "transferCategory" + ], + "type": "object", + "properties": { + "idTransfer": { + "maximum": 5, + "minimum": 1, + "type": "integer", + "format": "int32" + }, + "transferAmount": { + "type": "number" + }, + "fiscalCodePA": { + "type": "string" + }, + "iban": { + "type": "string" + }, + "mbdAttachment": { + "type": "string" + }, + "remittanceInformation": { + "type": "string" + }, + "transferCategory": { + "type": "string" + }, + "metadata": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MapEntry" + } + } + } + }, + "AppInfo": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "version": { + "type": "string" + }, + "environment": { + "type": "string" + } + } + }, + "AuthRequest": { + "type": "object", + "properties": { + "authOutcome": { + "type": "string" + }, + "guid": { + "type": "string" + }, + "correlationId": { + "type": "string" + }, + "error": { + "type": "string" + }, + "auth_code": { + "type": "string" + } + } + }, + "BizEvent": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "version": { + "type": "string" + }, + "idPaymentManager": { + "type": "string" + }, + "complete": { + "type": "string" + }, + "receiptId": { + "type": "string" + }, + "missingInfo": { + "type": "array", + "items": { + "type": "string" + } + }, + "debtorPosition": { + "$ref": "#/components/schemas/DebtorPosition" + }, + "creditor": { + "$ref": "#/components/schemas/Creditor" + }, + "psp": { + "$ref": "#/components/schemas/Psp" + }, + "debtor": { + "$ref": "#/components/schemas/Debtor" + }, + "payer": { + "$ref": "#/components/schemas/Payer" + }, + "paymentInfo": { + "$ref": "#/components/schemas/PaymentInfo" + }, + "transferList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Transfer" + } + }, + "transactionDetails": { + "$ref": "#/components/schemas/TransactionDetails" + }, + "eventStatus": { + "type": "string", + "enum": [ + "NA", + "RETRY", + "FAILED", + "DONE" + ] + }, + "eventRetryEnrichmentCount": { + "type": "integer", + "format": "int32" + } + } + }, + "Creditor": { + "type": "object", + "properties": { + "idPA": { + "type": "string" + }, + "idBrokerPA": { + "type": "string" + }, + "idStation": { + "type": "string" + }, + "companyName": { + "type": "string" + }, + "officeName": { + "type": "string" + } + } + }, + "DebtorPosition": { + "type": "object", + "properties": { + "modelType": { + "type": "string" + }, + "noticeNumber": { + "type": "string" + }, + "iuv": { + "type": "string" + } + } + }, + "Details": { + "type": "object", + "properties": { + "blurredNumber": { + "type": "string" + }, + "holder": { + "type": "string" + }, + "circuit": { + "type": "string" + } + } + }, + "Info": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "blurredNumber": { + "type": "string" + }, + "holder": { + "type": "string" + }, + "expireMonth": { + "type": "string" + }, + "expireYear": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "issuerAbi": { + "type": "string" + }, + "issuerName": { + "type": "string" + }, + "label": { + "type": "string" + } + } + }, + "MBD": { + "type": "object", + "properties": { + "IUBD": { + "type": "string" + }, + "oraAcquisto": { + "type": "string" + }, + "importo": { + "type": "string" + }, + "tipoBollo": { + "type": "string" + }, + "MBDAttachment": { + "type": "string" + } + } + }, + "PaymentAuthorizationRequest": { + "type": "object", + "properties": { + "authOutcome": { + "type": "string" + }, + "requestId": { + "type": "string" + }, + "correlationId": { + "type": "string" + }, + "authCode": { + "type": "string" + }, + "paymentMethodType": { + "type": "string" + }, + "details": { + "$ref": "#/components/schemas/Details" + } + } + }, + "PaymentInfo": { + "type": "object", + "properties": { + "paymentDateTime": { + "type": "string" + }, + "applicationDate": { + "type": "string" + }, + "transferDate": { + "type": "string" + }, + "dueDate": { + "type": "string" + }, + "paymentToken": { + "type": "string" + }, + "amount": { + "type": "string" + }, + "fee": { + "type": "string" + }, + "primaryCiIncurredFee": { + "type": "string" + }, + "idBundle": { + "type": "string" + }, + "idCiBundle": { + "type": "string" + }, + "totalNotice": { + "type": "string" + }, + "paymentMethod": { + "type": "string" + }, + "touchpoint": { + "type": "string" + }, + "remittanceInformation": { + "type": "string" + }, + "description": { + "type": "string" + }, + "metadata": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MapEntry" + } + } + } + }, + "Psp": { + "type": "object", + "properties": { + "idPsp": { + "type": "string" + }, + "idBrokerPsp": { + "type": "string" + }, + "idChannel": { + "type": "string" + }, + "psp": { + "type": "string" + }, + "pspPartitaIVA": { + "type": "string" + }, + "pspFiscalCode": { + "type": "string" + }, + "channelDescription": { + "type": "string" + } + } + }, + "TransactionDetails": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" + }, + "paymentAuthorizationRequest": { + "$ref": "#/components/schemas/PaymentAuthorizationRequest" + }, + "wallet": { + "$ref": "#/components/schemas/WalletItem" + } + } + }, + "Transfer": { + "type": "object", + "properties": { + "idTransfer": { + "type": "string" + }, + "fiscalCodePA": { + "type": "string" + }, + "companyName": { + "type": "string" + }, + "amount": { + "type": "string" + }, + "transferCategory": { + "type": "string" + }, + "remittanceInformation": { + "type": "string" + }, + "metadata": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MapEntry" + } + }, + "IBAN": { + "type": "string" + }, + "MBD": { + "$ref": "#/components/schemas/MBD" + } + } + }, + "User": { + "type": "object", + "properties": { + "fullName": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "F", + "G" + ] + }, + "fiscalCode": { + "type": "string" + }, + "notificationEmail": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "userStatus": { + "type": "string" + }, + "userStatusDescription": { + "type": "string" + } + } + }, + "WalletItem": { + "type": "object", + "properties": { + "idWallet": { + "type": "string" + }, + "walletType": { + "type": "string", + "enum": [ + "CARD", + "PAYPAL", + "BANCOMATPAY" + ] + }, + "enableableFunctions": { + "type": "array", + "items": { + "type": "string" + } + }, + "pagoPa": { + "type": "boolean" + }, + "onboardingChannel": { + "type": "string" + }, + "favourite": { + "type": "boolean" + }, + "createDate": { + "type": "string" + }, + "info": { + "$ref": "#/components/schemas/Info" + }, + "authRequest": { + "$ref": "#/components/schemas/AuthRequest" + } + } + }, + "Link": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "templated": { + "type": "boolean" + } + } + } + }, + "securitySchemes": { + "ApiKey": { + "type": "apiKey", + "description": "The API key to access this function app.", + "name": "Ocp-Apim-Subscription-Key", + "in": "header" + } } + } } diff --git a/pom.xml b/pom.xml index fa11c558..6c70fe17 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ it.gov.pagopa bizeventsservice - 0.1.1-1-PAGOPA-1404-sviluppo-modifiche-get-organization-receipt + 0.1.1-2-PAGOPA-1404-sviluppo-modifiche-get-organization-receipt Biz-Events Service Microservice for exposing REST APIs about payment receipts.