-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathAttributedAffiliateSiteMapper.php
More file actions
30 lines (26 loc) · 1.08 KB
/
AttributedAffiliateSiteMapper.php
File metadata and controls
30 lines (26 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
namespace Hypeit\TradeTracker\Mapper;
use Hypeit\TradeTracker\Model\AttributedAffiliateSite;
class AttributedAffiliateSiteMapper implements MapperInterface
{
/**
* {@inheritdoc}
*
* @return AttributedAffiliateSite
*/
public function hydrate($value)
{
$attributedAffiliateSite = new AttributedAffiliateSite();
$attributedAffiliateSite->setAffiliateSiteId($value->affiliateSiteID);
$attributedAffiliateSite->setCommission($value->commission);
$attributedAffiliateSite->setPosition($value->position);
$attributedAffiliateSite->setIp($value->IP);
$attributedAffiliateSite->setTransactionType((new TransactionTypeMapper())->hydrate($value->transactionType));
$attributedAffiliateSite->setTransactionStatus(
(new TransactionStatusMapper())->hydrate($value->transactionStatus)
);
$attributedAffiliateSite->setReference($value->reference);
$attributedAffiliateSite->setRegistrationDate(new \DateTime($value->registrationDate));
return $attributedAffiliateSite;
}
}