Docs BETA
/

API Reference

An index of all available methods


Here you can see all the possible functions that you can run, just click the name to be taken to the detailed overview of the action.

Machine

Vend

NameSummary
OS.Machine.vend.optimal()Attempt a vend from the most optimal channel which is not set to "Out of Stock". This will likely be close to the bottom of the machine.
OS.Machine.vend.channel()Attempt to vend from a specific channel or an array of channels. This is useful when you have different types of stock and want more control over the vend operation.
OS.Machine.vend.random()Attempt to vend from the machine at random. This could be useful when users are playing a game of chance.

Channels

NameSummary
OS.Machine.channels.get()Attempt a vend from the most optimal channel which is not set to "Out of Stock". This will likely be close to the bottom of the machine.

Data

Local

NameSummary
OS.Data.local.createSet()Create a local data set on the machine, ready for saving persistent data to.
OS.Data.local.deleteSet()Delete a local data set. Caution; this cannot be undone.
OS.Data.local.save()Save a record to a local data set.
OS.Data.local.get()Get all or a specific number of records from a local data set.
OS.Data.local.update()Update a record that already exists in a local data set.
OS.Data.local.delete()Delete a record from a local data set. Caution; this cannot be undone.

Payment

Charge

NameSummary
OS.Data.local.hold()Hold a charge on the card which will be ratified later (e.g after a successful vend).
OS.Data.local.instant()Instantly charge a card.
OS.Data.local.confirm()Confirm a charge on some or all of the amount held previously using the hold method.
OS.Data.local.cancel()Cancel a currently progressing charge.