Recurly v3 API

ExternalSubscription extends RecurlyResource

Table of Contents

$array_hints  : mixed
$_account  : mixed
$_activated_at  : mixed
$_app_identifier  : mixed
$_auto_renew  : mixed
$_canceled_at  : mixed
$_created_at  : mixed
$_expires_at  : mixed
$_external_id  : mixed
$_external_payment_phases  : mixed
$_external_product_reference  : mixed
$_id  : mixed
$_imported  : mixed
$_in_grace_period  : mixed
$_last_purchased  : mixed
$_object  : mixed
$_quantity  : mixed
$_response  : mixed
$_state  : mixed
$_test  : mixed
$_trial_ends_at  : mixed
$_trial_started_at  : mixed
$_updated_at  : mixed
$_uuid  : 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.
getAccount()  : AccountMini|null
Getter method for the account attribute.
getActivatedAt()  : string|null
Getter method for the activated_at attribute.
getAppIdentifier()  : string|null
Getter method for the app_identifier attribute.
getAutoRenew()  : bool|null
Getter method for the auto_renew attribute.
getCanceledAt()  : string|null
Getter method for the canceled_at attribute.
getCreatedAt()  : string|null
Getter method for the created_at attribute.
getExpiresAt()  : string|null
Getter method for the expires_at attribute.
getExternalId()  : string|null
Getter method for the external_id attribute.
getExternalPaymentPhases()  : array<string|int, mixed>
Getter method for the external_payment_phases attribute.
getExternalProductReference()  : ExternalProductReferenceMini|null
Getter method for the external_product_reference attribute.
getId()  : string|null
Getter method for the id attribute.
getImported()  : bool|null
Getter method for the imported attribute.
getInGracePeriod()  : bool|null
Getter method for the in_grace_period attribute.
getLastPurchased()  : string|null
Getter method for the last_purchased attribute.
getObject()  : string|null
Getter method for the object attribute.
getQuantity()  : int|null
Getter method for the quantity attribute.
getResponse()  : Response
Getter for the Recurly HTTP Response
getState()  : string|null
Getter method for the state attribute.
getTest()  : bool|null
Getter method for the test attribute.
getTrialEndsAt()  : string|null
Getter method for the trial_ends_at attribute.
getTrialStartedAt()  : string|null
Getter method for the trial_started_at attribute.
getUpdatedAt()  : string|null
Getter method for the updated_at attribute.
getUuid()  : string|null
Getter method for the uuid attribute.
setAccount()  : void
Setter method for the account attribute.
setActivatedAt()  : void
Setter method for the activated_at attribute.
setAppIdentifier()  : void
Setter method for the app_identifier attribute.
setAutoRenew()  : void
Setter method for the auto_renew attribute.
setCanceledAt()  : void
Setter method for the canceled_at attribute.
setCreatedAt()  : void
Setter method for the created_at attribute.
setExpiresAt()  : void
Setter method for the expires_at attribute.
setExternalId()  : void
Setter method for the external_id attribute.
setExternalPaymentPhases()  : void
Setter method for the external_payment_phases attribute.
setExternalProductReference()  : void
Setter method for the external_product_reference attribute.
setId()  : void
Setter method for the id attribute.
setImported()  : void
Setter method for the imported attribute.
setInGracePeriod()  : void
Setter method for the in_grace_period attribute.
setLastPurchased()  : void
Setter method for the last_purchased attribute.
setObject()  : void
Setter method for the object attribute.
setQuantity()  : void
Setter method for the quantity attribute.
setState()  : void
Setter method for the state attribute.
setTest()  : void
Setter method for the test attribute.
setTrialEndsAt()  : void
Setter method for the trial_ends_at attribute.
setTrialStartedAt()  : void
Setter method for the trial_started_at attribute.
setUpdatedAt()  : void
Setter method for the updated_at attribute.
setUuid()  : void
Setter method for the uuid 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 = ['setExternalPaymentPhases' => '\Recurly\Resources\ExternalPaymentPhase']

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

getActivatedAt()

Getter method for the activated_at attribute.

public getActivatedAt() : string|null

When the external subscription was activated in the external platform.

Return values
string|null

getAppIdentifier()

Getter method for the app_identifier attribute.

public getAppIdentifier() : string|null

Identifier of the app that generated the external subscription.

Return values
string|null

getAutoRenew()

Getter method for the auto_renew attribute.

public getAutoRenew() : bool|null

An indication of whether or not the external subscription will auto-renew at the expiration date.

Return values
bool|null

getCanceledAt()

Getter method for the canceled_at attribute.

public getCanceledAt() : string|null

When the external subscription was canceled in the external platform.

Return values
string|null

getCreatedAt()

Getter method for the created_at attribute.

public getCreatedAt() : string|null

When the external subscription was created in Recurly.

Return values
string|null

getExpiresAt()

Getter method for the expires_at attribute.

public getExpiresAt() : string|null

When the external subscription expires in the external platform.

Return values
string|null

getExternalId()

Getter method for the external_id attribute.

public getExternalId() : string|null

The id of the subscription in the external systems., I.e. Apple App Store or Google Play Store.

