<?php
/**
 * File for class DhlApiServiceDelete
 * @package DhlApi
 * @subpackage Services
 * @author WsdlToPhp Team <contact@wsdltophp.com>
 * @version 20140325-01
 * @date 2015-02-05
 */
/**
 * This class stands for DhlApiServiceDelete originally named Delete
 * @package DhlApi
 * @subpackage Services
 * @author WsdlToPhp Team <contact@wsdltophp.com>
 * @version 20140325-01
 * @date 2015-02-05
 */
class DhlApiServiceDelete extends DhlApiWsdlClass
{
    /**
     * Method to call the operation originally named deleteShipments
     * Documentation : Usuwanie przesyłek w systemie DHL
     * @uses DhlApiWsdlClass::getSoapClient()
     * @uses DhlApiWsdlClass::setResult()
     * @uses DhlApiWsdlClass::saveLastError()
     * @param DhlApiStructDeleteShipments $_dhlApiStructDeleteShipments
     * @return DhlApiStructDeleteShipmentsResponse
     */
    public function deleteShipments(DhlApiStructDeleteShipments $_dhlApiStructDeleteShipments)
    {
        try
        {
            return $this->setResult(self::getSoapClient()->deleteShipments($_dhlApiStructDeleteShipments));
        }
        catch(SoapFault $soapFault)
        {
            return !$this->saveLastError(__METHOD__,$soapFault);
        }
    }
    /**
     * Method to call the operation originally named deleteShipment
     * Documentation : Usuwanie przesyłki w systemie DHL - metoda agregująca
     * @uses DhlApiWsdlClass::getSoapClient()
     * @uses DhlApiWsdlClass::setResult()
     * @uses DhlApiWsdlClass::saveLastError()
     * @param DhlApiStructDeleteShipment $_dhlApiStructDeleteShipment
     * @return DhlApiStructDeleteShipmentResponse
     */
    public function deleteShipment(DhlApiStructDeleteShipment $_dhlApiStructDeleteShipment)
    {
        try
        {
            return $this->setResult(self::getSoapClient()->deleteShipment($_dhlApiStructDeleteShipment));
        }
        catch(SoapFault $soapFault)
        {
            return !$this->saveLastError(__METHOD__,$soapFault);
        }
    }
    /**
     * Returns the result
     * @see DhlApiWsdlClass::getResult()
     * @return DhlApiStructDeleteShipmentResponse|DhlApiStructDeleteShipmentsResponse
     */
    public function getResult()
    {
        return parent::getResult();
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
