Skip to content

Commit

Permalink
Fix item prising
Browse files Browse the repository at this point in the history
  • Loading branch information
Allyans3 committed Nov 20, 2020
1 parent f4f004a commit 4e1a281
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/Responses/ItemPricing.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,16 @@ private function decodeResponse($response)

private function completeData($data)
{
return [
'success' => $data['success'],
'volume' => $data['volume'],
if (array_key_exists('lowest_price', $data)) {
$data['lowest_price_text'] = $data['lowest_price'];
$data['lowest_price'] = Mixins::toFloat($data['lowest_price']);
}

'lowest_price' => Mixins::toFloat($data['lowest_price']),
'lowest_price_text' => $data['lowest_price'],
if (array_key_exists('median_price', $data)) {
$data['median_price_text'] = $data['median_price'];
$data['median_price'] = Mixins::toFloat($data['median_price']);
}

'median_price' => Mixins::toFloat($data['median_price']),
'median_price_text' => $data['median_price']
];
return $data;
}
}

0 comments on commit 4e1a281

Please sign in to comment.