<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class Dispute implements \JsonSerializable { private $disputeId; private $id; private $amountMoney; private $reason; private $state; private $dueAt; private $disputedPayment; private $evidenceIds; private $cardBrand; private $createdAt; private $updatedAt; private $brandDisputeId; private $reportedDate; private $reportedAt; private $version; private $locationId; public function getDisputeId(): ?string { return $this->disputeId; } public function setDisputeId(?string $disputeId): void { $this->disputeId = $disputeId; } public function getId(): ?string { return $this->id; } public function setId(?string $id): void { $this->id = $id; } public function getAmountMoney(): ?Money { return $this->amountMoney; } public function setAmountMoney(?Money $amountMoney): void { $this->amountMoney = $amountMoney; } public function getReason(): ?string { return $this->reason; } public function setReason(?string $reason): void { $this->reason = $reason; } public function getState(): ?string { return $this->state; } public function setState(?string $state): void { $this->state = $state; } public function getDueAt(): ?string { return $this->dueAt; } public function setDueAt(?string $dueAt): void { $this->dueAt = $dueAt; } public function getDisputedPayment(): ?DisputedPayment { return $this->disputedPayment; } public function setDisputedPayment(?DisputedPayment $disputedPayment): void { $this->disputedPayment = $disputedPayment; } public function getEvidenceIds(): ?array { return $this->evidenceIds; } public function setEvidenceIds(?array $evidenceIds): void { $this->evidenceIds = $evidenceIds; } public function getCardBrand(): ?string { return $this->cardBrand; } public function setCardBrand(?string $cardBrand): void { $this->cardBrand = $cardBrand; } public function getCreatedAt(): ?string { return $this->createdAt; } public function setCreatedAt(?string $createdAt): void { $this->createdAt = $createdAt; } public function getUpdatedAt(): ?string { return $this->updatedAt; } public function setUpdatedAt(?string $updatedAt): void { $this->updatedAt = $updatedAt; } public function getBrandDisputeId(): ?string { return $this->brandDisputeId; } public function setBrandDisputeId(?string $brandDisputeId): void { $this->brandDisputeId = $brandDisputeId; } public function getReportedDate(): ?string { return $this->reportedDate; } public function setReportedDate(?string $reportedDate): void { $this->reportedDate = $reportedDate; } public function getReportedAt(): ?string { return $this->reportedAt; } public function setReportedAt(?string $reportedAt): void { $this->reportedAt = $reportedAt; } public function getVersion(): ?int { return $this->version; } public function setVersion(?int $version): void { $this->version = $version; } public function getLocationId(): ?string { return $this->locationId; } public function setLocationId(?string $locationId): void { $this->locationId = $locationId; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->disputeId)) { $json['dispute_id'] = $this->disputeId; } if (isset($this->id)) { $json['id'] = $this->id; } if (isset($this->amountMoney)) { $json['amount_money'] = $this->amountMoney; } if (isset($this->reason)) { $json['reason'] = $this->reason; } if (isset($this->state)) { $json['state'] = $this->state; } if (isset($this->dueAt)) { $json['due_at'] = $this->dueAt; } if (isset($this->disputedPayment)) { $json['disputed_payment'] = $this->disputedPayment; } if (isset($this->evidenceIds)) { $json['evidence_ids'] = $this->evidenceIds; } if (isset($this->cardBrand)) { $json['card_brand'] = $this->cardBrand; } if (isset($this->createdAt)) { $json['created_at'] = $this->createdAt; } if (isset($this->updatedAt)) { $json['updated_at'] = $this->updatedAt; } if (isset($this->brandDisputeId)) { $json['brand_dispute_id'] = $this->brandDisputeId; } if (isset($this->reportedDate)) { $json['reported_date'] = $this->reportedDate; } if (isset($this->reportedAt)) { $json['reported_at'] = $this->reportedAt; } if (isset($this->version)) { $json['version'] = $this->version; } if (isset($this->locationId)) { $json['location_id'] = $this->locationId; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 