ePages 7.23.0 - DE_EPAGES/Shop/API/WebService/ShopService.pm

Package DE_EPAGES::Shop::API::WebService::ShopService

Provides web service access to shops.

Example
use DE_EPAGES::WebService::API::Client;
my $FactoryService = DE_EPAGES::WebService::API::Client
    ->uri('urn://epages.de/WebService/FactoryService/2004/08')
    ->proxy("http://%2fUsers%2f$Login:$Password@localhost:8080/epages/Store.soap");
my $ShopID = $FactoryService->objectByPath( '/Shops/DemoShop' )->result;
my $ShopService = DE_EPAGES::WebService::API::Client
    ->uri('urn://epages.de/WebService/ShopService/2004/08')
    ->proxy("http://%2fUsers%2f$Login:$Password@localhost:8080/epages/Store.soap");
$ShopService->setFeatureValues( $ShopID, [
    { Feature => 'Products', Value => 1000 },
    { Feature => 'SlideShow', Value => 1 },
]);

Functions

copyPublicFiles
create
createSuperMerchantSession
getAllFeatures
getFeatureValues
getInfoSuperMerchant
getLastMerchantLogin
getMerchantEMails
getSecondaryDomains
getShopAddress
getShopAttributeAliases
sendSuperMerchantNewPassword
setFeatureValues
setMerchantEMails
setSecondaryDomains
updateSuperMerchant

copyPublicFiles

Copies all files from the $SourceDir directory to the public shop directory.

Syntax
$ShopService->copyPublicFiles( $ShopID, $SourceDir);
Input
$ShopID (integer)
shop id
$SourceDir (string)
source directory name

create

Inserts a new shop object.

Syntax
$ShopID = $ShopService->create( $hOptions )->result;
Example
$ShopID = $ShopService({
    'Alias' => 'DemoShop'
    'ShopTypeRefID' => $ShopTypeRef->id,
    'ClosedByProvider' => 0,
})->result;
Input
$hOptions (hash.ref)
Options;
used keys are:
  • Alias | shop alias | string
  • ShopTypeRefID | shoptyperef id | int
  • ClosedByProvider | true if closed by provider | boolean
  • (optional) ProviderPath | path to provider | string
Return
$ShopID (integer)
shop id

createSuperMerchantSession

Returns hash with URL and valid session of the SuperMerchant for the MBO of the given Shop ID. If the shop attribute "GrantServiceAccessUntil" is a date in the past SessionId will be undef and Link to URL contains no session

Syntax
$hValues = $ShopService->createSuperMerchantSession( $ShopID )->result;
Input
$ShopID (integer)
shop id
$AlreadyGranted (boolean)
true if access is allowed without merchant grant
Return
$hValues (ref.hash)
hash with valid session and URL to MBO; keys:
  • SessionId | a valid SuperMerchant session | string
  • WebUrlAdminSSL | Link to MBO without SessionId | string
  • WebUrlAdminSSLWithSessionId | Link to MBO with session | string

getAllFeatures

Returns informations of feature installed on the store.

Syntax
$ahFeatures = $ShopService->shopService->getAllFeatures()->result;
Return
$ahFeature (ref.array.hash)
list of features. Each list element
is a hash with the keys
  • Alias | feature alias | string

getFeatureValues

Returns the allowed maximum feature values of the features of a shop.

Syntax
$ahFeatureValues = $ShopService->shopService->getFeatureValues( $ShopID )->result;
Input
$ShopID (integer)
shop id
Return
$ahFeatureValues (ref.array.hash)
list of features and their values. Each list element
is a hash with the keys
  • Feature | feature alias | string
  • MaxValue | max. feature value for the shop | integer

getInfoSuperMerchant

Returns login, email and other information of the primary administrator user.

Syntax
$hInfo = $ShopService->getInfoSuperMerchant( $ShopID )->result;
Input
$ShopID (integer)
shop id
Return
$hInfo (ref.hash)
merchant info hash; keys:
  • Alias | login | string
  • EMail | e-mail address | string
  • LocaleID | locale id | string
  • DeleteConfirmation | true if deletion should be confirmed | boolean
  • IsLoginCookieAllowed | true if user automated login over cookies is enabled | boolean
  • ShowFunctionHelp | true if function help is allowed | boolean

