Package DE_EPAGES::Shop::API::Resource::ShopRequestContext
helper class for shop-dependend REST resources.
Functions
apiBaseUrl
Returns the base URL for the REST API of the shop.
Syntax |
$BaseURL = $ShopRequestContext->apiBaseUrl; |
Return |
|
imageBaseUrl
Returns the base URL for images of the shop.
Syntax |
$BaseURL = $ShopRequestContext->imageBaseUrl; |
Return |
|
new
Create a new ShopRequestContext object for a given shop.
Syntax |
$ShopRequestContext = $DE_EPAGES::Shop::API::Resource::ShopRequestContext->new($Shop); |
Input |
|
Return |
|
shop
Returns the shop.
Syntax |
$Shop = $ShopRequestContext->shop; |
Return |
|
validCurrency
Returns the default shop locale if $RequestCurrencyID is undefined. Returns $RequestCurrencyID if the currency is supported by the shop. Throws a BadRequest error if the currency is not supported by the shop.
Syntax |
$CurrencyID = $ShopRequestContext->validCurrency($RequestCurrencyID); |
Input |
|
Return |
|
validLocale
Returns the default shop locale if $RequestLocaleID is undefined. Returns $RequestLocaleID if the locale is supported by the shop. Throws a BadRequest error if the locale is not supported by the shop.
Syntax |
$LocaleID = $ShopRequestContext->validLocale($RequestLocaleID); |
Input |
|
Return |
|