https://github.com/maximderbin/payments_exercise
https://github.com/maximderbin/payments_exercise
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/maximderbin/payments_exercise
- Owner: maximderbin
- Created: 2015-09-29T21:19:58.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-05T03:52:15.000Z (over 9 years ago)
- Last Synced: 2025-02-02T00:12:41.012Z (4 months ago)
- Language: Ruby
- Size: 28.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Payments Exercise
Add in the ability to create payments for a given loan using a JSON API call. You should store the payment date and amount. Expose the outstanding balance for a given loan in the JSON vended for `LoansController#show` and `LoansController#index`. The outstanding balance should be calculated as the `funded_amount` minus all of the payment amounts.
A payment should not be able to be created that exceeds the outstanding balance of a loan. You should return validation errors if a payment can not be created. Expose endpoints for seeing all payments for a given loan as well as seeing an individual payment.