Skip to content

Open-source event management and ticket selling platform — perfect for concerts, conferences, and everything in between 🎟️ If you find this project helpful, please consider giving us a star ⭐️

764 B
Raw Blame
<?php

namespace HiEvents\DomainObjects;

class OrganizerConfigurationDomainObject extends Generated\OrganizerConfigurationDomainObjectAbstract
{
    public function getFixedApplicationFee(): float
    {
        return $this->getApplicationFees()['fixed'] ?? config('app.default_application_fee_fixed');
    }

    public function getPercentageApplicationFee(): float
    {
        return $this->getApplicationFees()['percentage'] ?? config('app.default_application_fee_percentage');
    }

    public function getApplicationFeeCurrency(): string
    {
        return $this->getApplicationFees()['currency'] ?? 'USD';
    }

    public function isDefault(): bool
    {
        return $this->getIsSystemDefault() || $this->getDefaultForCurrency() !== null;
    }
}