ePages 7.3.0 - DE_EPAGES/MultiStoreConnector/API/Resource/MultiStoreProducts.pm

Package DE_EPAGES::MultiStoreConnector::API::Resource::MultiStoreProducts

implements the REST resource for multistore products.

Base
DE_EPAGES::WebService::API::Resource::BaseObjectResource

Functions

class
delete
get
match
params
post
put
service

class

Returns the class name of objects that are represented by this resource. The value is passed to $Site->loadObject($ObjectID, $Class);

Syntax
$ClassName = $Resource->class;
Return
$ClassName (string)
class name

delete

Returns the delete result for ms_products.

Syntax
$hRequestContext = $Resource->delete($System, $GUIDs);
Input
$System ($Object)
system object
$GUIDs (string)
guids seperated with ','
Return
$hResult (ref.hash)
result:
  • ms_products

    • guid - object object
    • status - delete status 'fail' or success

get

Returns the get result for ms_products.

Syntax
$hRequestContext = $Resource->get($System, $GUIDs);
Input
$System ($Object)
system object
$GUIDs (string)
guids seperated with ','
Return
$hResult (ref.hash)
result:
  • ms_products


      • alias - object alias - string
      • taxclass - taxclass name - string
      • isnew - value - bool
      • isdailyprice - value - bool
      • orderunit - string
      • pricequantity - float
      • minorder - float
      • intervalorder - float
      • weightunit - string
      • weight - float
      • refunit - string
      • refamount - int
      • refcontentamount - float
      • stocklevel - float
      • length - float
      • height - float
      • width - float
      • isavailable - bool
      • imagemediumsmall - string
      • imagemediumlarge - string
      • imagelarge - string
      • imagehotdeal - string
      • hassubownprices - bool
      • upcean - string
      • isdownloadproduct - bool
      • position - int

match

Tests if the resource can handle the request. If no, returns an empty list. If yes, returns a defined value. In some cases this value can be interpreted as object identifier for the actual resource.

Syntax
$Match = $Resource->match($Request);
Example
$Match = $Resource->match($Request);
if (defined $Match) {
    my $hRequestContext = $Resource->requestContext($Site, $Match, $Request);
}
Input
$Request (HTTP::Request)
request object
Return
$Match (string)
object identifier

params

Returns the parameters for the action function.

Syntax
$hRequestContext = $Resource->params($ActionName, $Match, $Request);
Input
$ActionName (DE_EPAGES::Object::API::Object::Site)
name of the action
$Match (string)
result of match
$Request (HTTP::Request)
request object
Return
$hRequestContext (ref.hash)
request data with keys:
  • Object - business object - DE_EPAGES::Object::API::Object::Object
  • Action - action object or sub ref to handle the request - ref.code or DE_EPAGES::Permission::API::Object::Action
  • Params - parameters to the action function - ref.array
  • RequestCodec -
  • ResponseCodec -

post

Returns the post result for ms_products.

Syntax
$hRequestContext = $Resource->post($System, $Request);
Input
$System ($Object)
system object
$Request (HTTP::Request)
request object
Return
$hResult (ref.hash)
result:
  • ms_products

    • alias - object alias
    • guid - object object
    • epages6_objectid - object id in epages6 store context

put

Returns the put result for ms_products.

Syntax
$hRequestContext = $Resource->put($System, $Request);
Input
$System ($Object)
system object
$Request (HTTP::Request)
request object
Return
$hResult (ref.hash)
result:
  • ms_products

    • alias - object alias
    • guid - object object
    • epages6_objectid - object id in epages6 store context

service

Returns the RestService object that contains the RestServiceMethod objects which implement the actual actions.

Syntax
$RestService = $Resource->service;
Return
$RestService (DE_EPAGES::WebService::API::Object::RestService)
rest service object