<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class Payout implements \JsonSerializable { private $id; private $status; private $locationId; private $createdAt; private $updatedAt; private $amountMoney; private $destination; private $version; private $type; private $payoutFee; private $arrivalDate; public function __construct(string $id, string $locationId) { $this->id = $id; $this->locationId = $locationId; } public function getId(): string { return $this->id; } public function setId(string $id): void { $this->id = $id; } public function getStatus(): ?string { return $this->status; } public function setStatus(?string $status): void { $this->status = $status; } public function getLocationId(): string { return $this->locationId; } public function setLocationId(string $locationId): void { $this->locationId = $locationId; } 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 getAmountMoney(): ?Money { return $this->amountMoney; } public function setAmountMoney(?Money $amountMoney): void { $this->amountMoney = $amountMoney; } public function getDestination(): ?Destination { return $this->destination; } public function setDestination(?Destination $destination): void { $this->destination = $destination; } public function getVersion(): ?int { return $this->version; } public function setVersion(?int $version): void { $this->version = $version; } public function getType(): ?string { return $this->type; } public function setType(?string $type): void { $this->type = $type; } public function getPayoutFee(): ?array { return $this->payoutFee; } public function setPayoutFee(?array $payoutFee): void { $this->payoutFee = $payoutFee; } public function getArrivalDate(): ?string { return $this->arrivalDate; } public function setArrivalDate(?string $arrivalDate): void { $this->arrivalDate = $arrivalDate; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; $json['id'] = $this->id; if (isset($this->status)) { $json['status'] = $this->status; } $json['location_id'] = $this->locationId; if (isset($this->createdAt)) { $json['created_at'] = $this->createdAt; } if (isset($this->updatedAt)) { $json['updated_at'] = $this->updatedAt; } if (isset($this->amountMoney)) { $json['amount_money'] = $this->amountMoney; } if (isset($this->destination)) { $json['destination'] = $this->destination; } if (isset($this->version)) { $json['version'] = $this->version; } if (isset($this->type)) { $json['type'] = $this->type; } if (isset($this->payoutFee)) { $json['payout_fee'] = $this->payoutFee; } if (isset($this->arrivalDate)) { $json['arrival_date'] = $this->arrivalDate; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 