$_responseType
$_responseType : string
The type of response (customers or plans or promotions or error)
Response object
getPlan(mixed $code) : array
Get an array representation of a single plan node
mixed | $code | string your code for the plan - required if more than one plan is in the response |
if the response type is incompatible or if a $code is not provided and the response contains more than one plan
getPlanItems(mixed $code) : array
Get an array representation of all of the plan items
mixed | $code | string your code for the plan - required if more than one plan is in the response |
if the response type is incompatible or if a $code is not provided and the response contains more than one plan
getPlanItem(mixed $code, mixed $itemCode) : array
Get an array representation of a single plan item node
mixed | $code | string your code for the plan - required if more than one plan is in the response |
mixed | $itemCode | your code for the item - required if more than one item is in the response |
if the response type is incompatible or if a $code is not provided and the response contains more than one plan
getPromotion(mixed $couponCode) : array
Get an array representation of a single promotion node
mixed | $couponCode | string your code for the coupon within the promotion - required if more than one promotion is in the response |
if the response type is incompatible or if a $code is not provided and the response contains more than one promotion
getCustomer(mixed $code) : array
Get an array representation of a single customer node
mixed | $code | string your code for the customer - required if more than one customer is in the response |
if the response type is incompatible or if a $code is not provided and the response contains more than one customer
getCustomerSubscription(mixed $code) : array
Get an array representation of a single customer's current subscription
mixed | $code | string your code for the customer - required if more than one customer is in the response |
if the response type is incompatible or if a $code is not provided and the response contains more than one customer
getCustomerIsActive(mixed $code, mixed $remainActiveThroughEndOfPeriod) : array
Whether or not a customer's subscription is active and in good standing
mixed | $code | string your code for the customer - required if more than one customer is in the response |
mixed | $remainActiveThroughEndOfPeriod | bool Set to true if you'd like the account to remain active until the end of the current payment period rather than inactive at the moment of cancelation |
if the response type is incompatible or if a $code is not provided and the response contains more than one customer
getCustomerIsWaitingForPayPal(mixed $code) : array
Is this customer's account pending paypal preapproval confirmation?
mixed | $code | string your code for the customer - required if more than one customer is in the response |
if the response type is incompatible or if a $code is not provided and the response contains more than one customer
getCustomerSubscriptions(mixed $code) : array
Get an array representation of a single customer's subscriptions (history)
mixed | $code | string your code for the customer - required if more than one customer is in the response |
if the response type is incompatible or if a $code is not provided and the response contains more than one customer
getCustomerPlan(mixed $code) : array
Get an array representation of a single customer's currently subscribed plan
mixed | $code | string your code for the customer - required if more than one customer is in the response |
if the response type is incompatible or if a $code is not provided and the response contains more than one customer
getCustomerInvoice(mixed $code) : array
Get an array representation of a single customer's current invoice
mixed | $code | string your code for the customer - required if more than one customer is in the response |
if the response type is incompatible or if a $code is not provided and the response contains more than one customer
getCustomerLastBilledInvoice(mixed $code) : array
Get an array representation of a single customer's last billed invoice
Returns the most recent subscription invoice that is billable before now. This could be a successfully billed invoice, one that has been transacted unsuccessfully, or one that has not yet been transacted at all. Includes all invoice types ('one-time' and 'subscription')
mixed | $code | string your code for the customer - required if more than one customer is in the response |
if the response type is incompatible or if a $code is not provided and the response contains more than one customer
getCustomerInvoices(mixed $code) : array|false
Get an array representation of a single customer's invoices
mixed | $code | string your code for the customer - required if more than one customer is in the response |
if the response type is incompatible or if a $code is not provided and the response contains more than one customer
getCustomerTransactions(mixed $code) : array|false
Get an array representation of a single customer's transactions
mixed | $code | string your code for the customer - required if more than one customer is in the response |
if the response type is incompatible or if a $code is not provided and the response contains more than one customer
getCustomerLastTransaction(mixed $code) : array|false
Get an array representation of a single customer's last transaction (successful or otherwise)
mixed | $code | string your code for the customer - required if more than one customer is in the response |
if the response type is incompatible or if a $code is not provided and the response contains more than one customer
getCustomerOutstandingInvoices(mixed $code) : array|false
Get an array representation of a single customer's outstanding invoices
mixed | $code | string your code for the customer - required if more than one customer is in the response |
if the response type is incompatible or if a $code is not provided and the response contains more than one customer
getCustomerItemQuantity(mixed $code, mixed $itemCode) : array
Get an array of a customer's item quantity and quantity included
mixed | $code | string your code for the plan - required if more than one plan is in the response |
mixed | $itemCode | your code for the item - required if more than one item is in the response |
if the response type is incompatible or if a $code is not provided and the response contains more than one customer or if a $itemCode is not provided and the plan contains more than one tracked item
2 keys: 'item' (item config for this plan) and 'quantity' the customer's current quantity usage
getCustomerItemQuantityRemaining(mixed $code, mixed $itemCode) : string
Get remaining quantity (quantity included minus current quantity)
mixed | $code | string your code for the plan - required if more than one plan is in the response |
mixed | $itemCode | your code for the item - required if more than one item is in the response |
if the response type is incompatible or if a $code is not provided and the response contains more than one customer or if a $itemCode is not provided and the plan contains more than one tracked item
getCustomerItemQuantityOverage(mixed $code, mixed $itemCode) : string
Get quantity usage greater than included quantity
mixed | $code | string your code for the plan - required if more than one plan is in the response |
mixed | $itemCode | your code for the item - required if more than one item is in the response |
if the response type is incompatible or if a $code is not provided and the response contains more than one customer or if a $itemCode is not provided and the plan contains more than one tracked item
getCustomerItemQuantityOverageCost(mixed $code, mixed $itemCode) : string
Get current item overage cost
mixed | $code | string your code for the plan - required if more than one plan is in the response |
mixed | $itemCode | your code for the item - required if more than one item is in the response |
if the response type is incompatible or if a $code is not provided and the response contains more than one customer or if a $itemCode is not provided and the plan contains more than one tracked item
handleEmbeddedErrors() : boolean
Checks for embedded errors and if found, throws an exception containing the first error
Embedded errors typically occur when some transaction-related action is performed as part of another request. For example, if a customer is created and subscribed to a paid plan with a setup fee, the customer is created and the credit card is validated and then a transaction is run for the amount of the setup fee. If the transaction fails, there will be an embedded error with information about the failed transaction.
if there are embedded errors in the response
false if no embedded errors