예제 #1
0
 /**
  * @param string  $customerIdentity
  * @param Account $account
  * @param Channel $channel
  *
  * @return LifetimeValueHistory
  */
 protected function createHistoryEntry($customerIdentity, Account $account, Channel $channel)
 {
     $lifetimeAmount = $this->lifetimeRepo->calculateAccountLifetime($customerIdentity, $this->customerIdentities[$customerIdentity], $account, $channel);
     $history = new LifetimeValueHistory();
     $history->setAmount($lifetimeAmount);
     $history->setDataChannel($channel);
     $history->setAccount($account);
     return $history;
 }