22 lines
387 B
PHP
22 lines
387 B
PHP
<?php
|
|
|
|
namespace x13allegro\Api\Model\Offers;
|
|
|
|
use JsonSerializable;
|
|
|
|
final class Tax implements JsonSerializable
|
|
{
|
|
/** @var string */
|
|
public $percentage;
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
public function jsonSerialize()
|
|
{
|
|
return array(
|
|
'percentage' => number_format((float)str_replace(',', '.', $this->percentage), 2, '.', '')
|
|
);
|
|
}
|
|
}
|