• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stripe / stripe-php / 9275776897

28 May 2024 08:15PM UTC coverage: 65.291% (-0.8%) from 66.119%
9275776897

Pull #1701

github

web-flow
Merge a23205ff7 into 7038876e7
Pull Request #1701: Demagiced crudl operation

1026 of 1594 new or added lines in 106 files covered. (64.37%)

15 existing lines in 3 files now uncovered.

3386 of 5186 relevant lines covered (65.29%)

2.26 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/lib/Treasury/Transaction.php
1
<?php
2

3
// File generated from our OpenAPI spec
4

5
namespace Stripe\Treasury;
6

7
/**
8
 * Transactions represent changes to a <a href="https://stripe.com/docs/api#financial_accounts">FinancialAccount's</a> balance.
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 int $amount Amount (in cents) transferred.
13
 * @property \Stripe\StripeObject $balance_impact Change to a FinancialAccount's balance
14
 * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
15
 * @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>.
16
 * @property string $description An arbitrary string attached to the object. Often useful for displaying to users.
17
 * @property null|\Stripe\Collection<\Stripe\Treasury\TransactionEntry> $entries A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints.
18
 * @property string $financial_account The FinancialAccount associated with this object.
19
 * @property null|string $flow ID of the flow that created the Transaction.
20
 * @property null|\Stripe\StripeObject $flow_details Details of the flow that created the Transaction.
21
 * @property string $flow_type Type of the flow that created the Transaction.
22
 * @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.
23
 * @property string $status Status of the Transaction.
24
 * @property \Stripe\StripeObject $status_transitions
25
 */
26
class Transaction extends \Stripe\ApiResource
27
{
28
    const OBJECT_NAME = 'treasury.transaction';
29

30
    const FLOW_TYPE_CREDIT_REVERSAL = 'credit_reversal';
31
    const FLOW_TYPE_DEBIT_REVERSAL = 'debit_reversal';
32
    const FLOW_TYPE_INBOUND_TRANSFER = 'inbound_transfer';
33
    const FLOW_TYPE_ISSUING_AUTHORIZATION = 'issuing_authorization';
34
    const FLOW_TYPE_OTHER = 'other';
35
    const FLOW_TYPE_OUTBOUND_PAYMENT = 'outbound_payment';
36
    const FLOW_TYPE_OUTBOUND_TRANSFER = 'outbound_transfer';
37
    const FLOW_TYPE_RECEIVED_CREDIT = 'received_credit';
38
    const FLOW_TYPE_RECEIVED_DEBIT = 'received_debit';
39

40
    const STATUS_OPEN = 'open';
41
    const STATUS_POSTED = 'posted';
42
    const STATUS_VOID = 'void';
43

44
    /**
45
     * Retrieves a list of Transaction objects.
46
     *
47
     * @param null|mixed $params
48
     * @param null|mixed $opts
49
     */
NEW
50
    public static function all($params = null, $opts = null)
×
51
    {
NEW
52
        return static::_requestPage('/v1/treasury/transactions', \Stripe\Collection::class, $params, $opts);
×
53
    }
54

55
    /**
56
     * Retrieves the details of an existing Transaction.
57
     *
58
     * @param mixed $id
59
     * @param null|mixed $opts
60
     */
NEW
61
    public static function retrieve($id, $opts = null)
×
62
    {
NEW
63
        $opts = \Stripe\Util\RequestOptions::parse($opts);
×
NEW
64
        $instance = new static($id, $opts);
×
NEW
65
        $instance->refresh();
×
66

NEW
67
        return $instance;
×
68
    }
69
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2024 Coveralls, Inc