ISO currency code, in lowercase. Must be a supported currency.
* @property string $description The description of this transaction.
* @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 $status The status of the transaction.
* @property \Stripe\StripeObject $status_transitions
* @property int $transacted_at Time at which the transaction was transacted. Measured in seconds since the Unix epoch.
* @property string $transaction_refresh The token of the transaction refresh that last updated or created this transaction.
* @property int $updated Time at which the object was last updated. Measured in seconds since the Unix epoch.
*/
class Transaction extends \Stripe\ApiResource
{
const OBJECT_NAME = 'financial_connections.transaction';
const STATUS_PENDING = 'pending';
const STATUS_POSTED = 'posted';
const STATUS_VOID = 'void';
/**
* Returns a list of Financial Connections Transaction objects.
*
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\FinancialConnections\Transaction> of ApiResources
*/
public static function all($params = null, $opts = null)
{
$url = static::classUrl();
return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
}
/**
* Retrieves the details of a Financial Connections Transaction.
*
* @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\FinancialConnections\Transaction
*/
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();
return $instance;
}
}