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

namespace DhlPolska\API\WebApi\Method;

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

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

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

	/**
	 * @var ItemToPrint[]
	 */
	private array $items_to_print;

	/**
	 * GetLabels constructor.
	 *
	 * @param AuthDataInterface      $auth_data      .
	 * @param ItemToPrint[] $items_to_print .
	 */
	public function __construct( AuthDataInterface $auth_data, array $items_to_print ) {
		$this->auth_data      = $auth_data;
		$this->items_to_print = $items_to_print;
	}

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