<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class CardPaymentTimeline implements \JsonSerializable { private $authorizedAt; private $capturedAt; private $voidedAt; public function getAuthorizedAt(): ?string { return $this->authorizedAt; } public function setAuthorizedAt(?string $authorizedAt): void { $this->authorizedAt = $authorizedAt; } public function getCapturedAt(): ?string { return $this->capturedAt; } public function setCapturedAt(?string $capturedAt): void { $this->capturedAt = $capturedAt; } public function getVoidedAt(): ?string { return $this->voidedAt; } public function setVoidedAt(?string $voidedAt): void { $this->voidedAt = $voidedAt; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->authorizedAt)) { $json['authorized_at'] = $this->authorizedAt; } if (isset($this->capturedAt)) { $json['captured_at'] = $this->capturedAt; } if (isset($this->voidedAt)) { $json['voided_at'] = $this->voidedAt; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 