<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class QuickPay implements \JsonSerializable { private $name; private $priceMoney; private $locationId; public function __construct(string $name, Money $priceMoney, string $locationId) { $this->name = $name; $this->priceMoney = $priceMoney; $this->locationId = $locationId; } public function getName(): string { return $this->name; } public function setName(string $name): void { $this->name = $name; } public function getPriceMoney(): Money { return $this->priceMoney; } public function setPriceMoney(Money $priceMoney): void { $this->priceMoney = $priceMoney; } public function getLocationId(): string { return $this->locationId; } public function setLocationId(string $locationId): void { $this->locationId = $locationId; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; $json['name'] = $this->name; $json['price_money'] = $this->priceMoney; $json['location_id'] = $this->locationId; $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 