<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class V1PaymentModifier implements \JsonSerializable { private $name; private $appliedMoney; private $modifierOptionId; public function getName(): ?string { return $this->name; } public function setName(?string $name): void { $this->name = $name; } public function getAppliedMoney(): ?V1Money { return $this->appliedMoney; } public function setAppliedMoney(?V1Money $appliedMoney): void { $this->appliedMoney = $appliedMoney; } public function getModifierOptionId(): ?string { return $this->modifierOptionId; } public function setModifierOptionId(?string $modifierOptionId): void { $this->modifierOptionId = $modifierOptionId; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->name)) { $json['name'] = $this->name; } if (isset($this->appliedMoney)) { $json['applied_money'] = $this->appliedMoney; } if (isset($this->modifierOptionId)) { $json['modifier_option_id'] = $this->modifierOptionId; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 