PHP Class Stripe\ApiRequestor

ファイルを表示 Open project: stripe/stripe-php

Public Methods

Method Description
__construct ( $apiKey = null, $apiBase = null )
handleApiError ( string $rbody, integer $rcode, array $rheaders, array $resp )
request ( string $method, string $url, array | null $params = null, array | null $headers = null ) : array
setHttpClient ( $client )

Private Methods

Method Description
_defaultHeaders ( $apiKey )
_encodeObjects ( $d )
_formatAppInfo ( $appInfo )
_interpretResponse ( $rbody, $rcode, $rheaders )
_processResourceParam ( $resource, $hasCurlFile )
_requestRaw ( $method, $url, $params, $headers )
httpClient ( )

Method Details

__construct() public method

public __construct ( $apiKey = null, $apiBase = null )

handleApiError() public method

public handleApiError ( string $rbody, integer $rcode, array $rheaders, array $resp )
$rbody string A JSON string.
$rcode integer
$rheaders array
$resp array

request() public method

public request ( string $method, string $url, array | null $params = null, array | null $headers = null ) : array
$method string
$url string
$params array | null
$headers array | null
return array An array whose first element is an API response and second element is the API key used to make the request.

setHttpClient() public static method

public static setHttpClient ( $client )