Giter VIP home page Giter VIP logo

onidata_challange's Introduction

challenge

Comments

Acceptance Criteria

  • Users are able to submit contracts and payments to the API

[GET] /api/contracts/<id>

[POST]/api/payments/<contract_id>

  • Users are able to retrieve contracts and payments that they submitted

[GET] /api/contracts/

  • Users are able to retrieve the amount due for each contract they have
    • Amount due is how much they still have to pay for a contract
    • You must consider the interest rate and all payments made

[GET] /api/contracts/

Property: amount_due

  • Users cannot see contracts/payments submitted by other users

done

  • Use of the API requires a unique auth token for each user

[Header] Authorization: Token <token_here>

It can be generated through admin

  • Submitted contracts must include, at least, the following attributes:
    • Identifier - an autogenerated random identifier for the contract
    • Amount - the amount owed to the bank
    • Interest rate - the monthly interest rate of the contract
    • IP Address - IP of the contract submitter
    • Submission date - the date the contract was submitted
    • Bank - information about the bank for which the money is owed, can be simple text (e.g., name, tax id, etc.) or a separate model altogether
    • Customer Metadata - information about the individual that owes the money, can be simple text (e.g., name, email, tax id, etc.) or a separate model altogether

done

  • Submitted payments must include, at least, the following attributes:
    • Contract identifier
    • Payment date
    • Payment amount

done

Optional:

  • Provide an authenticated admin view that allows me to view all contracts

/admin

  • Document the API

/api/docs

  • Expand the financial model to include taxes/insurance and other costs

nope

Additional

Increase Amount by Month (compound interest)

There is a command called increase_amount_due acessible via: python manage.py increase_amount_due.py (contracts/management/commands). It should be called daily basis (cron) to verify all the contracts with due date on this day and increase the value of amount_due

Tokens

It should be created at admin panel (/admin url)

Admin credentials

Available on current sqlite database: admin / admin1234

Requirements

Available at src/requirements.txt Python version 3.7

onidata_challange's People

Contributors

ramonbrbs avatar

Watchers

James Cloos 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.