PaymentMethod extends RecurlyResource
Table of Contents
- $array_hints : mixed
- $_account_type : mixed
- $_billing_agreement_id : mixed
- $_card_network_preference : mixed
- $_card_type : mixed
- $_cc_bin_country : mixed
- $_exp_month : mixed
- $_exp_year : mixed
- $_first_six : mixed
- $_gateway_attributes : mixed
- $_gateway_code : mixed
- $_gateway_token : mixed
- $_last_four : mixed
- $_last_two : mixed
- $_name_on_account : mixed
- $_object : mixed
- $_response : mixed
- $_routing_number : mixed
- $_routing_number_bank : mixed
- $_username : 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.
- getAccountType() : string|null
- Getter method for the account_type attribute.
- getBillingAgreementId() : string|null
- Getter method for the billing_agreement_id attribute.
- getCardNetworkPreference() : string|null
- Getter method for the card_network_preference attribute.
- getCardType() : string|null
- Getter method for the card_type attribute.
- getCcBinCountry() : string|null
- Getter method for the cc_bin_country attribute.
- getExpMonth() : int|null
- Getter method for the exp_month attribute.
- getExpYear() : int|null
- Getter method for the exp_year attribute.
- getFirstSix() : string|null
- Getter method for the first_six attribute.
- getGatewayAttributes() : GatewayAttributes|null
- Getter method for the gateway_attributes attribute.
- getGatewayCode() : string|null
- Getter method for the gateway_code attribute.
- getGatewayToken() : string|null
- Getter method for the gateway_token attribute.
- getLastFour() : string|null
- Getter method for the last_four attribute.
- getLastTwo() : string|null
- Getter method for the last_two attribute.
- getNameOnAccount() : string|null
- Getter method for the name_on_account attribute.
- getObject() : string|null
- Getter method for the object attribute.
- getResponse() : Response
- Getter for the Recurly HTTP Response
- getRoutingNumber() : string|null
- Getter method for the routing_number attribute.
- getRoutingNumberBank() : string|null
- Getter method for the routing_number_bank attribute.
- getUsername() : string|null
- Getter method for the username attribute.
- setAccountType() : void
- Setter method for the account_type attribute.
- setBillingAgreementId() : void
- Setter method for the billing_agreement_id attribute.
- setCardNetworkPreference() : void
- Setter method for the card_network_preference attribute.
- setCardType() : void
- Setter method for the card_type attribute.
- setCcBinCountry() : void
- Setter method for the cc_bin_country attribute.
- setExpMonth() : void
- Setter method for the exp_month attribute.
- setExpYear() : void
- Setter method for the exp_year attribute.
- setFirstSix() : void
- Setter method for the first_six attribute.
- setGatewayAttributes() : void
- Setter method for the gateway_attributes attribute.
- setGatewayCode() : void
- Setter method for the gateway_code attribute.
- setGatewayToken() : void
- Setter method for the gateway_token attribute.
- setLastFour() : void
- Setter method for the last_four attribute.
- setLastTwo() : void
- Setter method for the last_two attribute.
- setNameOnAccount() : void
- Setter method for the name_on_account attribute.
- setObject() : void
- Setter method for the object attribute.
- setRoutingNumber() : void
- Setter method for the routing_number attribute.
- setRoutingNumberBank() : void
- Setter method for the routing_number_bank attribute.
- setUsername() : void
- Setter method for the username 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
= []
$_account_type
private
mixed
$_account_type
$_billing_agreement_id
private
mixed
$_billing_agreement_id
$_card_network_preference
private
mixed
$_card_network_preference
$_card_type
private
mixed
$_card_type
$_cc_bin_country
private
mixed
$_cc_bin_country
$_exp_month
private
mixed
$_exp_month
$_exp_year
private
mixed
$_exp_year
$_first_six
private
mixed
$_first_six
$_gateway_attributes
private
mixed
$_gateway_attributes
$_gateway_code
private
mixed
$_gateway_code
$_gateway_token
private
mixed
$_gateway_token
$_last_four
private
mixed
$_last_four
$_last_two
private
mixed
$_last_two
$_name_on_account
private
mixed
$_name_on_account
$_object
private
mixed
$_object
$_response
private
mixed
$_response
$_routing_number
private
mixed
$_routing_number
$_routing_number_bank
private
mixed
$_routing_number_bank
$_username
private
mixed
$_username
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
getAccountType()
Getter method for the account_type attribute.
public
getAccountType() : string|null
The bank account type. Only present for ACH payment methods.
Return values
string|null —getBillingAgreementId()
Getter method for the billing_agreement_id attribute.
public
getBillingAgreementId() : string|null
Billing Agreement identifier. Only present for Amazon or Paypal payment methods.
Return values
string|null —getCardNetworkPreference()
Getter method for the card_network_preference attribute.
public
getCardNetworkPreference() : string|null
Represents the card network preference associated with the billing info for dual badged cards. Must be a supported card network.
Return values
string|null —getCardType()
Getter method for the card_type attribute.
public
getCardType() : string|null
Visa, MasterCard, American Express, Discover, JCB, etc.
Return values
string|null —getCcBinCountry()
Getter method for the cc_bin_country attribute.
public
getCcBinCountry() : string|null
The 2-letter ISO 3166-1 alpha-2 country code associated with the credit card BIN, if known by Recurly. Available on the BillingInfo object only. Available when the BIN country lookup feature is enabled.
Return values
string|null —getExpMonth()
Getter method for the exp_month attribute.
public
getExpMonth() : int|null
Expiration month.
Return values
int|null —getExpYear()
Getter method for the exp_year attribute.
public
getExpYear() : int|null
Expiration year.
Return values
int|null —getFirstSix()
Getter method for the first_six attribute.
public
getFirstSix() : string|null
Credit card number's first six digits.
Return values
string|null —getGatewayAttributes()
Getter method for the gateway_attributes attribute.
public
getGatewayAttributes() : GatewayAttributes|null
Gateway specific attributes associated with this PaymentMethod
Return values
GatewayAttributes|null —getGatewayCode()
Getter method for the gateway_code attribute.
public
getGatewayCode() : string|null
An identifier for a specific payment gateway.
Return values
string|null —getGatewayToken()
Getter method for the gateway_token attribute.
public
getGatewayToken() : string|null
A token used in place of a credit card in order to perform transactions.
Return values
string|null —getLastFour()
Getter method for the last_four attribute.
public
getLastFour() : string|null
Credit card number's last four digits. Will refer to bank account if payment method is ACH.
Return values
string|null —getLastTwo()
Getter method for the last_two attribute.
public
getLastTwo() : string|null
The IBAN bank account's last two digits.
Return values
string|null —getNameOnAccount()
Getter method for the name_on_account attribute.
public
getNameOnAccount() : string|null
The name associated with the bank account.
Return values
string|null —getObject()
Getter method for the object attribute.
public
getObject() : string|null
Return values
string|null —getResponse()
Getter for the Recurly HTTP Response
public
getResponse() : Response
Return values
Response —The Recurly HTTP Response
getRoutingNumber()
Getter method for the routing_number attribute.
public
getRoutingNumber() : string|null
The bank account's routing number. Only present for ACH payment methods.
Return values
string|null —getRoutingNumberBank()
Getter method for the routing_number_bank attribute.
public
getRoutingNumberBank() : string|null
The bank name of this routing number.
Return values
string|null —getUsername()
Getter method for the username attribute.
public
getUsername() : string|null
Username of the associated payment method. Currently only associated with Venmo.
Return values
string|null —setAccountType()
Setter method for the account_type attribute.
public
setAccountType(string $account_type) : void
Parameters
- $account_type : string
Return values
void —setBillingAgreementId()
Setter method for the billing_agreement_id attribute.
public
setBillingAgreementId(string $billing_agreement_id) : void
Parameters
- $billing_agreement_id : string
Return values
void —setCardNetworkPreference()
Setter method for the card_network_preference attribute.
public
setCardNetworkPreference(string $card_network_preference) : void
Parameters
- $card_network_preference : string
Return values
void —setCardType()
Setter method for the card_type attribute.
public
setCardType(string $card_type) : void
Parameters
- $card_type : string
Return values
void —setCcBinCountry()
Setter method for the cc_bin_country attribute.
public
setCcBinCountry(string $cc_bin_country) : void
Parameters
- $cc_bin_country : string
Return values
void —setExpMonth()
Setter method for the exp_month attribute.
public
setExpMonth(int $exp_month) : void
Parameters
- $exp_month : int
Return values
void —setExpYear()
Setter method for the exp_year attribute.
public
setExpYear(int $exp_year) : void
Parameters
- $exp_year : int
Return values
void —setFirstSix()
Setter method for the first_six attribute.
public
setFirstSix(string $first_six) : void
Parameters
- $first_six : string
Return values
void —setGatewayAttributes()
Setter method for the gateway_attributes attribute.
public
setGatewayAttributes(GatewayAttributes $gateway_attributes) : void
Parameters
- $gateway_attributes : GatewayAttributes
Return values
void —setGatewayCode()
Setter method for the gateway_code attribute.
public
setGatewayCode(string $gateway_code) : void
Parameters
- $gateway_code : string
Return values
void —setGatewayToken()
Setter method for the gateway_token attribute.
public
setGatewayToken(string $gateway_token) : void
Parameters
- $gateway_token : string
Return values
void —setLastFour()
Setter method for the last_four attribute.
public
setLastFour(string $last_four) : void
Parameters
- $last_four : string
Return values
void —setLastTwo()
Setter method for the last_two attribute.
public
setLastTwo(string $last_two) : void
Parameters
- $last_two : string
Return values
void —setNameOnAccount()
Setter method for the name_on_account attribute.
public
setNameOnAccount(string $name_on_account) : void
Parameters
- $name_on_account : string
Return values
void —setObject()
Setter method for the object attribute.
public
setObject(string $object) : void
Parameters
- $object : string
Return values
void —setRoutingNumber()
Setter method for the routing_number attribute.
public
setRoutingNumber(string $routing_number) : void
Parameters
- $routing_number : string
Return values
void —setRoutingNumberBank()
Setter method for the routing_number_bank attribute.
public
setRoutingNumberBank(string $routing_number_bank) : void
Parameters
- $routing_number_bank : string
Return values
void —setUsername()
Setter method for the username attribute.
public
setUsername(string $username) : void
Parameters
- $username : 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