From 75160b12821f7f4299cce7f0b69c83c1502ae071 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Mon, 27 May 2024 13:08:29 +0200 Subject: 2024-02-19 upstream --- .../lib/FinancialConnections/Account.php | 84 ++++++++++++++++++++++ .../lib/FinancialConnections/AccountOwner.php | 20 ++++++ .../lib/FinancialConnections/AccountOwnership.php | 18 +++++ .../lib/FinancialConnections/Session.php | 27 +++++++ 4 files changed, 149 insertions(+) create mode 100644 vendor/stripe/stripe-php/lib/FinancialConnections/Account.php create mode 100644 vendor/stripe/stripe-php/lib/FinancialConnections/AccountOwner.php create mode 100644 vendor/stripe/stripe-php/lib/FinancialConnections/AccountOwnership.php create mode 100644 vendor/stripe/stripe-php/lib/FinancialConnections/Session.php (limited to 'vendor/stripe/stripe-php/lib/FinancialConnections') diff --git a/vendor/stripe/stripe-php/lib/FinancialConnections/Account.php b/vendor/stripe/stripe-php/lib/FinancialConnections/Account.php new file mode 100644 index 0000000..13d6724 --- /dev/null +++ b/vendor/stripe/stripe-php/lib/FinancialConnections/Account.php @@ -0,0 +1,84 @@ +subcategory. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string $display_name A human-readable name that has been assigned to this account, either by the account holder or by the institution. + * @property string $institution_name The name of the institution that holds this account. + * @property null|string $last4 The last 4 digits of the account number. If present, this will be 4 numeric characters. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property null|string|\Stripe\FinancialConnections\AccountOwnership $ownership The most recent information about the account's owners. + * @property null|\Stripe\StripeObject $ownership_refresh The state of the most recent attempt to refresh the account owners. + * @property null|string[] $permissions The list of permissions granted by this account. + * @property string $status The status of the link to the account. + * @property string $subcategory

If category is cash, one of:

- checking - savings - other

If category is credit, one of:

- mortgage - line_of_credit - credit_card - other

If category is investment or other, this will be other.

+ * @property string[] $supported_payment_method_types The PaymentMethod type(s) that can be created from this account. + */ +class Account extends \Stripe\ApiResource +{ + const OBJECT_NAME = 'financial_connections.account'; + + use \Stripe\ApiOperations\Retrieve; + + const CATEGORY_CASH = 'cash'; + const CATEGORY_CREDIT = 'credit'; + const CATEGORY_INVESTMENT = 'investment'; + const CATEGORY_OTHER = 'other'; + + const STATUS_ACTIVE = 'active'; + const STATUS_DISCONNECTED = 'disconnected'; + const STATUS_INACTIVE = 'inactive'; + + const SUBCATEGORY_CHECKING = 'checking'; + const SUBCATEGORY_CREDIT_CARD = 'credit_card'; + const SUBCATEGORY_LINE_OF_CREDIT = 'line_of_credit'; + const SUBCATEGORY_MORTGAGE = 'mortgage'; + const SUBCATEGORY_OTHER = 'other'; + const SUBCATEGORY_SAVINGS = 'savings'; + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\FinancialConnections\Account the disconnected account + */ + public function disconnect($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/disconnect'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\FinancialConnections\Account the refreshed account + */ + public function refresh($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/refresh'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } +} diff --git a/vendor/stripe/stripe-php/lib/FinancialConnections/AccountOwner.php b/vendor/stripe/stripe-php/lib/FinancialConnections/AccountOwner.php new file mode 100644 index 0000000..0ab0ca9 --- /dev/null +++ b/vendor/stripe/stripe-php/lib/FinancialConnections/AccountOwner.php @@ -0,0 +1,20 @@ + $owners A paginated list of owners for this account. + */ +class AccountOwnership extends \Stripe\ApiResource +{ + const OBJECT_NAME = 'financial_connections.account_ownership'; +} diff --git a/vendor/stripe/stripe-php/lib/FinancialConnections/Session.php b/vendor/stripe/stripe-php/lib/FinancialConnections/Session.php new file mode 100644 index 0000000..2a0dc26 --- /dev/null +++ b/vendor/stripe/stripe-php/lib/FinancialConnections/Session.php @@ -0,0 +1,27 @@ + $accounts The accounts that were collected as part of this Session. + * @property string $client_secret A value that will be passed to the client to launch the authentication flow. + * @property \Stripe\StripeObject $filters + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property string[] $permissions Permissions requested for accounts collected during this session. + * @property 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. + */ +class Session extends \Stripe\ApiResource +{ + const OBJECT_NAME = 'financial_connections.session'; + + use \Stripe\ApiOperations\Create; + use \Stripe\ApiOperations\Retrieve; +} -- cgit v1.2.3