<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class CatalogCustomAttributeDefinitionNumberConfig implements \JsonSerializable { private $precision; public function getPrecision(): ?int { return $this->precision; } public function setPrecision(?int $precision): void { $this->precision = $precision; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->precision)) { $json['precision'] = $this->precision; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 