<?php

namespace Devurai\AcceptbluePaymentPro\Surcharge;

trait SurchargeSettingsDTO
{
    public function is_surcharge(): bool
    {
        return $this->get_prop('enable_surcharge', 'no') === 'yes';
    }

    public function get_surcharge_amount(): float
    {
        return floatval($this->get_prop('surcharge_amount', '0'));
    }

    public function get_surcharge_type(): string
    {
        return $this->get_prop('surcharge_type', 'currency');
    }

    public function is_surcharge_currency(): bool
    {
        return $this->get_prop('surcharge_type', 'currency') === 'currency';
    }

    public function is_surcharge_percentage(): bool
    {
        return $this->get_prop('surcharge_type', 'currency') === 'percentage';
    }

    public function get_surcharge_tax(): string
    {
        return $this->get_prop('surcharge_tax', 'none');
    }
}