wp-user-avatar
/
third-party
/
vendor
/
stripe
/
stripe-php
/
lib
/
FinancialConnections
/
Transaction.php
wp-user-avatar
/
third-party
/
vendor
/
stripe
/
stripe-php
/
lib
/
FinancialConnections
Last commit date
Account.php
2 months ago
AccountOwner.php
2 months ago
AccountOwnership.php
2 months ago
Session.php
2 months ago
Transaction.php
2 months ago
Transaction.php
61 lines
| 1 | <?php |
| 2 | |
| 3 | // File generated from our OpenAPI spec |
| 4 | namespace ProfilePressVendor\Stripe\FinancialConnections; |
| 5 | |
| 6 | /** |
| 7 | * A Transaction represents a real transaction that affects a Financial Connections Account balance. |
| 8 | * |
| 9 | * @property string $id Unique identifier for the object. |
| 10 | * @property string $object String representing the object's type. Objects of the same type share the same value. |
| 11 | * @property string $account The ID of the Financial Connections Account this transaction belongs to. |
| 12 | * @property int $amount The amount of this transaction, in cents (or local equivalent). |
| 13 | * @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>. |
| 14 | * @property string $description The description of this transaction. |
| 15 | * @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. |
| 16 | * @property string $status The status of the transaction. |
| 17 | * @property \Stripe\StripeObject $status_transitions |
| 18 | * @property int $transacted_at Time at which the transaction was transacted. Measured in seconds since the Unix epoch. |
| 19 | * @property string $transaction_refresh The token of the transaction refresh that last updated or created this transaction. |
| 20 | * @property int $updated Time at which the object was last updated. Measured in seconds since the Unix epoch. |
| 21 | */ |
| 22 | class Transaction extends \ProfilePressVendor\Stripe\ApiResource |
| 23 | { |
| 24 | const OBJECT_NAME = 'financial_connections.transaction'; |
| 25 | const STATUS_PENDING = 'pending'; |
| 26 | const STATUS_POSTED = 'posted'; |
| 27 | const STATUS_VOID = 'void'; |
| 28 | /** |
| 29 | * Returns a list of Financial Connections <code>Transaction</code> objects. |
| 30 | * |
| 31 | * @param null|array $params |
| 32 | * @param null|array|string $opts |
| 33 | * |
| 34 | * @throws \Stripe\Exception\ApiErrorException if the request fails |
| 35 | * |
| 36 | * @return \Stripe\Collection<\Stripe\FinancialConnections\Transaction> of ApiResources |
| 37 | */ |
| 38 | public static function all($params = null, $opts = null) |
| 39 | { |
| 40 | $url = static::classUrl(); |
| 41 | return static::_requestPage($url, \ProfilePressVendor\Stripe\Collection::class, $params, $opts); |
| 42 | } |
| 43 | /** |
| 44 | * Retrieves the details of a Financial Connections <code>Transaction</code>. |
| 45 | * |
| 46 | * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key |
| 47 | * @param null|array|string $opts |
| 48 | * |
| 49 | * @throws \Stripe\Exception\ApiErrorException if the request fails |
| 50 | * |
| 51 | * @return \Stripe\FinancialConnections\Transaction |
| 52 | */ |
| 53 | public static function retrieve($id, $opts = null) |
| 54 | { |
| 55 | $opts = \ProfilePressVendor\Stripe\Util\RequestOptions::parse($opts); |
| 56 | $instance = new static($id, $opts); |
| 57 | $instance->refresh(); |
| 58 | return $instance; |
| 59 | } |
| 60 | } |
| 61 |