diff --git a/oauth3.account.js b/oauth3.account.js index 9f3f8ec..030d65d 100644 --- a/oauth3.account.js +++ b/oauth3.account.js @@ -30,6 +30,19 @@ OAUTH3.api['account.addCard'] = function (providerUri, opts) { }); }; +OAUTH3.api['account.removeCard'] = function (providerUri, opts) { + var session = opts.session; + + return OAUTH3.request({ + method: 'DELETE' + , url: OAUTH3.url.normalize(providerUri) + + '/api/com.daplie.payments/accounts/' + session.token.sub + '/cards/' + opts.last4 + '/' + opts.brand + , session: session + }).then(function (res) { + return res; + }); +}; + OAUTH3.api['account.listAddresses'] = function (providerUri, opts) { var session = opts.session;