
###########
OutOfOffice
###########


****
NAME
****


Kernel::GenericInterface::Operation::User::OutOfOffice


****************
PUBLIC INTERFACE
****************


new()
=====


usually, you want to create an instance of this
by using Kernel::GenericInterface::Operation->new();


Run()
=====


Sets out-of-office information for a specific user.


.. code-block:: perl

     my $Result = $OperationObject->Run(
         Data => {
             UserEmail   => 'root@localhost',
             StartDate   => '2014-07-31',
             EndDate     => '2014-08-07',
             OutOfOffice => 1,
         },
     );
 
     OR
 
     my $Result = $OperationObject->Run(
         Data => {
             SessionID                   => 'AValidSessionIDValue',                          # the ID of the user session
             UserLogin                   => 'Agent',                                         # if no SessionID is given UserLogin is required
             Password                    => 'some password',                                 # user password
             OutOfOfficeEntriesCSVString => 'Original CSV string with out-of-office data',
 
             # These are the parsed entries of the CSV string above.
             OutOfOfficeEntries => [
                 {
                     UserEmail   => 'root@localhost',
                     OutOfOffice => 0,
                 },
                 {
                     UserLogin   => 'root',
                     StartDate   => '2014-07-31',
                     EndDate     => '2014-08-07',
                     OutOfOffice => 1,
                 },
                 {
                     UserSearch   => 'root',
                     StartDate   => '2014-07-31',
                     EndDate     => '2014-08-07',
                     OutOfOffice => 1,
                 },
                 # ...
             ],
         },
     );
 
     $Result = {
         Success         => 1,                                   # 0 or 1
         ErrorMessage    => '',                                  # in case of error
         Data            => {                                    # result data payload after Operation
             Success => 1,
             Error   => {                                        # should not return errors
                     ErrorCode    => 'OutOfOffice.ErrorCode',
                     ErrorMessage => 'Error Description'
             },
         },
     };




