generated from pagopa/template-java-spring-microservice
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PRDP-358] feat: Rework Transaction Detail API (#37)
* [PRDP-358] Added entities' models and moved classes * [PRDP-358] Added collections repo interfaces and container name envs * [PRDP-356] updated openapi definition as defined in documentation * [PRDP-358] Added get biz-events-view-cart filtered by fiscal code * [PRDP-358] Reworked transaction service getTransactionDetails and added errors * [PRDP-358] Updated partially tests * [PRDP-358] Completed unit test for transaction details * [PRDP-358] Changed entity annotation * [PRDP-358] Added id autogeneration to view entities * [PRDP-358] Changed fiscalCode to taxCode * [PRDP-358] Fix --------- Co-authored-by: giomella <gioele.mella@emeal.nttdata.com>
- Loading branch information
Showing
34 changed files
with
580 additions
and
973 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/main/java/it/gov/pagopa/bizeventsservice/entity/view/BizEventsViewCart.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package it.gov.pagopa.bizeventsservice.entity.view; | ||
|
||
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.*; | ||
|
||
/** | ||
* Entity model for biz-events-view-cart | ||
*/ | ||
@Container(containerName = "${azure.cosmos.biz-events-view-cart-container-name}", autoCreateContainer = false, ru="1000") | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
@Getter | ||
@Setter | ||
public class BizEventsViewCart { | ||
@GeneratedValue | ||
private String id; | ||
@PartitionKey | ||
private String transactionId; | ||
private String eventId; | ||
private String subject; | ||
private long amount; | ||
private UserDetail payee; | ||
private UserDetail debtor; | ||
private String refNumberValue; | ||
private String refNumberType; | ||
} |
37 changes: 37 additions & 0 deletions
37
src/main/java/it/gov/pagopa/bizeventsservice/entity/view/BizEventsViewGeneral.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package it.gov.pagopa.bizeventsservice.entity.view; | ||
|
||
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 it.gov.pagopa.bizeventsservice.entity.view.enumeration.OriginType; | ||
import it.gov.pagopa.bizeventsservice.entity.view.enumeration.PaymentMethodType; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
/** | ||
* Entity model for biz-events-view-general | ||
*/ | ||
@Container(containerName = "${azure.cosmos.biz-events-view-general-container-name}", autoCreateContainer = false, ru="1000") | ||
@Builder | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Getter | ||
public class BizEventsViewGeneral { | ||
@GeneratedValue | ||
private String id; | ||
@PartitionKey | ||
private String transactionId; | ||
private String authCode; | ||
private PaymentMethodType paymentMethod; | ||
private String rrn; | ||
private String pspName; | ||
private String transactionDate; | ||
private WalletInfo walletInfo; | ||
private UserDetail payer; | ||
private boolean isCart; | ||
private String fee; | ||
private OriginType origin; | ||
|
||
} |
24 changes: 24 additions & 0 deletions
24
src/main/java/it/gov/pagopa/bizeventsservice/entity/view/BizEventsViewUser.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package it.gov.pagopa.bizeventsservice.entity.view; | ||
|
||
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.*; | ||
|
||
/** | ||
* Entity model for biz-events-view-user | ||
*/ | ||
@Container(containerName = "${azure.cosmos.biz-events-view-user-container-name}", autoCreateContainer = false, ru="1000") | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Getter | ||
@Builder | ||
public class BizEventsViewUser { | ||
@GeneratedValue | ||
private String id; | ||
@PartitionKey | ||
private String taxCode; | ||
private String transactionId; | ||
private String transactionDate; | ||
private boolean hidden; | ||
} |
6 changes: 4 additions & 2 deletions
6
...odel/response/transaction/UserDetail.java → ...eventsservice/entity/view/UserDetail.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletions
6
...odel/response/transaction/WalletInfo.java → ...eventsservice/entity/view/WalletInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
...e/transaction/enumeration/OriginType.java → ...e/entity/view/enumeration/OriginType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
...action/enumeration/PaymentMethodType.java → ...y/view/enumeration/PaymentMethodType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.