ISO 3166-1 alpha-2).
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property null|\Stripe\Treasury\FinancialAccountFeatures $features Encodes whether a FinancialAccount has access to a particular Feature, with a status
enum and associated status_details
. Stripe or the platform can control Features via the requested field.
* @property \Stripe\StripeObject[] $financial_addresses The set of credentials that resolve to a FinancialAccount.
* @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|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
* @property null|string[] $pending_features The array of paths to pending Features in the Features hash.
* @property null|\Stripe\StripeObject $platform_restrictions The set of functionalities that the platform can restrict on the FinancialAccount.
* @property null|string[] $restricted_features The array of paths to restricted Features in the Features hash.
* @property string $status The enum specifying what state the account is in.
* @property \Stripe\StripeObject $status_details
* @property string[] $supported_currencies The currencies the FinancialAccount can hold a balance in. Three-letter ISO currency code, in lowercase.
*/
class FinancialAccount extends \Stripe\ApiResource
{
const OBJECT_NAME = 'treasury.financial_account';
use \Stripe\ApiOperations\All;
use \Stripe\ApiOperations\Create;
use \Stripe\ApiOperations\Retrieve;
use \Stripe\ApiOperations\Update;
const STATUS_CLOSED = 'closed';
const STATUS_OPEN = 'open';
/**
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Treasury\FinancialAccount the retrieved financial account
*/
public function retrieveFeatures($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/features';
list($response, $opts) = $this->_request('get', $url, $params, $opts);
$obj = \Stripe\Util\Util::convertToStripeObject($response, $opts);
$obj->setLastResponse($response);
return $obj;
}
/**
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Treasury\FinancialAccount the updated financial account
*/
public function updateFeatures($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/features';
list($response, $opts) = $this->_request('post', $url, $params, $opts);
$this->refreshFrom($response, $opts);
return $this;
}
}