<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class DisputeEvidenceFile implements \JsonSerializable { private $filename; private $filetype; public function getFilename(): ?string { return $this->filename; } public function setFilename(?string $filename): void { $this->filename = $filename; } public function getFiletype(): ?string { return $this->filetype; } public function setFiletype(?string $filetype): void { $this->filetype = $filetype; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->filename)) { $json['filename'] = $this->filename; } if (isset($this->filetype)) { $json['filetype'] = $this->filetype; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 