Skip to content

gabrielrumiranda/shopping-cart-challenge

Repository files navigation

Shopping Cart Challenge

Build Status codecov

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

Endpoints

Cart

  • GET api/carts Retrieves a list of carts
  • GET api/carts/:id/checkout Retrieves subtotal, total and shipping price of cart
  • GET api/carts/:id Retrieves a specific cart
  • POST api/carts/ Create a new cart
  • DELETE /carts/:id Delete a specific cart

Products

  • GET api/carts/:cart_id/products Retrieves a list of procucts in a specific cart
  • GET api/carts/:cart_id/products/:product_id Retrieves a specific product in a specific cart
  • POST api/carts/:cart_id/products Create a new product in a specific cart
  • DELETE /carts/:cart_id/products/:product_id Delete a specific product in a cart
  • PUT /carts/:cart_id/products/:product_id Update a specific product in cart

Coupons

  • GET api/carts/:cart_id/coupons Retrieves a list of coupons in a specific cart
  • GET api/carts/:cart_id/coupons/:coupon_id Retrieves a specific coupon in a specific cart
  • POST api/carts/:cart_id/coupons Create a new coupon in a specific cart
  • DELETE /carts/:cart_id/coupons/:coupon_id Delete a specific coupon in a cart
  • PUT /carts/:cart_id/coupons/:coupon_id Update a specific coupon in cart

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published