PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.15.4
GiveWP – Donation Plugin and Fundraising Platform v4.15.4
4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 All 255 releases
give / vendor / stripe / stripe-php / lib / ApplicationFeeRefund.php

ApplicationFeeRefund.php in GiveWP – Donation Plugin and Fundraising Platform 4.15.4, at vendor/stripe/stripe-php/lib/ApplicationFeeRefund.php

67 lines 2.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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
9 * fee that has previously been created but not yet refunded. Funds will be
10 * refunded to the Stripe account from which the fee was originally collected.
11 *
12 * Related guide: <a
13 * href="https://stripe.com/docs/connect/destination-charges#refunding-app-fee">Refunding
14 * Application Fees</a>.
15 *
16 * @property string $id Unique identifier for the object.
17 * @property string $object String representing the object's type. Objects of the same type share the same value.
18 * @property int $amount Amount, in %s.
19 * @property null|string|\Stripe\BalanceTransaction $balance_transaction Balance transaction that describes the impact on your account balance.
20 * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
21 * @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>.
22 * @property string|\Stripe\ApplicationFee $fee ID of the application fee that was refunded.
23 * @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.
24 */
25 class ApplicationFeeRefund extends ApiResource
26 {
27 const OBJECT_NAME = 'fee_refund';
28
29 use ApiOperations\Update {
30 save as protected _save;
31 }
32
33 /**
34 * @return string the API URL for this Stripe refund
35 */
36 public function instanceUrl()
37 {
38 $id = $this['id'];
39 $fee = $this['fee'];
40 if (!$id) {
41 throw new Exception\UnexpectedValueException(
42 'Could not determine which URL to request: ' .
43 "class instance has invalid ID: {$id}",
44 null
45 );
46 }
47 $id = Util\Util::utf8($id);
48 $fee = Util\Util::utf8($fee);
49
50 $base = ApplicationFee::classUrl();
51 $feeExtn = \urlencode($fee);
52 $extn = \urlencode($id);
53
54 return "{$base}/{$feeExtn}/refunds/{$extn}";
55 }
56
57 /**
58 * @param null|array|string $opts
59 *
60 * @return ApplicationFeeRefund the saved refund
61 */
62 public function save($opts = null)
63 {
64 return $this->_save($opts);
65 }
66 }
67