PHP Class Recurly_Client, recurly-client-php

显示文件 Open project: recurly/recurly-client-php Class Usage Examples

Public Properties

Property Type Description
$CACertPath The path to your CA certs. Use only if needed (if you can't fix libcurl/php).
$apiKey Default API key for all requests, may be overridden with the Recurly_Client constructor
$apiUrl Base API URL
$apiVersion API Version
$subdomain Subdomain for all requests.

Public Methods

Method Description
__construct ( $apiKey = null, $acceptLanguage = 'en-US' ) Create a new Recurly Client
apiKey ( ) : string Current API key
baseUri ( )
getFile ( string $uri, resource $file_pointer ) Saves the contents of a URI into a file handle.
getPdf ( string $uri, string $locale = null ) : string Requests a PDF document from the given URI
request ( $method, $uri, $data = null )

Private Methods

Method Description
__userAgent ( )
_getHeaders ( $headerText )
_raiseCurlError ( $errorNumber, $message )
_sendRequest ( string $method, string $uri, mixed $data = '' ) Sends an HTTP request to the Recurly API

Method Details

__construct() public method

Create a new Recurly Client
public __construct ( $apiKey = null, $acceptLanguage = 'en-US' )

apiKey() public method

Current API key
public apiKey ( ) : string
return string API key

baseUri() public method

public baseUri ( )

getFile() public method

Saves the contents of a URI into a file handle.
public getFile ( string $uri, resource $file_pointer )
$uri string Target URI for the request (complete URL)
$file_pointer resource Resourced returned from fopen() with write mode.

getPdf() public method

Requests a PDF document from the given URI
public getPdf ( string $uri, string $locale = null ) : string
$uri string Target URI for this request (relative to the API root)
$locale string Locale for the PDF invoice (e.g. "en-GB", "en-US", "fr")
return string $response PDF document

request() public method

public request ( $method, $uri, $data = null )

Property Details

$CACertPath public_oe static_oe property

The path to your CA certs. Use only if needed (if you can't fix libcurl/php).
public static $CACertPath

$apiKey public_oe static_oe property

Default API key for all requests, may be overridden with the Recurly_Client constructor
public static $apiKey

$apiUrl public_oe static_oe property

Base API URL
public static $apiUrl

$apiVersion public_oe static_oe property

API Version
public static $apiVersion

$subdomain public_oe static_oe property

Subdomain for all requests.
public static $subdomain