PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 2.4.6
Booking for Appointments and Events Calendar – Amelia v2.4.6
2.4.7 2.4.6 2.4.5 2.4.4 2.4.3 2.4.2 2.4.1 2.4 trunk 1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.15 1.2.16 1.2.17 1.2.18 1.2.19 1.2.2 1.2.20 1.2.21 1.2.22 1.2.23 1.2.24 1.2.25 1.2.26 1.2.27 1.2.28 1.2.29 1.2.3 1.2.30 1.2.31 1.2.32 1.2.33 1.2.34 1.2.35 1.2.36 1.2.37 1.2.38 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.1.3 2.2 2.2.1 2.3
ameliabooking / vendor / stripe / stripe-php / lib / FinancialConnections / Session.php
ameliabooking / vendor / stripe / stripe-php / lib / FinancialConnections Last commit date
Account.php 7 months ago AccountOwner.php 7 months ago AccountOwnership.php 7 months ago Session.php 7 months ago Transaction.php 7 months ago
Session.php
68 lines
1 <?php
2
3 // File generated from our OpenAPI spec
4
5 namespace AmeliaVendor\Stripe\FinancialConnections;
6
7 /**
8 * A Financial Connections Session is the secure way to programmatically launch the client-side Stripe.js modal that lets your users link their accounts.
9 *
10 * @property string $id Unique identifier for the object.
11 * @property string $object String representing the object's type. Objects of the same type share the same value.
12 * @property null|(object{account?: string|\AmeliaVendor\Stripe\Account, customer?: string|\AmeliaVendor\Stripe\Customer, type: string}&\AmeliaVendor\Stripe\StripeObject) $account_holder The account holder for whom accounts are collected in this session.
13 * @property \AmeliaVendor\Stripe\Collection<Account> $accounts The accounts that were collected as part of this Session.
14 * @property string $client_secret A value that will be passed to the client to launch the authentication flow.
15 * @property null|(object{account_subcategories: null|string[], countries: null|string[]}&\AmeliaVendor\Stripe\StripeObject) $filters
16 * @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.
17 * @property string[] $permissions Permissions requested for accounts collected during this session.
18 * @property null|string[] $prefetch Data features requested to be retrieved upon account creation.
19 * @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.
20 */
21 class Session extends \AmeliaVendor\Stripe\ApiResource
22 {
23 const OBJECT_NAME = 'financial_connections.session';
24
25 /**
26 * To launch the Financial Connections authorization flow, create a
27 * <code>Session</code>. The session’s <code>client_secret</code> can be used to
28 * launch the flow using Stripe.js.
29 *
30 * @param null|array{account_holder: array{account?: string, customer?: string, type: string}, expand?: string[], filters?: array{account_subcategories?: string[], countries?: string[]}, permissions: string[], prefetch?: string[], return_url?: string} $params
31 * @param null|array|string $options
32 *
33 * @return Session the created resource
34 *
35 * @throws \AmeliaVendor\Stripe\Exception\ApiErrorException if the request fails
36 */
37 public static function create($params = null, $options = null)
38 {
39 self::_validateParams($params);
40 $url = static::classUrl();
41
42 list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
43 $obj = \AmeliaVendor\Stripe\Util\Util::convertToStripeObject($response->json, $opts);
44 $obj->setLastResponse($response);
45
46 return $obj;
47 }
48
49 /**
50 * Retrieves the details of a Financial Connections <code>Session</code>.
51 *
52 * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
53 * @param null|array|string $opts
54 *
55 * @return Session
56 *
57 * @throws \AmeliaVendor\Stripe\Exception\ApiErrorException if the request fails
58 */
59 public static function retrieve($id, $opts = null)
60 {
61 $opts = \AmeliaVendor\Stripe\Util\RequestOptions::parse($opts);
62 $instance = new static($id, $opts);
63 $instance->refresh();
64
65 return $instance;
66 }
67 }
68