Recurly v3 API

Page extends RecurlyResource

Table of Contents

$array_hints  : mixed
$_cursor  : mixed
$_data  : mixed
$_has_more  : mixed
$_next  : mixed
$_response  : mixed
__construct()  : mixed
Constructor
__debugInfo()  : array<string|int, mixed>
Override of the magic method __debugInfo that will only return the relevant attributes of the \Recurly\RecurlyResource
__set()  : void
Guard against setting invalid properties
cast()  : RecurlyResource
Recursively converts a response object into a \Recurly\RecurlyResource.
current()  : RecurlyResource
The current resource at the cursor of the page.
fromBinary()  : BinaryFile
Converts a binary response into a Recurly BinaryFile
fromEmpty()  : EmptyResource
Returns a \Recurly\EmptyResource for API requests that do not have a response body.
fromResponse()  : RecurlyResource
Converts a Recurly response object into a \Recurly\RecurlyResource.
getData()  : array<string|int, mixed>
Getter method for the Page results.
getHasMore()  : bool
Indicates whether there are more pages of results.
getNext()  : string
The combined path and query string to fetch the next page of results.
getResponse()  : Response
Getter for the Recurly HTTP Response
setData()  : void
Setter method for the Page results.
setHasMore()  : void
Setter method for whether there are more pages
setNext()  : void
Setter method for the next page of results.
valid()  : bool
Used to determine if there are more resources available in the page.
encodeApiKey()  : string
Base64 encodes the API key
getUserAgent()  : string
Generates User-Agent for API requests
hintArrayType()  : string
The hintArrayType method will provide type hinting for setter methods that have array parameters.
resourceClass()  : string
Converts a string into a representation of a Recurly Resource
setResponse()  : void
Setter for the Recurly HTTP Response
setterParamClass()  : string
Uses the Reflection API to determine what \Recurly\RecurlyResource is the expected parameter for the given method.
titleize()  : string
Capitalizes all the words in the $input.

Properties

$_cursor

private mixed $_cursor = 0

$_data

private mixed $_data = []

$_has_more

private mixed $_has_more

$_next

private mixed $_next

Methods

__construct()

Constructor

public final __construct() : mixed
Return values
mixed —

__debugInfo()

Override of the magic method __debugInfo that will only return the relevant attributes of the \Recurly\RecurlyResource

public __debugInfo() : array<string|int, mixed>
Tags
codeCoverageIgnore
Return values
array<string|int, mixed> —

__set()

Guard against setting invalid properties

public __set(string $key, mixed $value) : void
Parameters
$key : string

The parameter name that is being set

$value : mixed

The parameter value that is being set

Tags
codeCoverageIgnore
Return values
void —

cast()

Recursively converts a response object into a \Recurly\RecurlyResource.

public static cast(object $data) : RecurlyResource
Parameters
$data : object

PHP Object containing the decoded JSON

Return values
RecurlyResource —

An instance of a Recurly Resource

fromBinary()

Converts a binary response into a Recurly BinaryFile

public static fromBinary(string $data, Response $response) : BinaryFile
Parameters
$data : string

The binary file data

$response : Response

(optional) The Recurly HTTP Response

Return values
BinaryFile —

An instance of a Recurly BinaryFile

fromResponse()

Converts a Recurly response object into a \Recurly\RecurlyResource.

public static fromResponse(Response $response[, object|null $json = null ]) : RecurlyResource
Parameters
$response : Response

The Recurly HTTP Response

$json : object|null = null

(optional) JSON payload to use instead of the $response's. Primarily used for errors

Return values
RecurlyResource —

An instance of a Recurly Resource

getData()

Getter method for the Page results.

public getData() : array<string|int, mixed>
Return values
array<string|int, mixed> —

getHasMore()

Indicates whether there are more pages of results.

public getHasMore() : bool
Return values
bool —

getNext()

The combined path and query string to fetch the next page of results.

public getNext() : string
Return values
string —

setData()

Setter method for the Page results.

public setData(array<string|int, mixed> $data) : void
Parameters
$data : array<string|int, mixed>

An associative array of ???

Return values
void —

setHasMore()

Setter method for whether there are more pages

public setHasMore(bool $has_more) : void
Parameters
$has_more : bool

Whether there are more pages of results.

Return values
void —

setNext()

Setter method for the next page of results.

public setNext(string $next) : void
Parameters
$next : string

The combined path and query string to fetch the next page of results.

Return values
void —

valid()

Used to determine if there are more resources available in the page.

public valid() : bool
Return values
bool —

encodeApiKey()

Base64 encodes the API key

protected static encodeApiKey(string $key) : string
Parameters
$key : string

The API key to encode

Return values
string —

base64 encoded API key

getUserAgent()

Generates User-Agent for API requests

protected static getUserAgent() : string
Return values
string —

Recurly client User-Agent string

hintArrayType()

The hintArrayType method will provide type hinting for setter methods that have array parameters.

protected static hintArrayType(string $key) : string
Parameters
$key : string

The property to get teh type hint for.

Return values
string —

The class name of the expected array type.

resourceClass()

Converts a string into a representation of a Recurly Resource

protected static resourceClass(string $type) : string
Parameters
$type : string

A string to convert to a Recurly Resource

Return values
string —

The string representation of a Recurly Resource

setResponse()

Setter for the Recurly HTTP Response

protected setResponse(Response $response) : void
Parameters
$response : Response

The Recurly HTTP Response

Return values
void —

setterParamClass()

Uses the Reflection API to determine what \Recurly\RecurlyResource is the expected parameter for the given method.

protected static setterParamClass(string $method) : string
Parameters
$method : string

The name of the setter method to find the type hint for

Return values
string —

The \Recurly\RecurlyResource that the setter method expects

titleize()

Capitalizes all the words in the $input.

protected static titleize(string $input[, string $prefix = '' ]) : string
Parameters
$input : string

The string to titleize

$prefix : string = ''

(optional) Prefix to add to the beginning of the titleized string. The prefix will not be titleized.

Return values
string —

The titleized $input wtih the prepended $prefix

Search results