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