mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-05 21:26:14 +01:00
643c1c4a52
Summary: Ref T2787. This brings us up to date. Test Plan: `git clone` Reviewers: btrahan, chad Reviewed By: chad Subscribers: epriestley Maniphest Tasks: T2787 Differential Revision: https://secure.phabricator.com/D9916
36 lines
820 B
PHP
36 lines
820 B
PHP
<?php
|
|
|
|
class Stripe_Refund extends Stripe_ApiResource
|
|
{
|
|
/**
|
|
* @return string The API URL for this Stripe refund.
|
|
*/
|
|
public function instanceUrl()
|
|
{
|
|
$id = $this['id'];
|
|
$charge = $this['charge'];
|
|
if (!$id) {
|
|
throw new Stripe_InvalidRequestError(
|
|
"Could not determine which URL to request: " .
|
|
"class instance has invalid ID: $id",
|
|
null
|
|
);
|
|
}
|
|
$id = Stripe_ApiRequestor::utf8($id);
|
|
$charge = Stripe_ApiRequestor::utf8($charge);
|
|
|
|
$base = self::classUrl('Stripe_Charge');
|
|
$chargeExtn = urlencode($charge);
|
|
$extn = urlencode($id);
|
|
return "$base/$chargeExtn/refunds/$extn";
|
|
}
|
|
|
|
/**
|
|
* @return Stripe_Refund The saved refund.
|
|
*/
|
|
public function save()
|
|
{
|
|
$class = get_class();
|
|
return self::_scopedSave($class);
|
|
}
|
|
}
|