Recurly v3 API

AddOnMini extends RecurlyResource

Table of Contents

$array_hints  : mixed
$_accounting_code  : mixed
$_add_on_type  : mixed
$_code  : mixed
$_external_sku  : mixed
$_id  : mixed
$_item_id  : mixed
$_measured_unit_id  : mixed
$_name  : mixed
$_object  : mixed
$_response  : mixed
$_usage_percentage  : mixed
$_usage_type  : 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.
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.
getAccountingCode()  : string|null
Getter method for the accounting_code attribute.
getAddOnType()  : string|null
Getter method for the add_on_type attribute.
getCode()  : string|null
Getter method for the code attribute.
getExternalSku()  : string|null
Getter method for the external_sku attribute.
getId()  : string|null
Getter method for the id attribute.
getItemId()  : string|null
Getter method for the item_id attribute.
getMeasuredUnitId()  : string|null
Getter method for the measured_unit_id attribute.
getName()  : string|null
Getter method for the name attribute.
getObject()  : string|null
Getter method for the object attribute.
getResponse()  : Response
Getter for the Recurly HTTP Response
getUsagePercentage()  : float|null
Getter method for the usage_percentage attribute.
getUsageType()  : string|null
Getter method for the usage_type attribute.
setAccountingCode()  : void
Setter method for the accounting_code attribute.
setAddOnType()  : void
Setter method for the add_on_type attribute.
setCode()  : void
Setter method for the code attribute.
setExternalSku()  : void
Setter method for the external_sku attribute.
setId()  : void
Setter method for the id attribute.
setItemId()  : void
Setter method for the item_id attribute.
setMeasuredUnitId()  : void
Setter method for the measured_unit_id attribute.
setName()  : void
Setter method for the name attribute.
setObject()  : void
Setter method for the object attribute.
setUsagePercentage()  : void
Setter method for the usage_percentage attribute.
setUsageType()  : void
Setter method for the usage_type attribute.
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

$array_hints

protected static mixed $array_hints = []

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 $json = null ]) : RecurlyResource
Parameters
$response : Response

The Recurly HTTP Response

$json : object = null

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

Return values
RecurlyResource

An instance of a Recurly Resource

getAccountingCode()

Getter method for the accounting_code attribute.

public getAccountingCode() : string|null

Accounting code for invoice line items for this add-on. If no value is provided, it defaults to add-on's code.

Return values
string|null

getAddOnType()

Getter method for the add_on_type attribute.

public getAddOnType() : string|null

Whether the add-on type is fixed, or usage-based.

Return values
string|null

getCode()

Getter method for the code attribute.

public getCode() : string|null

The unique identifier for the add-on within its plan.

Return values
string|null

getExternalSku()

Getter method for the external_sku attribute.

public getExternalSku() : string|null

Optional, stock keeping unit to link the item to other inventory systems.

Return values
string|null

getId()

Getter method for the id attribute.

public getId() : string|null

Add-on ID

Return values
string|null

getItemId()

Getter method for the item_id attribute.

public getItemId() : string|null

Item ID

Return values
string|null

getMeasuredUnitId()

Getter method for the measured_unit_id attribute.

public getMeasuredUnitId() : string|null

System-generated unique identifier for an measured unit associated with the add-on.

Return values
string|null

getName()

Getter method for the name attribute.

public getName() : string|null

Describes your add-on and will appear in subscribers' invoices.

Return values
string|null

getObject()

Getter method for the object attribute.

public getObject() : string|null

Object type

Return values
string|null

getUsagePercentage()

Getter method for the usage_percentage attribute.

public getUsagePercentage() : float|null

The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0.

Return values
float|null

getUsageType()

Getter method for the usage_type attribute.

public getUsageType() : string|null

Type of usage, returns usage type if add_on_type is usage.

Return values
string|null

setAccountingCode()

Setter method for the accounting_code attribute.

public setAccountingCode(string $accounting_code) : void
Parameters
$accounting_code : string
Return values
void

setAddOnType()

Setter method for the add_on_type attribute.

public setAddOnType(string $add_on_type) : void
Parameters
$add_on_type : string
Return values
void

setCode()

Setter method for the code attribute.

public setCode(string $code) : void
Parameters
$code : string
Return values
void

setExternalSku()

Setter method for the external_sku attribute.

public setExternalSku(string $external_sku) : void
Parameters
$external_sku : string
Return values
void

setId()

Setter method for the id attribute.

public setId(string $id) : void
Parameters
$id : string
Return values
void

setItemId()

Setter method for the item_id attribute.

public setItemId(string $item_id) : void
Parameters
$item_id : string
Return values
void

setMeasuredUnitId()

Setter method for the measured_unit_id attribute.

public setMeasuredUnitId(string $measured_unit_id) : void
Parameters
$measured_unit_id : string
Return values
void

setName()

Setter method for the name attribute.

public setName(string $name) : void
Parameters
$name : string
Return values
void

setObject()

Setter method for the object attribute.

public setObject(string $object) : void
Parameters
$object : string
Return values
void

setUsagePercentage()

Setter method for the usage_percentage attribute.

public setUsagePercentage(float $usage_percentage) : void
Parameters
$usage_percentage : float
Return values
void

setUsageType()

Setter method for the usage_type attribute.

public setUsageType(string $usage_type) : void
Parameters
$usage_type : string
Return values
void

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