summaryrefslogtreecommitdiffstats
path: root/vendor/stripe/stripe-php/lib/Service/Checkout
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2024-05-27 13:08:29 +0200
committerAnton Luka Šijanec <anton@sijanec.eu>2024-05-27 13:08:29 +0200
commit75160b12821f7f4299cce7f0b69c83c1502ae071 (patch)
tree27e25e4ccaef45f0c58b22831164050d1af1d4db /vendor/stripe/stripe-php/lib/Service/Checkout
parentprvi-commit (diff)
download1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.gz
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.bz2
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.lz
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.xz
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.zst
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.zip
Diffstat (limited to 'vendor/stripe/stripe-php/lib/Service/Checkout')
-rw-r--r--vendor/stripe/stripe-php/lib/Service/Checkout/CheckoutServiceFactory.php50
-rw-r--r--vendor/stripe/stripe-php/lib/Service/Checkout/SessionService.php165
2 files changed, 117 insertions, 98 deletions
diff --git a/vendor/stripe/stripe-php/lib/Service/Checkout/CheckoutServiceFactory.php b/vendor/stripe/stripe-php/lib/Service/Checkout/CheckoutServiceFactory.php
index bb26a83..26a5ee8 100644
--- a/vendor/stripe/stripe-php/lib/Service/Checkout/CheckoutServiceFactory.php
+++ b/vendor/stripe/stripe-php/lib/Service/Checkout/CheckoutServiceFactory.php
@@ -1,25 +1,25 @@
-<?php
-
-// File generated from our OpenAPI spec
-
-namespace Stripe\Service\Checkout;
-
-/**
- * Service factory class for API resources in the Checkout namespace.
- *
- * @property SessionService $sessions
- */
-class CheckoutServiceFactory extends \Stripe\Service\AbstractServiceFactory
-{
- /**
- * @var array<string, string>
- */
- private static $classMap = [
- 'sessions' => SessionService::class,
- ];
-
- protected function getServiceClass($name)
- {
- return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
- }
-}
+<?php
+
+// File generated from our OpenAPI spec
+
+namespace Stripe\Service\Checkout;
+
+/**
+ * Service factory class for API resources in the Checkout namespace.
+ *
+ * @property SessionService $sessions
+ */
+class CheckoutServiceFactory extends \Stripe\Service\AbstractServiceFactory
+{
+ /**
+ * @var array<string, string>
+ */
+ private static $classMap = [
+ 'sessions' => SessionService::class,
+ ];
+
+ protected function getServiceClass($name)
+ {
+ return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
+ }
+}
diff --git a/vendor/stripe/stripe-php/lib/Service/Checkout/SessionService.php b/vendor/stripe/stripe-php/lib/Service/Checkout/SessionService.php
index 9da3788..13c9fbf 100644
--- a/vendor/stripe/stripe-php/lib/Service/Checkout/SessionService.php
+++ b/vendor/stripe/stripe-php/lib/Service/Checkout/SessionService.php
@@ -1,73 +1,92 @@
-<?php
-
-// File generated from our OpenAPI spec
-
-namespace Stripe\Service\Checkout;
-
-class SessionService extends \Stripe\Service\AbstractService
-{
- /**
- * Returns a list of Checkout Sessions.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/checkout/sessions', $params, $opts);
- }
-
- /**
- * When retrieving a Checkout Session, there is an includable
- * <strong>line_items</strong> property containing the first handful of those
- * items. There is also a URL where you can retrieve the full (paginated) list of
- * line items.
- *
- * @param string $parentId
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection
- */
- public function allLineItems($parentId, $params = null, $opts = null)
- {
- return $this->requestCollection('get', $this->buildPath('/v1/checkout/sessions/%s/line_items', $parentId), $params, $opts);
- }
-
- /**
- * Creates a Session object.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Checkout\Session
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/checkout/sessions', $params, $opts);
- }
-
- /**
- * Retrieves a Session object.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Checkout\Session
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/checkout/sessions/%s', $id), $params, $opts);
- }
-}
+<?php
+
+// File generated from our OpenAPI spec
+
+namespace Stripe\Service\Checkout;
+
+class SessionService extends \Stripe\Service\AbstractService
+{
+ /**
+ * Returns a list of Checkout Sessions.
+ *
+ * @param null|array $params
+ * @param null|array|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Checkout\Session>
+ */
+ public function all($params = null, $opts = null)
+ {
+ return $this->requestCollection('get', '/v1/checkout/sessions', $params, $opts);
+ }
+
+ /**
+ * When retrieving a Checkout Session, there is an includable
+ * <strong>line_items</strong> property containing the first handful of those
+ * items. There is also a URL where you can retrieve the full (paginated) list of
+ * line items.
+ *
+ * @param string $parentId
+ * @param null|array $params
+ * @param null|array|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\LineItem>
+ */
+ public function allLineItems($parentId, $params = null, $opts = null)
+ {
+ return $this->requestCollection('get', $this->buildPath('/v1/checkout/sessions/%s/line_items', $parentId), $params, $opts);
+ }
+
+ /**
+ * Creates a Session object.
+ *
+ * @param null|array $params
+ * @param null|array|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Checkout\Session
+ */
+ public function create($params = null, $opts = null)
+ {
+ return $this->request('post', '/v1/checkout/sessions', $params, $opts);
+ }
+
+ /**
+ * A Session can be expired when it is in one of these statuses: <code>open</code>.
+ *
+ * After it expires, a customer can’t complete a Session and customers loading the
+ * Session see a message saying the Session is expired.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|array|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Checkout\Session
+ */
+ public function expire($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/checkout/sessions/%s/expire', $id), $params, $opts);
+ }
+
+ /**
+ * Retrieves a Session object.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|array|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Checkout\Session
+ */
+ public function retrieve($id, $params = null, $opts = null)
+ {
+ return $this->request('get', $this->buildPath('/v1/checkout/sessions/%s', $id), $params, $opts);
+ }
+}