CreditReversal.php
6 months ago
DebitReversal.php
6 months ago
FinancialAccount.php
6 months ago
FinancialAccountFeatures.php
6 months ago
InboundTransfer.php
6 months ago
OutboundPayment.php
6 months ago
OutboundTransfer.php
6 months ago
ReceivedCredit.php
6 months ago
ReceivedDebit.php
6 months ago
Transaction.php
6 months ago
TransactionEntry.php
6 months ago
TransactionEntry.php
95 lines
| 1 | <?php |
| 2 | |
| 3 | // File generated from our OpenAPI spec |
| 4 | |
| 5 | namespace AmeliaVendor\Stripe\Treasury; |
| 6 | |
| 7 | /** |
| 8 | * TransactionEntries represent individual units of money movements within a single <a href="https://stripe.com/docs/api#transactions">Transaction</a>. |
| 9 | * |
| 10 | * @property string $id Unique identifier for the object. |
| 11 | * @property string $object String representing the object's type. Objects of the same type share the same value. |
| 12 | * @property (object{cash: int, inbound_pending: int, outbound_pending: int}&\AmeliaVendor\Stripe\StripeObject) $balance_impact Change to a FinancialAccount's balance |
| 13 | * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. |
| 14 | * @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>. |
| 15 | * @property int $effective_at When the TransactionEntry will impact the FinancialAccount's balance. |
| 16 | * @property string $financial_account The FinancialAccount associated with this object. |
| 17 | * @property null|string $flow Token of the flow associated with the TransactionEntry. |
| 18 | * @property null|(object{credit_reversal?: CreditReversal, debit_reversal?: DebitReversal, inbound_transfer?: InboundTransfer, issuing_authorization?: \AmeliaVendor\Stripe\Issuing\Authorization, outbound_payment?: OutboundPayment, outbound_transfer?: OutboundTransfer, received_credit?: ReceivedCredit, received_debit?: ReceivedDebit, type: string}&\AmeliaVendor\Stripe\StripeObject) $flow_details Details of the flow associated with the TransactionEntry. |
| 19 | * @property string $flow_type Type of the flow associated with the TransactionEntry. |
| 20 | * @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. |
| 21 | * @property string|Transaction $transaction The Transaction associated with this object. |
| 22 | * @property string $type The specific money movement that generated the TransactionEntry. |
| 23 | */ |
| 24 | class TransactionEntry extends \AmeliaVendor\Stripe\ApiResource |
| 25 | { |
| 26 | const OBJECT_NAME = 'treasury.transaction_entry'; |
| 27 | |
| 28 | const FLOW_TYPE_CREDIT_REVERSAL = 'credit_reversal'; |
| 29 | const FLOW_TYPE_DEBIT_REVERSAL = 'debit_reversal'; |
| 30 | const FLOW_TYPE_INBOUND_TRANSFER = 'inbound_transfer'; |
| 31 | const FLOW_TYPE_ISSUING_AUTHORIZATION = 'issuing_authorization'; |
| 32 | const FLOW_TYPE_OTHER = 'other'; |
| 33 | const FLOW_TYPE_OUTBOUND_PAYMENT = 'outbound_payment'; |
| 34 | const FLOW_TYPE_OUTBOUND_TRANSFER = 'outbound_transfer'; |
| 35 | const FLOW_TYPE_RECEIVED_CREDIT = 'received_credit'; |
| 36 | const FLOW_TYPE_RECEIVED_DEBIT = 'received_debit'; |
| 37 | |
| 38 | const TYPE_CREDIT_REVERSAL = 'credit_reversal'; |
| 39 | const TYPE_CREDIT_REVERSAL_POSTING = 'credit_reversal_posting'; |
| 40 | const TYPE_DEBIT_REVERSAL = 'debit_reversal'; |
| 41 | const TYPE_INBOUND_TRANSFER = 'inbound_transfer'; |
| 42 | const TYPE_INBOUND_TRANSFER_RETURN = 'inbound_transfer_return'; |
| 43 | const TYPE_ISSUING_AUTHORIZATION_HOLD = 'issuing_authorization_hold'; |
| 44 | const TYPE_ISSUING_AUTHORIZATION_RELEASE = 'issuing_authorization_release'; |
| 45 | const TYPE_OTHER = 'other'; |
| 46 | const TYPE_OUTBOUND_PAYMENT = 'outbound_payment'; |
| 47 | const TYPE_OUTBOUND_PAYMENT_CANCELLATION = 'outbound_payment_cancellation'; |
| 48 | const TYPE_OUTBOUND_PAYMENT_FAILURE = 'outbound_payment_failure'; |
| 49 | const TYPE_OUTBOUND_PAYMENT_POSTING = 'outbound_payment_posting'; |
| 50 | const TYPE_OUTBOUND_PAYMENT_RETURN = 'outbound_payment_return'; |
| 51 | const TYPE_OUTBOUND_TRANSFER = 'outbound_transfer'; |
| 52 | const TYPE_OUTBOUND_TRANSFER_CANCELLATION = 'outbound_transfer_cancellation'; |
| 53 | const TYPE_OUTBOUND_TRANSFER_FAILURE = 'outbound_transfer_failure'; |
| 54 | const TYPE_OUTBOUND_TRANSFER_POSTING = 'outbound_transfer_posting'; |
| 55 | const TYPE_OUTBOUND_TRANSFER_RETURN = 'outbound_transfer_return'; |
| 56 | const TYPE_RECEIVED_CREDIT = 'received_credit'; |
| 57 | const TYPE_RECEIVED_DEBIT = 'received_debit'; |
| 58 | |
| 59 | /** |
| 60 | * Retrieves a list of TransactionEntry objects. |
| 61 | * |
| 62 | * @param null|array{created?: array|int, effective_at?: array|int, ending_before?: string, expand?: string[], financial_account: string, limit?: int, order_by?: string, starting_after?: string, transaction?: string} $params |
| 63 | * @param null|array|string $opts |
| 64 | * |
| 65 | * @return \AmeliaVendor\Stripe\Collection<TransactionEntry> of ApiResources |
| 66 | * |
| 67 | * @throws \AmeliaVendor\Stripe\Exception\ApiErrorException if the request fails |
| 68 | */ |
| 69 | public static function all($params = null, $opts = null) |
| 70 | { |
| 71 | $url = static::classUrl(); |
| 72 | |
| 73 | return static::_requestPage($url, \AmeliaVendor\Stripe\Collection::class, $params, $opts); |
| 74 | } |
| 75 | |
| 76 | /** |
| 77 | * Retrieves a TransactionEntry object. |
| 78 | * |
| 79 | * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key |
| 80 | * @param null|array|string $opts |
| 81 | * |
| 82 | * @return TransactionEntry |
| 83 | * |
| 84 | * @throws \AmeliaVendor\Stripe\Exception\ApiErrorException if the request fails |
| 85 | */ |
| 86 | public static function retrieve($id, $opts = null) |
| 87 | { |
| 88 | $opts = \AmeliaVendor\Stripe\Util\RequestOptions::parse($opts); |
| 89 | $instance = new static($id, $opts); |
| 90 | $instance->refresh(); |
| 91 | |
| 92 | return $instance; |
| 93 | } |
| 94 | } |
| 95 |