<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class V1PaymentTax implements \JsonSerializable { private $errors; private $name; private $appliedMoney; private $rate; private $inclusionType; private $feeId; public function getErrors(): ?array { return $this->errors; } public function setErrors(?array $errors): void { $this->errors = $errors; } 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 getRate(): ?string { return $this->rate; } public function setRate(?string $rate): void { $this->rate = $rate; } public function getInclusionType(): ?string { return $this->inclusionType; } public function setInclusionType(?string $inclusionType): void { $this->inclusionType = $inclusionType; } public function getFeeId(): ?string { return $this->feeId; } public function setFeeId(?string $feeId): void { $this->feeId = $feeId; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->errors)) { $json['errors'] = $this->errors; } if (isset($this->name)) { $json['name'] = $this->name; } if (isset($this->appliedMoney)) { $json['applied_money'] = $this->appliedMoney; } if (isset($this->rate)) { $json['rate'] = $this->rate; } if (isset($this->inclusionType)) { $json['inclusion_type'] = $this->inclusionType; } if (isset($this->feeId)) { $json['fee_id'] = $this->feeId; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 