mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
75 lines
1.5 KiB
PHP
75 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Vouchers\DataTransferObjects;
|
|
|
|
use App\Classes\General\Interfaces\DataTransferObject;
|
|
use App\Models\User;
|
|
|
|
class CreateVoucherifyCustomerObject implements DataTransferObject
|
|
{
|
|
/** @var int */
|
|
private $companyId;
|
|
|
|
/** @var User */
|
|
private $user;
|
|
|
|
/** @var bool */
|
|
private $isNew; //this is to cater for creating customer that is existing in system but not yet exist in voucherify
|
|
|
|
/** @var string */
|
|
private $acquisitionChannel;
|
|
|
|
/**
|
|
* CreateVoucherifyCustomerObject constructor.
|
|
* @param int $companyId
|
|
* @param User $user
|
|
* @param bool $isNew
|
|
* @param string $acquisitionChannel
|
|
*/
|
|
public function __construct(int $companyId, User $user, bool $isNew, string $acquisitionChannel = 'exchange')
|
|
{
|
|
$this->companyId = $companyId;
|
|
$this->user = $user;
|
|
$this->isNew = $isNew;
|
|
$this->acquisitionChannel = $acquisitionChannel;
|
|
}
|
|
|
|
/**
|
|
* @return int
|
|
*/
|
|
public function getCompanyId(): int
|
|
{
|
|
return $this->companyId;
|
|
}
|
|
|
|
|
|
/**
|
|
* @return User
|
|
*/
|
|
public function getUser(): User
|
|
{
|
|
return $this->user;
|
|
}
|
|
|
|
|
|
/**
|
|
* @return bool
|
|
*/
|
|
public function getIsNew(): bool
|
|
{
|
|
return $this->isNew;
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getAcquisitionChannel(): string
|
|
{
|
|
// if(!$this->isNew){
|
|
// return "";
|
|
// }
|
|
return $this->acquisitionChannel;
|
|
}
|
|
|
|
}
|