get(): Tax[]¶
The get
method allows to get a list of taxes associated with a current basket.
Returned value¶
A returned value has a type of Tax[] representing a list of taxes.
Example¶
In this example we make a basketTaxesApi
call to get the list of taxes for a current basket.
useStorefront(async ({ eventBus, getApi }) => {
eventBus.on('basket.initialized', async () => {
const basketTaxesApi = await getApi('basketTaxesApi');
const taxesList = basketTaxesApi.get();
});
});