| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- <?php
- // File generated from our OpenAPI spec
- namespace Stripe\Service\Treasury;
- /**
- * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
- * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
- */
- class FinancialAccountService extends \Stripe\Service\AbstractService
- {
- /**
- * Returns a list of FinancialAccounts.
- *
- * @param null|array $params
- * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\Treasury\FinancialAccount>
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/treasury/financial_accounts', $params, $opts);
- }
- /**
- * Creates a new FinancialAccount. For now, each connected account can only have
- * one FinancialAccount.
- *
- * @param null|array $params
- * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Treasury\FinancialAccount
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/treasury/financial_accounts', $params, $opts);
- }
- /**
- * Retrieves the details of a FinancialAccount.
- *
- * @param string $id
- * @param null|array $params
- * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Treasury\FinancialAccount
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/treasury/financial_accounts/%s', $id), $params, $opts);
- }
- /**
- * Retrieves Features information associated with the FinancialAccount.
- *
- * @param string $id
- * @param null|array $params
- * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Treasury\FinancialAccountFeatures
- */
- public function retrieveFeatures($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/treasury/financial_accounts/%s/features', $id), $params, $opts);
- }
- /**
- * Updates the details of a FinancialAccount.
- *
- * @param string $id
- * @param null|array $params
- * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Treasury\FinancialAccount
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/treasury/financial_accounts/%s', $id), $params, $opts);
- }
- /**
- * Updates the Features associated with a FinancialAccount.
- *
- * @param string $id
- * @param null|array $params
- * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Treasury\FinancialAccountFeatures
- */
- public function updateFeatures($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/treasury/financial_accounts/%s/features', $id), $params, $opts);
- }
- }
|