Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jeriko opened this issue Oct 21, 2022 · 0 comments
Labels
bounty enhancement New feature or request

Comments

@jeriko
Copy link
Collaborator

jeriko commented Oct 21, 2022

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.

@jeriko jeriko added the bounty label Oct 21, 2022
@jeriko jeriko changed the title Create a simulation mode that returns sample data instead of real data Feature: Create a simulation mode that returns sample data instead of real data Oct 21, 2022
@jeriko jeriko added the enhancement New feature or request label Oct 21, 2022
@jeriko jeriko changed the title Feature: Create a simulation mode that returns sample data instead of real data Create a simulation mode that returns sample data instead of real data Oct 21, 2022
@jeriko jeriko changed the title Create a simulation mode that returns sample data instead of real data [WIP] Create a simulation mode that returns sample data instead of real data Oct 24, 2022
@jeriko jeriko changed the title [WIP] Create a simulation mode that returns sample data instead of real data Create a simulation mode that returns sample data instead of real data, for accounts and transactions Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant