<?php

declare(strict_types=1);

namespace Gls\GlsPoland\AdePlus\ParcelShop;

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

final class AdeParcelShop2SearchByZipResponse extends Response implements ResultInterface, JsonSerializable
{
    /**
     * @var \Gls\GlsPoland\AdePlus\ParcelShop\CParcelShop2Array
     */
    protected $return;

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

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

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

        return $new;
    }
}
