From 4fd5aa05dedc16b507693a894afc65549e2cbd8d Mon Sep 17 00:00:00 2001 From: Drew Warren Date: Wed, 12 Apr 2017 17:47:01 -0600 Subject: [PATCH] Add Domain Purchase API Call --- oauth3.domains.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/oauth3.domains.js b/oauth3.domains.js index 17d0e79..2b5b0b0 100644 --- a/oauth3.domains.js +++ b/oauth3.domains.js @@ -18,6 +18,20 @@ OAUTH3.api['domains.checkAvailability'] = function (providerUri, opts) { }); }; +OAUTH3.api['domains.purchase'] = function (providerUri, opts) { + var session = opts.session; + + return OAUTH3.request({ + method: 'POST' + , url: OAUTH3.url.normalize(providerUri) + + '/api/com.daplie.domains/accounts/' + session.token.sub + '/registrations' + , session: session + , data: opts.data + }).then(function (res) { + return res; + }); +}; + OAUTH3.api['domains.list'] = function (providerUri, opts) { var session = opts.session;