Rales(Rails) Engine. Lets play with some JSON!
- Clone this repo using the link above
- Please use Ruby 2.4.1
- run 'bundle'
- rails db:{drop,create,migrate}
- rake setup:csv
- Test with rspec
- /api/v1/merchants.json (gives a list of all merchants)
- /api/v1/merchants/1.json (gives one merchant)
- /api/v1/invoices.json (gives a list of all invoices)
- /api/v1/invoices/1.json (gives one invoice)
- /api/v1/invoice_items.json (gives a list of all invoice_items)
- /api/v1/invoice_items/1.json (gives one invoice_item)
- /api/v1/items.json (gives a list of all items)
- /api/v1/items/1.json (gives one item)
- /api/v1/transactions.json (gives a list of all transactions)
- /api/v1/transactions/1.json (gives one transaction)
- /api/v1/customers.json (gives a list of all customers)
- /api/v1/customers.json (gives one customer)
- /api/v1/merchants/:id/items (returns a collection of items associated with that merchant)
- api/v1/merchants/:id/invoices (returns a collection of invoices associated with that merchant from their known orders)
- /api/v1/invoices/:id/transactions (returns a collection of associated transactions)
- /api/v1/invoices/:id/invoice_items (returns a collection of associated invoice items)
- /api/v1/invoices/:id/items (returns a collection of associated items)
- /api/v1/invoices/:id/customer (returns the associated customer)
- /api/v1/invoices/:id/merchant (returns the associated merchant)
- /api/v1/invoice_items/:id/invoice (returns the associated invoice)
- /api/v1/invoice_items/:id/item (returns the associated item)
- /api/v1/items/:id/invoice_items (returns a collection of associated invoice items)
- /api/v1/items/:id/merchant (returns the associated merchant)
- /api/v1/transactions/:id/invoice (returns the associated invoice)
- /api/v1/customers/:id/invoices (returns a collection of associated invoices)
- /api/v1/customers/:id/transactions (returns a collection of associated transactions)