protected function _instantiateCoupon(AnConfig $data)
    {
        $this->coupon_code = $data->coupon_code;
        $this->coupon = $this->getService('repos:subscriptions.coupon')
                             ->find(array('code' => $this->coupon_code));

        if (!$this->coupon) {
            $this->coupon_code = '';
        } else {
            $this->order->setCoupon($this->coupon);
        }
    }
protected function _instantiateCoupon(AnConfig $data)
    {
        $this->coupon_code = $data->coupon_code;
        $this->coupon = $this->getService('repos:subscriptions.coupon')
                             ->find(array('code' => $this->coupon_code));

        if (!$this->coupon) {
            $this->coupon_code = '';
        } else {
            $this->order->setCoupon($this->coupon);
        }
    }
protected function _instantiateCoupon ( AnConfig $ data ) { $ this -> coupon_code = $ data -> coupon_code ; $ this -> coupon = $ this -> getService ( 'repos:subscriptions.coupon' ) -> find ( array ( 'code' => $ this -> coupon_code ) ) ; if ( ! $ this -> coupon ) { $ this -> coupon_code = '' ; } else { $ this -> order -> setCoupon ( $ this -> coupon ) ; } }
Instantiate coupon.

@param AnConfig $data The request data
Instantiate coupon .