Web API berdasarkan 7 user story problem statement. Web API ini dibangun menggunakan framework Ruby on Rails dan database SQLite3. API tersebut diantaranya
GET /customers
GET /customers/${id}
Parameter | Type | Description |
---|---|---|
id |
integer |
Optional |
POST /customers
Parameter | Type | Description |
---|---|---|
name |
string |
Required |
email |
string |
Required |
phone |
string |
Required |
PUT /customers/${id}
Parameter | Type | Description |
---|---|---|
id |
integer |
Required |
name |
string |
Optional |
email |
string |
Optional |
phone |
string |
Optional |
DELETE /customers/${id}
Parameter | Type | Description |
---|---|---|
id |
integer |
Required |
GET /categories
GET /categories/${id}
Parameter | Type | Description |
---|---|---|
id |
integer |
Optional |
POST /categories
Parameter | Type | Description |
---|---|---|
name |
string |
Required |
PUT /categories/${id}
Parameter | Type | Description |
---|---|---|
id |
integer |
Required |
name |
string |
Optional |
DELETE /categories/${id}
Parameter | Type | Description |
---|---|---|
id |
integer |
Required |
GET /item_categories
GET /item_categories/${id}
Parameter | Type | Description |
---|---|---|
id |
integer |
Optional |
POST /item_categories
Parameter | Type | Description |
---|---|---|
category_id |
integer |
Required |
item_id |
integer |
Required |
PUT /item_categories/${id}
Parameter | Type | Description |
---|---|---|
id |
integer |
Required |
category_id |
integer |
Optional |
item_id |
integer |
Optional |
DELETE /item_categories/${id}
Parameter | Type | Description |
---|---|---|
id |
integer |
Required |
GET /menu_items
GET /menu_items/${id}
Parameter | Type | Description |
---|---|---|
id |
integer |
Optional |
POST /menu_items
Parameter | Type | Description |
---|---|---|
name |
string |
Required |
price |
float |
Required |
description |
string |
Optional |
PUT /menu_items/${id}
Parameter | Type | Description |
---|---|---|
id |
integer |
Required |
name |
string |
Optional |
price |
float |
Optional |
description |
string |
Optional |
DELETE /menu_items/${id}
Parameter | Type | Description |
---|---|---|
id |
integer |
Required |
GET /orders
GET /orders/${id}
Parameter | Type | Description |
---|---|---|
id |
integer |
Optional |
POST /orders
Parameter | Type | Description |
---|---|---|
customer_id |
integer |
Required |
PUT /orders/${id}
Parameter | Type | Description |
---|---|---|
id |
integer |
Required |
status |
string |
Optional |
GET /order_details
GET /order_details/${id}
Parameter | Type | Description |
---|---|---|
id |
integer |
Optional |
POST /order_details
Parameter | Type | Description |
---|---|---|
order_id |
integer |
Required |
menu_item_id |
integer |
Required |
quantity |
integer |
Required |
price |
float |
Required |
GET /report
Parameter | Type | Description |
---|---|---|
date_start |
date |
Optional |
date_end |
date |
Optional |
price |
float |
Optional |
email |
string |
Optional |
PUT /orders-exceed-limit
Serta terdapat Unit Testing Models dan Requests dengan 139 Test Case
Finished in 10.67 seconds (files took 7.5 seconds to load)
139 examples, 0 failures
bundle install
ruby bin/rails server
rails db:migrate
rails db:seed
bundle exec rspec -fd