GiftCardDelivery extends RecurlyResource
Table of Contents
- $array_hints : mixed
- $_deliver_at : mixed
- $_email_address : mixed
- $_first_name : mixed
- $_gifter_name : mixed
- $_last_name : mixed
- $_method : mixed
- $_personal_message : mixed
- $_recipient_address : mixed
- $_response : 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.
- getDeliverAt() : string|null
- Getter method for the deliver_at attribute.
- getEmailAddress() : string|null
- Getter method for the email_address attribute.
- getFirstName() : string|null
- Getter method for the first_name attribute.
- getGifterName() : string|null
- Getter method for the gifter_name attribute.
- getLastName() : string|null
- Getter method for the last_name attribute.
- getMethod() : string|null
- Getter method for the method attribute.
- getPersonalMessage() : string|null
- Getter method for the personal_message attribute.
- getRecipientAddress() : Address|null
- Getter method for the recipient_address attribute.
- getResponse() : Response
- Getter for the Recurly HTTP Response
- setDeliverAt() : void
- Setter method for the deliver_at attribute.
- setEmailAddress() : void
- Setter method for the email_address attribute.
- setFirstName() : void
- Setter method for the first_name attribute.
- setGifterName() : void
- Setter method for the gifter_name attribute.
- setLastName() : void
- Setter method for the last_name attribute.
- setMethod() : void
- Setter method for the method attribute.
- setPersonalMessage() : void
- Setter method for the personal_message attribute.
- setRecipientAddress() : void
- Setter method for the recipient_address 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
= []
$_deliver_at
private
mixed
$_deliver_at
$_email_address
private
mixed
$_email_address
$_first_name
private
mixed
$_first_name
$_gifter_name
private
mixed
$_gifter_name
$_last_name
private
mixed
$_last_name
$_method
private
mixed
$_method
$_personal_message
private
mixed
$_personal_message
$_recipient_address
private
mixed
$_recipient_address
$_response
private
mixed
$_response
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
getDeliverAt()
Getter method for the deliver_at attribute.
public
getDeliverAt() : string|null
When the gift card should be delivered to the recipient. If null, the gift card will be delivered immediately. If a datetime is provided, the delivery will be in an hourly window, rounding down. For example, 6:23 pm will be in the 6:00 pm hourly batch.
Return values
string|null —getEmailAddress()
Getter method for the email_address attribute.
public
getEmailAddress() : string|null
The email address of the recipient.
Return values
string|null —getFirstName()
Getter method for the first_name attribute.
public
getFirstName() : string|null
The first name of the recipient.
Return values
string|null —getGifterName()
Getter method for the gifter_name attribute.
public
getGifterName() : string|null
The name of the gifter for the purpose of a message displayed to the recipient.
Return values
string|null —getLastName()
Getter method for the last_name attribute.
public
getLastName() : string|null
The last name of the recipient.
Return values
string|null —getMethod()
Getter method for the method attribute.
public
getMethod() : string|null
Whether the delivery method is email or postal service.
Return values
string|null —getPersonalMessage()
Getter method for the personal_message attribute.
public
getPersonalMessage() : string|null
The personal message from the gifter to the recipient.
Return values
string|null —getRecipientAddress()
Getter method for the recipient_address attribute.
public
getRecipientAddress() : Address|null
Address information for the recipient.
Return values
Address|null —getResponse()
Getter for the Recurly HTTP Response
public
getResponse() : Response
Return values
Response —The Recurly HTTP Response
setDeliverAt()
Setter method for the deliver_at attribute.
public
setDeliverAt(string $deliver_at) : void
Parameters
- $deliver_at : string
Return values
void —setEmailAddress()
Setter method for the email_address attribute.
public
setEmailAddress(string $email_address) : void
Parameters
- $email_address : string
Return values
void —setFirstName()
Setter method for the first_name attribute.
public
setFirstName(string $first_name) : void
Parameters
- $first_name : string
Return values
void —setGifterName()
Setter method for the gifter_name attribute.
public
setGifterName(string $gifter_name) : void
Parameters
- $gifter_name : string
Return values
void —setLastName()
Setter method for the last_name attribute.
public
setLastName(string $last_name) : void
Parameters
- $last_name : string
Return values
void —setMethod()
Setter method for the method attribute.
public
setMethod(string $method) : void
Parameters
- $method : string
Return values
void —setPersonalMessage()
Setter method for the personal_message attribute.
public
setPersonalMessage(string $personal_message) : void
Parameters
- $personal_message : string
Return values
void —setRecipientAddress()
Setter method for the recipient_address attribute.
public
setRecipientAddress(Address $recipient_address) : void
Parameters
- $recipient_address : Address
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