<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class BulkCreateVendorsRequest implements \JsonSerializable { private $vendors; public function __construct(array $vendors) { $this->vendors = $vendors; } public function getVendors(): array { return $this->vendors; } public function setVendors(array $vendors): void { $this->vendors = $vendors; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; $json['vendors'] = $this->vendors; $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 