public getDetails ( Scalr\Stats\CostAnalytics\Entity\PriceHistoryEntity | string $price ) : |
||
$price | Scalr\Stats\CostAnalytics\Entity\PriceHistoryEntity | string | The PriceHistoryEntity or identifier of the price. Identifier must be provided as UUID without hyphens. |
return | Returns all prices which are associated with this price history ID |
public function getDetails($price)
{
if ($price instanceof PriceHistoryEntity) {
if (!$price->priceId) {
throw new \InvalidArgumentException("Identifier of the price must be set.");
}
$priceId = $price->priceId;
} else {
$priceId = (string) $price;
}
return PriceEntity::result(PriceEntity::RESULT_ENTITY_COLLECTION)->findByPriceId($priceId);
}