Function reservationLog

Creates an audit snapshot of a reservation in the R2_LOG_ZMIAN table. It aggregates data from the reservation (R2), its components (hotel / flight / coach), the offer plan (countries and cities) and the payment documents view (vDOKUMENTY_WPLATY).

Arguments

  • params :
    I.
        array (
              [ 'idReservation' ] = '' ;
            )
    
        OR
    
        array (
              [ 'webId' ] = '' ;
            )
    
    II.
    array (
              [ 'bookingNumber' ] = '' ;
              [ 'sourceSystem' ] = '' ;
            )
        

Returns

Array with the result of the operation:

  • status - OK or FAIL
  • idLog - primary key of the created R2_LOG_ZMIAN record (on success)
  • idR2 - resolved reservation id (on success)
  • bookingNotExists - true when the reservation was not found
  • errors - array of error records (code, message)

Example


  require_once ( 'classUddsOx.php' ) ;

  $udds = new classUddsOx ;
  $udds->customerCode = [your_customerCode] ;
  $udds->login = [your_login] ;
  $udds->password = [your_password] ;
  $udds->serverUrl = 'http://api.dlaoperatora.pl/udds/' ;

  //I.
  $yourParams = array();
  $yourParams [ 'idReservation' ] = 446 ;
  $ret = $udds->reservationLog ( $yourParams ) ;

  //II.
  $yourParams = array();
  $yourParams [ 'bookingNumber' ] = '1234/2019' ;
  $yourParams [ 'sourceSystem' ] = 'KSI' ; // 'KSI', 'MERLINX' ...
  $ret = $udds->reservationLog ( $yourParams ) ;


Returns $ret =
array ( 'status' => 'OK', 'idLog' => 123, 'idR2' => 25, 'errors' => array (), )