Skip to content

Commit

Permalink
Nearest Merchant end point added
Browse files Browse the repository at this point in the history
  • Loading branch information
khwaleed96 committed Apr 7, 2023
1 parent 83e99d4 commit 9c97083
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 29 deletions.
62 changes: 34 additions & 28 deletions API/Merchant/Merchant.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,40 @@
const Request = require('../../Request');
const Request = require("../../Request");

module.exports = {
// Find Nearby Merchants
findNearByMerchants(payload) {
const url = `/store/v1/merchant/nearby`
return Request.post(`${url}`, payload)
},
// Find Nearby Merchants
findNearByMerchants(payload) {
const url = `/store/v1/merchant/nearby`;
return Request.post(`${url}`, payload);
},

// List Featured Merchants
listFeaturedMerchants(payload) {
const url = `/store/v1/merchant/merchant-featured/list`
return Request.get(`${url}`, { params: { ...payload }})
},
// List Featured Merchants
listFeaturedMerchants(payload) {
const url = `/store/v1/merchant/merchant-featured/list`;
return Request.get(`${url}`, { params: { ...payload } });
},

// List Sponsored Merchants
listSponsoredMerchants(payload) {
const url = `/store/v1/merchant/merchant-sponsored/list`
return Request.get(`${url}`, { params: { ...payload }})
},
// List Sponsored Merchants
listSponsoredMerchants(payload) {
const url = `/store/v1/merchant/merchant-sponsored/list`;
return Request.get(`${url}`, { params: { ...payload } });
},

// Get Merchant Menu
getMerchantMenu(payload) {
const url = `/store/v1/merchant/menu`
return Request.get(`${url}`, { params: { ...payload }})
},
// Get Merchant Menu
getMerchantMenu(payload) {
const url = `/store/v1/merchant/menu`;
return Request.get(`${url}`, { params: { ...payload } });
},

// List Merchant Categories
listMerchantCategories(payload) {
payload.status = true;
const url = `/store/v1/merchant/categories`
return Request.get(`${url}`, { params: { ...payload }})
},
}
// Get Nearest Merchant
nearestMerchant(payload) {
const url = `/store/v1/merchant/nearest`;
return Request.post(`${url}`, payload);
},

// List Merchant Categories
listMerchantCategories(payload) {
payload.status = true;
const url = `/store/v1/merchant/categories`;
return Request.get(`${url}`, { params: { ...payload } });
},
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"version": "1.0.45"
"version": "1.0.46"
}

0 comments on commit 9c97083

Please sign in to comment.