Added list and update stripe requests

no-issue

These will be used for listing and updating webhooks on configuration
This commit is contained in:
Fabien O'Carroll 2019-10-02 10:34:27 +07:00
parent 11a5a9ac69
commit d1b29fd0b7

View File

@ -4,16 +4,26 @@ const retrieve = createStripeRequest(function (stripe, resource, id) {
return stripe[resource].retrieve(id);
});
const list = createStripeRequest(function (stripe, resource, options) {
return stripe[resource].list(options);
});
const create = createStripeRequest(function (stripe, resource, object) {
return stripe[resource].create(object);
});
const update = createStripeRequest(function (stripe, resource, id, object) {
return stripe[resource].update(id, object);
});
const del = createStripeRequest(function (stripe, resource, id) {
return stripe[resource].del(id);
});
module.exports = {
retrieve,
list,
create,
update,
del
};