<?php
/**
 * Class GetPnp
 *
 * @package DhlPolska\API\WebApi\Method
 */

namespace DhlPolska\API\WebApi\Method;

use DhlPolska\API\AuthDataInterface;
use DhlPolska\API\WebApi\Struct\PnpRequest;
use JsonSerializable;

/**
 * GetPnp structure.
 */
class GetPnp implements JsonSerializable {

	/**
	 * @var PnpRequest
	 */
	private PnpRequest $pnp_request;

	/**
	 * GetPnp constructor.
	 *
	 * @param AuthDataInterface $auth_data .
	 * @param string            $date .
	 * @param string            $type .
	 */
	public function __construct( AuthDataInterface $auth_data, string $date, string $type ) {
		$this->pnp_request = new PnpRequest( $auth_data, $date, $type );
	}

	/**
	 * @return array
	 */
	public function jsonSerialize(): array {
		return [
			'pnpRequest' => $this->pnp_request,
		];
	}
}
