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

stripe / stripe-php / 9276396492

28 May 2024 09:10PM UTC coverage: 60.416% (-0.9%) from 61.314%
9276396492

Pull #1699

github

web-flow
Merge 23cfc8768 into 8661523be
Pull Request #1699: Update generated code for beta

1026 of 1732 new or added lines in 117 files covered. (59.24%)

15 existing lines in 3 files now uncovered.

3428 of 5674 relevant lines covered (60.42%)

2.17 hits per line

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

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

3
// File generated from our OpenAPI spec
4

5
namespace Stripe\Treasury;
6

7
/**
8
 * You can reverse some <a href="https://stripe.com/docs/api#received_debits">ReceivedDebits</a> depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal.
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 null|string $financial_account The FinancialAccount to reverse funds from.
16
 * @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.
17
 * @property null|\Stripe\StripeObject $linked_flows Other flows linked to a DebitReversal.
18
 * @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.
19
 * @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
20
 * @property string $network The rails used to reverse the funds.
21
 * @property string $received_debit The ReceivedDebit being reversed.
22
 * @property string $status Status of the DebitReversal
23
 * @property \Stripe\StripeObject $status_transitions
24
 * @property null|string|\Stripe\Treasury\Transaction $transaction The Transaction associated with this object.
25
 */
26
class DebitReversal extends \Stripe\ApiResource
27
{
28
    const OBJECT_NAME = 'treasury.debit_reversal';
29

30
    const NETWORK_ACH = 'ach';
31
    const NETWORK_CARD = 'card';
32

33
    const STATUS_FAILED = 'failed';
34
    const STATUS_PROCESSING = 'processing';
35
    const STATUS_SUCCEEDED = 'succeeded';
36

37
    /**
38
     * Reverses a ReceivedDebit and creates a DebitReversal object.
39
     *
40
     * @param null|mixed $params
41
     * @param null|mixed $options
42
     */
NEW
43
    public static function create($params = null, $options = null)
×
44
    {
NEW
45
        self::_validateParams($params);
×
NEW
46
        $url = static::classUrl();
×
NEW
47
        list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
×
NEW
48
        $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
×
NEW
49
        $obj->setLastResponse($response);
×
50

NEW
51
        return $obj;
×
52
    }
53

54
    /**
55
     * Returns a list of DebitReversals.
56
     *
57
     * @param null|mixed $params
58
     * @param null|mixed $opts
59
     */
NEW
60
    public static function all($params = null, $opts = null)
×
61
    {
NEW
62
        return static::_requestPage('/v1/treasury/debit_reversals', \Stripe\Collection::class, $params, $opts);
×
63
    }
64

65
    /**
66
     * Retrieves a DebitReversal object.
67
     *
68
     * @param mixed $id
69
     * @param null|mixed $opts
70
     */
NEW
71
    public static function retrieve($id, $opts = null)
×
72
    {
NEW
73
        $opts = \Stripe\Util\RequestOptions::parse($opts);
×
NEW
74
        $instance = new static($id, $opts);
×
NEW
75
        $instance->refresh();
×
76

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