Scalr\Stats\CostAnalytics\Prices::getHistory PHP Method

getHistory() public method

Gets the history of the changes of the specified price
public getHistory ( string $platform, string $cloudLocation, string $url = null, string $accountId = null ) : ArrayCollection
$platform string The cloud platform
$cloudLocation string The cloud location
$url string optional The keystone url for the private cloud
$accountId string optional The identifier of the account for overridden price
return Scalr\Model\Collections\ArrayCollection Returns collection of the PriceHistoryEntity objects
    public function getHistory($platform, $cloudLocation, $url = null, $accountId = null)
    {
        $accountId = $accountId ?: 0;
        $url = $url ?: '';
        return PriceHistoryEntity::result(PriceHistoryEntity::RESULT_ENTITY_COLLECTION)->find([['platform' => $platform], ['cloudLocation' => $cloudLocation], ['url' => $url], ['accountId' => $accountId]], null, ['applied' => true]);
    }