TransactionsAPI

new TransactionsAPI(rest)

This class is used to interact with Transactions in TidyHQ.
Parameters:
NameTypeDescription
restRestThe rest instance to use for requests.

Methods

(async) getTransaction(id, optionsopt) → {Promise.<TidyAPI_V1_Transaction>}

Get a single transaction.
Parameters:
NameTypeAttributesDefaultDescription
idstringThe ID of the transaction.
optionsobject<optional>
{}
Properties
NameTypeAttributesDescription
access_tokenstring<optional>
The access token to use.
Returns:
- The transaction.
Type: 
Promise.<TidyAPI_V1_Transaction>

(async) getTransactions(optionsopt) → {Promise.<TidyAPI_V1_Transactions>}

Get a list of all transactions.
Parameters:
NameTypeAttributesDefaultDescription
optionsobject<optional>
{}
Properties
NameTypeAttributesDescription
access_tokenstring<optional>
The access token to use.
limitnumber<optional>
The maximum number of transactions to return.
offsetnumber<optional>
The number of transactions to skip.
start_datestring<optional>
The timestamp to begin from in ISO 8601 format.
end_datestring<optional>
The timestamp end at in ISO 8601 format.
Returns:
- The list of transactions.
Type: 
Promise.<TidyAPI_V1_Transactions>