<?php
/**
 * Class SoapClient
 *
 * @package DhlPolska\API\ParcelShop
 */

namespace DhlPolska\API\ParcelShop;

use DhlPolska\API\LoggingSoapClient;
use DhlPolska\API\ParcelShop\Method\CreateShipment;
use DhlPolska\API\ParcelShop\Method\DeleteShipment;
use DhlPolska\API\ParcelShop\Method\GetLabel;
use DhlPolska\API\ParcelShop\Method\GetNearestServicepoints;
use DhlPolska\API\ParcelShop\Method\GetPnp;

/**
 * ParcelShop SoapClient.
 */
class SoapClient extends LoggingSoapClient {

	/**
	 * @param GetNearestServicepoints $request .
	 *
	 * @return object
	 */
	public function getNearestServicepoints( GetNearestServicepoints $request ): object {
		return $this->__soapCall( 'getNearestServicepoints', [ [ 'structure' => $request ] ] );
	}

	/**
	 * @param CreateShipment $request .
	 *
	 * @return object
	 */
	public function createShipment( CreateShipment $request ): object {
		return $this->__soapCall( 'createShipment', [ [ 'shipment' => $request ] ] );
	}

	/**
	 * @param GetLabel $request .
	 *
	 * @return object
	 */
	public function getLabel( GetLabel $request ): object {
		return $this->__soapCall( 'getLabel', [ [ 'structure' => $request ] ] );
	}

	/**
	 * @param GetPnp $request .
	 *
	 * @return object
	 */
	public function getPnp( GetPnp $request ): object {
		return $this->__soapCall( 'getPnp', [ [ 'structure' => $request ] ] );
	}

	/**
	 * @param DeleteShipment $request .
	 *
	 * @return object
	 */
	public function deleteShipment( DeleteShipment $request ): object {
		return $this->__soapCall( 'deleteShipment', [ [ 'shipment' => $request ] ] );
	}
}
