PHP Class Chargify, scalr

A Chargify API class for CodeIgniter
Show file Open project: scalr/scalr Class Usage Examples

Public Methods

Method Description
__construct ( $api_key, $domain )
applyCoupon ( $subscriptionId, $couponCode )
cancelSubscription ( $subscriptionId, $reason = 'Canceling the subscription via the API. Requested by customer.' )
createComponentUsage ( $subscriptionId, $componentId, $quantity, $memo )
createCustomer ( $scalr_client_id, $email, $first_name, $last_name, $org = "" ) : ChargifyCustomer
createSubscription ( $scalrAccountId, $package, $ccNumber, $ccExpMonth, $ccExpYear, $ccCvv, $clientInfo = false, $postalCode = false )
getCouponDetails ( $couponCode )
getCustomerById ( $customerId )
getCustomerSubscriptionByCId ( $client_id ) : ChargifySubscription
getStatements ( $subscriptionId )
getSubscription ( $subscriptionId )
getSubscriptionByCustomerId ( $clientId )
getSubscriptionComponents ( $subscriptionId )
reactivateSubscription ( $subscriptionId )
setComponentValue ( $subscriptionId, $componentId, $value )
updateSubscription ( $subscriptionId, $ccNumber, $ccCvv, $ccExpMonth, $ccExpYear, $fName, $lName, $postalCode = false )
upgradeSubscription ( $subscriptionId, $package, $includeTrial = false )

Protected Methods

Method Description
sendRequest ( $uri, $method, $data = null )

Method Details

__construct() public method

public __construct ( $api_key, $domain )

applyCoupon() public method

public applyCoupon ( $subscriptionId, $couponCode )

cancelSubscription() public method

public cancelSubscription ( $subscriptionId, $reason = 'Canceling the subscription via the API. Requested by customer.' )

createComponentUsage() public method

public createComponentUsage ( $subscriptionId, $componentId, $quantity, $memo )

createCustomer() public method

public createCustomer ( $scalr_client_id, $email, $first_name, $last_name, $org = "" ) : ChargifyCustomer
return ChargifyCustomer

createSubscription() public method

public createSubscription ( $scalrAccountId, $package, $ccNumber, $ccExpMonth, $ccExpYear, $ccCvv, $clientInfo = false, $postalCode = false )

getCouponDetails() public method

public getCouponDetails ( $couponCode )

getCustomerById() public method

public getCustomerById ( $customerId )

getCustomerSubscriptionByCId() public method

public getCustomerSubscriptionByCId ( $client_id ) : ChargifySubscription
return ChargifySubscription

getStatements() public method

public getStatements ( $subscriptionId )

getSubscription() public method

public getSubscription ( $subscriptionId )

getSubscriptionByCustomerId() public method

public getSubscriptionByCustomerId ( $clientId )

getSubscriptionComponents() public method

public getSubscriptionComponents ( $subscriptionId )

reactivateSubscription() public method

public reactivateSubscription ( $subscriptionId )

sendRequest() protected method

protected sendRequest ( $uri, $method, $data = null )

setComponentValue() public method

public setComponentValue ( $subscriptionId, $componentId, $value )

updateSubscription() public method

public updateSubscription ( $subscriptionId, $ccNumber, $ccCvv, $ccExpMonth, $ccExpYear, $fName, $lName, $postalCode = false )

upgradeSubscription() public method

public upgradeSubscription ( $subscriptionId, $package, $includeTrial = false )