🤖 Merge PR #49993 flutterwave-node by @besemuna

* setup 🎉

* add Card.charge()

* add Card.validate()

* add Status.requery()

* add Status.xrequery()

* add Account.charge()

* add Account.validate()

* add TokenCharge.card()

* add TokenCharge.account()

* add MobileOptions.chargeUssd()

* add Misc.getFee():

* add Misc.getBalHist()

* add Misc.getBanks()

* add Misc.disburse()

* add Misc.getBalance()

* add Misc.exchange_rates()

* add Misc.list_transactions()

* add Preauth.preauth()

* add Preauth.void()

* add Preauth.void()

* add Preauth.captureCard()

* add security

* add CustomRequest

* add Transfer.initiate()

* add Transfer.bulk()

* add Transfer.fetch()

* add Transfer.list()

* add Transfer.getApplicableFee()

* add Transfer.getBalance()

* add Transfer.retrieveStatusOfBulk()

* add Transfer.accountVerification()

* add Subaccount.create()

* add Subaccount.list()

* add Subaccount.fetch()

* add Subscription.list()

* add Subscription.fetch()

* add Subscription.activate()

* add Subscription.cancel()

* add Paymentplan.create()

* add Paymentplan.list()

* add Paymentplan.fetch()

* add Paymentplan.cancel()

* add Paymentplan.edit()

* add MobileMoney.mpesa()

* add MobileMoney.ghana()

* add MobileMoney.zambia()

* add MobileMoney.rwanda()

* add MobileMoney.francophone()

* add MobileMoney.uganda()

* add VirtualCards.create()

* add VirtualCards.list()

* add VirtualCards.get()

* add VirtualCards.terminate()

* add VirtualCards.fund()

* add VirtualCards.fetchTransactions()

* add VirtualCards.withdraw()

* add VirtualCards.freeze()

* add VirtualCards.unfreeze()

* add Bvn.verification()

* add VirtualAccount.accountNumber()

* add Refund.refund()

* add VerifyTransaction.verify()

* add BillsPayment.bills()

* add Settlement.list()

* add Settlement.fetch()

* add USSD.charge()

* add Ebills.create()

* add Ebills.update()

* fix : lint issues

* fix : package name

* add test

* add name to definition owners

* make package.json private

* add index header

* ljlj

* fix export = in tslint

* fix export

* add esModuleInterop

* fix tslint.json

* revert CODEOWNERS
This commit is contained in:
besemuna
2020-12-19 00:28:35 +00:00
committed by GitHub
parent ce6104a44c
commit bd9db3006f
5 changed files with 2015 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
import Ravepay from 'flutterwave-node';
(async () => {
const rave = new Ravepay('PUBLICK_KEY', 'SECRET_KEY', false);
// Account
await rave.Account.charge({
amount: '10',
email: 'x@gmail.com',
txRef: 'xxx',
device_fingerprint: 'xxx',
accountbank: 'xxx',
accountnumber: 'xxx',
});
await rave.Account.validate({ otp: 'xxx', transactionreference: 'xxx' });
// BillsPayment
await rave.BillsPayment.bills({
service: 'xxx',
service_channel: 'xxx',
service_method: 'xxx',
service_version: 'xxx',
});
// Bvn
await rave.Bvn.verification({ bvn: 'xxx' });
// Card
await rave.Card.charge({ token: 'xxx', currency: 'xxx', amount: 'xxx', email: 'xxx', txRef: 'xxx' });
await rave.Card.validate({ transaction_reference: 'xxx' });
// CustomRequest
await rave.CustomRequest.custom('xxx', {});
// Ebills
await rave.Ebills.create({
numberofunits: 'xx',
narration: 'xx',
currency: 'xxx',
country: 'xxx',
custom_business_name: 'xxx',
amount: 'xxx',
email: 'xx',
txRef: 'xxx',
IP: 'xxx',
phonenumber: 'xxx',
});
await rave.Ebills.update({ reference: 'xxx', amount: 'xxx' });
})();

1934
types/flutterwave-node/index.d.ts vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,6 @@
{
"private": true,
"dependencies": {
"axios": "^0.21.0"
}
}

View File

@@ -0,0 +1,24 @@
{
"compilerOptions": {
"esModuleInterop" : true,
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"flutterwave-node-tests.ts"
]
}

View File

@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json"}