src/Api/HiPay/Model/Soap/Transfer.php
<?php
namespace HiPay\Wallet\Mirakl\Api\HiPay\Model\Soap;
use HiPay\Wallet\Mirakl\Vendor\Model\VendorInterface;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Value object for transfer data.
*
* @author Ivanis Kouamé <ivanis.kouame@smile.fr>
* @copyright 2015 Smile
*/
class Transfer extends ModelAbstract
{
/**
* @var int
*
* @Assert\NotBlank
* @Assert\Type("float")
*/
protected $amount;
/**
* @var int
*
* @Assert\NotBlank
* @Assert\Type("integer")
*/
protected $recipientUserId;
/**
* @var string
*
* @Assert\NotBlank
*/
protected $recipientUsername;
/**
* @var string
*
* @Assert\NotBlank
*/
protected $privateLabel;
/**
* @var string
*
* @Assert\NotBlank
*/
protected $publicLabel;
/**
* @var string
*
* @Assert\NotBlank
*/
protected $entity;
/**
* @var string
*
*/
protected $merchantUniqueId;
/**
* Transfer constructor.
*
* @param float $amount
* @param VendorInterface $vendorInterface
* @param string $privateLabel
* @param string $publicLabel
*/
public function __construct(
$amount,
VendorInterface $vendorInterface,
$privateLabel,
$publicLabel,
$merchantUniqueId
) {
$this->amount = $amount;
$this->recipientUserId = $vendorInterface->getHiPayId();
$this->recipientUsername = $vendorInterface->getEmail();
$this->privateLabel = $privateLabel;
$this->publicLabel = $publicLabel;
$this->merchantUniqueId = $merchantUniqueId;
}
/**
* @return int
*/
public function getAmount()
{
return $this->amount;
}
/**
* @return int
*/
public function getRecipientUserId()
{
return $this->recipientUserId;
}
/**
* @return string
*/
public function getRecipientUsername()
{
return $this->recipientUsername;
}
/**
* @return string
*/
public function getPrivateLabel()
{
return $this->privateLabel;
}
/**
* @return string
*/
public function getPublicLabel()
{
return $this->publicLabel;
}
/**
* @return string
*/
public function getEntity()
{
return $this->entity;
}
/**
* @param int $amount
*/
public function setAmount($amount)
{
$this->amount = $amount;
}
/**
* @param int $recipientUserId
*/
public function setRecipientUserId($recipientUserId)
{
$this->recipientUserId = $recipientUserId;
}
/**
* @param string $recipientUsername
*/
public function setRecipientUsername($recipientUsername)
{
$this->recipientUsername = $recipientUsername;
}
/**
* @param string $privateLabel
*/
public function setPrivateLabel($privateLabel)
{
$this->privateLabel = $privateLabel;
}
/**
* @param string $publicLabel
*/
public function setPublicLabel($publicLabel)
{
$this->publicLabel = $publicLabel;
}
/**
* @param string $entity
*/
public function setEntity($entity)
{
$this->entity = $entity;
}
/**
* @return string
*/
public function getMerchantUniqueId()
{
return $this->merchantUniqueId;
}
/**
* @param string $merchantUniqueId
*/
public function setMerchantUniqueId($merchantUniqueId)
{
$this->merchantUniqueId = $merchantUniqueId;
}
}