public function getCustomerIsActive($code = null, $remainActiveThroughEndOfPeriod = false) {
		$subscription = $this->getCustomerSubscription($code);
		if ($subscription['canceledDatetime']) {
			if (strtotime($subscription['canceledDatetime']) <= time()) {
				if ($remainActiveThroughEndOfPeriod) {
					$invoice = $this->getCustomerInvoice($code);
					if (strtotime($invoice['billingDatetime']) > time()) {
						return true;
					}
				}
				return false;
			}
		}
		return true;
	}
public function getCustomerIsActive($code = null, $remainActiveThroughEndOfPeriod = false) {
		$subscription = $this->getCustomerSubscription($code);
		if ($subscription['canceledDatetime']) {
			if (strtotime($subscription['canceledDatetime']) <= time()) {
				if ($remainActiveThroughEndOfPeriod) {
					$invoice = $this->getCustomerInvoice($code);
					if (strtotime($invoice['billingDatetime']) > time()) {
						return true;
					}
				}
				return false;
			}
		}
		return true;
	}
public function getCustomerIsActive ( $ code = null , $ remainActiveThroughEndOfPeriod = false ) { $ subscription = $ this -> getCustomerSubscription ( $ code ) ; if ( $ subscription [ 'canceledDatetime' ] ) { if ( strtotime ( $ subscription [ 'canceledDatetime' ] ) <= time ( ) ) { if ( $ remainActiveThroughEndOfPeriod ) { $ invoice = $ this -> getCustomerInvoice ( $ code ) ; if ( strtotime ( $ invoice [ 'billingDatetime' ] ) > time ( ) ) { return true ; } } return false ; } } return true ; }
Whether or not a customer's subscription is active and in good standing

@param $code string your code for the customer - required if more than one customer is in the response
@param $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
@throws CheddarGetter_Response_Exception if the response type is incompatible or if a $code is not provided and the response contains more than one customer
@return array
Whether or not a customer s subscription is active and in good standing