<?php

namespace KupShop\FeedsBundle\Wrapper;

use KupShop\I18nBundle\Entity\Currency;

class CurrencyWrapper extends BaseWrapper
{
    protected static $objectType = Currency::class;

    /** @var Currency */
    protected $object;

    /** Kód */
    public function field_code(): string
    {
        return $this->object->getId();
    }

    /** Název */
    public function field_title(): string
    {
        return $this->object->getName();
    }

    /** Symbol */
    public function field_symbol(): string
    {
        return $this->object->getSymbol() ?? '';
    }

    /** Kurz */
    public function field_rate(): float
    {
        return $this->object->getRate()->asFloat();
    }
}
