ePages 7.1.0 - DE_EPAGES/MultiStoreConnector/API/RestConnector.pm

Package DE_EPAGES::MultiStoreConnector::API::RestConnector

module to get shop data from REST resources

Functions

createCategory
createProduct
createProductCategory
getCategories
getProducts
getShops
getStores
getSubshop
new
postSubshop

createCategory

Creates category in the specified shop.

Syntax
$Response = $RestConnector->createCategory($ShopGUID, $Category);
Input
$ShopGUID (string)
GUID of the shop
$Category (ref)
category to add
Return
$Response (ref)
added category

createProduct

Creates product in the specified shop.

Syntax
$Response = $RestConnector->createProduct($ShopGUID, $Product);
Input
$ShopGUID (string)
GUID of the shop
$Product (ref)
product to add
Return
$Response (ref)
added product

createProductCategory

Creates assignment of a product to a category in the specified shop.

Syntax
$Response = $RestConnector->createProductCategory($ShopGUID, $Product, $Category);
Input
$ShopGUID (string)
GUID of the shop
$ProductCategory (ref)
product-category assignment
Return
$Response (ref)
the created product-category assignment

getCategories

Gets all categories of the specified shop

Syntax
$Response = $RestConnector->getCategories($Shop);
Input
$ShopGUID (string)
GUID of the shop
Return
$Response (ref)
categories

getProducts

Gets all categories of the specified shop

Syntax
$Response = $RestConnector->getProducts($ShopGUID, $CategoryGUID);
Input
$ShopGUID (string)
GUID of the shop
$CategoryGUID (string)
GUID of the category
Return
$Response (ref)
products

getShops

Gets all shops of the specified store

Syntax
$Response = $RestConnector->getShops($Store);
Input
$StoreName (string)
alias of the store
Return
$Response (ref)
shops

getStores

Gets a list of all stores

Syntax
$Response= $RestConnector->getStores();
Return
$Reeponse (ref)
stores

getSubshop

Get subshop with values from the EMS app.

Syntax
$Response = $RestConnector->getSubshop($hGetContent);
Input
$hGetContent (ref.hash)
look for MS synchronization service REST documentation
Return
$Response (ref)
the created product-category assignment

new

Creates a new REST connector for multistore data

Syntax
$RestConnector = DE_EPAGES::MultiStore::API::RestConnector->new(%options);
Input
$BaseURL
base URL of the REST service to connect to
%options (hash)
options for un/install
  • IsRecursive - recursive un/installation of required or dependent
    cartridges

Return
$RestConnector (object)
rest connector object

postSubshop

Sends subshop to EMS.

Syntax
$Response = $RestConnector->postSubshop($hPostContent);
Input
$hPostContent (ref.hash)
look for MS synchronization service REST documentation
Return
$Response (ref)
the created product-category assignment