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

Add payment controller stack. #27

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

systemtesting9000
Copy link

@systemtesting9000 systemtesting9000 commented Apr 21, 2022

This pull request attempts to fulfill the following Trello requirements:

  • Create Payment Controller
  • Create Payment Retrieve GET API
  • Create Payment Service
  • Create Payment Repository
  • Ensure Retrieve API is Working
  • Write jUnit to Test Implementation
  • Raise PR into Original Repository when done (this is for

API Working Screentshot (from Swagger UI):
image

Tests - JUnit and Maven:
image
image

Notes:
-Did not add a full set of validation for the incoming user id, but at least had a check for blank. This could be improved.
-There seemed to be a defect in the ResourceMapper, it would pump out the last five characters of a credit card, I switched it to four and added a test for that. (Unless I am misunderstanding the data.)
-Added test data to the sql test file.
-Ran the IntelliJ remove imports/reformat -- but did not run format on exiting updated files just new.
-Also fixed what quality complaints IntelliJ had.
-Confirmed the maven and the IDE build steps, as this can be an issue on some code bases but not this.
-The requirements said "#3 Payment Retrieve API should return all data for a given User." I made the assumption this was just payment data for a user and not user + payment data all in one shot. If this isn't what was expected I'd probably make a composition type object to accomplish this with the code, i.e.

UserPaymentsDto{
UserDto user;
List payments;
}

but canonically payment seems to imply payment only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant