xendit-node
Advanced tools
Comparing version 1.19.1 to 1.19.2
@@ -21,3 +21,3 @@ const x = require('../xendit'); | ||
metadata: { | ||
test: "data", | ||
test: `data`, | ||
}, | ||
@@ -24,0 +24,0 @@ }); |
@@ -5,4 +5,7 @@ const x = require('./xendit.test'); | ||
const va = new VirtualAcc({}); | ||
module.exports = function() { | ||
function sleepFor(sleepDuration){ | ||
var now = new Date().getTime(); | ||
while(new Date().getTime() < now + sleepDuration){ /* Do nothing */ } | ||
} | ||
module.exports = function () { | ||
return va | ||
@@ -12,3 +15,3 @@ .getVABanks() | ||
return va.createFixedVA({ | ||
externalID: new Date().toLocaleString(), | ||
externalID: 'VA-' + new Date().toLocaleString(), | ||
bankCode: banks[0].code, | ||
@@ -20,4 +23,7 @@ name: 'Stanley Nguyen', | ||
}) | ||
.then(({ id }) => va.getFixedVA({ id })) | ||
.then(({ id }) => { | ||
sleepFor(3000); | ||
return va.getFixedVA({ id }) | ||
}) | ||
.then(({ id }) => { | ||
return va.updateFixedVA({ | ||
@@ -24,0 +30,0 @@ id, |
{ | ||
"name": "xendit-node", | ||
"version": "1.19.1", | ||
"version": "1.19.2", | ||
"description": "NodeJS client for Xendit API", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -26,2 +26,7 @@ import { XenditOptions } from '../xendit_opts'; | ||
forUserID?: string; | ||
reminderTimeUnit?: string; | ||
reminderTime?: number; | ||
locale?: string; | ||
shouldAuthenticateCreditCard?: boolean; | ||
withFeeRule?: string; | ||
}): Promise<object>; | ||
@@ -28,0 +33,0 @@ getInvoice(data: { invoiceID: string; forUserID?: string }): Promise<object>; |
@@ -40,2 +40,6 @@ const { | ||
if (data && data.withFeeRule) { | ||
headers['with-fee-rule'] = data.withFeeRule; | ||
} | ||
fetchWithHTTPErr(`${this.API_ENDPOINT}/v2/invoices`, { | ||
@@ -62,2 +66,6 @@ method: 'POST', | ||
fees: data.fees, | ||
reminder_time_unit: data.reminderTimeUnit, | ||
reminder_time: data.reminderTime, | ||
locale: data.locale, | ||
should_authenticate_credit_card: data.shouldAuthenticateCreditCard, | ||
}), | ||
@@ -64,0 +72,0 @@ }) |
169292
4589