<?php

namespace DhlPolska\API\WebApi\Method;

use DhlPolska\API\AuthDataInterface;
use JsonSerializable;

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

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

	/**
	 * @var string[]
	 */
	private array $shipment_ids;

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

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