mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 12:33:56 +00:00
71 lines
1.4 KiB
PHP
71 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Vouchers\DataTransferObjects;
|
|
|
|
|
|
use App\Classes\General\Interfaces\DataTransferObject;
|
|
use App\Models\User;
|
|
|
|
class ValidateVoucherifyVoucherObject implements DataTransferObject
|
|
{
|
|
/** @var int */
|
|
private $companyId;
|
|
|
|
/** @var string */
|
|
private $voucherCode;
|
|
|
|
/** @var float */
|
|
private $amount;
|
|
|
|
/** @var User */
|
|
private $user; //this will affect certain voucher that limit user redemption e.g. one user one redemption per campaign
|
|
|
|
/**
|
|
* ValidateVoucherifyVoucherObject constructor.
|
|
* @param int $companyId
|
|
* @param string $voucherCode
|
|
* @param float $amount
|
|
* @param User $user
|
|
*/
|
|
public function __construct(int $companyId, string $voucherCode, float $amount, User $user)
|
|
{
|
|
$this->companyId = $companyId;
|
|
$this->voucherCode = $voucherCode;
|
|
$this->amount = $amount;
|
|
$this->user = $user;
|
|
}
|
|
|
|
/**
|
|
* @return int
|
|
*/
|
|
public function getCompanyId(): int
|
|
{
|
|
return $this->companyId;
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getVoucherCode(): string
|
|
{
|
|
return $this->voucherCode;
|
|
}
|
|
|
|
/**
|
|
* @return float
|
|
*/
|
|
public function getAmount(): float
|
|
{
|
|
return $this->amount;
|
|
}
|
|
|
|
/**
|
|
* @return User
|
|
*/
|
|
public function getUser(): User
|
|
{
|
|
return $this->user;
|
|
}
|
|
|
|
}
|