Kernel::GenericInterface::Operation::Service::Common

NAME

Kernel::GenericInterface::Operation::Service::Common – Base class for all Service Operations

PUBLIC INTERFACE

has PreferenceLookup

Attribute that holds the defined services preferences coming from the database

has DynamicFieldLookup

Attribute that holds the defined service dynamic fields.

Init()

initialize the operation by checking the web service configuration

    my $Return = $CommonObject->Init(
        WebserviceID => 1,
    );

    $Return = {
        Success => 1,                       # or 0 in case of failure,
        ErrorMessage => 'Error Message',
    }

FormatService()

Removes not needed details for service output in web services, extracts dynamic fields into its own array

    my $Success = $CommonObject->FormatService(
        Service => $ServiceHashRef,
    );

    $Service = {
        # ...
        DynamicField => [
            {
                Name => 'some name',
                Value => 'some value',
            },
            # ...
        ],
        # ...
    }
Scroll to Top