<?php

/*
 * This file was automatically generated.
 */
namespace Syde\Vendor\Worldline\OnlinePayments\Sdk\Merchant\ProductGroups;

use Syde\Vendor\Worldline\OnlinePayments\Sdk\Communication\RequestObject;
/**
 * Query parameters for Get product groups
 *
 * @package OnlinePayments\Sdk\Merchant\ProductGroups
 */
class GetProductGroupsParams extends RequestObject
{
    /**
     * @var string|null
     */
    public ?string $countryCode = null;
    /**
     * @var string|null
     */
    public ?string $currencyCode = null;
    /**
     * @var string|null
     * @deprecated This field has no effect.
     */
    public ?string $locale = null;
    /**
     * @var int|null
     */
    public ?int $amount = null;
    /**
     * @var bool|null
     */
    public ?bool $isRecurring = null;
    /**
     * @var string[]|null
     */
    public ?array $hide = null;
    /**
     * @return string|null
     */
    public function getCountryCode() : ?string
    {
        return $this->countryCode;
    }
    /**
     * @param string|null $value
     */
    public function setCountryCode(?string $value) : void
    {
        $this->countryCode = $value;
    }
    /**
     * @return string|null
     */
    public function getCurrencyCode() : ?string
    {
        return $this->currencyCode;
    }
    /**
     * @param string|null $value
     */
    public function setCurrencyCode(?string $value) : void
    {
        $this->currencyCode = $value;
    }
    /**
     * @return string|null
     * @deprecated This field has no effect.
     */
    public function getLocale() : ?string
    {
        return $this->locale;
    }
    /**
     * @param string|null $value
     * @deprecated This field has no effect.
     */
    public function setLocale(?string $value) : void
    {
        $this->locale = $value;
    }
    /**
     * @return int|null
     */
    public function getAmount() : ?int
    {
        return $this->amount;
    }
    /**
     * @param int|null $value
     */
    public function setAmount(?int $value) : void
    {
        $this->amount = $value;
    }
    /**
     * @return bool|null
     */
    public function getIsRecurring() : ?bool
    {
        return $this->isRecurring;
    }
    /**
     * @param bool|null $value
     */
    public function setIsRecurring(?bool $value) : void
    {
        $this->isRecurring = $value;
    }
    /**
     * @return string[]|null
     */
    public function getHide() : ?array
    {
        return $this->hide;
    }
    /**
     * @param string[]|null $value
     */
    public function setHide(?array $value) : void
    {
        $this->hide = $value;
    }
    /**
     * @param string[]|null $value
     */
    public function addHide(array $value) : void
    {
        if (\is_null($this->hide)) {
            $this->hide = [];
        }
        $this->hide[] = $value;
    }
    /**
     * @return array
     */
    public function toArray() : array
    {
        $array = [];
        if ($this->countryCode != null) {
            $array['countryCode'] = $this->countryCode;
        }
        if ($this->currencyCode != null) {
            $array['currencyCode'] = $this->currencyCode;
        }
        if ($this->locale != null) {
            $array['locale'] = $this->locale;
        }
        if ($this->amount != null) {
            $array['amount'] = $this->amount;
        }
        if ($this->isRecurring != null) {
            $array['isRecurring'] = $this->isRecurring ? 'true' : 'false';
        }
        if ($this->hide != null) {
            $array['hide'] = [];
            foreach ($this->hide as $element) {
                if ($element != null) {
                    $array['hide'][] = $element;
                }
            }
        }
        return $array;
    }
}
