Account.php
1 year ago
AccountOwner.php
2 years ago
AccountOwnership.php
2 years ago
Session.php
1 year ago
Transaction.php
1 year ago
Session.php
62 lines
| 1 | <?php |
| 2 | |
| 3 | // File generated from our OpenAPI spec |
| 4 | namespace WPForms\Vendor\Stripe\FinancialConnections; |
| 5 | |
| 6 | /** |
| 7 | * A Financial Connections Session is the secure way to programmatically launch the client-side Stripe.js modal that lets your users link their accounts. |
| 8 | * |
| 9 | * @property string $id Unique identifier for the object. |
| 10 | * @property string $object String representing the object's type. Objects of the same type share the same value. |
| 11 | * @property null|\Stripe\StripeObject $account_holder The account holder for whom accounts are collected in this session. |
| 12 | * @property \Stripe\Collection<\Stripe\FinancialConnections\Account> $accounts The accounts that were collected as part of this Session. |
| 13 | * @property string $client_secret A value that will be passed to the client to launch the authentication flow. |
| 14 | * @property null|\Stripe\StripeObject $filters |
| 15 | * @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. |
| 16 | * @property string[] $permissions Permissions requested for accounts collected during this session. |
| 17 | * @property null|string[] $prefetch Data features requested to be retrieved upon account creation. |
| 18 | * @property null|string $return_url For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. |
| 19 | */ |
| 20 | class Session extends \WPForms\Vendor\Stripe\ApiResource |
| 21 | { |
| 22 | const OBJECT_NAME = 'financial_connections.session'; |
| 23 | /** |
| 24 | * To launch the Financial Connections authorization flow, create a |
| 25 | * <code>Session</code>. The session’s <code>client_secret</code> can be used to |
| 26 | * launch the flow using Stripe.js. |
| 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\FinancialConnections\Session the created resource |
| 34 | */ |
| 35 | public static function create($params = null, $options = null) |
| 36 | { |
| 37 | self::_validateParams($params); |
| 38 | $url = static::classUrl(); |
| 39 | list($response, $opts) = static::_staticRequest('post', $url, $params, $options); |
| 40 | $obj = \WPForms\Vendor\Stripe\Util\Util::convertToStripeObject($response->json, $opts); |
| 41 | $obj->setLastResponse($response); |
| 42 | return $obj; |
| 43 | } |
| 44 | /** |
| 45 | * Retrieves the details of a Financial Connections <code>Session</code>. |
| 46 | * |
| 47 | * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key |
| 48 | * @param null|array|string $opts |
| 49 | * |
| 50 | * @throws \Stripe\Exception\ApiErrorException if the request fails |
| 51 | * |
| 52 | * @return \Stripe\FinancialConnections\Session |
| 53 | */ |
| 54 | public static function retrieve($id, $opts = null) |
| 55 | { |
| 56 | $opts = \WPForms\Vendor\Stripe\Util\RequestOptions::parse($opts); |
| 57 | $instance = new static($id, $opts); |
| 58 | $instance->refresh(); |
| 59 | return $instance; |
| 60 | } |
| 61 | } |
| 62 |