本文整理匯總了PHP中Transfer::classUrl方法的典型用法代碼示例。如果您正苦於以下問題:PHP Transfer::classUrl方法的具體用法?PHP Transfer::classUrl怎麽用?PHP Transfer::classUrl使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Transfer
的用法示例。
在下文中一共展示了Transfer::classUrl方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: instanceUrl
/**
* 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))]);
}
示例2: instanceUrl
/**
* @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}";
}