getLastMerchantLogin

Returns the last login time and date of a shop merchant.

Syntax
$String = $ShopService->getLastMerchantLogin( $ShopID )->result;
Input
$ShopID (integer)
shop id
Return
$String (string)
string containing date and time

getMerchantEMails

Returns logins and emails of merchant member (admins)

Syntax
$aShopMembers = $ShopService->shopService->getMerchantEMails( $ShopID )->result;
Input
$ShopID (integer)
shop id
Return
$aShopMembers (ref.array.hash)
hash containing the Member 'Alias' and 'EMail'

getSecondaryDomains

Return all secondary domains assigned to this shop.

Syntax
$ShopService->getSecondaryDomains( $ShopID );
Input
$ShopID (integer)
shop id
Return
$aSecondaryDomains (ref.array.string)
secondary domain names

getShopAddress

Returns the shop address as a tle hash.

Syntax
$hShopAddress = $ShopService->shopService->getShopAddress( $ShopID )->result;
Input
$ShopID (integer)
shop id
Return
$hShopAddress (ref.hash)
hash containing the address values

getShopAttributeAliases

Returns the shop attribute aliases as a tle hash.

Syntax
$hShopAttributeAliases = $ShopService->shopService->getShopAttributeAliases( $ShopID )->result;
Input
$ShopID (integer)
shop id
Return
$hShopAttributeAliases (ref.hash)
hash containing the attribute aliases

sendSuperMerchantNewPassword

Send a new password to super merchant.

Syntax
$ShopService->sendSuperMerchantNewPassword( $ShopID, $Login);
Input
$ShopID (integer)
shop id
$Login (string)
user login

setFeatureValues

Sets the maximum feature values for a shop.

Syntax
$ShopService->setFeatureValues( $ShopID, $ahFeatureValues );
Example
$ShopService->setFeatureValues( 32082, [
    { Feature => 'Products', MaxValue => 1000 },
    { Feature => 'SlideShow', MaxValue => 1},
    { Feature => 'Forum', MaxValue => 0, IsVisible=>0 },
]);
Input
$ShopID (integer)
shop id
$ahFeatureValues (ref.array.hash)
list of features and their values. Each list element
is a hash with the keys
  • Feature | feature alias | string
  • MaxValue | max. feature value for the shop | integer
  • IsVisible | is visible for the shop | boolean

setMerchantEMails

Set EMails of merchant members (admins)

Syntax
$ShopService->shopService->setMerchantEMails( $ShopID, \@Admins );
Input
$ShopID (integer)
shop id
$aMerchantEMails (ref.array.hash)
list of merchant emails
i.e. {'MerchantAlias'=>'admin', 'MerchantEMail'=>'email@do.main'}

setSecondaryDomains

Set the additional domain names of this shop.

Syntax
$ShopService->setSecondaryDomains( $ShopID, $aDomainNames );
Input
$ShopID (integer)
shop id
$aDomainNames (ref.array.string)
list of domain names to add

updateSuperMerchant

Sets login, password, email and other settings of the primary administrator user. All keys are optional.

Syntax
$ShopService->updateSuperMerchant( $ShopID, {
    'Alias' => $Alias,
    'Password' => $Password,
    'EMail' => $EMail,
    'Name' => $Name,
    'LocaleID' => $LocaleID,
    'DeleteConfirmation' => $DeleteConfirmation,
    'IsLoginCookieAllowed' => $IsLoginCookieAllowed,
    'ShowFunctionHelp' => $ShowFunctionHelp,
});
Input
$ShopID (integer)
shop id
$hOptions (hash.ref)
Options;
used keys are:
  • Alias | login | string
  • Password | password (encrypted) | string
  • EMail | email address | string
  • Name | name | string
  • LocaleID | locale id | string
  • DeleteConfirmation | true if deletion should be confirmed | boolean
  • IsLoginCookieAllowed | true if user automated login over cookies is enabled | boolean
  • ShowFunctionHelp | true if function help is allowed | boolean