This API is built for a tea subscription service that requires 3 endpoints:
- An endpoint to subscribe a customer to a tea subscription
- An endpoint to cancel a customer's tea subscription
- An endpoint to see all of a customer's subscription (active and cancelled)
- Ruby (version >= 3.2.2)
- Rails (version >= 7.1.3.2)
- PostgreSQL
-
Clone the repository:
git clone <repository_url>
-
Install dependencies:
bundle install
-
Set up the database:
rails db:{drop,create,migrate,seed}
GET /api/v1/customers/:customer_id/subscriptions
POST /api/v1/customers/:customer_id/subscriptions
DELETE /api/v1/customers/:customer_id/subscriptions/:subscription_id