<?php

declare(strict_types=1);

namespace Gls\GlsPoland\AdePlus\Type;

use Gls\GlsPoland\AdePlus\Consignment\ConsignmentIdsCollection;
use Gls\GlsPoland\AdePlus\Response;
use Gls\GlsPoland\Soap\Client\Type\ResultInterface;
use JsonSerializable;

final class AdePreparingBoxGetConsignIDsResponse extends Response implements ResultInterface, JsonSerializable
{
    /**
     * @var \Gls\GlsPoland\AdePlus\Consignment\ConsignmentIdsCollection
     */
    protected $return;

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

    public function getReturn(): ConsignmentIdsCollection
    {
        return $this->return;
    }

    public function withReturn(ConsignmentIdsCollection $return): AdePreparingBoxGetConsignIDsResponse
    {
        $new = clone $this;
        $new->return = $return;

        return $new;
    }
}
