Item extends RecurlyResource
Table of Contents
- $array_hints : mixed
- $_accounting_code : mixed
- $_avalara_service_type : mixed
- $_avalara_transaction_type : mixed
- $_code : mixed
- $_created_at : mixed
- $_currencies : mixed
- $_custom_fields : mixed
- $_deleted_at : mixed
- $_description : mixed
- $_external_sku : mixed
- $_harmonized_system_code : mixed
- $_id : mixed
- $_liability_gl_account_id : mixed
- $_name : mixed
- $_object : mixed
- $_performance_obligation_id : mixed
- $_response : mixed
- $_revenue_gl_account_id : mixed
- $_revenue_schedule_type : mixed
- $_state : mixed
- $_tax_code : mixed
- $_tax_exempt : mixed
- $_updated_at : 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.
- 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.
- getCustomFields() : array<string|int, mixed>
- Getter method for the custom_fields attribute.
- getDeletedAt() : string|null
- Getter method for the deleted_at attribute.
- getDescription() : string|null
- Getter method for the description attribute.
- getExternalSku() : string|null
- Getter method for the external_sku attribute.
- getHarmonizedSystemCode() : string|null
- Getter method for the harmonized_system_code attribute.
- getId() : string|null
- Getter method for the id attribute.
- getLiabilityGlAccountId() : string|null
- Getter method for the liability_gl_account_id attribute.
- getName() : string|null
- Getter method for the name attribute.
- getObject() : string|null
- Getter method for the object attribute.
- getPerformanceObligationId() : string|null
- Getter method for the performance_obligation_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.
- getTaxExempt() : bool|null
- Getter method for the tax_exempt attribute.
- getUpdatedAt() : string|null
- Getter method for the updated_at attribute.
- setAccountingCode() : void
- Setter method for the accounting_code 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.
- setCustomFields() : void
- Setter method for the custom_fields attribute.
- setDeletedAt() : void
- Setter method for the deleted_at attribute.
- setDescription() : void
- Setter method for the description attribute.
- setExternalSku() : void
- Setter method for the external_sku attribute.
- setHarmonizedSystemCode() : void
- Setter method for the harmonized_system_code attribute.
- setId() : void
- Setter method for the id attribute.
- setLiabilityGlAccountId() : void
- Setter method for the liability_gl_account_id attribute.
- setName() : void
- Setter method for the name attribute.
- setObject() : void
- Setter method for the object attribute.
- setPerformanceObligationId() : void
- Setter method for the performance_obligation_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.
- setTaxExempt() : void
- Setter method for the tax_exempt attribute.
- setUpdatedAt() : void
- Setter method for the updated_at 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\Pricing', 'setCustomFields' => '\Recurly\Resources\CustomField']
$_accounting_code
private
mixed
$_accounting_code
$_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
$_custom_fields
private
mixed
$_custom_fields
$_deleted_at
private
mixed
$_deleted_at
$_description
private
mixed
$_description
$_external_sku
private
mixed
$_external_sku
$_harmonized_system_code
private
mixed
$_harmonized_system_code
$_id
private
mixed
$_id
$_liability_gl_account_id
private
mixed
$_liability_gl_account_id
$_name
private
mixed
$_name
$_object
private
mixed
$_object
$_performance_obligation_id
private
mixed
$_performance_obligation_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
$_tax_exempt
private
mixed
$_tax_exempt
$_updated_at
private
mixed
$_updated_at
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|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
getAccountingCode()
Getter method for the accounting_code attribute.
public
getAccountingCode() : string|null
Accounting code for invoice line items.
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 item 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 item 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
Unique code to identify the item.
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>
Item Pricing
Return values
array<string|int, mixed> —getCustomFields()
Getter method for the custom_fields attribute.
public
getCustomFields() : array<string|int, mixed>
The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
Return values
array<string|int, mixed> —getDeletedAt()
Getter method for the deleted_at attribute.
public
getDeletedAt() : string|null
Deleted at
Return values
string|null —getDescription()
Getter method for the description attribute.
public
getDescription() : string|null
Optional, description.
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 —getHarmonizedSystemCode()
Getter method for the harmonized_system_code attribute.
public
getHarmonizedSystemCode() : string|null
The Harmonized System (HS) code is an internationally standardized system of names and numbers to classify traded products. The HS code, sometimes called Commodity Code, is used by customs authorities around the world to identify products when assessing duties and taxes. The HS code may also be referred to as the tariff code or customs code. Values should contain only digits and decimals.
Return values
string|null —getId()
Getter method for the id attribute.
public
getId() : string|null
Item ID
Return values
string|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 —getName()
Getter method for the name attribute.
public
getName() : string|null
This name describes your item and will appear on the invoice when it's purchased on a one time basis.
Return values
string|null —getObject()
Getter method for the object attribute.
public
getObject() : string|null
Object type
Return values
string|null —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 —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
Revenue schedule type
Return values
string|null —getState()
Getter method for the state attribute.
public
getState() : string|null
The current state of the item.
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.
Return values
string|null —getTaxExempt()
Getter method for the tax_exempt attribute.
public
getTaxExempt() : bool|null
true exempts tax on the item, false applies tax on the item.
Return values
bool|null —getUpdatedAt()
Getter method for the updated_at attribute.
public
getUpdatedAt() : string|null
Last updated at
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 —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 —setCustomFields()
Setter method for the custom_fields attribute.
public
setCustomFields(array<string|int, mixed> $custom_fields) : void
Parameters
- $custom_fields : array<string|int, mixed>
Return values
void —setDeletedAt()
Setter method for the deleted_at attribute.
public
setDeletedAt(string $deleted_at) : void
Parameters
- $deleted_at : string
Return values
void —setDescription()
Setter method for the description attribute.
public
setDescription(string $description) : void
Parameters
- $description : 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 —setHarmonizedSystemCode()
Setter method for the harmonized_system_code attribute.
public
setHarmonizedSystemCode(string $harmonized_system_code) : void
Parameters
- $harmonized_system_code : string
Return values
void —setId()
Setter method for the id attribute.
public
setId(string $id) : void
Parameters
- $id : string
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 —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 —setPerformanceObligationId()
Setter method for the performance_obligation_id attribute.
public
setPerformanceObligationId(string $performance_obligation_id) : void
Parameters
- $performance_obligation_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 —setTaxExempt()
Setter method for the tax_exempt attribute.
public
setTaxExempt(bool $tax_exempt) : void
Parameters
- $tax_exempt : bool
Return values
void —setUpdatedAt()
Setter method for the updated_at attribute.
public
setUpdatedAt(string $updated_at) : void
Parameters
- $updated_at : 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