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

stripe / stripe-php / 10411677063

15 Aug 2024 10:54PM UTC coverage: 59.437% (-0.07%) from 59.508%
10411677063

Pull #1738

github

web-flow
Merge 059181092 into cf55a50d3
Pull Request #1738: Update generated code for beta

0 of 7 new or added lines in 2 files covered. (0.0%)

77 existing lines in 10 files now uncovered.

3486 of 5865 relevant lines covered (59.44%)

2.16 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 Stripe's frontend SDKs (like Stripe.js) client-side access
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
     */
UNCOV
35
    public static function create($params = null, $options = null)
×
36
    {
UNCOV
37
        self::_validateParams($params);
×
UNCOV
38
        $url = static::classUrl();
×
39

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

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

© 2024 Coveralls, Inc