Giter Club home page Giter Club logo

rails_engine's People

Contributors

erin-king avatar

Watchers

 avatar  avatar

rails_engine's Issues

Customer Endpoints

GET /api/v1/customers/:id/invoices returns a collection of associated invoices
GET /api/v1/customers/:id/transactions returns a collection of associated transactions

BI: Items

  • GET /api/v1/items/most_revenue?quantity=x returns the top x items ranked by total revenue generated

  • GET /api/v1/items/most_items?quantity=x returns the top x item instances ranked by total number sold

  • GET /api/v1/items/:id/best_day returns the date with the most sales for the given item using the invoice date. If there are multiple days with equal number of sales, return the most recent day.

Set Up Models

  • Customers
  • Invoice Items
  • Invoices
  • Items
  • Merchants
  • Transactions

BI: Single Merchant - BOSS MODE

BOSS MODE: GET /api/v1/merchants/:id/customers_with_pending_invoices returns a collection of customers which have pending (unpaid) invoices. A pending invoice has no transactions with a result of success. This means all transactions are failed. Postgres has an EXCEPT operator that might be useful. ActiveRecord also has a find_by_sql that might help.

BI: Customers

GET /api/v1/customers/:id/favorite_merchant returns a merchant where the customer has conducted the most successful transactions

Record Endpoints for Merchants

GET /api/v1/merchants/:id/items returns a collection of items associated with that merchant

GET /api/v1/merchants/:id/invoices returns a collection of invoices associated with that merchant from their known orders

Blog Deliverable

Blog Post Deliverable

At the end of this project, write a reflection on what you learned and implemented. This will help you review your own code and gain practice explaining/talking through the code and the process/decisions that were made along the way. Include code snippets from the project in your explanations.

We recommend writing your blog on Medium, but if you have a blog site that you already use that is okay too. However, it must be publicly accessible and the link should be submitted to your instructors via Direct Message.

Here are some questions to think about as you write your post:

How did you approach this project? What sort of planning did you do?
What was the most challenging part of the project? How did you deal with that challenge? Were you able to overcome it? If yes, how did you overcome it? If no, what do you think is the reason for not being able to and what would you do differenlty?
What did you enjoy most about the project?
What part of the project are you most proud of and why?
If you had to do this project again, what would you want to change? (This could be your process, organization of code, particular piece of code that you would want to write differently etc.)
What is one specific thing that you want to take from this project and implement in your next project? (This could be something that worked well for you or something that didn’t go well, but you learned from it.)

Invoice Items Endpoints

GET /api/v1/invoice_items/:id/invoice returns the associated invoice
GET /api/v1/invoice_items/:id/item returns the associated item

BI: Single Merchant

  • GET /api/v1/merchants/:id/revenue returns the total revenue for that merchant across successful transactions

  • GET /api/v1/merchants/:id/revenue?date=x returns the total revenue for that merchant for a specific invoice date x

  • GET /api/v1/merchants/:id/favorite_customer returns the customer who has conducted the most total number of successful transactions.

  • BOSS MODE: GET /api/v1/merchants/:id/customers_with_pending_invoices returns a collection of customers which have pending (unpaid) invoices. A pending invoice has no transactions with a result of success. This means all transactions are failed. Postgres has an EXCEPT operator that might be useful. ActiveRecord also has a find_by_sql that might help.

NOTE: Failed charges should never be counted in revenue totals or statistics.
NOTE: All revenues should be reported as a float with two decimal places.

Invoice Endpoints

GET /api/v1/invoices/:id/transactions returns a collection of associated transactions
GET /api/v1/invoices/:id/invoice_items returns a collection of associated invoice items
GET /api/v1/invoices/:id/items returns a collection of associated items
GET /api/v1/invoices/:id/customer returns the associated customer
GET /api/v1/invoices/:id/merchant returns the associated merchant

BI: All Merchants

  • GET /api/v1/merchants/most_revenue?quantity=x returns the top x merchants ranked by total revenue

  • GET /api/v1/merchants/most_items?quantity=x returns the top x merchants ranked by total number of items sold

  • GET /api/v1/merchants/revenue?date=x returns the total revenue for date x across all merchants
    Assume the dates provided match the format of a standard ActiveRecord timestamp.

Items Endpoints

GET /api/v1/items/:id/invoice_items returns a collection of associated invoice items
GET /api/v1/items/:id/merchant returns the associated merchant

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.