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

namespace DhlPolska\API\ParcelShop\Method;

use DhlPolska\API\AuthDataInterface;
use DhlPolska\API\ShipmentDataInterface;
use JsonSerializable;

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

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

	/**
	 * @var ShipmentDataInterface
	 */
	private ShipmentDataInterface $shipment_data;

	/**
	 * CreateShipment constructor.
	 *
	 * @param AuthDataInterface     $auth_data     .
	 * @param ShipmentDataInterface $shipment_data .
	 */
	public function __construct( AuthDataInterface $auth_data, ShipmentDataInterface $shipment_data ) {
		$this->auth_data     = $auth_data;
		$this->shipment_data = $shipment_data;
	}

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