Scalr_Billing::setComponentValue PHP Method

setComponentValue() public method

public setComponentValue ( $componentId, $value )
    public function setComponentValue($componentId, $value)
    {
        $this->chargify->setComponentValue($this->subscriptionId, $componentId, $value);
    }

Usage Example

Example #1
0
 public function xSetEmergSupportAction()
 {
     $value = $this->getParam('action') == 'subscribe' ? '1' : '0';
     if ($value == 1) {
         $this->user->getAccount()->setSetting(Scalr_Account::SETTING_BILLING_EMERG_SUPPORT_PENDING, 1);
         $this->user->getAccount()->setSetting(Scalr_Account::SETTING_BILLING_EMERG_SUPPORT_DATE, time());
     } else {
         $this->user->getAccount()->setSetting(Scalr_Account::SETTING_BILLING_EMERG_SUPPORT_PENDING, 0);
     }
     $this->billing->setComponentValue(6026, $value);
     $this->response->success();
 }