Fees Client Overview
The purpose of this client is to provide a layer of abstraction on top of the Fees API.
Usage
import FeeClient from @leisurelink/fees-client;
let client = FeeClient(keyId, key, baseUrl);
Methods
Constructing
-
let client = FeeClient(host, keyId, key, logger)
-
baseUrl
: fee api base URL, usuallyhttps://portal[-dev].leisurelink.com
-
keyId
: trusted endpoint key id, ex:"my-api/self"
-
key
: trusted endpoint key as aBuffer
-
logger
:function print(it) { if (typeof (it) === 'string') { util.log(it); } else { util.log(util.inspect(it, false, 9)); } }
var logger = { info: print, warning: print, error: print, debug: print };
removeFeeRelationsBySource
client.removeFeeRelationsBySource, params)
-
lang
: the lang - typically en-US -
feeId
: the id of the fee -
returns
: `success: "OK"`` - May fail with
404
error if fee does not exist