synapsepay
Advanced tools
Comparing version 0.10.1 to 0.10.2
@@ -10,3 +10,5 @@ 'use strict'; | ||
Node.prototype.shipDebitCard = function(options, callback) { | ||
Node.prototype.shipDebitCard = function(payload, callback) { | ||
const url = `${this.json._links.self.href}?ship=yes`; | ||
const config = { | ||
@@ -19,22 +21,3 @@ client: this.user.client, | ||
let url = `${this.json._links.self.href}`; | ||
const payload = {}; | ||
if (options) { | ||
if (options.ship) { | ||
url += `?ship=${options.ship}`; | ||
} | ||
if (options.fee_node_id) { | ||
payload.fee_node_id = options.fee_node_id; | ||
} | ||
if (options.expedite) { | ||
payload.expedite = options.expedite; | ||
} | ||
if (options.card_style_id) { | ||
payload.card_style_id = options.card_style_id; | ||
} | ||
} | ||
APIClient.patch(url, config, payload, (err, json) => { | ||
@@ -41,0 +24,0 @@ if (err) { |
@@ -10,2 +10,15 @@ 'use strict'; | ||
Subnet.prototype.shipCard = function(payload, callback) { | ||
const url = `${this.json._links.self.href}/ship`; | ||
const config = this.generateConfig(); | ||
APIClient.patch(url, config, payload, (err, json) => { | ||
if (err) { | ||
callback(err); | ||
} else { | ||
callback(null, json); | ||
} | ||
}); | ||
} | ||
Subnet.prototype.updateJSON = function(err, json, callback) { | ||
@@ -12,0 +25,0 @@ if (err) { |
{ | ||
"name": "synapsepay", | ||
"version": "0.10.1", | ||
"version": "0.10.2", | ||
"description": "Node.js Library for SynapsePay API v3.x Rest", | ||
@@ -5,0 +5,0 @@ "repository": { |
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
47525
1256