This is an vue module that abstracts the complexity of using okra with vue.
npm install --save vue-okra
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>
- 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>
Name | Type | Required | Default Value | Description |
---|---|---|---|---|
callback-url |
string |
true | undefined | |
key |
String |
true | undefined | Your public key from Okra. |
token |
String |
true | undefined | Your token from your Okra Dashboard. |
products |
Array |
true | ['Auth'] |
The Okra products you want to use with the widget. |
env |
String |
true | production | production or production-sandbox |
client-name |
String |
false | This client |
Name on the widget |
logo |
String(URL) |
false | Okra's Logo | |
color |
HEX |
false | #3AB795 | Theme on the widget |
limit |
Number |
false | 24 | Statement length |
filter |
Object |
false | Filter for widget | |
corporate |
Boolen |
false | false |
Corporate or Individual account |
connect-message |
String |
false | Instruction to connnect account | |
guarantors |
Object |
false | ||
widget-success |
String |
false | Widget Success Message | |
widget-failed |
String |
false | Widget Failed Message | |
currency |
String |
false | NGN | Wallet to bill |
exp |
Date |
false | Won't expire | Expirary date of widget |
options |
Object |
false | You can pass a object custom values eg id | |
success |
Function |
false | Action to perform after widget is successful | |
close |
Function |
false | Action to perform if widget is closed |
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 |
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 |
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 |
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 |
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
Please feel free to fork this package and contribute by submitting a pull request to enhance the functionalities.
The MIT License (MIT). Please see License File for more information.