Whts The Tea is a project that allows developers to create subscriptions for customers, and different teas. All endpoints are active through local host.
- Clone this repo
bundle install
rails s
- `rails db:{create,migrate}``
- Clone this repo
- in terminal (apple or integrated)
- bundle install
- bundle exec rspec
params = {
customer_id: 1,
tea_id: 1,
title: 'The High Life',
frequency: 'Twice a week',
price: 25.50
}
post https://localhost:3000/create_subscriptions, params:params
{
data: {
customer_id: 1,
tea_id: 1,
status: 'active',
title: 'The High Life'
price: 25.50,
frequency: 'Twice a week'
}
}
params = {
subscription_id: 1
}
post https://localhost:3000/customer_subscriptions_cancel, params:params
{
data: {
customer_id: 1,
tea_id: 1,
status: 'cancelled',
title: 'The High Life'
price: 25.50,
frequency: 'Twice a week'
}
}
params = {
customer_id: 1
}
post https://localhost:3000/customer_subscriptions, params:params
{
data: {
customer_id: 1,
subscriptions: {
active:
[{
title: 'The High Life'
price: 25.50,
status: 'active',
frequency: 'Twice a week',
tea_id: 1
}],
cancelled:
[{
title: 'Sea Breeze'
price: 45.50,
status: 'cancelled',
frequency: 'Once a month',
tea_id: 2
}]
}
}
}