Giter VIP home page Giter VIP logo

order-assignment's Introduction

A simple Order Management System.

Spring boot application with the below requirements :

● Creation of Customers
● Customers can create orders. For simplicity, once an order is created, thats final.

There is no order status like created, payment done, completed etc. 
It is assumed that customer has already made the payment while creating the order.

● Customers are categorized as regular, gold, platinum
● By default, a customer is regular.
○ Customer is promoted to gold when he has placed 10 orders
○ Customer is promoted to platinum when he has placed 20 orders
● Gold = 10% discount, platinum = 20% discount
● When a customer creates an order, if he is a gold customer, automatically 10% discount is applied on the order. 20% for platinum customers.
● It is not mandatory to implement any other entities which are not mentioned here, like products or payments etc.
● Since it is assumed that customer has already made the full payment during creation of the order, this discount information has to be kept safe by the application. We need to keep track of how much discount is given to which customer and for which order, so that customers can claim money back later.

Hints

● Identify the entities.
● Think of the REST APIs needed.
● Identify things which can be done asynchronuosly. 

Expectations

● Clean, standard REST APIs
● Well defined entities. You can use any database of your choice
● Junit test cases

Nice to have

● Cron job to send emails to customer when they are approaching the gold/platinum barriers. 
For e.g., email to customer when a customer has 9 orders: 
    "You have placed 9 orders with us. Buy one more stuff and you will be promoted to Gold customer and enjoy 10% discounts!"

You dont need to actually send the emails. It can be a dummy method like this :
    void sendMail() {
        System.out.println("Sent mail to customer");
    }

order-assignment's People

Contributors

vikas-mehra avatar

Watchers

 avatar

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.