vue-okra
v0.1.5
Published
> This is an vue module that abstracts the complexity of using okra with vue.
Downloads
2
Readme
okra-vuejs
This is an vue module that abstracts the complexity of using okra with vue.
USAGE
1. Install the module
npm install --save vue-okra
2. Import the module
In your app.vue
or any module where the component would be used like so:
<script>
import OkraButton from "vue-okra/src/components/OkraButton";
export default {
name: "app",
components: {
OkraButton
},
methods: {
success: function() {
window.console.log("okra success");
},
close: function() {
window.console.log("okra closed");
}
}
};
</script>
3. Implement in your project
- VueOkraComponent: Renders a button which when clicked loads okra Inline
<OkraButton text="Open Okra" token="5d8a35224d8113507c7521ac" env="production" client-name="Chikala" okra-key="c81f3e05-7a5c-5727-8d33-1113a3c7a5e4" callback-url="www.google.com" color="#b0c77f" limit="24" :corporate="false" connect-message="" redirect-url="" logo="" widget-success="" currency="" exp="" success-title="" success-message="" :guarantors="{'status': false, 'message': 'Please add your gaurantor','number': '2'}" :filter= "{'industry_type':'all','banks':['ecobank-nigeria','fidelity-bank','first-bank-of-nigeria','first-city-monument-bank','guaranty-trust-bank','heritage-bank','polaris-bank','stanbic-ibtc-bank','standard-chartered-bank','sterling-bank','union-bank-of-nigeria','united-bank-for-africa','wema-bank','unity-bank','alat','access-bank']}" :close="close" :success="success" :options="{fullname: 'USER_FULL_NAME', email: 'USER_EMAIL', bvn: 'USER_BVN'}" :products="['auth', 'transactions', 'balance', 'income', 'identity']" />
And then in your component.ts
<script>
import OkraButton from "./components/OkraButton.vue";
export default {
name: "app",
components: {
OkraButton
},
methods: {
success: function() {
window.console.log("okra success");
},
close: function() {
window.console.log("okra closed");
}
}
};
</script>
OkraOptions
|Name | Type | Required | Default Value | Description |
|-----------------------|----------------|---------------------|---------------------|---------------------|
| callback_url
| string
| true | undefined | This is your webhook to which okra sends the clients data to.
| key
| String
| true | undefined | Your public key from Okra.
| token
| String
| true | undefined | Your client token on the setting page of the okra dashboard
| products
| ArrayList<Enums.Product>
| true | undefined | The Okra products you want to use with the widget. list of products include: 'auth', 'transactions', 'balance', 'income', 'identity'
| env
| String
| true | https uses production
and http uses sandbox-production
| production
or production-sandbox
| clientName
| String
| false | This client
| Name of the customer using the widget on the application
| user
| object
| false | undefined | This contains some information of the user using the okra widget {fullname: 'USER_FULL_NAME',email: 'USER_EMAIL', bvn: 'USER_BVN'}
Data Dictionary
Auth
Field | Required | Description
-----------------------------|----------|---------------------------------------------------------------
idObjectID
| Yes | Unique Auth ID (Unique Okra Identifier)
validatedBoolean
| Yes | Customer authentication status
bankObjectID
| Yes | Unique Bank ID (Unique Okra Identifier)
customerObjectID
| Yes | Unique Customer ID (Unique Okra Identifier)
recordObjectID
| Yes | Unique Record ID (Unique Okra Identifier)
ownerObjectID
| Yes | Unique Company ID (Unique Okra Identifier) (Your Client Token)
created_atObject
| Yes | Date Auth was fetched
last_updatedObject
| Yes | Last Date Auth was fetched
Balance
Field | Required | Description
-----------------------------------|----------|--------------------------------------------------------------------------------------
idObjectID
| Yes | Unique Balance ID (Unique Okra Identifier)
available_balanceInteger
| Yes | Amount of available funds in account
ledger_balanceInteger
| Yes | Closing balance of account
currencyString
| Yes | The currency of the account
connectedBoolean
| Yes | Customer connection status (Did they choose to connect this account to you)
envString
| Yes | Okra API Env the transaction was pulled from production or production-sandbox
bankObjectID
| Yes | Unique Bank ID (Unique Okra Identifier)
accountsObjectID
| Yes | Unique Account ID (Unique Okra Identifier)
customerObjectID
| Yes | Unique Customer ID (Unique Okra Identifier)
recordArray of ObjectID
| Yes | Unique Record ID (Unique Okra Identifier)
created_atObject
| Yes | Date Balance was fetched
last_updatedObject
| Yes | Last Date Balance was fetched
Identity
Field | Required | Description
--------------------------------------|----------|--------------------------------------------------------------------------------------
idObjectID
| Yes | Unique Identifier ID (Unique Okra Identifier)
firstnameString
| Yes | Customer First Name
middlenameString
| Yes | Customer Middle Name
lastnameString
| Yes | Customer Last Name
next_of_kinsIdentity Object
| Yes | Customer Next of Kins
dobDate
| Yes | Customer Date of Birth
verifiedString
| Yes | BVN Validation status
scoreString
| Yes | Unique Okra Score
dtiString
| Yes | Customer Debt to Income Score
fullnameString
| Yes | Customer Fullname
company_nameString
| **Yes | Company Name if Corporate Identity
ninString
| Yes | Customer NIN Number
national_idString
| Yes | Customer National ID Number
drivers_lisenceString
| Yes | Customer Driver's License Number
nimcString
| Yes | Customer National Identity Management Commission (NIMC) Number
voters_idString
| Yes | Customer Voter's ID Number
rc_numberString
| Yes | Company's Registered Company Number if Corporate Identity
phoneArray of String
| Yes | Customer Phone Number
last_loginString
| Yes | Customer Last Login via Okra
emailArray of String
| Yes | Customer Email address
addressArray of String
| Yes | Customer
mothers_maidenString
| Yes | Customer Mother's Maiden Name
photo_idsArray of Object
| Yes | Customer's photo ID
envString
| Yes | Okra API Env the transaction was pulled from production or production-sandbox
bankObjectID
| Yes | Unique Bank ID (Unique Okra Identifier)
accountsObjectID
| Yes | Unique Account ID (Unique Okra Identifier)
customerObjectID
| Yes | Unique Customer ID (Unique Okra Identifier)
recordArray of ObjectID
| Yes | Unique Record ID (Unique Okra Identifier)
created_atObject
| Yes | Date Balance was fetched
last_updatedObject
| Yes | Last Date Balance was fetched
Transaction
Field | Required | Description
-----------------------------------------|----------|--------------------------------------------------------------------------------------
idObjectID
| Yes | Unique Transaction ID (Unique Okra Identifier)
debitInteger
| No | Amount deducted from account
creditInteger
| No | Amount credited to account
trans_dateDate
| Yes | Date transaction occurred
cleared_dateDate
| Yes | Date transaction cleared at bank
unformatted_trans_dateString
| Yes | Date transaction occurred (from bank)
unformatted_cleared_dateString
| Yes | Date transaction cleared (from bank)
branchString
| No | Branch transactions occurred
refString
| No | Bank reference ID (from bank)
envString
| Yes | Okra API Env the transaction was pulled from production or production-sandbox
codeString
| No | Bank Code (from bank)
benefactorObjectID
| No | Customer ID of sender (within Okra)
codeString
| No | Bank Code (from bank)
notesObject
| Yes | Breakdown of Narrative from bank
bankObjectID
| Yes | Unique Bank ID (Unique Okra Identifier)
accountObjectID
| Yes | Unique Account ID (Unique Okra Identifier)
recordArray of ObjectID
| Yes | Unique Record ID (Unique Okra Identifier)
created_atObject
| Yes | Date transactions was fetched
last_updatedObject
| Yes | Last Date transactions was fetched
Notes Data Dictionary
Field | Required | Description
-------------------------------------|----------|------------------------------------------------------------------------------------------
descString
| Yes | Narrative / Description of transaction (combination of bank and user entered information)
topicsArray of String
| Yes | Topics within the desc
placesArray of String
| Yes | Places mentioned within the desc
peopleArray of String
| Yes | People mentioned within the desc
actionsArray of String
| Yes | Actions mentioned within the desc
subjectArray of String
| Yes | Subject of the desc
prepositionArray of String
| Yes | Prepositions within desc to understand intent
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.