Skip to content

Commit

Permalink
Updating on sms method
Browse files Browse the repository at this point in the history
  • Loading branch information
harmonizerblinks committed Oct 2, 2022
1 parent 8cc9c84 commit 3b4999b
Show file tree
Hide file tree
Showing 6 changed files with 116 additions and 5 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,12 @@ For all resource methods, the JSON body can be passed as the argument.
- payBill
- Page (Payment Link)
- createPage - Coming soon
- getBill - Coming soon
- payBill - Coming soon
- getPage - Coming soon
- Payment - Coming soon
- Invoice (Payment Link)
- createInvoice - Coming soon
- getInvoice - Coming soon
- PayInvoice - Coming soon

Method to Initiation Sending or Receiving from mobile Money.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cross-switch-gh",
"version": "0.0.2-beta-4-1",
"version": "0.0.3",
"description": "Cross-Switch Ghana API wrapper",
"main": "index.js",
"scripts": {
Expand Down
51 changes: 51 additions & 0 deletions resources/page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
'use strict';

var root = '/page';

module.exports = {

/*
Create page
*/
create: {
method: 'post',
endpoint: root,
params: ['name*', 'description', 'amount']
},

/*
Get page
*/
get: {
method: 'get',
endpoint: [root, '/{id}'].join(''),
args: ['id']
},

/*
List page
*/
list: {
method: 'get',
endpoint: root
},

/*
Update page
*/
update: {
method: 'put',
endpoint: [root, '/{id}'].join(''),
params: ['name', 'description', 'amount', 'active'],
args: ['id']
},

/*
Check Slug Avaliability
*/
slug: {
method: 'get',
endpoint: [root, '/check_slug_availability'].join(''),
params: ['slug*']
}
};
42 changes: 42 additions & 0 deletions resources/plan.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
'use strict';

var root = '/plan';

module.exports = {

/*
Create plan
*/
create: {
method: 'post',
endpoint: root,
params: ['name*', 'description', 'amount*', 'interval*', 'send_invoices', 'send_sms', 'hosted_page', 'hosted_page_url', 'hosted_page_summary', 'currency']
},

/*
Get plan
*/
get: {
method: 'get',
endpoint: [root, '/{id}'].join(''),
args: ['id']
},

/*
List plan
*/
list: {
method: 'get',
endpoint: root
},

/*
Update plan
*/
update: {
method: 'put',
endpoint: [root, '/{id}'].join(''),
params: ['name', 'description', 'amount', 'interval', 'send_invoices', 'send_sms', 'hosted_page', 'hosted_page_url', 'hosted_page_summary', 'currency'],
args: ['id']
}
};
14 changes: 14 additions & 0 deletions resources/settlements.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
'use strict';

var root = '/settlement';

module.exports = {

/*
Fetch settlement
*/
fetch: {
method: 'get',
endpoint: root,
}
};
4 changes: 2 additions & 2 deletions resources/sms.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
sendOtp: {
method: 'post',
endpoint: [root, '/SendOtp'].join(''),
params: ['mobile*','length*','type']
params: ['mobile*','senderid*','length*','type']
},

/*
Expand All @@ -29,7 +29,7 @@ module.exports = {
sendSms: {
method: 'post',
endpoint: [root, '/SendSms'].join(''),
params: ['mobile*','message*']
params: ['mobile*','senderid*','message*']
},

};

0 comments on commit 3b4999b

Please sign in to comment.