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

stripe / stripe-php / 9276393583

28 May 2024 09:10PM UTC coverage: 65.291% (-0.8%) from 66.119%
9276393583

Pull #1702

github

web-flow
Merge 8a5208ad2 into 7038876e7
Pull Request #1702: Update generated code

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/ReceivedCredit.php
1
<?php
2

3
// File generated from our OpenAPI spec
4

5
namespace Stripe\Treasury;
6

7
/**
8
 * ReceivedCredits represent funds sent to a <a href="https://stripe.com/docs/api#financial_accounts">FinancialAccount</a> (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount.
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 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 string $description An arbitrary string attached to the object. Often useful for displaying to users.
16
 * @property null|string $failure_code Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen.
17
 * @property null|string $financial_account The FinancialAccount that received the funds.
18
 * @property null|string $hosted_regulatory_receipt_url A <a href="https://stripe.com/docs/treasury/moving-money/regulatory-receipts">hosted transaction receipt</a> URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
19
 * @property \Stripe\StripeObject $initiating_payment_method_details
20
 * @property \Stripe\StripeObject $linked_flows
21
 * @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.
22
 * @property string $network The rails used to send the funds.
23
 * @property null|\Stripe\StripeObject $reversal_details Details describing when a ReceivedCredit may be reversed.
24
 * @property string $status Status of the ReceivedCredit. ReceivedCredits are created either <code>succeeded</code> (approved) or <code>failed</code> (declined). If a ReceivedCredit is declined, the failure reason can be found in the <code>failure_code</code> field.
25
 * @property null|string|\Stripe\Treasury\Transaction $transaction The Transaction associated with this object.
26
 */
27
class ReceivedCredit extends \Stripe\ApiResource
28
{
29
    const OBJECT_NAME = 'treasury.received_credit';
30

31
    const FAILURE_CODE_ACCOUNT_CLOSED = 'account_closed';
32
    const FAILURE_CODE_ACCOUNT_FROZEN = 'account_frozen';
33
    const FAILURE_CODE_OTHER = 'other';
34

35
    const NETWORK_ACH = 'ach';
36
    const NETWORK_CARD = 'card';
37
    const NETWORK_STRIPE = 'stripe';
38
    const NETWORK_US_DOMESTIC_WIRE = 'us_domestic_wire';
39

40
    const STATUS_FAILED = 'failed';
41
    const STATUS_SUCCEEDED = 'succeeded';
42

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

54
    /**
55
     * Retrieves the details of an existing ReceivedCredit by passing the unique
56
     * ReceivedCredit ID from the ReceivedCredit list.
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