Файл: Main Website Files/assets/libraries/stripe-php-2.2.0/lib/Refund.php
Строк: 36
<?php
namespace Stripe;
class Refund extends ApiResource
{
/**
* @return string The API URL for this Stripe refund.
*/
public function instanceUrl()
{
$id = $this['id'];
$charge = $this['charge'];
if (!$id) {
throw new ErrorInvalidRequest(
"Could not determine which URL to request: " .
"class instance has invalid ID: $id",
null
);
}
$id = UtilUtil::utf8($id);
$charge = UtilUtil::utf8($charge);
$base = Charge::classUrl();
$chargeExtn = urlencode($charge);
$extn = urlencode($id);
return "$base/$chargeExtn/refunds/$extn";
}
/**
* @param array|string|null $opts
*
* @return Refund The saved refund.
*/
public function save($opts = null)
{
return $this->_save($opts);
}
}