LineItem extends RecurlyResource
Table of Contents
- $array_hints : mixed
- $_account : mixed
- $_accounting_code : mixed
- $_add_on_code : mixed
- $_add_on_id : mixed
- $_amount : mixed
- $_avalara_service_type : mixed
- $_avalara_transaction_type : mixed
- $_bill_for_account_id : mixed
- $_created_at : mixed
- $_credit_applied : mixed
- $_credit_reason_code : mixed
- $_currency : mixed
- $_custom_fields : mixed
- $_description : mixed
- $_destination_tax_address_source : mixed
- $_discount : mixed
- $_end_date : mixed
- $_external_sku : mixed
- $_id : mixed
- $_invoice_id : mixed
- $_invoice_number : mixed
- $_item_code : mixed
- $_item_id : mixed
- $_legacy_category : mixed
- $_liability_gl_account_code : mixed
- $_object : mixed
- $_origin : mixed
- $_origin_tax_address_source : mixed
- $_original_line_item_invoice_id : mixed
- $_performance_obligation_id : mixed
- $_plan_code : mixed
- $_plan_id : mixed
- $_previous_line_item_id : mixed
- $_product_code : mixed
- $_proration_rate : mixed
- $_quantity : mixed
- $_quantity_decimal : mixed
- $_refund : mixed
- $_refunded_quantity : mixed
- $_refunded_quantity_decimal : mixed
- $_response : mixed
- $_revenue_gl_account_code : mixed
- $_revenue_schedule_type : mixed
- $_shipping_address : mixed
- $_start_date : mixed
- $_state : mixed
- $_subscription_id : mixed
- $_subtotal : mixed
- $_tax : mixed
- $_tax_code : mixed
- $_tax_exempt : mixed
- $_tax_inclusive : mixed
- $_tax_info : mixed
- $_taxable : mixed
- $_type : mixed
- $_unit_amount : mixed
- $_unit_amount_decimal : 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.
- getAccountingCode() : string|null
- Getter method for the accounting_code attribute.
- getAddOnCode() : string|null
- Getter method for the add_on_code attribute.
- getAddOnId() : string|null
- Getter method for the add_on_id attribute.
- getAmount() : float|null
- Getter method for the amount attribute.
- getAvalaraServiceType() : int|null
- Getter method for the avalara_service_type attribute.
- getAvalaraTransactionType() : int|null
- Getter method for the avalara_transaction_type attribute.
- getBillForAccountId() : string|null
- Getter method for the bill_for_account_id attribute.
- getCreatedAt() : string|null
- Getter method for the created_at attribute.
- getCreditApplied() : float|null
- Getter method for the credit_applied attribute.
- getCreditReasonCode() : string|null
- Getter method for the credit_reason_code attribute.
- getCurrency() : string|null
- Getter method for the currency attribute.
- getCustomFields() : array<string|int, mixed>
- Getter method for the custom_fields attribute.
- getDescription() : string|null
- Getter method for the description attribute.
- getDestinationTaxAddressSource() : string|null
- Getter method for the destination_tax_address_source attribute.
- getDiscount() : float|null
- Getter method for the discount attribute.
- getEndDate() : string|null
- Getter method for the end_date attribute.
- getExternalSku() : string|null
- Getter method for the external_sku attribute.
- getId() : string|null
- Getter method for the id attribute.
- getInvoiceId() : string|null
- Getter method for the invoice_id attribute.
- getInvoiceNumber() : string|null
- Getter method for the invoice_number attribute.
- getItemCode() : string|null
- Getter method for the item_code attribute.
- getItemId() : string|null
- Getter method for the item_id attribute.
- getLegacyCategory() : string|null
- Getter method for the legacy_category attribute.
- getLiabilityGlAccountCode() : string|null
- Getter method for the liability_gl_account_code attribute.
- getObject() : string|null
- Getter method for the object attribute.
- getOrigin() : string|null
- Getter method for the origin attribute.
- getOriginalLineItemInvoiceId() : string|null
- Getter method for the original_line_item_invoice_id attribute.
- getOriginTaxAddressSource() : string|null
- Getter method for the origin_tax_address_source attribute.
- getPerformanceObligationId() : string|null
- Getter method for the performance_obligation_id attribute.
- getPlanCode() : string|null
- Getter method for the plan_code attribute.
- getPlanId() : string|null
- Getter method for the plan_id attribute.
- getPreviousLineItemId() : string|null
- Getter method for the previous_line_item_id attribute.
- getProductCode() : string|null
- Getter method for the product_code attribute.
- getProrationRate() : float|null
- Getter method for the proration_rate attribute.
- getQuantity() : int|null
- Getter method for the quantity attribute.
- getQuantityDecimal() : string|null
- Getter method for the quantity_decimal attribute.
- getRefund() : bool|null
- Getter method for the refund attribute.
- getRefundedQuantity() : int|null
- Getter method for the refunded_quantity attribute.
- getRefundedQuantityDecimal() : string|null
- Getter method for the refunded_quantity_decimal attribute.
- getResponse() : Response
- Getter for the Recurly HTTP Response
- getRevenueGlAccountCode() : string|null
- Getter method for the revenue_gl_account_code attribute.
- getRevenueScheduleType() : string|null
- Getter method for the revenue_schedule_type attribute.
- getShippingAddress() : ShippingAddress|null
- Getter method for the shipping_address attribute.
- getStartDate() : string|null
- Getter method for the start_date attribute.
- getState() : string|null
- Getter method for the state attribute.
- getSubscriptionId() : string|null
- Getter method for the subscription_id attribute.
- getSubtotal() : float|null
- Getter method for the subtotal attribute.
- getTax() : float|null
- Getter method for the tax attribute.
- getTaxable() : bool|null
- Getter method for the taxable attribute.
- getTaxCode() : string|null
- Getter method for the tax_code attribute.
- getTaxExempt() : bool|null
- Getter method for the tax_exempt attribute.
- getTaxInclusive() : bool|null
- Getter method for the tax_inclusive attribute.
- getTaxInfo() : TaxInfo|null
- Getter method for the tax_info attribute.
- getType() : string|null
- Getter method for the type attribute.
- getUnitAmount() : float|null
- Getter method for the unit_amount attribute.
- getUnitAmountDecimal() : string|null
- Getter method for the unit_amount_decimal 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.
- setAccountingCode() : void
- Setter method for the accounting_code attribute.
- setAddOnCode() : void
- Setter method for the add_on_code attribute.
- setAddOnId() : void
- Setter method for the add_on_id attribute.
- setAmount() : void
- Setter method for the amount attribute.
- setAvalaraServiceType() : void
- Setter method for the avalara_service_type attribute.
- setAvalaraTransactionType() : void
- Setter method for the avalara_transaction_type attribute.
- setBillForAccountId() : void
- Setter method for the bill_for_account_id attribute.
- setCreatedAt() : void
- Setter method for the created_at attribute.
- setCreditApplied() : void
- Setter method for the credit_applied attribute.
- setCreditReasonCode() : void
- Setter method for the credit_reason_code attribute.
- setCurrency() : void
- Setter method for the currency attribute.
- setCustomFields() : void
- Setter method for the custom_fields attribute.
- setDescription() : void
- Setter method for the description attribute.
- setDestinationTaxAddressSource() : void
- Setter method for the destination_tax_address_source attribute.
- setDiscount() : void
- Setter method for the discount attribute.
- setEndDate() : void
- Setter method for the end_date attribute.
- setExternalSku() : void
- Setter method for the external_sku attribute.
- setId() : void
- Setter method for the id attribute.
- setInvoiceId() : void
- Setter method for the invoice_id attribute.
- setInvoiceNumber() : void
- Setter method for the invoice_number attribute.
- setItemCode() : void
- Setter method for the item_code attribute.
- setItemId() : void
- Setter method for the item_id attribute.
- setLegacyCategory() : void
- Setter method for the legacy_category attribute.
- setLiabilityGlAccountCode() : void
- Setter method for the liability_gl_account_code attribute.
- setObject() : void
- Setter method for the object attribute.
- setOrigin() : void
- Setter method for the origin attribute.
- setOriginalLineItemInvoiceId() : void
- Setter method for the original_line_item_invoice_id attribute.
- setOriginTaxAddressSource() : void
- Setter method for the origin_tax_address_source attribute.
- setPerformanceObligationId() : void
- Setter method for the performance_obligation_id attribute.
- setPlanCode() : void
- Setter method for the plan_code attribute.
- setPlanId() : void
- Setter method for the plan_id attribute.
- setPreviousLineItemId() : void
- Setter method for the previous_line_item_id attribute.
- setProductCode() : void
- Setter method for the product_code attribute.
- setProrationRate() : void
- Setter method for the proration_rate attribute.
- setQuantity() : void
- Setter method for the quantity attribute.
- setQuantityDecimal() : void
- Setter method for the quantity_decimal attribute.
- setRefund() : void
- Setter method for the refund attribute.
- setRefundedQuantity() : void
- Setter method for the refunded_quantity attribute.
- setRefundedQuantityDecimal() : void
- Setter method for the refunded_quantity_decimal attribute.
- setRevenueGlAccountCode() : void
- Setter method for the revenue_gl_account_code attribute.
- setRevenueScheduleType() : void
- Setter method for the revenue_schedule_type attribute.
- setShippingAddress() : void
- Setter method for the shipping_address attribute.
- setStartDate() : void
- Setter method for the start_date attribute.
- setState() : void
- Setter method for the state attribute.
- setSubscriptionId() : void
- Setter method for the subscription_id attribute.
- setSubtotal() : void
- Setter method for the subtotal attribute.
- setTax() : void
- Setter method for the tax attribute.
- setTaxable() : void
- Setter method for the taxable attribute.
- setTaxCode() : void
- Setter method for the tax_code attribute.
- setTaxExempt() : void
- Setter method for the tax_exempt attribute.
- setTaxInclusive() : void
- Setter method for the tax_inclusive attribute.
- setTaxInfo() : void
- Setter method for the tax_info attribute.
- setType() : void
- Setter method for the type attribute.
- setUnitAmount() : void
- Setter method for the unit_amount attribute.
- setUnitAmountDecimal() : void
- Setter method for the unit_amount_decimal 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
= ['setCustomFields' => '\Recurly\Resources\CustomField']
$_account
private
mixed
$_account
$_accounting_code
private
mixed
$_accounting_code
$_add_on_code
private
mixed
$_add_on_code
$_add_on_id
private
mixed
$_add_on_id
$_amount
private
mixed
$_amount
$_avalara_service_type
private
mixed
$_avalara_service_type
$_avalara_transaction_type
private
mixed
$_avalara_transaction_type
$_bill_for_account_id
private
mixed
$_bill_for_account_id
$_created_at
private
mixed
$_created_at
$_credit_applied
private
mixed
$_credit_applied
$_credit_reason_code
private
mixed
$_credit_reason_code
$_currency
private
mixed
$_currency
$_custom_fields
private
mixed
$_custom_fields
$_description
private
mixed
$_description
$_destination_tax_address_source
private
mixed
$_destination_tax_address_source
$_discount
private
mixed
$_discount
$_end_date
private
mixed
$_end_date
$_external_sku
private
mixed
$_external_sku
$_id
private
mixed
$_id
$_invoice_id
private
mixed
$_invoice_id
$_invoice_number
private
mixed
$_invoice_number
$_item_code
private
mixed
$_item_code
$_item_id
private
mixed
$_item_id
$_legacy_category
private
mixed
$_legacy_category
$_liability_gl_account_code
private
mixed
$_liability_gl_account_code
$_object
private
mixed
$_object
$_origin
private
mixed
$_origin
$_origin_tax_address_source
private
mixed
$_origin_tax_address_source
$_original_line_item_invoice_id
private
mixed
$_original_line_item_invoice_id
$_performance_obligation_id
private
mixed
$_performance_obligation_id
$_plan_code
private
mixed
$_plan_code
$_plan_id
private
mixed
$_plan_id
$_previous_line_item_id
private
mixed
$_previous_line_item_id
$_product_code
private
mixed
$_product_code
$_proration_rate
private
mixed
$_proration_rate
$_quantity
private
mixed
$_quantity
$_quantity_decimal
private
mixed
$_quantity_decimal
$_refund
private
mixed
$_refund
$_refunded_quantity
private
mixed
$_refunded_quantity
$_refunded_quantity_decimal
private
mixed
$_refunded_quantity_decimal
$_response
private
mixed
$_response
$_revenue_gl_account_code
private
mixed
$_revenue_gl_account_code
$_revenue_schedule_type
private
mixed
$_revenue_schedule_type
$_shipping_address
private
mixed
$_shipping_address
$_start_date
private
mixed
$_start_date
$_state
private
mixed
$_state
$_subscription_id
private
mixed
$_subscription_id
$_subtotal
private
mixed
$_subtotal
$_tax
private
mixed
$_tax
$_tax_code
private
mixed
$_tax_code
$_tax_exempt
private
mixed
$_tax_exempt
$_tax_inclusive
private
mixed
$_tax_inclusive
$_tax_info
private
mixed
$_tax_info
$_taxable
private
mixed
$_taxable
$_type
private
mixed
$_type
$_unit_amount
private
mixed
$_unit_amount
$_unit_amount_decimal
private
mixed
$_unit_amount_decimal
$_updated_at
private
mixed
$_updated_at
$_uuid
private
mixed
$_uuid
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
getAccount()
Getter method for the account attribute.
public
getAccount() : AccountMini|null
Account mini details
Return values
AccountMini|null —getAccountingCode()
Getter method for the accounting_code attribute.
public
getAccountingCode() : string|null
Internal accounting code to help you reconcile your revenue to the correct ledger. Line items created as part of a subscription invoice will use the plan or add-on's accounting code, otherwise the value will only be present if you define an accounting code when creating the line item.
Return values
string|null —getAddOnCode()
Getter method for the add_on_code attribute.
public
getAddOnCode() : string|null
If the line item is a charge or credit for an add-on, this is its code.
Return values
string|null —getAddOnId()
Getter method for the add_on_id attribute.
public
getAddOnId() : string|null
If the line item is a charge or credit for an add-on this is its ID.
Return values
string|null —getAmount()
Getter method for the amount attribute.
public
getAmount() : float|null
(quantity * unit_amount) - (discount + tax)
Return values
float|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 line 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 line item is taxed. Refer to the documentation for more available t/s types.
Return values
int|null —getBillForAccountId()
Getter method for the bill_for_account_id attribute.
public
getBillForAccountId() : string|null
The UUID of the account responsible for originating the line item.
Return values
string|null —getCreatedAt()
Getter method for the created_at attribute.
public
getCreatedAt() : string|null
When the line item was created.
Return values
string|null —getCreditApplied()
Getter method for the credit_applied attribute.
public
getCreditApplied() : float|null
The amount of credit from this line item that was applied to the invoice.
Return values
float|null —getCreditReasonCode()
Getter method for the credit_reason_code attribute.
public
getCreditReasonCode() : string|null
The reason the credit was given when line item is type=credit
.
Return values
string|null —getCurrency()
Getter method for the currency attribute.
public
getCurrency() : string|null
3-letter ISO 4217 currency code.
Return values
string|null —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> —getDescription()
Getter method for the description attribute.
public
getDescription() : string|null
Description that appears on the invoice. For subscription related items this will be filled in automatically.
Return values
string|null —getDestinationTaxAddressSource()
Getter method for the destination_tax_address_source attribute.
public
getDestinationTaxAddressSource() : string|null
The source of the address that will be used as the destinaion in determining taxes. Available only when the site is on an Elite plan. A value of "destination" refers to the "Customer tax address". A value of "origin" refers to the "Business entity tax address".
Return values
string|null —getDiscount()
Getter method for the discount attribute.
public
getDiscount() : float|null
The discount applied to the line item.
Return values
float|null —getEndDate()
Getter method for the end_date attribute.
public
getEndDate() : string|null
If this date is provided, it indicates the end of a time range.
Return values
string|null —getExternalSku()
Getter method for the external_sku attribute.
public
getExternalSku() : string|null
Optional Stock Keeping Unit assigned to an item. Available when the Credit Invoices feature is enabled.
Return values
string|null —getId()
Getter method for the id attribute.
public
getId() : string|null
Line item ID
Return values
string|null —getInvoiceId()
Getter method for the invoice_id attribute.
public
getInvoiceId() : string|null
Once the line item has been invoiced this will be the invoice's ID.
Return values
string|null —getInvoiceNumber()
Getter method for the invoice_number attribute.
public
getInvoiceNumber() : string|null
Once the line item has been invoiced this will be the invoice's number. If VAT taxation and the Country Invoice Sequencing feature are enabled, invoices will have country-specific invoice numbers for invoices billed to EU countries (ex: FR1001). Non-EU invoices will continue to use the site-level invoice number sequence.
Return values
string|null —getItemCode()
Getter method for the item_code attribute.
public
getItemCode() : string|null
Unique code to identify an item. Available when the Credit Invoices feature is enabled.
Return values
string|null —getItemId()
Getter method for the item_id attribute.
public
getItemId() : string|null
System-generated unique identifier for an item. Available when the Credit Invoices feature is enabled.
Return values
string|null —getLegacyCategory()
Getter method for the legacy_category attribute.
public
getLegacyCategory() : string|null
Category to describe the role of a line item on a legacy invoice:
- "charges" refers to charges being billed for on this invoice.
- "credits" refers to refund or proration credits. This portion of the invoice can be considered a credit memo.
- "applied_credits" refers to previous credits applied to this invoice. See their original_line_item_id to determine where the credit first originated.
- "carryforwards" can be ignored. They exist to consume any remaining credit balance. A new credit with the same amount will be created and placed back on the account.
Return values
string|null —getLiabilityGlAccountCode()
Getter method for the liability_gl_account_code attribute.
public
getLiabilityGlAccountCode() : string|null
Unique code to identify the ledger account. Each code must start
with a letter or number. The following special characters are
allowed: -_.,:
Return values
string|null —getObject()
Getter method for the object attribute.
public
getObject() : string|null
Object type
Return values
string|null —getOrigin()
Getter method for the origin attribute.
public
getOrigin() : string|null
A credit created from an original charge will have the value of the charge's origin.
Return values
string|null —getOriginalLineItemInvoiceId()
Getter method for the original_line_item_invoice_id attribute.
public
getOriginalLineItemInvoiceId() : string|null
The invoice where the credit originated. Will only have a value if the line item is a credit created from a previous credit, or if the credit was created from a charge refund.
Return values
string|null —getOriginTaxAddressSource()
Getter method for the origin_tax_address_source attribute.
public
getOriginTaxAddressSource() : string|null
The source of the address that will be used as the origin in determining taxes. Available only when the site is on an Elite plan. A value of "origin" refers to the "Business entity tax address". A value of "destination" refers to the "Customer tax address".
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 —getPlanCode()
Getter method for the plan_code attribute.
public
getPlanCode() : string|null
If the line item is a charge or credit for a plan or add-on, this is the plan's code.
Return values
string|null —getPlanId()
Getter method for the plan_id attribute.
public
getPlanId() : string|null
If the line item is a charge or credit for a plan or add-on, this is the plan's ID.
Return values
string|null —getPreviousLineItemId()
Getter method for the previous_line_item_id attribute.
public
getPreviousLineItemId() : string|null
Will only have a value if the line item is a credit created from a previous credit, or if the credit was created from a charge refund.
Return values
string|null —getProductCode()
Getter method for the product_code attribute.
public
getProductCode() : string|null
For plan-related line items this will be the plan's code, for add-on related line items it will be the add-on's code. For item-related line items it will be the item's external_sku
.
Return values
string|null —getProrationRate()
Getter method for the proration_rate attribute.
public
getProrationRate() : float|null
When a line item has been prorated, this is the rate of the proration. Proration rates were made available for line items created after March 30, 2017. For line items created prior to that date, the proration rate will be null
, even if the line item was prorated.
Return values
float|null —getQuantity()
Getter method for the quantity attribute.
public
getQuantity() : int|null
This number will be multiplied by the unit amount to compute the subtotal before any discounts or taxes.
Return values
int|null —getQuantityDecimal()
Getter method for the quantity_decimal attribute.
public
getQuantityDecimal() : string|null
A floating-point alternative to Quantity. If this value is present, it will be used in place of Quantity for calculations, and Quantity will be the rounded integer value of this number. This field supports up to 9 decimal places. The Decimal Quantity feature must be enabled to utilize this field.
Return values
string|null —getRefund()
Getter method for the refund attribute.
public
getRefund() : bool|null
Refund?
Return values
bool|null —getRefundedQuantity()
Getter method for the refunded_quantity attribute.
public
getRefundedQuantity() : int|null
For refund charges, the quantity being refunded. For non-refund charges, the total quantity refunded (possibly over multiple refunds).
Return values
int|null —getRefundedQuantityDecimal()
Getter method for the refunded_quantity_decimal attribute.
public
getRefundedQuantityDecimal() : string|null
A floating-point alternative to Refunded Quantity. For refund charges, the quantity being refunded. For non-refund charges, the total quantity refunded (possibly over multiple refunds). The Decimal Quantity feature must be enabled to utilize this field.
Return values
string|null —getResponse()
Getter for the Recurly HTTP Response
public
getResponse() : Response
Return values
Response —The Recurly HTTP Response
getRevenueGlAccountCode()
Getter method for the revenue_gl_account_code attribute.
public
getRevenueGlAccountCode() : string|null
Unique code to identify the ledger account. Each code must start
with a letter or number. The following special characters are
allowed: -_.,:
Return values
string|null —getRevenueScheduleType()
Getter method for the revenue_schedule_type attribute.
public
getRevenueScheduleType() : string|null
Revenue schedule type
Return values
string|null —getShippingAddress()
Getter method for the shipping_address attribute.
public
getShippingAddress() : ShippingAddress|null
Return values
ShippingAddress|null —getStartDate()
Getter method for the start_date attribute.
public
getStartDate() : string|null
If an end date is present, this is value indicates the beginning of a billing time range. If no end date is present it indicates billing for a specific date.
Return values
string|null —getState()
Getter method for the state attribute.
public
getState() : string|null
Pending line items are charges or credits on an account that have not been applied to an invoice yet. Invoiced line items will always have an invoice_id
value.
Return values
string|null —getSubscriptionId()
Getter method for the subscription_id attribute.
public
getSubscriptionId() : string|null
If the line item is a charge or credit for a subscription, this is its ID.
Return values
string|null —getSubtotal()
Getter method for the subtotal attribute.
public
getSubtotal() : float|null
quantity * unit_amount
Return values
float|null —getTax()
Getter method for the tax attribute.
public
getTax() : float|null
The tax amount for the line item.
Return values
float|null —getTaxable()
Getter method for the taxable attribute.
public
getTaxable() : bool|null
true
if the line item is taxable, false
if it is not.
Return values
bool|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 charges, false
applies tax on charges. If not defined, then defaults to the Plan and Site settings. This attribute does not work for credits (negative line items). Credits are always applied post-tax. Pre-tax discounts should use the Coupons feature.
Return values
bool|null —getTaxInclusive()
Getter method for the tax_inclusive attribute.
public
getTaxInclusive() : bool|null
Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to utilize this flag.
Return values
bool|null —getTaxInfo()
Getter method for the tax_info attribute.
public
getTaxInfo() : TaxInfo|null
Only for merchants using Recurly's In-The-Box taxes.
Return values
TaxInfo|null —getType()
Getter method for the type attribute.
public
getType() : string|null
Charges are positive line items that debit the account. Credits are negative line items that credit the account.
Return values
string|null —getUnitAmount()
Getter method for the unit_amount attribute.
public
getUnitAmount() : float|null
Positive amount for a charge, negative amount for a credit.
Return values
float|null —getUnitAmountDecimal()
Getter method for the unit_amount_decimal attribute.
public
getUnitAmountDecimal() : string|null
Positive amount for a charge, negative amount for a credit.
Return values
string|null —getUpdatedAt()
Getter method for the updated_at attribute.
public
getUpdatedAt() : string|null
When the line item was last changed.
Return values
string|null —getUuid()
Getter method for the uuid attribute.
public
getUuid() : string|null
The UUID is useful for matching data with the CSV exports and building URLs into Recurly's UI.
Return values
string|null —setAccount()
Setter method for the account attribute.
public
setAccount(AccountMini $account) : void
Parameters
- $account : AccountMini
Return values
void —setAccountingCode()
Setter method for the accounting_code attribute.
public
setAccountingCode(string $accounting_code) : void
Parameters
- $accounting_code : string
Return values
void —setAddOnCode()
Setter method for the add_on_code attribute.
public
setAddOnCode(string $add_on_code) : void
Parameters
- $add_on_code : string
Return values
void —setAddOnId()
Setter method for the add_on_id attribute.
public
setAddOnId(string $add_on_id) : void
Parameters
- $add_on_id : string
Return values
void —setAmount()
Setter method for the amount attribute.
public
setAmount(float $amount) : void
Parameters
- $amount : float
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 —setBillForAccountId()
Setter method for the bill_for_account_id attribute.
public
setBillForAccountId(string $bill_for_account_id) : void
Parameters
- $bill_for_account_id : 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 —setCreditApplied()
Setter method for the credit_applied attribute.
public
setCreditApplied(float $credit_applied) : void
Parameters
- $credit_applied : float
Return values
void —setCreditReasonCode()
Setter method for the credit_reason_code attribute.
public
setCreditReasonCode(string $credit_reason_code) : void
Parameters
- $credit_reason_code : string
Return values
void —setCurrency()
Setter method for the currency attribute.
public
setCurrency(string $currency) : void
Parameters
- $currency : string
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 —setDescription()
Setter method for the description attribute.
public
setDescription(string $description) : void
Parameters
- $description : string
Return values
void —setDestinationTaxAddressSource()
Setter method for the destination_tax_address_source attribute.
public
setDestinationTaxAddressSource(string $destination_tax_address_source) : void
Parameters
- $destination_tax_address_source : string
Return values
void —setDiscount()
Setter method for the discount attribute.
public
setDiscount(float $discount) : void
Parameters
- $discount : float
Return values
void —setEndDate()
Setter method for the end_date attribute.
public
setEndDate(string $end_date) : void
Parameters
- $end_date : 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 —setInvoiceId()
Setter method for the invoice_id attribute.
public
setInvoiceId(string $invoice_id) : void
Parameters
- $invoice_id : string
Return values
void —setInvoiceNumber()
Setter method for the invoice_number attribute.
public
setInvoiceNumber(string $invoice_number) : void
Parameters
- $invoice_number : string
Return values
void —setItemCode()
Setter method for the item_code attribute.
public
setItemCode(string $item_code) : void
Parameters
- $item_code : 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 —setLegacyCategory()
Setter method for the legacy_category attribute.
public
setLegacyCategory(string $legacy_category) : void
Parameters
- $legacy_category : string
Return values
void —setLiabilityGlAccountCode()
Setter method for the liability_gl_account_code attribute.
public
setLiabilityGlAccountCode(string $liability_gl_account_code) : void
Parameters
- $liability_gl_account_code : string
Return values
void —setObject()
Setter method for the object attribute.
public
setObject(string $object) : void
Parameters
- $object : string
Return values
void —setOrigin()
Setter method for the origin attribute.
public
setOrigin(string $origin) : void
Parameters
- $origin : string
Return values
void —setOriginalLineItemInvoiceId()
Setter method for the original_line_item_invoice_id attribute.
public
setOriginalLineItemInvoiceId(string $original_line_item_invoice_id) : void
Parameters
- $original_line_item_invoice_id : string
Return values
void —setOriginTaxAddressSource()
Setter method for the origin_tax_address_source attribute.
public
setOriginTaxAddressSource(string $origin_tax_address_source) : void
Parameters
- $origin_tax_address_source : 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 —setPlanCode()
Setter method for the plan_code attribute.
public
setPlanCode(string $plan_code) : void
Parameters
- $plan_code : 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 —setPreviousLineItemId()
Setter method for the previous_line_item_id attribute.
public
setPreviousLineItemId(string $previous_line_item_id) : void
Parameters
- $previous_line_item_id : string
Return values
void —setProductCode()
Setter method for the product_code attribute.
public
setProductCode(string $product_code) : void
Parameters
- $product_code : string
Return values
void —setProrationRate()
Setter method for the proration_rate attribute.
public
setProrationRate(float $proration_rate) : void
Parameters
- $proration_rate : float
Return values
void —setQuantity()
Setter method for the quantity attribute.
public
setQuantity(int $quantity) : void
Parameters
- $quantity : int
Return values
void —setQuantityDecimal()
Setter method for the quantity_decimal attribute.
public
setQuantityDecimal(string $quantity_decimal) : void
Parameters
- $quantity_decimal : string
Return values
void —setRefund()
Setter method for the refund attribute.
public
setRefund(bool $refund) : void
Parameters
- $refund : bool
Return values
void —setRefundedQuantity()
Setter method for the refunded_quantity attribute.
public
setRefundedQuantity(int $refunded_quantity) : void
Parameters
- $refunded_quantity : int
Return values
void —setRefundedQuantityDecimal()
Setter method for the refunded_quantity_decimal attribute.
public
setRefundedQuantityDecimal(string $refunded_quantity_decimal) : void
Parameters
- $refunded_quantity_decimal : string
Return values
void —setRevenueGlAccountCode()
Setter method for the revenue_gl_account_code attribute.
public
setRevenueGlAccountCode(string $revenue_gl_account_code) : void
Parameters
- $revenue_gl_account_code : 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 —setShippingAddress()
Setter method for the shipping_address attribute.
public
setShippingAddress(ShippingAddress $shipping_address) : void
Parameters
- $shipping_address : ShippingAddress
Return values
void —setStartDate()
Setter method for the start_date attribute.
public
setStartDate(string $start_date) : void
Parameters
- $start_date : string
Return values
void —setState()
Setter method for the state attribute.
public
setState(string $state) : void
Parameters
- $state : string
Return values
void —setSubscriptionId()
Setter method for the subscription_id attribute.
public
setSubscriptionId(string $subscription_id) : void
Parameters
- $subscription_id : string
Return values
void —setSubtotal()
Setter method for the subtotal attribute.
public
setSubtotal(float $subtotal) : void
Parameters
- $subtotal : float
Return values
void —setTax()
Setter method for the tax attribute.
public
setTax(float $tax) : void
Parameters
- $tax : float
Return values
void —setTaxable()
Setter method for the taxable attribute.
public
setTaxable(bool $taxable) : void
Parameters
- $taxable : bool
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 —setTaxInclusive()
Setter method for the tax_inclusive attribute.
public
setTaxInclusive(bool $tax_inclusive) : void
Parameters
- $tax_inclusive : bool
Return values
void —setTaxInfo()
Setter method for the tax_info attribute.
public
setTaxInfo(TaxInfo $tax_info) : void
Parameters
- $tax_info : TaxInfo
Return values
void —setType()
Setter method for the type attribute.
public
setType(string $type) : void
Parameters
- $type : string
Return values
void —setUnitAmount()
Setter method for the unit_amount attribute.
public
setUnitAmount(float $unit_amount) : void
Parameters
- $unit_amount : float
Return values
void —setUnitAmountDecimal()
Setter method for the unit_amount_decimal attribute.
public
setUnitAmountDecimal(string $unit_amount_decimal) : void
Parameters
- $unit_amount_decimal : 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