• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stripe / stripe-php / 9308533534

30 May 2024 08:07PM UTC coverage: 65.24% (-0.9%) from 66.176%
9308533534

push

github

web-flow
Added PHPDocs for `create`, `update`, `delete`, `all`, `retrieve` methods after moving them out of traits.  (#1701)

* Demagiced crudl operation

* Improvements from codegen#1452

* Updated override to fix indents

1080 of 1682 new or added lines in 106 files covered. (64.21%)

15 existing lines in 3 files now uncovered.

3444 of 5279 relevant lines covered (65.24%)

2.29 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/lib/CustomerSession.php
1
<?php
2

3
// File generated from our OpenAPI spec
4

5
namespace Stripe;
6

7
/**
8
 * A customer session allows you to grant client access to Stripe's frontend SDKs (like StripeJs)
9
 * control over a customer.
10
 *
11
 * @property string $object String representing the object's type. Objects of the same type share the same value.
12
 * @property string $client_secret <p>The client secret of this customer session. Used on the client to set up secure access to the given <code>customer</code>.</p><p>The client secret can be used to provide access to <code>customer</code> from your frontend. It should not be stored, logged, or exposed to anyone other than the relevant customer. Make sure that you have TLS enabled on any page that includes the client secret.</p>
13
 * @property null|\Stripe\StripeObject $components Configuration for the components supported by this customer session.
14
 * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
15
 * @property string|\Stripe\Customer $customer The customer the customer session was created for.
16
 * @property int $expires_at The timestamp at which this customer session will expire.
17
 * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
18
 */
19
class CustomerSession extends ApiResource
20
{
21
    const OBJECT_NAME = 'customer_session';
22

23
    /**
24
     * Creates a customer session object that includes a single-use client secret that
25
     * you can use on your front-end to grant client-side API access for certain
26
     * customer resources.
27
     *
28
     * @param null|array $params
29
     * @param null|array|string $options
30
     *
31
     * @throws \Stripe\Exception\ApiErrorException if the request fails
32
     *
33
     * @return \Stripe\CustomerSession the created resource
34
     */
NEW
35
    public static function create($params = null, $options = null)
×
36
    {
NEW
37
        self::_validateParams($params);
×
NEW
38
        $url = static::classUrl();
×
39

NEW
40
        list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
×
NEW
41
        $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
×
NEW
42
        $obj->setLastResponse($response);
×
43

NEW
44
        return $obj;
×
45
    }
46
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc