mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
122 lines
2.5 KiB
PHP
122 lines
2.5 KiB
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Vouchers\DataTransferObjects;
|
|
|
|
use App\Classes\General\Interfaces\DataTransferObject;
|
|
|
|
class RedeemVoucherifyVoucherObject implements DataTransferObject
|
|
{
|
|
/** @var int */
|
|
private $companyId;
|
|
|
|
/** @var int */
|
|
private $transactionId;
|
|
|
|
/** @var string */
|
|
private $promoCode;
|
|
|
|
/** @var float */
|
|
private $amount;
|
|
|
|
/** @var float */
|
|
private $serviceCharge;
|
|
|
|
/** @var object */
|
|
private $employee;
|
|
|
|
/** @var string */
|
|
private $voucherifyOrderId;
|
|
|
|
/** @var bool */
|
|
private $isNewOrder; //comparing booking and voucher date, an order is deemed new when booking is created after receiving voucher
|
|
|
|
/**
|
|
* RedeemVoucherifyVoucherObject constructor.
|
|
* @param int $companyId
|
|
* @param int $transactionId
|
|
* @param string $promoCode
|
|
* @param float $amount
|
|
* @param float $serviceCharge
|
|
* @param object $employee
|
|
* @param string $voucherifyOrderId
|
|
* @param bool $isNewOrder
|
|
*/
|
|
public function __construct(int $companyId, int $transactionId, string $promoCode, float $amount, float $serviceCharge, object $employee, string $voucherifyOrderId, ?bool $isNewOrder = null)
|
|
{
|
|
$this->companyId = $companyId;
|
|
$this->transactionId = $transactionId;
|
|
$this->promoCode = $promoCode;
|
|
$this->amount = $amount;
|
|
$this->serviceCharge = $serviceCharge;
|
|
$this->employee = $employee;
|
|
$this->voucherifyOrderId = $voucherifyOrderId;
|
|
$this->isNewOrder = $isNewOrder;
|
|
}
|
|
|
|
/**
|
|
* @return int
|
|
*/
|
|
public function getCompanyId(): int
|
|
{
|
|
return $this->companyId;
|
|
}
|
|
|
|
|
|
/**
|
|
* @return int
|
|
*/
|
|
public function getTransactionId(): int
|
|
{
|
|
return $this->transactionId;
|
|
}
|
|
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getPromoCode(): string
|
|
{
|
|
return $this->promoCode;
|
|
}
|
|
|
|
/**
|
|
* @return float
|
|
*/
|
|
public function getAmount(): float
|
|
{
|
|
return $this->amount;
|
|
}
|
|
|
|
/**
|
|
* @return float
|
|
*/
|
|
public function getServiceCharge(): float
|
|
{
|
|
return $this->serviceCharge;
|
|
}
|
|
|
|
/**
|
|
* @return object
|
|
*/
|
|
public function getEmployee(): object
|
|
{
|
|
return $this->employee;
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getVoucherifyOrderId(): string
|
|
{
|
|
return $this->voucherifyOrderId;
|
|
}
|
|
|
|
/**
|
|
* @return bool|null
|
|
*/
|
|
public function getIsNewOrder(): ?bool
|
|
{
|
|
return $this->isNewOrder;
|
|
}
|
|
}
|