Skip to content

Commit

Permalink
Updated API
Browse files Browse the repository at this point in the history
  • Loading branch information
olegkrivtsov committed Feb 22, 2018
1 parent 761b5c8 commit f27f715
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lib/WebMarketingROI/OptimizelyPHP/Resource/v2/Experiment.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,12 @@ class Experiment
*/
private $pageIds;

/**
* The last time the Experiment was activated (not present if it is still activated)
* @var type
*/
private $latest;

/**
* Constructor.
*/
Expand Down Expand Up @@ -197,6 +203,7 @@ public function __construct($options = array())
case 'allocation_policy': $this->setAllocationPolicy($value); break;
case 'earliest': $this->setEarliest($value); break;
case 'page_ids': $this->setPageIds($value); break;
case 'latest': $this->setLatest($value); break;
default:
throw new Exception('Unknown option found in the Experiment entity: ' . $name);
}
Expand Down Expand Up @@ -227,6 +234,7 @@ public function toArray()
'allocation_policy' => $this->getAllocationPolicy(),
'earliest' => $this->getEarliest(),
'page_ids' => $this->getPageIds(),
'latest' => $this->getLatest(),
);

if ($this->getChanges()) {
Expand Down Expand Up @@ -485,5 +493,15 @@ public function setPageIds($pageIds)
{
$this->pageIds = $pageIds;
}

public function getLatest()
{
return $this->latest;
}

public function setLatest($latest)
{
$this->latest = $latest;
}
}

0 comments on commit f27f715

Please sign in to comment.