<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class DeprecatedCreateDisputeEvidenceTextRequest implements \JsonSerializable { private $idempotencyKey; private $evidenceType; private $evidenceText; public function __construct(string $idempotencyKey, string $evidenceText) { $this->idempotencyKey = $idempotencyKey; $this->evidenceText = $evidenceText; } public function getIdempotencyKey(): string { return $this->idempotencyKey; } public function setIdempotencyKey(string $idempotencyKey): void { $this->idempotencyKey = $idempotencyKey; } public function getEvidenceType(): ?string { return $this->evidenceType; } public function setEvidenceType(?string $evidenceType): void { $this->evidenceType = $evidenceType; } public function getEvidenceText(): string { return $this->evidenceText; } public function setEvidenceText(string $evidenceText): void { $this->evidenceText = $evidenceText; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; $json['idempotency_key'] = $this->idempotencyKey; if (isset($this->evidenceType)) { $json['evidence_type'] = $this->evidenceType; } $json['evidence_text'] = $this->evidenceText; $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 