AddOn extends RecurlyResource
Table of Contents
- $array_hints : mixed
- $_accounting_code : mixed
- $_add_on_type : mixed
- $_avalara_service_type : mixed
- $_avalara_transaction_type : mixed
- $_code : mixed
- $_created_at : mixed
- $_currencies : mixed
- $_default_quantity : mixed
- $_deleted_at : mixed
- $_display_quantity : mixed
- $_external_sku : mixed
- $_id : mixed
- $_item : mixed
- $_liability_gl_account_id : mixed
- $_measured_unit_id : mixed
- $_name : mixed
- $_object : mixed
- $_optional : mixed
- $_percentage_tiers : mixed
- $_performance_obligation_id : mixed
- $_plan_id : mixed
- $_response : mixed
- $_revenue_gl_account_id : mixed
- $_revenue_schedule_type : mixed
- $_state : mixed
- $_tax_code : mixed
- $_tier_type : mixed
- $_tiers : mixed
- $_updated_at : mixed
- $_usage_calculation_type : mixed
- $_usage_percentage : mixed
- $_usage_timeframe : 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.
- getAvalaraServiceType() : int|null
- Getter method for the avalara_service_type attribute.
- getAvalaraTransactionType() : int|null
- Getter method for the avalara_transaction_type attribute.
- getCode() : string|null
- Getter method for the code attribute.
- getCreatedAt() : string|null
- Getter method for the created_at attribute.
- getCurrencies() : array<string|int, mixed>
- Getter method for the currencies attribute.
- getDefaultQuantity() : int|null
- Getter method for the default_quantity attribute.
- getDeletedAt() : string|null
- Getter method for the deleted_at attribute.
- getDisplayQuantity() : bool|null
- Getter method for the display_quantity attribute.
- getExternalSku() : string|null
- Getter method for the external_sku attribute.
- getId() : string|null
- Getter method for the id attribute.
- getItem() : ItemMini|null
- Getter method for the item attribute.
- getLiabilityGlAccountId() : string|null
- Getter method for the liability_gl_account_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.
- getOptional() : bool|null
- Getter method for the optional attribute.
- getPercentageTiers() : array<string|int, mixed>
- Getter method for the percentage_tiers attribute.
- getPerformanceObligationId() : string|null
- Getter method for the performance_obligation_id attribute.
- getPlanId() : string|null
- Getter method for the plan_id attribute.
- getResponse() : Response
- Getter for the Recurly HTTP Response
- getRevenueGlAccountId() : string|null
- Getter method for the revenue_gl_account_id attribute.
- getRevenueScheduleType() : string|null
- Getter method for the revenue_schedule_type attribute.
- getState() : string|null
- Getter method for the state attribute.
- getTaxCode() : string|null
- Getter method for the tax_code attribute.
- getTiers() : array<string|int, mixed>
- Getter method for the tiers attribute.
- getTierType() : string|null
- Getter method for the tier_type attribute.
- getUpdatedAt() : string|null
- Getter method for the updated_at attribute.
- getUsageCalculationType() : string|null
- Getter method for the usage_calculation_type attribute.
- getUsagePercentage() : float|null
- Getter method for the usage_percentage attribute.
- getUsageTimeframe() : string|null
- Getter method for the usage_timeframe 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.
- setAvalaraServiceType() : void
- Setter method for the avalara_service_type attribute.
- setAvalaraTransactionType() : void
- Setter method for the avalara_transaction_type attribute.
- setCode() : void
- Setter method for the code attribute.
- setCreatedAt() : void
- Setter method for the created_at attribute.
- setCurrencies() : void
- Setter method for the currencies attribute.
- setDefaultQuantity() : void
- Setter method for the default_quantity attribute.
- setDeletedAt() : void
- Setter method for the deleted_at attribute.
- setDisplayQuantity() : void
- Setter method for the display_quantity attribute.
- setExternalSku() : void
- Setter method for the external_sku attribute.
- setId() : void
- Setter method for the id attribute.
- setItem() : void
- Setter method for the item attribute.
- setLiabilityGlAccountId() : void
- Setter method for the liability_gl_account_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.
- setOptional() : void
- Setter method for the optional attribute.
- setPercentageTiers() : void
- Setter method for the percentage_tiers attribute.
- setPerformanceObligationId() : void
- Setter method for the performance_obligation_id attribute.
- setPlanId() : void
- Setter method for the plan_id attribute.
- setRevenueGlAccountId() : void
- Setter method for the revenue_gl_account_id attribute.
- setRevenueScheduleType() : void
- Setter method for the revenue_schedule_type attribute.
- setState() : void
- Setter method for the state attribute.
- setTaxCode() : void
- Setter method for the tax_code attribute.
- setTiers() : void
- Setter method for the tiers attribute.
- setTierType() : void
- Setter method for the tier_type attribute.
- setUpdatedAt() : void
- Setter method for the updated_at attribute.
- setUsageCalculationType() : void
- Setter method for the usage_calculation_type attribute.
- setUsagePercentage() : void
- Setter method for the usage_percentage attribute.
- setUsageTimeframe() : void
- Setter method for the usage_timeframe 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
= ['setCurrencies' => '\Recurly\Resources\AddOnPricing', 'setPercentageTiers' => '\Recurly\Resources\PercentageTiersByCurrency', 'setTiers' => '\Recurly\Resources\Tier']
$_accounting_code
private
mixed
$_accounting_code
$_add_on_type
private
mixed
$_add_on_type
$_avalara_service_type
private
mixed
$_avalara_service_type
$_avalara_transaction_type
private
mixed
$_avalara_transaction_type
$_code
private
mixed
$_code
$_created_at
private
mixed
$_created_at
$_currencies
private
mixed
$_currencies
$_default_quantity
private
mixed
$_default_quantity
$_deleted_at
private
mixed
$_deleted_at
$_display_quantity
private
mixed
$_display_quantity
$_external_sku
private
mixed
$_external_sku
$_id
private
mixed
$_id
$_item
private
mixed
$_item
$_liability_gl_account_id
private
mixed
$_liability_gl_account_id
$_measured_unit_id
private
mixed
$_measured_unit_id
$_name
private
mixed
$_name
$_object
private
mixed
$_object
$_optional
private
mixed
$_optional
$_percentage_tiers
private
mixed
$_percentage_tiers
$_performance_obligation_id
private
mixed
$_performance_obligation_id
$_plan_id
private
mixed
$_plan_id
$_response
private
mixed
$_response
$_revenue_gl_account_id
private
mixed
$_revenue_gl_account_id
$_revenue_schedule_type
private
mixed
$_revenue_schedule_type
$_state
private
mixed
$_state
$_tax_code
private
mixed
$_tax_code
$_tier_type
private
mixed
$_tier_type
$_tiers
private
mixed
$_tiers
$_updated_at
private
mixed
$_updated_at
$_usage_calculation_type
private
mixed
$_usage_calculation_type
$_usage_percentage
private
mixed
$_usage_percentage
$_usage_timeframe
private
mixed
$_usage_timeframe
$_usage_type
private
mixed
$_usage_type
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
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
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
fromEmpty()
Returns a \Recurly\EmptyResource for API requests that do not have a response body.
public
static fromEmpty(Response $response) : EmptyResource
Parameters
- $response : Response
-
(optional) The Recurly HTTP Response
Return values
EmptyResource —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 —getAvalaraServiceType()
Getter method for the avalara_service_type attribute.
public
getAvalaraServiceType() : int|null
Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to the documentation for more available t/s types.
Return values
int|null —getAvalaraTransactionType()
Getter method for the avalara_transaction_type attribute.
public
getAvalaraTransactionType() : int|null
Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to the documentation for more available t/s types.
Return values
int|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 —getCreatedAt()
Getter method for the created_at attribute.
public
getCreatedAt() : string|null
Created at
Return values
string|null —getCurrencies()
Getter method for the currencies attribute.
public
getCurrencies() : array<string|int, mixed>
Add-on pricing
Return values
array<string|int, mixed> —getDefaultQuantity()
Getter method for the default_quantity attribute.
public
getDefaultQuantity() : int|null
Default quantity for the hosted pages.
Return values
int|null —getDeletedAt()
Getter method for the deleted_at attribute.
public
getDeletedAt() : string|null
Deleted at
Return values
string|null —getDisplayQuantity()
Getter method for the display_quantity attribute.
public
getDisplayQuantity() : bool|null
Determines if the quantity field is displayed on the hosted pages for the add-on.
Return values
bool|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 —getItem()
Getter method for the item attribute.
public
getItem() : ItemMini|null
Just the important parts.
Return values
ItemMini|null —getLiabilityGlAccountId()
Getter method for the liability_gl_account_id attribute.
public
getLiabilityGlAccountId() : string|null
The ID of a general ledger account. General ledger accounts are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.
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 —getOptional()
Getter method for the optional attribute.
public
getOptional() : bool|null
Whether the add-on is optional for the customer to include in their purchase on the hosted payment page. If false, the add-on will be included when a subscription is created through the Recurly UI. However, the add-on will not be included when a subscription is created through the API.
Return values
bool|null —getPercentageTiers()
Getter method for the percentage_tiers attribute.
public
getPercentageTiers() : array<string|int, mixed>
This feature is currently in development and requires approval and enablement, please contact support.
Return values
array<string|int, mixed> —getPerformanceObligationId()
Getter method for the performance_obligation_id attribute.
public
getPerformanceObligationId() : string|null
The ID of a performance obligation. Performance obligations are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.
Return values
string|null —getPlanId()
Getter method for the plan_id attribute.
public
getPlanId() : string|null
Plan ID
Return values
string|null —getResponse()
Getter for the Recurly HTTP Response
public
getResponse() : Response
Return values
Response —The Recurly HTTP Response
getRevenueGlAccountId()
Getter method for the revenue_gl_account_id attribute.
public
getRevenueGlAccountId() : string|null
The ID of a general ledger account. General ledger accounts are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.
Return values
string|null —getRevenueScheduleType()
Getter method for the revenue_schedule_type attribute.
public
getRevenueScheduleType() : string|null
When this add-on is invoiced, the line item will use this revenue schedule. If item_code
/item_id
is part of the request then revenue_schedule_type
must be absent in the request as the value will be set from the item.
Return values
string|null —getState()
Getter method for the state attribute.
public
getState() : string|null
Add-ons can be either active or inactive.
Return values
string|null —getTaxCode()
Getter method for the tax_code attribute.
public
getTaxCode() : string|null
Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of unknown
, physical
, or digital
tax codes. If item_code
/item_id
is part of the request then tax_code
must be absent.
Return values
string|null —getTiers()
Getter method for the tiers attribute.
public
getTiers() : array<string|int, mixed>
Tiers
Return values
array<string|int, mixed> —getTierType()
Getter method for the tier_type attribute.
public
getTierType() : string|null
The pricing model for the add-on. For more information, click here. See our Guide for an overview of how to configure quantity-based pricing models.
Return values
string|null —getUpdatedAt()
Getter method for the updated_at attribute.
public
getUpdatedAt() : string|null
Last updated at
Return values
string|null —getUsageCalculationType()
Getter method for the usage_calculation_type attribute.
public
getUsageCalculationType() : string|null
The type of calculation to be employed for an add-on. Cumulative billing will sum all usage records created in the current billing cycle. Last-in-period billing will apply only the most recent usage record in the billing period. If no value is specified, cumulative billing will be used.
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 —getUsageTimeframe()
Getter method for the usage_timeframe attribute.
public
getUsageTimeframe() : string|null
The time at which usage totals are reset for billing purposes.
Return values
string|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 —setAvalaraServiceType()
Setter method for the avalara_service_type attribute.
public
setAvalaraServiceType(int $avalara_service_type) : void
Parameters
- $avalara_service_type : int
Return values
void —setAvalaraTransactionType()
Setter method for the avalara_transaction_type attribute.
public
setAvalaraTransactionType(int $avalara_transaction_type) : void
Parameters
- $avalara_transaction_type : int
Return values
void —setCode()
Setter method for the code attribute.
public
setCode(string $code) : void
Parameters
- $code : 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 —setCurrencies()
Setter method for the currencies attribute.
public
setCurrencies(array<string|int, mixed> $currencies) : void
Parameters
- $currencies : array<string|int, mixed>
Return values
void —setDefaultQuantity()
Setter method for the default_quantity attribute.
public
setDefaultQuantity(int $default_quantity) : void
Parameters
- $default_quantity : int
Return values
void —setDeletedAt()
Setter method for the deleted_at attribute.
public
setDeletedAt(string $deleted_at) : void
Parameters
- $deleted_at : string
Return values
void —setDisplayQuantity()
Setter method for the display_quantity attribute.
public
setDisplayQuantity(bool $display_quantity) : void
Parameters
- $display_quantity : bool
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 —setItem()
Setter method for the item attribute.
public
setItem(ItemMini $item) : void
Parameters
- $item : ItemMini
Return values
void —setLiabilityGlAccountId()
Setter method for the liability_gl_account_id attribute.
public
setLiabilityGlAccountId(string $liability_gl_account_id) : void
Parameters
- $liability_gl_account_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 —setOptional()
Setter method for the optional attribute.
public
setOptional(bool $optional) : void
Parameters
- $optional : bool
Return values
void —setPercentageTiers()
Setter method for the percentage_tiers attribute.
public
setPercentageTiers(array<string|int, mixed> $percentage_tiers) : void
Parameters
- $percentage_tiers : array<string|int, mixed>
Return values
void —setPerformanceObligationId()
Setter method for the performance_obligation_id attribute.
public
setPerformanceObligationId(string $performance_obligation_id) : void
Parameters
- $performance_obligation_id : string
Return values
void —setPlanId()
Setter method for the plan_id attribute.
public
setPlanId(string $plan_id) : void
Parameters
- $plan_id : string
Return values
void —setRevenueGlAccountId()
Setter method for the revenue_gl_account_id attribute.
public
setRevenueGlAccountId(string $revenue_gl_account_id) : void
Parameters
- $revenue_gl_account_id : string
Return values
void —setRevenueScheduleType()
Setter method for the revenue_schedule_type attribute.
public
setRevenueScheduleType(string $revenue_schedule_type) : void
Parameters
- $revenue_schedule_type : string
Return values
void —setState()
Setter method for the state attribute.
public
setState(string $state) : void
Parameters
- $state : string
Return values
void —setTaxCode()
Setter method for the tax_code attribute.
public
setTaxCode(string $tax_code) : void
Parameters
- $tax_code : string
Return values
void —setTiers()
Setter method for the tiers attribute.
public
setTiers(array<string|int, mixed> $tiers) : void
Parameters
- $tiers : array<string|int, mixed>
Return values
void —setTierType()
Setter method for the tier_type attribute.
public
setTierType(string $tier_type) : void
Parameters
- $tier_type : 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 —setUsageCalculationType()
Setter method for the usage_calculation_type attribute.
public
setUsageCalculationType(string $usage_calculation_type) : void
Parameters
- $usage_calculation_type : 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 —setUsageTimeframe()
Setter method for the usage_timeframe attribute.
public
setUsageTimeframe(string $usage_timeframe) : void
Parameters
- $usage_timeframe : string
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