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

stripe / stripe-php / 9308609267

30 May 2024 08:13PM UTC coverage: 60.343% (-1.0%) from 61.377%
9308609267

push

github

web-flow
Merge pull request #1699 from stripe/latest-codegen-beta

Update generated code for beta

1080 of 1830 new or added lines in 117 files covered. (59.02%)

15 existing lines in 3 files now uncovered.

3486 of 5777 relevant lines covered (60.34%)

2.19 hits per line

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

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

3
// File generated from our OpenAPI spec
4

5
namespace Stripe;
6

7
/**
8
 * An AccountSession allows a Connect platform to grant access to a connected account in Connect embedded components.
9
 *
10
 * We recommend that you create an AccountSession each time you need to display an embedded component
11
 * to your user. Do not save AccountSessions to your database as they expire relatively
12
 * quickly, and cannot be used more than once.
13
 *
14
 * Related guide: <a href="https://stripe.com/docs/connect/get-started-connect-embedded-components">Connect embedded components</a>
15
 *
16
 * @property string $object String representing the object's type. Objects of the same type share the same value.
17
 * @property string $account The ID of the account the AccountSession was created for
18
 * @property string $client_secret <p>The client secret of this AccountSession. Used on the client to set up secure access to the given <code>account</code>.</p><p>The client secret can be used to provide access to <code>account</code> from your frontend. It should not be stored, logged, or exposed to anyone other than the connected account. Make sure that you have TLS enabled on any page that includes the client secret.</p><p>Refer to our docs to <a href="https://stripe.com/docs/connect/get-started-connect-embedded-components">setup Connect embedded components</a> and learn about how <code>client_secret</code> should be handled.</p>
19
 * @property \Stripe\StripeObject $components
20
 * @property int $expires_at The timestamp at which this AccountSession will expire.
21
 * @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.
22
 */
23
class AccountSession extends ApiResource
24
{
25
    const OBJECT_NAME = 'account_session';
26

27
    /**
28
     * Creates a AccountSession object that includes a single-use token that the
29
     * platform can use on their front-end to grant client-side API access.
30
     *
31
     * @param null|array $params
32
     * @param null|array|string $options
33
     *
34
     * @throws \Stripe\Exception\ApiErrorException if the request fails
35
     *
36
     * @return \Stripe\AccountSession the created resource
37
     */
NEW
38
    public static function create($params = null, $options = null)
×
39
    {
NEW
40
        self::_validateParams($params);
×
NEW
41
        $url = static::classUrl();
×
42

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

NEW
47
        return $obj;
×
48
    }
49
}
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