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

namespace DhlPolska\API\WebApi\Method;

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

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

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

	/**
	 * @var CreateReturnShipmentRequest
	 */
	private CreateReturnShipmentRequest $shipment;

	/**
	 * CreateShipmentReturn constructor.
	 *
	 * @param AuthDataInterface          $auth_data .
	 * @param CreateReturnShipmentRequest $shipment .
	 */
	public function __construct( AuthDataInterface $auth_data, CreateReturnShipmentRequest $shipment ) {
		$this->auth_data = $auth_data;
		$this->shipment  = $shipment;
	}

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