be-api-client
Advanced tools
Comparing version 0.0.58 to 0.0.59
18
index.js
@@ -244,3 +244,3 @@ const rp = require('request-promise-native') | ||
} | ||
async function getUsers(){ | ||
@@ -366,8 +366,11 @@ return await doGet('/users') | ||
async function addPayment(receivingBank, reference, debtorDetails, creditorDetails, sendingCurrency, receivingCurrency, rate){ | ||
const form = { | ||
async function addPayment(receivingBank, sendingBank, reference, originalSwiftMessage, debtorDetails, creditorDetails, sendingAmount, sendingCurrency, receivingCurrency, rate) { | ||
const body = { | ||
receivingBank, | ||
sendingBank, | ||
reference, | ||
originalSwiftMessage, | ||
debtorDetails, | ||
creditorDetails, | ||
sendingAmount, | ||
sendingCurrency, | ||
@@ -377,3 +380,3 @@ receivingCurrency, | ||
} | ||
return await doPost('/payments', form) | ||
return await doPost('/payments', body) | ||
} | ||
@@ -385,2 +388,6 @@ | ||
async function updatePayment(paymentId, fieldsToUpdate){ | ||
return await doPut('/payments/'+paymentId, fieldsToUpdate) | ||
} | ||
return { | ||
@@ -425,3 +432,4 @@ isAPIRunning, | ||
addPayment, | ||
getPayments | ||
getPayments, | ||
updatePayment | ||
} | ||
@@ -428,0 +436,0 @@ } |
{ | ||
"name": "be-api-client", | ||
"version": "0.0.58", | ||
"version": "0.0.59", | ||
"description": "A node.js client for the be-api.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
11559
387