<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class PaymentBalanceActivityAutomaticSavingsDetail implements \JsonSerializable { private $paymentId; private $payoutId; public function getPaymentId(): ?string { return $this->paymentId; } public function setPaymentId(?string $paymentId): void { $this->paymentId = $paymentId; } public function getPayoutId(): ?string { return $this->payoutId; } public function setPayoutId(?string $payoutId): void { $this->payoutId = $payoutId; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->paymentId)) { $json['payment_id'] = $this->paymentId; } if (isset($this->payoutId)) { $json['payout_id'] = $this->payoutId; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 