@leisurelink/fees-client
v3.1.1
Published
LeisureLink client library to the fees-api
Downloads
2
Keywords
Readme
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-USfeeId
: the id of the feereturns
: `success: "OK"``- May fail with
404
error if fee does not exist