<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class PauseSubscriptionRequest implements \JsonSerializable { private $pauseEffectiveDate; private $pauseCycleDuration; private $resumeEffectiveDate; private $resumeChangeTiming; private $pauseReason; public function getPauseEffectiveDate(): ?string { return $this->pauseEffectiveDate; } public function setPauseEffectiveDate(?string $pauseEffectiveDate): void { $this->pauseEffectiveDate = $pauseEffectiveDate; } public function getPauseCycleDuration(): ?int { return $this->pauseCycleDuration; } public function setPauseCycleDuration(?int $pauseCycleDuration): void { $this->pauseCycleDuration = $pauseCycleDuration; } public function getResumeEffectiveDate(): ?string { return $this->resumeEffectiveDate; } public function setResumeEffectiveDate(?string $resumeEffectiveDate): void { $this->resumeEffectiveDate = $resumeEffectiveDate; } public function getResumeChangeTiming(): ?string { return $this->resumeChangeTiming; } public function setResumeChangeTiming(?string $resumeChangeTiming): void { $this->resumeChangeTiming = $resumeChangeTiming; } public function getPauseReason(): ?string { return $this->pauseReason; } public function setPauseReason(?string $pauseReason): void { $this->pauseReason = $pauseReason; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->pauseEffectiveDate)) { $json['pause_effective_date'] = $this->pauseEffectiveDate; } if (isset($this->pauseCycleDuration)) { $json['pause_cycle_duration'] = $this->pauseCycleDuration; } if (isset($this->resumeEffectiveDate)) { $json['resume_effective_date'] = $this->resumeEffectiveDate; } if (isset($this->resumeChangeTiming)) { $json['resume_change_timing'] = $this->resumeChangeTiming; } if (isset($this->pauseReason)) { $json['pause_reason'] = $this->pauseReason; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 