This is the result of the shopping cart challenge problem as described here.
To run the application you will need:
- Postgresql
- Clone the project,
bundle install
and it should work.
To run the server
rails s
To run the tests
bundle exec rspec
GET api/carts
Retrieves a list of cartsGET api/carts/:id/checkout
Retrieves subtotal, total and shipping price of cartGET api/carts/:id
Retrieves a specific cartPOST api/carts/
Create a new cartDELETE /carts/:id
Delete a specific cart
GET api/carts/:cart_id/products
Retrieves a list of procucts in a specific cartGET api/carts/:cart_id/products/:product_id
Retrieves a specific product in a specific cartPOST api/carts/:cart_id/products
Create a new product in a specific cartDELETE /carts/:cart_id/products/:product_id
Delete a specific product in a cartPUT /carts/:cart_id/products/:product_id
Update a specific product in cart
GET api/carts/:cart_id/coupons
Retrieves a list of coupons in a specific cartGET api/carts/:cart_id/coupons/:coupon_id
Retrieves a specific coupon in a specific cartPOST api/carts/:cart_id/coupons
Create a new coupon in a specific cartDELETE /carts/:cart_id/coupons/:coupon_id
Delete a specific coupon in a cartPUT /carts/:cart_id/coupons/:coupon_id
Update a specific coupon in cart