composer package updates
[openemr.git] / vendor / stripe / stripe-php / lib / ApplicationFeeRefund.php
blob91d7e9d2bc665b3988173c9c60490401157bacf2
1 <?php
3 namespace Stripe;
5 /**
6 * Class ApplicationFeeRefund
8 * @property string $id
9 * @property string $object
10 * @property int $amount
11 * @property string $balance_transaction
12 * @property int $created
13 * @property string $currency
14 * @property string $fee
15 * @property StripeObject $metadata
17 * @package Stripe
19 class ApplicationFeeRefund extends ApiResource
22 const OBJECT_NAME = "fee_refund";
24 use ApiOperations\Update {
25 save as protected _save;
28 /**
29 * @return string The API URL for this Stripe refund.
31 public function instanceUrl()
33 $id = $this['id'];
34 $fee = $this['fee'];
35 if (!$id) {
36 throw new Error\InvalidRequest(
37 "Could not determine which URL to request: " .
38 "class instance has invalid ID: $id",
39 null
42 $id = Util\Util::utf8($id);
43 $fee = Util\Util::utf8($fee);
45 $base = ApplicationFee::classUrl();
46 $feeExtn = urlencode($fee);
47 $extn = urlencode($id);
48 return "$base/$feeExtn/refunds/$extn";
51 /**
52 * @param array|string|null $opts
54 * @return ApplicationFeeRefund The saved refund.
56 public function save($opts = null)
58 return $this->_save($opts);