From 4ffa540165d643d779ca5aeee62a8db83ecd9073 Mon Sep 17 00:00:00 2001 From: Jacopo Carlini Date: Wed, 4 Sep 2024 18:07:29 +0200 Subject: [PATCH 1/6] coverage --- .../controller/IPaidNoticeController.java | 37 +++++++++++ .../controller/ITransactionController.java | 4 +- .../controller/impl/PaidNoticeController.java | 31 +++++++++ .../model/response/paidnotice/PaidNotice.java | 30 +++++++++ .../response/paidnotice/PaidNoticesList.java | 14 ++++ .../controller/PaidNoticeControllerTest.java | 65 ++++++++++++++++++- .../pagopa/bizeventsservice/util/Utility.java | 55 +++++++++------- 7 files changed, 211 insertions(+), 25 deletions(-) create mode 100644 src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/PaidNotice.java create mode 100644 src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/PaidNoticesList.java diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/controller/IPaidNoticeController.java b/src/main/java/it/gov/pagopa/bizeventsservice/controller/IPaidNoticeController.java index a515b865..f4ecf2c5 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/controller/IPaidNoticeController.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/controller/IPaidNoticeController.java @@ -2,6 +2,7 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.headers.Header; import io.swagger.v3.oas.annotations.media.Content; import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.responses.ApiResponse; @@ -9,11 +10,13 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import it.gov.pagopa.bizeventsservice.model.ProblemJson; +import it.gov.pagopa.bizeventsservice.model.response.paidnotice.PaidNoticesList; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import javax.validation.Valid; import javax.validation.constraints.NotBlank; @@ -22,6 +25,40 @@ @Validated public interface IPaidNoticeController { String X_FISCAL_CODE = "x-fiscal-code"; + String X_CONTINUATION_TOKEN = "x-continuation-token"; + String PAGE_SIZE = "size"; + + /** + * @deprecated + * recovers biz-event data for the paid notices list + * + * @param fiscalCode tokenized user fiscal code + * @param continuationToken continuation token for paginated query + * @param size optional parameter defining page size, defaults to 10 + * @return the paid notices list + */ + @GetMapping + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "Obtained paid notices list.", + headers = @Header(name = X_CONTINUATION_TOKEN, description = "continuation token for paginated query", schema = @Schema(type = "string")), + content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, schema = @Schema(implementation = PaidNoticesList.class))), + @ApiResponse(responseCode = "401", description = "Wrong or missing function key.", content = @Content(schema = @Schema())), + @ApiResponse(responseCode = "404", description = "Not found the fiscal code.", 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)))}) + @Operation(summary = "Retrieve the paged transaction list from biz events.", description = "This operation is deprecated. Use Paid Notice APIs instead", security = { + @SecurityRequirement(name = "ApiKey")}) + ResponseEntity getPaidNotices( + @RequestHeader(name = X_FISCAL_CODE) String fiscalCode, + @RequestHeader(name = X_CONTINUATION_TOKEN, required = false) String continuationToken, + @RequestParam(name = PAGE_SIZE, required = false, defaultValue = "10") Integer size, + @Valid @Parameter(description = "Filter by payer") @RequestParam(value = "is_payer", required = false) Boolean isPayer, + @Valid @Parameter(description = "Filter by debtor") @RequestParam(value = "is_debtor", required = false) Boolean isDebtor + ); + // TODO inserire l'ordering + + + @Operation(summary = "Disable the paid notice details given its id.", security = { @SecurityRequirement(name = "ApiKey")}, operationId = "disablePaidNotice") diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/controller/ITransactionController.java b/src/main/java/it/gov/pagopa/bizeventsservice/controller/ITransactionController.java index 0b73c1e1..2e63fd27 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/controller/ITransactionController.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/controller/ITransactionController.java @@ -40,6 +40,7 @@ public interface ITransactionController { String PAGE_NUMBER = "page"; /** + * @deprecated * recovers biz-event data for the transaction list * * @param fiscalCode tokenized user fiscal code @@ -60,8 +61,9 @@ public interface ITransactionController { @ApiResponse(responseCode = "404", description = "Not found the transaction.", 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)))}) - @Operation(summary = "Retrieve the paged transaction list from biz events.", security = { + @Operation(summary = "Retrieve the paged transaction list from biz events.", description = "This operation is deprecated. Use Paid Notice APIs instead", security = { @SecurityRequirement(name = "ApiKey")}, operationId = "getTransactionList") + @Deprecated(forRemoval = false) ResponseEntity getTransactionList( @RequestHeader(name = X_FISCAL_CODE) String fiscalCode, @Valid @Parameter(description = "Filter by payer") @RequestParam(value = "is_payer", required = false) Boolean isPayer, diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/controller/impl/PaidNoticeController.java b/src/main/java/it/gov/pagopa/bizeventsservice/controller/impl/PaidNoticeController.java index beb5cb5a..2a7ffcd0 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/controller/impl/PaidNoticeController.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/controller/impl/PaidNoticeController.java @@ -1,12 +1,19 @@ package it.gov.pagopa.bizeventsservice.controller.impl; import it.gov.pagopa.bizeventsservice.controller.IPaidNoticeController; +import it.gov.pagopa.bizeventsservice.model.filterandorder.Order; +import it.gov.pagopa.bizeventsservice.model.response.paidnotice.PaidNotice; +import it.gov.pagopa.bizeventsservice.model.response.paidnotice.PaidNoticesList; +import it.gov.pagopa.bizeventsservice.model.response.transaction.TransactionListResponse; import it.gov.pagopa.bizeventsservice.service.ITransactionService; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Sort; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.RestController; +import java.util.List; + /** * Implementation of {@link IPaidNoticeController} that contains the Rest Controller * for events services @@ -22,6 +29,30 @@ public PaidNoticeController(ITransactionService transactionService) { } + @Override + public ResponseEntity getPaidNotices(String fiscalCode, String continuationToken, Integer size, Boolean isPayer, Boolean isDebtor) { + TransactionListResponse transactionListResponse = transactionService.getTransactionList(fiscalCode, isPayer, isDebtor, + continuationToken, size, Order.TransactionListOrder.TRANSACTION_DATE, Sort.Direction.DESC); + + + List paidNoticeList = transactionListResponse.getTransactionList().stream() + .map(elem -> PaidNotice.builder() + .eventId(elem.getTransactionId()) + .payeeName(elem.getPayeeName()) + .payeeTaxCode(elem.getPayeeTaxCode()) + .amount(elem.getAmount()) + .noticeDate(elem.getTransactionDate()) + .isCart(elem.getIsCart()) + .isPayer(elem.getIsPayer()) + .isDebtor(elem.getIsDebtor()) + .build()) + .toList(); + + return ResponseEntity.ok() + .header(X_CONTINUATION_TOKEN, transactionListResponse.getContinuationToken()) + .body(PaidNoticesList.builder().paidNoticeList(paidNoticeList).build()); + } + @Override public ResponseEntity disablePaidNotice(String fiscalCode, String transactionId) { transactionService.disableTransaction(fiscalCode, transactionId); diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/PaidNotice.java b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/PaidNotice.java new file mode 100644 index 00000000..82dc7cc9 --- /dev/null +++ b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/PaidNotice.java @@ -0,0 +1,30 @@ +package it.gov.pagopa.bizeventsservice.model.response.paidnotice; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * Response model for transaction list API + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@Builder +@JsonInclude(Include.NON_NULL) +public class PaidNotice implements Serializable { + private String eventId; + private String payeeName; + private String payeeTaxCode; + private String amount; + private String noticeDate; + private Boolean isCart; + private Boolean isPayer; + @Builder.Default + private Boolean isDebtor = false; +} diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/PaidNoticesList.java b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/PaidNoticesList.java new file mode 100644 index 00000000..7120b541 --- /dev/null +++ b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/PaidNoticesList.java @@ -0,0 +1,14 @@ +package it.gov.pagopa.bizeventsservice.model.response.paidnotice; + +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Builder; +import lombok.Data; + +import java.util.List; + +@Builder +@Data +@JsonInclude(JsonInclude.Include.NON_NULL) +public class PaidNoticesList { + private List paidNoticeList; +} diff --git a/src/test/java/it/gov/pagopa/bizeventsservice/controller/PaidNoticeControllerTest.java b/src/test/java/it/gov/pagopa/bizeventsservice/controller/PaidNoticeControllerTest.java index b1e22751..ad1d96a8 100644 --- a/src/test/java/it/gov/pagopa/bizeventsservice/controller/PaidNoticeControllerTest.java +++ b/src/test/java/it/gov/pagopa/bizeventsservice/controller/PaidNoticeControllerTest.java @@ -1,8 +1,13 @@ package it.gov.pagopa.bizeventsservice.controller; +import com.fasterxml.jackson.core.type.TypeReference; +import it.gov.pagopa.bizeventsservice.client.IReceiptGeneratePDFClient; +import it.gov.pagopa.bizeventsservice.client.IReceiptGetPDFClient; import it.gov.pagopa.bizeventsservice.exception.AppError; import it.gov.pagopa.bizeventsservice.exception.AppException; +import it.gov.pagopa.bizeventsservice.model.response.Attachment; +import it.gov.pagopa.bizeventsservice.model.response.AttachmentsDetailsResponse; import it.gov.pagopa.bizeventsservice.model.response.transaction.TransactionDetailResponse; import it.gov.pagopa.bizeventsservice.model.response.transaction.TransactionListItem; import it.gov.pagopa.bizeventsservice.model.response.transaction.TransactionListResponse; @@ -16,13 +21,19 @@ import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.http.MediaType; import org.springframework.test.web.servlet.MockMvc; +import org.springframework.test.web.servlet.MvcResult; import java.io.IOException; +import java.util.Arrays; import java.util.List; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.*; import static org.mockito.Mockito.*; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; @SpringBootTest @@ -33,10 +44,22 @@ public class PaidNoticeControllerTest { public static final String VALID_FISCAL_CODE = "AAAAAA00A00A000A"; public static final String FISCAL_CODE_HEADER_KEY = "x-fiscal-code"; public static final String PAIDS_EVENT_ID_DISABLE_PATH = "/paids/1234321234/disable"; + public static final String PAIDS_PATH = "/paids"; + public static final String SIZE = "10"; + public static final String SIZE_HEADER_KEY = "size"; + private static final String CONTINUATION_TOKEN_HEADER_KEY = "x-continuation-token"; + public static final String CONTINUATION_TOKEN = "continuationToken"; + @Autowired private MockMvc mvc; + @MockBean + private IReceiptGetPDFClient receiptClient; + + @MockBean + private IReceiptGeneratePDFClient generateReceiptClient; + @MockBean private ITransactionService transactionService; @@ -46,13 +69,53 @@ public class PaidNoticeControllerTest { @BeforeEach void setUp() throws IOException { // precondition - List transactionListItems = Utility.readModelFromFile("biz-events/getTransactionList.json", List.class); + List transactionListItems = Utility.readModelFromFile("biz-events/getTransactionList.json", new TypeReference>(){}); TransactionListResponse transactionListResponse = TransactionListResponse.builder().transactionList(transactionListItems).build(); TransactionDetailResponse transactionDetailResponse = Utility.readModelFromFile("biz-events/transactionDetails.json", TransactionDetailResponse.class); when(transactionService.getTransactionList(eq(VALID_FISCAL_CODE), any(), any(), anyString(), anyInt(), any(), any())).thenReturn(transactionListResponse); when(transactionService.getCachedTransactionList(eq(VALID_FISCAL_CODE), any(), any(), anyInt(), anyInt(), any(), any())).thenReturn(transactionListResponse); when(transactionService.getTransactionDetails(anyString(), anyString())).thenReturn(transactionDetailResponse); when(transactionService.getPDFReceipt(anyString(), anyString())).thenReturn(receipt); + Attachment attachmentDetail = mock (Attachment.class); + AttachmentsDetailsResponse attachments = AttachmentsDetailsResponse.builder().attachments(Arrays.asList(attachmentDetail)).build(); + when(receiptClient.getAttachments(anyString(), anyString())).thenReturn(attachments); + when(receiptClient.getReceipt(anyString(), anyString(), any())).thenReturn(receipt); + when(generateReceiptClient.generateReceipt(anyString(), anyString(), any())).thenReturn("OK"); + } + + @Test + void getPaidNoticesListShouldReturnData() throws Exception { + MvcResult result = mvc.perform(get(PAIDS_PATH) + .header(FISCAL_CODE_HEADER_KEY, VALID_FISCAL_CODE) + .header(CONTINUATION_TOKEN_HEADER_KEY, CONTINUATION_TOKEN) + .queryParam(SIZE_HEADER_KEY, SIZE) + .contentType(MediaType.APPLICATION_JSON)) + .andExpect(status().isOk()) + .andExpect(content().contentType(MediaType.APPLICATION_JSON)) + .andReturn(); + assertNotNull(result.getResponse().getContentAsString()); + assertTrue(result.getResponse().getContentAsString().contains("b77d4987-a3e4-48d4-a2fd-af504f8b79e9")); + assertTrue(result.getResponse().getContentAsString().contains("100.0")); + } + + @Test + void getPaidNoticesListWithMissingFiscalCodeShouldReturnError() throws Exception { + mvc.perform(get(PAIDS_PATH) + .contentType(MediaType.APPLICATION_JSON)) + .andExpect(status().isBadRequest()) + .andReturn(); + } + + @Test + void getPaidNoticesListWithInvalidFiscalCodeShouldReturnError() throws Exception { + when(transactionService.getTransactionList(eq(INVALID_FISCAL_CODE), any(), any(), any(), anyInt(), any(), any())).thenAnswer(x -> { + throw new AppException(AppError.INVALID_FISCAL_CODE, INVALID_FISCAL_CODE); + }); + mvc.perform(get(PAIDS_PATH) + .header(FISCAL_CODE_HEADER_KEY, INVALID_FISCAL_CODE) + .contentType(MediaType.APPLICATION_JSON)) + .andExpect(status().isBadRequest()) + .andReturn(); } @Test diff --git a/src/test/java/it/gov/pagopa/bizeventsservice/util/Utility.java b/src/test/java/it/gov/pagopa/bizeventsservice/util/Utility.java index 8e51c4c7..bac33b48 100644 --- a/src/test/java/it/gov/pagopa/bizeventsservice/util/Utility.java +++ b/src/test/java/it/gov/pagopa/bizeventsservice/util/Utility.java @@ -1,36 +1,45 @@ package it.gov.pagopa.bizeventsservice.util; -import java.io.File; -import java.io.IOException; -import java.nio.file.Files; -import java.util.Objects; - import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; - import lombok.experimental.UtilityClass; +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.util.Objects; + @UtilityClass public class Utility { - public static T readModelFromFile(String relativePath, Class clazz) throws IOException { - ClassLoader classLoader = Utility.class.getClassLoader(); - File file = new File(Objects.requireNonNull(classLoader.getResource(relativePath)).getPath()); - var content = Files.readString(file.toPath()); - ObjectMapper objectMapper = new ObjectMapper(); - objectMapper.registerModule(new JavaTimeModule()); - return objectMapper.readValue(content, clazz); - } + public static T readModelFromFile(String relativePath, Class clazz) throws IOException { + ClassLoader classLoader = Utility.class.getClassLoader(); + File file = new File(Objects.requireNonNull(classLoader.getResource(relativePath)).getPath()); + var content = Files.readString(file.toPath()); + ObjectMapper objectMapper = new ObjectMapper(); + objectMapper.registerModule(new JavaTimeModule()); + return objectMapper.readValue(content, clazz); + } + + public static T readModelFromFile(String relativePath, TypeReference typeReference) throws IOException { + ClassLoader classLoader = Utility.class.getClassLoader(); + File file = new File(Objects.requireNonNull(classLoader.getResource(relativePath)).getPath()); + var content = Files.readString(file.toPath()); + ObjectMapper objectMapper = new ObjectMapper(); + objectMapper.registerModule(new JavaTimeModule()); + return objectMapper.readValue(content, typeReference); + } - /** - * @param object to map into the Json string - * @return object as Json string - * @throws JsonProcessingException if there is an error during the parsing of - * the object - */ - public String toJson(Object object) throws JsonProcessingException { - return new ObjectMapper().writeValueAsString(object); - } + /** + * @param object to map into the Json string + * @return object as Json string + * @throws JsonProcessingException if there is an error during the parsing of + * the object + */ + public String toJson(Object object) throws JsonProcessingException { + return new ObjectMapper().writeValueAsString(object); + } } From c1f7c07fa49021c40e74753c570292240ca8b9b7 Mon Sep 17 00:00:00 2001 From: Jacopo Carlini Date: Thu, 5 Sep 2024 10:21:33 +0200 Subject: [PATCH 2/6] fix --- openapi/openapi.json | 3747 +++++++++-------- openapi/openapi_ec.json | 1073 +++-- openapi/openapi_helpdesk.json | 1442 +++---- openapi/openapi_io.json | 1636 ++++--- .../controller/IPaidNoticeController.java | 15 +- .../controller/ITransactionController.java | 2 +- .../controller/impl/PaidNoticeController.java | 20 +- .../{PaidNotice.java => NoticeListItem.java} | 31 +- ...sList.java => NoticeListWrapResponse.java} | 9 +- ...java => NoticeListItemControllerTest.java} | 2 +- 10 files changed, 3922 insertions(+), 4055 deletions(-) rename src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/{PaidNotice.java => NoticeListItem.java} (56%) rename src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/{PaidNoticesList.java => NoticeListWrapResponse.java} (53%) rename src/test/java/it/gov/pagopa/bizeventsservice/controller/{PaidNoticeControllerTest.java => NoticeListItemControllerTest.java} (99%) diff --git a/openapi/openapi.json b/openapi/openapi.json index 69644829..3bb7a145 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -1,2550 +1,2581 @@ { - "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.51" + "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.51" }, - "servers": [ - { - "url": "http://localhost", - "description": "Generated server url" - } - ], - "paths": { - "/events/organizations/{organization-fiscal-code}/iuvs/{iuv}": { - "get": { - "tags": [ - "Biz-Events Helpdesk" - ], - "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" + "servers" : [ { + "url" : "http://localhost", + "description" : "Generated server url" + } ], + "paths" : { + "/events/organizations/{organization-fiscal-code}/iuvs/{iuv}" : { + "get" : { + "tags" : [ "Biz-Events Helpdesk" ], + "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" + "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" + "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" + "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" + "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" + "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" + "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" + "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" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "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.", - "required": false, - "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.", + "required" : false, + "schema" : { + "type" : "string" } - ] + } ] }, - "/events/{biz-event-id}": { - "get": { - "tags": [ - "Biz-Events Helpdesk" - ], - "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/{biz-event-id}" : { + "get" : { + "tags" : [ "Biz-Events Helpdesk" ], + "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" + "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" + "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" + "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" + "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" + "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" + "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" + "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" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "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.", - "required": false, - "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.", + "required" : false, + "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" + "/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" + "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" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "401": { - "description": "Unauthorized", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "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" + "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" + "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" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "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.", - "required": false, - "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.", + "required" : false, + "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" + "/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" + "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" + "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" + "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" + "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" + "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" + "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" + "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" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "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.", - "required": false, - "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.", + "required" : false, + "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" + "/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" + "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" + "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" + "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" + "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" + "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" + "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" + "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" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "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.", - "required": false, - "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.", + "required" : false, + "schema" : { + "type" : "string" } - ] + } ] }, - "/paids/{event-id}/disable": { - "post": { - "tags": [ - "Paid Notice REST APIs" - ], - "summary": "Disable the paid notice details given its id.", - "operationId": "disablePaidNotice", - "parameters": [ - { - "name": "x-fiscal-code", - "in": "header", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "event-id", - "in": "path", - "description": "The id of the paid event.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Event Disabled.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "/paids" : { + "get" : { + "tags" : [ "Paid Notice REST APIs" ], + "summary" : "Retrieve the paged transaction list from biz events.", + "description" : "This operation is deprecated. Use Paid Notice APIs instead", + "operationId" : "getPaidNotices", + "parameters" : [ { + "name" : "x-fiscal-code", + "in" : "header", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "x-continuation-token", + "in" : "header", + "required" : false, + "schema" : { + "type" : "string" + } + }, { + "name" : "size", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 10 + } + }, { + "name" : "is_payer", + "in" : "query", + "description" : "Filter by payer", + "required" : false, + "schema" : { + "type" : "boolean" + } + }, { + "name" : "is_debtor", + "in" : "query", + "description" : "Filter by debtor", + "required" : false, + "schema" : { + "type" : "boolean" + } + }, { + "name" : "orderby", + "in" : "query", + "description" : "Order by TRANSACTION_DATE", + "required" : false, + "schema" : { + "type" : "string", + "default" : "TRANSACTION_DATE", + "enum" : [ "TRANSACTION_DATE" ] + } + }, { + "name" : "ordering", + "in" : "query", + "description" : "Direction of ordering", + "required" : false, + "schema" : { + "type" : "string", + "default" : "DESC", + "enum" : [ "ASC", "DESC" ] + } + } ], + "responses" : { + "200" : { + "description" : "Obtained paid notices list.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" + } + }, + "x-continuation-token" : { + "description" : "continuation token for paginated query", + "style" : "simple", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": {} + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/NoticeListWrapResponse" + } + } } }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "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 paid event.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "404" : { + "description" : "Not found the fiscal code.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "429": { - "description": "Too many requests.", - "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" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "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.", - "required": false, - "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.", + "required" : false, + "schema" : { + "type" : "string" + } + } ] + }, + "/paids/{event-id}/disable" : { + "post" : { + "tags" : [ "Paid Notice REST APIs" ], + "summary" : "Disable the paid notice details given its id.", + "operationId" : "disablePaidNotice", + "parameters" : [ { + "name" : "x-fiscal-code", + "in" : "header", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "event-id", + "in" : "path", + "description" : "The id of the paid event.", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "200" : { + "description" : "Event Disabled.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { } + } + }, + "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 paid event.", + "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.", + "required" : false, + "schema" : { + "type" : "string" } - ] + } ] }, - "/transactions": { - "get": { - "tags": [ - "IO Transactions REST APIs" - ], - "summary": "Retrieve the paged transaction list from biz events.", - "operationId": "getTransactionList", - "parameters": [ - { - "name": "x-fiscal-code", - "in": "header", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "is_payer", - "in": "query", - "description": "Filter by payer", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_debtor", - "in": "query", - "description": "Filter by debtor", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "x-continuation-token", - "in": "header", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 10 - } - }, - { - "name": "orderby", - "in": "query", - "description": "Order by TRANSACTION_DATE", - "required": false, - "schema": { - "type": "string", - "default": "TRANSACTION_DATE", - "enum": [ - "TRANSACTION_DATE" - ] - } - }, - { - "name": "ordering", - "in": "query", - "description": "Direction of ordering", - "required": false, - "schema": { - "type": "string", - "default": "DESC", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], - "responses": { - "200": { - "description": "Obtained transaction list.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "/transactions" : { + "get" : { + "tags" : [ "IO Transactions REST APIs" ], + "summary" : "Retrieve the paged transaction list from biz events.", + "description" : "This operation is deprecated. Use Paid Notice APIs instead", + "operationId" : "getTransactionList", + "parameters" : [ { + "name" : "x-fiscal-code", + "in" : "header", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "is_payer", + "in" : "query", + "description" : "Filter by payer", + "required" : false, + "schema" : { + "type" : "boolean" + } + }, { + "name" : "is_debtor", + "in" : "query", + "description" : "Filter by debtor", + "required" : false, + "schema" : { + "type" : "boolean" + } + }, { + "name" : "x-continuation-token", + "in" : "header", + "required" : false, + "schema" : { + "type" : "string" + } + }, { + "name" : "size", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 10 + } + }, { + "name" : "orderby", + "in" : "query", + "description" : "Order by TRANSACTION_DATE", + "required" : false, + "schema" : { + "type" : "string", + "default" : "TRANSACTION_DATE", + "enum" : [ "TRANSACTION_DATE" ] + } + }, { + "name" : "ordering", + "in" : "query", + "description" : "Direction of ordering", + "required" : false, + "schema" : { + "type" : "string", + "default" : "DESC", + "enum" : [ "ASC", "DESC" ] + } + } ], + "responses" : { + "200" : { + "description" : "Obtained transaction list.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } }, - "x-continuation-token": { - "description": "continuation token for paginated query", - "style": "simple", - "schema": { - "type": "string" + "x-continuation-token" : { + "description" : "continuation token for paginated query", + "style" : "simple", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TransactionListWrapResponse" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/TransactionListWrapResponse" } } } }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "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 transaction.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "404" : { + "description" : "Not found the transaction.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "429": { - "description": "Too many requests.", - "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" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "deprecated" : true, + "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.", - "required": false, - "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.", + "required" : false, + "schema" : { + "type" : "string" } - ] + } ] }, - "/transactions/cached": { - "get": { - "tags": [ - "IO Transactions REST APIs" - ], - "summary": "Retrieve the paged transaction list from biz events.", - "operationId": "getTransactionList_1", - "parameters": [ - { - "name": "x-fiscal-code", - "in": "header", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "is_payer", - "in": "query", - "description": "Filter by payer", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_debtor", - "in": "query", - "description": "Filter by debtor", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 0 - } - }, - { - "name": "size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 10 - } - }, - { - "name": "orderby", - "in": "query", - "description": "Order by TRANSACTION_DATE", - "required": false, - "schema": { - "type": "string", - "default": "TRANSACTION_DATE", - "enum": [ - "TRANSACTION_DATE" - ] - } - }, - { - "name": "ordering", - "in": "query", - "description": "Direction of ordering", - "required": false, - "schema": { - "type": "string", - "default": "DESC", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], - "responses": { - "200": { - "description": "Obtained transaction list.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "/transactions/cached" : { + "get" : { + "tags" : [ "IO Transactions REST APIs" ], + "summary" : "Retrieve the paged transaction list from biz events.", + "operationId" : "getTransactionList_1", + "parameters" : [ { + "name" : "x-fiscal-code", + "in" : "header", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "is_payer", + "in" : "query", + "description" : "Filter by payer", + "required" : false, + "schema" : { + "type" : "boolean" + } + }, { + "name" : "is_debtor", + "in" : "query", + "description" : "Filter by debtor", + "required" : false, + "schema" : { + "type" : "boolean" + } + }, { + "name" : "page", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 0 + } + }, { + "name" : "size", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 10 + } + }, { + "name" : "orderby", + "in" : "query", + "description" : "Order by TRANSACTION_DATE", + "required" : false, + "schema" : { + "type" : "string", + "default" : "TRANSACTION_DATE", + "enum" : [ "TRANSACTION_DATE" ] + } + }, { + "name" : "ordering", + "in" : "query", + "description" : "Direction of ordering", + "required" : false, + "schema" : { + "type" : "string", + "default" : "DESC", + "enum" : [ "ASC", "DESC" ] + } + } ], + "responses" : { + "200" : { + "description" : "Obtained transaction list.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TransactionListWrapResponse" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/TransactionListWrapResponse" } } } }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "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 transaction.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "404" : { + "description" : "Not found the transaction.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "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" + "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" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "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.", - "required": false, - "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.", + "required" : false, + "schema" : { + "type" : "string" } - ] + } ] }, - "/transactions/{event-id}/pdf": { - "get": { - "tags": [ - "IO Transactions REST APIs" - ], - "summary": "Retrieve the PDF receipt given event id.", - "operationId": "getPDFReceipt", - "parameters": [ - { - "name": "x-fiscal-code", - "in": "header", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "event-id", - "in": "path", - "description": "The id of the event.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Obtained the PDF receipt.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "/transactions/{event-id}/pdf" : { + "get" : { + "tags" : [ "IO Transactions REST APIs" ], + "summary" : "Retrieve the PDF receipt given event id.", + "operationId" : "getPDFReceipt", + "parameters" : [ { + "name" : "x-fiscal-code", + "in" : "header", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "event-id", + "in" : "path", + "description" : "The id of the event.", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "200" : { + "description" : "Obtained the PDF receipt.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/pdf": { - "schema": { - "type": "string", - "format": "binary" + "content" : { + "application/pdf" : { + "schema" : { + "type" : "string", + "format" : "binary" } } } }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "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" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "422": { - "description": "Unprocessable receipt.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "422" : { + "description" : "Unprocessable receipt.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "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" + "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" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "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.", - "required": false, - "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.", + "required" : false, + "schema" : { + "type" : "string" } - ] + } ] }, - "/transactions/{transaction-id}": { - "get": { - "tags": [ - "IO Transactions REST APIs" - ], - "summary": "Retrieve the transaction details given its id.", - "operationId": "getTransactionDetails", - "parameters": [ - { - "name": "x-fiscal-code", - "in": "header", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "transaction-id", - "in": "path", - "description": "The id of the transaction.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Obtained transaction details.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "/transactions/{transaction-id}" : { + "get" : { + "tags" : [ "IO Transactions REST APIs" ], + "summary" : "Retrieve the transaction details given its id.", + "operationId" : "getTransactionDetails", + "parameters" : [ { + "name" : "x-fiscal-code", + "in" : "header", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "transaction-id", + "in" : "path", + "description" : "The id of the transaction.", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "200" : { + "description" : "Obtained transaction details.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TransactionDetailResponse" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/TransactionDetailResponse" } } } }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "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 transaction.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "404" : { + "description" : "Not found the transaction.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "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" + "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" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "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.", - "required": false, - "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.", + "required" : false, + "schema" : { + "type" : "string" } - ] + } ] }, - "/transactions/{transaction-id}/disable": { - "post": { - "tags": [ - "IO Transactions REST APIs" - ], - "summary": "Disable the transaction details given its id.", - "description": "This operation is deprecated. Use Paid Notice APIs instead", - "operationId": "disableTransaction", - "parameters": [ - { - "name": "x-fiscal-code", - "in": "header", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "transaction-id", - "in": "path", - "description": "The id of the transaction.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Disabled Transactions.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "/transactions/{transaction-id}/disable" : { + "post" : { + "tags" : [ "IO Transactions REST APIs" ], + "summary" : "Disable the transaction details given its id.", + "description" : "This operation is deprecated. Use Paid Notice APIs instead", + "operationId" : "disableTransaction", + "parameters" : [ { + "name" : "x-fiscal-code", + "in" : "header", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "transaction-id", + "in" : "path", + "description" : "The id of the transaction.", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "200" : { + "description" : "Disabled Transactions.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": {} + "content" : { + "application/json" : { } } }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "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 transaction.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "404" : { + "description" : "Not found the transaction.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "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" + "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" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "deprecated": true, - "security": [ - { - "ApiKey": [] - } - ] + "deprecated" : true, + "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.", - "required": false, - "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.", + "required" : false, + "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" + "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" } } }, - "PageInfo": { - "required": [ - "items_found", - "limit", - "page", - "total_pages" - ], - "type": "object", - "properties": { - "page": { - "type": "integer", - "description": "Page number", - "format": "int32" - }, - "limit": { - "type": "integer", - "description": "Required number of items per page", - "format": "int32" - }, - "items_found": { - "type": "integer", - "description": "Number of items found. (The last page may have fewer elements than required)", - "format": "int32" - }, - "total_pages": { - "type": "integer", - "description": "Total number of pages", - "format": "int32" + "PageInfo" : { + "required" : [ "items_found", "limit", "page", "total_pages" ], + "type" : "object", + "properties" : { + "page" : { + "type" : "integer", + "description" : "Page number", + "format" : "int32" + }, + "limit" : { + "type" : "integer", + "description" : "Required number of items per page", + "format" : "int32" + }, + "items_found" : { + "type" : "integer", + "description" : "Number of items found. (The last page may have fewer elements than required)", + "format" : "int32" + }, + "total_pages" : { + "type" : "integer", + "description" : "Total number of pages", + "format" : "int32" } } }, - "TransactionListItem": { - "type": "object", - "properties": { - "transactionId": { - "type": "string" + "TransactionListItem" : { + "type" : "object", + "properties" : { + "transactionId" : { + "type" : "string" }, - "payeeName": { - "type": "string" + "payeeName" : { + "type" : "string" }, - "payeeTaxCode": { - "type": "string" + "payeeTaxCode" : { + "type" : "string" }, - "amount": { - "type": "string" + "amount" : { + "type" : "string" }, - "transactionDate": { - "type": "string" + "transactionDate" : { + "type" : "string" }, - "isCart": { - "type": "boolean" + "isCart" : { + "type" : "boolean" }, - "isPayer": { - "type": "boolean" + "isPayer" : { + "type" : "boolean" }, - "isDebtor": { - "type": "boolean" + "isDebtor" : { + "type" : "boolean" } } }, - "TransactionListWrapResponse": { - "type": "object", - "properties": { - "transactions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransactionListItem" + "TransactionListWrapResponse" : { + "type" : "object", + "properties" : { + "transactions" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TransactionListItem" } }, - "page_info": { - "$ref": "#/components/schemas/PageInfo" + "page_info" : { + "$ref" : "#/components/schemas/PageInfo" } } }, - "CartItem": { - "type": "object", - "properties": { - "subject": { - "type": "string" + "CartItem" : { + "type" : "object", + "properties" : { + "subject" : { + "type" : "string" }, - "amount": { - "type": "string" + "amount" : { + "type" : "string" }, - "payee": { - "$ref": "#/components/schemas/UserDetail" + "payee" : { + "$ref" : "#/components/schemas/UserDetail" }, - "debtor": { - "$ref": "#/components/schemas/UserDetail" + "debtor" : { + "$ref" : "#/components/schemas/UserDetail" }, - "refNumberValue": { - "type": "string" + "refNumberValue" : { + "type" : "string" }, - "refNumberType": { - "type": "string" + "refNumberType" : { + "type" : "string" } } }, - "InfoTransactionView": { - "type": "object", - "properties": { - "transactionId": { - "type": "string" - }, - "authCode": { - "type": "string" - }, - "rrn": { - "type": "string" - }, - "transactionDate": { - "type": "string" - }, - "pspName": { - "type": "string" - }, - "walletInfo": { - "$ref": "#/components/schemas/WalletInfo" - }, - "paymentMethod": { - "type": "string", - "enum": [ - "BBT", - "BP", - "AD", - "CP", - "PO", - "OBEP", - "JIF", - "MYBK", - "PPAL", - "UNKNOWN" - ] - }, - "payer": { - "$ref": "#/components/schemas/UserDetail" - }, - "amount": { - "type": "string" - }, - "fee": { - "type": "string" - }, - "origin": { - "type": "string", - "enum": [ - "INTERNAL", - "PM", - "NDP001PROD", - "NDP002PROD", - "NDP003PROD", - "UNKNOWN" - ] + "InfoTransactionView" : { + "type" : "object", + "properties" : { + "transactionId" : { + "type" : "string" + }, + "authCode" : { + "type" : "string" + }, + "rrn" : { + "type" : "string" + }, + "transactionDate" : { + "type" : "string" + }, + "pspName" : { + "type" : "string" + }, + "walletInfo" : { + "$ref" : "#/components/schemas/WalletInfo" + }, + "paymentMethod" : { + "type" : "string", + "enum" : [ "BBT", "BP", "AD", "CP", "PO", "OBEP", "JIF", "MYBK", "PPAL", "UNKNOWN" ] + }, + "payer" : { + "$ref" : "#/components/schemas/UserDetail" + }, + "amount" : { + "type" : "string" + }, + "fee" : { + "type" : "string" + }, + "origin" : { + "type" : "string", + "enum" : [ "INTERNAL", "PM", "NDP001PROD", "NDP002PROD", "NDP003PROD", "UNKNOWN" ] } } }, - "TransactionDetailResponse": { - "type": "object", - "properties": { - "infoTransaction": { - "$ref": "#/components/schemas/InfoTransactionView" + "TransactionDetailResponse" : { + "type" : "object", + "properties" : { + "infoTransaction" : { + "$ref" : "#/components/schemas/InfoTransactionView" }, - "carts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CartItem" + "carts" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/CartItem" } } } }, - "UserDetail": { - "type": "object", - "properties": { - "name": { - "type": "string" + "UserDetail" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" }, - "taxCode": { - "type": "string" + "taxCode" : { + "type" : "string" } } }, - "WalletInfo": { - "type": "object", - "properties": { - "accountHolder": { - "type": "string" + "WalletInfo" : { + "type" : "object", + "properties" : { + "accountHolder" : { + "type" : "string" }, - "brand": { - "type": "string" + "brand" : { + "type" : "string" }, - "blurredNumber": { - "type": "string" + "blurredNumber" : { + "type" : "string" }, - "maskedEmail": { - "type": "string" + "maskedEmail" : { + "type" : "string" } } }, - "CtReceiptModelResponse": { - "required": [ - "channelDescription", - "companyName", - "creditorReferenceId", - "debtor", - "description", - "fiscalCode", - "idChannel", - "idPSP", - "noticeNumber", - "outcome", - "paymentAmount", - "pspCompanyName", - "receiptId", - "transferList" - ], - "type": "object", - "properties": { - "receiptId": { - "type": "string" + "NoticeListItem" : { + "required" : [ "amount", "eventId", "isCart", "isDebtor", "isPayer", "noticeDate", "payeeTaxCode" ], + "type" : "object", + "properties" : { + "eventId" : { + "type" : "string" }, - "noticeNumber": { - "type": "string" + "payeeName" : { + "type" : "string" }, - "fiscalCode": { - "type": "string" + "payeeTaxCode" : { + "type" : "string" }, - "outcome": { - "type": "string" + "amount" : { + "type" : "string" }, - "creditorReferenceId": { - "type": "string" + "noticeDate" : { + "type" : "string" }, - "paymentAmount": { - "type": "number" + "isCart" : { + "type" : "boolean" }, - "description": { - "type": "string" + "isPayer" : { + "type" : "boolean" }, - "companyName": { - "type": "string" + "isDebtor" : { + "type" : "boolean" + } + } + }, + "NoticeListWrapResponse" : { + "required" : [ "notices" ], + "type" : "object", + "properties" : { + "notices" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/NoticeListItem" + } + } + } + }, + "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" }, - "officeName": { - "type": "string" + "paymentAmount" : { + "type" : "number" }, - "debtor": { - "$ref": "#/components/schemas/Debtor" + "description" : { + "type" : "string" }, - "transferList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransferPA" + "companyName" : { + "type" : "string" + }, + "officeName" : { + "type" : "string" + }, + "debtor" : { + "$ref" : "#/components/schemas/Debtor" + }, + "transferList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TransferPA" } }, - "idPSP": { - "type": "string" + "idPSP" : { + "type" : "string" }, - "pspFiscalCode": { - "type": "string" + "pspFiscalCode" : { + "type" : "string" }, - "pspPartitaIVA": { - "type": "string" + "pspPartitaIVA" : { + "type" : "string" }, - "pspCompanyName": { - "type": "string" + "pspCompanyName" : { + "type" : "string" }, - "idChannel": { - "type": "string" + "idChannel" : { + "type" : "string" }, - "channelDescription": { - "type": "string" + "channelDescription" : { + "type" : "string" }, - "payer": { - "$ref": "#/components/schemas/Payer" + "payer" : { + "$ref" : "#/components/schemas/Payer" }, - "paymentMethod": { - "type": "string" + "paymentMethod" : { + "type" : "string" }, - "fee": { - "type": "number" + "fee" : { + "type" : "number" }, - "primaryCiIncurredFee": { - "type": "number" + "primaryCiIncurredFee" : { + "type" : "number" }, - "idBundle": { - "type": "string" + "idBundle" : { + "type" : "string" }, - "idCiBundle": { - "type": "string" + "idCiBundle" : { + "type" : "string" }, - "paymentDateTime": { - "type": "string", - "format": "date" + "paymentDateTime" : { + "type" : "string", + "format" : "date" }, - "applicationDate": { - "type": "string", - "format": "date" + "applicationDate" : { + "type" : "string", + "format" : "date" }, - "transferDate": { - "type": "string", - "format": "date" + "transferDate" : { + "type" : "string", + "format" : "date" }, - "metadata": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MapEntry" + "metadata" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/MapEntry" } } } }, - "Debtor": { - "type": "object", - "properties": { - "fullName": { - "type": "string" + "Debtor" : { + "type" : "object", + "properties" : { + "fullName" : { + "type" : "string" }, - "entityUniqueIdentifierType": { - "type": "string" + "entityUniqueIdentifierType" : { + "type" : "string" }, - "entityUniqueIdentifierValue": { - "type": "string" + "entityUniqueIdentifierValue" : { + "type" : "string" }, - "streetName": { - "type": "string" + "streetName" : { + "type" : "string" }, - "civicNumber": { - "type": "string" + "civicNumber" : { + "type" : "string" }, - "postalCode": { - "type": "string" + "postalCode" : { + "type" : "string" }, - "city": { - "type": "string" + "city" : { + "type" : "string" }, - "stateProvinceRegion": { - "type": "string" + "stateProvinceRegion" : { + "type" : "string" }, - "country": { - "type": "string" + "country" : { + "type" : "string" }, - "eMail": { - "type": "string" + "eMail" : { + "type" : "string" } } }, - "MapEntry": { - "type": "object", - "properties": { - "key": { - "type": "string" + "MapEntry" : { + "type" : "object", + "properties" : { + "key" : { + "type" : "string" }, - "value": { - "type": "string" + "value" : { + "type" : "string" } } }, - "Payer": { - "type": "object", - "properties": { - "fullName": { - "type": "string" + "Payer" : { + "type" : "object", + "properties" : { + "fullName" : { + "type" : "string" }, - "entityUniqueIdentifierType": { - "type": "string" + "entityUniqueIdentifierType" : { + "type" : "string" }, - "entityUniqueIdentifierValue": { - "type": "string" + "entityUniqueIdentifierValue" : { + "type" : "string" }, - "streetName": { - "type": "string" + "streetName" : { + "type" : "string" }, - "civicNumber": { - "type": "string" + "civicNumber" : { + "type" : "string" }, - "postalCode": { - "type": "string" + "postalCode" : { + "type" : "string" }, - "city": { - "type": "string" + "city" : { + "type" : "string" }, - "stateProvinceRegion": { - "type": "string" + "stateProvinceRegion" : { + "type" : "string" }, - "country": { - "type": "string" + "country" : { + "type" : "string" }, - "eMail": { - "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" + "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" + "AppInfo" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" }, - "version": { - "type": "string" + "version" : { + "type" : "string" }, - "environment": { - "type": "string" + "environment" : { + "type" : "string" } } }, - "AuthRequest": { - "type": "object", - "properties": { - "authOutcome": { - "type": "string" + "AuthRequest" : { + "type" : "object", + "properties" : { + "authOutcome" : { + "type" : "string" }, - "guid": { - "type": "string" + "guid" : { + "type" : "string" }, - "correlationId": { - "type": "string" + "correlationId" : { + "type" : "string" }, - "error": { - "type": "string" + "error" : { + "type" : "string" }, - "auth_code": { - "type": "string" + "auth_code" : { + "type" : "string" } } }, - "BizEvent": { - "type": "object", - "properties": { - "id": { - "type": "string" + "BizEvent" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "string" }, - "version": { - "type": "string" + "version" : { + "type" : "string" }, - "idPaymentManager": { - "type": "string" + "idPaymentManager" : { + "type" : "string" }, - "complete": { - "type": "string" + "complete" : { + "type" : "string" }, - "receiptId": { - "type": "string" + "receiptId" : { + "type" : "string" }, - "missingInfo": { - "type": "array", - "items": { - "type": "string" + "missingInfo" : { + "type" : "array", + "items" : { + "type" : "string" } }, - "debtorPosition": { - "$ref": "#/components/schemas/DebtorPosition" + "debtorPosition" : { + "$ref" : "#/components/schemas/DebtorPosition" }, - "creditor": { - "$ref": "#/components/schemas/Creditor" + "creditor" : { + "$ref" : "#/components/schemas/Creditor" }, - "psp": { - "$ref": "#/components/schemas/Psp" + "psp" : { + "$ref" : "#/components/schemas/Psp" }, - "debtor": { - "$ref": "#/components/schemas/Debtor" + "debtor" : { + "$ref" : "#/components/schemas/Debtor" }, - "payer": { - "$ref": "#/components/schemas/Payer" + "payer" : { + "$ref" : "#/components/schemas/Payer" }, - "paymentInfo": { - "$ref": "#/components/schemas/PaymentInfo" + "paymentInfo" : { + "$ref" : "#/components/schemas/PaymentInfo" }, - "transferList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Transfer" + "transferList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Transfer" } }, - "transactionDetails": { - "$ref": "#/components/schemas/TransactionDetails" + "transactionDetails" : { + "$ref" : "#/components/schemas/TransactionDetails" }, - "eventStatus": { - "type": "string", - "enum": [ - "NA", - "RETRY", - "FAILED", - "DONE", - "INGESTED" - ] + "eventStatus" : { + "type" : "string", + "enum" : [ "NA", "RETRY", "FAILED", "DONE", "INGESTED" ] }, - "eventRetryEnrichmentCount": { - "type": "integer", - "format": "int32" + "eventRetryEnrichmentCount" : { + "type" : "integer", + "format" : "int32" } } }, - "Creditor": { - "type": "object", - "properties": { - "idPA": { - "type": "string" + "Creditor" : { + "type" : "object", + "properties" : { + "idPA" : { + "type" : "string" }, - "idBrokerPA": { - "type": "string" + "idBrokerPA" : { + "type" : "string" }, - "idStation": { - "type": "string" + "idStation" : { + "type" : "string" }, - "companyName": { - "type": "string" + "companyName" : { + "type" : "string" }, - "officeName": { - "type": "string" + "officeName" : { + "type" : "string" } } }, - "DebtorPosition": { - "type": "object", - "properties": { - "modelType": { - "type": "string" + "DebtorPosition" : { + "type" : "object", + "properties" : { + "modelType" : { + "type" : "string" }, - "noticeNumber": { - "type": "string" + "noticeNumber" : { + "type" : "string" }, - "iuv": { - "type": "string" + "iuv" : { + "type" : "string" }, - "iur": { - "type": "string" + "iur" : { + "type" : "string" } } }, - "Details": { - "type": "object", - "properties": { - "blurredNumber": { - "type": "string" + "Details" : { + "type" : "object", + "properties" : { + "blurredNumber" : { + "type" : "string" }, - "holder": { - "type": "string" + "holder" : { + "type" : "string" }, - "circuit": { - "type": "string" + "circuit" : { + "type" : "string" } } }, - "Info": { - "type": "object", - "properties": { - "type": { - "type": "string" + "Info" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string" }, - "blurredNumber": { - "type": "string" + "blurredNumber" : { + "type" : "string" }, - "holder": { - "type": "string" + "holder" : { + "type" : "string" }, - "expireMonth": { - "type": "string" + "expireMonth" : { + "type" : "string" }, - "expireYear": { - "type": "string" + "expireYear" : { + "type" : "string" }, - "brand": { - "type": "string" + "brand" : { + "type" : "string" }, - "issuerAbi": { - "type": "string" + "issuerAbi" : { + "type" : "string" }, - "issuerName": { - "type": "string" + "issuerName" : { + "type" : "string" }, - "label": { - "type": "string" + "label" : { + "type" : "string" } } }, - "InfoTransaction": { - "type": "object", - "properties": { - "brand": { - "type": "string" + "InfoTransaction" : { + "type" : "object", + "properties" : { + "brand" : { + "type" : "string" }, - "brandLogo": { - "type": "string" + "brandLogo" : { + "type" : "string" }, - "clientId": { - "type": "string" + "clientId" : { + "type" : "string" }, - "paymentMethodName": { - "type": "string" + "paymentMethodName" : { + "type" : "string" }, - "type": { - "type": "string" + "type" : { + "type" : "string" } } }, - "MBD": { - "type": "object", - "properties": { - "IUBD": { - "type": "string" + "MBD" : { + "type" : "object", + "properties" : { + "IUBD" : { + "type" : "string" }, - "oraAcquisto": { - "type": "string" + "oraAcquisto" : { + "type" : "string" }, - "importo": { - "type": "string" + "importo" : { + "type" : "string" }, - "tipoBollo": { - "type": "string" + "tipoBollo" : { + "type" : "string" }, - "MBDAttachment": { - "type": "string" + "MBDAttachment" : { + "type" : "string" } } }, - "PaymentAuthorizationRequest": { - "type": "object", - "properties": { - "authOutcome": { - "type": "string" + "PaymentAuthorizationRequest" : { + "type" : "object", + "properties" : { + "authOutcome" : { + "type" : "string" }, - "requestId": { - "type": "string" + "requestId" : { + "type" : "string" }, - "correlationId": { - "type": "string" + "correlationId" : { + "type" : "string" }, - "authCode": { - "type": "string" + "authCode" : { + "type" : "string" }, - "paymentMethodType": { - "type": "string" + "paymentMethodType" : { + "type" : "string" }, - "details": { - "$ref": "#/components/schemas/Details" + "details" : { + "$ref" : "#/components/schemas/Details" } } }, - "PaymentInfo": { - "type": "object", - "properties": { - "paymentDateTime": { - "type": "string" + "PaymentInfo" : { + "type" : "object", + "properties" : { + "paymentDateTime" : { + "type" : "string" }, - "applicationDate": { - "type": "string" + "applicationDate" : { + "type" : "string" }, - "transferDate": { - "type": "string" + "transferDate" : { + "type" : "string" }, - "dueDate": { - "type": "string" + "dueDate" : { + "type" : "string" }, - "paymentToken": { - "type": "string" + "paymentToken" : { + "type" : "string" }, - "amount": { - "type": "string" + "amount" : { + "type" : "string" }, - "fee": { - "type": "string" + "fee" : { + "type" : "string" }, - "primaryCiIncurredFee": { - "type": "string" + "primaryCiIncurredFee" : { + "type" : "string" }, - "idBundle": { - "type": "string" + "idBundle" : { + "type" : "string" }, - "idCiBundle": { - "type": "string" + "idCiBundle" : { + "type" : "string" }, - "totalNotice": { - "type": "string" + "totalNotice" : { + "type" : "string" }, - "paymentMethod": { - "type": "string" + "paymentMethod" : { + "type" : "string" }, - "touchpoint": { - "type": "string" + "touchpoint" : { + "type" : "string" }, - "remittanceInformation": { - "type": "string" + "remittanceInformation" : { + "type" : "string" }, - "description": { - "type": "string" + "description" : { + "type" : "string" }, - "metadata": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MapEntry" + "metadata" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/MapEntry" } }, - "IUR": { - "type": "string" + "IUR" : { + "type" : "string" } } }, - "Psp": { - "type": "object", - "properties": { - "idPsp": { - "type": "string" + "Psp" : { + "type" : "object", + "properties" : { + "idPsp" : { + "type" : "string" }, - "idBrokerPsp": { - "type": "string" + "idBrokerPsp" : { + "type" : "string" }, - "idChannel": { - "type": "string" + "idChannel" : { + "type" : "string" }, - "psp": { - "type": "string" + "psp" : { + "type" : "string" }, - "pspPartitaIVA": { - "type": "string" + "pspPartitaIVA" : { + "type" : "string" }, - "pspFiscalCode": { - "type": "string" + "pspFiscalCode" : { + "type" : "string" }, - "channelDescription": { - "type": "string" + "channelDescription" : { + "type" : "string" } } }, - "Transaction": { - "type": "object", - "properties": { - "idTransaction": { - "type": "string" + "Transaction" : { + "type" : "object", + "properties" : { + "idTransaction" : { + "type" : "string" }, - "transactionId": { - "type": "string" + "transactionId" : { + "type" : "string" }, - "grandTotal": { - "type": "integer", - "format": "int64" + "grandTotal" : { + "type" : "integer", + "format" : "int64" }, - "amount": { - "type": "integer", - "format": "int64" + "amount" : { + "type" : "integer", + "format" : "int64" }, - "fee": { - "type": "integer", - "format": "int64" + "fee" : { + "type" : "integer", + "format" : "int64" }, - "transactionStatus": { - "type": "string" + "transactionStatus" : { + "type" : "string" }, - "accountingStatus": { - "type": "string" + "accountingStatus" : { + "type" : "string" }, - "rrn": { - "type": "string" + "rrn" : { + "type" : "string" }, - "authorizationCode": { - "type": "string" + "authorizationCode" : { + "type" : "string" }, - "creationDate": { - "type": "string" + "creationDate" : { + "type" : "string" }, - "numAut": { - "type": "string" + "numAut" : { + "type" : "string" }, - "accountCode": { - "type": "string" + "accountCode" : { + "type" : "string" }, - "psp": { - "$ref": "#/components/schemas/TransactionPsp" + "psp" : { + "$ref" : "#/components/schemas/TransactionPsp" }, - "origin": { - "type": "string" + "origin" : { + "type" : "string" } } }, - "TransactionDetails": { - "type": "object", - "properties": { - "user": { - "$ref": "#/components/schemas/User" + "TransactionDetails" : { + "type" : "object", + "properties" : { + "user" : { + "$ref" : "#/components/schemas/User" }, - "paymentAuthorizationRequest": { - "$ref": "#/components/schemas/PaymentAuthorizationRequest" + "paymentAuthorizationRequest" : { + "$ref" : "#/components/schemas/PaymentAuthorizationRequest" }, - "wallet": { - "$ref": "#/components/schemas/WalletItem" + "wallet" : { + "$ref" : "#/components/schemas/WalletItem" }, - "origin": { - "type": "string" + "origin" : { + "type" : "string" }, - "transaction": { - "$ref": "#/components/schemas/Transaction" + "transaction" : { + "$ref" : "#/components/schemas/Transaction" }, - "info": { - "$ref": "#/components/schemas/InfoTransaction" + "info" : { + "$ref" : "#/components/schemas/InfoTransaction" } } }, - "TransactionPsp": { - "type": "object", - "properties": { - "idChannel": { - "type": "string" + "TransactionPsp" : { + "type" : "object", + "properties" : { + "idChannel" : { + "type" : "string" }, - "businessName": { - "type": "string" + "businessName" : { + "type" : "string" }, - "serviceName": { - "type": "string" + "serviceName" : { + "type" : "string" } } }, - "Transfer": { - "type": "object", - "properties": { - "idTransfer": { - "type": "string" + "Transfer" : { + "type" : "object", + "properties" : { + "idTransfer" : { + "type" : "string" }, - "fiscalCodePA": { - "type": "string" + "fiscalCodePA" : { + "type" : "string" }, - "companyName": { - "type": "string" + "companyName" : { + "type" : "string" }, - "amount": { - "type": "string" + "amount" : { + "type" : "string" }, - "transferCategory": { - "type": "string" + "transferCategory" : { + "type" : "string" }, - "remittanceInformation": { - "type": "string" + "remittanceInformation" : { + "type" : "string" }, - "metadata": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MapEntry" + "metadata" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/MapEntry" } }, - "IBAN": { - "type": "string" + "IBAN" : { + "type" : "string" }, - "MBD": { - "$ref": "#/components/schemas/MBD" + "MBD" : { + "$ref" : "#/components/schemas/MBD" } } }, - "User": { - "type": "object", - "properties": { - "fullName": { - "type": "string" + "User" : { + "type" : "object", + "properties" : { + "fullName" : { + "type" : "string" }, - "type": { - "type": "string", - "enum": [ - "F", - "G", - "GUEST", - "REGISTERED" - ] + "type" : { + "type" : "string", + "enum" : [ "F", "G", "GUEST", "REGISTERED" ] }, - "fiscalCode": { - "type": "string" + "fiscalCode" : { + "type" : "string" }, - "notificationEmail": { - "type": "string" + "notificationEmail" : { + "type" : "string" }, - "userId": { - "type": "string" + "userId" : { + "type" : "string" }, - "userStatus": { - "type": "string" + "userStatus" : { + "type" : "string" }, - "userStatusDescription": { - "type": "string" + "userStatusDescription" : { + "type" : "string" } } }, - "WalletItem": { - "type": "object", - "properties": { - "idWallet": { - "type": "string" + "WalletItem" : { + "type" : "object", + "properties" : { + "idWallet" : { + "type" : "string" }, - "walletType": { - "type": "string", - "enum": [ - "CARD", - "PAYPAL", - "BANCOMATPAY" - ] + "walletType" : { + "type" : "string", + "enum" : [ "CARD", "PAYPAL", "BANCOMATPAY" ] }, - "enableableFunctions": { - "type": "array", - "items": { - "type": "string" + "enableableFunctions" : { + "type" : "array", + "items" : { + "type" : "string" } }, - "pagoPa": { - "type": "boolean" + "pagoPa" : { + "type" : "boolean" }, - "onboardingChannel": { - "type": "string" + "onboardingChannel" : { + "type" : "string" }, - "favourite": { - "type": "boolean" + "favourite" : { + "type" : "boolean" }, - "createDate": { - "type": "string" + "createDate" : { + "type" : "string" }, - "info": { - "$ref": "#/components/schemas/Info" + "info" : { + "$ref" : "#/components/schemas/Info" }, - "authRequest": { - "$ref": "#/components/schemas/AuthRequest" + "authRequest" : { + "$ref" : "#/components/schemas/AuthRequest" } } } }, - "securitySchemes": { - "ApiKey": { - "type": "apiKey", - "description": "The API key to access this function app.", - "name": "Ocp-Apim-Subscription-Key", - "in": "header" + "securitySchemes" : { + "ApiKey" : { + "type" : "apiKey", + "description" : "The API key to access this function app.", + "name" : "Ocp-Apim-Subscription-Key", + "in" : "header" } } } -} +} \ No newline at end of file diff --git a/openapi/openapi_ec.json b/openapi/openapi_ec.json index ff5bfa81..672b829e 100644 --- a/openapi/openapi_ec.json +++ b/openapi/openapi_ec.json @@ -1,724 +1,661 @@ { - "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.51" + "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.51" }, - "servers": [ - { - "url": "http://localhost", - "description": "Generated server url" - } - ], - "paths": { - "/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" + "servers" : [ { + "url" : "http://localhost", + "description" : "Generated server url" + } ], + "paths" : { + "/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" : { + "401" : { + "description" : "Wrong or missing function key.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "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": { - "422": { - "description": "Unable to process the request.", - "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" + "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" + "422" : { + "description" : "Unable to process the request.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "404": { - "description": "Not found the receipt.", - "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "200": { - "description": "Obtained receipt.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CtReceiptModelResponse" } } } }, - "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" + "429" : { + "description" : "Too many requests.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "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.", - "required": false, - "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.", + "required" : false, + "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" + "/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" : { + "401" : { + "description" : "Wrong or missing function key.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "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": { - "422": { - "description": "Unable to process the request.", - "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" + "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" + "422" : { + "description" : "Unable to process the request.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "404": { - "description": "Not found the receipt.", - "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "200": { - "description": "Obtained receipt.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CtReceiptModelResponse" } } } }, - "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" + "429" : { + "description" : "Too many requests.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "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.", - "required": false, - "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.", + "required" : false, + "schema" : { + "type" : "string" } - ] + } ] }, - "/info": { - "get": { - "tags": [ - "Home" - ], - "summary": "health check", - "description": "Return OK if application is started", - "operationId": "healthCheck", - "responses": { - "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" + "/info" : { + "get" : { + "tags" : [ "Home" ], + "summary" : "health check", + "description" : "Return OK if application is started", + "operationId" : "healthCheck", + "responses" : { + "401" : { + "description" : "Unauthorized", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "400": { - "description": "Bad Request", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "200" : { + "description" : "OK", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppInfo" } } } }, - "200": { - "description": "OK", - "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/AppInfo" + "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" + "403" : { + "description" : "Forbidden", + "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" + "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" + "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" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "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.", - "required": false, - "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.", + "required" : false, + "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" + "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" + "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" + "idPSP" : { + "type" : "string" }, - "pspFiscalCode": { - "type": "string" + "pspFiscalCode" : { + "type" : "string" }, - "pspPartitaIVA": { - "type": "string" + "pspPartitaIVA" : { + "type" : "string" }, - "pspCompanyName": { - "type": "string" + "pspCompanyName" : { + "type" : "string" }, - "idChannel": { - "type": "string" + "idChannel" : { + "type" : "string" }, - "channelDescription": { - "type": "string" + "channelDescription" : { + "type" : "string" }, - "payer": { - "$ref": "#/components/schemas/Payer" + "payer" : { + "$ref" : "#/components/schemas/Payer" }, - "paymentMethod": { - "type": "string" + "paymentMethod" : { + "type" : "string" }, - "fee": { - "type": "number" + "fee" : { + "type" : "number" }, - "primaryCiIncurredFee": { - "type": "number" + "primaryCiIncurredFee" : { + "type" : "number" }, - "idBundle": { - "type": "string" + "idBundle" : { + "type" : "string" }, - "idCiBundle": { - "type": "string" + "idCiBundle" : { + "type" : "string" }, - "paymentDateTime": { - "type": "string", - "format": "date" + "paymentDateTime" : { + "type" : "string", + "format" : "date" }, - "applicationDate": { - "type": "string", - "format": "date" + "applicationDate" : { + "type" : "string", + "format" : "date" }, - "transferDate": { - "type": "string", - "format": "date" + "transferDate" : { + "type" : "string", + "format" : "date" }, - "metadata": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MapEntry" + "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" + "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" + "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" + "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" + "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" + "AppInfo" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" }, - "version": { - "type": "string" + "version" : { + "type" : "string" }, - "environment": { - "type": "string" + "environment" : { + "type" : "string" } } } }, - "securitySchemes": { - "ApiKey": { - "type": "apiKey", - "description": "The API key to access this function app.", - "name": "Ocp-Apim-Subscription-Key", - "in": "header" + "securitySchemes" : { + "ApiKey" : { + "type" : "apiKey", + "description" : "The API key to access this function app.", + "name" : "Ocp-Apim-Subscription-Key", + "in" : "header" } } } -} +} \ No newline at end of file diff --git a/openapi/openapi_helpdesk.json b/openapi/openapi_helpdesk.json index 82e4e844..483baf5f 100644 --- a/openapi/openapi_helpdesk.json +++ b/openapi/openapi_helpdesk.json @@ -1,1046 +1,1006 @@ { - "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.51" + "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.51" }, - "servers": [ - { - "url": "http://localhost", - "description": "Generated server url" - } - ], - "paths": { - "/info": { - "get": { - "tags": [ - "Home" - ], - "summary": "health check", - "description": "Return OK if application is started", - "operationId": "healthCheck", - "responses": { - "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" + "servers" : [ { + "url" : "http://localhost", + "description" : "Generated server url" + } ], + "paths" : { + "/info" : { + "get" : { + "tags" : [ "Home" ], + "summary" : "health check", + "description" : "Return OK if application is started", + "operationId" : "healthCheck", + "responses" : { + "401" : { + "description" : "Unauthorized", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "400": { - "description": "Bad Request", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "200" : { + "description" : "OK", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppInfo" } } } }, - "200": { - "description": "OK", - "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/AppInfo" + "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" + "403" : { + "description" : "Forbidden", + "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" + "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" + "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" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "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.", - "required": false, - "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.", + "required" : false, + "schema" : { + "type" : "string" } - ] + } ] }, - "/events/{biz-event-id}": { - "get": { - "tags": [ - "Biz-Events Helpdesk" - ], - "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" + "/events/{biz-event-id}" : { + "get" : { + "tags" : [ "Biz-Events Helpdesk" ], + "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" : { + "401" : { + "description" : "Wrong or missing function key.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" + } + } } - } - ], - "responses": { - "404": { - "description": "Not found the biz-event.", - "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" + "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" + "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" + "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" + "422" : { + "description" : "Unable to process the request.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "200": { - "description": "Obtained biz-event.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BizEvent" } } } }, - "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" + "429" : { + "description" : "Too many requests.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "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.", - "required": false, - "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.", + "required" : false, + "schema" : { + "type" : "string" } - ] + } ] }, - "/events/organizations/{organization-fiscal-code}/iuvs/{iuv}": { - "get": { - "tags": [ - "Biz-Events Helpdesk" - ], - "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" + "/events/organizations/{organization-fiscal-code}/iuvs/{iuv}" : { + "get" : { + "tags" : [ "Biz-Events Helpdesk" ], + "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" : { + "401" : { + "description" : "Wrong or missing function key.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "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": { - "404": { - "description": "Not found the biz-event.", - "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" + "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" + "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" + "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" + "422" : { + "description" : "Unable to process the request.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "200": { - "description": "Obtained biz-event.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BizEvent" } } } }, - "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" + "429" : { + "description" : "Too many requests.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "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.", - "required": false, - "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.", + "required" : false, + "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" + "components" : { + "schemas" : { + "AppInfo" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "version" : { + "type" : "string" + }, + "environment" : { + "type" : "string" } } }, - "AppInfo": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "version": { - "type": "string" - }, - "environment": { - "type": "string" + "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" } } }, - "AuthRequest": { - "type": "object", - "properties": { - "authOutcome": { - "type": "string" + "AuthRequest" : { + "type" : "object", + "properties" : { + "authOutcome" : { + "type" : "string" }, - "guid": { - "type": "string" + "guid" : { + "type" : "string" }, - "correlationId": { - "type": "string" + "correlationId" : { + "type" : "string" }, - "error": { - "type": "string" + "error" : { + "type" : "string" }, - "auth_code": { - "type": "string" + "auth_code" : { + "type" : "string" } } }, - "BizEvent": { - "type": "object", - "properties": { - "id": { - "type": "string" + "BizEvent" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "string" }, - "version": { - "type": "string" + "version" : { + "type" : "string" }, - "idPaymentManager": { - "type": "string" + "idPaymentManager" : { + "type" : "string" }, - "complete": { - "type": "string" + "complete" : { + "type" : "string" }, - "receiptId": { - "type": "string" + "receiptId" : { + "type" : "string" }, - "missingInfo": { - "type": "array", - "items": { - "type": "string" + "missingInfo" : { + "type" : "array", + "items" : { + "type" : "string" } }, - "debtorPosition": { - "$ref": "#/components/schemas/DebtorPosition" + "debtorPosition" : { + "$ref" : "#/components/schemas/DebtorPosition" }, - "creditor": { - "$ref": "#/components/schemas/Creditor" + "creditor" : { + "$ref" : "#/components/schemas/Creditor" }, - "psp": { - "$ref": "#/components/schemas/Psp" + "psp" : { + "$ref" : "#/components/schemas/Psp" }, - "debtor": { - "$ref": "#/components/schemas/Debtor" + "debtor" : { + "$ref" : "#/components/schemas/Debtor" }, - "payer": { - "$ref": "#/components/schemas/Payer" + "payer" : { + "$ref" : "#/components/schemas/Payer" }, - "paymentInfo": { - "$ref": "#/components/schemas/PaymentInfo" + "paymentInfo" : { + "$ref" : "#/components/schemas/PaymentInfo" }, - "transferList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Transfer" + "transferList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Transfer" } }, - "transactionDetails": { - "$ref": "#/components/schemas/TransactionDetails" - }, - "eventStatus": { - "type": "string", - "enum": [ - "NA", - "RETRY", - "FAILED", - "DONE", - "INGESTED" - ] - }, - "eventRetryEnrichmentCount": { - "type": "integer", - "format": "int32" + "transactionDetails" : { + "$ref" : "#/components/schemas/TransactionDetails" + }, + "eventStatus" : { + "type" : "string", + "enum" : [ "NA", "RETRY", "FAILED", "DONE", "INGESTED" ] + }, + "eventRetryEnrichmentCount" : { + "type" : "integer", + "format" : "int32" } } }, - "Creditor": { - "type": "object", - "properties": { - "idPA": { - "type": "string" + "Creditor" : { + "type" : "object", + "properties" : { + "idPA" : { + "type" : "string" }, - "idBrokerPA": { - "type": "string" + "idBrokerPA" : { + "type" : "string" }, - "idStation": { - "type": "string" + "idStation" : { + "type" : "string" }, - "companyName": { - "type": "string" + "companyName" : { + "type" : "string" }, - "officeName": { - "type": "string" + "officeName" : { + "type" : "string" } } }, - "Debtor": { - "type": "object", - "properties": { - "fullName": { - "type": "string" + "Debtor" : { + "type" : "object", + "properties" : { + "fullName" : { + "type" : "string" }, - "entityUniqueIdentifierType": { - "type": "string" + "entityUniqueIdentifierType" : { + "type" : "string" }, - "entityUniqueIdentifierValue": { - "type": "string" + "entityUniqueIdentifierValue" : { + "type" : "string" }, - "streetName": { - "type": "string" + "streetName" : { + "type" : "string" }, - "civicNumber": { - "type": "string" + "civicNumber" : { + "type" : "string" }, - "postalCode": { - "type": "string" + "postalCode" : { + "type" : "string" }, - "city": { - "type": "string" + "city" : { + "type" : "string" }, - "stateProvinceRegion": { - "type": "string" + "stateProvinceRegion" : { + "type" : "string" }, - "country": { - "type": "string" + "country" : { + "type" : "string" }, - "eMail": { - "type": "string" + "eMail" : { + "type" : "string" } } }, - "DebtorPosition": { - "type": "object", - "properties": { - "modelType": { - "type": "string" + "DebtorPosition" : { + "type" : "object", + "properties" : { + "modelType" : { + "type" : "string" }, - "noticeNumber": { - "type": "string" + "noticeNumber" : { + "type" : "string" }, - "iuv": { - "type": "string" + "iuv" : { + "type" : "string" }, - "iur": { - "type": "string" + "iur" : { + "type" : "string" } } }, - "Details": { - "type": "object", - "properties": { - "blurredNumber": { - "type": "string" + "Details" : { + "type" : "object", + "properties" : { + "blurredNumber" : { + "type" : "string" }, - "holder": { - "type": "string" + "holder" : { + "type" : "string" }, - "circuit": { - "type": "string" + "circuit" : { + "type" : "string" } } }, - "Info": { - "type": "object", - "properties": { - "type": { - "type": "string" + "Info" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string" }, - "blurredNumber": { - "type": "string" + "blurredNumber" : { + "type" : "string" }, - "holder": { - "type": "string" + "holder" : { + "type" : "string" }, - "expireMonth": { - "type": "string" + "expireMonth" : { + "type" : "string" }, - "expireYear": { - "type": "string" + "expireYear" : { + "type" : "string" }, - "brand": { - "type": "string" + "brand" : { + "type" : "string" }, - "issuerAbi": { - "type": "string" + "issuerAbi" : { + "type" : "string" }, - "issuerName": { - "type": "string" + "issuerName" : { + "type" : "string" }, - "label": { - "type": "string" + "label" : { + "type" : "string" } } }, - "InfoTransaction": { - "type": "object", - "properties": { - "brand": { - "type": "string" + "InfoTransaction" : { + "type" : "object", + "properties" : { + "brand" : { + "type" : "string" }, - "brandLogo": { - "type": "string" + "brandLogo" : { + "type" : "string" }, - "clientId": { - "type": "string" + "clientId" : { + "type" : "string" }, - "paymentMethodName": { - "type": "string" + "paymentMethodName" : { + "type" : "string" }, - "type": { - "type": "string" + "type" : { + "type" : "string" } } }, - "MBD": { - "type": "object", - "properties": { - "IUBD": { - "type": "string" + "MBD" : { + "type" : "object", + "properties" : { + "IUBD" : { + "type" : "string" }, - "oraAcquisto": { - "type": "string" + "oraAcquisto" : { + "type" : "string" }, - "importo": { - "type": "string" + "importo" : { + "type" : "string" }, - "tipoBollo": { - "type": "string" + "tipoBollo" : { + "type" : "string" }, - "MBDAttachment": { - "type": "string" + "MBDAttachment" : { + "type" : "string" } } }, - "MapEntry": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "value": { - "type": "string" + "MapEntry" : { + "type" : "object", + "properties" : { + "key" : { + "type" : "string" + }, + "value" : { + "type" : "string" } } }, - "Payer": { - "type": "object", - "properties": { - "fullName": { - "type": "string" + "Payer" : { + "type" : "object", + "properties" : { + "fullName" : { + "type" : "string" }, - "entityUniqueIdentifierType": { - "type": "string" + "entityUniqueIdentifierType" : { + "type" : "string" }, - "entityUniqueIdentifierValue": { - "type": "string" + "entityUniqueIdentifierValue" : { + "type" : "string" }, - "streetName": { - "type": "string" + "streetName" : { + "type" : "string" }, - "civicNumber": { - "type": "string" + "civicNumber" : { + "type" : "string" }, - "postalCode": { - "type": "string" + "postalCode" : { + "type" : "string" }, - "city": { - "type": "string" + "city" : { + "type" : "string" }, - "stateProvinceRegion": { - "type": "string" + "stateProvinceRegion" : { + "type" : "string" }, - "country": { - "type": "string" + "country" : { + "type" : "string" }, - "eMail": { - "type": "string" + "eMail" : { + "type" : "string" } } }, - "PaymentAuthorizationRequest": { - "type": "object", - "properties": { - "authOutcome": { - "type": "string" + "PaymentAuthorizationRequest" : { + "type" : "object", + "properties" : { + "authOutcome" : { + "type" : "string" }, - "requestId": { - "type": "string" + "requestId" : { + "type" : "string" }, - "correlationId": { - "type": "string" + "correlationId" : { + "type" : "string" }, - "authCode": { - "type": "string" + "authCode" : { + "type" : "string" }, - "paymentMethodType": { - "type": "string" + "paymentMethodType" : { + "type" : "string" }, - "details": { - "$ref": "#/components/schemas/Details" + "details" : { + "$ref" : "#/components/schemas/Details" } } }, - "PaymentInfo": { - "type": "object", - "properties": { - "paymentDateTime": { - "type": "string" + "PaymentInfo" : { + "type" : "object", + "properties" : { + "paymentDateTime" : { + "type" : "string" }, - "applicationDate": { - "type": "string" + "applicationDate" : { + "type" : "string" }, - "transferDate": { - "type": "string" + "transferDate" : { + "type" : "string" }, - "dueDate": { - "type": "string" + "dueDate" : { + "type" : "string" }, - "paymentToken": { - "type": "string" + "paymentToken" : { + "type" : "string" }, - "amount": { - "type": "string" + "amount" : { + "type" : "string" }, - "fee": { - "type": "string" + "fee" : { + "type" : "string" }, - "primaryCiIncurredFee": { - "type": "string" + "primaryCiIncurredFee" : { + "type" : "string" }, - "idBundle": { - "type": "string" + "idBundle" : { + "type" : "string" }, - "idCiBundle": { - "type": "string" + "idCiBundle" : { + "type" : "string" }, - "totalNotice": { - "type": "string" + "totalNotice" : { + "type" : "string" }, - "paymentMethod": { - "type": "string" + "paymentMethod" : { + "type" : "string" }, - "touchpoint": { - "type": "string" + "touchpoint" : { + "type" : "string" }, - "remittanceInformation": { - "type": "string" + "remittanceInformation" : { + "type" : "string" }, - "description": { - "type": "string" + "description" : { + "type" : "string" }, - "metadata": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MapEntry" + "metadata" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/MapEntry" } }, - "IUR": { - "type": "string" + "IUR" : { + "type" : "string" } } }, - "Psp": { - "type": "object", - "properties": { - "idPsp": { - "type": "string" + "Psp" : { + "type" : "object", + "properties" : { + "idPsp" : { + "type" : "string" }, - "idBrokerPsp": { - "type": "string" + "idBrokerPsp" : { + "type" : "string" }, - "idChannel": { - "type": "string" + "idChannel" : { + "type" : "string" }, - "psp": { - "type": "string" + "psp" : { + "type" : "string" }, - "pspPartitaIVA": { - "type": "string" + "pspPartitaIVA" : { + "type" : "string" }, - "pspFiscalCode": { - "type": "string" + "pspFiscalCode" : { + "type" : "string" }, - "channelDescription": { - "type": "string" + "channelDescription" : { + "type" : "string" } } }, - "Transaction": { - "type": "object", - "properties": { - "idTransaction": { - "type": "string" + "Transaction" : { + "type" : "object", + "properties" : { + "idTransaction" : { + "type" : "string" }, - "transactionId": { - "type": "string" + "transactionId" : { + "type" : "string" }, - "grandTotal": { - "type": "integer", - "format": "int64" + "grandTotal" : { + "type" : "integer", + "format" : "int64" }, - "amount": { - "type": "integer", - "format": "int64" + "amount" : { + "type" : "integer", + "format" : "int64" }, - "fee": { - "type": "integer", - "format": "int64" + "fee" : { + "type" : "integer", + "format" : "int64" }, - "transactionStatus": { - "type": "string" + "transactionStatus" : { + "type" : "string" }, - "accountingStatus": { - "type": "string" + "accountingStatus" : { + "type" : "string" }, - "rrn": { - "type": "string" + "rrn" : { + "type" : "string" }, - "authorizationCode": { - "type": "string" + "authorizationCode" : { + "type" : "string" }, - "creationDate": { - "type": "string" + "creationDate" : { + "type" : "string" }, - "numAut": { - "type": "string" + "numAut" : { + "type" : "string" }, - "accountCode": { - "type": "string" + "accountCode" : { + "type" : "string" }, - "psp": { - "$ref": "#/components/schemas/TransactionPsp" + "psp" : { + "$ref" : "#/components/schemas/TransactionPsp" }, - "origin": { - "type": "string" + "origin" : { + "type" : "string" } } }, - "TransactionDetails": { - "type": "object", - "properties": { - "user": { - "$ref": "#/components/schemas/User" + "TransactionDetails" : { + "type" : "object", + "properties" : { + "user" : { + "$ref" : "#/components/schemas/User" }, - "paymentAuthorizationRequest": { - "$ref": "#/components/schemas/PaymentAuthorizationRequest" + "paymentAuthorizationRequest" : { + "$ref" : "#/components/schemas/PaymentAuthorizationRequest" }, - "wallet": { - "$ref": "#/components/schemas/WalletItem" + "wallet" : { + "$ref" : "#/components/schemas/WalletItem" }, - "origin": { - "type": "string" + "origin" : { + "type" : "string" }, - "transaction": { - "$ref": "#/components/schemas/Transaction" + "transaction" : { + "$ref" : "#/components/schemas/Transaction" }, - "info": { - "$ref": "#/components/schemas/InfoTransaction" + "info" : { + "$ref" : "#/components/schemas/InfoTransaction" } } }, - "TransactionPsp": { - "type": "object", - "properties": { - "idChannel": { - "type": "string" + "TransactionPsp" : { + "type" : "object", + "properties" : { + "idChannel" : { + "type" : "string" }, - "businessName": { - "type": "string" + "businessName" : { + "type" : "string" }, - "serviceName": { - "type": "string" + "serviceName" : { + "type" : "string" } } }, - "Transfer": { - "type": "object", - "properties": { - "idTransfer": { - "type": "string" + "Transfer" : { + "type" : "object", + "properties" : { + "idTransfer" : { + "type" : "string" }, - "fiscalCodePA": { - "type": "string" + "fiscalCodePA" : { + "type" : "string" }, - "companyName": { - "type": "string" + "companyName" : { + "type" : "string" }, - "amount": { - "type": "string" + "amount" : { + "type" : "string" }, - "transferCategory": { - "type": "string" + "transferCategory" : { + "type" : "string" }, - "remittanceInformation": { - "type": "string" + "remittanceInformation" : { + "type" : "string" }, - "metadata": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MapEntry" + "metadata" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/MapEntry" } }, - "IBAN": { - "type": "string" + "IBAN" : { + "type" : "string" }, - "MBD": { - "$ref": "#/components/schemas/MBD" + "MBD" : { + "$ref" : "#/components/schemas/MBD" } } }, - "User": { - "type": "object", - "properties": { - "fullName": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "F", - "G", - "GUEST", - "REGISTERED" - ] - }, - "fiscalCode": { - "type": "string" - }, - "notificationEmail": { - "type": "string" - }, - "userId": { - "type": "string" - }, - "userStatus": { - "type": "string" - }, - "userStatusDescription": { - "type": "string" + "User" : { + "type" : "object", + "properties" : { + "fullName" : { + "type" : "string" + }, + "type" : { + "type" : "string", + "enum" : [ "F", "G", "GUEST", "REGISTERED" ] + }, + "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" + "WalletItem" : { + "type" : "object", + "properties" : { + "idWallet" : { + "type" : "string" + }, + "walletType" : { + "type" : "string", + "enum" : [ "CARD", "PAYPAL", "BANCOMATPAY" ] + }, + "enableableFunctions" : { + "type" : "array", + "items" : { + "type" : "string" } }, - "pagoPa": { - "type": "boolean" + "pagoPa" : { + "type" : "boolean" }, - "onboardingChannel": { - "type": "string" + "onboardingChannel" : { + "type" : "string" }, - "favourite": { - "type": "boolean" + "favourite" : { + "type" : "boolean" }, - "createDate": { - "type": "string" + "createDate" : { + "type" : "string" }, - "info": { - "$ref": "#/components/schemas/Info" + "info" : { + "$ref" : "#/components/schemas/Info" }, - "authRequest": { - "$ref": "#/components/schemas/AuthRequest" + "authRequest" : { + "$ref" : "#/components/schemas/AuthRequest" } } } }, - "securitySchemes": { - "ApiKey": { - "type": "apiKey", - "description": "The API key to access this function app.", - "name": "Ocp-Apim-Subscription-Key", - "in": "header" + "securitySchemes" : { + "ApiKey" : { + "type" : "apiKey", + "description" : "The API key to access this function app.", + "name" : "Ocp-Apim-Subscription-Key", + "in" : "header" } } } -} +} \ No newline at end of file diff --git a/openapi/openapi_io.json b/openapi/openapi_io.json index 6db72389..5081c0a4 100644 --- a/openapi/openapi_io.json +++ b/openapi/openapi_io.json @@ -1,1121 +1,1027 @@ { - "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.51" + "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.51" }, - "servers": [ - { - "url": "http://localhost", - "description": "Generated server url" - } - ], - "paths": { - "/transactions/{transaction-id}/disable": { - "post": { - "tags": [ - "IO Transactions REST APIs" - ], - "summary": "Disable the transaction details given its id.", - "description": "This operation is deprecated. Use Paid Notice APIs instead", - "operationId": "disableTransaction", - "parameters": [ - { - "name": "x-fiscal-code", - "in": "header", - "required": true, - "schema": { - "type": "string" + "servers" : [ { + "url" : "http://localhost", + "description" : "Generated server url" + } ], + "paths" : { + "/transactions/{transaction-id}/disable" : { + "post" : { + "tags" : [ "IO Transactions REST APIs" ], + "summary" : "Disable the transaction details given its id.", + "description" : "This operation is deprecated. Use Paid Notice APIs instead", + "operationId" : "disableTransaction", + "parameters" : [ { + "name" : "x-fiscal-code", + "in" : "header", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "transaction-id", + "in" : "path", + "description" : "The id of the transaction.", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "401" : { + "description" : "Wrong or missing function key.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" + } + } } }, - { - "name": "transaction-id", - "in": "path", - "description": "The id of the transaction.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "404": { - "description": "Not found the transaction.", - "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" + "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" + "404" : { + "description" : "Not found the transaction.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "200": { - "description": "Disabled Transactions.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "200" : { + "description" : "Disabled Transactions.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": {} + "content" : { + "application/json" : { } } }, - "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" + "429" : { + "description" : "Too many requests.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } } }, - "deprecated": true, - "security": [ - { - "ApiKey": [] - } - ] + "deprecated" : true, + "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.", - "required": false, - "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.", + "required" : false, + "schema" : { + "type" : "string" } - ] + } ] }, - "/transactions": { - "get": { - "tags": [ - "IO Transactions REST APIs" - ], - "summary": "Retrieve the paged transaction list from biz events.", - "operationId": "getTransactionList", - "parameters": [ - { - "name": "x-fiscal-code", - "in": "header", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "is_payer", - "in": "query", - "description": "Filter by payer", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_debtor", - "in": "query", - "description": "Filter by debtor", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "x-continuation-token", - "in": "header", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 10 - } - }, - { - "name": "orderby", - "in": "query", - "description": "Order by TRANSACTION_DATE", - "required": false, - "schema": { - "type": "string", - "default": "TRANSACTION_DATE", - "enum": [ - "TRANSACTION_DATE" - ] + "/transactions" : { + "get" : { + "tags" : [ "IO Transactions REST APIs" ], + "summary" : "Retrieve the paged transaction list from biz events.", + "description" : "This operation is deprecated. Use Paid Notice APIs instead", + "operationId" : "getTransactionList", + "parameters" : [ { + "name" : "x-fiscal-code", + "in" : "header", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "is_payer", + "in" : "query", + "description" : "Filter by payer", + "required" : false, + "schema" : { + "type" : "boolean" + } + }, { + "name" : "is_debtor", + "in" : "query", + "description" : "Filter by debtor", + "required" : false, + "schema" : { + "type" : "boolean" + } + }, { + "name" : "x-continuation-token", + "in" : "header", + "required" : false, + "schema" : { + "type" : "string" + } + }, { + "name" : "size", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 10 + } + }, { + "name" : "orderby", + "in" : "query", + "description" : "Order by TRANSACTION_DATE", + "required" : false, + "schema" : { + "type" : "string", + "default" : "TRANSACTION_DATE", + "enum" : [ "TRANSACTION_DATE" ] + } + }, { + "name" : "ordering", + "in" : "query", + "description" : "Direction of ordering", + "required" : false, + "schema" : { + "type" : "string", + "default" : "DESC", + "enum" : [ "ASC", "DESC" ] + } + } ], + "responses" : { + "401" : { + "description" : "Wrong or missing function key.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" + } + } } }, - { - "name": "ordering", - "in": "query", - "description": "Direction of ordering", - "required": false, - "schema": { - "type": "string", - "default": "DESC", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], - "responses": { - "404": { - "description": "Not found the transaction.", - "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": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "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" + "404" : { + "description" : "Not found the transaction.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "200": { - "description": "Obtained transaction list.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "200" : { + "description" : "Obtained transaction list.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } }, - "x-continuation-token": { - "description": "continuation token for paginated query", - "style": "simple", - "schema": { - "type": "string" + "x-continuation-token" : { + "description" : "continuation token for paginated query", + "style" : "simple", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TransactionListWrapResponse" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/TransactionListWrapResponse" } } } }, - "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" + "429" : { + "description" : "Too many requests.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "deprecated" : true, + "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.", - "required": false, - "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.", + "required" : false, + "schema" : { + "type" : "string" } - ] + } ] }, - "/transactions/{transaction-id}": { - "get": { - "tags": [ - "IO Transactions REST APIs" - ], - "summary": "Retrieve the transaction details given its id.", - "operationId": "getTransactionDetails", - "parameters": [ - { - "name": "x-fiscal-code", - "in": "header", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "transaction-id", - "in": "path", - "description": "The id of the transaction.", - "required": true, - "schema": { - "type": "string" - } + "/transactions/{transaction-id}" : { + "get" : { + "tags" : [ "IO Transactions REST APIs" ], + "summary" : "Retrieve the transaction details given its id.", + "operationId" : "getTransactionDetails", + "parameters" : [ { + "name" : "x-fiscal-code", + "in" : "header", + "required" : true, + "schema" : { + "type" : "string" } - ], - "responses": { - "200": { - "description": "Obtained transaction details.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, { + "name" : "transaction-id", + "in" : "path", + "description" : "The id of the transaction.", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "200" : { + "description" : "Obtained transaction details.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TransactionDetailResponse" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/TransactionDetailResponse" } } } }, - "404": { - "description": "Not found the transaction.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "401" : { + "description" : "Wrong or missing function key.", + "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" } } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "500": { - "description": "Service unavailable.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "404" : { + "description" : "Not found the transaction.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "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" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "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.", - "required": false, - "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.", + "required" : false, + "schema" : { + "type" : "string" } - ] + } ] }, - "/transactions/{event-id}/pdf": { - "get": { - "tags": [ - "IO Transactions REST APIs" - ], - "summary": "Retrieve the PDF receipt given event id.", - "operationId": "getPDFReceipt", - "parameters": [ - { - "name": "x-fiscal-code", - "in": "header", - "required": true, - "schema": { - "type": "string" + "/transactions/{event-id}/pdf" : { + "get" : { + "tags" : [ "IO Transactions REST APIs" ], + "summary" : "Retrieve the PDF receipt given event id.", + "operationId" : "getPDFReceipt", + "parameters" : [ { + "name" : "x-fiscal-code", + "in" : "header", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "event-id", + "in" : "path", + "description" : "The id of the event.", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "401" : { + "description" : "Wrong or missing function key.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" + } + } } }, - { - "name": "event-id", - "in": "path", - "description": "The id of the event.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Obtained the PDF receipt.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "422" : { + "description" : "Unprocessable receipt.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/pdf": { - "schema": { - "type": "string", - "format": "binary" + "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" } } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "422": { - "description": "Unprocessable receipt.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "200" : { + "description" : "Obtained the PDF receipt.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "application/pdf" : { + "schema" : { + "type" : "string", + "format" : "binary" } } } }, - "404": { - "description": "Not found the receipt.", - "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "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" + "429" : { + "description" : "Too many requests.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "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.", - "required": false, - "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.", + "required" : false, + "schema" : { + "type" : "string" } - ] + } ] }, - "/transactions/cached": { - "get": { - "tags": [ - "IO Transactions REST APIs" - ], - "summary": "Retrieve the paged transaction list from biz events.", - "operationId": "getTransactionList_1", - "parameters": [ - { - "name": "x-fiscal-code", - "in": "header", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "is_payer", - "in": "query", - "description": "Filter by payer", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_debtor", - "in": "query", - "description": "Filter by debtor", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 0 - } - }, - { - "name": "size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 10 - } - }, - { - "name": "orderby", - "in": "query", - "description": "Order by TRANSACTION_DATE", - "required": false, - "schema": { - "type": "string", - "default": "TRANSACTION_DATE", - "enum": [ - "TRANSACTION_DATE" - ] + "/transactions/cached" : { + "get" : { + "tags" : [ "IO Transactions REST APIs" ], + "summary" : "Retrieve the paged transaction list from biz events.", + "operationId" : "getTransactionList_1", + "parameters" : [ { + "name" : "x-fiscal-code", + "in" : "header", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "is_payer", + "in" : "query", + "description" : "Filter by payer", + "required" : false, + "schema" : { + "type" : "boolean" + } + }, { + "name" : "is_debtor", + "in" : "query", + "description" : "Filter by debtor", + "required" : false, + "schema" : { + "type" : "boolean" + } + }, { + "name" : "page", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 0 + } + }, { + "name" : "size", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 10 + } + }, { + "name" : "orderby", + "in" : "query", + "description" : "Order by TRANSACTION_DATE", + "required" : false, + "schema" : { + "type" : "string", + "default" : "TRANSACTION_DATE", + "enum" : [ "TRANSACTION_DATE" ] + } + }, { + "name" : "ordering", + "in" : "query", + "description" : "Direction of ordering", + "required" : false, + "schema" : { + "type" : "string", + "default" : "DESC", + "enum" : [ "ASC", "DESC" ] + } + } ], + "responses" : { + "401" : { + "description" : "Wrong or missing function key.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" + } + } } }, - { - "name": "ordering", - "in": "query", - "description": "Direction of ordering", - "required": false, - "schema": { - "type": "string", - "default": "DESC", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], - "responses": { - "404": { - "description": "Not found the transaction.", - "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" + "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" + "404" : { + "description" : "Not found the transaction.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "200": { - "description": "Obtained transaction list.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "200" : { + "description" : "Obtained transaction list.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TransactionListWrapResponse" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/TransactionListWrapResponse" } } } }, - "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" + "429" : { + "description" : "Too many requests.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "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.", - "required": false, - "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.", + "required" : false, + "schema" : { + "type" : "string" } - ] + } ] }, - "/info": { - "get": { - "tags": [ - "Home" - ], - "summary": "health check", - "description": "Return OK if application is started", - "operationId": "healthCheck", - "responses": { - "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" + "/info" : { + "get" : { + "tags" : [ "Home" ], + "summary" : "health check", + "description" : "Return OK if application is started", + "operationId" : "healthCheck", + "responses" : { + "401" : { + "description" : "Unauthorized", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "400": { - "description": "Bad Request", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "200" : { + "description" : "OK", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppInfo" } } } }, - "200": { - "description": "OK", - "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/AppInfo" + "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" + "403" : { + "description" : "Forbidden", + "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" + "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" + "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" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "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.", - "required": false, - "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.", + "required" : false, + "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" + "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" } } }, - "PageInfo": { - "required": [ - "items_found", - "limit", - "page", - "total_pages" - ], - "type": "object", - "properties": { - "page": { - "type": "integer", - "description": "Page number", - "format": "int32" - }, - "limit": { - "type": "integer", - "description": "Required number of items per page", - "format": "int32" - }, - "items_found": { - "type": "integer", - "description": "Number of items found. (The last page may have fewer elements than required)", - "format": "int32" - }, - "total_pages": { - "type": "integer", - "description": "Total number of pages", - "format": "int32" + "PageInfo" : { + "required" : [ "items_found", "limit", "page", "total_pages" ], + "type" : "object", + "properties" : { + "page" : { + "type" : "integer", + "description" : "Page number", + "format" : "int32" + }, + "limit" : { + "type" : "integer", + "description" : "Required number of items per page", + "format" : "int32" + }, + "items_found" : { + "type" : "integer", + "description" : "Number of items found. (The last page may have fewer elements than required)", + "format" : "int32" + }, + "total_pages" : { + "type" : "integer", + "description" : "Total number of pages", + "format" : "int32" } } }, - "TransactionListItem": { - "type": "object", - "properties": { - "transactionId": { - "type": "string" + "TransactionListItem" : { + "type" : "object", + "properties" : { + "transactionId" : { + "type" : "string" }, - "payeeName": { - "type": "string" + "payeeName" : { + "type" : "string" }, - "payeeTaxCode": { - "type": "string" + "payeeTaxCode" : { + "type" : "string" }, - "amount": { - "type": "string" + "amount" : { + "type" : "string" }, - "transactionDate": { - "type": "string" + "transactionDate" : { + "type" : "string" }, - "isCart": { - "type": "boolean" + "isCart" : { + "type" : "boolean" }, - "isPayer": { - "type": "boolean" + "isPayer" : { + "type" : "boolean" }, - "isDebtor": { - "type": "boolean" + "isDebtor" : { + "type" : "boolean" } } }, - "TransactionListWrapResponse": { - "type": "object", - "properties": { - "transactions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransactionListItem" + "TransactionListWrapResponse" : { + "type" : "object", + "properties" : { + "transactions" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TransactionListItem" } }, - "page_info": { - "$ref": "#/components/schemas/PageInfo" + "page_info" : { + "$ref" : "#/components/schemas/PageInfo" } } }, - "CartItem": { - "type": "object", - "properties": { - "subject": { - "type": "string" + "CartItem" : { + "type" : "object", + "properties" : { + "subject" : { + "type" : "string" }, - "amount": { - "type": "string" + "amount" : { + "type" : "string" }, - "payee": { - "$ref": "#/components/schemas/UserDetail" + "payee" : { + "$ref" : "#/components/schemas/UserDetail" }, - "debtor": { - "$ref": "#/components/schemas/UserDetail" + "debtor" : { + "$ref" : "#/components/schemas/UserDetail" }, - "refNumberValue": { - "type": "string" + "refNumberValue" : { + "type" : "string" }, - "refNumberType": { - "type": "string" + "refNumberType" : { + "type" : "string" } } }, - "InfoTransactionView": { - "type": "object", - "properties": { - "transactionId": { - "type": "string" + "InfoTransactionView" : { + "type" : "object", + "properties" : { + "transactionId" : { + "type" : "string" }, - "authCode": { - "type": "string" + "authCode" : { + "type" : "string" }, - "rrn": { - "type": "string" + "rrn" : { + "type" : "string" }, - "transactionDate": { - "type": "string" + "transactionDate" : { + "type" : "string" }, - "pspName": { - "type": "string" + "pspName" : { + "type" : "string" }, - "walletInfo": { - "$ref": "#/components/schemas/WalletInfo" + "walletInfo" : { + "$ref" : "#/components/schemas/WalletInfo" }, - "paymentMethod": { - "type": "string", - "enum": [ - "BBT", - "BP", - "AD", - "CP", - "PO", - "OBEP", - "JIF", - "MYBK", - "PPAL", - "UNKNOWN" - ] + "paymentMethod" : { + "type" : "string", + "enum" : [ "BBT", "BP", "AD", "CP", "PO", "OBEP", "JIF", "MYBK", "PPAL", "UNKNOWN" ] }, - "payer": { - "$ref": "#/components/schemas/UserDetail" + "payer" : { + "$ref" : "#/components/schemas/UserDetail" }, - "amount": { - "type": "string" + "amount" : { + "type" : "string" }, - "fee": { - "type": "string" + "fee" : { + "type" : "string" }, - "origin": { - "type": "string", - "enum": [ - "INTERNAL", - "PM", - "NDP001PROD", - "NDP002PROD", - "NDP003PROD", - "UNKNOWN" - ] + "origin" : { + "type" : "string", + "enum" : [ "INTERNAL", "PM", "NDP001PROD", "NDP002PROD", "NDP003PROD", "UNKNOWN" ] } } }, - "TransactionDetailResponse": { - "type": "object", - "properties": { - "infoTransaction": { - "$ref": "#/components/schemas/InfoTransactionView" - }, - "carts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CartItem" + "TransactionDetailResponse" : { + "type" : "object", + "properties" : { + "infoTransaction" : { + "$ref" : "#/components/schemas/InfoTransactionView" + }, + "carts" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/CartItem" } } } }, - "UserDetail": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "taxCode": { - "type": "string" + "UserDetail" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "taxCode" : { + "type" : "string" } } }, - "WalletInfo": { - "type": "object", - "properties": { - "accountHolder": { - "type": "string" + "WalletInfo" : { + "type" : "object", + "properties" : { + "accountHolder" : { + "type" : "string" }, - "brand": { - "type": "string" + "brand" : { + "type" : "string" }, - "blurredNumber": { - "type": "string" + "blurredNumber" : { + "type" : "string" }, - "maskedEmail": { - "type": "string" + "maskedEmail" : { + "type" : "string" } } }, - "AppInfo": { - "type": "object", - "properties": { - "name": { - "type": "string" + "AppInfo" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" }, - "version": { - "type": "string" + "version" : { + "type" : "string" }, - "environment": { - "type": "string" + "environment" : { + "type" : "string" } } } }, - "securitySchemes": { - "ApiKey": { - "type": "apiKey", - "description": "The API key to access this function app.", - "name": "Ocp-Apim-Subscription-Key", - "in": "header" + "securitySchemes" : { + "ApiKey" : { + "type" : "apiKey", + "description" : "The API key to access this function app.", + "name" : "Ocp-Apim-Subscription-Key", + "in" : "header" } } } -} +} \ No newline at end of file diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/controller/IPaidNoticeController.java b/src/main/java/it/gov/pagopa/bizeventsservice/controller/IPaidNoticeController.java index f4ecf2c5..23c44711 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/controller/IPaidNoticeController.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/controller/IPaidNoticeController.java @@ -10,7 +10,9 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import it.gov.pagopa.bizeventsservice.model.ProblemJson; -import it.gov.pagopa.bizeventsservice.model.response.paidnotice.PaidNoticesList; +import it.gov.pagopa.bizeventsservice.model.filterandorder.Order; +import it.gov.pagopa.bizeventsservice.model.response.paidnotice.NoticeListWrapResponse; +import org.springframework.data.domain.Sort; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; @@ -29,7 +31,6 @@ public interface IPaidNoticeController { String PAGE_SIZE = "size"; /** - * @deprecated * recovers biz-event data for the paid notices list * * @param fiscalCode tokenized user fiscal code @@ -41,21 +42,21 @@ public interface IPaidNoticeController { @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Obtained paid notices list.", headers = @Header(name = X_CONTINUATION_TOKEN, description = "continuation token for paginated query", schema = @Schema(type = "string")), - content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, schema = @Schema(implementation = PaidNoticesList.class))), + content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, schema = @Schema(implementation = NoticeListWrapResponse.class))), @ApiResponse(responseCode = "401", description = "Wrong or missing function key.", content = @Content(schema = @Schema())), @ApiResponse(responseCode = "404", description = "Not found the fiscal code.", 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)))}) @Operation(summary = "Retrieve the paged transaction list from biz events.", description = "This operation is deprecated. Use Paid Notice APIs instead", security = { @SecurityRequirement(name = "ApiKey")}) - ResponseEntity getPaidNotices( + ResponseEntity getPaidNotices( @RequestHeader(name = X_FISCAL_CODE) String fiscalCode, @RequestHeader(name = X_CONTINUATION_TOKEN, required = false) String continuationToken, @RequestParam(name = PAGE_SIZE, required = false, defaultValue = "10") Integer size, @Valid @Parameter(description = "Filter by payer") @RequestParam(value = "is_payer", required = false) Boolean isPayer, - @Valid @Parameter(description = "Filter by debtor") @RequestParam(value = "is_debtor", required = false) Boolean isDebtor - ); - // TODO inserire l'ordering + @Valid @Parameter(description = "Filter by debtor") @RequestParam(value = "is_debtor", required = false) Boolean isDebtor, + @RequestParam(required = false, name = "orderby", defaultValue = "TRANSACTION_DATE") @Parameter(description = "Order by TRANSACTION_DATE") Order.TransactionListOrder orderBy, + @RequestParam(required = false, name = "ordering", defaultValue = "DESC") @Parameter(description = "Direction of ordering") Sort.Direction ordering); diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/controller/ITransactionController.java b/src/main/java/it/gov/pagopa/bizeventsservice/controller/ITransactionController.java index 2e63fd27..43c01f78 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/controller/ITransactionController.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/controller/ITransactionController.java @@ -62,7 +62,7 @@ public interface ITransactionController { @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)))}) @Operation(summary = "Retrieve the paged transaction list from biz events.", description = "This operation is deprecated. Use Paid Notice APIs instead", security = { - @SecurityRequirement(name = "ApiKey")}, operationId = "getTransactionList") + @SecurityRequirement(name = "ApiKey")}, deprecated = true, operationId = "getTransactionList") @Deprecated(forRemoval = false) ResponseEntity getTransactionList( @RequestHeader(name = X_FISCAL_CODE) String fiscalCode, diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/controller/impl/PaidNoticeController.java b/src/main/java/it/gov/pagopa/bizeventsservice/controller/impl/PaidNoticeController.java index 2a7ffcd0..a76d61c6 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/controller/impl/PaidNoticeController.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/controller/impl/PaidNoticeController.java @@ -2,8 +2,8 @@ import it.gov.pagopa.bizeventsservice.controller.IPaidNoticeController; import it.gov.pagopa.bizeventsservice.model.filterandorder.Order; -import it.gov.pagopa.bizeventsservice.model.response.paidnotice.PaidNotice; -import it.gov.pagopa.bizeventsservice.model.response.paidnotice.PaidNoticesList; +import it.gov.pagopa.bizeventsservice.model.response.paidnotice.NoticeListItem; +import it.gov.pagopa.bizeventsservice.model.response.paidnotice.NoticeListWrapResponse; import it.gov.pagopa.bizeventsservice.model.response.transaction.TransactionListResponse; import it.gov.pagopa.bizeventsservice.service.ITransactionService; import org.springframework.beans.factory.annotation.Autowired; @@ -30,13 +30,19 @@ public PaidNoticeController(ITransactionService transactionService) { @Override - public ResponseEntity getPaidNotices(String fiscalCode, String continuationToken, Integer size, Boolean isPayer, Boolean isDebtor) { + public ResponseEntity getPaidNotices(String fiscalCode, + String continuationToken, + Integer size, + Boolean isPayer, + Boolean isDebtor, + Order.TransactionListOrder orderBy, + Sort.Direction ordering) { TransactionListResponse transactionListResponse = transactionService.getTransactionList(fiscalCode, isPayer, isDebtor, - continuationToken, size, Order.TransactionListOrder.TRANSACTION_DATE, Sort.Direction.DESC); + continuationToken, size, orderBy, ordering); - List paidNoticeList = transactionListResponse.getTransactionList().stream() - .map(elem -> PaidNotice.builder() + List noticeListItemList = transactionListResponse.getTransactionList().stream() + .map(elem -> NoticeListItem.builder() .eventId(elem.getTransactionId()) .payeeName(elem.getPayeeName()) .payeeTaxCode(elem.getPayeeTaxCode()) @@ -50,7 +56,7 @@ public ResponseEntity getPaidNotices(String fiscalCode, String return ResponseEntity.ok() .header(X_CONTINUATION_TOKEN, transactionListResponse.getContinuationToken()) - .body(PaidNoticesList.builder().paidNoticeList(paidNoticeList).build()); + .body(NoticeListWrapResponse.builder().notices(noticeListItemList).build()); } @Override diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/PaidNotice.java b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/NoticeListItem.java similarity index 56% rename from src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/PaidNotice.java rename to src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/NoticeListItem.java index 82dc7cc9..d2c2a923 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/PaidNotice.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/NoticeListItem.java @@ -2,11 +2,10 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import javax.validation.constraints.NotNull; import java.io.Serializable; /** @@ -17,14 +16,36 @@ @NoArgsConstructor @Builder @JsonInclude(Include.NON_NULL) -public class PaidNotice implements Serializable { +public class NoticeListItem implements Serializable { + + @Schema(required = true) + @NotNull private String eventId; + private String payeeName; + + @Schema(required = true) + @NotNull private String payeeTaxCode; + + @Schema(required = true) + @NotNull private String amount; + + @Schema(required = true) + @NotNull private String noticeDate; + + @Schema(required = true) + @NotNull private Boolean isCart; + + @Schema(required = true) + @NotNull private Boolean isPayer; + + @Schema(required = true) + @NotNull @Builder.Default private Boolean isDebtor = false; } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/PaidNoticesList.java b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/NoticeListWrapResponse.java similarity index 53% rename from src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/PaidNoticesList.java rename to src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/NoticeListWrapResponse.java index 7120b541..6dd4d5cf 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/PaidNoticesList.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/NoticeListWrapResponse.java @@ -1,14 +1,19 @@ package it.gov.pagopa.bizeventsservice.model.response.paidnotice; import com.fasterxml.jackson.annotation.JsonInclude; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Builder; import lombok.Data; +import javax.validation.constraints.NotNull; import java.util.List; @Builder @Data @JsonInclude(JsonInclude.Include.NON_NULL) -public class PaidNoticesList { - private List paidNoticeList; +public class NoticeListWrapResponse { + + @Schema(required = true) + @NotNull + private List notices; } diff --git a/src/test/java/it/gov/pagopa/bizeventsservice/controller/PaidNoticeControllerTest.java b/src/test/java/it/gov/pagopa/bizeventsservice/controller/NoticeListItemControllerTest.java similarity index 99% rename from src/test/java/it/gov/pagopa/bizeventsservice/controller/PaidNoticeControllerTest.java rename to src/test/java/it/gov/pagopa/bizeventsservice/controller/NoticeListItemControllerTest.java index ad1d96a8..8a837f0d 100644 --- a/src/test/java/it/gov/pagopa/bizeventsservice/controller/PaidNoticeControllerTest.java +++ b/src/test/java/it/gov/pagopa/bizeventsservice/controller/NoticeListItemControllerTest.java @@ -38,7 +38,7 @@ @SpringBootTest @AutoConfigureMockMvc -public class PaidNoticeControllerTest { +public class NoticeListItemControllerTest { public static final String INVALID_FISCAL_CODE = "INVALID_TX_FISCAL_CODE"; public static final String VALID_FISCAL_CODE = "AAAAAA00A00A000A"; From 51396264cb50c95686d42f584e455e057a64400b Mon Sep 17 00:00:00 2001 From: Jacopo Carlini Date: Thu, 5 Sep 2024 12:17:58 +0200 Subject: [PATCH 3/6] revert name --- ...istItemControllerTest.java => PaidNoticeControllerTest.java} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename src/test/java/it/gov/pagopa/bizeventsservice/controller/{NoticeListItemControllerTest.java => PaidNoticeControllerTest.java} (99%) diff --git a/src/test/java/it/gov/pagopa/bizeventsservice/controller/NoticeListItemControllerTest.java b/src/test/java/it/gov/pagopa/bizeventsservice/controller/PaidNoticeControllerTest.java similarity index 99% rename from src/test/java/it/gov/pagopa/bizeventsservice/controller/NoticeListItemControllerTest.java rename to src/test/java/it/gov/pagopa/bizeventsservice/controller/PaidNoticeControllerTest.java index 8a837f0d..ad1d96a8 100644 --- a/src/test/java/it/gov/pagopa/bizeventsservice/controller/NoticeListItemControllerTest.java +++ b/src/test/java/it/gov/pagopa/bizeventsservice/controller/PaidNoticeControllerTest.java @@ -38,7 +38,7 @@ @SpringBootTest @AutoConfigureMockMvc -public class NoticeListItemControllerTest { +public class PaidNoticeControllerTest { public static final String INVALID_FISCAL_CODE = "INVALID_TX_FISCAL_CODE"; public static final String VALID_FISCAL_CODE = "AAAAAA00A00A000A"; From 5b6b31ed0de8e56a1f96e466b0cf909a6307badb Mon Sep 17 00:00:00 2001 From: Jacopo Carlini Date: Thu, 5 Sep 2024 14:33:56 +0200 Subject: [PATCH 4/6] convert method added --- .../controller/impl/PaidNoticeController.java | 18 ++---------------- ...onvertViewsToTransactionDetailResponse.java | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/controller/impl/PaidNoticeController.java b/src/main/java/it/gov/pagopa/bizeventsservice/controller/impl/PaidNoticeController.java index a76d61c6..12fc0b55 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/controller/impl/PaidNoticeController.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/controller/impl/PaidNoticeController.java @@ -2,7 +2,6 @@ import it.gov.pagopa.bizeventsservice.controller.IPaidNoticeController; import it.gov.pagopa.bizeventsservice.model.filterandorder.Order; -import it.gov.pagopa.bizeventsservice.model.response.paidnotice.NoticeListItem; import it.gov.pagopa.bizeventsservice.model.response.paidnotice.NoticeListWrapResponse; import it.gov.pagopa.bizeventsservice.model.response.transaction.TransactionListResponse; import it.gov.pagopa.bizeventsservice.service.ITransactionService; @@ -12,7 +11,7 @@ import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.RestController; -import java.util.List; +import static it.gov.pagopa.bizeventsservice.mapper.ConvertViewsToTransactionDetailResponse.convertToNoticeList; /** * Implementation of {@link IPaidNoticeController} that contains the Rest Controller @@ -41,22 +40,9 @@ public ResponseEntity getPaidNotices(String fiscalCode, continuationToken, size, orderBy, ordering); - List noticeListItemList = transactionListResponse.getTransactionList().stream() - .map(elem -> NoticeListItem.builder() - .eventId(elem.getTransactionId()) - .payeeName(elem.getPayeeName()) - .payeeTaxCode(elem.getPayeeTaxCode()) - .amount(elem.getAmount()) - .noticeDate(elem.getTransactionDate()) - .isCart(elem.getIsCart()) - .isPayer(elem.getIsPayer()) - .isDebtor(elem.getIsDebtor()) - .build()) - .toList(); - return ResponseEntity.ok() .header(X_CONTINUATION_TOKEN, transactionListResponse.getContinuationToken()) - .body(NoticeListWrapResponse.builder().notices(noticeListItemList).build()); + .body(NoticeListWrapResponse.builder().notices(convertToNoticeList(transactionListResponse)).build()); } @Override diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/mapper/ConvertViewsToTransactionDetailResponse.java b/src/main/java/it/gov/pagopa/bizeventsservice/mapper/ConvertViewsToTransactionDetailResponse.java index 053c4978..0eacf5d5 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/mapper/ConvertViewsToTransactionDetailResponse.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/mapper/ConvertViewsToTransactionDetailResponse.java @@ -3,6 +3,7 @@ import it.gov.pagopa.bizeventsservice.entity.view.BizEventsViewCart; import it.gov.pagopa.bizeventsservice.entity.view.BizEventsViewGeneral; import it.gov.pagopa.bizeventsservice.entity.view.BizEventsViewUser; +import it.gov.pagopa.bizeventsservice.model.response.paidnotice.NoticeListItem; import it.gov.pagopa.bizeventsservice.model.response.transaction.CartItem; import it.gov.pagopa.bizeventsservice.model.response.transaction.InfoTransactionView; import it.gov.pagopa.bizeventsservice.util.DateValidator; @@ -79,6 +80,22 @@ public static TransactionDetailResponse convertTransactionDetails(String taxCode .build(); } + public static List convertToNoticeList(TransactionListResponse transactionListResponse) { + return transactionListResponse.getTransactionList().stream() + .map(elem -> NoticeListItem.builder() + .eventId(elem.getTransactionId()) + .payeeName(elem.getPayeeName()) + .payeeTaxCode(elem.getPayeeTaxCode()) + .amount(elem.getAmount()) + .noticeDate(elem.getTransactionDate()) + .isCart(elem.getIsCart()) + .isPayer(elem.getIsPayer()) + .isDebtor(elem.getIsDebtor()) + .build()) + .toList(); + } + + public static TransactionListItem convertTransactionListItem(BizEventsViewUser viewUser, List listOfCartViews){ AtomicReference totalAmount = new AtomicReference<>(BigDecimal.ZERO); for (BizEventsViewCart bizEventsViewCart : listOfCartViews) { From a53a21b3e0a08c5562f1b599fa001dd852246d78 Mon Sep 17 00:00:00 2001 From: Jacopo Carlini Date: Thu, 5 Sep 2024 14:36:45 +0200 Subject: [PATCH 5/6] merge --- openapi/openapi.json | 3781 +++++++++-------- openapi/openapi_ec.json | 1081 +++-- openapi/openapi_helpdesk.json | 1438 +++---- openapi/openapi_io.json | 1379 +++--- .../controller/impl/PaidNoticeController.java | 7 +- 5 files changed, 3757 insertions(+), 3929 deletions(-) diff --git a/openapi/openapi.json b/openapi/openapi.json index 7c33f491..97e6a67a 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -1,2585 +1,2594 @@ { - "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.52" + "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.52" }, - "servers": [ - { - "url": "http://localhost", - "description": "Generated server url" - } - ], - "paths": { - "/events/organizations/{organization-fiscal-code}/iuvs/{iuv}": { - "get": { - "tags": [ - "Biz-Events Helpdesk" - ], - "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" + "servers" : [ { + "url" : "http://localhost", + "description" : "Generated server url" + } ], + "paths" : { + "/events/organizations/{organization-fiscal-code}/iuvs/{iuv}" : { + "get" : { + "tags" : [ "Biz-Events Helpdesk" ], + "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" + "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" + "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" + "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" + "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" + "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" + "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" + "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" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "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.", - "required": false, - "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.", + "required" : false, + "schema" : { + "type" : "string" } - ] + } ] }, - "/events/{biz-event-id}": { - "get": { - "tags": [ - "Biz-Events Helpdesk" - ], - "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/{biz-event-id}" : { + "get" : { + "tags" : [ "Biz-Events Helpdesk" ], + "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" + "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" + "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" + "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" + "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" + "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" + "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" + "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" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "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.", - "required": false, - "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.", + "required" : false, + "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" + "/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" + "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" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "401": { - "description": "Unauthorized", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "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" + "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" + "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" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "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.", - "required": false, - "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.", + "required" : false, + "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" + "/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" + "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" + "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" + "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" + "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" + "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" + "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" + "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" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "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.", - "required": false, - "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.", + "required" : false, + "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" + "/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" + "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" + "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" + "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" + "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" + "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" + "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" + "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" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "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.", - "required": false, - "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.", + "required" : false, + "schema" : { + "type" : "string" } - ] + } ] }, - "/paids/{event-id}": { - "get": { - "tags": [ - "Paid Notice REST APIs" - ], - "summary": "Retrieve the paid notice details given its id.", - "operationId": "getPaidNoticeDetail", - "parameters": [ - { - "name": "x-fiscal-code", - "in": "header", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "event-id", - "in": "path", - "description": "The id of the paid event.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Obtained paid notice detail.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "/paids" : { + "get" : { + "tags" : [ "Paid Notice REST APIs" ], + "summary" : "Retrieve the paged transaction list from biz events.", + "description" : "This operation is deprecated. Use Paid Notice APIs instead", + "operationId" : "getPaidNotices", + "parameters" : [ { + "name" : "x-fiscal-code", + "in" : "header", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "x-continuation-token", + "in" : "header", + "required" : false, + "schema" : { + "type" : "string" + } + }, { + "name" : "size", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 10 + } + }, { + "name" : "is_payer", + "in" : "query", + "description" : "Filter by payer", + "required" : false, + "schema" : { + "type" : "boolean" + } + }, { + "name" : "is_debtor", + "in" : "query", + "description" : "Filter by debtor", + "required" : false, + "schema" : { + "type" : "boolean" + } + }, { + "name" : "orderby", + "in" : "query", + "description" : "Order by TRANSACTION_DATE", + "required" : false, + "schema" : { + "type" : "string", + "default" : "TRANSACTION_DATE", + "enum" : [ "TRANSACTION_DATE" ] + } + }, { + "name" : "ordering", + "in" : "query", + "description" : "Direction of ordering", + "required" : false, + "schema" : { + "type" : "string", + "default" : "DESC", + "enum" : [ "ASC", "DESC" ] + } + } ], + "responses" : { + "200" : { + "description" : "Obtained paid notices list.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" + } + }, + "x-continuation-token" : { + "description" : "continuation token for paginated query", + "style" : "simple", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NoticeDetailResponse" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/NoticeListWrapResponse" } } } }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "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 transaction.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "404" : { + "description" : "Not found the fiscal code.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "429": { - "description": "Too many requests.", - "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" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "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.", - "required": false, - "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.", + "required" : false, + "schema" : { + "type" : "string" } - ] + } ] }, - "/paids/{event-id}/disable": { - "post": { - "tags": [ - "Paid Notice REST APIs" - ], - "summary": "Disable the paid notice details given its id.", - "operationId": "disablePaidNotice", - "parameters": [ - { - "name": "x-fiscal-code", - "in": "header", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "event-id", - "in": "path", - "description": "The id of the paid event.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Event Disabled.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "/paids/{event-id}" : { + "get" : { + "tags" : [ "Paid Notice REST APIs" ], + "summary" : "Retrieve the paid notice details given its id.", + "operationId" : "getPaidNoticeDetail", + "parameters" : [ { + "name" : "x-fiscal-code", + "in" : "header", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "event-id", + "in" : "path", + "description" : "The id of the paid event.", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "200" : { + "description" : "Obtained paid notice detail.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": {} + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/NoticeDetailResponse" + } + } } }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "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 paid event.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "404" : { + "description" : "Not found the transaction.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "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" + "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" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "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.", - "required": false, - "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.", + "required" : false, + "schema" : { + "type" : "string" + } + } ] + }, + "/paids/{event-id}/disable" : { + "post" : { + "tags" : [ "Paid Notice REST APIs" ], + "summary" : "Disable the paid notice details given its id.", + "operationId" : "disablePaidNotice", + "parameters" : [ { + "name" : "x-fiscal-code", + "in" : "header", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "event-id", + "in" : "path", + "description" : "The id of the paid event.", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "200" : { + "description" : "Event Disabled.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { } + } + }, + "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 paid event.", + "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.", + "required" : false, + "schema" : { + "type" : "string" } - ] + } ] }, - "/transactions": { - "get": { - "tags": [ - "IO Transactions REST APIs" - ], - "summary": "Retrieve the paged transaction list from biz events.", - "operationId": "getTransactionList", - "parameters": [ - { - "name": "x-fiscal-code", - "in": "header", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "is_payer", - "in": "query", - "description": "Filter by payer", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_debtor", - "in": "query", - "description": "Filter by debtor", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "x-continuation-token", - "in": "header", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 10 - } - }, - { - "name": "orderby", - "in": "query", - "description": "Order by TRANSACTION_DATE", - "required": false, - "schema": { - "type": "string", - "default": "TRANSACTION_DATE", - "enum": [ - "TRANSACTION_DATE" - ] - } - }, - { - "name": "ordering", - "in": "query", - "description": "Direction of ordering", - "required": false, - "schema": { - "type": "string", - "default": "DESC", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], - "responses": { - "200": { - "description": "Obtained transaction list.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "/transactions" : { + "get" : { + "tags" : [ "IO Transactions REST APIs" ], + "summary" : "Retrieve the paged transaction list from biz events.", + "description" : "This operation is deprecated. Use Paid Notice APIs instead", + "operationId" : "getTransactionList", + "parameters" : [ { + "name" : "x-fiscal-code", + "in" : "header", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "is_payer", + "in" : "query", + "description" : "Filter by payer", + "required" : false, + "schema" : { + "type" : "boolean" + } + }, { + "name" : "is_debtor", + "in" : "query", + "description" : "Filter by debtor", + "required" : false, + "schema" : { + "type" : "boolean" + } + }, { + "name" : "x-continuation-token", + "in" : "header", + "required" : false, + "schema" : { + "type" : "string" + } + }, { + "name" : "size", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 10 + } + }, { + "name" : "orderby", + "in" : "query", + "description" : "Order by TRANSACTION_DATE", + "required" : false, + "schema" : { + "type" : "string", + "default" : "TRANSACTION_DATE", + "enum" : [ "TRANSACTION_DATE" ] + } + }, { + "name" : "ordering", + "in" : "query", + "description" : "Direction of ordering", + "required" : false, + "schema" : { + "type" : "string", + "default" : "DESC", + "enum" : [ "ASC", "DESC" ] + } + } ], + "responses" : { + "200" : { + "description" : "Obtained transaction list.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } }, - "x-continuation-token": { - "description": "continuation token for paginated query", - "style": "simple", - "schema": { - "type": "string" + "x-continuation-token" : { + "description" : "continuation token for paginated query", + "style" : "simple", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TransactionListWrapResponse" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/TransactionListWrapResponse" } } } }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "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 transaction.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "404" : { + "description" : "Not found the transaction.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "429": { - "description": "Too many requests.", - "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" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "deprecated" : true, + "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.", - "required": false, - "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.", + "required" : false, + "schema" : { + "type" : "string" } - ] + } ] }, - "/transactions/{event-id}/pdf": { - "get": { - "tags": [ - "IO Transactions REST APIs" - ], - "summary": "Retrieve the PDF receipt given event id.", - "operationId": "getPDFReceipt", - "parameters": [ - { - "name": "x-fiscal-code", - "in": "header", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "event-id", - "in": "path", - "description": "The id of the event.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Obtained the PDF receipt.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "/transactions/{event-id}/pdf" : { + "get" : { + "tags" : [ "IO Transactions REST APIs" ], + "summary" : "Retrieve the PDF receipt given event id.", + "operationId" : "getPDFReceipt", + "parameters" : [ { + "name" : "x-fiscal-code", + "in" : "header", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "event-id", + "in" : "path", + "description" : "The id of the event.", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "200" : { + "description" : "Obtained the PDF receipt.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/pdf": { - "schema": { - "type": "string", - "format": "binary" + "content" : { + "application/pdf" : { + "schema" : { + "type" : "string", + "format" : "binary" } } } }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "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" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "422": { - "description": "Unprocessable receipt.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "422" : { + "description" : "Unprocessable receipt.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "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" + "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" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "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.", - "required": false, - "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.", + "required" : false, + "schema" : { + "type" : "string" } - ] + } ] }, - "/transactions/{transaction-id}": { - "get": { - "tags": [ - "IO Transactions REST APIs" - ], - "summary": "Retrieve the transaction details given its id.", - "description": "This operation is deprecated. Use Paid Notice APIs instead", - "operationId": "getTransactionDetails", - "parameters": [ - { - "name": "x-fiscal-code", - "in": "header", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "transaction-id", - "in": "path", - "description": "The id of the transaction.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Obtained transaction details.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "/transactions/{transaction-id}" : { + "get" : { + "tags" : [ "IO Transactions REST APIs" ], + "summary" : "Retrieve the transaction details given its id.", + "description" : "This operation is deprecated. Use Paid Notice APIs instead", + "operationId" : "getTransactionDetails", + "parameters" : [ { + "name" : "x-fiscal-code", + "in" : "header", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "transaction-id", + "in" : "path", + "description" : "The id of the transaction.", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "200" : { + "description" : "Obtained transaction details.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TransactionDetailResponse" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/TransactionDetailResponse" } } } }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "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 transaction.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "404" : { + "description" : "Not found the transaction.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "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" + "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" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "deprecated": true, - "security": [ - { - "ApiKey": [] - } - ] + "deprecated" : true, + "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.", - "required": false, - "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.", + "required" : false, + "schema" : { + "type" : "string" } - ] + } ] }, - "/transactions/{transaction-id}/disable": { - "post": { - "tags": [ - "IO Transactions REST APIs" - ], - "summary": "Disable the transaction details given its id.", - "description": "This operation is deprecated. Use Paid Notice APIs instead", - "operationId": "disableTransaction", - "parameters": [ - { - "name": "x-fiscal-code", - "in": "header", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "transaction-id", - "in": "path", - "description": "The id of the transaction.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Disabled Transactions.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "/transactions/{transaction-id}/disable" : { + "post" : { + "tags" : [ "IO Transactions REST APIs" ], + "summary" : "Disable the transaction details given its id.", + "description" : "This operation is deprecated. Use Paid Notice APIs instead", + "operationId" : "disableTransaction", + "parameters" : [ { + "name" : "x-fiscal-code", + "in" : "header", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "transaction-id", + "in" : "path", + "description" : "The id of the transaction.", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "200" : { + "description" : "Disabled Transactions.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": {} + "content" : { + "application/json" : { } } }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "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 transaction.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "404" : { + "description" : "Not found the transaction.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "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" + "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" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "deprecated": true, - "security": [ - { - "ApiKey": [] - } - ] + "deprecated" : true, + "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.", - "required": false, - "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.", + "required" : false, + "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" + "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" } } }, - "PageInfo": { - "required": [ - "items_found", - "limit", - "page", - "total_pages" - ], - "type": "object", - "properties": { - "page": { - "type": "integer", - "description": "Page number", - "format": "int32" - }, - "limit": { - "type": "integer", - "description": "Required number of items per page", - "format": "int32" - }, - "items_found": { - "type": "integer", - "description": "Number of items found. (The last page may have fewer elements than required)", - "format": "int32" - }, - "total_pages": { - "type": "integer", - "description": "Total number of pages", - "format": "int32" + "PageInfo" : { + "required" : [ "items_found", "limit", "page", "total_pages" ], + "type" : "object", + "properties" : { + "page" : { + "type" : "integer", + "description" : "Page number", + "format" : "int32" + }, + "limit" : { + "type" : "integer", + "description" : "Required number of items per page", + "format" : "int32" + }, + "items_found" : { + "type" : "integer", + "description" : "Number of items found. (The last page may have fewer elements than required)", + "format" : "int32" + }, + "total_pages" : { + "type" : "integer", + "description" : "Total number of pages", + "format" : "int32" } } }, - "TransactionListItem": { - "type": "object", - "properties": { - "transactionId": { - "type": "string" + "TransactionListItem" : { + "type" : "object", + "properties" : { + "transactionId" : { + "type" : "string" }, - "payeeName": { - "type": "string" + "payeeName" : { + "type" : "string" }, - "payeeTaxCode": { - "type": "string" + "payeeTaxCode" : { + "type" : "string" }, - "amount": { - "type": "string" + "amount" : { + "type" : "string" }, - "transactionDate": { - "type": "string" + "transactionDate" : { + "type" : "string" }, - "isCart": { - "type": "boolean" + "isCart" : { + "type" : "boolean" }, - "isPayer": { - "type": "boolean" + "isPayer" : { + "type" : "boolean" }, - "isDebtor": { - "type": "boolean" + "isDebtor" : { + "type" : "boolean" } } }, - "TransactionListWrapResponse": { - "type": "object", - "properties": { - "transactions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransactionListItem" + "TransactionListWrapResponse" : { + "type" : "object", + "properties" : { + "transactions" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TransactionListItem" } }, - "page_info": { - "$ref": "#/components/schemas/PageInfo" + "page_info" : { + "$ref" : "#/components/schemas/PageInfo" } } }, - "CartItem": { - "required": [ - "amount", - "refNumberType", - "refNumberValue", - "subject" - ], - "type": "object", - "properties": { - "subject": { - "type": "string" + "CartItem" : { + "required" : [ "amount", "refNumberType", "refNumberValue", "subject" ], + "type" : "object", + "properties" : { + "subject" : { + "type" : "string" }, - "amount": { - "type": "string" + "amount" : { + "type" : "string" }, - "payee": { - "$ref": "#/components/schemas/UserDetail" + "payee" : { + "$ref" : "#/components/schemas/UserDetail" }, - "debtor": { - "$ref": "#/components/schemas/UserDetail" + "debtor" : { + "$ref" : "#/components/schemas/UserDetail" }, - "refNumberValue": { - "type": "string" + "refNumberValue" : { + "type" : "string" }, - "refNumberType": { - "type": "string" + "refNumberType" : { + "type" : "string" } } }, - "InfoTransactionView": { - "type": "object", - "properties": { - "transactionId": { - "type": "string" - }, - "authCode": { - "type": "string" - }, - "rrn": { - "type": "string" - }, - "transactionDate": { - "type": "string" - }, - "pspName": { - "type": "string" - }, - "walletInfo": { - "$ref": "#/components/schemas/WalletInfo" - }, - "paymentMethod": { - "type": "string", - "enum": [ - "BBT", - "BP", - "AD", - "CP", - "PO", - "OBEP", - "JIF", - "MYBK", - "PPAL", - "UNKNOWN" - ] - }, - "payer": { - "$ref": "#/components/schemas/UserDetail" - }, - "amount": { - "type": "string" - }, - "fee": { - "type": "string" - }, - "origin": { - "type": "string", - "enum": [ - "INTERNAL", - "PM", - "NDP001PROD", - "NDP002PROD", - "NDP003PROD", - "UNKNOWN" - ] + "InfoTransactionView" : { + "type" : "object", + "properties" : { + "transactionId" : { + "type" : "string" + }, + "authCode" : { + "type" : "string" + }, + "rrn" : { + "type" : "string" + }, + "transactionDate" : { + "type" : "string" + }, + "pspName" : { + "type" : "string" + }, + "walletInfo" : { + "$ref" : "#/components/schemas/WalletInfo" + }, + "paymentMethod" : { + "type" : "string", + "enum" : [ "BBT", "BP", "AD", "CP", "PO", "OBEP", "JIF", "MYBK", "PPAL", "UNKNOWN" ] + }, + "payer" : { + "$ref" : "#/components/schemas/UserDetail" + }, + "amount" : { + "type" : "string" + }, + "fee" : { + "type" : "string" + }, + "origin" : { + "type" : "string", + "enum" : [ "INTERNAL", "PM", "NDP001PROD", "NDP002PROD", "NDP003PROD", "UNKNOWN" ] } } }, - "TransactionDetailResponse": { - "type": "object", - "properties": { - "infoTransaction": { - "$ref": "#/components/schemas/InfoTransactionView" + "TransactionDetailResponse" : { + "type" : "object", + "properties" : { + "infoTransaction" : { + "$ref" : "#/components/schemas/InfoTransactionView" }, - "carts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CartItem" + "carts" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/CartItem" } } } }, - "UserDetail": { - "required": [ - "taxCode" - ], - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "taxCode": { - "type": "string" + "UserDetail" : { + "required" : [ "taxCode" ], + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "taxCode" : { + "type" : "string" } } }, - "WalletInfo": { - "type": "object", - "properties": { - "accountHolder": { - "type": "string" + "WalletInfo" : { + "type" : "object", + "properties" : { + "accountHolder" : { + "type" : "string" }, - "brand": { - "type": "string" + "brand" : { + "type" : "string" }, - "blurredNumber": { - "type": "string" + "blurredNumber" : { + "type" : "string" }, - "maskedEmail": { - "type": "string" + "maskedEmail" : { + "type" : "string" } } }, - "InfoNotice": { - "required": [ - "amount", - "eventId", - "noticeDate", - "origin", - "pspName", - "rrn" - ], - "type": "object", - "properties": { - "eventId": { - "type": "string" - }, - "authCode": { - "type": "string" - }, - "rrn": { - "type": "string" - }, - "noticeDate": { - "type": "string" - }, - "pspName": { - "type": "string" - }, - "walletInfo": { - "$ref": "#/components/schemas/WalletInfo" - }, - "paymentMethod": { - "type": "string", - "enum": [ - "BBT", - "BP", - "AD", - "CP", - "PO", - "OBEP", - "JIF", - "MYBK", - "PPAL", - "UNKNOWN" - ] - }, - "payer": { - "$ref": "#/components/schemas/UserDetail" - }, - "amount": { - "type": "string" - }, - "fee": { - "type": "string" - }, - "origin": { - "type": "string", - "enum": [ - "INTERNAL", - "PM", - "NDP001PROD", - "NDP002PROD", - "NDP003PROD", - "UNKNOWN" - ] + "NoticeListItem" : { + "required" : [ "amount", "eventId", "isCart", "isDebtor", "isPayer", "noticeDate", "payeeTaxCode" ], + "type" : "object", + "properties" : { + "eventId" : { + "type" : "string" + }, + "payeeName" : { + "type" : "string" + }, + "payeeTaxCode" : { + "type" : "string" + }, + "amount" : { + "type" : "string" + }, + "noticeDate" : { + "type" : "string" + }, + "isCart" : { + "type" : "boolean" + }, + "isPayer" : { + "type" : "boolean" + }, + "isDebtor" : { + "type" : "boolean" } } }, - "NoticeDetailResponse": { - "type": "object", - "properties": { - "infoNotice": { - "$ref": "#/components/schemas/InfoNotice" + "NoticeListWrapResponse" : { + "required" : [ "notices" ], + "type" : "object", + "properties" : { + "notices" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/NoticeListItem" + } + } + } + }, + "InfoNotice" : { + "required" : [ "amount", "eventId", "noticeDate", "origin", "pspName", "rrn" ], + "type" : "object", + "properties" : { + "eventId" : { + "type" : "string" + }, + "authCode" : { + "type" : "string" + }, + "rrn" : { + "type" : "string" + }, + "noticeDate" : { + "type" : "string" + }, + "pspName" : { + "type" : "string" + }, + "walletInfo" : { + "$ref" : "#/components/schemas/WalletInfo" + }, + "paymentMethod" : { + "type" : "string", + "enum" : [ "BBT", "BP", "AD", "CP", "PO", "OBEP", "JIF", "MYBK", "PPAL", "UNKNOWN" ] + }, + "payer" : { + "$ref" : "#/components/schemas/UserDetail" + }, + "amount" : { + "type" : "string" }, - "carts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CartItem" + "fee" : { + "type" : "string" + }, + "origin" : { + "type" : "string", + "enum" : [ "INTERNAL", "PM", "NDP001PROD", "NDP002PROD", "NDP003PROD", "UNKNOWN" ] + } + } + }, + "NoticeDetailResponse" : { + "type" : "object", + "properties" : { + "infoNotice" : { + "$ref" : "#/components/schemas/InfoNotice" + }, + "carts" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/CartItem" } } } }, - "CtReceiptModelResponse": { - "required": [ - "channelDescription", - "companyName", - "creditorReferenceId", - "debtor", - "description", - "fiscalCode", - "idChannel", - "idPSP", - "noticeNumber", - "outcome", - "paymentAmount", - "pspCompanyName", - "receiptId", - "transferList" - ], - "type": "object", - "properties": { - "receiptId": { - "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" + "noticeNumber" : { + "type" : "string" }, - "fiscalCode": { - "type": "string" + "fiscalCode" : { + "type" : "string" }, - "outcome": { - "type": "string" + "outcome" : { + "type" : "string" }, - "creditorReferenceId": { - "type": "string" + "creditorReferenceId" : { + "type" : "string" }, - "paymentAmount": { - "type": "number" + "paymentAmount" : { + "type" : "number" }, - "description": { - "type": "string" + "description" : { + "type" : "string" }, - "companyName": { - "type": "string" + "companyName" : { + "type" : "string" }, - "officeName": { - "type": "string" + "officeName" : { + "type" : "string" }, - "debtor": { - "$ref": "#/components/schemas/Debtor" + "debtor" : { + "$ref" : "#/components/schemas/Debtor" }, - "transferList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransferPA" + "transferList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TransferPA" } }, - "idPSP": { - "type": "string" + "idPSP" : { + "type" : "string" }, - "pspFiscalCode": { - "type": "string" + "pspFiscalCode" : { + "type" : "string" }, - "pspPartitaIVA": { - "type": "string" + "pspPartitaIVA" : { + "type" : "string" }, - "pspCompanyName": { - "type": "string" + "pspCompanyName" : { + "type" : "string" }, - "idChannel": { - "type": "string" + "idChannel" : { + "type" : "string" }, - "channelDescription": { - "type": "string" + "channelDescription" : { + "type" : "string" }, - "payer": { - "$ref": "#/components/schemas/Payer" + "payer" : { + "$ref" : "#/components/schemas/Payer" }, - "paymentMethod": { - "type": "string" + "paymentMethod" : { + "type" : "string" }, - "fee": { - "type": "number" + "fee" : { + "type" : "number" }, - "primaryCiIncurredFee": { - "type": "number" + "primaryCiIncurredFee" : { + "type" : "number" }, - "idBundle": { - "type": "string" + "idBundle" : { + "type" : "string" }, - "idCiBundle": { - "type": "string" + "idCiBundle" : { + "type" : "string" }, - "paymentDateTime": { - "type": "string", - "format": "date" + "paymentDateTime" : { + "type" : "string", + "format" : "date" }, - "applicationDate": { - "type": "string", - "format": "date" + "applicationDate" : { + "type" : "string", + "format" : "date" }, - "transferDate": { - "type": "string", - "format": "date" + "transferDate" : { + "type" : "string", + "format" : "date" }, - "metadata": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MapEntry" + "metadata" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/MapEntry" } } } }, - "Debtor": { - "type": "object", - "properties": { - "fullName": { - "type": "string" + "Debtor" : { + "type" : "object", + "properties" : { + "fullName" : { + "type" : "string" }, - "entityUniqueIdentifierType": { - "type": "string" + "entityUniqueIdentifierType" : { + "type" : "string" }, - "entityUniqueIdentifierValue": { - "type": "string" + "entityUniqueIdentifierValue" : { + "type" : "string" }, - "streetName": { - "type": "string" + "streetName" : { + "type" : "string" }, - "civicNumber": { - "type": "string" + "civicNumber" : { + "type" : "string" }, - "postalCode": { - "type": "string" + "postalCode" : { + "type" : "string" }, - "city": { - "type": "string" + "city" : { + "type" : "string" }, - "stateProvinceRegion": { - "type": "string" + "stateProvinceRegion" : { + "type" : "string" }, - "country": { - "type": "string" + "country" : { + "type" : "string" }, - "eMail": { - "type": "string" + "eMail" : { + "type" : "string" } } }, - "MapEntry": { - "type": "object", - "properties": { - "key": { - "type": "string" + "MapEntry" : { + "type" : "object", + "properties" : { + "key" : { + "type" : "string" }, - "value": { - "type": "string" + "value" : { + "type" : "string" } } }, - "Payer": { - "type": "object", - "properties": { - "fullName": { - "type": "string" + "Payer" : { + "type" : "object", + "properties" : { + "fullName" : { + "type" : "string" }, - "entityUniqueIdentifierType": { - "type": "string" + "entityUniqueIdentifierType" : { + "type" : "string" }, - "entityUniqueIdentifierValue": { - "type": "string" + "entityUniqueIdentifierValue" : { + "type" : "string" }, - "streetName": { - "type": "string" + "streetName" : { + "type" : "string" }, - "civicNumber": { - "type": "string" + "civicNumber" : { + "type" : "string" }, - "postalCode": { - "type": "string" + "postalCode" : { + "type" : "string" }, - "city": { - "type": "string" + "city" : { + "type" : "string" }, - "stateProvinceRegion": { - "type": "string" + "stateProvinceRegion" : { + "type" : "string" }, - "country": { - "type": "string" + "country" : { + "type" : "string" }, - "eMail": { - "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" + "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" + "AppInfo" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" }, - "version": { - "type": "string" + "version" : { + "type" : "string" }, - "environment": { - "type": "string" + "environment" : { + "type" : "string" } } }, - "AuthRequest": { - "type": "object", - "properties": { - "authOutcome": { - "type": "string" + "AuthRequest" : { + "type" : "object", + "properties" : { + "authOutcome" : { + "type" : "string" }, - "guid": { - "type": "string" + "guid" : { + "type" : "string" }, - "correlationId": { - "type": "string" + "correlationId" : { + "type" : "string" }, - "error": { - "type": "string" + "error" : { + "type" : "string" }, - "auth_code": { - "type": "string" + "auth_code" : { + "type" : "string" } } }, - "BizEvent": { - "type": "object", - "properties": { - "id": { - "type": "string" + "BizEvent" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "string" }, - "version": { - "type": "string" + "version" : { + "type" : "string" }, - "idPaymentManager": { - "type": "string" + "idPaymentManager" : { + "type" : "string" }, - "complete": { - "type": "string" + "complete" : { + "type" : "string" }, - "receiptId": { - "type": "string" + "receiptId" : { + "type" : "string" }, - "missingInfo": { - "type": "array", - "items": { - "type": "string" + "missingInfo" : { + "type" : "array", + "items" : { + "type" : "string" } }, - "debtorPosition": { - "$ref": "#/components/schemas/DebtorPosition" + "debtorPosition" : { + "$ref" : "#/components/schemas/DebtorPosition" }, - "creditor": { - "$ref": "#/components/schemas/Creditor" + "creditor" : { + "$ref" : "#/components/schemas/Creditor" }, - "psp": { - "$ref": "#/components/schemas/Psp" + "psp" : { + "$ref" : "#/components/schemas/Psp" }, - "debtor": { - "$ref": "#/components/schemas/Debtor" + "debtor" : { + "$ref" : "#/components/schemas/Debtor" }, - "payer": { - "$ref": "#/components/schemas/Payer" + "payer" : { + "$ref" : "#/components/schemas/Payer" }, - "paymentInfo": { - "$ref": "#/components/schemas/PaymentInfo" + "paymentInfo" : { + "$ref" : "#/components/schemas/PaymentInfo" }, - "transferList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Transfer" + "transferList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Transfer" } }, - "transactionDetails": { - "$ref": "#/components/schemas/TransactionDetails" + "transactionDetails" : { + "$ref" : "#/components/schemas/TransactionDetails" }, - "eventStatus": { - "type": "string", - "enum": [ - "NA", - "RETRY", - "FAILED", - "DONE", - "INGESTED" - ] + "eventStatus" : { + "type" : "string", + "enum" : [ "NA", "RETRY", "FAILED", "DONE", "INGESTED" ] }, - "eventRetryEnrichmentCount": { - "type": "integer", - "format": "int32" + "eventRetryEnrichmentCount" : { + "type" : "integer", + "format" : "int32" } } }, - "Creditor": { - "type": "object", - "properties": { - "idPA": { - "type": "string" + "Creditor" : { + "type" : "object", + "properties" : { + "idPA" : { + "type" : "string" }, - "idBrokerPA": { - "type": "string" + "idBrokerPA" : { + "type" : "string" }, - "idStation": { - "type": "string" + "idStation" : { + "type" : "string" }, - "companyName": { - "type": "string" + "companyName" : { + "type" : "string" }, - "officeName": { - "type": "string" + "officeName" : { + "type" : "string" } } }, - "DebtorPosition": { - "type": "object", - "properties": { - "modelType": { - "type": "string" + "DebtorPosition" : { + "type" : "object", + "properties" : { + "modelType" : { + "type" : "string" }, - "noticeNumber": { - "type": "string" + "noticeNumber" : { + "type" : "string" }, - "iuv": { - "type": "string" + "iuv" : { + "type" : "string" }, - "iur": { - "type": "string" + "iur" : { + "type" : "string" } } }, - "Details": { - "type": "object", - "properties": { - "blurredNumber": { - "type": "string" + "Details" : { + "type" : "object", + "properties" : { + "blurredNumber" : { + "type" : "string" }, - "holder": { - "type": "string" + "holder" : { + "type" : "string" }, - "circuit": { - "type": "string" + "circuit" : { + "type" : "string" } } }, - "Info": { - "type": "object", - "properties": { - "type": { - "type": "string" + "Info" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string" }, - "blurredNumber": { - "type": "string" + "blurredNumber" : { + "type" : "string" }, - "holder": { - "type": "string" + "holder" : { + "type" : "string" }, - "expireMonth": { - "type": "string" + "expireMonth" : { + "type" : "string" }, - "expireYear": { - "type": "string" + "expireYear" : { + "type" : "string" }, - "brand": { - "type": "string" + "brand" : { + "type" : "string" }, - "issuerAbi": { - "type": "string" + "issuerAbi" : { + "type" : "string" }, - "issuerName": { - "type": "string" + "issuerName" : { + "type" : "string" }, - "label": { - "type": "string" + "label" : { + "type" : "string" } } }, - "InfoTransaction": { - "type": "object", - "properties": { - "brand": { - "type": "string" + "InfoTransaction" : { + "type" : "object", + "properties" : { + "brand" : { + "type" : "string" }, - "brandLogo": { - "type": "string" + "brandLogo" : { + "type" : "string" }, - "clientId": { - "type": "string" + "clientId" : { + "type" : "string" }, - "paymentMethodName": { - "type": "string" + "paymentMethodName" : { + "type" : "string" }, - "type": { - "type": "string" + "type" : { + "type" : "string" } } }, - "MBD": { - "type": "object", - "properties": { - "IUBD": { - "type": "string" + "MBD" : { + "type" : "object", + "properties" : { + "IUBD" : { + "type" : "string" }, - "oraAcquisto": { - "type": "string" + "oraAcquisto" : { + "type" : "string" }, - "importo": { - "type": "string" + "importo" : { + "type" : "string" }, - "tipoBollo": { - "type": "string" + "tipoBollo" : { + "type" : "string" }, - "MBDAttachment": { - "type": "string" + "MBDAttachment" : { + "type" : "string" } } }, - "PaymentAuthorizationRequest": { - "type": "object", - "properties": { - "authOutcome": { - "type": "string" + "PaymentAuthorizationRequest" : { + "type" : "object", + "properties" : { + "authOutcome" : { + "type" : "string" }, - "requestId": { - "type": "string" + "requestId" : { + "type" : "string" }, - "correlationId": { - "type": "string" + "correlationId" : { + "type" : "string" }, - "authCode": { - "type": "string" + "authCode" : { + "type" : "string" }, - "paymentMethodType": { - "type": "string" + "paymentMethodType" : { + "type" : "string" }, - "details": { - "$ref": "#/components/schemas/Details" + "details" : { + "$ref" : "#/components/schemas/Details" } } }, - "PaymentInfo": { - "type": "object", - "properties": { - "paymentDateTime": { - "type": "string" + "PaymentInfo" : { + "type" : "object", + "properties" : { + "paymentDateTime" : { + "type" : "string" }, - "applicationDate": { - "type": "string" + "applicationDate" : { + "type" : "string" }, - "transferDate": { - "type": "string" + "transferDate" : { + "type" : "string" }, - "dueDate": { - "type": "string" + "dueDate" : { + "type" : "string" }, - "paymentToken": { - "type": "string" + "paymentToken" : { + "type" : "string" }, - "amount": { - "type": "string" + "amount" : { + "type" : "string" }, - "fee": { - "type": "string" + "fee" : { + "type" : "string" }, - "primaryCiIncurredFee": { - "type": "string" + "primaryCiIncurredFee" : { + "type" : "string" }, - "idBundle": { - "type": "string" + "idBundle" : { + "type" : "string" }, - "idCiBundle": { - "type": "string" + "idCiBundle" : { + "type" : "string" }, - "totalNotice": { - "type": "string" + "totalNotice" : { + "type" : "string" }, - "paymentMethod": { - "type": "string" + "paymentMethod" : { + "type" : "string" }, - "touchpoint": { - "type": "string" + "touchpoint" : { + "type" : "string" }, - "remittanceInformation": { - "type": "string" + "remittanceInformation" : { + "type" : "string" }, - "description": { - "type": "string" + "description" : { + "type" : "string" }, - "metadata": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MapEntry" + "metadata" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/MapEntry" } }, - "IUR": { - "type": "string" + "IUR" : { + "type" : "string" } } }, - "Psp": { - "type": "object", - "properties": { - "idPsp": { - "type": "string" + "Psp" : { + "type" : "object", + "properties" : { + "idPsp" : { + "type" : "string" }, - "idBrokerPsp": { - "type": "string" + "idBrokerPsp" : { + "type" : "string" }, - "idChannel": { - "type": "string" + "idChannel" : { + "type" : "string" }, - "psp": { - "type": "string" + "psp" : { + "type" : "string" }, - "pspPartitaIVA": { - "type": "string" + "pspPartitaIVA" : { + "type" : "string" }, - "pspFiscalCode": { - "type": "string" + "pspFiscalCode" : { + "type" : "string" }, - "channelDescription": { - "type": "string" + "channelDescription" : { + "type" : "string" } } }, - "Transaction": { - "type": "object", - "properties": { - "idTransaction": { - "type": "string" + "Transaction" : { + "type" : "object", + "properties" : { + "idTransaction" : { + "type" : "string" }, - "transactionId": { - "type": "string" + "transactionId" : { + "type" : "string" }, - "grandTotal": { - "type": "integer", - "format": "int64" + "grandTotal" : { + "type" : "integer", + "format" : "int64" }, - "amount": { - "type": "integer", - "format": "int64" + "amount" : { + "type" : "integer", + "format" : "int64" }, - "fee": { - "type": "integer", - "format": "int64" + "fee" : { + "type" : "integer", + "format" : "int64" }, - "transactionStatus": { - "type": "string" + "transactionStatus" : { + "type" : "string" }, - "accountingStatus": { - "type": "string" + "accountingStatus" : { + "type" : "string" }, - "rrn": { - "type": "string" + "rrn" : { + "type" : "string" }, - "authorizationCode": { - "type": "string" + "authorizationCode" : { + "type" : "string" }, - "creationDate": { - "type": "string" + "creationDate" : { + "type" : "string" }, - "numAut": { - "type": "string" + "numAut" : { + "type" : "string" }, - "accountCode": { - "type": "string" + "accountCode" : { + "type" : "string" }, - "psp": { - "$ref": "#/components/schemas/TransactionPsp" + "psp" : { + "$ref" : "#/components/schemas/TransactionPsp" }, - "origin": { - "type": "string" + "origin" : { + "type" : "string" } } }, - "TransactionDetails": { - "type": "object", - "properties": { - "user": { - "$ref": "#/components/schemas/User" + "TransactionDetails" : { + "type" : "object", + "properties" : { + "user" : { + "$ref" : "#/components/schemas/User" }, - "paymentAuthorizationRequest": { - "$ref": "#/components/schemas/PaymentAuthorizationRequest" + "paymentAuthorizationRequest" : { + "$ref" : "#/components/schemas/PaymentAuthorizationRequest" }, - "wallet": { - "$ref": "#/components/schemas/WalletItem" + "wallet" : { + "$ref" : "#/components/schemas/WalletItem" }, - "origin": { - "type": "string" + "origin" : { + "type" : "string" }, - "transaction": { - "$ref": "#/components/schemas/Transaction" + "transaction" : { + "$ref" : "#/components/schemas/Transaction" }, - "info": { - "$ref": "#/components/schemas/InfoTransaction" + "info" : { + "$ref" : "#/components/schemas/InfoTransaction" } } }, - "TransactionPsp": { - "type": "object", - "properties": { - "idChannel": { - "type": "string" + "TransactionPsp" : { + "type" : "object", + "properties" : { + "idChannel" : { + "type" : "string" }, - "businessName": { - "type": "string" + "businessName" : { + "type" : "string" }, - "serviceName": { - "type": "string" + "serviceName" : { + "type" : "string" } } }, - "Transfer": { - "type": "object", - "properties": { - "idTransfer": { - "type": "string" + "Transfer" : { + "type" : "object", + "properties" : { + "idTransfer" : { + "type" : "string" }, - "fiscalCodePA": { - "type": "string" + "fiscalCodePA" : { + "type" : "string" }, - "companyName": { - "type": "string" + "companyName" : { + "type" : "string" }, - "amount": { - "type": "string" + "amount" : { + "type" : "string" }, - "transferCategory": { - "type": "string" + "transferCategory" : { + "type" : "string" }, - "remittanceInformation": { - "type": "string" + "remittanceInformation" : { + "type" : "string" }, - "metadata": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MapEntry" + "metadata" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/MapEntry" } }, - "IBAN": { - "type": "string" + "IBAN" : { + "type" : "string" }, - "MBD": { - "$ref": "#/components/schemas/MBD" + "MBD" : { + "$ref" : "#/components/schemas/MBD" } } }, - "User": { - "type": "object", - "properties": { - "fullName": { - "type": "string" + "User" : { + "type" : "object", + "properties" : { + "fullName" : { + "type" : "string" }, - "type": { - "type": "string", - "enum": [ - "F", - "G", - "GUEST", - "REGISTERED" - ] + "type" : { + "type" : "string", + "enum" : [ "F", "G", "GUEST", "REGISTERED" ] }, - "fiscalCode": { - "type": "string" + "fiscalCode" : { + "type" : "string" }, - "notificationEmail": { - "type": "string" + "notificationEmail" : { + "type" : "string" }, - "userId": { - "type": "string" + "userId" : { + "type" : "string" }, - "userStatus": { - "type": "string" + "userStatus" : { + "type" : "string" }, - "userStatusDescription": { - "type": "string" + "userStatusDescription" : { + "type" : "string" } } }, - "WalletItem": { - "type": "object", - "properties": { - "idWallet": { - "type": "string" + "WalletItem" : { + "type" : "object", + "properties" : { + "idWallet" : { + "type" : "string" }, - "walletType": { - "type": "string", - "enum": [ - "CARD", - "PAYPAL", - "BANCOMATPAY" - ] + "walletType" : { + "type" : "string", + "enum" : [ "CARD", "PAYPAL", "BANCOMATPAY" ] }, - "enableableFunctions": { - "type": "array", - "items": { - "type": "string" + "enableableFunctions" : { + "type" : "array", + "items" : { + "type" : "string" } }, - "pagoPa": { - "type": "boolean" + "pagoPa" : { + "type" : "boolean" }, - "onboardingChannel": { - "type": "string" + "onboardingChannel" : { + "type" : "string" }, - "favourite": { - "type": "boolean" + "favourite" : { + "type" : "boolean" }, - "createDate": { - "type": "string" + "createDate" : { + "type" : "string" }, - "info": { - "$ref": "#/components/schemas/Info" + "info" : { + "$ref" : "#/components/schemas/Info" }, - "authRequest": { - "$ref": "#/components/schemas/AuthRequest" + "authRequest" : { + "$ref" : "#/components/schemas/AuthRequest" } } } }, - "securitySchemes": { - "ApiKey": { - "type": "apiKey", - "description": "The API key to access this function app.", - "name": "Ocp-Apim-Subscription-Key", - "in": "header" + "securitySchemes" : { + "ApiKey" : { + "type" : "apiKey", + "description" : "The API key to access this function app.", + "name" : "Ocp-Apim-Subscription-Key", + "in" : "header" } } } -} +} \ No newline at end of file diff --git a/openapi/openapi_ec.json b/openapi/openapi_ec.json index 0d7a837e..496056e0 100644 --- a/openapi/openapi_ec.json +++ b/openapi/openapi_ec.json @@ -1,724 +1,661 @@ { - "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.52" + "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.52" }, - "servers": [ - { - "url": "http://localhost", - "description": "Generated server url" - } - ], - "paths": { - "/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" - } + "servers" : [ { + "url" : "http://localhost", + "description" : "Generated server url" + } ], + "paths" : { + "/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" + } ], + "responses" : { + "429" : { + "description" : "Too many requests.", + "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" } } } }, - "422": { - "description": "Unable to process the request.", - "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" - } - } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "500": { - "description": "Service unavailable.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "200" : { + "description" : "Obtained receipt.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CtReceiptModelResponse" } } } }, - "404": { - "description": "Not found the receipt.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "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" + "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" + "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" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "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.", - "required": false, - "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.", + "required" : false, + "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" - } + "/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" } - ], - "responses": { - "200": { - "description": "Obtained receipt.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "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" : { + "429" : { + "description" : "Too many requests.", + "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" } } } }, - "422": { - "description": "Unable to process the request.", - "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "401": { - "description": "Wrong or missing function key.", - "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" + "200" : { + "description" : "Obtained receipt.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CtReceiptModelResponse" } } } }, - "404": { - "description": "Not found the receipt.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "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" + "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" + "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" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "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.", - "required": false, - "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.", + "required" : false, + "schema" : { + "type" : "string" } - ] + } ] }, - "/info": { - "get": { - "tags": [ - "Home" - ], - "summary": "health check", - "description": "Return OK if application is started", - "operationId": "healthCheck", - "responses": { - "429": { - "description": "Too many requests", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "/info" : { + "get" : { + "tags" : [ "Home" ], + "summary" : "health check", + "description" : "Return OK if application is started", + "operationId" : "healthCheck", + "responses" : { + "500" : { + "description" : "Service unavailable", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } - } - }, - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppInfo" + } + }, + "403" : { + "description" : "Forbidden", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "400": { - "description": "Bad Request", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "500": { - "description": "Service unavailable", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "200" : { + "description" : "OK", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppInfo" } } } }, - "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" } } } }, - "401": { - "description": "Unauthorized", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "401" : { + "description" : "Unauthorized", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "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.", - "required": false, - "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.", + "required" : false, + "schema" : { + "type" : "string" } - ] + } ] } }, - "components": { - "schemas": { - "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" + "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" + "idPSP" : { + "type" : "string" }, - "pspFiscalCode": { - "type": "string" + "pspFiscalCode" : { + "type" : "string" }, - "pspPartitaIVA": { - "type": "string" + "pspPartitaIVA" : { + "type" : "string" }, - "pspCompanyName": { - "type": "string" + "pspCompanyName" : { + "type" : "string" }, - "idChannel": { - "type": "string" + "idChannel" : { + "type" : "string" }, - "channelDescription": { - "type": "string" + "channelDescription" : { + "type" : "string" }, - "payer": { - "$ref": "#/components/schemas/Payer" + "payer" : { + "$ref" : "#/components/schemas/Payer" }, - "paymentMethod": { - "type": "string" + "paymentMethod" : { + "type" : "string" }, - "fee": { - "type": "number" + "fee" : { + "type" : "number" }, - "primaryCiIncurredFee": { - "type": "number" + "primaryCiIncurredFee" : { + "type" : "number" }, - "idBundle": { - "type": "string" + "idBundle" : { + "type" : "string" }, - "idCiBundle": { - "type": "string" + "idCiBundle" : { + "type" : "string" }, - "paymentDateTime": { - "type": "string", - "format": "date" + "paymentDateTime" : { + "type" : "string", + "format" : "date" }, - "applicationDate": { - "type": "string", - "format": "date" + "applicationDate" : { + "type" : "string", + "format" : "date" }, - "transferDate": { - "type": "string", - "format": "date" + "transferDate" : { + "type" : "string", + "format" : "date" }, - "metadata": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MapEntry" + "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" + "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" + "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" + "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" + "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" } } } }, - "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" - } - } - }, - "AppInfo": { - "type": "object", - "properties": { - "name": { - "type": "string" + "AppInfo" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" }, - "version": { - "type": "string" + "version" : { + "type" : "string" }, - "environment": { - "type": "string" + "environment" : { + "type" : "string" } } } }, - "securitySchemes": { - "ApiKey": { - "type": "apiKey", - "description": "The API key to access this function app.", - "name": "Ocp-Apim-Subscription-Key", - "in": "header" + "securitySchemes" : { + "ApiKey" : { + "type" : "apiKey", + "description" : "The API key to access this function app.", + "name" : "Ocp-Apim-Subscription-Key", + "in" : "header" } } } -} +} \ No newline at end of file diff --git a/openapi/openapi_helpdesk.json b/openapi/openapi_helpdesk.json index ab63917f..e8cb9ba9 100644 --- a/openapi/openapi_helpdesk.json +++ b/openapi/openapi_helpdesk.json @@ -1,1046 +1,1006 @@ { - "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.52" + "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.52" }, - "servers": [ - { - "url": "http://localhost", - "description": "Generated server url" - } - ], - "paths": { - "/info": { - "get": { - "tags": [ - "Home" - ], - "summary": "health check", - "description": "Return OK if application is started", - "operationId": "healthCheck", - "responses": { - "429": { - "description": "Too many requests", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "servers" : [ { + "url" : "http://localhost", + "description" : "Generated server url" + } ], + "paths" : { + "/info" : { + "get" : { + "tags" : [ "Home" ], + "summary" : "health check", + "description" : "Return OK if application is started", + "operationId" : "healthCheck", + "responses" : { + "500" : { + "description" : "Service unavailable", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } - } - }, - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppInfo" + } + }, + "403" : { + "description" : "Forbidden", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "400": { - "description": "Bad Request", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "500": { - "description": "Service unavailable", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "200" : { + "description" : "OK", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppInfo" } } } }, - "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" } } } }, - "401": { - "description": "Unauthorized", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "401" : { + "description" : "Unauthorized", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "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.", - "required": false, - "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.", + "required" : false, + "schema" : { + "type" : "string" } - ] + } ] }, - "/events/{biz-event-id}": { - "get": { - "tags": [ - "Biz-Events Helpdesk" - ], - "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": { - "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" + "/events/{biz-event-id}" : { + "get" : { + "tags" : [ "Biz-Events Helpdesk" ], + "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" : { + "429" : { + "description" : "Too many requests.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "401" : { + "description" : "Wrong or missing function key.", + "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" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "200": { - "description": "Obtained biz-event.", - "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/BizEvent" + "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" + "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" } } } }, - "404": { - "description": "Not found the biz-event.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "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.", - "required": false, - "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.", + "required" : false, + "schema" : { + "type" : "string" } - ] + } ] }, - "/events/organizations/{organization-fiscal-code}/iuvs/{iuv}": { - "get": { - "tags": [ - "Biz-Events Helpdesk" - ], - "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": { - "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" + "/events/organizations/{organization-fiscal-code}/iuvs/{iuv}" : { + "get" : { + "tags" : [ "Biz-Events Helpdesk" ], + "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" : { + "429" : { + "description" : "Too many requests.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "401" : { + "description" : "Wrong or missing function key.", + "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" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "200": { - "description": "Obtained biz-event.", - "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/BizEvent" + "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" + "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" } } } }, - "404": { - "description": "Not found the biz-event.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "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.", - "required": false, - "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.", + "required" : false, + "schema" : { + "type" : "string" } - ] + } ] } }, - "components": { - "schemas": { - "AppInfo": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "version": { - "type": "string" - }, - "environment": { - "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" } } }, - "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" + "AppInfo" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "version" : { + "type" : "string" + }, + "environment" : { + "type" : "string" } } }, - "AuthRequest": { - "type": "object", - "properties": { - "authOutcome": { - "type": "string" + "AuthRequest" : { + "type" : "object", + "properties" : { + "authOutcome" : { + "type" : "string" }, - "guid": { - "type": "string" + "guid" : { + "type" : "string" }, - "correlationId": { - "type": "string" + "correlationId" : { + "type" : "string" }, - "error": { - "type": "string" + "error" : { + "type" : "string" }, - "auth_code": { - "type": "string" + "auth_code" : { + "type" : "string" } } }, - "BizEvent": { - "type": "object", - "properties": { - "id": { - "type": "string" + "BizEvent" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "string" }, - "version": { - "type": "string" + "version" : { + "type" : "string" }, - "idPaymentManager": { - "type": "string" + "idPaymentManager" : { + "type" : "string" }, - "complete": { - "type": "string" + "complete" : { + "type" : "string" }, - "receiptId": { - "type": "string" + "receiptId" : { + "type" : "string" }, - "missingInfo": { - "type": "array", - "items": { - "type": "string" + "missingInfo" : { + "type" : "array", + "items" : { + "type" : "string" } }, - "debtorPosition": { - "$ref": "#/components/schemas/DebtorPosition" + "debtorPosition" : { + "$ref" : "#/components/schemas/DebtorPosition" }, - "creditor": { - "$ref": "#/components/schemas/Creditor" + "creditor" : { + "$ref" : "#/components/schemas/Creditor" }, - "psp": { - "$ref": "#/components/schemas/Psp" + "psp" : { + "$ref" : "#/components/schemas/Psp" }, - "debtor": { - "$ref": "#/components/schemas/Debtor" + "debtor" : { + "$ref" : "#/components/schemas/Debtor" }, - "payer": { - "$ref": "#/components/schemas/Payer" + "payer" : { + "$ref" : "#/components/schemas/Payer" }, - "paymentInfo": { - "$ref": "#/components/schemas/PaymentInfo" + "paymentInfo" : { + "$ref" : "#/components/schemas/PaymentInfo" }, - "transferList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Transfer" + "transferList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Transfer" } }, - "transactionDetails": { - "$ref": "#/components/schemas/TransactionDetails" - }, - "eventStatus": { - "type": "string", - "enum": [ - "NA", - "RETRY", - "FAILED", - "DONE", - "INGESTED" - ] - }, - "eventRetryEnrichmentCount": { - "type": "integer", - "format": "int32" + "transactionDetails" : { + "$ref" : "#/components/schemas/TransactionDetails" + }, + "eventStatus" : { + "type" : "string", + "enum" : [ "NA", "RETRY", "FAILED", "DONE", "INGESTED" ] + }, + "eventRetryEnrichmentCount" : { + "type" : "integer", + "format" : "int32" } } }, - "Creditor": { - "type": "object", - "properties": { - "idPA": { - "type": "string" + "Creditor" : { + "type" : "object", + "properties" : { + "idPA" : { + "type" : "string" }, - "idBrokerPA": { - "type": "string" + "idBrokerPA" : { + "type" : "string" }, - "idStation": { - "type": "string" + "idStation" : { + "type" : "string" }, - "companyName": { - "type": "string" + "companyName" : { + "type" : "string" }, - "officeName": { - "type": "string" + "officeName" : { + "type" : "string" } } }, - "Debtor": { - "type": "object", - "properties": { - "fullName": { - "type": "string" + "Debtor" : { + "type" : "object", + "properties" : { + "fullName" : { + "type" : "string" }, - "entityUniqueIdentifierType": { - "type": "string" + "entityUniqueIdentifierType" : { + "type" : "string" }, - "entityUniqueIdentifierValue": { - "type": "string" + "entityUniqueIdentifierValue" : { + "type" : "string" }, - "streetName": { - "type": "string" + "streetName" : { + "type" : "string" }, - "civicNumber": { - "type": "string" + "civicNumber" : { + "type" : "string" }, - "postalCode": { - "type": "string" + "postalCode" : { + "type" : "string" }, - "city": { - "type": "string" + "city" : { + "type" : "string" }, - "stateProvinceRegion": { - "type": "string" + "stateProvinceRegion" : { + "type" : "string" }, - "country": { - "type": "string" + "country" : { + "type" : "string" }, - "eMail": { - "type": "string" + "eMail" : { + "type" : "string" } } }, - "DebtorPosition": { - "type": "object", - "properties": { - "modelType": { - "type": "string" + "DebtorPosition" : { + "type" : "object", + "properties" : { + "modelType" : { + "type" : "string" }, - "noticeNumber": { - "type": "string" + "noticeNumber" : { + "type" : "string" }, - "iuv": { - "type": "string" + "iuv" : { + "type" : "string" }, - "iur": { - "type": "string" + "iur" : { + "type" : "string" } } }, - "Details": { - "type": "object", - "properties": { - "blurredNumber": { - "type": "string" + "Details" : { + "type" : "object", + "properties" : { + "blurredNumber" : { + "type" : "string" }, - "holder": { - "type": "string" + "holder" : { + "type" : "string" }, - "circuit": { - "type": "string" + "circuit" : { + "type" : "string" } } }, - "Info": { - "type": "object", - "properties": { - "type": { - "type": "string" + "Info" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string" }, - "blurredNumber": { - "type": "string" + "blurredNumber" : { + "type" : "string" }, - "holder": { - "type": "string" + "holder" : { + "type" : "string" }, - "expireMonth": { - "type": "string" + "expireMonth" : { + "type" : "string" }, - "expireYear": { - "type": "string" + "expireYear" : { + "type" : "string" }, - "brand": { - "type": "string" + "brand" : { + "type" : "string" }, - "issuerAbi": { - "type": "string" + "issuerAbi" : { + "type" : "string" }, - "issuerName": { - "type": "string" + "issuerName" : { + "type" : "string" }, - "label": { - "type": "string" + "label" : { + "type" : "string" } } }, - "InfoTransaction": { - "type": "object", - "properties": { - "brand": { - "type": "string" + "InfoTransaction" : { + "type" : "object", + "properties" : { + "brand" : { + "type" : "string" }, - "brandLogo": { - "type": "string" + "brandLogo" : { + "type" : "string" }, - "clientId": { - "type": "string" + "clientId" : { + "type" : "string" }, - "paymentMethodName": { - "type": "string" + "paymentMethodName" : { + "type" : "string" }, - "type": { - "type": "string" + "type" : { + "type" : "string" } } }, - "MBD": { - "type": "object", - "properties": { - "IUBD": { - "type": "string" + "MBD" : { + "type" : "object", + "properties" : { + "IUBD" : { + "type" : "string" }, - "oraAcquisto": { - "type": "string" + "oraAcquisto" : { + "type" : "string" }, - "importo": { - "type": "string" + "importo" : { + "type" : "string" }, - "tipoBollo": { - "type": "string" + "tipoBollo" : { + "type" : "string" }, - "MBDAttachment": { - "type": "string" + "MBDAttachment" : { + "type" : "string" } } }, - "MapEntry": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "value": { - "type": "string" + "MapEntry" : { + "type" : "object", + "properties" : { + "key" : { + "type" : "string" + }, + "value" : { + "type" : "string" } } }, - "Payer": { - "type": "object", - "properties": { - "fullName": { - "type": "string" + "Payer" : { + "type" : "object", + "properties" : { + "fullName" : { + "type" : "string" }, - "entityUniqueIdentifierType": { - "type": "string" + "entityUniqueIdentifierType" : { + "type" : "string" }, - "entityUniqueIdentifierValue": { - "type": "string" + "entityUniqueIdentifierValue" : { + "type" : "string" }, - "streetName": { - "type": "string" + "streetName" : { + "type" : "string" }, - "civicNumber": { - "type": "string" + "civicNumber" : { + "type" : "string" }, - "postalCode": { - "type": "string" + "postalCode" : { + "type" : "string" }, - "city": { - "type": "string" + "city" : { + "type" : "string" }, - "stateProvinceRegion": { - "type": "string" + "stateProvinceRegion" : { + "type" : "string" }, - "country": { - "type": "string" + "country" : { + "type" : "string" }, - "eMail": { - "type": "string" + "eMail" : { + "type" : "string" } } }, - "PaymentAuthorizationRequest": { - "type": "object", - "properties": { - "authOutcome": { - "type": "string" + "PaymentAuthorizationRequest" : { + "type" : "object", + "properties" : { + "authOutcome" : { + "type" : "string" }, - "requestId": { - "type": "string" + "requestId" : { + "type" : "string" }, - "correlationId": { - "type": "string" + "correlationId" : { + "type" : "string" }, - "authCode": { - "type": "string" + "authCode" : { + "type" : "string" }, - "paymentMethodType": { - "type": "string" + "paymentMethodType" : { + "type" : "string" }, - "details": { - "$ref": "#/components/schemas/Details" + "details" : { + "$ref" : "#/components/schemas/Details" } } }, - "PaymentInfo": { - "type": "object", - "properties": { - "paymentDateTime": { - "type": "string" + "PaymentInfo" : { + "type" : "object", + "properties" : { + "paymentDateTime" : { + "type" : "string" }, - "applicationDate": { - "type": "string" + "applicationDate" : { + "type" : "string" }, - "transferDate": { - "type": "string" + "transferDate" : { + "type" : "string" }, - "dueDate": { - "type": "string" + "dueDate" : { + "type" : "string" }, - "paymentToken": { - "type": "string" + "paymentToken" : { + "type" : "string" }, - "amount": { - "type": "string" + "amount" : { + "type" : "string" }, - "fee": { - "type": "string" + "fee" : { + "type" : "string" }, - "primaryCiIncurredFee": { - "type": "string" + "primaryCiIncurredFee" : { + "type" : "string" }, - "idBundle": { - "type": "string" + "idBundle" : { + "type" : "string" }, - "idCiBundle": { - "type": "string" + "idCiBundle" : { + "type" : "string" }, - "totalNotice": { - "type": "string" + "totalNotice" : { + "type" : "string" }, - "paymentMethod": { - "type": "string" + "paymentMethod" : { + "type" : "string" }, - "touchpoint": { - "type": "string" + "touchpoint" : { + "type" : "string" }, - "remittanceInformation": { - "type": "string" + "remittanceInformation" : { + "type" : "string" }, - "description": { - "type": "string" + "description" : { + "type" : "string" }, - "metadata": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MapEntry" + "metadata" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/MapEntry" } }, - "IUR": { - "type": "string" + "IUR" : { + "type" : "string" } } }, - "Psp": { - "type": "object", - "properties": { - "idPsp": { - "type": "string" + "Psp" : { + "type" : "object", + "properties" : { + "idPsp" : { + "type" : "string" }, - "idBrokerPsp": { - "type": "string" + "idBrokerPsp" : { + "type" : "string" }, - "idChannel": { - "type": "string" + "idChannel" : { + "type" : "string" }, - "psp": { - "type": "string" + "psp" : { + "type" : "string" }, - "pspPartitaIVA": { - "type": "string" + "pspPartitaIVA" : { + "type" : "string" }, - "pspFiscalCode": { - "type": "string" + "pspFiscalCode" : { + "type" : "string" }, - "channelDescription": { - "type": "string" + "channelDescription" : { + "type" : "string" } } }, - "Transaction": { - "type": "object", - "properties": { - "idTransaction": { - "type": "string" + "Transaction" : { + "type" : "object", + "properties" : { + "idTransaction" : { + "type" : "string" }, - "transactionId": { - "type": "string" + "transactionId" : { + "type" : "string" }, - "grandTotal": { - "type": "integer", - "format": "int64" + "grandTotal" : { + "type" : "integer", + "format" : "int64" }, - "amount": { - "type": "integer", - "format": "int64" + "amount" : { + "type" : "integer", + "format" : "int64" }, - "fee": { - "type": "integer", - "format": "int64" + "fee" : { + "type" : "integer", + "format" : "int64" }, - "transactionStatus": { - "type": "string" + "transactionStatus" : { + "type" : "string" }, - "accountingStatus": { - "type": "string" + "accountingStatus" : { + "type" : "string" }, - "rrn": { - "type": "string" + "rrn" : { + "type" : "string" }, - "authorizationCode": { - "type": "string" + "authorizationCode" : { + "type" : "string" }, - "creationDate": { - "type": "string" + "creationDate" : { + "type" : "string" }, - "numAut": { - "type": "string" + "numAut" : { + "type" : "string" }, - "accountCode": { - "type": "string" + "accountCode" : { + "type" : "string" }, - "psp": { - "$ref": "#/components/schemas/TransactionPsp" + "psp" : { + "$ref" : "#/components/schemas/TransactionPsp" }, - "origin": { - "type": "string" + "origin" : { + "type" : "string" } } }, - "TransactionDetails": { - "type": "object", - "properties": { - "user": { - "$ref": "#/components/schemas/User" + "TransactionDetails" : { + "type" : "object", + "properties" : { + "user" : { + "$ref" : "#/components/schemas/User" }, - "paymentAuthorizationRequest": { - "$ref": "#/components/schemas/PaymentAuthorizationRequest" + "paymentAuthorizationRequest" : { + "$ref" : "#/components/schemas/PaymentAuthorizationRequest" }, - "wallet": { - "$ref": "#/components/schemas/WalletItem" + "wallet" : { + "$ref" : "#/components/schemas/WalletItem" }, - "origin": { - "type": "string" + "origin" : { + "type" : "string" }, - "transaction": { - "$ref": "#/components/schemas/Transaction" + "transaction" : { + "$ref" : "#/components/schemas/Transaction" }, - "info": { - "$ref": "#/components/schemas/InfoTransaction" + "info" : { + "$ref" : "#/components/schemas/InfoTransaction" } } }, - "TransactionPsp": { - "type": "object", - "properties": { - "idChannel": { - "type": "string" + "TransactionPsp" : { + "type" : "object", + "properties" : { + "idChannel" : { + "type" : "string" }, - "businessName": { - "type": "string" + "businessName" : { + "type" : "string" }, - "serviceName": { - "type": "string" + "serviceName" : { + "type" : "string" } } }, - "Transfer": { - "type": "object", - "properties": { - "idTransfer": { - "type": "string" + "Transfer" : { + "type" : "object", + "properties" : { + "idTransfer" : { + "type" : "string" }, - "fiscalCodePA": { - "type": "string" + "fiscalCodePA" : { + "type" : "string" }, - "companyName": { - "type": "string" + "companyName" : { + "type" : "string" }, - "amount": { - "type": "string" + "amount" : { + "type" : "string" }, - "transferCategory": { - "type": "string" + "transferCategory" : { + "type" : "string" }, - "remittanceInformation": { - "type": "string" + "remittanceInformation" : { + "type" : "string" }, - "metadata": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MapEntry" + "metadata" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/MapEntry" } }, - "IBAN": { - "type": "string" + "IBAN" : { + "type" : "string" }, - "MBD": { - "$ref": "#/components/schemas/MBD" + "MBD" : { + "$ref" : "#/components/schemas/MBD" } } }, - "User": { - "type": "object", - "properties": { - "fullName": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "F", - "G", - "GUEST", - "REGISTERED" - ] - }, - "fiscalCode": { - "type": "string" - }, - "notificationEmail": { - "type": "string" - }, - "userId": { - "type": "string" - }, - "userStatus": { - "type": "string" - }, - "userStatusDescription": { - "type": "string" + "User" : { + "type" : "object", + "properties" : { + "fullName" : { + "type" : "string" + }, + "type" : { + "type" : "string", + "enum" : [ "F", "G", "GUEST", "REGISTERED" ] + }, + "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" + "WalletItem" : { + "type" : "object", + "properties" : { + "idWallet" : { + "type" : "string" + }, + "walletType" : { + "type" : "string", + "enum" : [ "CARD", "PAYPAL", "BANCOMATPAY" ] + }, + "enableableFunctions" : { + "type" : "array", + "items" : { + "type" : "string" } }, - "pagoPa": { - "type": "boolean" + "pagoPa" : { + "type" : "boolean" }, - "onboardingChannel": { - "type": "string" + "onboardingChannel" : { + "type" : "string" }, - "favourite": { - "type": "boolean" + "favourite" : { + "type" : "boolean" }, - "createDate": { - "type": "string" + "createDate" : { + "type" : "string" }, - "info": { - "$ref": "#/components/schemas/Info" + "info" : { + "$ref" : "#/components/schemas/Info" }, - "authRequest": { - "$ref": "#/components/schemas/AuthRequest" + "authRequest" : { + "$ref" : "#/components/schemas/AuthRequest" } } } }, - "securitySchemes": { - "ApiKey": { - "type": "apiKey", - "description": "The API key to access this function app.", - "name": "Ocp-Apim-Subscription-Key", - "in": "header" + "securitySchemes" : { + "ApiKey" : { + "type" : "apiKey", + "description" : "The API key to access this function app.", + "name" : "Ocp-Apim-Subscription-Key", + "in" : "header" } } } -} +} \ No newline at end of file diff --git a/openapi/openapi_io.json b/openapi/openapi_io.json index 1d2e7215..982751be 100644 --- a/openapi/openapi_io.json +++ b/openapi/openapi_io.json @@ -1,948 +1,871 @@ { - "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.52" + "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.52" }, - "servers": [ - { - "url": "http://localhost", - "description": "Generated server url" - } - ], - "paths": { - "/transactions/{transaction-id}/disable": { - "post": { - "tags": [ - "IO Transactions REST APIs" - ], - "summary": "Disable the transaction details given its id.", - "description": "This operation is deprecated. Use Paid Notice APIs instead", - "operationId": "disableTransaction", - "parameters": [ - { - "name": "x-fiscal-code", - "in": "header", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "transaction-id", - "in": "path", - "description": "The id of the transaction.", - "required": true, - "schema": { - "type": "string" - } + "servers" : [ { + "url" : "http://localhost", + "description" : "Generated server url" + } ], + "paths" : { + "/transactions/{transaction-id}/disable" : { + "post" : { + "tags" : [ "IO Transactions REST APIs" ], + "summary" : "Disable the transaction details given its id.", + "description" : "This operation is deprecated. Use Paid Notice APIs instead", + "operationId" : "disableTransaction", + "parameters" : [ { + "name" : "x-fiscal-code", + "in" : "header", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "transaction-id", + "in" : "path", + "description" : "The id of the transaction.", + "required" : true, + "schema" : { + "type" : "string" } - ], - "responses": { - "200": { - "description": "Disabled Transactions.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + } ], + "responses" : { + "429" : { + "description" : "Too many requests.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } - }, - "content": { - "application/json": {} } }, - "404": { - "description": "Not found the transaction.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "200" : { + "description" : "Disabled Transactions.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } + "content" : { + "application/json" : { } } }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "401" : { + "description" : "Wrong or missing function key.", + "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" + "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" + "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" + "404" : { + "description" : "Not found the transaction.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "deprecated": true, - "security": [ - { - "ApiKey": [] - } - ] + "deprecated" : true, + "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.", - "required": false, - "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.", + "required" : false, + "schema" : { + "type" : "string" } - ] + } ] }, - "/transactions": { - "get": { - "tags": [ - "IO Transactions REST APIs" - ], - "summary": "Retrieve the paged transaction list from biz events.", - "operationId": "getTransactionList", - "parameters": [ - { - "name": "x-fiscal-code", - "in": "header", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "is_payer", - "in": "query", - "description": "Filter by payer", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_debtor", - "in": "query", - "description": "Filter by debtor", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "x-continuation-token", - "in": "header", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 10 - } - }, - { - "name": "orderby", - "in": "query", - "description": "Order by TRANSACTION_DATE", - "required": false, - "schema": { - "type": "string", - "default": "TRANSACTION_DATE", - "enum": [ - "TRANSACTION_DATE" - ] - } - }, - { - "name": "ordering", - "in": "query", - "description": "Direction of ordering", - "required": false, - "schema": { - "type": "string", - "default": "DESC", - "enum": [ - "ASC", - "DESC" - ] - } + "/transactions" : { + "get" : { + "tags" : [ "IO Transactions REST APIs" ], + "summary" : "Retrieve the paged transaction list from biz events.", + "description" : "This operation is deprecated. Use Paid Notice APIs instead", + "operationId" : "getTransactionList", + "parameters" : [ { + "name" : "x-fiscal-code", + "in" : "header", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "is_payer", + "in" : "query", + "description" : "Filter by payer", + "required" : false, + "schema" : { + "type" : "boolean" + } + }, { + "name" : "is_debtor", + "in" : "query", + "description" : "Filter by debtor", + "required" : false, + "schema" : { + "type" : "boolean" } - ], - "responses": { - "404": { - "description": "Not found the transaction.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, { + "name" : "x-continuation-token", + "in" : "header", + "required" : false, + "schema" : { + "type" : "string" + } + }, { + "name" : "size", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 10 + } + }, { + "name" : "orderby", + "in" : "query", + "description" : "Order by TRANSACTION_DATE", + "required" : false, + "schema" : { + "type" : "string", + "default" : "TRANSACTION_DATE", + "enum" : [ "TRANSACTION_DATE" ] + } + }, { + "name" : "ordering", + "in" : "query", + "description" : "Direction of ordering", + "required" : false, + "schema" : { + "type" : "string", + "default" : "DESC", + "enum" : [ "ASC", "DESC" ] + } + } ], + "responses" : { + "200" : { + "description" : "Obtained transaction list.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" + } + }, + "x-continuation-token" : { + "description" : "continuation token for paginated query", + "style" : "simple", + "schema" : { + "type" : "string" } } }, - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/TransactionListWrapResponse" } } } }, - "401": { - "description": "Wrong or missing function key.", - "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" + "401" : { + "description" : "Wrong or missing function key.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "200": { - "description": "Obtained transaction list.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - }, - "x-continuation-token": { - "description": "continuation token for paginated query", - "style": "simple", - "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/TransactionListWrapResponse" + "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" + "404" : { + "description" : "Not found the transaction.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "deprecated" : true, + "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.", - "required": false, - "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.", + "required" : false, + "schema" : { + "type" : "string" } - ] + } ] }, - "/transactions/{transaction-id}": { - "get": { - "tags": [ - "IO Transactions REST APIs" - ], - "summary": "Retrieve the transaction details given its id.", - "description": "This operation is deprecated. Use Paid Notice APIs instead", - "operationId": "getTransactionDetails", - "parameters": [ - { - "name": "x-fiscal-code", - "in": "header", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "transaction-id", - "in": "path", - "description": "The id of the transaction.", - "required": true, - "schema": { - "type": "string" - } + "/transactions/{transaction-id}" : { + "get" : { + "tags" : [ "IO Transactions REST APIs" ], + "summary" : "Retrieve the transaction details given its id.", + "description" : "This operation is deprecated. Use Paid Notice APIs instead", + "operationId" : "getTransactionDetails", + "parameters" : [ { + "name" : "x-fiscal-code", + "in" : "header", + "required" : true, + "schema" : { + "type" : "string" } - ], - "responses": { - "404": { - "description": "Not found the transaction.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, { + "name" : "transaction-id", + "in" : "path", + "description" : "The id of the transaction.", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "200" : { + "description" : "Obtained transaction details.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/TransactionDetailResponse" } } } }, - "401": { - "description": "Wrong or missing function key.", - "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" + "401" : { + "description" : "Wrong or missing function key.", + "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" } } } }, - "200": { - "description": "Obtained transaction details.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "404" : { + "description" : "Not found the transaction.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TransactionDetailResponse" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "deprecated": true, - "security": [ - { - "ApiKey": [] - } - ] + "deprecated" : true, + "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.", - "required": false, - "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.", + "required" : false, + "schema" : { + "type" : "string" } - ] + } ] }, - "/transactions/{event-id}/pdf": { - "get": { - "tags": [ - "IO Transactions REST APIs" - ], - "summary": "Retrieve the PDF receipt given event id.", - "operationId": "getPDFReceipt", - "parameters": [ - { - "name": "x-fiscal-code", - "in": "header", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "event-id", - "in": "path", - "description": "The id of the event.", - "required": true, - "schema": { - "type": "string" - } + "/transactions/{event-id}/pdf" : { + "get" : { + "tags" : [ "IO Transactions REST APIs" ], + "summary" : "Retrieve the PDF receipt given event id.", + "operationId" : "getPDFReceipt", + "parameters" : [ { + "name" : "x-fiscal-code", + "in" : "header", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "event-id", + "in" : "path", + "description" : "The id of the event.", + "required" : true, + "schema" : { + "type" : "string" } - ], - "responses": { - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + } ], + "responses" : { + "429" : { + "description" : "Too many requests.", + "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" + "401" : { + "description" : "Wrong or missing function key.", + "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" + "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" + "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" } } } }, - "422": { - "description": "Unprocessable receipt.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "200" : { + "description" : "Obtained the PDF receipt.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "application/pdf" : { + "schema" : { + "type" : "string", + "format" : "binary" } } } }, - "200": { - "description": "Obtained the PDF receipt.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "422" : { + "description" : "Unprocessable receipt.", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/pdf": { - "schema": { - "type": "string", - "format": "binary" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "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.", - "required": false, - "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.", + "required" : false, + "schema" : { + "type" : "string" } - ] + } ] }, - "/info": { - "get": { - "tags": [ - "Home" - ], - "summary": "health check", - "description": "Return OK if application is started", - "operationId": "healthCheck", - "responses": { - "429": { - "description": "Too many requests", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "/info" : { + "get" : { + "tags" : [ "Home" ], + "summary" : "health check", + "description" : "Return OK if application is started", + "operationId" : "healthCheck", + "responses" : { + "500" : { + "description" : "Service unavailable", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } - } - }, - "200": { - "description": "OK", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppInfo" + } + }, + "403" : { + "description" : "Forbidden", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } }, - "400": { - "description": "Bad Request", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "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" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "500": { - "description": "Service unavailable", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "200" : { + "description" : "OK", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppInfo" } } } }, - "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" } } } }, - "401": { - "description": "Unauthorized", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" + "401" : { + "description" : "Unauthorized", + "headers" : { + "X-Request-Id" : { + "description" : "This header identifies the call", + "schema" : { + "type" : "string" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "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.", - "required": false, - "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.", + "required" : false, + "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" + "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" } } }, - "PageInfo": { - "required": [ - "items_found", - "limit", - "page", - "total_pages" - ], - "type": "object", - "properties": { - "page": { - "type": "integer", - "description": "Page number", - "format": "int32" - }, - "limit": { - "type": "integer", - "description": "Required number of items per page", - "format": "int32" - }, - "items_found": { - "type": "integer", - "description": "Number of items found. (The last page may have fewer elements than required)", - "format": "int32" - }, - "total_pages": { - "type": "integer", - "description": "Total number of pages", - "format": "int32" + "PageInfo" : { + "required" : [ "items_found", "limit", "page", "total_pages" ], + "type" : "object", + "properties" : { + "page" : { + "type" : "integer", + "description" : "Page number", + "format" : "int32" + }, + "limit" : { + "type" : "integer", + "description" : "Required number of items per page", + "format" : "int32" + }, + "items_found" : { + "type" : "integer", + "description" : "Number of items found. (The last page may have fewer elements than required)", + "format" : "int32" + }, + "total_pages" : { + "type" : "integer", + "description" : "Total number of pages", + "format" : "int32" } } }, - "TransactionListItem": { - "type": "object", - "properties": { - "transactionId": { - "type": "string" + "TransactionListItem" : { + "type" : "object", + "properties" : { + "transactionId" : { + "type" : "string" }, - "payeeName": { - "type": "string" + "payeeName" : { + "type" : "string" }, - "payeeTaxCode": { - "type": "string" + "payeeTaxCode" : { + "type" : "string" }, - "amount": { - "type": "string" + "amount" : { + "type" : "string" }, - "transactionDate": { - "type": "string" + "transactionDate" : { + "type" : "string" }, - "isCart": { - "type": "boolean" + "isCart" : { + "type" : "boolean" }, - "isPayer": { - "type": "boolean" + "isPayer" : { + "type" : "boolean" }, - "isDebtor": { - "type": "boolean" + "isDebtor" : { + "type" : "boolean" } } }, - "TransactionListWrapResponse": { - "type": "object", - "properties": { - "transactions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransactionListItem" + "TransactionListWrapResponse" : { + "type" : "object", + "properties" : { + "transactions" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TransactionListItem" } }, - "page_info": { - "$ref": "#/components/schemas/PageInfo" + "page_info" : { + "$ref" : "#/components/schemas/PageInfo" } } }, - "CartItem": { - "type": "object", - "properties": { - "subject": { - "type": "string" + "CartItem" : { + "type" : "object", + "properties" : { + "subject" : { + "type" : "string" }, - "amount": { - "type": "string" + "amount" : { + "type" : "string" }, - "payee": { - "$ref": "#/components/schemas/UserDetail" + "payee" : { + "$ref" : "#/components/schemas/UserDetail" }, - "debtor": { - "$ref": "#/components/schemas/UserDetail" + "debtor" : { + "$ref" : "#/components/schemas/UserDetail" }, - "refNumberValue": { - "type": "string" + "refNumberValue" : { + "type" : "string" }, - "refNumberType": { - "type": "string" + "refNumberType" : { + "type" : "string" } } }, - "InfoTransactionView": { - "type": "object", - "properties": { - "transactionId": { - "type": "string" - }, - "authCode": { - "type": "string" - }, - "rrn": { - "type": "string" - }, - "transactionDate": { - "type": "string" - }, - "pspName": { - "type": "string" - }, - "walletInfo": { - "$ref": "#/components/schemas/WalletInfo" - }, - "paymentMethod": { - "type": "string", - "enum": [ - "BBT", - "BP", - "AD", - "CP", - "PO", - "OBEP", - "JIF", - "MYBK", - "PPAL", - "UNKNOWN" - ] - }, - "payer": { - "$ref": "#/components/schemas/UserDetail" - }, - "amount": { - "type": "string" - }, - "fee": { - "type": "string" - }, - "origin": { - "type": "string", - "enum": [ - "INTERNAL", - "PM", - "NDP001PROD", - "NDP002PROD", - "NDP003PROD", - "UNKNOWN" - ] + "InfoTransactionView" : { + "type" : "object", + "properties" : { + "transactionId" : { + "type" : "string" + }, + "authCode" : { + "type" : "string" + }, + "rrn" : { + "type" : "string" + }, + "transactionDate" : { + "type" : "string" + }, + "pspName" : { + "type" : "string" + }, + "walletInfo" : { + "$ref" : "#/components/schemas/WalletInfo" + }, + "paymentMethod" : { + "type" : "string", + "enum" : [ "BBT", "BP", "AD", "CP", "PO", "OBEP", "JIF", "MYBK", "PPAL", "UNKNOWN" ] + }, + "payer" : { + "$ref" : "#/components/schemas/UserDetail" + }, + "amount" : { + "type" : "string" + }, + "fee" : { + "type" : "string" + }, + "origin" : { + "type" : "string", + "enum" : [ "INTERNAL", "PM", "NDP001PROD", "NDP002PROD", "NDP003PROD", "UNKNOWN" ] } } }, - "TransactionDetailResponse": { - "type": "object", - "properties": { - "infoTransaction": { - "$ref": "#/components/schemas/InfoTransactionView" - }, - "carts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CartItem" + "TransactionDetailResponse" : { + "type" : "object", + "properties" : { + "infoTransaction" : { + "$ref" : "#/components/schemas/InfoTransactionView" + }, + "carts" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/CartItem" } } } }, - "UserDetail": { - "required": [ - "taxCode" - ], - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "taxCode": { - "type": "string" + "UserDetail" : { + "required" : [ "taxCode" ], + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "taxCode" : { + "type" : "string" } } }, - "WalletInfo": { - "type": "object", - "properties": { - "accountHolder": { - "type": "string" + "WalletInfo" : { + "type" : "object", + "properties" : { + "accountHolder" : { + "type" : "string" }, - "brand": { - "type": "string" + "brand" : { + "type" : "string" }, - "blurredNumber": { - "type": "string" + "blurredNumber" : { + "type" : "string" }, - "maskedEmail": { - "type": "string" + "maskedEmail" : { + "type" : "string" } } }, - "AppInfo": { - "type": "object", - "properties": { - "name": { - "type": "string" + "AppInfo" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" }, - "version": { - "type": "string" + "version" : { + "type" : "string" }, - "environment": { - "type": "string" + "environment" : { + "type" : "string" } } } }, - "securitySchemes": { - "ApiKey": { - "type": "apiKey", - "description": "The API key to access this function app.", - "name": "Ocp-Apim-Subscription-Key", - "in": "header" + "securitySchemes" : { + "ApiKey" : { + "type" : "apiKey", + "description" : "The API key to access this function app.", + "name" : "Ocp-Apim-Subscription-Key", + "in" : "header" } } } -} +} \ No newline at end of file diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/controller/impl/PaidNoticeController.java b/src/main/java/it/gov/pagopa/bizeventsservice/controller/impl/PaidNoticeController.java index f9c03c35..5f4cc642 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/controller/impl/PaidNoticeController.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/controller/impl/PaidNoticeController.java @@ -1,20 +1,19 @@ package it.gov.pagopa.bizeventsservice.controller.impl; import it.gov.pagopa.bizeventsservice.controller.IPaidNoticeController; -import it.gov.pagopa.bizeventsservice.model.response.paidnotice.NoticeDetailResponse; import it.gov.pagopa.bizeventsservice.model.filterandorder.Order; +import it.gov.pagopa.bizeventsservice.model.response.paidnotice.NoticeDetailResponse; import it.gov.pagopa.bizeventsservice.model.response.paidnotice.NoticeListWrapResponse; import it.gov.pagopa.bizeventsservice.model.response.transaction.TransactionListResponse; import it.gov.pagopa.bizeventsservice.service.ITransactionService; - -import javax.validation.constraints.NotBlank; - import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Sort; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.RestController; +import javax.validation.constraints.NotBlank; + import static it.gov.pagopa.bizeventsservice.mapper.ConvertViewsToTransactionDetailResponse.convertToNoticeList; /** From 62956622fb582c8460615b72f8b13189848a813c Mon Sep 17 00:00:00 2001 From: Jacopo Carlini Date: Thu, 5 Sep 2024 14:39:15 +0200 Subject: [PATCH 6/6] formatting --- .../client/IReceiptGeneratePDFClient.java | 19 ++- .../client/IReceiptGetPDFClient.java | 31 ++-- .../config/CosmosDBConfiguration.java | 12 +- .../config/LoggingAspect.java | 6 +- .../config/MappingsConfiguration.java | 11 +- .../config/OpenApiConfig.java | 6 +- .../config/RequestFilter.java | 6 +- .../config/ResponseValidator.java | 2 +- .../config/feign/AuthFeignConfig.java | 22 ++- .../feign/PDFGenerateReceiptFeignConfig.java | 10 +- .../feign/PDFGetReceiptFeignConfig.java | 10 +- .../controller/IBizEventController.java | 67 ++++---- .../controller/IPaidNoticeController.java | 19 +-- .../controller/IPaymentsController.java | 19 ++- .../controller/ITransactionController.java | 14 +- .../controller/impl/BaseController.java | 15 +- .../controller/impl/BizEventController.java | 9 +- .../controller/impl/PaidNoticeController.java | 8 +- .../controller/impl/PaymentsController.java | 33 ++-- .../impl/TransactionController.java | 36 ++--- .../bizeventsservice/entity/AuthRequest.java | 19 +-- .../bizeventsservice/entity/BizEvent.java | 49 +++--- .../bizeventsservice/entity/Creditor.java | 16 +- .../bizeventsservice/entity/Debtor.java | 29 ++-- .../entity/DebtorPosition.java | 14 +- .../bizeventsservice/entity/Details.java | 12 +- .../pagopa/bizeventsservice/entity/Info.java | 24 ++- .../pagopa/bizeventsservice/entity/MBD.java | 27 ++-- .../bizeventsservice/entity/MapEntry.java | 20 +-- .../pagopa/bizeventsservice/entity/Payer.java | 29 ++-- .../entity/PaymentAuthorizationRequest.java | 18 +-- .../bizeventsservice/entity/PaymentInfo.java | 46 +++--- .../pagopa/bizeventsservice/entity/Psp.java | 20 +-- .../bizeventsservice/entity/Transaction.java | 28 ++-- .../entity/TransactionDetails.java | 18 +-- .../entity/TransactionPsp.java | 6 +- .../bizeventsservice/entity/Transfer.java | 35 ++-- .../pagopa/bizeventsservice/entity/User.java | 20 +-- .../bizeventsservice/entity/WalletItem.java | 28 ++-- .../entity/view/BizEventsViewCart.java | 2 +- .../entity/view/BizEventsViewGeneral.java | 2 +- .../entity/view/BizEventsViewUser.java | 26 +-- .../entity/view/UserDetail.java | 23 ++- .../entity/view/WalletInfo.java | 13 +- .../entity/view/enumeration/OriginType.java | 2 +- .../bizeventsservice/exception/AppError.java | 8 +- .../exception/AppException.java | 8 +- ...izEventEntityToCtReceiptModelResponse.java | 150 +++++++++--------- ...nvertViewsToTransactionDetailResponse.java | 89 +++++------ .../model/AppCorsConfiguration.java | 7 +- .../bizeventsservice/model/AppInfo.java | 7 +- .../bizeventsservice/model/MapEntry.java | 22 +-- .../bizeventsservice/model/PageInfo.java | 6 +- .../bizeventsservice/model/ProblemJson.java | 6 +- .../response/CtReceiptModelResponse.java | 53 +++---- .../model/response/Debtor.java | 33 ++-- .../model/response/Payer.java | 47 +++--- .../model/response/TransferPA.java | 51 +++--- .../response/enumeration/WalletType.java | 2 +- .../model/response/paidnotice/CartItem.java | 19 +-- .../model/response/paidnotice/InfoNotice.java | 23 ++- .../paidnotice/NoticeDetailResponse.java | 12 +- .../response/paidnotice/NoticeListItem.java | 7 +- .../model/response/transaction/CartItem.java | 11 +- .../transaction/InfoTransactionView.java | 13 +- .../TransactionDetailResponse.java | 8 +- .../transaction/TransactionListItem.java | 13 +- .../transaction/TransactionListResponse.java | 3 +- .../TransactionListWrapResponse.java | 10 +- .../repository/BizEventsRepository.java | 22 ++- .../BizEventsViewUserRepository.java | 10 +- .../service/IBizEventsService.java | 3 +- .../service/ITransactionService.java | 13 +- .../service/impl/BizEventsService.java | 2 +- .../service/impl/TransactionService.java | 140 ++++++++-------- .../bizeventsservice/util/DateValidator.java | 21 +-- .../pagopa/bizeventsservice/util/Util.java | 124 +++++++-------- 77 files changed, 830 insertions(+), 994 deletions(-) diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/client/IReceiptGeneratePDFClient.java b/src/main/java/it/gov/pagopa/bizeventsservice/client/IReceiptGeneratePDFClient.java index 85ce94dc..af57c4f6 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/client/IReceiptGeneratePDFClient.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/client/IReceiptGeneratePDFClient.java @@ -1,24 +1,23 @@ package it.gov.pagopa.bizeventsservice.client; +import feign.FeignException; +import it.gov.pagopa.bizeventsservice.config.feign.PDFGenerateReceiptFeignConfig; import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.http.MediaType; import org.springframework.retry.annotation.Backoff; import org.springframework.retry.annotation.Retryable; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.http.MediaType; - -import feign.FeignException; -import it.gov.pagopa.bizeventsservice.config.feign.PDFGenerateReceiptFeignConfig; @FeignClient(value = "generateReceiptPDF", url = "${service.generate.pdf.receipt.host}", configuration = PDFGenerateReceiptFeignConfig.class) public interface IReceiptGeneratePDFClient { - @Retryable( - exclude = FeignException.FeignClientException.class, - maxAttemptsExpression = "${generate.pdf.retry.maxAttempts}", - backoff = @Backoff(delayExpression = "${generate.pdf.retry.maxDelay}")) - @PostMapping(value = "${service.generate.pdf.receipt.path}", consumes = MediaType.APPLICATION_JSON_VALUE) - String generateReceipt(@PathVariable("event-id") String eventId, @RequestParam("isCart") String isCart, @RequestBody String body); + @Retryable( + exclude = FeignException.FeignClientException.class, + maxAttemptsExpression = "${generate.pdf.retry.maxAttempts}", + backoff = @Backoff(delayExpression = "${generate.pdf.retry.maxDelay}")) + @PostMapping(value = "${service.generate.pdf.receipt.path}", consumes = MediaType.APPLICATION_JSON_VALUE) + String generateReceipt(@PathVariable("event-id") String eventId, @RequestParam("isCart") String isCart, @RequestBody String body); } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/client/IReceiptGetPDFClient.java b/src/main/java/it/gov/pagopa/bizeventsservice/client/IReceiptGetPDFClient.java index 8a98a1f2..0f8fada1 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/client/IReceiptGetPDFClient.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/client/IReceiptGetPDFClient.java @@ -1,5 +1,8 @@ package it.gov.pagopa.bizeventsservice.client; +import feign.FeignException; +import it.gov.pagopa.bizeventsservice.config.feign.PDFGetReceiptFeignConfig; +import it.gov.pagopa.bizeventsservice.model.response.AttachmentsDetailsResponse; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.retry.annotation.Backoff; import org.springframework.retry.annotation.Retryable; @@ -7,24 +10,20 @@ import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestHeader; -import feign.FeignException; -import it.gov.pagopa.bizeventsservice.config.feign.PDFGetReceiptFeignConfig; -import it.gov.pagopa.bizeventsservice.model.response.AttachmentsDetailsResponse; - @FeignClient(value = "getReceiptPDF", url = "${service.get.pdf.receipt.host}", configuration = PDFGetReceiptFeignConfig.class) public interface IReceiptGetPDFClient { - @Retryable( - exclude = FeignException.FeignClientException.class, - maxAttemptsExpression = "${get.pdf.retry.maxAttempts}", - backoff = @Backoff(delayExpression = "${get.pdf.retry.maxDelay}")) - @GetMapping(value = "/messages/{id}") - AttachmentsDetailsResponse getAttachments(@RequestHeader("fiscal_code") String fiscalCode, @PathVariable("id") String id); + @Retryable( + exclude = FeignException.FeignClientException.class, + maxAttemptsExpression = "${get.pdf.retry.maxAttempts}", + backoff = @Backoff(delayExpression = "${get.pdf.retry.maxDelay}")) + @GetMapping(value = "/messages/{id}") + AttachmentsDetailsResponse getAttachments(@RequestHeader("fiscal_code") String fiscalCode, @PathVariable("id") String id); - @Retryable( - exclude = FeignException.FeignClientException.class, - maxAttemptsExpression = "${get.pdf.retry.maxAttempts}", - backoff = @Backoff(delayExpression = "${get.pdf.retry.maxDelay}")) - @GetMapping(value = "/messages/{id}/{attachment_url}") - byte[] getReceipt(@RequestHeader("fiscal_code") String fiscalCode, @PathVariable("id") String id, @PathVariable("attachment_url") String attachmentUrl); + @Retryable( + exclude = FeignException.FeignClientException.class, + maxAttemptsExpression = "${get.pdf.retry.maxAttempts}", + backoff = @Backoff(delayExpression = "${get.pdf.retry.maxDelay}")) + @GetMapping(value = "/messages/{id}/{attachment_url}") + byte[] getReceipt(@RequestHeader("fiscal_code") String fiscalCode, @PathVariable("id") String id, @PathVariable("attachment_url") String attachmentUrl); } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/config/CosmosDBConfiguration.java b/src/main/java/it/gov/pagopa/bizeventsservice/config/CosmosDBConfiguration.java index 42f0fd37..9b02d045 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/config/CosmosDBConfiguration.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/config/CosmosDBConfiguration.java @@ -1,12 +1,6 @@ package it.gov.pagopa.bizeventsservice.config; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.lang.Nullable; - import com.azure.core.credential.AzureKeyCredential; import com.azure.cosmos.CosmosClientBuilder; import com.azure.cosmos.DirectConnectionConfig; @@ -16,8 +10,12 @@ import com.azure.spring.data.cosmos.core.ResponseDiagnosticsProcessor; import com.azure.spring.data.cosmos.core.mapping.EnableCosmosAuditing; import com.azure.spring.data.cosmos.repository.config.EnableCosmosRepositories; - import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.lang.Nullable; @Configuration @EnableCosmosRepositories("it.gov.pagopa.bizeventsservice.repository") diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/config/LoggingAspect.java b/src/main/java/it/gov/pagopa/bizeventsservice/config/LoggingAspect.java index 0ea30c3a..627dcdfc 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/config/LoggingAspect.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/config/LoggingAspect.java @@ -3,11 +3,7 @@ import lombok.extern.slf4j.Slf4j; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.ProceedingJoinPoint; -import org.aspectj.lang.annotation.AfterReturning; -import org.aspectj.lang.annotation.Around; -import org.aspectj.lang.annotation.Aspect; -import org.aspectj.lang.annotation.Before; -import org.aspectj.lang.annotation.Pointcut; +import org.aspectj.lang.annotation.*; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.event.ContextRefreshedEvent; import org.springframework.context.event.EventListener; diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/config/MappingsConfiguration.java b/src/main/java/it/gov/pagopa/bizeventsservice/config/MappingsConfiguration.java index 45ec4852..60863453 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/config/MappingsConfiguration.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/config/MappingsConfiguration.java @@ -1,16 +1,15 @@ package it.gov.pagopa.bizeventsservice.config; +import it.gov.pagopa.bizeventsservice.entity.BizEvent; +import it.gov.pagopa.bizeventsservice.mapper.ConvertBizEventEntityToCtReceiptModelResponse; +import it.gov.pagopa.bizeventsservice.model.response.CtReceiptModelResponse; import org.modelmapper.Converter; import org.modelmapper.ModelMapper; import org.modelmapper.convention.MatchingStrategies; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import it.gov.pagopa.bizeventsservice.entity.BizEvent; -import it.gov.pagopa.bizeventsservice.mapper.ConvertBizEventEntityToCtReceiptModelResponse; -import it.gov.pagopa.bizeventsservice.model.response.CtReceiptModelResponse; - @Configuration public class MappingsConfiguration { @@ -18,10 +17,10 @@ public class MappingsConfiguration { ModelMapper modelMapper() { ModelMapper mapper = new ModelMapper(); mapper.getConfiguration().setMatchingStrategy(MatchingStrategies.STRICT); - + Converter convertBizEventEntityToCtReceiptModelResponse = new ConvertBizEventEntityToCtReceiptModelResponse(); mapper.createTypeMap(BizEvent.class, CtReceiptModelResponse.class).setConverter(convertBizEventEntityToCtReceiptModelResponse); - + return mapper; } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/config/OpenApiConfig.java b/src/main/java/it/gov/pagopa/bizeventsservice/config/OpenApiConfig.java index 6d8640b0..5c53234e 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/config/OpenApiConfig.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/config/OpenApiConfig.java @@ -27,8 +27,8 @@ public class OpenApiConfig { @Bean OpenAPI customOpenAPI(@Value("${info.application.name}") String appTitle, - @Value("${info.application.description}") String appDescription, - @Value("${info.application.version}") String appVersion) { + @Value("${info.application.description}") String appDescription, + @Value("${info.application.version}") String appVersion) { return new OpenAPI() .components(new Components() .addSecuritySchemes("ApiKey", new SecurityScheme() @@ -68,7 +68,7 @@ OpenApiCustomiser addCommonHeaders() { return openApi -> openApi.getPaths().forEach((key, value) -> { // add Request-ID as request header - var header = Optional.ofNullable(value.getParameters()) + var header = Optional.ofNullable(value.getParameters()) .orElse(Collections.emptyList()) .parallelStream() .filter(Objects::nonNull) diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/config/RequestFilter.java b/src/main/java/it/gov/pagopa/bizeventsservice/config/RequestFilter.java index 6cb3d45b..c0fe1a9f 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/config/RequestFilter.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/config/RequestFilter.java @@ -6,11 +6,7 @@ import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component; -import javax.servlet.Filter; -import javax.servlet.FilterChain; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; +import javax.servlet.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/config/ResponseValidator.java b/src/main/java/it/gov/pagopa/bizeventsservice/config/ResponseValidator.java index 0ca19036..4f126f71 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/config/ResponseValidator.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/config/ResponseValidator.java @@ -28,7 +28,7 @@ public class ResponseValidator { * @param joinPoint not used * @param result the response to validate */ - + @AfterReturning(pointcut = "execution(* it.gov.pagopa.bizeventsservice.controller.*.*(..))", returning = "result") public void validateResponse(JoinPoint joinPoint, Object result) { if (result instanceof ResponseEntity) { diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/config/feign/AuthFeignConfig.java b/src/main/java/it/gov/pagopa/bizeventsservice/config/feign/AuthFeignConfig.java index db524869..f7392e90 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/config/feign/AuthFeignConfig.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/config/feign/AuthFeignConfig.java @@ -6,17 +6,15 @@ public abstract class AuthFeignConfig { - protected String subscriptionKey; + static final String HEADER_REQUEST_ID = "X-Request-Id"; + static final String HEADER_SUBSCRIBTION_KEY = "Ocp-Apim-Subscription-Key"; + protected String subscriptionKey; - static final String HEADER_REQUEST_ID = "X-Request-Id"; - - static final String HEADER_SUBSCRIBTION_KEY = "Ocp-Apim-Subscription-Key"; - - @Bean - public RequestInterceptor requestIdInterceptor() { - return requestTemplate -> - requestTemplate - .header(HEADER_REQUEST_ID, MDC.get("requestId")) - .header(HEADER_SUBSCRIBTION_KEY, subscriptionKey); - } + @Bean + public RequestInterceptor requestIdInterceptor() { + return requestTemplate -> + requestTemplate + .header(HEADER_REQUEST_ID, MDC.get("requestId")) + .header(HEADER_SUBSCRIBTION_KEY, subscriptionKey); + } } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/config/feign/PDFGenerateReceiptFeignConfig.java b/src/main/java/it/gov/pagopa/bizeventsservice/config/feign/PDFGenerateReceiptFeignConfig.java index fef3b5bb..49cf5cf1 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/config/feign/PDFGenerateReceiptFeignConfig.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/config/feign/PDFGenerateReceiptFeignConfig.java @@ -7,10 +7,10 @@ @Component public class PDFGenerateReceiptFeignConfig extends AuthFeignConfig { - private static final String RECEIPT_SUBKEY_PLACEHOLDER = "${pdf.generate.receipt.subscription-key}"; + private static final String RECEIPT_SUBKEY_PLACEHOLDER = "${pdf.generate.receipt.subscription-key}"; - @Autowired - public PDFGenerateReceiptFeignConfig(@Value(RECEIPT_SUBKEY_PLACEHOLDER) String subscriptionKey) { - this.subscriptionKey = subscriptionKey; - } + @Autowired + public PDFGenerateReceiptFeignConfig(@Value(RECEIPT_SUBKEY_PLACEHOLDER) String subscriptionKey) { + this.subscriptionKey = subscriptionKey; + } } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/config/feign/PDFGetReceiptFeignConfig.java b/src/main/java/it/gov/pagopa/bizeventsservice/config/feign/PDFGetReceiptFeignConfig.java index 48d24e37..faabdbf0 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/config/feign/PDFGetReceiptFeignConfig.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/config/feign/PDFGetReceiptFeignConfig.java @@ -7,10 +7,10 @@ @Component public class PDFGetReceiptFeignConfig extends AuthFeignConfig { - private static final String RECEIPT_SUBKEY_PLACEHOLDER = "${pdf.get.receipt.subscription-key}"; + private static final String RECEIPT_SUBKEY_PLACEHOLDER = "${pdf.get.receipt.subscription-key}"; - @Autowired - public PDFGetReceiptFeignConfig(@Value(RECEIPT_SUBKEY_PLACEHOLDER) String subscriptionKey) { - this.subscriptionKey = subscriptionKey; - } + @Autowired + public PDFGetReceiptFeignConfig(@Value(RECEIPT_SUBKEY_PLACEHOLDER) String subscriptionKey) { + this.subscriptionKey = subscriptionKey; + } } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/controller/IBizEventController.java b/src/main/java/it/gov/pagopa/bizeventsservice/controller/IBizEventController.java index 77a10eb3..061430d7 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/controller/IBizEventController.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/controller/IBizEventController.java @@ -1,14 +1,5 @@ package it.gov.pagopa.bizeventsservice.controller; -import javax.validation.constraints.NotBlank; - -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; - import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.media.Content; @@ -19,36 +10,44 @@ import io.swagger.v3.oas.annotations.tags.Tag; import it.gov.pagopa.bizeventsservice.entity.BizEvent; import it.gov.pagopa.bizeventsservice.model.ProblemJson; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; + +import javax.validation.constraints.NotBlank; @Tag(name = "Biz-Events Helpdesk") @RequestMapping @Validated public interface IBizEventController { - @Operation(summary = "Retrieve the biz-event given its id.", security = { - @SecurityRequirement(name = "ApiKey") }, operationId = "getBizEvent") - @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "Obtained biz-event.", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, schema = @Schema(name = "BizEvent", implementation = BizEvent.class))), - @ApiResponse(responseCode = "401", description = "Wrong or missing function key.", content = @Content(schema = @Schema())), - @ApiResponse(responseCode = "404", description = "Not found the biz-event.", 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 = "/events/{biz-event-id}", produces = MediaType.APPLICATION_JSON_VALUE) - ResponseEntity getBizEvent( - @Parameter(description = "The id of the biz-event.", required = true) @NotBlank @PathVariable("biz-event-id") String bizEventId); + @Operation(summary = "Retrieve the biz-event given its id.", security = { + @SecurityRequirement(name = "ApiKey")}, operationId = "getBizEvent") + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "Obtained biz-event.", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, schema = @Schema(name = "BizEvent", implementation = BizEvent.class))), + @ApiResponse(responseCode = "401", description = "Wrong or missing function key.", content = @Content(schema = @Schema())), + @ApiResponse(responseCode = "404", description = "Not found the biz-event.", 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 = "/events/{biz-event-id}", produces = MediaType.APPLICATION_JSON_VALUE) + ResponseEntity getBizEvent( + @Parameter(description = "The id of the biz-event.", required = true) @NotBlank @PathVariable("biz-event-id") String bizEventId); - @Operation(summary = "Retrieve the biz-event given the organization fiscal code and IUV.", security = { - @SecurityRequirement(name = "ApiKey") }, operationId = "getBizEventByOrganizationFiscalCodeAndIuv") - @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "Obtained biz-event.", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, schema = @Schema(name = "BizEvent", implementation = BizEvent.class))), - @ApiResponse(responseCode = "401", description = "Wrong or missing function key.", content = @Content(schema = @Schema())), - @ApiResponse(responseCode = "404", description = "Not found the biz-event.", 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 = "/events/organizations/{organization-fiscal-code}/iuvs/{iuv}", produces = MediaType.APPLICATION_JSON_VALUE) - ResponseEntity getBizEventByOrganizationFiscalCodeAndIuv( - @Parameter(description = "The fiscal code of the Organization.", required = true) @NotBlank @PathVariable("organization-fiscal-code") String organizationFiscalCode, - @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 = "Retrieve the biz-event given the organization fiscal code and IUV.", security = { + @SecurityRequirement(name = "ApiKey")}, operationId = "getBizEventByOrganizationFiscalCodeAndIuv") + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "Obtained biz-event.", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, schema = @Schema(name = "BizEvent", implementation = BizEvent.class))), + @ApiResponse(responseCode = "401", description = "Wrong or missing function key.", content = @Content(schema = @Schema())), + @ApiResponse(responseCode = "404", description = "Not found the biz-event.", 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 = "/events/organizations/{organization-fiscal-code}/iuvs/{iuv}", produces = MediaType.APPLICATION_JSON_VALUE) + ResponseEntity getBizEventByOrganizationFiscalCodeAndIuv( + @Parameter(description = "The fiscal code of the Organization.", required = true) @NotBlank @PathVariable("organization-fiscal-code") String organizationFiscalCode, + @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); } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/controller/IPaidNoticeController.java b/src/main/java/it/gov/pagopa/bizeventsservice/controller/IPaidNoticeController.java index 132a0ca5..fffd2b93 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/controller/IPaidNoticeController.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/controller/IPaidNoticeController.java @@ -1,16 +1,5 @@ package it.gov.pagopa.bizeventsservice.controller; -import javax.validation.constraints.NotBlank; - -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.bind.annotation.RequestMapping; - import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.headers.Header; @@ -21,8 +10,8 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import it.gov.pagopa.bizeventsservice.model.ProblemJson; -import it.gov.pagopa.bizeventsservice.model.response.paidnotice.NoticeDetailResponse; import it.gov.pagopa.bizeventsservice.model.filterandorder.Order; +import it.gov.pagopa.bizeventsservice.model.response.paidnotice.NoticeDetailResponse; import it.gov.pagopa.bizeventsservice.model.response.paidnotice.NoticeListWrapResponse; import org.springframework.data.domain.Sort; import org.springframework.http.MediaType; @@ -39,6 +28,8 @@ @Validated public interface IPaidNoticeController { String X_FISCAL_CODE = "x-fiscal-code"; + String X_CONTINUATION_TOKEN = "x-continuation-token"; + String PAGE_SIZE = "size"; /** * @param fiscalCode @@ -58,8 +49,6 @@ public interface IPaidNoticeController { ResponseEntity getPaidNoticeDetail( @RequestHeader("x-fiscal-code") @NotBlank String fiscalCode, @Parameter(description = "The id of the paid event.", required = true) @NotBlank @PathVariable("event-id") String eventId); - String X_CONTINUATION_TOKEN = "x-continuation-token"; - String PAGE_SIZE = "size"; /** * recovers biz-event data for the paid notices list @@ -90,8 +79,6 @@ ResponseEntity getPaidNotices( @RequestParam(required = false, name = "ordering", defaultValue = "DESC") @Parameter(description = "Direction of ordering") Sort.Direction ordering); - - @Operation(summary = "Disable the paid notice details given its id.", security = { @SecurityRequirement(name = "ApiKey")}, operationId = "disablePaidNotice") @ApiResponses(value = { 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 def83f76..5e351cd9 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/controller/IPaymentsController.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/controller/IPaymentsController.java @@ -1,14 +1,5 @@ package it.gov.pagopa.bizeventsservice.controller; -import javax.validation.constraints.NotBlank; - -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; - import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.media.Content; @@ -19,6 +10,14 @@ import io.swagger.v3.oas.annotations.tags.Tag; import it.gov.pagopa.bizeventsservice.model.ProblemJson; import it.gov.pagopa.bizeventsservice.model.response.CtReceiptModelResponse; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; + +import javax.validation.constraints.NotBlank; @Tag(name = "Payment Receipts REST APIs") @@ -42,7 +41,7 @@ public interface IPaymentsController { @GetMapping(value = "/organizations/{organizationfiscalcode}/receipts/{iur}/paymentoptions/{iuv}", produces = MediaType.APPLICATION_JSON_VALUE) ResponseEntity getOrganizationReceipt( - @Parameter(description = "The fiscal code of the Organization.", required = true) + @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/ITransactionController.java b/src/main/java/it/gov/pagopa/bizeventsservice/controller/ITransactionController.java index e45d9296..e44b5cf8 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/controller/ITransactionController.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/controller/ITransactionController.java @@ -13,17 +13,11 @@ import it.gov.pagopa.bizeventsservice.model.filterandorder.Order; import it.gov.pagopa.bizeventsservice.model.response.transaction.TransactionDetailResponse; import it.gov.pagopa.bizeventsservice.model.response.transaction.TransactionListWrapResponse; - +import org.springframework.data.domain.Sort; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.data.domain.Sort; +import org.springframework.web.bind.annotation.*; import javax.validation.Valid; import javax.validation.constraints.NotBlank; @@ -40,9 +34,6 @@ public interface ITransactionController { String PAGE_NUMBER = "page"; /** - * @deprecated - * recovers biz-event data for the transaction list - * * @param fiscalCode tokenized user fiscal code * @param isPayer optional flag defining the filter to select only the notices where the user is the payer * @param isDebtor optional flag defining the filter to select only the notices where the user is the debtor @@ -51,6 +42,7 @@ public interface ITransactionController { * @param orderBy optional parameter defining the sort field for the returned list, defaults to TRANSACTION_DATE * @param ordering optional parameter defining the sorting direction of the returned list, defaults to DESC * @return the transaction list + * @deprecated recovers biz-event data for the transaction list */ @GetMapping @ApiResponses(value = { diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/controller/impl/BaseController.java b/src/main/java/it/gov/pagopa/bizeventsservice/controller/impl/BaseController.java index c3114433..9d805b96 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/controller/impl/BaseController.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/controller/impl/BaseController.java @@ -1,13 +1,5 @@ package it.gov.pagopa.bizeventsservice.controller.impl; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.ResponseStatus; -import org.springframework.web.bind.annotation.RestController; - import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.media.Content; import io.swagger.v3.oas.annotations.media.Schema; @@ -16,6 +8,13 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import it.gov.pagopa.bizeventsservice.model.AppInfo; import it.gov.pagopa.bizeventsservice.model.ProblemJson; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.ResponseStatus; +import org.springframework.web.bind.annotation.RestController; @RestController() public class BaseController { diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/controller/impl/BizEventController.java b/src/main/java/it/gov/pagopa/bizeventsservice/controller/impl/BizEventController.java index f27e5eab..77aa55ca 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/controller/impl/BizEventController.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/controller/impl/BizEventController.java @@ -1,15 +1,14 @@ package it.gov.pagopa.bizeventsservice.controller.impl; -import javax.validation.constraints.NotBlank; - +import it.gov.pagopa.bizeventsservice.controller.IBizEventController; +import it.gov.pagopa.bizeventsservice.entity.BizEvent; +import it.gov.pagopa.bizeventsservice.service.IBizEventsService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.RestController; -import it.gov.pagopa.bizeventsservice.controller.IBizEventController; -import it.gov.pagopa.bizeventsservice.entity.BizEvent; -import it.gov.pagopa.bizeventsservice.service.IBizEventsService; +import javax.validation.constraints.NotBlank; @RestController public class BizEventController implements IBizEventController { diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/controller/impl/PaidNoticeController.java b/src/main/java/it/gov/pagopa/bizeventsservice/controller/impl/PaidNoticeController.java index 5f4cc642..b728d652 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/controller/impl/PaidNoticeController.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/controller/impl/PaidNoticeController.java @@ -31,12 +31,12 @@ public PaidNoticeController(ITransactionService transactionService) { } @Override - public ResponseEntity getPaidNoticeDetail(@NotBlank String fiscalCode, - @NotBlank String eventId) { - return new ResponseEntity<>( + public ResponseEntity getPaidNoticeDetail(@NotBlank String fiscalCode, + @NotBlank String eventId) { + return new ResponseEntity<>( transactionService.getPaidNoticeDetail(fiscalCode, eventId), HttpStatus.OK); - } + } @Override public ResponseEntity getPaidNotices(String fiscalCode, 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 2666d226..442d59ec 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 @@ -1,37 +1,36 @@ package it.gov.pagopa.bizeventsservice.controller.impl; -import javax.validation.constraints.NotBlank; - +import it.gov.pagopa.bizeventsservice.controller.IPaymentsController; +import it.gov.pagopa.bizeventsservice.model.response.CtReceiptModelResponse; +import it.gov.pagopa.bizeventsservice.service.IBizEventsService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.RestController; -import it.gov.pagopa.bizeventsservice.controller.IPaymentsController; -import it.gov.pagopa.bizeventsservice.model.response.CtReceiptModelResponse; -import it.gov.pagopa.bizeventsservice.service.IBizEventsService; +import javax.validation.constraints.NotBlank; @RestController public class PaymentsController implements IPaymentsController { - - @Autowired - private IBizEventsService bizEventsService; + + @Autowired + private IBizEventsService bizEventsService; @Override public ResponseEntity getOrganizationReceipt(@NotBlank String organizationFiscalCode, @NotBlank String iur, @NotBlank String iuv) { - return new ResponseEntity<>( - bizEventsService.getOrganizationReceipt(organizationFiscalCode, iur, iuv), + return new ResponseEntity<>( + bizEventsService.getOrganizationReceipt(organizationFiscalCode, iur, iuv), HttpStatus.OK); } - @Override - public ResponseEntity getOrganizationReceipt(@NotBlank String organizationFiscalCode, - @NotBlank String iur) { - return new ResponseEntity<>( - bizEventsService.getOrganizationReceipt(organizationFiscalCode, iur), - 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/controller/impl/TransactionController.java b/src/main/java/it/gov/pagopa/bizeventsservice/controller/impl/TransactionController.java index f5ff1da1..8f487745 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/controller/impl/TransactionController.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/controller/impl/TransactionController.java @@ -29,24 +29,24 @@ public class TransactionController implements ITransactionController { private final IBizEventsService bizEventsService; @Autowired - public TransactionController(ITransactionService transactionService, IBizEventsService bizEventsService, - IReceiptGetPDFClient receiptClient, IReceiptGeneratePDFClient generateReceiptClient) { + public TransactionController(ITransactionService transactionService, IBizEventsService bizEventsService, + IReceiptGetPDFClient receiptClient, IReceiptGeneratePDFClient generateReceiptClient) { this.transactionService = transactionService; this.bizEventsService = bizEventsService; } - + @Override - public ResponseEntity getTransactionList(String fiscalCode, Boolean isPayer, Boolean isDebtor, - String continuationToken, Integer size, TransactionListOrder orderBy, Direction ordering) { - TransactionListResponse transactionListResponse = transactionService.getTransactionList(fiscalCode, isPayer, isDebtor, - continuationToken, size, orderBy, ordering); + public ResponseEntity getTransactionList(String fiscalCode, Boolean isPayer, Boolean isDebtor, + String continuationToken, Integer size, TransactionListOrder orderBy, Direction ordering) { + TransactionListResponse transactionListResponse = transactionService.getTransactionList(fiscalCode, isPayer, isDebtor, + continuationToken, size, orderBy, ordering); return ResponseEntity.ok() .header(X_CONTINUATION_TOKEN, transactionListResponse.getContinuationToken()) .body(TransactionListWrapResponse.builder().transactions(transactionListResponse.getTransactionList()).build()); } - + @Override public ResponseEntity getTransactionDetails(String fiscalCode, String eventReference) { @@ -63,16 +63,16 @@ public ResponseEntity disableTransaction(String fiscalCode, String transac @Override public ResponseEntity getPDFReceipt(@NotBlank String fiscalCode, @NotBlank String eventId) { - // to check if is an OLD event present only on the PM --> the receipt is not available for events present exclusively on the PM - bizEventsService.getBizEvent(eventId); - byte[] receiptFile = transactionService.getPDFReceipt(fiscalCode, eventId); - return ResponseEntity - .ok() - .contentLength(receiptFile.length) - .contentType(MediaType.APPLICATION_PDF) - .header("content-disposition", "filename=receipt") - .body(receiptFile); + // to check if is an OLD event present only on the PM --> the receipt is not available for events present exclusively on the PM + bizEventsService.getBizEvent(eventId); + byte[] receiptFile = transactionService.getPDFReceipt(fiscalCode, eventId); + return ResponseEntity + .ok() + .contentLength(receiptFile.length) + .contentType(MediaType.APPLICATION_PDF) + .header("content-disposition", "filename=receipt") + .body(receiptFile); } - + } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/entity/AuthRequest.java b/src/main/java/it/gov/pagopa/bizeventsservice/entity/AuthRequest.java index a9b83147..b67566e1 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/entity/AuthRequest.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/entity/AuthRequest.java @@ -1,12 +1,7 @@ package it.gov.pagopa.bizeventsservice.entity; import com.fasterxml.jackson.annotation.JsonProperty; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; +import lombok.*; @Getter @Setter @@ -14,10 +9,10 @@ @AllArgsConstructor @Builder public class AuthRequest { - private String authOutcome; - private String guid; - private String correlationId; - private String error; - @JsonProperty(value="auth_code") - private String authCode; + private String authOutcome; + private String guid; + private String correlationId; + private String error; + @JsonProperty(value = "auth_code") + private String authCode; } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/entity/BizEvent.java b/src/main/java/it/gov/pagopa/bizeventsservice/entity/BizEvent.java index 857c6910..1e362116 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/entity/BizEvent.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/entity/BizEvent.java @@ -1,18 +1,13 @@ package it.gov.pagopa.bizeventsservice.entity; -import java.util.List; - import com.azure.spring.data.cosmos.core.mapping.Container; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; - import it.gov.pagopa.bizeventsservice.model.response.enumeration.StatusType; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; +import lombok.*; -@Container(containerName = "${azure.cosmos.biz-events-container-name}", autoCreateContainer = false, ru="1000") +import java.util.List; + +@Container(containerName = "${azure.cosmos.biz-events-container-name}", autoCreateContainer = false, ru = "1000") @Getter @Setter @NoArgsConstructor @@ -20,22 +15,22 @@ @Builder @JsonIgnoreProperties(ignoreUnknown = true) public class BizEvent { - private String id; - private String version; - private String idPaymentManager; - private String complete; - private String receiptId; - private List missingInfo; - private DebtorPosition debtorPosition; - private Creditor creditor; - private Psp psp; - private Debtor debtor; - private Payer payer; - private PaymentInfo paymentInfo; - private List transferList; - private TransactionDetails transactionDetails; - - // internal management fields - private StatusType eventStatus; - private Integer eventRetryEnrichmentCount; + private String id; + private String version; + private String idPaymentManager; + private String complete; + private String receiptId; + private List missingInfo; + private DebtorPosition debtorPosition; + private Creditor creditor; + private Psp psp; + private Debtor debtor; + private Payer payer; + private PaymentInfo paymentInfo; + private List transferList; + private TransactionDetails transactionDetails; + + // internal management fields + private StatusType eventStatus; + private Integer eventRetryEnrichmentCount; } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/entity/Creditor.java b/src/main/java/it/gov/pagopa/bizeventsservice/entity/Creditor.java index adbbd089..db6d8d6a 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/entity/Creditor.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/entity/Creditor.java @@ -1,10 +1,6 @@ package it.gov.pagopa.bizeventsservice.entity; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; +import lombok.*; @Getter @Setter @@ -12,9 +8,9 @@ @AllArgsConstructor @Builder public class Creditor { - private String idPA; - private String idBrokerPA; - private String idStation; - private String companyName; - private String officeName; + private String idPA; + private String idBrokerPA; + private String idStation; + private String companyName; + private String officeName; } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/entity/Debtor.java b/src/main/java/it/gov/pagopa/bizeventsservice/entity/Debtor.java index b3a32ec0..55c3d3b6 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/entity/Debtor.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/entity/Debtor.java @@ -1,12 +1,7 @@ package it.gov.pagopa.bizeventsservice.entity; import com.fasterxml.jackson.annotation.JsonProperty; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; +import lombok.*; @Getter @Setter @@ -14,15 +9,15 @@ @AllArgsConstructor @Builder public class Debtor { - private String fullName; - private String entityUniqueIdentifierType; - private String entityUniqueIdentifierValue; - private String streetName; - private String civicNumber; - private String postalCode; - private String city; - private String stateProvinceRegion; - private String country; - @JsonProperty(value="eMail") - private String eMail; + private String fullName; + private String entityUniqueIdentifierType; + private String entityUniqueIdentifierValue; + private String streetName; + private String civicNumber; + private String postalCode; + private String city; + private String stateProvinceRegion; + private String country; + @JsonProperty(value = "eMail") + private String eMail; } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/entity/DebtorPosition.java b/src/main/java/it/gov/pagopa/bizeventsservice/entity/DebtorPosition.java index f4716e5f..a826cbb0 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/entity/DebtorPosition.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/entity/DebtorPosition.java @@ -1,10 +1,6 @@ package it.gov.pagopa.bizeventsservice.entity; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; +import lombok.*; @Getter @Setter @@ -12,8 +8,8 @@ @AllArgsConstructor @Builder public class DebtorPosition { - private String modelType; - private String noticeNumber; - private String iuv; - private String iur; + private String modelType; + private String noticeNumber; + private String iuv; + private String iur; } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/entity/Details.java b/src/main/java/it/gov/pagopa/bizeventsservice/entity/Details.java index bb2dde24..386c3987 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/entity/Details.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/entity/Details.java @@ -1,10 +1,6 @@ package it.gov.pagopa.bizeventsservice.entity; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; +import lombok.*; @Getter @Setter @@ -12,7 +8,7 @@ @AllArgsConstructor @Builder public class Details { - private String blurredNumber; - private String holder; - private String circuit; + private String blurredNumber; + private String holder; + private String circuit; } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/entity/Info.java b/src/main/java/it/gov/pagopa/bizeventsservice/entity/Info.java index 5774c7cd..20797054 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/entity/Info.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/entity/Info.java @@ -1,10 +1,6 @@ package it.gov.pagopa.bizeventsservice.entity; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; +import lombok.*; @Getter @Setter @@ -12,13 +8,13 @@ @AllArgsConstructor @Builder public class Info { - private String type; - private String blurredNumber; - private String holder; - private String expireMonth; - private String expireYear; - private String brand; - private String issuerAbi; - private String issuerName; - private String label; + private String type; + private String blurredNumber; + private String holder; + private String expireMonth; + private String expireYear; + private String brand; + private String issuerAbi; + private String issuerName; + private String label; } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/entity/MBD.java b/src/main/java/it/gov/pagopa/bizeventsservice/entity/MBD.java index 802b3d51..e9ee433f 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/entity/MBD.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/entity/MBD.java @@ -1,12 +1,7 @@ package it.gov.pagopa.bizeventsservice.entity; import com.fasterxml.jackson.annotation.JsonProperty; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; +import lombok.*; @Getter @Setter @@ -14,15 +9,15 @@ @AllArgsConstructor @Builder public class MBD { - @JsonProperty(value="IUBD") - private String iubd; - @JsonProperty(value="oraAcquisto") - private String purchaseTime; - @JsonProperty(value="importo") - private String amount; - @JsonProperty(value="tipoBollo") - private String stampType; - @JsonProperty(value="MBDAttachment") - private String mbdAttachment; //MBD base64 + @JsonProperty(value = "IUBD") + private String iubd; + @JsonProperty(value = "oraAcquisto") + private String purchaseTime; + @JsonProperty(value = "importo") + private String amount; + @JsonProperty(value = "tipoBollo") + private String stampType; + @JsonProperty(value = "MBDAttachment") + private String mbdAttachment; //MBD base64 } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/entity/MapEntry.java b/src/main/java/it/gov/pagopa/bizeventsservice/entity/MapEntry.java index 4d04b060..bc9b356a 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/entity/MapEntry.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/entity/MapEntry.java @@ -1,22 +1,22 @@ package it.gov.pagopa.bizeventsservice.entity; -import java.io.Serializable; - import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; +import java.io.Serializable; + @Builder @Data @NoArgsConstructor @AllArgsConstructor -public class MapEntry implements Serializable{ - /** - * generated serialVersionUID - */ - private static final long serialVersionUID = 2810311910394417162L; - - private String key; - private String value; +public class MapEntry implements Serializable { + /** + * generated serialVersionUID + */ + private static final long serialVersionUID = 2810311910394417162L; + + private String key; + private String value; } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/entity/Payer.java b/src/main/java/it/gov/pagopa/bizeventsservice/entity/Payer.java index 039649d1..71841d7b 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/entity/Payer.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/entity/Payer.java @@ -1,12 +1,7 @@ package it.gov.pagopa.bizeventsservice.entity; import com.fasterxml.jackson.annotation.JsonProperty; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; +import lombok.*; @Getter @Setter @@ -14,15 +9,15 @@ @AllArgsConstructor @Builder public class Payer { - private String fullName; - private String entityUniqueIdentifierType; - private String entityUniqueIdentifierValue; - private String streetName; - private String civicNumber; - private String postalCode; - private String city; - private String stateProvinceRegion; - private String country; - @JsonProperty(value="eMail") - private String eMail; + private String fullName; + private String entityUniqueIdentifierType; + private String entityUniqueIdentifierValue; + private String streetName; + private String civicNumber; + private String postalCode; + private String city; + private String stateProvinceRegion; + private String country; + @JsonProperty(value = "eMail") + private String eMail; } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/entity/PaymentAuthorizationRequest.java b/src/main/java/it/gov/pagopa/bizeventsservice/entity/PaymentAuthorizationRequest.java index bb1fcf6b..768c6b71 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/entity/PaymentAuthorizationRequest.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/entity/PaymentAuthorizationRequest.java @@ -1,10 +1,6 @@ package it.gov.pagopa.bizeventsservice.entity; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; +import lombok.*; @Getter @Setter @@ -12,10 +8,10 @@ @AllArgsConstructor @Builder public class PaymentAuthorizationRequest { - private String authOutcome; - private String requestId; - private String correlationId; - private String authCode; - private String paymentMethodType; - private Details details; + private String authOutcome; + private String requestId; + private String correlationId; + private String authCode; + private String paymentMethodType; + private Details details; } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/entity/PaymentInfo.java b/src/main/java/it/gov/pagopa/bizeventsservice/entity/PaymentInfo.java index 34f46bc1..88cb4456 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/entity/PaymentInfo.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/entity/PaymentInfo.java @@ -1,14 +1,10 @@ package it.gov.pagopa.bizeventsservice.entity; -import java.util.List; - import com.fasterxml.jackson.annotation.JsonProperty; import it.gov.pagopa.bizeventsservice.model.MapEntry; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; +import lombok.*; + +import java.util.List; @Getter @Setter @@ -16,22 +12,22 @@ @AllArgsConstructor @Builder public class PaymentInfo { - private String paymentDateTime; - private String applicationDate; - private String transferDate; - private String dueDate; - private String paymentToken; - private String amount; - private String fee; - private String primaryCiIncurredFee; - private String idBundle; - private String idCiBundle; - private String totalNotice; - private String paymentMethod; - private String touchpoint; - private String remittanceInformation; - private String description; - private List metadata; - @JsonProperty(value="IUR") - private String IUR; + private String paymentDateTime; + private String applicationDate; + private String transferDate; + private String dueDate; + private String paymentToken; + private String amount; + private String fee; + private String primaryCiIncurredFee; + private String idBundle; + private String idCiBundle; + private String totalNotice; + private String paymentMethod; + private String touchpoint; + private String remittanceInformation; + private String description; + private List metadata; + @JsonProperty(value = "IUR") + private String IUR; } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/entity/Psp.java b/src/main/java/it/gov/pagopa/bizeventsservice/entity/Psp.java index 77486aa9..d781eb4e 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/entity/Psp.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/entity/Psp.java @@ -1,10 +1,6 @@ package it.gov.pagopa.bizeventsservice.entity; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; +import lombok.*; @Getter @Setter @@ -12,11 +8,11 @@ @AllArgsConstructor @Builder public class Psp { - private String idPsp; - private String idBrokerPsp; - private String idChannel; - private String psp; - private String pspPartitaIVA; - private String pspFiscalCode; - private String channelDescription; + private String idPsp; + private String idBrokerPsp; + private String idChannel; + private String psp; + private String pspPartitaIVA; + private String pspFiscalCode; + private String channelDescription; } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/entity/Transaction.java b/src/main/java/it/gov/pagopa/bizeventsservice/entity/Transaction.java index 96c86365..53f5b60b 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/entity/Transaction.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/entity/Transaction.java @@ -10,18 +10,18 @@ @Builder @JsonIgnoreProperties(ignoreUnknown = true) public class Transaction { - private String idTransaction; - private String transactionId; - private long grandTotal; - private long amount; - private long fee; - private String transactionStatus; - private String accountingStatus; - private String rrn; - private String authorizationCode; - private String creationDate; - private String numAut; - private String accountCode; - private TransactionPsp psp; - private String origin; + private String idTransaction; + private String transactionId; + private long grandTotal; + private long amount; + private long fee; + private String transactionStatus; + private String accountingStatus; + private String rrn; + private String authorizationCode; + private String creationDate; + private String numAut; + private String accountCode; + private TransactionPsp psp; + private String origin; } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/entity/TransactionDetails.java b/src/main/java/it/gov/pagopa/bizeventsservice/entity/TransactionDetails.java index da035808..5efbcef2 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/entity/TransactionDetails.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/entity/TransactionDetails.java @@ -1,10 +1,6 @@ package it.gov.pagopa.bizeventsservice.entity; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; +import lombok.*; @Getter @Setter @@ -12,10 +8,10 @@ @AllArgsConstructor @Builder public class TransactionDetails { - private User user; - private PaymentAuthorizationRequest paymentAuthorizationRequest; - private WalletItem wallet; - private String origin; - private Transaction transaction; - private InfoTransaction info; + private User user; + private PaymentAuthorizationRequest paymentAuthorizationRequest; + private WalletItem wallet; + private String origin; + private Transaction transaction; + private InfoTransaction info; } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/entity/TransactionPsp.java b/src/main/java/it/gov/pagopa/bizeventsservice/entity/TransactionPsp.java index 6d35ff83..4932e3f2 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/entity/TransactionPsp.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/entity/TransactionPsp.java @@ -10,7 +10,7 @@ @Builder @JsonIgnoreProperties(ignoreUnknown = true) public class TransactionPsp { - private String idChannel; - private String businessName; - private String serviceName; + private String idChannel; + private String businessName; + private String serviceName; } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/entity/Transfer.java b/src/main/java/it/gov/pagopa/bizeventsservice/entity/Transfer.java index fb082795..34cbfcfc 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/entity/Transfer.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/entity/Transfer.java @@ -1,15 +1,10 @@ package it.gov.pagopa.bizeventsservice.entity; -import java.util.List; - import com.fasterxml.jackson.annotation.JsonProperty; - import it.gov.pagopa.bizeventsservice.model.MapEntry; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; +import lombok.*; + +import java.util.List; @Getter @Setter @@ -17,16 +12,16 @@ @AllArgsConstructor @Builder public class Transfer { - @Builder.Default - private String idTransfer = "0"; - private String fiscalCodePA; - private String companyName; - private String amount; - private String transferCategory; - private String remittanceInformation; - @JsonProperty(value="IBAN") - private String iban; - @JsonProperty(value="MBD") - private MBD mbd; - private List metadata; + @Builder.Default + private String idTransfer = "0"; + private String fiscalCodePA; + private String companyName; + private String amount; + private String transferCategory; + private String remittanceInformation; + @JsonProperty(value = "IBAN") + private String iban; + @JsonProperty(value = "MBD") + private MBD mbd; + private List metadata; } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/entity/User.java b/src/main/java/it/gov/pagopa/bizeventsservice/entity/User.java index f39070d5..64130f73 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/entity/User.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/entity/User.java @@ -1,11 +1,7 @@ package it.gov.pagopa.bizeventsservice.entity; import it.gov.pagopa.bizeventsservice.model.response.enumeration.UserType; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; +import lombok.*; @Getter @Setter @@ -13,11 +9,11 @@ @AllArgsConstructor @Builder public class User { - private String fullName; - private UserType type; - private String fiscalCode; - private String notificationEmail; - private String userId; - private String userStatus; - private String userStatusDescription; + private String fullName; + private UserType type; + private String fiscalCode; + private String notificationEmail; + private String userId; + private String userStatus; + private String userStatusDescription; } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/entity/WalletItem.java b/src/main/java/it/gov/pagopa/bizeventsservice/entity/WalletItem.java index 0273eb10..7e8a9f21 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/entity/WalletItem.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/entity/WalletItem.java @@ -1,13 +1,9 @@ package it.gov.pagopa.bizeventsservice.entity; -import java.util.List; - import it.gov.pagopa.bizeventsservice.model.response.enumeration.WalletType; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; +import lombok.*; + +import java.util.List; @Getter @Setter @@ -15,13 +11,13 @@ @AllArgsConstructor @Builder public class WalletItem { - private String idWallet; - private WalletType walletType; - private List enableableFunctions; - private boolean pagoPa; - private String onboardingChannel; - private boolean favourite; - private String createDate; - private Info info; - private AuthRequest authRequest; + private String idWallet; + private WalletType walletType; + private List enableableFunctions; + private boolean pagoPa; + private String onboardingChannel; + private boolean favourite; + private String createDate; + private Info info; + private AuthRequest authRequest; } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/entity/view/BizEventsViewCart.java b/src/main/java/it/gov/pagopa/bizeventsservice/entity/view/BizEventsViewCart.java index 69ea6a35..8ccd51dd 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/entity/view/BizEventsViewCart.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/entity/view/BizEventsViewCart.java @@ -8,7 +8,7 @@ /** * Entity model for biz-events-view-cart */ -@Container(containerName = "${azure.cosmos.biz-events-view-cart-container-name}", autoCreateContainer = false, ru="1000") +@Container(containerName = "${azure.cosmos.biz-events-view-cart-container-name}", autoCreateContainer = false, ru = "1000") @NoArgsConstructor @AllArgsConstructor @Builder diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/entity/view/BizEventsViewGeneral.java b/src/main/java/it/gov/pagopa/bizeventsservice/entity/view/BizEventsViewGeneral.java index 656aea80..f340b29b 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/entity/view/BizEventsViewGeneral.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/entity/view/BizEventsViewGeneral.java @@ -13,7 +13,7 @@ /** * Entity model for biz-events-view-general */ -@Container(containerName = "${azure.cosmos.biz-events-view-general-container-name}", autoCreateContainer = false, ru="1000") +@Container(containerName = "${azure.cosmos.biz-events-view-general-container-name}", autoCreateContainer = false, ru = "1000") @Builder @AllArgsConstructor @NoArgsConstructor diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/entity/view/BizEventsViewUser.java b/src/main/java/it/gov/pagopa/bizeventsservice/entity/view/BizEventsViewUser.java index 2fbe8129..6143d7e8 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/entity/view/BizEventsViewUser.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/entity/view/BizEventsViewUser.java @@ -1,18 +1,18 @@ package it.gov.pagopa.bizeventsservice.entity.view; -import java.io.Serializable; -import java.time.LocalDateTime; -import java.time.format.DateTimeFormatter; - import com.azure.spring.data.cosmos.core.mapping.Container; import com.azure.spring.data.cosmos.core.mapping.GeneratedValue; import com.azure.spring.data.cosmos.core.mapping.PartitionKey; import lombok.*; +import java.io.Serializable; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; + /** * Entity model for biz-events-view-user */ -@Container(containerName = "${azure.cosmos.biz-events-view-user-container-name}", autoCreateContainer = false, ru="1000") +@Container(containerName = "${azure.cosmos.biz-events-view-user-container-name}", autoCreateContainer = false, ru = "1000") @AllArgsConstructor @NoArgsConstructor @Getter @@ -20,11 +20,11 @@ @Builder public class BizEventsViewUser implements Serializable { /** - * - */ - private static final long serialVersionUID = -4997399615775767480L; - - @GeneratedValue + * + */ + private static final long serialVersionUID = -4997399615775767480L; + + @GeneratedValue private String id; @PartitionKey private String taxCode; @@ -33,9 +33,9 @@ public class BizEventsViewUser implements Serializable { private Boolean hidden; private Boolean isPayer; private Boolean isDebtor; - + public LocalDateTime getTransactionDateAsLocalDateTime() { - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("[yyyy-MM-dd'T'HH:mm:ss'Z'][yyyy-MM-dd'T'HH:mm:ss.SSSSSS]"); - return LocalDateTime.parse(this.getTransactionDate(), formatter); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("[yyyy-MM-dd'T'HH:mm:ss'Z'][yyyy-MM-dd'T'HH:mm:ss.SSSSSS]"); + return LocalDateTime.parse(this.getTransactionDate(), formatter); } } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/entity/view/UserDetail.java b/src/main/java/it/gov/pagopa/bizeventsservice/entity/view/UserDetail.java index 6d1e670c..352f0c80 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/entity/view/UserDetail.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/entity/view/UserDetail.java @@ -1,18 +1,15 @@ package it.gov.pagopa.bizeventsservice.entity.view; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import java.io.Serializable; - import javax.validation.constraints.NotNull; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; - -import io.swagger.v3.oas.annotations.media.Schema; +import java.io.Serializable; @Builder @Data @@ -22,12 +19,12 @@ public class UserDetail implements Serializable { /** - * - */ - private static final long serialVersionUID = -5682201542579999764L; - - private String name; - @Schema(required = true) + * + */ + private static final long serialVersionUID = -5682201542579999764L; + + private String name; + @Schema(required = true) @NotNull private String taxCode; } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/entity/view/WalletInfo.java b/src/main/java/it/gov/pagopa/bizeventsservice/entity/view/WalletInfo.java index 144bc36d..6366c7cf 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/entity/view/WalletInfo.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/entity/view/WalletInfo.java @@ -1,5 +1,7 @@ package it.gov.pagopa.bizeventsservice.entity.view; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -7,9 +9,6 @@ import java.io.Serializable; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; - @Builder @Data @NoArgsConstructor @@ -18,10 +17,10 @@ public class WalletInfo implements Serializable { /** - * - */ - private static final long serialVersionUID = -6409303257722729484L; - private String accountHolder; + * + */ + private static final long serialVersionUID = -6409303257722729484L; + private String accountHolder; private String brand; private String blurredNumber; private String maskedEmail; diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/entity/view/enumeration/OriginType.java b/src/main/java/it/gov/pagopa/bizeventsservice/entity/view/enumeration/OriginType.java index 4c326e7b..67ee680e 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/entity/view/enumeration/OriginType.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/entity/view/enumeration/OriginType.java @@ -6,7 +6,7 @@ * Enum for transaction origin */ public enum OriginType { - INTERNAL, PM, NDP001PROD , NDP002PROD, NDP003PROD, UNKNOWN; + INTERNAL, PM, NDP001PROD, NDP002PROD, NDP003PROD, UNKNOWN; public static boolean isValidOrigin(String origin) { return Arrays.stream(values()).anyMatch(it -> it.name().equalsIgnoreCase(origin)); 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 cb5d7e32..7b62b8cd 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/exception/AppError.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/exception/AppError.java @@ -8,11 +8,11 @@ @Getter public enum AppError { - 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_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_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"), diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/exception/AppException.java b/src/main/java/it/gov/pagopa/bizeventsservice/exception/AppException.java index 9c984d1c..bfee177e 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/exception/AppException.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/exception/AppException.java @@ -18,11 +18,11 @@ public class AppException extends RuntimeException { /** - * generated serialVersionUID - */ - private static final long serialVersionUID = -287761796463684311L; + * generated serialVersionUID + */ + private static final long serialVersionUID = -287761796463684311L; - /** + /** * title returned to the response when this exception occurred */ String title; diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/mapper/ConvertBizEventEntityToCtReceiptModelResponse.java b/src/main/java/it/gov/pagopa/bizeventsservice/mapper/ConvertBizEventEntityToCtReceiptModelResponse.java index b0b259c6..382f7b9c 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/mapper/ConvertBizEventEntityToCtReceiptModelResponse.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/mapper/ConvertBizEventEntityToCtReceiptModelResponse.java @@ -1,17 +1,5 @@ package it.gov.pagopa.bizeventsservice.mapper; -import java.math.BigDecimal; -import java.time.LocalDate; -import java.time.format.DateTimeFormatter; -import java.util.ArrayList; -import java.util.List; - -import javax.validation.Valid; - -import org.apache.commons.lang3.StringUtils; -import org.modelmapper.Converter; -import org.modelmapper.spi.MappingContext; - import it.gov.pagopa.bizeventsservice.entity.BizEvent; import it.gov.pagopa.bizeventsservice.entity.Transfer; import it.gov.pagopa.bizeventsservice.model.response.CtReceiptModelResponse; @@ -19,96 +7,106 @@ import it.gov.pagopa.bizeventsservice.model.response.Payer; import it.gov.pagopa.bizeventsservice.model.response.TransferPA; import it.gov.pagopa.bizeventsservice.model.response.enumeration.EntityUniqueIdentifierType; +import org.apache.commons.lang3.StringUtils; +import org.modelmapper.Converter; +import org.modelmapper.spi.MappingContext; + +import javax.validation.Valid; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; +import java.util.ArrayList; +import java.util.List; public class ConvertBizEventEntityToCtReceiptModelResponse implements Converter { @Override public CtReceiptModelResponse convert(MappingContext mappingContext) { @Valid BizEvent be = mappingContext.getSource(); - - DateTimeFormatter dfDate = DateTimeFormatter.ofPattern("yyyy-MM-dd"); - DateTimeFormatter dfDateTime = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss"); + + DateTimeFormatter dfDate = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + DateTimeFormatter dfDateTime = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss"); Debtor ctReceiptDebtor = null; - Payer ctReceiptPayer = null; + Payer ctReceiptPayer = null; List ctTransferListPA = null; - + if (null != be.getDebtor()) { - ctReceiptDebtor = Debtor.builder() - .entityUniqueIdentifierType(EntityUniqueIdentifierType.valueOf(be.getDebtor().getEntityUniqueIdentifierType())) - .entityUniqueIdentifierValue(be.getDebtor().getEntityUniqueIdentifierValue()) - .fullName(be.getDebtor().getFullName()) - .streetName(be.getDebtor().getStreetName()) - .civicNumber(be.getDebtor().getCivicNumber()) - .postalCode(be.getDebtor().getPostalCode()) - .city(be.getDebtor().getCity()) - .stateProvinceRegion(be.getDebtor().getStateProvinceRegion()) - .country(be.getDebtor().getCountry()) - .eMail(be.getDebtor().getEMail()) - .build(); + ctReceiptDebtor = Debtor.builder() + .entityUniqueIdentifierType(EntityUniqueIdentifierType.valueOf(be.getDebtor().getEntityUniqueIdentifierType())) + .entityUniqueIdentifierValue(be.getDebtor().getEntityUniqueIdentifierValue()) + .fullName(be.getDebtor().getFullName()) + .streetName(be.getDebtor().getStreetName()) + .civicNumber(be.getDebtor().getCivicNumber()) + .postalCode(be.getDebtor().getPostalCode()) + .city(be.getDebtor().getCity()) + .stateProvinceRegion(be.getDebtor().getStateProvinceRegion()) + .country(be.getDebtor().getCountry()) + .eMail(be.getDebtor().getEMail()) + .build(); } if (null != be.getPayer()) { - ctReceiptPayer = Payer.builder() - .entityUniqueIdentifierType(EntityUniqueIdentifierType.valueOf(be.getPayer().getEntityUniqueIdentifierType())) - .entityUniqueIdentifierValue(be.getPayer().getEntityUniqueIdentifierValue()) - .fullName(be.getPayer().getFullName()) - .streetName(be.getPayer().getStreetName()) - .civicNumber(be.getPayer().getCivicNumber()) - .postalCode(be.getPayer().getPostalCode()) - .city(be.getPayer().getCity()) - .stateProvinceRegion(be.getPayer().getStateProvinceRegion()) - .country(be.getPayer().getCountry()) - .eMail(be.getPayer().getEMail()) - .build(); + ctReceiptPayer = Payer.builder() + .entityUniqueIdentifierType(EntityUniqueIdentifierType.valueOf(be.getPayer().getEntityUniqueIdentifierType())) + .entityUniqueIdentifierValue(be.getPayer().getEntityUniqueIdentifierValue()) + .fullName(be.getPayer().getFullName()) + .streetName(be.getPayer().getStreetName()) + .civicNumber(be.getPayer().getCivicNumber()) + .postalCode(be.getPayer().getPostalCode()) + .city(be.getPayer().getCity()) + .stateProvinceRegion(be.getPayer().getStateProvinceRegion()) + .country(be.getPayer().getCountry()) + .eMail(be.getPayer().getEMail()) + .build(); } if (null != be.getTransferList() && !be.getTransferList().isEmpty()) { - ctTransferListPA = new ArrayList<>(); - for (Transfer t : be.getTransferList()) { - ctTransferListPA.add(TransferPA.builder() - .idTransfer(Integer.valueOf(t.getIdTransfer())) - .transferAmount(BigDecimal.valueOf(Double.valueOf(t.getAmount()))) - .fiscalCodePA(t.getFiscalCodePA()) - .iban(t.getIban()) - .mbdAttachment(null != t.getMbd() ? t.getMbd().getMbdAttachment() : null) - .remittanceInformation(t.getRemittanceInformation()) - .transferCategory(t.getTransferCategory()) - .metadata(t.getMetadata()) - .build()); - } + ctTransferListPA = new ArrayList<>(); + for (Transfer t : be.getTransferList()) { + ctTransferListPA.add(TransferPA.builder() + .idTransfer(Integer.valueOf(t.getIdTransfer())) + .transferAmount(BigDecimal.valueOf(Double.valueOf(t.getAmount()))) + .fiscalCodePA(t.getFiscalCodePA()) + .iban(t.getIban()) + .mbdAttachment(null != t.getMbd() ? t.getMbd().getMbdAttachment() : null) + .remittanceInformation(t.getRemittanceInformation()) + .transferCategory(t.getTransferCategory()) + .metadata(t.getMetadata()) + .build()); + } } - - + + return CtReceiptModelResponse.builder() - .receiptId(be.getReceiptId()) - .noticeNumber(be.getDebtorPosition().getNoticeNumber()) - .fiscalCode(be.getCreditor().getIdPA()) - .outcome("OK") // default hardcoded - .creditorReferenceId(be.getDebtorPosition().getIuv()) - .paymentAmount(BigDecimal.valueOf(Double.valueOf(be.getPaymentInfo().getAmount()))) - .description(be.getPaymentInfo().getRemittanceInformation()) - - .companyName(be.getCreditor().getCompanyName()) - .officeName(be.getCreditor().getOfficeName()) - - .debtor(ctReceiptDebtor) - .transferList(ctTransferListPA) - .idPSP(be.getPsp().getIdPsp()) - .pspFiscalCode(be.getPsp().getPspFiscalCode()) + .receiptId(be.getReceiptId()) + .noticeNumber(be.getDebtorPosition().getNoticeNumber()) + .fiscalCode(be.getCreditor().getIdPA()) + .outcome("OK") // default hardcoded + .creditorReferenceId(be.getDebtorPosition().getIuv()) + .paymentAmount(BigDecimal.valueOf(Double.valueOf(be.getPaymentInfo().getAmount()))) + .description(be.getPaymentInfo().getRemittanceInformation()) + + .companyName(be.getCreditor().getCompanyName()) + .officeName(be.getCreditor().getOfficeName()) + + .debtor(ctReceiptDebtor) + .transferList(ctTransferListPA) + .idPSP(be.getPsp().getIdPsp()) + .pspFiscalCode(be.getPsp().getPspFiscalCode()) .pspPartitaIVA(be.getPsp().getPspPartitaIVA()) .pspCompanyName(be.getPsp().getPsp()) .idChannel(be.getPsp().getIdChannel()) .channelDescription(be.getPsp().getChannelDescription()) - + .payer(ctReceiptPayer) .paymentMethod(be.getPaymentInfo().getPaymentMethod()) - + .fee(BigDecimal.valueOf(null != be.getPaymentInfo().getFee() ? Double.valueOf(be.getPaymentInfo().getFee()) : null)) - .primaryCiIncurredFee(null != be.getPaymentInfo().getPrimaryCiIncurredFee() ? - BigDecimal.valueOf(Double.valueOf(be.getPaymentInfo().getPrimaryCiIncurredFee())) : null) + .primaryCiIncurredFee(null != be.getPaymentInfo().getPrimaryCiIncurredFee() ? + BigDecimal.valueOf(Double.valueOf(be.getPaymentInfo().getPrimaryCiIncurredFee())) : null) .idBundle(be.getPaymentInfo().getIdBundle()) .idCiBundle(be.getPaymentInfo().getIdCiBundle()) - .paymentDateTime(LocalDate.parse(StringUtils.substringBeforeLast(be.getPaymentInfo().getPaymentDateTime(),"."), dfDateTime)) + .paymentDateTime(LocalDate.parse(StringUtils.substringBeforeLast(be.getPaymentInfo().getPaymentDateTime(), "."), dfDateTime)) .applicationDate(null != be.getPaymentInfo().getApplicationDate() ? LocalDate.parse(be.getPaymentInfo().getApplicationDate(), dfDate) : null) .transferDate(null != be.getPaymentInfo().getTransferDate() ? LocalDate.parse(be.getPaymentInfo().getTransferDate(), dfDate) : null) .metadata(be.getPaymentInfo().getMetadata()) diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/mapper/ConvertViewsToTransactionDetailResponse.java b/src/main/java/it/gov/pagopa/bizeventsservice/mapper/ConvertViewsToTransactionDetailResponse.java index 9e28cff8..fda121e6 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/mapper/ConvertViewsToTransactionDetailResponse.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/mapper/ConvertViewsToTransactionDetailResponse.java @@ -3,14 +3,11 @@ import it.gov.pagopa.bizeventsservice.entity.view.BizEventsViewCart; import it.gov.pagopa.bizeventsservice.entity.view.BizEventsViewGeneral; import it.gov.pagopa.bizeventsservice.entity.view.BizEventsViewUser; -import it.gov.pagopa.bizeventsservice.model.response.paidnotice.NoticeListItem; -import it.gov.pagopa.bizeventsservice.model.response.transaction.CartItem; -import it.gov.pagopa.bizeventsservice.model.response.transaction.InfoTransactionView; -import it.gov.pagopa.bizeventsservice.util.DateValidator; import it.gov.pagopa.bizeventsservice.model.response.paidnotice.InfoNotice; import it.gov.pagopa.bizeventsservice.model.response.paidnotice.NoticeDetailResponse; +import it.gov.pagopa.bizeventsservice.model.response.paidnotice.NoticeListItem; import it.gov.pagopa.bizeventsservice.model.response.transaction.*; - +import it.gov.pagopa.bizeventsservice.util.DateValidator; import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Value; @@ -23,27 +20,22 @@ import java.time.ZoneOffset; import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; -import java.util.*; +import java.util.ArrayList; +import java.util.List; import java.util.concurrent.atomic.AtomicReference; @Component public class ConvertViewsToTransactionDetailResponse { - private ConvertViewsToTransactionDetailResponse(){} - - private static String payeeCartName; - - private static final List LIST_RECEIPT_DATE_FORMAT_IN = Arrays.asList("yyyy-MM-dd'T'HH:mm:ss"); + private static final List LIST_RECEIPT_DATE_FORMAT_IN = List.of("yyyy-MM-dd'T'HH:mm:ss"); private static final String RECEIPT_DATE_FORMAT_OUT = "yyyy-MM-dd'T'HH:mm:ssX"; - - @Value("${transaction.payee.cartName:Pagamento Multiplo}") - public void setPayeeCartName(String payeeCartNameValue){ - payeeCartName = payeeCartNameValue; + private static String payeeCartName; + private ConvertViewsToTransactionDetailResponse() { } public static TransactionDetailResponse convertTransactionDetails(String taxCode, BizEventsViewGeneral bizEventsViewGeneral, List listOfCartViews) { List listOfCartItems = new ArrayList<>(); AtomicReference totalAmount = new AtomicReference<>(BigDecimal.ZERO); - + for (BizEventsViewCart bizEventsViewCart : listOfCartViews) { listOfCartItems.add( @@ -59,7 +51,7 @@ public static TransactionDetailResponse convertTransactionDetails(String taxCode BigDecimal amountExtracted = new BigDecimal(bizEventsViewCart.getAmount()); totalAmount.updateAndGet(v -> v.add(amountExtracted)); } - + // PAGOPA-1763: if the tax code refers to a debtor, do not show the sections relating to the payer boolean isDebtor = bizEventsViewGeneral.getPayer() == null || !bizEventsViewGeneral.getPayer().getTaxCode().equals(taxCode); return TransactionDetailResponse.builder() @@ -70,26 +62,26 @@ public static TransactionDetailResponse convertTransactionDetails(String taxCode .rrn(bizEventsViewGeneral.getRrn()) .transactionDate(dateFormatZoned(bizEventsViewGeneral.getTransactionDate())) .pspName(bizEventsViewGeneral.getPspName()) - .walletInfo(isDebtor ? null:bizEventsViewGeneral.getWalletInfo()) - .payer(isDebtor ? null:bizEventsViewGeneral.getPayer()) + .walletInfo(isDebtor ? null : bizEventsViewGeneral.getWalletInfo()) + .payer(isDebtor ? null : bizEventsViewGeneral.getPayer()) .amount(totalAmount.get().setScale(2, RoundingMode.UNNECESSARY).toString()) .fee(StringUtils.isNotEmpty(bizEventsViewGeneral.getFee()) ? bizEventsViewGeneral.getFee().replace(',', '.') : bizEventsViewGeneral.getFee()) - .paymentMethod(isDebtor ? null:bizEventsViewGeneral.getPaymentMethod()) + .paymentMethod(isDebtor ? null : bizEventsViewGeneral.getPaymentMethod()) .origin(bizEventsViewGeneral.getOrigin()) .build() ) .carts(listOfCartItems) .build(); } - + public static NoticeDetailResponse convertPaidNoticeDetails(String taxCode, BizEventsViewGeneral bizEventsViewGeneral, List listOfCartViews) { List listOfCartItems = new ArrayList<>(); AtomicReference totalAmount = new AtomicReference<>(BigDecimal.ZERO); - + for (BizEventsViewCart bizEventsViewCart : listOfCartViews) { listOfCartItems.add( - it.gov.pagopa.bizeventsservice.model.response.paidnotice.CartItem.builder() + it.gov.pagopa.bizeventsservice.model.response.paidnotice.CartItem.builder() .subject(bizEventsViewCart.getSubject()) .amount(new BigDecimal(bizEventsViewCart.getAmount()).setScale(2, RoundingMode.UNNECESSARY).toString()) .debtor(bizEventsViewCart.getDebtor()) @@ -101,7 +93,7 @@ public static NoticeDetailResponse convertPaidNoticeDetails(String taxCode, BizE BigDecimal amountExtracted = new BigDecimal(bizEventsViewCart.getAmount()); totalAmount.updateAndGet(v -> v.add(amountExtracted)); } - + // PAGOPA-1763: if the tax code refers to a debtor, do not show the sections relating to the payer boolean isDebtor = bizEventsViewGeneral.getPayer() == null || !bizEventsViewGeneral.getPayer().getTaxCode().equals(taxCode); return NoticeDetailResponse.builder() @@ -112,11 +104,11 @@ public static NoticeDetailResponse convertPaidNoticeDetails(String taxCode, BizE .rrn(bizEventsViewGeneral.getRrn()) .noticeDate(dateFormatZoned(bizEventsViewGeneral.getTransactionDate())) .pspName(bizEventsViewGeneral.getPspName()) - .walletInfo(isDebtor ? null:bizEventsViewGeneral.getWalletInfo()) - .payer(isDebtor ? null:bizEventsViewGeneral.getPayer()) + .walletInfo(isDebtor ? null : bizEventsViewGeneral.getWalletInfo()) + .payer(isDebtor ? null : bizEventsViewGeneral.getPayer()) .amount(totalAmount.get().setScale(2, RoundingMode.UNNECESSARY).toString()) .fee(StringUtils.isNotEmpty(bizEventsViewGeneral.getFee()) ? bizEventsViewGeneral.getFee().replace(',', '.') : bizEventsViewGeneral.getFee()) - .paymentMethod(isDebtor ? null:bizEventsViewGeneral.getPaymentMethod()) + .paymentMethod(isDebtor ? null : bizEventsViewGeneral.getPaymentMethod()) .origin(bizEventsViewGeneral.getOrigin()) .build() ) @@ -139,14 +131,13 @@ public static List convertToNoticeList(TransactionListResponse t .toList(); } - - public static TransactionListItem convertTransactionListItem(BizEventsViewUser viewUser, List listOfCartViews){ + public static TransactionListItem convertTransactionListItem(BizEventsViewUser viewUser, List listOfCartViews) { AtomicReference totalAmount = new AtomicReference<>(BigDecimal.ZERO); for (BizEventsViewCart bizEventsViewCart : listOfCartViews) { BigDecimal amountExtracted = new BigDecimal(bizEventsViewCart.getAmount()); totalAmount.updateAndGet(v -> v.add(amountExtracted)); } - + return TransactionListItem.builder() .transactionId(viewUser.getTransactionId()) .payeeName(listOfCartViews.size() > 1 ? payeeCartName : listOfCartViews.get(0).getPayee().getName()) @@ -159,24 +150,28 @@ public static TransactionListItem convertTransactionListItem(BizEventsViewUser v .isDebtor(BooleanUtils.isTrue(viewUser.getIsDebtor())) .build(); } - + private static String dateFormatZoned(String date) { - String dateSub = StringUtils.substringBeforeLast(date, "."); - if (!DateValidator.isValid(dateSub, RECEIPT_DATE_FORMAT_OUT)) { - return dateFormat(dateSub); - } - return dateSub; + String dateSub = StringUtils.substringBeforeLast(date, "."); + if (!DateValidator.isValid(dateSub, RECEIPT_DATE_FORMAT_OUT)) { + return dateFormat(dateSub); + } + return dateSub; } - - - private static String dateFormat(String date) { - for (String format: LIST_RECEIPT_DATE_FORMAT_IN) { - if (DateValidator.isValid(date, format)) { - LocalDateTime ldt = LocalDateTime.parse(date, DateTimeFormatter.ofPattern(format)); - ZonedDateTime zdt = ZonedDateTime.of(ldt, ZoneOffset.UTC); - return DateTimeFormatter.ofPattern(RECEIPT_DATE_FORMAT_OUT).format(zdt); - } - } - throw new DateTimeException("The date ["+date+"] is not in one of the expected formats "+LIST_RECEIPT_DATE_FORMAT_IN+" and cannot be parsed"); + + private static String dateFormat(String date) { + for (String format : LIST_RECEIPT_DATE_FORMAT_IN) { + if (DateValidator.isValid(date, format)) { + LocalDateTime ldt = LocalDateTime.parse(date, DateTimeFormatter.ofPattern(format)); + ZonedDateTime zdt = ZonedDateTime.of(ldt, ZoneOffset.UTC); + return DateTimeFormatter.ofPattern(RECEIPT_DATE_FORMAT_OUT).format(zdt); + } + } + throw new DateTimeException("The date [" + date + "] is not in one of the expected formats " + LIST_RECEIPT_DATE_FORMAT_IN + " and cannot be parsed"); + } + + @Value("${transaction.payee.cartName:Pagamento Multiplo}") + public void setPayeeCartName(String payeeCartNameValue) { + payeeCartName = payeeCartNameValue; } } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/model/AppCorsConfiguration.java b/src/main/java/it/gov/pagopa/bizeventsservice/model/AppCorsConfiguration.java index 6aa42eeb..10f0dfd2 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/model/AppCorsConfiguration.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/model/AppCorsConfiguration.java @@ -2,12 +2,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.AccessLevel; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; -import lombok.ToString; +import lombok.*; @Data @Builder(toBuilder = true) diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/model/AppInfo.java b/src/main/java/it/gov/pagopa/bizeventsservice/model/AppInfo.java index 08e52c32..89b42fa3 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/model/AppInfo.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/model/AppInfo.java @@ -1,12 +1,7 @@ package it.gov.pagopa.bizeventsservice.model; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import lombok.AccessLevel; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; -import lombok.ToString; +import lombok.*; @Data @Builder(toBuilder = true) diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/model/MapEntry.java b/src/main/java/it/gov/pagopa/bizeventsservice/model/MapEntry.java index 86ee4144..25c13d7c 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/model/MapEntry.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/model/MapEntry.java @@ -1,23 +1,23 @@ package it.gov.pagopa.bizeventsservice.model; -import java.io.Serializable; - import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; +import java.io.Serializable; + @Builder @Data @NoArgsConstructor @AllArgsConstructor -public class MapEntry implements Serializable{ - - /** - * generated serialVersionUID - */ - private static final long serialVersionUID = 7768010843596229040L; - - private String key; - private String value; +public class MapEntry implements Serializable { + + /** + * generated serialVersionUID + */ + private static final long serialVersionUID = 7768010843596229040L; + + private String key; + private String value; } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/model/PageInfo.java b/src/main/java/it/gov/pagopa/bizeventsservice/model/PageInfo.java index a663274b..efed45ce 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/model/PageInfo.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/model/PageInfo.java @@ -4,11 +4,7 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; -import lombok.ToString; +import lombok.*; import javax.validation.constraints.Positive; import javax.validation.constraints.PositiveOrZero; diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/model/ProblemJson.java b/src/main/java/it/gov/pagopa/bizeventsservice/model/ProblemJson.java index b82e63d8..a6017191 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/model/ProblemJson.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/model/ProblemJson.java @@ -3,11 +3,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; -import lombok.ToString; +import lombok.*; import javax.validation.constraints.Max; import javax.validation.constraints.Min; diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/CtReceiptModelResponse.java b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/CtReceiptModelResponse.java index b3a04b2c..345e798c 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/CtReceiptModelResponse.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/CtReceiptModelResponse.java @@ -1,13 +1,5 @@ package it.gov.pagopa.bizeventsservice.model.response; -import java.io.Serializable; -import java.math.BigDecimal; -import java.time.LocalDate; -import java.util.List; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; - import com.fasterxml.jackson.annotation.JsonFormat; import it.gov.pagopa.bizeventsservice.model.MapEntry; import lombok.AllArgsConstructor; @@ -15,21 +7,28 @@ import lombok.Data; import lombok.NoArgsConstructor; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.util.List; + @Builder @Data @NoArgsConstructor @AllArgsConstructor public class CtReceiptModelResponse implements Serializable { - /** - * generated serialVersionUID - */ - private static final long serialVersionUID = -242386899661512219L; - - @NotBlank(message = "receiptId is required") + /** + * generated serialVersionUID + */ + private static final long serialVersionUID = -242386899661512219L; + + @NotBlank(message = "receiptId is required") private String receiptId; - @NotBlank(message = "noticeNumber is required") + @NotBlank(message = "noticeNumber is required") private String noticeNumber; - @NotBlank(message = "fiscalCode is required") + @NotBlank(message = "fiscalCode is required") private String fiscalCode; @Builder.Default @NotBlank(message = "outcome is required") @@ -40,11 +39,11 @@ public class CtReceiptModelResponse implements Serializable { private BigDecimal paymentAmount; @NotBlank(message = "description is required") private String description; - + @NotBlank(message = "companyName is required") private String companyName; private String officeName; - + @NotNull(message = "debtor is required") private Debtor debtor; @NotNull(message = "transferList is required") @@ -56,26 +55,26 @@ public class CtReceiptModelResponse implements Serializable { @NotBlank(message = "pspCompanyName is required") private String pspCompanyName; @NotBlank(message = "idChannel is required") - private String idChannel; + private String idChannel; @NotBlank(message = "channelDescription is required") private String channelDescription; - + private Payer payer; private String paymentMethod; - + private BigDecimal fee; private BigDecimal primaryCiIncurredFee; private String idBundle; private String idCiBundle; - @JsonFormat(pattern="yyyy-MM-dd") - private LocalDate paymentDateTime; + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDate paymentDateTime; - @JsonFormat(pattern="yyyy-MM-dd") - private LocalDate applicationDate; + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDate applicationDate; - @JsonFormat(pattern="yyyy-MM-dd") - private LocalDate transferDate; + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDate transferDate; private List metadata; diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/Debtor.java b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/Debtor.java index a09c5d39..5567f3d8 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/Debtor.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/Debtor.java @@ -1,10 +1,5 @@ package it.gov.pagopa.bizeventsservice.model.response; -import java.io.Serializable; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; - import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import it.gov.pagopa.bizeventsservice.model.response.enumeration.EntityUniqueIdentifierType; @@ -13,29 +8,33 @@ import lombok.Data; import lombok.NoArgsConstructor; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; + @Builder @Data @NoArgsConstructor @AllArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class Debtor implements Serializable{ +public class Debtor implements Serializable { /** - * generated serialVersionUID - */ - private static final long serialVersionUID = -2534835118810669405L; - - @NotNull(message = "entityUniqueIdentifierType is required") - private EntityUniqueIdentifierType entityUniqueIdentifierType; - @NotBlank(message = "entityUniqueIdentifierValue is required") - private String entityUniqueIdentifierValue; - @NotBlank(message = "fullName is required") - private String fullName; + * generated serialVersionUID + */ + private static final long serialVersionUID = -2534835118810669405L; + + @NotNull(message = "entityUniqueIdentifierType is required") + private EntityUniqueIdentifierType entityUniqueIdentifierType; + @NotBlank(message = "entityUniqueIdentifierValue is required") + private String entityUniqueIdentifierValue; + @NotBlank(message = "fullName is required") + private String fullName; private String streetName; private String civicNumber; private String postalCode; private String city; private String stateProvinceRegion; private String country; - @JsonProperty(value="eMail") + @JsonProperty(value = "eMail") private String eMail; } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/Payer.java b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/Payer.java index c0a034c6..3ee35c33 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/Payer.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/Payer.java @@ -1,10 +1,5 @@ package it.gov.pagopa.bizeventsservice.model.response; -import java.io.Serializable; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; - import com.fasterxml.jackson.annotation.JsonProperty; import it.gov.pagopa.bizeventsservice.model.response.enumeration.EntityUniqueIdentifierType; import lombok.AllArgsConstructor; @@ -12,28 +7,32 @@ import lombok.Data; import lombok.NoArgsConstructor; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; + @Builder @Data @NoArgsConstructor @AllArgsConstructor -public class Payer implements Serializable{ +public class Payer implements Serializable { /** - * generated serialVersionUID - */ - private static final long serialVersionUID = -1069568268303542892L; - - @NotNull(message = "entityUniqueIdentifierType is required") - private EntityUniqueIdentifierType entityUniqueIdentifierType; - @NotBlank(message = "entityUniqueIdentifierValue is required") - private String entityUniqueIdentifierValue; - @NotBlank(message = "fullName is required") - private String fullName; - private String streetName; - private String civicNumber; - private String postalCode; - private String city; - private String stateProvinceRegion; - private String country; - @JsonProperty(value="eMail") - private String eMail; + * generated serialVersionUID + */ + private static final long serialVersionUID = -1069568268303542892L; + + @NotNull(message = "entityUniqueIdentifierType is required") + private EntityUniqueIdentifierType entityUniqueIdentifierType; + @NotBlank(message = "entityUniqueIdentifierValue is required") + private String entityUniqueIdentifierValue; + @NotBlank(message = "fullName is required") + private String fullName; + private String streetName; + private String civicNumber; + private String postalCode; + private String city; + private String stateProvinceRegion; + private String country; + @JsonProperty(value = "eMail") + private String eMail; } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/TransferPA.java b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/TransferPA.java index 96d1c196..d1b82334 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/TransferPA.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/TransferPA.java @@ -1,44 +1,43 @@ package it.gov.pagopa.bizeventsservice.model.response; -import java.io.Serializable; -import java.math.BigDecimal; -import java.util.List; - -import javax.validation.constraints.Max; -import javax.validation.constraints.Min; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; - import it.gov.pagopa.bizeventsservice.model.MapEntry; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; +import javax.validation.constraints.Max; +import javax.validation.constraints.Min; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.List; + @Builder @Data @NoArgsConstructor @AllArgsConstructor -public class TransferPA implements Serializable{ - /** - * generated serialVersionUID - */ - private static final long serialVersionUID = 3529035729352848592L; - - @Min(1) - @Max(5) - private int idTransfer; - @NotNull(message = "transferAmount is required") +public class TransferPA implements Serializable { + /** + * generated serialVersionUID + */ + private static final long serialVersionUID = 3529035729352848592L; + + @Min(1) + @Max(5) + private int idTransfer; + @NotNull(message = "transferAmount is required") private BigDecimal transferAmount; - @NotBlank(message = "fiscalCodePA is required") + @NotBlank(message = "fiscalCodePA is required") private String fiscalCodePA; - @NotBlank(message = "iban is required") + @NotBlank(message = "iban is required") private String iban; - @NotBlank(message = "mbdAttachment is required") - private String mbdAttachment; - @NotBlank(message = "remittanceInformation is required") + @NotBlank(message = "mbdAttachment is required") + private String mbdAttachment; + @NotBlank(message = "remittanceInformation is required") private String remittanceInformation; - @NotBlank(message = "transferCategory is required") + @NotBlank(message = "transferCategory is required") private String transferCategory; - private List metadata; + private List metadata; } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/enumeration/WalletType.java b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/enumeration/WalletType.java index c0ff97c6..4cbd0263 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/enumeration/WalletType.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/enumeration/WalletType.java @@ -1,5 +1,5 @@ package it.gov.pagopa.bizeventsservice.model.response.enumeration; public enum WalletType { - CARD, PAYPAL, BANCOMATPAY + CARD, PAYPAL, BANCOMATPAY } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/CartItem.java b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/CartItem.java index d8e13fdf..01fd9836 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/CartItem.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/CartItem.java @@ -1,19 +1,16 @@ package it.gov.pagopa.bizeventsservice.model.response.paidnotice; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import io.swagger.v3.oas.annotations.media.Schema; import it.gov.pagopa.bizeventsservice.entity.view.UserDetail; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import java.io.Serializable; - import javax.validation.constraints.NotNull; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; - -import io.swagger.v3.oas.annotations.media.Schema; +import java.io.Serializable; /** * Response model for transaction detail API @@ -25,11 +22,11 @@ @JsonInclude(Include.NON_NULL) public class CartItem implements Serializable { - private static final long serialVersionUID = -6391592801925923358L; - @Schema(required = true) + private static final long serialVersionUID = -6391592801925923358L; + @Schema(required = true) @NotNull - private String subject; - @Schema(required = true) + private String subject; + @Schema(required = true) @NotNull private String amount; private UserDetail payee; diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/InfoNotice.java b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/InfoNotice.java index 261ed56e..94fc6798 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/InfoNotice.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/InfoNotice.java @@ -1,5 +1,8 @@ package it.gov.pagopa.bizeventsservice.model.response.paidnotice; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import io.swagger.v3.oas.annotations.media.Schema; import it.gov.pagopa.bizeventsservice.entity.view.UserDetail; import it.gov.pagopa.bizeventsservice.entity.view.WalletInfo; import it.gov.pagopa.bizeventsservice.entity.view.enumeration.OriginType; @@ -9,14 +12,8 @@ import lombok.Data; import lombok.NoArgsConstructor; -import java.io.Serializable; - import javax.validation.constraints.NotNull; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; - -import io.swagger.v3.oas.annotations.media.Schema; +import java.io.Serializable; /** * Response model for transaction detail API @@ -28,13 +25,13 @@ @JsonInclude(Include.NON_NULL) public class InfoNotice implements Serializable { - /** - * - */ - private static final long serialVersionUID = -5306955320137743890L; - @Schema(required = true) + /** + * + */ + private static final long serialVersionUID = -5306955320137743890L; + @Schema(required = true) @NotNull - private String eventId; + private String eventId; private String authCode; @Schema(required = true) @NotNull diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/NoticeDetailResponse.java b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/NoticeDetailResponse.java index f03faa65..45f83dd7 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/NoticeDetailResponse.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/NoticeDetailResponse.java @@ -17,11 +17,11 @@ @AllArgsConstructor public class NoticeDetailResponse implements Serializable { - - /** - * - */ - private static final long serialVersionUID = -8088447298997505166L; - private InfoNotice infoNotice; + + /** + * + */ + private static final long serialVersionUID = -8088447298997505166L; + private InfoNotice infoNotice; private List carts; } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/NoticeListItem.java b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/NoticeListItem.java index d2c2a923..3c78e060 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/NoticeListItem.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/paidnotice/NoticeListItem.java @@ -3,7 +3,10 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; import javax.validation.constraints.NotNull; import java.io.Serializable; @@ -20,7 +23,7 @@ public class NoticeListItem implements Serializable { @Schema(required = true) @NotNull - private String eventId; + private String eventId; private String payeeName; diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/transaction/CartItem.java b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/transaction/CartItem.java index a031eea9..b8d00570 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/transaction/CartItem.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/transaction/CartItem.java @@ -1,5 +1,7 @@ package it.gov.pagopa.bizeventsservice.model.response.transaction; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; import it.gov.pagopa.bizeventsservice.entity.view.UserDetail; import lombok.AllArgsConstructor; import lombok.Builder; @@ -8,9 +10,6 @@ import java.io.Serializable; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; - /** * Response model for transaction detail API */ @@ -21,9 +20,9 @@ @JsonInclude(Include.NON_NULL) public class CartItem implements Serializable { - private static final long serialVersionUID = -6391592801925923358L; - - private String subject; + private static final long serialVersionUID = -6391592801925923358L; + + private String subject; private String amount; private UserDetail payee; private UserDetail debtor; diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/transaction/InfoTransactionView.java b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/transaction/InfoTransactionView.java index b48fdb3e..8d7f30c9 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/transaction/InfoTransactionView.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/transaction/InfoTransactionView.java @@ -1,5 +1,7 @@ package it.gov.pagopa.bizeventsservice.model.response.transaction; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; import it.gov.pagopa.bizeventsservice.entity.view.UserDetail; import it.gov.pagopa.bizeventsservice.entity.view.WalletInfo; import it.gov.pagopa.bizeventsservice.entity.view.enumeration.OriginType; @@ -11,9 +13,6 @@ import java.io.Serializable; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; - /** * Response model for transaction detail API */ @@ -24,10 +23,10 @@ @JsonInclude(Include.NON_NULL) public class InfoTransactionView implements Serializable { /** - * - */ - private static final long serialVersionUID = -3548526079754223084L; - private String transactionId; + * + */ + private static final long serialVersionUID = -3548526079754223084L; + private String transactionId; private String authCode; private String rrn; private String transactionDate; diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/transaction/TransactionDetailResponse.java b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/transaction/TransactionDetailResponse.java index c7631168..a9aa94ab 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/transaction/TransactionDetailResponse.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/transaction/TransactionDetailResponse.java @@ -18,9 +18,9 @@ public class TransactionDetailResponse implements Serializable { /** - * - */ - private static final long serialVersionUID = 4998486115671575833L; - private InfoTransactionView infoTransaction; + * + */ + private static final long serialVersionUID = 4998486115671575833L; + private InfoTransactionView infoTransaction; private List carts; } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/transaction/TransactionListItem.java b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/transaction/TransactionListItem.java index 6f4779ac..c38727ed 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/transaction/TransactionListItem.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/transaction/TransactionListItem.java @@ -1,5 +1,7 @@ package it.gov.pagopa.bizeventsservice.model.response.transaction; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -7,9 +9,6 @@ import java.io.Serializable; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; - /** * Response model for transaction list API */ @@ -20,10 +19,10 @@ @JsonInclude(Include.NON_NULL) public class TransactionListItem implements Serializable { /** - * - */ - private static final long serialVersionUID = 8763325343304031081L; - private String transactionId; + * + */ + private static final long serialVersionUID = 8763325343304031081L; + private String transactionId; private String payeeName; private String payeeTaxCode; private String amount; diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/transaction/TransactionListResponse.java b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/transaction/TransactionListResponse.java index 65693eb6..c8ace401 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/transaction/TransactionListResponse.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/transaction/TransactionListResponse.java @@ -1,12 +1,11 @@ package it.gov.pagopa.bizeventsservice.model.response.transaction; +import it.gov.pagopa.bizeventsservice.model.PageInfo; import lombok.Builder; import lombok.Getter; import java.util.List; -import it.gov.pagopa.bizeventsservice.model.PageInfo; - @Builder @Getter public class TransactionListResponse { diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/transaction/TransactionListWrapResponse.java b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/transaction/TransactionListWrapResponse.java index 373c36ab..193ffe8d 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/model/response/transaction/TransactionListWrapResponse.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/model/response/transaction/TransactionListWrapResponse.java @@ -1,16 +1,14 @@ package it.gov.pagopa.bizeventsservice.model.response.transaction; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import it.gov.pagopa.bizeventsservice.model.PageInfo; import lombok.Builder; import lombok.Getter; import java.util.List; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonInclude.Include; - -import it.gov.pagopa.bizeventsservice.model.PageInfo; - @Builder @Getter @JsonInclude(Include.NON_NULL) 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 fece7a8e..158eb685 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/repository/BizEventsRepository.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/repository/BizEventsRepository.java @@ -1,15 +1,13 @@ package it.gov.pagopa.bizeventsservice.repository; -import java.util.List; -import java.util.Map; - -import org.springframework.data.repository.query.Param; -import org.springframework.stereotype.Repository; - import com.azure.spring.data.cosmos.repository.CosmosRepository; import com.azure.spring.data.cosmos.repository.Query; - import it.gov.pagopa.bizeventsservice.entity.BizEvent; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; +import java.util.Map; @Repository public interface BizEventsRepository extends CosmosRepository { @@ -25,13 +23,13 @@ List getBizEventByOrgFiscalCodeAndIuv(@Param("organizationFiscalCode") @Query("select distinct value c from c JOIN t IN c.transferList where t.fiscalCodePA = @organizationFiscalCode and (c.paymentInfo.paymentToken = @iur or c.debtorPosition.iur = @iur) and StringToNumber(c.debtorPosition.modelType) > 1") List getBizEventByOrgFiscCodeAndIur(@Param("organizationFiscalCode") String organizationFiscalCode, - @Param("iur") String iur); + @Param("iur") String iur); @Query("select * from c where c.id = @bizEventId and (c.debtor.entityUniqueIdentifierValue = @fiscalCode or c.payer.entityUniqueIdentifierValue = @fiscalCode or c.transactionDetails.user.fiscalCode = @fiscalCode)") List getBizEventByFiscalCodeAndId(@Param("fiscalCode") String fiscalCode, @Param("bizEventId") String bizEvent); @Query("select * from c where c.transactionDetails.transaction.transactionId = @transactionId and (c.debtor.entityUniqueIdentifierValue = @fiscalCode or c.payer.entityUniqueIdentifierValue = @fiscalCode or c.transactionDetails.user.fiscalCode = @fiscalCode)") - List getBizEventByFiscalCodeAndTransactionId( @Param("fiscalCode") String fiscalCode, @Param("transactionId") String transactionId); + List getBizEventByFiscalCodeAndTransactionId(@Param("fiscalCode") String fiscalCode, @Param("transactionId") String transactionId); @Query("select distinct" + " c.paymentInfo.totalNotice != \"1\" ? " + @@ -56,9 +54,9 @@ List> getTransactionPagedIds( @Param("size") Integer size); @Query(" select c.transactionDetails.transaction.grandTotal as grandTotal," + - " c.paymentInfo.amount as amount" + - " from c" + - " where c.transactionDetails.transaction.transactionId = @transactionToRecover") + " c.paymentInfo.amount as amount" + + " from c" + + " where c.transactionDetails.transaction.transactionId = @transactionToRecover") List> getCartData( @Param("transactionToRecover") String transactionToRecover ); diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/repository/BizEventsViewUserRepository.java b/src/main/java/it/gov/pagopa/bizeventsservice/repository/BizEventsViewUserRepository.java index 7143e22d..22ffc09b 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/repository/BizEventsViewUserRepository.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/repository/BizEventsViewUserRepository.java @@ -15,12 +15,12 @@ */ @Repository public interface BizEventsViewUserRepository extends CosmosRepository { - - @Query("SELECT * FROM c WHERE c.taxCode = @taxCode AND c.hidden = false AND (IS_NULL(@isPayer) = true OR c.isPayer = @isPayer) AND (IS_NULL(@isDebtor) = true OR c.isDebtor = @isDebtor)") + + @Query("SELECT * FROM c WHERE c.taxCode = @taxCode AND c.hidden = false AND (IS_NULL(@isPayer) = true OR c.isPayer = @isPayer) AND (IS_NULL(@isDebtor) = true OR c.isDebtor = @isDebtor)") Page getBizEventsViewUserByTaxCode(@Param("taxCode") String taxCode, @Param("isPayer") Boolean isPayer, @Param("isDebtor") Boolean isDebtor, Pageable pageable); - - @Query("select * from c where c.taxCode = @taxCode and c.hidden = false") - List getBizEventsViewUserByTaxCode(@Param("taxCode") String taxCode); + + @Query("select * from c where c.taxCode = @taxCode and c.hidden = false") + List getBizEventsViewUserByTaxCode(@Param("taxCode") String taxCode); @Query("select * from c where c.transactionId=@transactionId and c.taxCode = @fiscalCode and c.hidden = false") List getBizEventsViewUserByTaxCodeAndTransactionId(String fiscalCode, String transactionId); 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 ea7d7b69..572db28d 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/service/IBizEventsService.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/service/IBizEventsService.java @@ -6,12 +6,13 @@ public interface IBizEventsService { CtReceiptModelResponse getOrganizationReceipt(String organizationFiscalCode, - String iur, String iuv); + String iur, String iuv); BizEvent getBizEvent(String id); BizEvent getBizEventByOrgFiscalCodeAndIuv(String organizationFiscalCode, String iuv); + CtReceiptModelResponse getOrganizationReceipt(String organizationFiscalCode, String iur); diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/service/ITransactionService.java b/src/main/java/it/gov/pagopa/bizeventsservice/service/ITransactionService.java index 9757061b..0d07b1b7 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/service/ITransactionService.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/service/ITransactionService.java @@ -1,25 +1,28 @@ package it.gov.pagopa.bizeventsservice.service; -import org.springframework.data.domain.Sort.Direction; - import it.gov.pagopa.bizeventsservice.model.filterandorder.Order.TransactionListOrder; import it.gov.pagopa.bizeventsservice.model.response.paidnotice.NoticeDetailResponse; import it.gov.pagopa.bizeventsservice.model.response.transaction.TransactionDetailResponse; import it.gov.pagopa.bizeventsservice.model.response.transaction.TransactionListResponse; +import org.springframework.data.domain.Sort.Direction; public interface ITransactionService { /** * Retrieves paged transaction list given a valid fiscal code, offset and page size - * @param fiscalCode fiscal code to filter transaction list + * + * @param fiscalCode fiscal code to filter transaction list * @param continuationToken continuation token for paginated query - * @param size offset size + * @param size offset size * @return transaction list */ TransactionListResponse getTransactionList(String fiscalCode, Boolean isPayer, Boolean isDebtor, String continuationToken, Integer size, TransactionListOrder orderBy, Direction ordering); + TransactionDetailResponse getTransactionDetails(String fiscalCode, String transactionId); + NoticeDetailResponse getPaidNoticeDetail(String fiscalCode, String eventId); - byte[] getPDFReceipt (String fiscalCode, String eventId); + + byte[] getPDFReceipt(String fiscalCode, String eventId); void disableTransaction(String fiscalCode, String transactionId); } 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 b4d86816..414c8eb9 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 @@ -29,7 +29,7 @@ public BizEventsService(BizEventsRepository bizEventsRepository, ModelMapper mod @Override public CtReceiptModelResponse getOrganizationReceipt(String organizationFiscalCode, - String iur, String iuv) { + String iur, String iuv) { // get biz event List bizEventEntityList = bizEventsRepository.getBizEventByOrgFiscCodeIuvAndIur(organizationFiscalCode, iur, iuv); diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/service/impl/TransactionService.java b/src/main/java/it/gov/pagopa/bizeventsservice/service/impl/TransactionService.java index e1c78f63..01cb8f94 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/service/impl/TransactionService.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/service/impl/TransactionService.java @@ -1,22 +1,6 @@ package it.gov.pagopa.bizeventsservice.service.impl; -import java.util.ArrayList; -import java.util.Comparator; -import java.util.HashSet; -import java.util.List; -import java.util.Optional; -import java.util.Set; -import java.util.stream.Collectors; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Sort; -import org.springframework.data.domain.Sort.Direction; -import org.springframework.stereotype.Service; -import org.springframework.util.CollectionUtils; - import com.azure.spring.data.cosmos.core.query.CosmosPageRequest; - import feign.FeignException; import it.gov.pagopa.bizeventsservice.client.IReceiptGeneratePDFClient; import it.gov.pagopa.bizeventsservice.client.IReceiptGetPDFClient; @@ -36,6 +20,15 @@ import it.gov.pagopa.bizeventsservice.repository.BizEventsViewGeneralRepository; import it.gov.pagopa.bizeventsservice.repository.BizEventsViewUserRepository; import it.gov.pagopa.bizeventsservice.service.ITransactionService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Sort; +import org.springframework.data.domain.Sort.Direction; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.util.*; +import java.util.stream.Collectors; @Service public class TransactionService implements ITransactionService { @@ -47,23 +40,23 @@ public class TransactionService implements ITransactionService { private final IReceiptGeneratePDFClient generateReceiptClient; @Autowired - public TransactionService(BizEventsViewGeneralRepository bizEventsViewGeneralRepository, - BizEventsViewCartRepository bizEventsViewCartRepository, - BizEventsViewUserRepository bizEventsViewUserRepository, - IReceiptGetPDFClient receiptClient, - IReceiptGeneratePDFClient generateReceiptClient) { + public TransactionService(BizEventsViewGeneralRepository bizEventsViewGeneralRepository, + BizEventsViewCartRepository bizEventsViewCartRepository, + BizEventsViewUserRepository bizEventsViewUserRepository, + IReceiptGetPDFClient receiptClient, + IReceiptGeneratePDFClient generateReceiptClient) { this.bizEventsViewGeneralRepository = bizEventsViewGeneralRepository; this.bizEventsViewCartRepository = bizEventsViewCartRepository; this.bizEventsViewUserRepository = bizEventsViewUserRepository; this.receiptClient = receiptClient; - this.generateReceiptClient = generateReceiptClient; + this.generateReceiptClient = generateReceiptClient; } @Override - public TransactionListResponse getTransactionList(String taxCode, Boolean isPayer, - Boolean isDebtor, String continuationToken, Integer size, TransactionListOrder orderBy, Direction ordering) { + public TransactionListResponse getTransactionList(String taxCode, Boolean isPayer, + Boolean isDebtor, String continuationToken, Integer size, TransactionListOrder orderBy, Direction ordering) { List listOfTransactionListItem = new ArrayList<>(); - + String columnName = Optional.ofNullable(orderBy).map(o -> o.getColumnName()).orElse("transactionDate"); String direction = Optional.ofNullable(ordering).map(Enum::name).orElse(Sort.Direction.DESC.name()); @@ -71,21 +64,21 @@ public TransactionListResponse getTransactionList(String taxCode, Boolean isPaye final CosmosPageRequest pageRequest = new CosmosPageRequest(0, size, continuationToken, sort); final Page page = this.bizEventsViewUserRepository.getBizEventsViewUserByTaxCode(taxCode, isPayer, isDebtor, pageRequest); Set set = new HashSet<>(page.getContent().size()); - + List listOfViewUser = page.getContent().stream() - .sorted(Comparator.comparing(BizEventsViewUser::getIsDebtor,Comparator.reverseOrder())) - .filter(p -> set.add(p.getTransactionId())) - .collect(Collectors.toList()) - .stream() - .sorted(Comparator.comparing(BizEventsViewUser::getTransactionDate,Comparator.reverseOrder())) - .toList(); - - if(listOfViewUser.isEmpty()){ + .sorted(Comparator.comparing(BizEventsViewUser::getIsDebtor, Comparator.reverseOrder())) + .filter(p -> set.add(p.getTransactionId())) + .collect(Collectors.toList()) + .stream() + .sorted(Comparator.comparing(BizEventsViewUser::getTransactionDate, Comparator.reverseOrder())) + .toList(); + + if (listOfViewUser.isEmpty()) { throw new AppException(AppError.VIEW_USER_NOT_FOUND_WITH_TAX_CODE_AND_FILTER, taxCode, isPayer, isDebtor); } for (BizEventsViewUser viewUser : listOfViewUser) { List listOfViewCart; - if(Boolean.TRUE.equals(viewUser.getIsPayer())){ + if (Boolean.TRUE.equals(viewUser.getIsPayer())) { listOfViewCart = this.bizEventsViewCartRepository.getBizEventsViewCartByTransactionId(viewUser.getTransactionId()); } else { listOfViewCart = this.bizEventsViewCartRepository.getBizEventsViewCartByTransactionIdAndFilteredByTaxCode(viewUser.getTransactionId(), taxCode); @@ -114,7 +107,7 @@ public TransactionDetailResponse getTransactionDetails(String taxCode, String ev } List listOfCartViews; - if(bizEventsViewGeneral.get(0).getPayer() != null && bizEventsViewGeneral.get(0).getPayer().getTaxCode().equals(taxCode)){ + if (bizEventsViewGeneral.get(0).getPayer() != null && bizEventsViewGeneral.get(0).getPayer().getTaxCode().equals(taxCode)) { listOfCartViews = this.bizEventsViewCartRepository.getBizEventsViewCartByTransactionId(eventReference); } else { listOfCartViews = this.bizEventsViewCartRepository.getBizEventsViewCartByTransactionIdAndFilteredByTaxCode(eventReference, taxCode); @@ -125,16 +118,16 @@ public TransactionDetailResponse getTransactionDetails(String taxCode, String ev return ConvertViewsToTransactionDetailResponse.convertTransactionDetails(taxCode, bizEventsViewGeneral.get(0), listOfCartViews); } - + @Override - public NoticeDetailResponse getPaidNoticeDetail(String taxCode, String eventId) { - List bizEventsViewGeneral = this.bizEventsViewGeneralRepository.findByTransactionId(eventId); + public NoticeDetailResponse getPaidNoticeDetail(String taxCode, String eventId) { + List bizEventsViewGeneral = this.bizEventsViewGeneralRepository.findByTransactionId(eventId); if (bizEventsViewGeneral.isEmpty()) { throw new AppException(AppError.VIEW_GENERAL_NOT_FOUND_WITH_TRANSACTION_ID, eventId); } List listOfCartViews; - if(bizEventsViewGeneral.get(0).getPayer() != null && bizEventsViewGeneral.get(0).getPayer().getTaxCode().equals(taxCode)){ + if (bizEventsViewGeneral.get(0).getPayer() != null && bizEventsViewGeneral.get(0).getPayer().getTaxCode().equals(taxCode)) { listOfCartViews = this.bizEventsViewCartRepository.getBizEventsViewCartByTransactionId(eventId); } else { listOfCartViews = this.bizEventsViewCartRepository.getBizEventsViewCartByTransactionIdAndFilteredByTaxCode(eventId, taxCode); @@ -144,53 +137,52 @@ public NoticeDetailResponse getPaidNoticeDetail(String taxCode, String eventId) } return ConvertViewsToTransactionDetailResponse.convertPaidNoticeDetails(taxCode, bizEventsViewGeneral.get(0), listOfCartViews); - } - - + } + @Override public void disableTransaction(String fiscalCode, String transactionId) { - - List listOfViewUser = this.bizEventsViewUserRepository + + List listOfViewUser = this.bizEventsViewUserRepository .getBizEventsViewUserByTaxCodeAndTransactionId(fiscalCode, transactionId); - + if (CollectionUtils.isEmpty(listOfViewUser)) { throw new AppException(AppError.VIEW_USER_NOT_FOUND_WITH_TRANSACTION_ID, fiscalCode, transactionId); - } - + } + // PAGOPA-1831: set hidden to true for all transactions with the same transactionId for the given fiscalCode listOfViewUser.forEach(u -> u.setHidden(true)); bizEventsViewUserRepository.saveAll(listOfViewUser); } - - @Override - public byte[] getPDFReceipt(String fiscalCode, String eventId) { - return this.acquirePDFReceipt(fiscalCode, eventId); - } - - private byte[] acquirePDFReceipt(String fiscalCode, String eventId) { - String url = ""; - try { - // call the receipt-pdf-service to retrieve the PDF receipt details - AttachmentsDetailsResponse response = receiptClient.getAttachments(fiscalCode, eventId); - url = response.getAttachments().get(0).getUrl(); - } catch (FeignException.NotFound e) { - generateReceiptClient.generateReceipt(eventId, "false", "{}"); - url = receiptClient.getAttachments(fiscalCode, eventId).getAttachments().get(0).getUrl(); - } - return this.getAttachment(fiscalCode, eventId, url); + + @Override + public byte[] getPDFReceipt(String fiscalCode, String eventId) { + return this.acquirePDFReceipt(fiscalCode, eventId); + } + + private byte[] acquirePDFReceipt(String fiscalCode, String eventId) { + String url = ""; + try { + // call the receipt-pdf-service to retrieve the PDF receipt details + AttachmentsDetailsResponse response = receiptClient.getAttachments(fiscalCode, eventId); + url = response.getAttachments().get(0).getUrl(); + } catch (FeignException.NotFound e) { + generateReceiptClient.generateReceipt(eventId, "false", "{}"); + url = receiptClient.getAttachments(fiscalCode, eventId).getAttachments().get(0).getUrl(); + } + return this.getAttachment(fiscalCode, eventId, url); } private byte[] getAttachment(String fiscalCode, String eventId, String url) { - try { - // call the receipt-pdf-service to retrieve the PDF receipt attachment - return receiptClient.getReceipt(fiscalCode, eventId, url); - } catch (FeignException.NotFound e) { - // re-generate the PDF receipt and return the generated file by getReceipt call - generateReceiptClient.generateReceipt(eventId, "false", "{}"); - return receiptClient.getReceipt(fiscalCode, eventId, url); - } + try { + // call the receipt-pdf-service to retrieve the PDF receipt attachment + return receiptClient.getReceipt(fiscalCode, eventId, url); + } catch (FeignException.NotFound e) { + // re-generate the PDF receipt and return the generated file by getReceipt call + generateReceiptClient.generateReceipt(eventId, "false", "{}"); + return receiptClient.getReceipt(fiscalCode, eventId, url); + } } - + } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/util/DateValidator.java b/src/main/java/it/gov/pagopa/bizeventsservice/util/DateValidator.java index 461340cf..4f61bd2a 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/util/DateValidator.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/util/DateValidator.java @@ -5,15 +5,16 @@ import java.time.format.DateTimeFormatter; public class DateValidator { - - private DateValidator() {} - public static boolean isValid(final String value, final String datePattern) { - try { - LocalDateTime.parse(value, DateTimeFormatter.ofPattern(datePattern)); - } catch (DateTimeException e) { - return false; - } - return true; - } + private DateValidator() { + } + + public static boolean isValid(final String value, final String datePattern) { + try { + LocalDateTime.parse(value, DateTimeFormatter.ofPattern(datePattern)); + } catch (DateTimeException e) { + return false; + } + return true; + } } diff --git a/src/main/java/it/gov/pagopa/bizeventsservice/util/Util.java b/src/main/java/it/gov/pagopa/bizeventsservice/util/Util.java index fe4719fd..400bb3bb 100644 --- a/src/main/java/it/gov/pagopa/bizeventsservice/util/Util.java +++ b/src/main/java/it/gov/pagopa/bizeventsservice/util/Util.java @@ -1,81 +1,75 @@ package it.gov.pagopa.bizeventsservice.util; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Comparator; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import org.springframework.data.domain.Sort.Direction; - import it.gov.pagopa.bizeventsservice.entity.view.BizEventsViewUser; import it.gov.pagopa.bizeventsservice.model.filterandorder.Order.TransactionListOrder; +import org.springframework.data.domain.Sort.Direction; + +import java.util.*; public class Util { - - private Util() {} - - public static List> getPaginatedList(List mergedListByTIDOfViewUser, Boolean isPayer, Boolean isDebtor, - int pageSize, TransactionListOrder order, Direction direction) { - List filteredListOfViewUser = new ArrayList<>(Util.getFilteredList(mergedListByTIDOfViewUser, isPayer, isDebtor)); - Util.getSortedList(filteredListOfViewUser, order, direction); + + private Util() { + } + + public static List> getPaginatedList(List mergedListByTIDOfViewUser, Boolean isPayer, Boolean isDebtor, + int pageSize, TransactionListOrder order, Direction direction) { + List filteredListOfViewUser = new ArrayList<>(Util.getFilteredList(mergedListByTIDOfViewUser, isPayer, isDebtor)); + Util.getSortedList(filteredListOfViewUser, order, direction); return Util.getPages(filteredListOfViewUser, pageSize); - } + } + + + public static List getMergedListByTID(List fullListOfViewUser) { + Set set = new HashSet<>(fullListOfViewUser.size()); + // sorting based on the isDebtor field (true first) and then grouping by transactionId (the cart case requires that only one item be taken from those present) + return fullListOfViewUser.stream() + .sorted(Comparator.comparing(BizEventsViewUser::getIsDebtor, Comparator.reverseOrder())) + .filter(p -> set.add(p.getTransactionId())).toList(); + } - - public static List getMergedListByTID(List fullListOfViewUser) { - Set set = new HashSet<>(fullListOfViewUser.size()); - // sorting based on the isDebtor field (true first) and then grouping by transactionId (the cart case requires that only one item be taken from those present) - return fullListOfViewUser.stream() - .sorted(Comparator.comparing(BizEventsViewUser::getIsDebtor,Comparator.reverseOrder())) - .filter(p -> set.add(p.getTransactionId())).toList(); - } - public static List> getPages(Collection c, Integer pageSize) { - - List list = new ArrayList<>(c); - - if (pageSize == null || pageSize <= 0 || pageSize > list.size()) { - pageSize = list.size(); - } - - int numPages = (int) Math.ceil((double)list.size() / (double)pageSize); + + List list = new ArrayList<>(c); + + if (pageSize == null || pageSize <= 0 || pageSize > list.size()) { + pageSize = list.size(); + } + + int numPages = (int) Math.ceil((double) list.size() / (double) pageSize); List> pages = new ArrayList<>(numPages); for (int pageNum = 0; pageNum < numPages; pageNum++) { - int toIndex = pageNum; - // subList() method is an instance of 'RandomAccessSubList' which is not serializable --> create a new ArrayList which is + int toIndex = pageNum; + // subList() method is an instance of 'RandomAccessSubList' which is not serializable --> create a new ArrayList which is pages.add(new ArrayList<>(list.subList(pageNum * pageSize, Math.min(++toIndex * pageSize, list.size())))); } return pages; } - - public static void getSortedList(List listToSort, TransactionListOrder order, - Direction direction) { - if (TransactionListOrder.TRANSACTION_DATE.equals(order)) { - switch (direction) { - case ASC: - Collections.sort(listToSort, Comparator.comparing(BizEventsViewUser::getTransactionDateAsLocalDateTime, - Comparator.nullsLast(Comparator.naturalOrder()))); - break; - case DESC: - default: - Collections.sort(listToSort, Comparator.comparing(BizEventsViewUser::getTransactionDateAsLocalDateTime, - Comparator.nullsLast(Comparator.naturalOrder())).reversed()); - break; - } - } else { - // the default sorting is by transaction date and DESC direction - Collections.sort(listToSort, Comparator - .comparing(BizEventsViewUser::getTransactionDateAsLocalDateTime, Comparator.nullsLast(Comparator.naturalOrder())) - .reversed()); - } - } - - public static List getFilteredList(List listToFilter, Boolean isPayer, Boolean isDebtor) { - return listToFilter.stream() - .filter(u -> (isPayer == null || u.getIsPayer().equals(isPayer)) && (isDebtor == null || u.getIsDebtor().equals(isDebtor))) - .toList(); - } + + public static void getSortedList(List listToSort, TransactionListOrder order, + Direction direction) { + if (TransactionListOrder.TRANSACTION_DATE.equals(order)) { + switch (direction) { + case ASC: + Collections.sort(listToSort, Comparator.comparing(BizEventsViewUser::getTransactionDateAsLocalDateTime, + Comparator.nullsLast(Comparator.naturalOrder()))); + break; + case DESC: + default: + Collections.sort(listToSort, Comparator.comparing(BizEventsViewUser::getTransactionDateAsLocalDateTime, + Comparator.nullsLast(Comparator.naturalOrder())).reversed()); + break; + } + } else { + // the default sorting is by transaction date and DESC direction + Collections.sort(listToSort, Comparator + .comparing(BizEventsViewUser::getTransactionDateAsLocalDateTime, Comparator.nullsLast(Comparator.naturalOrder())) + .reversed()); + } + } + + public static List getFilteredList(List listToFilter, Boolean isPayer, Boolean isDebtor) { + return listToFilter.stream() + .filter(u -> (isPayer == null || u.getIsPayer().equals(isPayer)) && (isDebtor == null || u.getIsDebtor().equals(isDebtor))) + .toList(); + } }