<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class ProcessingFee implements \JsonSerializable { private $effectiveAt; private $type; private $amountMoney; public function getEffectiveAt(): ?string { return $this->effectiveAt; } public function setEffectiveAt(?string $effectiveAt): void { $this->effectiveAt = $effectiveAt; } public function getType(): ?string { return $this->type; } public function setType(?string $type): void { $this->type = $type; } public function getAmountMoney(): ?Money { return $this->amountMoney; } public function setAmountMoney(?Money $amountMoney): void { $this->amountMoney = $amountMoney; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->effectiveAt)) { $json['effective_at'] = $this->effectiveAt; } if (isset($this->type)) { $json['type'] = $this->type; } if (isset($this->amountMoney)) { $json['amount_money'] = $this->amountMoney; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 