<?php
/**
 * File for class DhlApiServiceCancel
 * @package DhlApi
 * @subpackage Services
 * @author WsdlToPhp Team <contact@wsdltophp.com>
 * @version 20140325-01
 * @date 2015-02-05
 */
/**
 * This class stands for DhlApiServiceCancel originally named Cancel
 * @package DhlApi
 * @subpackage Services
 * @author WsdlToPhp Team <contact@wsdltophp.com>
 * @version 20140325-01
 * @date 2015-02-05
 */
class DhlApiServiceCancel extends DhlApiWsdlClass
{
    /**
     * Method to call the operation originally named cancelCourierBooking
     * Documentation : Anulowanie zamówionego kuriera
     * @uses DhlApiWsdlClass::getSoapClient()
     * @uses DhlApiWsdlClass::setResult()
     * @uses DhlApiWsdlClass::saveLastError()
     * @param DhlApiStructCancelCourierBooking $_dhlApiStructCancelCourierBooking
     * @return DhlApiStructCancelCourierBookingResponse
     */
    public function cancelCourierBooking(DhlApiStructCancelCourierBooking $_dhlApiStructCancelCourierBooking)
    {
        try
        {
            return $this->setResult(self::getSoapClient()->cancelCourierBooking($_dhlApiStructCancelCourierBooking));
        }
        catch(SoapFault $soapFault)
        {
            return !$this->saveLastError(__METHOD__,$soapFault);
        }
    }
    /**
     * Returns the result
     * @see DhlApiWsdlClass::getResult()
     * @return DhlApiStructCancelCourierBookingResponse
     */
    public function getResult()
    {
        return parent::getResult();
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
