0.1.5 • Published 4 years ago

vue-okra v0.1.5

Weekly downloads
25
License
-
Repository
-
Last release
4 years ago

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

NameTypeRequiredDefault ValueDescription
callback_urlstringtrueundefinedThis is your webhook to which okra sends the clients data to.
keyStringtrueundefinedYour public key from Okra.
tokenStringtrueundefinedYour client token on the setting page of the okra dashboard
productsArrayList<Enums.Product>trueundefinedThe Okra products you want to use with the widget. list of products include: 'auth', 'transactions', 'balance', 'income', 'identity'
envStringtruehttps uses production and http uses sandbox-productionproduction or production-sandbox
clientNameStringfalseThis clientName of the customer using the widget on the application
userobjectfalseundefinedThis contains some information of the user using the okra widget {fullname: 'USER_FULL_NAME',email: 'USER_EMAIL', bvn: 'USER_BVN'}

Data Dictionary

Auth

FieldRequiredDescription
idObjectIDYesUnique Auth ID (Unique Okra Identifier)
validatedBooleanYesCustomer authentication status
bankObjectIDYesUnique Bank ID (Unique Okra Identifier)
customerObjectIDYesUnique Customer ID (Unique Okra Identifier)
recordObjectIDYesUnique Record ID (Unique Okra Identifier)
ownerObjectIDYesUnique Company ID (Unique Okra Identifier) (Your Client Token)
created_atObjectYesDate Auth was fetched
last_updatedObjectYesLast Date Auth was fetched

Balance

FieldRequiredDescription
idObjectIDYesUnique Balance ID (Unique Okra Identifier)
available_balanceIntegerYesAmount of available funds in account
ledger_balanceIntegerYesClosing balance of account
currencyStringYesThe currency of the account
connectedBooleanYesCustomer connection status (Did they choose to connect this account to you)
envStringYesOkra API Env the transaction was pulled from production or production-sandbox
bankObjectIDYesUnique Bank ID (Unique Okra Identifier)
accountsObjectIDYesUnique Account ID (Unique Okra Identifier)
customerObjectIDYesUnique Customer ID (Unique Okra Identifier)
recordArray of ObjectIDYesUnique Record ID (Unique Okra Identifier)
created_atObjectYesDate Balance was fetched
last_updatedObjectYesLast Date Balance was fetched

Identity

FieldRequiredDescription
idObjectIDYesUnique Identifier ID (Unique Okra Identifier)
firstnameStringYesCustomer First Name
middlenameStringYesCustomer Middle Name
lastnameStringYesCustomer Last Name
next_of_kinsIdentity ObjectYesCustomer Next of Kins
dobDateYesCustomer Date of Birth
verifiedStringYesBVN Validation status
scoreStringYesUnique Okra Score
dtiStringYesCustomer Debt to Income Score
fullnameStringYesCustomer Fullname
company_nameString**YesCompany Name if Corporate Identity
ninStringYesCustomer NIN Number
national_idStringYesCustomer National ID Number
drivers_lisenceStringYesCustomer Driver's License Number
nimcStringYesCustomer National Identity Management Commission (NIMC) Number
voters_idStringYesCustomer Voter's ID Number
rc_numberStringYesCompany's Registered Company Number if Corporate Identity
phoneArray of StringYesCustomer Phone Number
last_loginStringYesCustomer Last Login via Okra
emailArray of StringYesCustomer Email address
addressArray of StringYesCustomer
mothers_maidenStringYesCustomer Mother's Maiden Name
photo_idsArray of ObjectYesCustomer's photo ID
envStringYesOkra API Env the transaction was pulled from production or production-sandbox
bankObjectIDYesUnique Bank ID (Unique Okra Identifier)
accountsObjectIDYesUnique Account ID (Unique Okra Identifier)
customerObjectIDYesUnique Customer ID (Unique Okra Identifier)
recordArray of ObjectIDYesUnique Record ID (Unique Okra Identifier)
created_atObjectYesDate Balance was fetched
last_updatedObjectYesLast Date Balance was fetched

Transaction

FieldRequiredDescription
idObjectIDYesUnique Transaction ID (Unique Okra Identifier)
debitIntegerNoAmount deducted from account
creditIntegerNoAmount credited to account
trans_dateDateYesDate transaction occurred
cleared_dateDateYesDate transaction cleared at bank
unformatted_trans_dateStringYesDate transaction occurred (from bank)
unformatted_cleared_dateStringYesDate transaction cleared (from bank)
branchStringNoBranch transactions occurred
refStringNoBank reference ID (from bank)
envStringYesOkra API Env the transaction was pulled from production or production-sandbox
codeStringNoBank Code (from bank)
benefactorObjectIDNoCustomer ID of sender (within Okra)
codeStringNoBank Code (from bank)
notesObjectYesBreakdown of Narrative from bank
bankObjectIDYesUnique Bank ID (Unique Okra Identifier)
accountObjectIDYesUnique Account ID (Unique Okra Identifier)
recordArray of ObjectIDYesUnique Record ID (Unique Okra Identifier)
created_atObjectYesDate transactions was fetched
last_updatedObjectYesLast Date transactions was fetched

Notes Data Dictionary

FieldRequiredDescription
descStringYesNarrative / Description of transaction (combination of bank and user entered information)
topicsArray of StringYesTopics within the desc
placesArray of StringYesPlaces mentioned within the desc
peopleArray of StringYesPeople mentioned within the desc
actionsArray of StringYesActions mentioned within the desc
subjectArray of StringYesSubject of the desc
prepositionArray of StringYesPrepositions 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.

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago