Giter Site home page Giter Site logo

beyond_finance_deposits_exercise's Introduction

Deposits Exercise

Requirements

A tradeline on a credit report represents an account, such as a credit card or car loan.

In the codebase, the following exists:

  • The Tradeline model, which can be used to store tradelines in the database.
  • A Tradeline controller, which serves both the index and show routes for tradelines.
  • Basic rspec tests on the controller with a tradeline FactoryBot.

Add in the ability to create deposits for a specific tradeline using a JSON API call. You should store the deposit date (this is most likely a future date), and amount. Expose the outstanding balance for a given tradeline in the JSON output for TradelinesController#show, and TradelinesController#index. The oustanding balance should be calculated as the amount minus all of the deposit amounts.

In addition:

  • A deposit should not be able to be created that exceeds the outstanding balance of a tradeline.
  • You should return validation errors if a deposit cannot be created.
  • Expose endpoints for seeing all deposits for a given tradeline, as well as seeing an individual deposit.

Feel free to add any gems to the Gemfile, and touch any of the existing code. For example, if you prefer to use PostgreSQL or MySQL over the included SQLite, or a serializer of your choice, please go ahead. This is not required, but you can be as creative as you want.

This exercise is purely API based, and will not have any frontend components. Please do not spend more than 3 hours on this.

Setup

The exercise requires Ruby 3.3.0. Simply clone the repo, and run bundle to get started. This will install Rails 7.1.2, and the other specified gems.

Submission

Please do not fork the repo; if forked accidentally, please delete the fork. For review, either of the following methods for submission are preferred:

  • Cloning the repository and then uploading it under your Github account for review.
  • Zipping up the directory.

beyond_finance_deposits_exercise's People

Contributors

mikelarkin avatar aahmad avatar spacechurro avatar

Watchers

Brian Porter 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.