Return values
string|null

getExternalPaymentPhases()

Getter method for the external_payment_phases attribute.

public getExternalPaymentPhases() : array<string|int, mixed>

The phases of the external subscription payment lifecycle.

Return values
array<string|int, mixed>

getId()

Getter method for the id attribute.

public getId() : string|null

System-generated unique identifier for an external subscription ID, e.g. e28zov4fw0v2.

Return values
string|null

getImported()

Getter method for the imported attribute.

public getImported() : bool|null

An indication of whether or not the external subscription was created by a historical data import.

Return values
bool|null

getInGracePeriod()

Getter method for the in_grace_period attribute.

public getInGracePeriod() : bool|null

An indication of whether or not the external subscription is in a grace period.

Return values
bool|null

getLastPurchased()

Getter method for the last_purchased attribute.

public getLastPurchased() : string|null

When a new billing event occurred on the external subscription in conjunction with a recent billing period, reactivation or upgrade/downgrade.

Return values
string|null

getObject()

Getter method for the object attribute.

public getObject() : string|null

Object type

Return values
string|null

getQuantity()

Getter method for the quantity attribute.

public getQuantity() : int|null

An indication of the quantity of a subscribed item's quantity.

Return values
int|null

getState()

Getter method for the state attribute.

public getState() : string|null

External subscriptions can be active, canceled, expired, past_due, voided, revoked, or paused.

Return values
string|null

getTest()

Getter method for the test attribute.

public getTest() : bool|null

An indication of whether or not the external subscription was purchased in a sandbox environment.

Return values
bool|null

getTrialEndsAt()

Getter method for the trial_ends_at attribute.

public getTrialEndsAt() : string|null

When the external subscription trial period ends in the external platform.

Return values
string|null

getTrialStartedAt()

Getter method for the trial_started_at attribute.

public getTrialStartedAt() : string|null

When the external subscription trial period started in the external platform.

Return values
string|null

getUpdatedAt()

Getter method for the updated_at attribute.

public getUpdatedAt() : string|null

When the external subscription was updated in Recurly.

Return values
string|null

getUuid()

Getter method for the uuid attribute.

public getUuid() : string|null

Universally Unique Identifier created automatically.

Return values
string|null

setActivatedAt()

Setter method for the activated_at attribute.

public setActivatedAt(string $activated_at) : void
Parameters
$activated_at : string
Return values
void

setAppIdentifier()

Setter method for the app_identifier attribute.

public setAppIdentifier(string $app_identifier) : void
Parameters
$app_identifier : string
Return values
void

setAutoRenew()

Setter method for the auto_renew attribute.

public setAutoRenew(bool $auto_renew) : void
Parameters
$auto_renew : bool
Return values
void

setCanceledAt()

Setter method for the canceled_at attribute.

public setCanceledAt(string $canceled_at) : void
Parameters
$canceled_at : string
Return values
void

setCreatedAt()

Setter method for the created_at attribute.

public setCreatedAt(string $created_at) : void
Parameters
$created_at : string
Return values
void

setExpiresAt()

Setter method for the expires_at attribute.

public setExpiresAt(string $expires_at) : void
Parameters
$expires_at : string
Return values
void

setExternalId()

Setter method for the external_id attribute.

public setExternalId(string $external_id) : void
Parameters
$external_id : string
Return values
void

setExternalPaymentPhases()

Setter method for the external_payment_phases attribute.

public setExternalPaymentPhases(array<string|int, mixed> $external_payment_phases) : void
Parameters
$external_payment_phases : array<string|int, mixed>
Return values
void

setId()

Setter method for the id attribute.

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

setImported()

Setter method for the imported attribute.

public setImported(bool $imported) : void
Parameters
$imported : bool
Return values
void

setInGracePeriod()

Setter method for the in_grace_period attribute.

public setInGracePeriod(bool $in_grace_period) : void
Parameters
$in_grace_period : bool
Return values
void

setLastPurchased()

Setter method for the last_purchased attribute.

public setLastPurchased(string $last_purchased) : void
Parameters
$last_purchased : string
Return values
void

setObject()

Setter method for the object attribute.

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

setQuantity()

Setter method for the quantity attribute.

public setQuantity(int $quantity) : void
Parameters
$quantity : int
Return values
void

setState()

Setter method for the state attribute.

public setState(string $state) : void
Parameters
$state : string
Return values
void

setTest()

Setter method for the test attribute.

public setTest(bool $test) : void
Parameters
$test : bool
Return values
void

setTrialEndsAt()

Setter method for the trial_ends_at attribute.

public setTrialEndsAt(string $trial_ends_at) : void
Parameters
$trial_ends_at : string
Return values
void

setTrialStartedAt()

Setter method for the trial_started_at attribute.

public setTrialStartedAt(string $trial_started_at) : void
Parameters
$trial_started_at : string
Return values
void

setUpdatedAt()

Setter method for the updated_at attribute.

public setUpdatedAt(string $updated_at) : void
Parameters
$updated_at : string
Return values
void

setUuid()

Setter method for the uuid attribute.

public setUuid(string $uuid) : void
Parameters
$uuid : 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