<?php

/**
 * Class CreateShipments
 *
 * @package Octolize\DhlPolska\API\WebApi\Method
 */
namespace DhlPolskaVendor\Octolize\DhlPolska\API\WebApi\Method;

use DhlPolskaVendor\Octolize\DhlPolska\API\AuthDataInterface;
use DhlPolskaVendor\Octolize\DhlPolska\API\ShipmentDataInterface;
use JsonSerializable;
/**
 * CreateShipments structure.
 */
class CreateShipments implements JsonSerializable
{
    /**
     * @var AuthDataInterface
     */
    private AuthDataInterface $auth_data;
    /**
     * @var ShipmentDataInterface[]
     */
    private array $shipments;
    /**
     * @var bool
     */
    private bool $skip_restriction_check;
    /**
     * CreateShipments constructor.
     *
     * @param AuthDataInterface       $auth_data               .
     * @param ShipmentDataInterface[] $shipments              .
     * @param bool                    $skip_restriction_check .
     */
    public function __construct(AuthDataInterface $auth_data, array $shipments, bool $skip_restriction_check = \false)
    {
        $this->auth_data = $auth_data;
        $this->shipments = $shipments;
        $this->skip_restriction_check = $skip_restriction_check;
    }
    /**
     * @return array
     */
    public function jsonSerialize(): array
    {
        return ['authData' => $this->auth_data, 'shipments' => $this->shipments, 'skipRestrictionCheck' => $this->skip_restriction_check];
    }
}
