Skip to content

Create a simulation mode that returns sample data instead of real data, for accounts and transactions #3

@jeriko

Description

@jeriko

Why

The repo allows working with the Investec API, but it's hard to build and test against a live API. There is a very hacky simulation endpoint in routes/fake_bank.js, but it's not consistent with Investec's API and doesn't have much functionality. It would be very useful to be able to talk to the same endpoints and just change a request header to use "sandbox" or "live" mode. Probably the easiest way to do this is to decide based on API credentials in the headers.

Definition of Done

Consumers of this repo's API can change their auth credentials to "SANDBOX" and use the same API endpoints to access a sandbox version of the API without needing to change endpoints. For starters, this should work for fetching a list of accounts and a list of transactions.

What

Solving this needs some architectural thinking, and we should chat about it.

Here's a guess at one way to achieve it:

  • Create a module that replicates sandbox functionality for getting accounts and transaction records. Devin Pearson has already done some work here, so it may be as simple as pulling in that code.
  • Update modules/investec.js to decide whether to send API requests to the openapi.investec.com endpoint or to run an internal simulator function instead

Bounty

There is a R3,000 reward on adding this functionality. Please comment on the issue if you want to start working towards claiming the bounty.

Where do I get support?

Drop into the dedicated bounties Slack channel here. We'll be more than happy to help with any questions or support around your bounties build/ the bounties in general/ or if you want to hang out and help others.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions