Tillhub

Tillhub

Tillhub SDK instance. The instance handles auth autonomously.

Constructor

new Tillhub()

Source:
Example
const Tillhub = require('@tillhub/node-sdk')

const th = new Tillhub({
  credentials: {
    username: 'user@example.com',
    password: '123455'
  }
})

await th.init()

// do something with the instance
const transactions = th.transactions()

const { data, metadata } = await transactions.getAll()
console.log(data) // [...]

Methods

carts(options) → {Carts}

Create an authenticated carts instance

Parameters:
Name Type Description
options Object

options object

Source:

init(callbacknullable)

Initialise the SDK instance by authenticating the client

Parameters:
Name Type Attributes Description
callback function <nullable>

optional callback. I fnot specified a Promise will be returned

Source:

products(options) → {Products}

Create an authenticated products instance

Parameters:
Name Type Description
options Object

options object

Source:

templates(options) → {Templates}

Create an authenticated templates instance

Parameters:
Name Type Description
options Object

options object

Source:

transactions(options) → {Transactions}

Create an authenticated transactions instance

Parameters:
Name Type Description
options Object

options object

Source: