<?php

declare(strict_types=1);

namespace CpCreation\VitiCore\Cart\Model\Payment;

class Etransactions
{
    use EstimatedTransactionFeeTrait;

    private ?string $name = null;
    private ?string $subtitle = null;
    private bool $production = false;
    private ?string $site = null;
    private ?string $rank = null;
    private ?string $login = null;
    private ?string $hmacAlgo = null;
    private ?string $hmacKey = null;
    private ?string $publicKey = null;

    public function getName(): ?string
    {
        return $this->name;
    }

    public function setName(?string $name): void
    {
        $this->name = $name;
    }

    public function getSubtitle(): ?string
    {
        return $this->subtitle;
    }

    public function setSubtitle(?string $subtitle): void
    {
        $this->subtitle = $subtitle;
    }

    public function isProduction(): bool
    {
        return $this->production;
    }

    public function setProduction(bool $production): void
    {
        $this->production = $production;
    }

    public function getSite(): ?string
    {
        return $this->site;
    }

    public function setSite(?string $site): void
    {
        $this->site = $site;
    }

    public function getRank(): ?string
    {
        return $this->rank;
    }

    public function setRank(?string $rank): void
    {
        $this->rank = $rank;
    }

    public function getLogin(): ?string
    {
        return $this->login;
    }

    public function setLogin(?string $login): void
    {
        $this->login = $login;
    }

    public function getHmacAlgo(): ?string
    {
        return $this->hmacAlgo;
    }

    public function setHmacAlgo(?string $hmacAlgo): void
    {
        $this->hmacAlgo = $hmacAlgo;
    }

    public function getHmacKey(): ?string
    {
        return $this->hmacKey;
    }

    public function setHmacKey(?string $hmacKey): void
    {
        $this->hmacKey = $hmacKey;
    }

    public function getPublicKey(): ?string
    {
        return $this->publicKey;
    }

    public function setPublicKey(?string $publicKey): void
    {
        $publicKey = null !== $publicKey ? trim($publicKey) : null;
        $this->publicKey = '' !== (string) $publicKey ? $publicKey : null;
    }
}
