be-api-client
Advanced tools
Comparing version 0.0.72 to 0.0.73
31
index.js
@@ -133,11 +133,4 @@ const httpContext = require('express-http-context') | ||
async function addTokenAccount(entityId, ethAddress, beneficiaryName, contractId, userId){ | ||
const form = { | ||
entityId, | ||
ethAddress, | ||
beneficiaryName, | ||
contractId, | ||
userId | ||
} | ||
return await doPost('/users/'+userId+'/tokenAccounts', form) | ||
async function addTokenAccount(userId, tokenAccount){ | ||
return await doPost('/users/'+userId+'/tokenAccounts', tokenAccount) | ||
} | ||
@@ -387,8 +380,16 @@ | ||
async function addPayment(paymentsProperties) { | ||
/* | ||
* Expects "receivingBank", "sendingBank", "reference", "originalSwiftMessage", "debtorDetails", "creditorDetails", "sendingCurrency", "receivingCurrency", "rate". | ||
* Optionally add either "sendingAmount" or "receivingAmount". | ||
*/ | ||
return await doPost('/payments', paymentsProperties) | ||
async function addPayment(receivingBank, sendingBank, reference, originalSwiftMessage, debtorDetails, creditorDetails, sendingAmount, sendingCurrency, receivingCurrency, rate) { | ||
const body = { | ||
receivingBank, | ||
sendingBank, | ||
reference, | ||
originalSwiftMessage, | ||
debtorDetails, | ||
creditorDetails, | ||
sendingAmount, | ||
sendingCurrency, | ||
receivingCurrency, | ||
rate | ||
} | ||
return await doPost('/payments', body) | ||
} | ||
@@ -395,0 +396,0 @@ |
{ | ||
"name": "be-api-client", | ||
"version": "0.0.72", | ||
"version": "0.0.73", | ||
"description": "A node.js client for the be-api.", | ||
@@ -5,0 +5,0 @@ "engines": { |
15966
5
405