GithubHelp home page GithubHelp logo

banktrue's Introduction

banktrue

Python 3.7.3

Install packages: pip install -r requirements.txt

Create User

POST
/customers/create/

Params:

name: string
email: string
taxid: string
city: string
cellphone: string

response example:

{
    "name": "Alonso de Assis",
    "email": "[email protected]",
    "taxid": "00224555",
    "cellphone": "34991070000",
    "city": "Patos de mina",
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0YXhpZCI6IjAxNTI5MTY0NjY1In0.rARotlt3_I8b5mARau9-FIetMVLtZ0uL-vsGezsu3sg"
}

Obs: Token will be used to authenticated

Create Contract

POST
/contract/create/

Params:

token: string
interest_rate: integer
installment_number: integer
bank: string
amount: string

response example:

{
    "customer": "9ed42336-eb96-4dc4-aafe-ced36286b4b5",
    "amount": "100.00",
    "amount_due": "110.00",
    "interest_rate": "10.00",
    "installment_number": 10,
    "ip_address": "127.0.0.1",
    "bank": "Brasil"
}

Contract Detail

GET
contracts/?token=mytoken

response example:

{
    "contract": {
        "customer": "9ed42336-eb96-4dc4-aafe-ced36286b4b5",
        "amount": "100.00",
        "amount_due": "110.00",
        "interest_rate": "10.00",
        "installment_number": 10,
        "bank": "Brasil"
    },
    "summary": {
        "amount_due": 88.0,
        "amount_pay": 22.0,
        "installmets_pay": 2
    },
    "installments": [
        {
            "payment_date": "2019-06-07T14:27:52.622440",
            "due_date": "2020-01-07",
            "number": 7,
            "amount": "11.00",
            "amount_due": "11.00",
            "late_fee": "5.00"
        }
    
    ]
}

Constract list

GET
/contracts/user/?token=mytoken

response example:

[
    {
        "customer": "9ed42336-eb96-4dc4-aafe-ced36286b4b5",
        "amount": "100.00",
        "amount_due": "110.00",
        "interest_rate": "10.00",
        "installment_number": 10,
        "bank": "Brasil"
    },
    {
        "customer": "9ed42336-eb96-4dc4-aafe-ced36286b4b5",
        "amount": "100.00",
        "amount_due": "110.00",
        "interest_rate": "10.00",
        "installment_number": 10,
        "bank": "Brasil"
    }
]

Installment

GET
/contracts/installments/contract_id?token=mytoken

response example:

[
    {
        "payment_date": null,
        "due_date": "2019-10-07",
        "number": 4,
        "amount": "11.00",
        "amount_due": null,
        "late_fee": null
    },
    {
        "payment_date": null,
        "due_date": "2020-04-07",
        "number": 10,
        "amount": "11.00",
        "amount_due": null,
        "late_fee": null
    },
]

Pay

POST
/contracts/payment/

Params

token: string
contract_id: string
id: string
amount_due: integer
late_fee: integer

response example:

{
    "payment_date": "2019-06-07T14:29:15.908768",
    "due_date": "2019-11-07",
    "number": 5,
    "amount": "11.00",
    "amount_due": "11.00",
    "late_fee": "5.00"
}

banktrue's People

Contributors

chicosilva 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.