Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

okra-node

Package Overview
Dependencies
Maintainers
5
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

okra-node

Okra JS Node Module

  • 0.1.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
increased by66.67%
Maintainers
5
Weekly downloads
 
Created
Source

okra-node

This is a npm module that abstracts the complexity of using okra with node.

USAGE

1. Install the module

Install with yarn:

yarn add okra-node

but you can use npm if you like:

npm install --save okra-node

2. Import the module

In your app.js or any module where the component would be used:

import * as okra_client from "okra-node";

3. Implementation

Okra node exposes a bunch of APIs that might be useful in your application.

  • getAuth: get all successful bank verification for customer
      okra_client.getAuth(accessToken, {}, (err, results) => {
      // Handle err
      const auths = results.auths;
      });
    
  • getTransactions: get all transactions associated to your bank
      okra_client.getTransactions(accessToken, {}, (err, results) => {
      // Handle err
      const transactions = results.trans;
      });
    
  • getBalances: this returns the real-time balance for each of an Record's accounts
      okra_client.getBalances(accessToken, {}, (err, results) => {
      // Handle err
      const balances = results.balances;
      });
    
  • getIdentities: this returns all the identities of customer related to your company account
      okra_client.getIdentities(accessToken, {}, (err, results) => {
      // Handle err
      const identities = results.identities;
      });
    
  • getRecords: this returns all the records of transaction
      okra_client.getRecords(accessToken, {}, (err, results) => {
      // Handle err
      const records = results.records;
      });
    
  • retryRecord: this re-run a record
      okra_client.retryRecord(accessToken, {record_id: string, user: string}, (err, results) => {
          // Handle err
      });
    
  • getAccounts: this returns all the accounts of customer associated to your company
      okra_client.getAccounts(accessToken, {}, (err, results) => {
          // Handle err
      const accounts = results.accounts;
      });
    
  • getTotalDebitCredits: this returns the total credit and debits made on a customer account associated to your company.
      okra_client.getTotalDebitCredits(accessToken, {account:"5e1efdsa842182515cedd066"}, (err, results) => {
          // Handle err
      const total = results.result
      });
    
FieldRequiredDescription
account
String
yesId of the said account.
  • getProducts: this returns all the available products

      okra_client.getProducts(accessToken, {}, (err, results) => {
          // Handle err
      const product = results.products;
      });
    
  • getCustomerRecordByMethod: this returns all the available products

      okra_client.getCustomerRecordByMethod(accessToken, { record: 'record_id', method: 'okra_product' }, (err, results) => {
          // Handle err
      const product = results['okra_product'];
      });
    
  • getBanks: this returns the list of supported banks

      okra_client.getBanks((err, results) => {
          // Handle err
      const banks = results.banks;
      });
    
  • getBankById: this returns a specific bank info

      okra_client.getBankById(bankId,(err, results) => {
      // Handle err
      const bank = results;
      });
    
  • getCustomers: this returns an array of customers associated to your company

      okra_client.getCustomers(accessToken, {},(err, results) => {
          // Handle err
      const customers = results.customers;
      });
    
  • mergeIdentities: Okra offers an api that helps to merge two identical identities into a single identity

      okra_client.mergeIdentities(accessToken,
        {
            final:"5e1efaaa848182515cedd066",
            initial:"5e20c13ed2356505c26f5a94",
            options: {}
        },
        (err, results) => {
          // Handle err
        const mergeResult = results;
        });
    
FieldRequiredDescription
final
String
yesId of identity to merge into.
initial
String
yesId of identity moved from.
options
Object
noother identities information might want to effect.

Options Schema

KeyDescription
bvn
Number
Bank Verification Number of the entity associated with this identity
nin
Number
NIN of the entity associated with this identity
national_id
Number
National Id of the entity associated with this identity
nims
String
NIMs number of the entity associated with this identity
rc_number
String
Company RC number of the entity associated with this identity
voters_id
String
Voters Id of the entity associated with this identity
marital_status
String
Marital Status of the entity associated with this identity
gender
String
Gender of the entity associated with this identity
dob
Date
Date of birth of the entity associated with this identity
mothers_maiden
String
Mother's maiden name of the entity associated with this identity

accessToken is a required string to access your account with us. You can find it as client token on the setting page of the okra dashboard

For more information checkout okra's documentation

Contributing

Please feel free to fork this package and contribute by submitting a pull request to enhance the functionalities.

License

The MIT License (MIT). Please see License File for more information.

Keywords

FAQs

Package last updated on 25 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc