Git Product home page Git Product logo

risk_test's Introduction

Project Details

Objective

This project is a small application for payment validation, where the user enters the payment data and the application returns if it is a purchase with a risk of fraud.

Starting the project

This project runs on Ruby version 3.3 using Rails 7.1.3. But don't worry, just have docker installed on your machine and you'll be able to run it with just a few commands.

$ docker-compose build
$ docker-compose up

Before running the above commands, make sure the docker-compose up command is running.

For testing, we used RSpec and the gems shoulda-matchers, database cleaner, Faker, and FactoryBot. If you want to execute the application tests, use the command below:

$ docker-compose exec web bundle exec rspec

For code quality and linter, we used the gems rubocop, rubocop-rails, rubocop-rspec, and rubocop-performance. You can execute them using the command below:

$ docker-compose exec web bundle exec rubocop

Endpoints

Use an app like insomnia or postman, and add a file with the name file.You can use the body type as multipart form data.

Import transactions by csv:

post /import_transactions

Check transaction:

Example:

post /check_transaction
{
  "transaction_id" : 123456,
  "merchant_id" : 987654,
  "user_id" : 123456,
  "card_number" : "434505******9116",
  "transaction_date" : "2019-11-31T23:16:32.812632",
  "transaction_amount" : 499,
  "device_id" : 32142
}

risk_test's People

Contributors

lpaivareis avatar

Stargazers

Pedro Henrique 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.