mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 12:33:56 +00:00
86 lines
1.6 KiB
PHP
86 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Currencies\DataTransferObjects;
|
|
|
|
use App\Classes\General\Interfaces\DataTransferObject;
|
|
use App\Classes\ValueObjects\Constants\PaymentMethodType;
|
|
|
|
class CurrencyConversionObject implements DataTransferObject
|
|
{
|
|
|
|
/** @var float */
|
|
private $amount;
|
|
|
|
/** @var int */
|
|
private $currencyId;
|
|
|
|
/** @var int */
|
|
private $serviceId;
|
|
|
|
/** @var int */
|
|
private $type;
|
|
|
|
/** @var int|null */
|
|
private $paymentMethod;
|
|
|
|
/**
|
|
* CurrencyConversionObject constructor.
|
|
* @param float $amount
|
|
* @param int $currencyId
|
|
* @param int $serviceId
|
|
* @param int $type
|
|
* @param int|null $paymentMethod
|
|
*/
|
|
public function __construct(float $amount, int $currencyId, int $serviceId, int $type, ?int $paymentMethod = PaymentMethodType::CASH)
|
|
{
|
|
$this->amount = $amount;
|
|
$this->currencyId = $currencyId;
|
|
$this->serviceId = $serviceId;
|
|
$this->type = $type;
|
|
$this->paymentMethod = $paymentMethod;
|
|
}
|
|
|
|
/**
|
|
* @return float
|
|
*/
|
|
public function getAmount(): float
|
|
{
|
|
return $this->amount;
|
|
}
|
|
|
|
/**
|
|
* @return int
|
|
*/
|
|
public function getCurrencyId(): int
|
|
{
|
|
return $this->currencyId;
|
|
}
|
|
|
|
/**
|
|
* @return int
|
|
*/
|
|
public function getServiceId(): int
|
|
{
|
|
return $this->serviceId;
|
|
}
|
|
|
|
/**
|
|
* @return int
|
|
*/
|
|
public function getType(): int
|
|
{
|
|
return $this->type;
|
|
}
|
|
|
|
/**
|
|
* @return int|null
|
|
*/
|
|
public function getPaymentMethod(): ?int
|
|
{
|
|
return $this->paymentMethod;
|
|
}
|
|
|
|
|
|
|
|
|
|
} |