/** * Get API URL for this Stripe transfer reversal. * * @throws \Arcanedev\Stripe\Exceptions\InvalidRequestException * * @return string */ public function instanceUrl() { if (is_null($id = $this['id'])) { throw new InvalidRequestException('Could not determine which URL to request: class instance has invalid ID [null]', null); } return implode('/', [Transfer::classUrl(), urlencode(str_utf8($this['transfer'])), 'reversals', urlencode(str_utf8($id))]); }
/** * @return string The API URL for this Stripe transfer reversal. */ public function instanceUrl() { $id = $this['id']; $transfer = $this['transfer']; if (!$id) { throw new Error\InvalidRequest("Could not determine which URL to request: " . "class instance has invalid ID: {$id}", null); } $id = Util\Util::utf8($id); $transfer = Util\Util::utf8($transfer); $base = Transfer::classUrl(); $transferExtn = urlencode($transfer); $extn = urlencode($id); return "{$base}/{$transferExtn}/reversals/{$extn}"; }