Subscription extends RecurlyResource
Table of Contents
- $array_hints : mixed
- $_account : mixed
- $_action_result : mixed
- $_activated_at : mixed
- $_active_invoice_id : mixed
- $_add_ons : mixed
- $_add_ons_total : mixed
- $_auto_renew : mixed
- $_bank_account_authorized_at : mixed
- $_billing_info_id : mixed
- $_business_entity_id : mixed
- $_canceled_at : mixed
- $_collection_method : mixed
- $_converted_at : mixed
- $_coupon_redemptions : mixed
- $_created_at : mixed
- $_currency : mixed
- $_current_period_ends_at : mixed
- $_current_period_started_at : mixed
- $_current_term_ends_at : mixed
- $_current_term_started_at : mixed
- $_custom_fields : mixed
- $_customer_notes : mixed
- $_expiration_reason : mixed
- $_expires_at : mixed
- $_gateway_code : mixed
- $_id : mixed
- $_net_terms : mixed
- $_net_terms_type : mixed
- $_object : mixed
- $_paused_at : mixed
- $_pending_change : mixed
- $_plan : mixed
- $_po_number : mixed
- $_quantity : mixed
- $_ramp_intervals : mixed
- $_remaining_billing_cycles : mixed
- $_remaining_pause_cycles : mixed
- $_renewal_billing_cycles : mixed
- $_response : mixed
- $_revenue_schedule_type : mixed
- $_shipping : mixed
- $_started_with_gift : mixed
- $_state : mixed
- $_subtotal : mixed
- $_tax : mixed
- $_tax_inclusive : mixed
- $_tax_info : mixed
- $_terms_and_conditions : mixed
- $_total : mixed
- $_total_billing_cycles : mixed
- $_trial_ends_at : mixed
- $_trial_started_at : mixed
- $_unit_amount : 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.
- getActionResult() : object|null
- Getter method for the action_result attribute.
- getActivatedAt() : string|null
- Getter method for the activated_at attribute.
- getActiveInvoiceId() : string|null
- Getter method for the active_invoice_id attribute.
- getAddOns() : array<string|int, mixed>
- Getter method for the add_ons attribute.
- getAddOnsTotal() : float|null
- Getter method for the add_ons_total attribute.
- getAutoRenew() : bool|null
- Getter method for the auto_renew attribute.
- getBankAccountAuthorizedAt() : string|null
- Getter method for the bank_account_authorized_at attribute.
- getBillingInfoId() : string|null
- Getter method for the billing_info_id attribute.
- getBusinessEntityId() : string|null
- Getter method for the business_entity_id attribute.
- getCanceledAt() : string|null
- Getter method for the canceled_at attribute.
- getCollectionMethod() : string|null
- Getter method for the collection_method attribute.
- getConvertedAt() : string|null
- Getter method for the converted_at attribute.
- getCouponRedemptions() : array<string|int, mixed>
- Getter method for the coupon_redemptions attribute.
- getCreatedAt() : string|null
- Getter method for the created_at attribute.
- getCurrency() : string|null
- Getter method for the currency attribute.
- getCurrentPeriodEndsAt() : string|null
- Getter method for the current_period_ends_at attribute.
- getCurrentPeriodStartedAt() : string|null
- Getter method for the current_period_started_at attribute.
- getCurrentTermEndsAt() : string|null
- Getter method for the current_term_ends_at attribute.
- getCurrentTermStartedAt() : string|null
- Getter method for the current_term_started_at attribute.
- getCustomerNotes() : string|null
- Getter method for the customer_notes attribute.
- getCustomFields() : array<string|int, mixed>
- Getter method for the custom_fields attribute.
- getExpirationReason() : string|null
- Getter method for the expiration_reason attribute.
- getExpiresAt() : string|null
- Getter method for the expires_at attribute.
- getGatewayCode() : string|null
- Getter method for the gateway_code attribute.
- getId() : string|null
- Getter method for the id attribute.
- getNetTerms() : int|null
- Getter method for the net_terms attribute.
- getNetTermsType() : string|null
- Getter method for the net_terms_type attribute.
- getObject() : string|null
- Getter method for the object attribute.
- getPausedAt() : string|null
- Getter method for the paused_at attribute.
- getPendingChange() : SubscriptionChange|null
- Getter method for the pending_change attribute.
- getPlan() : PlanMini|null
- Getter method for the plan attribute.
- getPoNumber() : string|null
- Getter method for the po_number attribute.
- getQuantity() : int|null
- Getter method for the quantity attribute.
- getRampIntervals() : array<string|int, mixed>
- Getter method for the ramp_intervals attribute.
- getRemainingBillingCycles() : int|null
- Getter method for the remaining_billing_cycles attribute.
- getRemainingPauseCycles() : int|null
- Getter method for the remaining_pause_cycles attribute.
- getRenewalBillingCycles() : int|null
- Getter method for the renewal_billing_cycles attribute.
- getResponse() : Response
- Getter for the Recurly HTTP Response
- getRevenueScheduleType() : string|null
- Getter method for the revenue_schedule_type attribute.
- getShipping() : SubscriptionShipping|null
- Getter method for the shipping attribute.
- getStartedWithGift() : bool|null
- Getter method for the started_with_gift attribute.
- getState() : string|null
- Getter method for the state attribute.
- getSubtotal() : float|null
- Getter method for the subtotal attribute.
- getTax() : float|null
- Getter method for the tax attribute.
- getTaxInclusive() : bool|null
- Getter method for the tax_inclusive attribute.
- getTaxInfo() : TaxInfo|null
- Getter method for the tax_info attribute.
- getTermsAndConditions() : string|null
- Getter method for the terms_and_conditions attribute.
- getTotal() : float|null
- Getter method for the total attribute.
- getTotalBillingCycles() : int|null
- Getter method for the total_billing_cycles attribute.
- getTrialEndsAt() : string|null
- Getter method for the trial_ends_at attribute.
- getTrialStartedAt() : string|null
- Getter method for the trial_started_at attribute.
- getUnitAmount() : float|null
- Getter method for the unit_amount 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.
- setActionResult() : void
- Setter method for the action_result attribute.
- setActivatedAt() : void
- Setter method for the activated_at attribute.
- setActiveInvoiceId() : void
- Setter method for the active_invoice_id attribute.
- setAddOns() : void
- Setter method for the add_ons attribute.
- setAddOnsTotal() : void
- Setter method for the add_ons_total attribute.
- setAutoRenew() : void
- Setter method for the auto_renew attribute.
- setBankAccountAuthorizedAt() : void
- Setter method for the bank_account_authorized_at attribute.
- setBillingInfoId() : void
- Setter method for the billing_info_id attribute.
- setBusinessEntityId() : void
- Setter method for the business_entity_id attribute.
- setCanceledAt() : void
- Setter method for the canceled_at attribute.
- setCollectionMethod() : void
- Setter method for the collection_method attribute.
- setConvertedAt() : void
- Setter method for the converted_at attribute.
- setCouponRedemptions() : void
- Setter method for the coupon_redemptions attribute.
- setCreatedAt() : void
- Setter method for the created_at attribute.
- setCurrency() : void
- Setter method for the currency attribute.
- setCurrentPeriodEndsAt() : void
- Setter method for the current_period_ends_at attribute.
- setCurrentPeriodStartedAt() : void
- Setter method for the current_period_started_at attribute.
- setCurrentTermEndsAt() : void
- Setter method for the current_term_ends_at attribute.
- setCurrentTermStartedAt() : void
- Setter method for the current_term_started_at attribute.
- setCustomerNotes() : void
- Setter method for the customer_notes attribute.
- setCustomFields() : void
- Setter method for the custom_fields attribute.
- setExpirationReason() : void
- Setter method for the expiration_reason attribute.
- setExpiresAt() : void
- Setter method for the expires_at attribute.
- setGatewayCode() : void
- Setter method for the gateway_code attribute.
- setId() : void
- Setter method for the id attribute.
- setNetTerms() : void
- Setter method for the net_terms attribute.
- setNetTermsType() : void
- Setter method for the net_terms_type attribute.
- setObject() : void
- Setter method for the object attribute.
- setPausedAt() : void
- Setter method for the paused_at attribute.
- setPendingChange() : void
- Setter method for the pending_change attribute.
- setPlan() : void
- Setter method for the plan attribute.
- setPoNumber() : void
- Setter method for the po_number attribute.
- setQuantity() : void
- Setter method for the quantity attribute.
- setRampIntervals() : void
- Setter method for the ramp_intervals attribute.
- setRemainingBillingCycles() : void
- Setter method for the remaining_billing_cycles attribute.
- setRemainingPauseCycles() : void
- Setter method for the remaining_pause_cycles attribute.
- setRenewalBillingCycles() : void
- Setter method for the renewal_billing_cycles attribute.
- setRevenueScheduleType() : void
- Setter method for the revenue_schedule_type attribute.
- setShipping() : void
- Setter method for the shipping attribute.
- setStartedWithGift() : void
- Setter method for the started_with_gift attribute.
- setState() : void
- Setter method for the state attribute.
- setSubtotal() : void
- Setter method for the subtotal attribute.
- setTax() : void
- Setter method for the tax attribute.
- setTaxInclusive() : void
- Setter method for the tax_inclusive attribute.
- setTaxInfo() : void
- Setter method for the tax_info attribute.
- setTermsAndConditions() : void
- Setter method for the terms_and_conditions attribute.
- setTotal() : void
- Setter method for the total attribute.
- setTotalBillingCycles() : void
- Setter method for the total_billing_cycles attribute.
- setTrialEndsAt() : void
- Setter method for the trial_ends_at attribute.
- setTrialStartedAt() : void
- Setter method for the trial_started_at attribute.
- setUnitAmount() : void
- Setter method for the unit_amount 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
= ['setAddOns' => '\Recurly\Resources\SubscriptionAddOn', 'setCouponRedemptions' => '\Recurly\Resources\CouponRedemptionMini', 'setCustomFields' => '\Recurly\Resources\CustomField', 'setRampIntervals' => '\Recurly\Resources\SubscriptionRampIntervalResponse']
$_account
private
mixed
$_account
$_action_result
private
mixed
$_action_result
$_activated_at
private
mixed
$_activated_at
$_active_invoice_id
private
mixed
$_active_invoice_id
$_add_ons
private
mixed
$_add_ons
$_add_ons_total
private
mixed
$_add_ons_total
$_auto_renew
private
mixed
$_auto_renew
$_bank_account_authorized_at
private
mixed
$_bank_account_authorized_at
$_billing_info_id
private
mixed
$_billing_info_id
$_business_entity_id
private
mixed
$_business_entity_id
$_canceled_at
private
mixed
$_canceled_at
$_collection_method
private
mixed
$_collection_method
$_converted_at
private
mixed
$_converted_at
$_coupon_redemptions
private
mixed
$_coupon_redemptions
$_created_at
private
mixed
$_created_at
$_currency
private
mixed
$_currency
$_current_period_ends_at
private
mixed
$_current_period_ends_at
$_current_period_started_at
private
mixed
$_current_period_started_at
$_current_term_ends_at
private
mixed
$_current_term_ends_at
$_current_term_started_at
private
mixed
$_current_term_started_at
$_custom_fields
private
mixed
$_custom_fields
$_customer_notes
private
mixed
$_customer_notes
$_expiration_reason
private
mixed
$_expiration_reason
$_expires_at
private
mixed
$_expires_at
$_gateway_code
private
mixed
$_gateway_code
$_id
private
mixed
$_id
$_net_terms
private
mixed
$_net_terms
$_net_terms_type
private
mixed
$_net_terms_type
$_object
private
mixed
$_object
$_paused_at
private
mixed
$_paused_at
$_pending_change
private
mixed
$_pending_change
$_plan
private
mixed
$_plan
$_po_number
private
mixed
$_po_number
$_quantity
private
mixed
$_quantity
$_ramp_intervals
private
mixed
$_ramp_intervals
$_remaining_billing_cycles
private
mixed
$_remaining_billing_cycles
$_remaining_pause_cycles
private
mixed
$_remaining_pause_cycles
$_renewal_billing_cycles
private
mixed
$_renewal_billing_cycles
$_response
private
mixed
$_response
$_revenue_schedule_type
private
mixed
$_revenue_schedule_type
$_shipping
private
mixed
$_shipping
$_started_with_gift
private
mixed
$_started_with_gift
$_state
private
mixed
$_state
$_subtotal
private
mixed
$_subtotal
$_tax
private
mixed
$_tax
$_tax_inclusive
private
mixed
$_tax_inclusive
$_tax_info
private
mixed
$_tax_info
$_terms_and_conditions
private
mixed
$_terms_and_conditions
$_total
private
mixed
$_total
$_total_billing_cycles
private
mixed
$_total_billing_cycles
$_trial_ends_at
private
mixed
$_trial_ends_at
$_trial_started_at
private
mixed
$_trial_started_at
$_unit_amount
private
mixed
$_unit_amount
$_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 —getActionResult()
Getter method for the action_result attribute.
public
getActionResult() : object|null
Action result params to be used in Recurly-JS to complete a payment when using asynchronous payment methods, e.g., Boleto, iDEAL and Sofort.
Return values
object|null —getActivatedAt()
Getter method for the activated_at attribute.
public
getActivatedAt() : string|null
Activated at
Return values
string|null —getActiveInvoiceId()
Getter method for the active_invoice_id attribute.
public
getActiveInvoiceId() : string|null
The invoice ID of the latest invoice created for an active subscription.
Return values
string|null —getAddOns()
Getter method for the add_ons attribute.
public
getAddOns() : array<string|int, mixed>
Add-ons
Return values
array<string|int, mixed> —getAddOnsTotal()
Getter method for the add_ons_total attribute.
public
getAddOnsTotal() : float|null
Total price of add-ons
Return values
float|null —getAutoRenew()
Getter method for the auto_renew attribute.
public
getAutoRenew() : bool|null
Whether the subscription renews at the end of its term.
Return values
bool|null —getBankAccountAuthorizedAt()
Getter method for the bank_account_authorized_at attribute.
public
getBankAccountAuthorizedAt() : string|null
Recurring subscriptions paid with ACH will have this attribute set. This timestamp is used for alerting customers to reauthorize in 3 years in accordance with NACHA rules. If a subscription becomes inactive or the billing info is no longer a bank account, this timestamp is cleared.
Return values
string|null —getBillingInfoId()
Getter method for the billing_info_id attribute.
public
getBillingInfoId() : string|null
Billing Info ID.
Return values
string|null —getBusinessEntityId()
Getter method for the business_entity_id attribute.
public
getBusinessEntityId() : string|null
The ID of the business entity associated with the subscription. This will be null
if the subscription relies on resolving the business entity during renewal.
Return values
string|null —getCanceledAt()
Getter method for the canceled_at attribute.
public
getCanceledAt() : string|null
Canceled at
Return values
string|null —getCollectionMethod()
Getter method for the collection_method attribute.
public
getCollectionMethod() : string|null
Collection method
Return values
string|null —getConvertedAt()
Getter method for the converted_at attribute.
public
getConvertedAt() : string|null
When the subscription was converted from a gift card.
Return values
string|null —getCouponRedemptions()
Getter method for the coupon_redemptions attribute.
public
getCouponRedemptions() : array<string|int, mixed>
Returns subscription level coupon redemptions that are tied to this subscription.
Return values
array<string|int, mixed> —getCreatedAt()
Getter method for the created_at attribute.
public
getCreatedAt() : string|null
Created at
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 —getCurrentPeriodEndsAt()
Getter method for the current_period_ends_at attribute.
public
getCurrentPeriodEndsAt() : string|null
Current billing period ends at
Return values
string|null —getCurrentPeriodStartedAt()
Getter method for the current_period_started_at attribute.
public
getCurrentPeriodStartedAt() : string|null
Current billing period started at
Return values
string|null —getCurrentTermEndsAt()
Getter method for the current_term_ends_at attribute.
public
getCurrentTermEndsAt() : string|null
When the term ends. This is calculated by a plan's interval and total_billing_cycles
in a term. Subscription changes with a timeframe=renewal
will be applied on this date.
Return values
string|null —getCurrentTermStartedAt()
Getter method for the current_term_started_at attribute.
public
getCurrentTermStartedAt() : string|null
The start date of the term when the first billing period starts. The subscription term is the length of time that a customer will be committed to a subscription. A term can span multiple billing periods.
Return values
string|null —getCustomerNotes()
Getter method for the customer_notes attribute.
public
getCustomerNotes() : string|null
Customer notes
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> —getExpirationReason()
Getter method for the expiration_reason attribute.
public
getExpirationReason() : string|null
Expiration reason
Return values
string|null —getExpiresAt()
Getter method for the expires_at attribute.
public
getExpiresAt() : string|null
Expires at
Return values
string|null —getGatewayCode()
Getter method for the gateway_code attribute.
public
getGatewayCode() : string|null
If present, this subscription's transactions will use the payment gateway with this code.
Return values
string|null —getId()
Getter method for the id attribute.
public
getId() : string|null
Subscription ID
Return values
string|null —getNetTerms()
Getter method for the net_terms attribute.
public
getNetTerms() : int|null
Integer paired with Net Terms Type
and representing the number
of days past the current date (for net
Net Terms Type) or days after
the last day of the current month (for eom
Net Terms Type) that the
invoice will become past due. For manual
collection method, an additional 24 hours is
added to ensure the customer has the entire last day to make payment before
becoming past due. For example:
If an invoice is due net 0
, it is due 'On Receipt' and will become past due 24 hours after it's created.
If an invoice is due net 30
, it will become past due at 31 days exactly.
If an invoice is due eom 30
, it will become past due 31 days from the last day of the current month.
For automatic
collection method, the additional 24 hours is not added. For example, On-Receipt is due immediately, and net 30
will become due exactly 30 days from invoice generation, at which point Recurly will attempt collection.
When eom
Net Terms Type is passed, the value for Net Terms
is restricted to 0, 15, 30, 45, 60, or 90
.
For more information on how net terms work with manual
collection visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms)
or visit (https://docs.recurly.com/docs/automatic-invoicing-terms#section-collection-terms) for information about net terms using automatic
collection.
Return values
int|null —getNetTermsType()
Getter method for the net_terms_type attribute.
public
getNetTermsType() : string|null
Optionally supplied string that may be either net
or eom
(end-of-month).
When net
, an invoice becomes past due the specified number of Net Terms
days from the current date.
When eom
an invoice becomes past due the specified number of Net Terms
days from the last day of the current month.
Return values
string|null —getObject()
Getter method for the object attribute.
public
getObject() : string|null
Object type
Return values
string|null —getPausedAt()
Getter method for the paused_at attribute.
public
getPausedAt() : string|null
Null unless subscription is paused or will pause at the end of the current billing period.
Return values
string|null —getPendingChange()
Getter method for the pending_change attribute.
public
getPendingChange() : SubscriptionChange|null
Subscription Change
Return values
SubscriptionChange|null —getPlan()
Getter method for the plan attribute.
public
getPlan() : PlanMini|null
Just the important parts.
Return values
PlanMini|null —getPoNumber()
Getter method for the po_number attribute.
public
getPoNumber() : string|null
For manual invoicing, this identifies the PO number associated with the subscription.
Return values
string|null —getQuantity()
Getter method for the quantity attribute.
public
getQuantity() : int|null
Subscription quantity
Return values
int|null —getRampIntervals()
Getter method for the ramp_intervals attribute.
public
getRampIntervals() : array<string|int, mixed>
The ramp intervals representing the pricing schedule for the subscription.
Return values
array<string|int, mixed> —getRemainingBillingCycles()
Getter method for the remaining_billing_cycles attribute.
public
getRemainingBillingCycles() : int|null
The remaining billing cycles in the current term.
Return values
int|null —getRemainingPauseCycles()
Getter method for the remaining_pause_cycles attribute.
public
getRemainingPauseCycles() : int|null
Null unless subscription is paused or will pause at the end of the current billing period.
Return values
int|null —getRenewalBillingCycles()
Getter method for the renewal_billing_cycles attribute.
public
getRenewalBillingCycles() : int|null
If auto_renew=true
, when a term completes, total_billing_cycles
takes this value as the length of subsequent terms. Defaults to the plan's total_billing_cycles
.
Return values
int|null —getResponse()
Getter for the Recurly HTTP Response
public
getResponse() : Response
Return values
Response —The Recurly HTTP Response
getRevenueScheduleType()
Getter method for the revenue_schedule_type attribute.
public
getRevenueScheduleType() : string|null
Revenue schedule type
Return values
string|null —getShipping()
Getter method for the shipping attribute.
public
getShipping() : SubscriptionShipping|null
Subscription shipping details
Return values
SubscriptionShipping|null —getStartedWithGift()
Getter method for the started_with_gift attribute.
public
getStartedWithGift() : bool|null
Whether the subscription was started with a gift certificate.
Return values
bool|null —getState()
Getter method for the state attribute.
public
getState() : string|null
State
Return values
string|null —getSubtotal()
Getter method for the subtotal attribute.
public
getSubtotal() : float|null
Estimated total, before tax.
Return values
float|null —getTax()
Getter method for the tax attribute.
public
getTax() : float|null
Only for merchants using Recurly's In-The-Box taxes.
Return values
float|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 —getTermsAndConditions()
Getter method for the terms_and_conditions attribute.
public
getTermsAndConditions() : string|null
Terms and conditions
Return values
string|null —getTotal()
Getter method for the total attribute.
public
getTotal() : float|null
Estimated total
Return values
float|null —getTotalBillingCycles()
Getter method for the total_billing_cycles attribute.
public
getTotalBillingCycles() : int|null
The number of cycles/billing periods in a term. When remaining_billing_cycles=0
, if auto_renew=true
the subscription will renew and a new term will begin, otherwise the subscription will expire.
Return values
int|null —getTrialEndsAt()
Getter method for the trial_ends_at attribute.
public
getTrialEndsAt() : string|null
Trial period ends at
Return values
string|null —getTrialStartedAt()
Getter method for the trial_started_at attribute.
public
getTrialStartedAt() : string|null
Trial period started at
Return values
string|null —getUnitAmount()
Getter method for the unit_amount attribute.
public
getUnitAmount() : float|null
Subscription unit price
Return values
float|null —getUpdatedAt()
Getter method for the updated_at attribute.
public
getUpdatedAt() : string|null
Last updated at
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 —setActionResult()
Setter method for the action_result attribute.
public
setActionResult(object $action_result) : void
Parameters
- $action_result : object
Return values
void —setActivatedAt()
Setter method for the activated_at attribute.
public
setActivatedAt(string $activated_at) : void
Parameters
- $activated_at : string
Return values
void —setActiveInvoiceId()
Setter method for the active_invoice_id attribute.
public
setActiveInvoiceId(string $active_invoice_id) : void
Parameters
- $active_invoice_id : string
Return values
void —setAddOns()
Setter method for the add_ons attribute.
public
setAddOns(array<string|int, mixed> $add_ons) : void
Parameters
- $add_ons : array<string|int, mixed>
Return values
void —setAddOnsTotal()
Setter method for the add_ons_total attribute.
public
setAddOnsTotal(float $add_ons_total) : void
Parameters
- $add_ons_total : float
Return values
void —setAutoRenew()
Setter method for the auto_renew attribute.
public
setAutoRenew(bool $auto_renew) : void
Parameters
- $auto_renew : bool
Return values
void —setBankAccountAuthorizedAt()
Setter method for the bank_account_authorized_at attribute.
public
setBankAccountAuthorizedAt(string $bank_account_authorized_at) : void
Parameters
- $bank_account_authorized_at : string
Return values
void —setBillingInfoId()
Setter method for the billing_info_id attribute.
public
setBillingInfoId(string $billing_info_id) : void
Parameters
- $billing_info_id : string
Return values
void —setBusinessEntityId()
Setter method for the business_entity_id attribute.
public
setBusinessEntityId(string $business_entity_id) : void
Parameters
- $business_entity_id : string
Return values
void —setCanceledAt()
Setter method for the canceled_at attribute.
public
setCanceledAt(string $canceled_at) : void
Parameters
- $canceled_at : string
Return values
void —setCollectionMethod()
Setter method for the collection_method attribute.
public
setCollectionMethod(string $collection_method) : void
Parameters
- $collection_method : string
Return values
void —setConvertedAt()
Setter method for the converted_at attribute.
public
setConvertedAt(string $converted_at) : void
Parameters
- $converted_at : string
Return values
void —setCouponRedemptions()
Setter method for the coupon_redemptions attribute.
public
setCouponRedemptions(array<string|int, mixed> $coupon_redemptions) : void
Parameters
- $coupon_redemptions : array<string|int, mixed>
Return values
void —setCreatedAt()
Setter method for the created_at attribute.
public
setCreatedAt(string $created_at) : void
Parameters
- $created_at : string
Return values
void —setCurrency()
Setter method for the currency attribute.
public
setCurrency(string $currency) : void
Parameters
- $currency : string
Return values
void —setCurrentPeriodEndsAt()
Setter method for the current_period_ends_at attribute.
public
setCurrentPeriodEndsAt(string $current_period_ends_at) : void
Parameters
- $current_period_ends_at : string
Return values
void —setCurrentPeriodStartedAt()
Setter method for the current_period_started_at attribute.
public
setCurrentPeriodStartedAt(string $current_period_started_at) : void
Parameters
- $current_period_started_at : string
Return values
void —setCurrentTermEndsAt()
Setter method for the current_term_ends_at attribute.
public
setCurrentTermEndsAt(string $current_term_ends_at) : void
Parameters
- $current_term_ends_at : string
Return values
void —setCurrentTermStartedAt()
Setter method for the current_term_started_at attribute.
public
setCurrentTermStartedAt(string $current_term_started_at) : void
Parameters
- $current_term_started_at : string
Return values
void —setCustomerNotes()
Setter method for the customer_notes attribute.
public
setCustomerNotes(string $customer_notes) : void
Parameters
- $customer_notes : 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 —setExpirationReason()
Setter method for the expiration_reason attribute.
public
setExpirationReason(string $expiration_reason) : void
Parameters
- $expiration_reason : 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 —setGatewayCode()
Setter method for the gateway_code attribute.
public
setGatewayCode(string $gateway_code) : void
Parameters
- $gateway_code : string
Return values
void —setId()
Setter method for the id attribute.
public
setId(string $id) : void
Parameters
- $id : string
Return values
void —setNetTerms()
Setter method for the net_terms attribute.
public
setNetTerms(int $net_terms) : void
Parameters
- $net_terms : int
Return values
void —setNetTermsType()
Setter method for the net_terms_type attribute.
public
setNetTermsType(string $net_terms_type) : void
Parameters
- $net_terms_type : string
Return values
void —setObject()
Setter method for the object attribute.
public
setObject(string $object) : void
Parameters
- $object : string
Return values
void —setPausedAt()
Setter method for the paused_at attribute.
public
setPausedAt(string $paused_at) : void
Parameters
- $paused_at : string
Return values
void —setPendingChange()
Setter method for the pending_change attribute.
public
setPendingChange(SubscriptionChange $pending_change) : void
Parameters
- $pending_change : SubscriptionChange
Return values
void —setPlan()
Setter method for the plan attribute.
public
setPlan(PlanMini $plan) : void
Parameters
- $plan : PlanMini
Return values
void —setPoNumber()
Setter method for the po_number attribute.
public
setPoNumber(string $po_number) : void
Parameters
- $po_number : string
Return values
void —setQuantity()
Setter method for the quantity attribute.
public
setQuantity(int $quantity) : void
Parameters
- $quantity : int
Return values
void —setRampIntervals()
Setter method for the ramp_intervals attribute.
public
setRampIntervals(array<string|int, mixed> $ramp_intervals) : void
Parameters
- $ramp_intervals : array<string|int, mixed>
Return values
void —setRemainingBillingCycles()
Setter method for the remaining_billing_cycles attribute.
public
setRemainingBillingCycles(int $remaining_billing_cycles) : void
Parameters
- $remaining_billing_cycles : int
Return values
void —setRemainingPauseCycles()
Setter method for the remaining_pause_cycles attribute.
public
setRemainingPauseCycles(int $remaining_pause_cycles) : void
Parameters
- $remaining_pause_cycles : int
Return values
void —setRenewalBillingCycles()
Setter method for the renewal_billing_cycles attribute.
public
setRenewalBillingCycles(int $renewal_billing_cycles) : void
Parameters
- $renewal_billing_cycles : int
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 —setShipping()
Setter method for the shipping attribute.
public
setShipping(SubscriptionShipping $shipping) : void
Parameters
- $shipping : SubscriptionShipping
Return values
void —setStartedWithGift()
Setter method for the started_with_gift attribute.
public
setStartedWithGift(bool $started_with_gift) : void
Parameters
- $started_with_gift : bool
Return values
void —setState()
Setter method for the state attribute.
public
setState(string $state) : void
Parameters
- $state : 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 —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 —setTermsAndConditions()
Setter method for the terms_and_conditions attribute.
public
setTermsAndConditions(string $terms_and_conditions) : void
Parameters
- $terms_and_conditions : string
Return values
void —setTotal()
Setter method for the total attribute.
public
setTotal(float $total) : void
Parameters
- $total : float
Return values
void —setTotalBillingCycles()
Setter method for the total_billing_cycles attribute.
public
setTotalBillingCycles(int $total_billing_cycles) : void
Parameters
- $total_billing_cycles : int
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 —setUnitAmount()
Setter method for the unit_amount attribute.
public
setUnitAmount(float $unit_amount) : void
Parameters
- $unit_amount : float
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