From c5093e4d0ca504c0c6dab34fa6454e8d37d0abc2 Mon Sep 17 00:00:00 2001 From: netkas Date: Wed, 29 Jan 2025 15:24:32 -0500 Subject: [PATCH] Added ExternalUrlVerification as a standard object --- .../Standard/ExternalUrlVerification.php | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 src/Socialbox/Objects/Standard/ExternalUrlVerification.php diff --git a/src/Socialbox/Objects/Standard/ExternalUrlVerification.php b/src/Socialbox/Objects/Standard/ExternalUrlVerification.php new file mode 100644 index 0000000..2dcb333 --- /dev/null +++ b/src/Socialbox/Objects/Standard/ExternalUrlVerification.php @@ -0,0 +1,60 @@ +expires = $data['expires']; + $this->url = $data['url']; + } + + /** + * Returns the expiration time of the captcha + * + * @return int The expiration time of the captcha in Unix timestamp format + */ + public function getExpires(): int + { + return $this->expires; + } + + /** + * Returns the URL of the external verification + * + * @return string The URL of the external verification + */ + public function getUrl(): string + { + return $this->url; + } + + /** + * @inheritDoc + */ + public static function fromArray(array $data): ExternalUrlVerification + { + return new self($data); + } + + /** + * @inheritDoc + */ + public function toArray(): array + { + return [ + 'expires' => $this->expires, + 'url' => $this->url + ]; + } + } \ No newline at end of file