Package DE_EPAGES::Shop::API::WebService::BaseShopService
Base class for shop web services (with shop as object).
Base |
DE_EPAGES::WebService::API::WebService::BaseService |
Functions
- CheckPermission
- checkFeature
- checkShopObject
- existsShopObject
- featureAlias
- featureCount
- getCurrencyIDs
- getLanguageIDs
- getServiceTypesUrn
- getServiceUrn
- getShopTypesUrn
- loadShopObject
- loadTaxArea
- loadTaxClass
- mapType
- new
- object
- setAddress
- setAddressNamed
- setAddressesNamed
- soapAdditionalAddressesNamed
- soapAddress
- soapAddressNamed
- soapList
CheckPermission
Checks if the user is allowed to execute a web service method on the user's shop. Checks if the shop has the feature 'WebServices' or if the web service method is called by an authorized client application.
Syntax |
$IsAllowed = $self->CheckPermission( $WebService, $Method, $Login, $Password ); |
Input |
|
Return |
|
checkFeature
check if feature activated and enougth WS calls allowed produce an error if not enogth WS calls allowd
Syntax |
$self->checkFeature; |
checkShopObject
No WebService-Method! checks if a object belongs to the current shop and is instance of a certain class rises error if not.
Syntax |
$self->checkShopObject( $Object, $ClassAlias ) |
Input |
|
existsShopObject
No WebService-Method! returns 0 if object does not exist. object does not belongs to a site (shop). object is not instance of a certain class. return 1 if all tests passed.
Syntax |
$self->existsShopObject( $Path, $ClassAlias ) |
Input |
|
featureAlias
simply returns the Alias of the current Webservie feature
Syntax |
my $FeatureAlias = $self->featureAlias; |
Return |
|
featureCount
returns the number of available allowed WebService calls today
Syntax |
my $FeatureCount = $self->featureCount($Feature); |
Input |
|
Return |
|
getCurrencyIDs
No WebService-Method! gets the currency ids of current shop.
Syntax |
$self->getCurrencyIDs() |
Return |
|
getLanguageIDs
No WebService-Method! gets the language ids of currents shop. result set can be restricted by a list of language codes. if language codes are omitted, all shop language ids will be returned.
Syntax |
$self->getLanguageIDs( $aLanguageCodes ) |
Input |
|
Return |
|
getServiceTypesUrn
returns the types urn of the service (was set by constructor new()
Syntax |
$Service->getServiceTypesUrn(); |
Return |
|
getServiceUrn
returns the urn of the service (was set by constructor new()
Syntax |
$Service->getServiceUrn(); |
Return |
|
getShopTypesUrn
returns the shop types urn of the service (was set by constructor new()
Syntax |
$Service->getShopTypesUrn(); |
Return |
|
loadShopObject
loads the object specified by object path and verifies that is exists, belongs to the current shop and is an instance of a certain class. Raises an error if any condition is not fulfilled. Returns the object if all tests passed.
Syntax |
$Object = $self->loadShopObject( $Path, $ClassAlias ) |
Input |
|
Return |
|
loadTaxArea
loads the tax area object by path and verifies that is exists, belongs to the given shop and is an instance of a certain class. Raises an error if any condition is not fulfilled. Returns the object if all tests passed.
Syntax |
$Object = $self->loadTaxArea( $Shop, $Path ) |
Input |
|
Return |
|
loadTaxClass
loads the tax class object by path and verifies that is exists, belongs to the given shop and is an instance of a certain class. Raises an error if any condition is not fulfilled. Returns the object if all tests passed.
Syntax |
$Object = $self->loadTaxClass( $Shop, $Path ) |
Input |
|
Return |
|
mapType
Map the given XSD Types to a specific Uri.
Syntax |
$service->mapType($aTypes, $Uri); |
Example |
$self->mapType(['TProduct, TPrice], 'urn://myservice/2005/06'); |
Return |
|
new
Creates a new web service object as a blessed hash reference and adds the values from the %Options hash.
Syntax |
$Service = DE_EPAGES::WebService::API::WebService::BaseShopService->new( %Options ); |
Input |
|
Return |
|
object
Override method object from BaseShopService. Returns the base object on which the WebService will act. The 'Site' attribute (Shop) of the web service user will be used as base object.
Syntax |
$base_object = $service->object; |
Return |
|
setAddress
No WebService-Method! Sets address of an object (for create and update users, customers, etc).
Syntax |
$self->setAddress( $object, $hAddress ) |
Input |
|
setAddressNamed
No WebService-Method! Sets address of an object (for create and update users, customers, etc).
Syntax |
$self->setAddressNamed( $object, $hAddress ) |
Input |
|
setAddressesNamed
No WebService-Method! set addresses of user.
Syntax |
$self->setAddressesNamed( $user, $ahAddresses ) |
Input |
|
soapAdditionalAddressesNamed
No WebService-Method! gets address soap objects of user adresses.
Syntax |
$self->soapAdditionalAddressesNamed( $object, $aInAttributes ) |
Input |
|
soapAddress
No WebService-Method! gets an soap object of passed address.
Syntax |
$self->setAddressNamed( $object, $hAddress ) |
Input |
|
soapAddressNamed
No WebService-Method! gets an soap object of passed address within alias.
Syntax |
$self->soapAddressNamed( $object, $hAddress ) |
Input |
|
soapList
build a complex SOAP::Data structure of list (array) of same type the array will passed with content to handle by SOAP::Lite but empty array will handled with type and uri the returned SOAP::Data object can call SOAP::Data methods
Syntax |
$service->soapList($aList, $Type, $Uri); |
Example |
$self->soapList($aPaths,'string'); $self->soapList($aAttributes,'TAttribute'); $self->soapList($aVars,'TMyType','urn://vendor.do.main/WS/Types'); |
Input |
|
Return |
|