getAvailableShippingCountries(): Country[]¶
The getAvailableShippingCountries
method allows to retrieve the list of available shipping countries.
Returned value¶
A returned value has a type of Country[]
where Country
represents the Country model.
Example¶
In this example we make a basketShippingsApi
call to retrieve the list of available shipping countries.
useStorefront(async ({ eventBus, getApi }) => {
eventBus.on('basket.initialized', async () => {
const basketShippingsApi = await getApi('basketShippingsApi');
const availableShippingCountries = basketShippingsApi.getAvailableShippingCountries();
});
});
Basket Address API methods reference¶
- get
- select
- setShipping
- setPickupPoint
- getSelectedShipping
- selectSelectedShipping
- selectAvailableShippingCountries
- getSelectedShippingCountry
- selectSelectedShippingCountry
- setCountry
- getPaymentCostForActiveShippingByPaymentId
- selectPaymentCostForActiveShippingByPaymentId
- isEveryAvailablePaymentFree
- selectIsEveryAvailablePaymentFree
- getSectionValidation
- selectSectionValidation
- addMap
- showPickupPointMap
- shouldDisplayRemainingBasketValueForFreeShippingMessage
- addShippingInfo
- getShippingInfo