0.0.53 • Published 12 months ago

uw-rafiki v0.0.53

Weekly downloads
-
License
MIT
Repository
bitbucket
Last release
12 months ago

uw-rafiki

description

Installation

This is a Node.js module available through the npm registry. It can be installed using the npm or yarn command line tools.

npm install uw-rafiki --save
#  for Pay day loan
const { default: UW } = require('uw-rafiki');
const { PDL } = UW;

const uw = new PDL({
    # employmentType can be 'SALARIED', FARMER, CASUAL_WORKER, SELF_EMPLOYED
    employmentType: 'SALARIED',
    awb:  10002 ,
    dailyAverageBalance: 10002,
    # accomodationType can be 'SELF_OWNED', PG_ACCOMODATION, RENTAL_LIVING_ALONE, RENTAL_LIVING_WITH_FAMILY, PARENTAL, OTHERS
    accomodationType: 'SELF_OWNED',
    # maritalStatus can be 'MARRIED_WITH_NO_DEPENDENT', MARRIED_WITH_DEPENDENT, UNMARRIED_WITH_DEPENDENT, UNMARRIED_WITH_NO_DEPENDENT, OTHERS
    maritalStatus: 'MARRIED_WITH_NO_DEPENDENT',
    age: 31,
    # scoreCategory can be 'NO-SCORE', RISK, SEVERE, PRIME, ULTIMATE, ELITE
    scoreCategory: 'NO-SCORE',
    averageWalletCreditToAwb: 1.01,
    mobileWalletVintage: 16,
    minimumNoOfDebitPerMonth: 22,
    minimumNoOfCreditPerMonth: 10,
    # walletMnoReportStatus can be 'NEGATIVE', POSITIVE
    walletMnoReportStatus: 'POSITIVE',
    # rafikiScoreCategory can be 'LOSS', DOBBTFUL, SUBSTANDARD, CURRENT, NEW_CUSTOMER, ESPECIALLY_MENTIONED
    rafikiScoreCategory: 'CURRENT'
    });

console.log(uw.interestRate);
console.log(uw.scorecard);
console.log(uw.isEligibile());
console.log(uw.isEligibile(88000));
console.log(uw.loans);
#  for instant monthly loan
const { default: UW } = require('uw-rafiki');
const { IPL } = UW;

const uw = new IPL({
    # employmentType can be 'SALARIED', FARMER, CASUAL_WORKER, SELF_EMPLOYED
    employmentType: 'SALARIED',
    awb:  10002 ,
    dailyAverageBalance: 10002,
    # accomodationType can be 'SELF_OWNED', PG_ACCOMODATION, RENTAL_LIVING_ALONE, RENTAL_LIVING_WITH_FAMILY, PARENTAL, OTHERS
    accomodationType: 'SELF_OWNED',
    # maritalStatus can be 'MARRIED_WITH_NO_DEPENDENT', MARRIED_WITH_DEPENDENT, UNMARRIED_WITH_DEPENDENT, UNMARRIED_WITH_NO_DEPENDENT, OTHERS
    maritalStatus: 'MARRIED_WITH_NO_DEPENDENT',
    age: 31,
    # scoreCategory can be 'NO-SCORE', RISK, SEVERE, PRIME, ULTIMATE, ELITE
    scoreCategory: 'NO-SCORE',
    averageWalletCreditToAwb: 1.01,
    mobileWalletVintage: 16,
    minimumNoOfDebitPerMonth: 22,
    minimumNoOfCreditPerMonth: 10,
    # walletMnoReportStatus can be 'NEGATIVE', POSITIVE
    walletMnoReportStatus: 'POSITIVE',
    # rafikiScoreCategory can be 'LOSS', DOBBTFUL, SUBSTANDARD, CURRENT, NEW_CUSTOMER, ESPECIALLY_MENTIONED
    rafikiScoreCategory: 'CURRENT'
    });

console.log(uw.interestRate);
console.log(uw.scorecard);
console.log(uw.isEligibile());
console.log(uw.isEligibile(88000));
console.log(uw.loans);

Tests

npm install
npm test

Usage

Reference

To get better vision about the response structure for 4.x.x series and 5.x.x series check the following link. HTTP response structure

Dependencies

None

Dev Dependencies

  • chai: BDD/TDD assertion library for node.js and the browser. Test framework agnostic.
  • mocha: simple, flexible, fun test framework
  • sinon: JavaScript test spies, stubs and mocks.

License

MIT

0.0.51

1 year ago

0.0.52

1 year ago

0.0.53

12 months ago

0.0.50

1 year ago

0.0.49

1 year ago

0.0.47

1 year ago

0.0.46

1 year ago

0.0.44

1 year ago

0.0.45

1 year ago

0.0.42

1 year ago

0.0.43

1 year ago

0.0.40

1 year ago

0.0.41

1 year ago

0.0.37

1 year ago

0.0.38

1 year ago

0.0.39

1 year ago

0.0.36

1 year ago

0.0.35

1 year ago

0.0.32

1 year ago

0.0.33

1 year ago

0.0.34

1 year ago

0.0.30

1 year ago

0.0.31

1 year ago

0.0.29

1 year ago

0.0.28

1 year ago

0.0.27

1 year ago

0.0.26

1 year ago

0.0.23

1 year ago

0.0.24

1 year ago

0.0.25

1 year ago

0.0.22

1 year ago

0.0.21

1 year ago

0.0.20

1 year ago

0.0.17

1 year ago

0.0.18

1 year ago

0.0.19

1 year ago

0.0.15

1 year ago

0.0.16

1 year ago

0.0.14

1 year ago

0.0.13

1 year ago

0.0.11

1 year ago

0.0.12

1 year ago

0.0.10

1 year ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.1

2 years ago