<?php

namespace DhlPolska\API\WebApi\Struct;

use DhlPolska\API\AuthDataInterface;
use JsonSerializable;

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

	/**
	 * @var AuthDataInterface
	 */
	private AuthDataInterface $auth_data;

	/**
	 * @var string
	 */
	private string $date;

	/**
	 * @var string
	 */
	private string $type;

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

	/**
	 * @return array
	 */
	public function jsonSerialize(): array {
		return [
			'authData' => $this->auth_data,
			'date'     => $this->date,
			'type'     => $this->type,
		];
	}
}
