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

stripe / stripe-php / #7087

pending completion
#7087

push

php-coveralls

pakrym-stripe
Bump version to 10.14.0-beta.2

1831 of 2732 relevant lines covered (67.02%)

3.81 hits per line

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

66.67
/lib/ApplicationFeeRefund.php
1
<?php
2

3
// File generated from our OpenAPI spec
4

5
namespace Stripe;
6

7
/**
8
 * <code>Application Fee Refund</code> objects allow you to refund an application fee that
9
 * has previously been created but not yet refunded. Funds will be refunded to
10
 * the Stripe account from which the fee was originally collected.
11
 *
12
 * Related guide: <a href="https://stripe.com/docs/connect/destination-charges#refunding-app-fee">Refunding application fees</a>
13
 *
14
 * @property string $id Unique identifier for the object.
15
 * @property string $object String representing the object's type. Objects of the same type share the same value.
16
 * @property int $amount Amount, in %s.
17
 * @property null|string|\Stripe\BalanceTransaction $balance_transaction Balance transaction that describes the impact on your account balance.
18
 * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
19
 * @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>.
20
 * @property string|\Stripe\ApplicationFee $fee ID of the application fee that was refunded.
21
 * @property null|\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.
22
 */
23
class ApplicationFeeRefund extends ApiResource
24
{
25
    const OBJECT_NAME = 'fee_refund';
26

27
    use ApiOperations\Update {
28
        save as protected _save;
29
    }
30

31
    /**
32
     * @return string the API URL for this Stripe refund
33
     */
34
    public function instanceUrl()
35
    {
36
        $id = $this['id'];
1✔
37
        $fee = $this['fee'];
1✔
38
        if (!$id) {
1✔
39
            throw new Exception\UnexpectedValueException(
×
40
                'Could not determine which URL to request: ' .
×
41
                "class instance has invalid ID: {$id}",
×
42
                null
×
43
            );
×
44
        }
45
        $id = Util\Util::utf8($id);
1✔
46
        $fee = Util\Util::utf8($fee);
1✔
47

48
        $base = ApplicationFee::classUrl();
1✔
49
        $feeExtn = \urlencode($fee);
1✔
50
        $extn = \urlencode($id);
1✔
51

52
        return "{$base}/{$feeExtn}/refunds/{$extn}";
1✔
53
    }
54

55
    /**
56
     * @param null|array|string $opts
57
     *
58
     * @return ApplicationFeeRefund the saved refund
59
     */
60
    public function save($opts = null)
61
    {
62
        return $this->_save($opts);
1✔
63
    }
64
}
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

© 2026 Coveralls, Inc