composer package updates
[openemr.git] / vendor / stripe / stripe-php / lib / TransferReversal.php
blob3c8a7e2e52bfe062782d9b427450165093b420b5
1 <?php
3 namespace Stripe;
5 /**
6 * Class TransferReversal
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 StripeObject $metadata
15 * @property string $transfer
17 * @package Stripe
19 class TransferReversal extends ApiResource
22 const OBJECT_NAME = "transfer_reversal";
24 use ApiOperations\Update {
25 save as protected _save;
28 /**
29 * @return string The API URL for this Stripe transfer reversal.
31 public function instanceUrl()
33 $id = $this['id'];
34 $transfer = $this['transfer'];
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 $transfer = Util\Util::utf8($transfer);
45 $base = Transfer::classUrl();
46 $transferExtn = urlencode($transfer);
47 $extn = urlencode($id);
48 return "$base/$transferExtn/reversals/$extn";
51 /**
52 * @param array|string|null $opts
54 * @return TransferReversal The saved reversal.
56 public function save($opts = null)
58 return $this->_save($opts);