adp-sdk 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/pay/Device.js +18 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adp-sdk",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "adp sdk",
5
5
  "main": "main.js",
6
6
  "scripts": {
package/pay/Device.js ADDED
@@ -0,0 +1,18 @@
1
+ var Http = require('../adapay-core/Http');
2
+ var Logger = require('../adapay-core/Logger');
3
+ var Config = require('./Config');
4
+ function add(kwargs) {
5
+ return new Promise(function (resolve, reject) {
6
+ let url = Config.base_url + `/v1/payments/device/add`;
7
+ Http.post(url, kwargs, Config)
8
+ .then(function (result) {
9
+ Logger.info(result);
10
+ resolve(result);
11
+ })
12
+ .catch(function (error) {
13
+ Logger.error(error);
14
+ reject(error);
15
+ });
16
+ });
17
+ }
18
+ module.exports = { add };