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

stripe / stripe-php / 9308560111

30 May 2024 08:09PM UTC coverage: 60.343% (-1.0%) from 61.377%
9308560111

Pull #1699

github

web-flow
Merge 73f733810 into 3533dc330
Pull Request #1699: Update generated code for beta

1080 of 1830 new or added lines in 117 files covered. (59.02%)

15 existing lines in 3 files now uncovered.

3486 of 5777 relevant lines covered (60.34%)

2.19 hits per line

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

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

3
// File generated from our OpenAPI spec
4

5
namespace Stripe\Treasury;
6

7
/**
8
 * ReceivedDebits represent funds pulled from a <a href="https://stripe.com/docs/api#financial_accounts">FinancialAccount</a>. These 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 ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen.
17
 * @property null|string $financial_account The FinancialAccount that funds were pulled from.
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 null|\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 network used for the ReceivedDebit.
23
 * @property null|\Stripe\StripeObject $network_details Details specific to the money movement rails.
24
 * @property null|\Stripe\StripeObject $reversal_details Details describing when a ReceivedDebit might be reversed.
25
 * @property string $status Status of the ReceivedDebit. ReceivedDebits are created with a status of either <code>succeeded</code> (approved) or <code>failed</code> (declined). The failure reason can be found under the <code>failure_code</code>.
26
 * @property null|string|\Stripe\Treasury\Transaction $transaction The Transaction associated with this object.
27
 */
28
class ReceivedDebit extends \Stripe\ApiResource
29
{
30
    const OBJECT_NAME = 'treasury.received_debit';
31

32
    const FAILURE_CODE_ACCOUNT_CLOSED = 'account_closed';
33
    const FAILURE_CODE_ACCOUNT_FROZEN = 'account_frozen';
34
    const FAILURE_CODE_INSUFFICIENT_FUNDS = 'insufficient_funds';
35
    const FAILURE_CODE_OTHER = 'other';
36

37
    const NETWORK_ACH = 'ach';
38
    const NETWORK_CARD = 'card';
39
    const NETWORK_STRIPE = 'stripe';
40

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

44
    /**
45
     * Returns a list of ReceivedDebits.
46
     *
47
     * @param null|array $params
48
     * @param null|array|string $opts
49
     *
50
     * @throws \Stripe\Exception\ApiErrorException if the request fails
51
     *
52
     * @return \Stripe\Collection<\Stripe\Treasury\ReceivedDebit> of ApiResources
53
     */
NEW
54
    public static function all($params = null, $opts = null)
×
55
    {
NEW
56
        $url = static::classUrl();
×
57

NEW
58
        return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
×
59
    }
60

61
    /**
62
     * Retrieves the details of an existing ReceivedDebit by passing the unique
63
     * ReceivedDebit ID from the ReceivedDebit list.
64
     *
65
     * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
66
     * @param null|array|string $opts
67
     *
68
     * @throws \Stripe\Exception\ApiErrorException if the request fails
69
     *
70
     * @return \Stripe\Treasury\ReceivedDebit
71
     */
NEW
72
    public static function retrieve($id, $opts = null)
×
73
    {
NEW
74
        $opts = \Stripe\Util\RequestOptions::parse($opts);
×
NEW
75
        $instance = new static($id, $opts);
×
NEW
76
        $instance->refresh();
×
77

NEW
78
        return $instance;
×
79
    }
80
}
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