Giter Club home page Giter Club logo

creditsal's Introduction

Web API with ASP.NET Core - Demo using "Postman Tool for API Testing":

GET a customer object

postman1

POST that customer name and salary to process and return the credit

postman2


Business rules of Creditsal Web API project

1. It is a system that receive a customer name and a desired credit value.

2. This system will consult an external API that returns a list of registered customers (name, age and salary).

3. Then it will search in that list the customer who was passed in API by parameter and calculate how much of credit value this customer may receive, how much of each parcel and how many parcels the credit will be paid.

4. Depending on customer age, the customer may receive only a percentage of his salary as credit value

   • Age higher than 80, may receive until 20% of his salary

   • Age higher than 50, may receive until 70% of his salary

   • Age higher than 30, may receive until 90% of his salary

   • Age higher than 20, may receive until 100% of his salary

5. Depending on customer salary, the parcel may be compromise only a percentage of his salary

   • From 1000 to 2000 R$, the parcel may compromise 5% of his salary

   • From 2001 to 3000 R$, the parcel may compromise 10% of his salary

   • From 3001 to 4000 R$, the parcel may compromise 15% of his salary

   • From 4001 to 5000 R$, the parcel may compromise 20% of his salary

   • From 5001 to 6000 R$, the parcel may compromise 25% of his salary

   • From 6001 to 7000 R$, the parcel may compromise 30% of his salary

   • From 7001 to 8000 R$, the parcel may compromise 35% of his salary

   • From 8001 to 9000 R$, the parcel may compromise 40% of his salary

   • From 9001 R$, a parcela poderá comprometer 45% of his salary

6. It does not permit that API receive a negative credit value.

7. It does not permit that APi receive a zero credit value.

8. This Web API will have an input endpoint that respect the contact below:

Path: api/credit/{name}/{creditRequestByUser} Response:
{
  "name": "string",
   "salary": 1.0, -- decimal
   "creditRequestByUser": 1.0, -- decimal
   "creditProvided": 2.0, -- decimal
   "quantityOfParcels": 4, -- int
   "valueOfEachParcel": 5.0 -- decimal
}
9. This Web API has to consult an external API in the URL "http://www.mocky.io/v2/5e2b3b8d32000054001c7109" that has an JSON object as response like bellow:
[
  {
   "Nome": "string",
   "Idade": 0, -- int
   "Salario": 1.0 -- decimal
  }
]

creditsal's People

Contributors

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