<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class TenderCardDetails implements \JsonSerializable { private $status; private $card; private $entryMethod; public function getStatus(): ?string { return $this->status; } public function setStatus(?string $status): void { $this->status = $status; } public function getCard(): ?Card { return $this->card; } public function setCard(?Card $card): void { $this->card = $card; } public function getEntryMethod(): ?string { return $this->entryMethod; } public function setEntryMethod(?string $entryMethod): void { $this->entryMethod = $entryMethod; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->status)) { $json['status'] = $this->status; } if (isset($this->card)) { $json['card'] = $this->card; } if (isset($this->entryMethod)) { $json['entry_method'] = $this->entryMethod; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 