synapsepay
Advanced tools
Comparing version 0.11.2 to 0.12.0
@@ -64,2 +64,3 @@ 'use strict'; | ||
let url = `${this.json._links.self.href}/dummy-tran`; | ||
let useSubsequentDelimiter = false; | ||
@@ -69,3 +70,19 @@ if (options) { | ||
url += `?is_credit=${options.is_credit}`; | ||
useSubsequentDelimiter = true; | ||
} | ||
if (options.type) { | ||
let delimiter = useSubsequentDelimiter ? '&' : '?'; | ||
url += `${delimiter}type=${options.type}`; | ||
useSubsequentDelimiter = true; | ||
} | ||
if (options.foreign_transaction) { | ||
let delimiter = useSubsequentDelimiter ? '&' : '?'; | ||
url += `${delimiter}foreign_transaction=${options.foreign_transaction}`; | ||
useSubsequentDelimiter = true; | ||
} | ||
if (options.subnetid) { | ||
let delimiter = useSubsequentDelimiter ? '&' : '?'; | ||
url += `${delimiter}subnetid=${options.subnetid}`; | ||
useSubsequentDelimiter = true; | ||
} | ||
} | ||
@@ -72,0 +89,0 @@ |
{ | ||
"name": "synapsepay", | ||
"version": "0.11.2", | ||
"version": "0.12.0", | ||
"description": "Node.js Library for SynapsePay API v3.x Rest", | ||
@@ -5,0 +5,0 @@ "repository": { |
180
test.js
@@ -18,12 +18,180 @@ var Clients = require('./lib/Clients.js'); | ||
const testFunc = () => { | ||
PublicKey.get( | ||
Users.get( | ||
Helpers.client, | ||
{}, | ||
function(err, pubKeyObj) { | ||
{ | ||
_id: '5b0da0e4ea4cf70075f74c4c', | ||
fingerprint: '5aae733c07d79c741fbb12e039bbee6a', | ||
ip_address: '127.0.0.1' | ||
}, | ||
function(err, user) { | ||
if (err) { | ||
console.log('ERR ', err); | ||
console.log(err); | ||
return; | ||
} else { | ||
console.log('PK ', pubKeyObj); | ||
return; | ||
Users.get( | ||
Helpers.client, | ||
{ | ||
_id: '5b0da0e4ea4cf70075f74c4c', | ||
fingerprint: '5aae733c07d79c741fbb12e039bbee6a', | ||
ip_address: '127.0.0.1' | ||
}, | ||
function(err, user) { | ||
if (err) { | ||
console.log(err); | ||
return; | ||
} else { | ||
Users.get( | ||
Helpers.client, | ||
{ | ||
_id: '5b0da0e4ea4cf70075f74c4c', | ||
fingerprint: '5aae733c07d79c741fbb12e039bbee6a', | ||
ip_address: '127.0.0.1' | ||
}, | ||
function(err, user) { | ||
if (err) { | ||
console.log(err); | ||
return; | ||
} else { | ||
Users.get( | ||
Helpers.client, | ||
{ | ||
_id: '5b0da0e4ea4cf70075f74c4c', | ||
fingerprint: '5aae733c07d79c741fbb12e039bbee6a', | ||
ip_address: '127.0.0.1' | ||
}, | ||
function(err, user) { | ||
if (err) { | ||
console.log(err); | ||
return; | ||
} else { | ||
Users.get( | ||
Helpers.client, | ||
{ | ||
_id: '5b0da0e4ea4cf70075f74c4c', | ||
fingerprint: '5aae733c07d79c741fbb12e039bbee6a', | ||
ip_address: '127.0.0.1' | ||
}, | ||
function(err, user) { | ||
if (err) { | ||
console.log(err); | ||
return; | ||
} else { | ||
Users.get( | ||
Helpers.client, | ||
{ | ||
_id: '5b0da0e4ea4cf70075f74c4c', | ||
fingerprint: '5aae733c07d79c741fbb12e039bbee6a', | ||
ip_address: '127.0.0.1' | ||
}, | ||
function(err, user) { | ||
if (err) { | ||
console.log(err); | ||
return; | ||
} else { | ||
Users.get( | ||
Helpers.client, | ||
{ | ||
_id: '5b0da0e4ea4cf70075f74c4c', | ||
fingerprint: '5aae733c07d79c741fbb12e039bbee6a', | ||
ip_address: '127.0.0.1' | ||
}, | ||
function(err, user) { | ||
if (err) { | ||
console.log(err); | ||
return; | ||
} else { | ||
Users.get( | ||
Helpers.client, | ||
{ | ||
_id: '5b0da0e4ea4cf70075f74c4c', | ||
fingerprint: '5aae733c07d79c741fbb12e039bbee6a', | ||
ip_address: '127.0.0.1' | ||
}, | ||
function(err, user) { | ||
if (err) { | ||
console.log(err); | ||
return; | ||
} else { | ||
Users.get( | ||
Helpers.client, | ||
{ | ||
_id: '5b0da0e4ea4cf70075f74c4c', | ||
fingerprint: '5aae733c07d79c741fbb12e039bbee6a', | ||
ip_address: '127.0.0.1' | ||
}, | ||
function(err, user) { | ||
if (err) { | ||
console.log(err); | ||
return; | ||
} else { | ||
Users.get( | ||
Helpers.client, | ||
{ | ||
_id: '5b0da0e4ea4cf70075f74c4c', | ||
fingerprint: '5aae733c07d79c741fbb12e039bbee6a', | ||
ip_address: '127.0.0.1' | ||
}, | ||
function(err, user) { | ||
if (err) { | ||
console.log(err); | ||
return; | ||
} else { | ||
Users.get( | ||
Helpers.client, | ||
{ | ||
_id: '5b0da0e4ea4cf70075f74c4c', | ||
fingerprint: '5aae733c07d79c741fbb12e039bbee6a', | ||
ip_address: '127.0.0.1' | ||
}, | ||
function(err, user) { | ||
if (err) { | ||
console.log(err); | ||
return; | ||
} else { | ||
Users.get( | ||
Helpers.client, | ||
{ | ||
_id: '5b0da0e4ea4cf70075f74c4c', | ||
fingerprint: '5aae733c07d79c741fbb12e039bbee6a', | ||
ip_address: '127.0.0.1' | ||
}, | ||
function(err, user) { | ||
if (err) { | ||
console.log(err); | ||
} else { | ||
console.log(user); | ||
return; | ||
} | ||
} | ||
) | ||
} | ||
} | ||
) | ||
} | ||
} | ||
) | ||
} | ||
} | ||
) | ||
} | ||
} | ||
) | ||
} | ||
} | ||
) | ||
} | ||
} | ||
) | ||
} | ||
} | ||
) | ||
} | ||
} | ||
) | ||
} | ||
} | ||
) | ||
} | ||
} | ||
) | ||
} | ||
@@ -30,0 +198,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
60381
1542