Coder Social home page Coder Social logo

ghaiath / congestion-tax-calculator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from volvo-cars/congestion-tax-calculator

0.0 0.0 0.0 29 KB

A developer test assignment used as basis for candidate interview and evaluation.

License: The Unlicense

C# 93.29% Dockerfile 6.71%

congestion-tax-calculator's Introduction

Congestion Tax Calculator

Run docker-compose up up to start the services

This will seed the MongoDB with the initial data.

Not all endpoints implemented. Only get of tax rules and get congestion tax.

Once you run docker-compose up, surf to http://localhost:8000/swagger/index.html

Input:

{
  "vehicleType": "CAR",
  "dates": [
    "2013-01-14 21:00:00",
    "2013-01-15 21:00:00",
    "2013-02-07 06:23:27",
    "2013-02-07 15:27:00",
    "2013-02-08 06:27:00",
    "2013-02-08 06:20:27",
    "2013-02-08 14:35:00",
    "2013-02-08 15:29:00",
    "2013-02-08 15:47:00",
    "2013-02-08 16:01:00",
    "2013-02-08 16:48:00",
    "2013-02-08 17:49:00",
    "2013-02-08 18:29:00",
    "2013-02-08 18:35:00",
    "2013-03-26 14:25:00",
    "2013-03-28 14:07:27"
  ]
}

And got the follwing response:

{
  "vehicleType": "CAR",
  "taxes": {
    "2013-01-14T00:00:00": 0,
    "2013-01-15T00:00:00": 0,
    "2013-02-07T00:00:00": 21,
    "2013-02-08T00:00:00": 60,
    "2013-03-26T00:00:00": 8,
    "2013-03-28T00:00:00": 0
  },
  "total": 89
}

congestion-tax-calculator's People

Contributors

ghaiath avatar defsteph 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.