GiftCard extends RecurlyResource
Table of Contents
- $array_hints : mixed
- $_balance : mixed
- $_canceled_at : mixed
- $_created_at : mixed
- $_currency : mixed
- $_delivered_at : mixed
- $_delivery : mixed
- $_gifter_account_id : mixed
- $_id : mixed
- $_liability_gl_account_id : mixed
- $_object : mixed
- $_performance_obligation_id : mixed
- $_product_code : mixed
- $_purchase_invoice_id : mixed
- $_recipient_account_id : mixed
- $_redeemed_at : mixed
- $_redemption_code : mixed
- $_redemption_invoice_id : mixed
- $_response : mixed
- $_revenue_gl_account_id : mixed
- $_unit_amount : 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.
- getBalance() : float|null
- Getter method for the balance attribute.
- getCanceledAt() : string|null
- Getter method for the canceled_at attribute.
- getCreatedAt() : string|null
- Getter method for the created_at attribute.
- getCurrency() : string|null
- Getter method for the currency attribute.
- getDeliveredAt() : string|null
- Getter method for the delivered_at attribute.
- getDelivery() : GiftCardDelivery|null
- Getter method for the delivery attribute.
- getGifterAccountId() : string|null
- Getter method for the gifter_account_id attribute.
- getId() : string|null
- Getter method for the id attribute.
- getLiabilityGlAccountId() : string|null
- Getter method for the liability_gl_account_id attribute.
- getObject() : string|null
- Getter method for the object attribute.
- getPerformanceObligationId() : string|null
- Getter method for the performance_obligation_id attribute.
- getProductCode() : string|null
- Getter method for the product_code attribute.
- getPurchaseInvoiceId() : string|null
- Getter method for the purchase_invoice_id attribute.
- getRecipientAccountId() : string|null
- Getter method for the recipient_account_id attribute.
- getRedeemedAt() : string|null
- Getter method for the redeemed_at attribute.
- getRedemptionCode() : string|null
- Getter method for the redemption_code attribute.
- getRedemptionInvoiceId() : string|null
- Getter method for the redemption_invoice_id attribute.
- getResponse() : Response
- Getter for the Recurly HTTP Response
- getRevenueGlAccountId() : string|null
- Getter method for the revenue_gl_account_id attribute.
- getUnitAmount() : float|null
- Getter method for the unit_amount attribute.
- getUpdatedAt() : string|null
- Getter method for the updated_at attribute.
- setBalance() : void
- Setter method for the balance attribute.
- setCanceledAt() : void
- Setter method for the canceled_at attribute.
- setCreatedAt() : void
- Setter method for the created_at attribute.
- setCurrency() : void
- Setter method for the currency attribute.
- setDeliveredAt() : void
- Setter method for the delivered_at attribute.
- setDelivery() : void
- Setter method for the delivery attribute.
- setGifterAccountId() : void
- Setter method for the gifter_account_id attribute.
- setId() : void
- Setter method for the id attribute.
- setLiabilityGlAccountId() : void
- Setter method for the liability_gl_account_id attribute.
- setObject() : void
- Setter method for the object attribute.
- setPerformanceObligationId() : void
- Setter method for the performance_obligation_id attribute.
- setProductCode() : void
- Setter method for the product_code attribute.
- setPurchaseInvoiceId() : void
- Setter method for the purchase_invoice_id attribute.
- setRecipientAccountId() : void
- Setter method for the recipient_account_id attribute.
- setRedeemedAt() : void
- Setter method for the redeemed_at attribute.
- setRedemptionCode() : void
- Setter method for the redemption_code attribute.
- setRedemptionInvoiceId() : void
- Setter method for the redemption_invoice_id attribute.
- setRevenueGlAccountId() : void
- Setter method for the revenue_gl_account_id attribute.
- setUnitAmount() : void
- Setter method for the unit_amount 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
= []
$_balance
private
mixed
$_balance
$_canceled_at
private
mixed
$_canceled_at
$_created_at
private
mixed
$_created_at
$_currency
private
mixed
$_currency
$_delivered_at
private
mixed
$_delivered_at
$_delivery
private
mixed
$_delivery
$_gifter_account_id
private
mixed
$_gifter_account_id
$_id
private
mixed
$_id
$_liability_gl_account_id
private
mixed
$_liability_gl_account_id
$_object
private
mixed
$_object
$_performance_obligation_id
private
mixed
$_performance_obligation_id
$_product_code
private
mixed
$_product_code
$_purchase_invoice_id
private
mixed
$_purchase_invoice_id
$_recipient_account_id
private
mixed
$_recipient_account_id
$_redeemed_at
private
mixed
$_redeemed_at
$_redemption_code
private
mixed
$_redemption_code
$_redemption_invoice_id
private
mixed
$_redemption_invoice_id
$_response
private
mixed
$_response
$_revenue_gl_account_id
private
mixed
$_revenue_gl_account_id
$_unit_amount
private
mixed
$_unit_amount
$_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 $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
getBalance()
Getter method for the balance attribute.
public
getBalance() : float|null
The remaining credit on the recipient account associated with this gift card. Only has a value once the gift card has been redeemed. Can be used to create gift card balance displays for your customers.
Return values
float|null —getCanceledAt()
Getter method for the canceled_at attribute.
public
getCanceledAt() : string|null
When the gift card was canceled.
Return values
string|null —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 —getDeliveredAt()
Getter method for the delivered_at attribute.
public
getDeliveredAt() : string|null
When the gift card was sent to the recipient by Recurly via email, if method was email and the "Gift Card Delivery" email template was enabled. This will be empty for post delivery or email delivery where the email template was disabled.
Return values
string|null —getDelivery()
Getter method for the delivery attribute.
public
getDelivery() : GiftCardDelivery|null
The delivery details for the gift card.
Return values
GiftCardDelivery|null —getGifterAccountId()
Getter method for the gifter_account_id attribute.
public
getGifterAccountId() : string|null
The ID of the account that purchased the gift card.
Return values
string|null —getId()
Getter method for the id attribute.
public
getId() : string|null
Gift card 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 —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 —getProductCode()
Getter method for the product_code attribute.
public
getProductCode() : string|null
The product code or SKU of the gift card product.
Return values
string|null —getPurchaseInvoiceId()
Getter method for the purchase_invoice_id attribute.
public
getPurchaseInvoiceId() : string|null
The ID of the invoice for the gift card purchase made by the gifter.
Return values
string|null —getRecipientAccountId()
Getter method for the recipient_account_id attribute.
public
getRecipientAccountId() : string|null
The ID of the account that redeemed the gift card redemption code. Does not have a value until gift card is redeemed.
Return values
string|null —getRedeemedAt()
Getter method for the redeemed_at attribute.
public
getRedeemedAt() : string|null
When the gift card was redeemed by the recipient.
Return values
string|null —getRedemptionCode()
Getter method for the redemption_code attribute.
public
getRedemptionCode() : string|null
The unique redemption code for the gift card, generated by Recurly. Will be 16 characters, alphanumeric, displayed uppercase, but accepted in any case at redemption. Used by the recipient account to create a credit in the amount of the unit_amount
on their account.
Return values
string|null —getRedemptionInvoiceId()
Getter method for the redemption_invoice_id attribute.
public
getRedemptionInvoiceId() : string|null
The ID of the invoice for the gift card redemption made by the recipient. Does not have a value until gift card is redeemed.
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 —getUnitAmount()
Getter method for the unit_amount attribute.
public
getUnitAmount() : float|null
The amount of the gift card, which is the amount of the charge to the gifter account and the amount of credit that is applied to the recipient account upon successful redemption.
Return values
float|null —getUpdatedAt()
Getter method for the updated_at attribute.
public
getUpdatedAt() : string|null
Last updated at
Return values
string|null —setBalance()
Setter method for the balance attribute.
public
setBalance(float $balance) : void
Parameters
- $balance : float
Return values
void —setCanceledAt()
Setter method for the canceled_at attribute.
public
setCanceledAt(string $canceled_at) : void
Parameters
- $canceled_at : string
Return values
void —setCreatedAt()
Setter method for the created_at attribute.
public
setCreatedAt(string $created_at) : void
Parameters
- $created_at : string
Return values
void —setCurrency()
Setter method for the currency attribute.
public
setCurrency(string $currency) : void
Parameters
- $currency : string
Return values
void —setDeliveredAt()
Setter method for the delivered_at attribute.
public
setDeliveredAt(string $delivered_at) : void
Parameters
- $delivered_at : string
Return values
void —setDelivery()
Setter method for the delivery attribute.
public
setDelivery(GiftCardDelivery $delivery) : void
Parameters
- $delivery : GiftCardDelivery
Return values
void —setGifterAccountId()
Setter method for the gifter_account_id attribute.
public
setGifterAccountId(string $gifter_account_id) : void
Parameters
- $gifter_account_id : 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 —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 —setProductCode()
Setter method for the product_code attribute.
public
setProductCode(string $product_code) : void
Parameters
- $product_code : string
Return values
void —setPurchaseInvoiceId()
Setter method for the purchase_invoice_id attribute.
public
setPurchaseInvoiceId(string $purchase_invoice_id) : void
Parameters
- $purchase_invoice_id : string
Return values
void —setRecipientAccountId()
Setter method for the recipient_account_id attribute.
public
setRecipientAccountId(string $recipient_account_id) : void
Parameters
- $recipient_account_id : string
Return values
void —setRedeemedAt()
Setter method for the redeemed_at attribute.
public
setRedeemedAt(string $redeemed_at) : void
Parameters
- $redeemed_at : string
Return values
void —setRedemptionCode()
Setter method for the redemption_code attribute.
public
setRedemptionCode(string $redemption_code) : void
Parameters
- $redemption_code : string
Return values
void —setRedemptionInvoiceId()
Setter method for the redemption_invoice_id attribute.
public
setRedemptionInvoiceId(string $redemption_invoice_id) : void
Parameters
- $redemption_invoice_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 —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 —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