<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class CustomerFilter implements \JsonSerializable { private $creationSource; private $createdAt; private $updatedAt; private $emailAddress; private $phoneNumber; private $referenceId; private $groupIds; public function getCreationSource(): ?CustomerCreationSourceFilter { return $this->creationSource; } public function setCreationSource(?CustomerCreationSourceFilter $creationSource): void { $this->creationSource = $creationSource; } public function getCreatedAt(): ?TimeRange { return $this->createdAt; } public function setCreatedAt(?TimeRange $createdAt): void { $this->createdAt = $createdAt; } public function getUpdatedAt(): ?TimeRange { return $this->updatedAt; } public function setUpdatedAt(?TimeRange $updatedAt): void { $this->updatedAt = $updatedAt; } public function getEmailAddress(): ?CustomerTextFilter { return $this->emailAddress; } public function setEmailAddress(?CustomerTextFilter $emailAddress): void { $this->emailAddress = $emailAddress; } public function getPhoneNumber(): ?CustomerTextFilter { return $this->phoneNumber; } public function setPhoneNumber(?CustomerTextFilter $phoneNumber): void { $this->phoneNumber = $phoneNumber; } public function getReferenceId(): ?CustomerTextFilter { return $this->referenceId; } public function setReferenceId(?CustomerTextFilter $referenceId): void { $this->referenceId = $referenceId; } public function getGroupIds(): ?FilterValue { return $this->groupIds; } public function setGroupIds(?FilterValue $groupIds): void { $this->groupIds = $groupIds; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->creationSource)) { $json['creation_source'] = $this->creationSource; } if (isset($this->createdAt)) { $json['created_at'] = $this->createdAt; } if (isset($this->updatedAt)) { $json['updated_at'] = $this->updatedAt; } if (isset($this->emailAddress)) { $json['email_address'] = $this->emailAddress; } if (isset($this->phoneNumber)) { $json['phone_number'] = $this->phoneNumber; } if (isset($this->referenceId)) { $json['reference_id'] = $this->referenceId; } if (isset($this->groupIds)) { $json['group_ids'] = $this->groupIds; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 