Closed kenziebottoms closed 6 years ago
Adds the following endpoints:
GET /payment-options
GET /payment-options/:id
POST /payment-options
PUT /payment-options/:id
DELETE /payment-options/:id
fixes #108, fixes #3
npm run db:generate
POST http://localhost:8080/api/v1/payment-options
{"type":"blood sacrifice","account_number":"1234","customer_id":3}
25
PUT http://localhost:8080/api/v1/payment-options/3
3
PUT http://localhost:8080/api/v1/payment-options/31
31
DELETE http://localhost:8080/api/v1/payment-options/31
testing!
Description
Adds the following endpoints:
GET /payment-options
: gets all payment optionsGET /payment-options/:id
: gets one payment option by idPOST /payment-options
: posts new payment optionPUT /payment-options/:id
: replaces/updates one payment option by idDELETE /payment-options/:id
: removes one payment option by idRelated Ticket(s)
fixes #108, fixes #3
Steps to Test Solution
npm run db:generate
POST http://localhost:8080/api/v1/payment-options
:25
and http://localhost:8080/api/v1/payment-options/25 should now give you the blood sacrifice payment optionPUT http://localhost:8080/api/v1/payment-options/3
:3
and http://localhost:8080/api/v1/payment-options/3 should now give you the blood sacrifice payment optionPUT http://localhost:8080/api/v1/payment-options/31
:31
and http://localhost:8080/api/v1/payment-options/31 should now give you the blood sacrifice payment optionDELETE http://localhost:8080/api/v1/payment-options/31
should return31
and http://localhost:8080/api/v1/payment-options/31 should now give you a "Payment option not found" errorDELETE http://localhost:8080/api/v1/payment-options/31
should now return a "Payment option not found" error