From 75160b12821f7f4299cce7f0b69c83c1502ae071 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Mon, 27 May 2024 13:08:29 +0200 Subject: 2024-02-19 upstream --- .../stripe-php/lib/TestHelpers/TestClock.php | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 vendor/stripe/stripe-php/lib/TestHelpers/TestClock.php (limited to 'vendor/stripe/stripe-php/lib/TestHelpers/TestClock.php') diff --git a/vendor/stripe/stripe-php/lib/TestHelpers/TestClock.php b/vendor/stripe/stripe-php/lib/TestHelpers/TestClock.php new file mode 100644 index 0000000..849529b --- /dev/null +++ b/vendor/stripe/stripe-php/lib/TestHelpers/TestClock.php @@ -0,0 +1,53 @@ +true if the object exists in live mode or the value false if the object exists in test mode. + * @property null|string $name The custom name supplied at creation. + * @property string $status The status of the Test Clock. + */ +class TestClock extends \Stripe\ApiResource +{ + const OBJECT_NAME = 'test_helpers.test_clock'; + + use \Stripe\ApiOperations\All; + use \Stripe\ApiOperations\Create; + use \Stripe\ApiOperations\Delete; + use \Stripe\ApiOperations\Retrieve; + + const STATUS_ADVANCING = 'advancing'; + const STATUS_INTERNAL_FAILURE = 'internal_failure'; + const STATUS_READY = 'ready'; + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\TestHelpers\TestClock the advanced test clock + */ + public function advance($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/advance'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } +} -- cgit v1.2.3