<?php
/**
 * Class ReturnShip
 *
 * @package DhlPolska\API\WebApi\Struct
 */

namespace DhlPolska\API\WebApi\Struct;

use JsonSerializable;

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

	/** @var ReturnAddressat */
	private ReturnAddressat $shipper;

	/** @var ReturnAddressat */
	private ReturnAddressat $receiver;

	/**
	 * ReturnShip constructor.
	 *
	 * @param ReturnAddressat $shipper
	 * @param ReturnAddressat $receiver
	 */
	public function __construct( ReturnAddressat $shipper, ReturnAddressat $receiver ) {
		$this->shipper  = $shipper;
		$this->receiver = $receiver;
	}

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