Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PAGOPA-1800] fix: Update Stamp mapping #105

Merged
merged 10 commits into from
Jun 6, 2024
Merged

[PAGOPA-1800] fix: Update Stamp mapping #105

merged 10 commits into from
Jun 6, 2024

Conversation

cap-ang
Copy link
Contributor

@cap-ang cap-ang commented Jun 5, 2024

List of Changes

  • Add check on Stamp variables: only if all three variables are different from null can created and returned richiestaMarcaDaBollo
  • Fix bug when mapping from hashDocument string to hashDocumento byte array
  • Add JUnit test paGetPaymentV2StampTest

Motivation and Context

When Stamp values are null in the GET paymentoptions/{nav} response

"stamp": null

paGetPaymentV2 must return a response without richiestaMarcaDaBollo

paGetPayment is not affected because doesn't have richiestaMarcaDaBollo

How Has This Been Tested?

manually test environment UAT, use case:

  • create a payment-option with two transfer (1 with Stamp, 1 without Stamp only IBAN)
  • pay the payment-option via checkout

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@cap-ang cap-ang marked this pull request as ready for review June 6, 2024 08:33
@cap-ang cap-ang requested a review from a team as a code owner June 6, 2024 08:33
@cap-ang cap-ang added the bug Something isn't working label Jun 6, 2024
@@ -548,8 +563,15 @@ private CtTransferPA getTransferResponse(
*/
private CtTransferPAV2 getTransferResponseV2(
PaymentsTransferModelResponse transfer, StTransferType transferType) {
CtRichiestaMarcaDaBollo richiestaMarcaDaBollo =
customizedModelMapper.map(transfer.getStamp(), CtRichiestaMarcaDaBollo.class);
Stamp stamp = transfer.getStamp();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

here the real changes



@Test
void paGetPaymentV2StampTest()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

here the new test with Stamp case

Copy link
Contributor

@FedericoRuzzier FedericoRuzzier left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link

github-actions bot commented Jun 6, 2024

This PR exceeds the recommended size of 400 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

Copy link

github-actions bot commented Jun 6, 2024

Comment this PR with update_code to update openapi.json and format the code. Consider to use pre-commit to format the code.

Copy link

sonarcloud bot commented Jun 6, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
7.1% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@cap-ang cap-ang merged commit a3edf4e into main Jun 6, 2024
10 of 14 checks passed
@cap-ang cap-ang deleted the PAGOPA-1800 branch June 6, 2024 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working size/large
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants