<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class BatchRetrieveOrdersRequest implements \JsonSerializable { private $locationId; private $orderIds; public function __construct(array $orderIds) { $this->orderIds = $orderIds; } public function getLocationId(): ?string { return $this->locationId; } public function setLocationId(?string $locationId): void { $this->locationId = $locationId; } public function getOrderIds(): array { return $this->orderIds; } public function setOrderIds(array $orderIds): void { $this->orderIds = $orderIds; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->locationId)) { $json['location_id'] = $this->locationId; } $json['order_ids'] = $this->orderIds; $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 