Skip to content

Commit

Permalink
Merge ab6cabe into 76892f4
Browse files Browse the repository at this point in the history
  • Loading branch information
itssadon committed Sep 12, 2019
2 parents 76892f4 + ab6cabe commit 299b33c
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 2 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@
* accountCharge
* personlizedAccount
* loansAndInvestments
* loans
* request
* process
* list
* view
* payment
* repay
* validate
* client
* createProfile
* updateProfile
Expand Down Expand Up @@ -109,5 +117,5 @@ The MIT License (MIT). Please see [License File](LICENSE.md) for more informatio
[link-npm]: https://www.npmjs.com/package/gladepay-node
[link-downloads]: https://www.npmjs.com/package/gladepay-node

[link-author]: https://github.com/itssaon
[link-author]: https://github.com/itssadon
[link-contributors]: ../../contributors
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gladepay-node",
"version": "0.6.1",
"version": "0.6.2",
"description": "A NodeJS library that simplifies payment with Gladepay APIs",
"main": "index.js",
"scripts": {
Expand Down
110 changes: 110 additions & 0 deletions resources/loans_and_investments.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,116 @@
var route = "";

module.exports = {
/**
* Loans
*/
loans: {
/**
* Make a request for loans
*/
request: {
method: "put",
route: [route, ""].join("/loans"),
params: [
"client_id*",
"interestSettings*",
"amount*",
"tax_applied*",
"tax_rate*",
"period*"
],
data: {
"action": "request"
}
},

/**
* Process the loan request by the client
*/
process: {
method: "put",
route: [route, ""].join("/loans"),
params: [
"loan_id*",
"status*"
],
data: {
"action": "process"
}
},

/**
* List the number of loans
*/
list: {
method: "put",
route: [route, ""].join("/loans"),
params: [
"offset",
"limit"
],
data: {
"action": "list"
}
},

/**
* View details of the loan
*/
view: {
method: "put",
route: [route, ""].join("/loans"),
params: [
"loan_id*"
],
data: {
"action": "view"
}
},

/**
* Loan repayment
*/
payment: {
/**
* Initiate repayment
*/
repay: {
method: "put",
route: [route, ""].join("/repay"),
params: [
"loan_id*",
"payment_method",
"ip",
"fingerprint",
"card",
"meta"
],
data: {
"action": "repay"
}
},

/**
* Validate repayment
*/
validate: {
method: "put",
route: [route, ""].join("/validate"),
params: [
"txnRef*",
"otp*"
],
data: {
"action": "validate"
}
}
}
},

/**
* Clients
*/
client: {
/**
* Create Client Profile
Expand Down

0 comments on commit 299b33c

Please sign in to comment.