本文整理汇总了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}";
}