Resume the cancelled subscription.

@return $this
@throws \LogicException
434676
public function resume()
    {
        if (! $this->onGracePeriod()) {
            throw new LogicException('Unable to resume subscription that is not within grace period.');
        }

        $subscription = $this->asBraintreeSubscription();

        BraintreeSubscription::update($subscription->id, [
            'neverExpires' => true,
            'numberOfBillingCycles' => null,
        ]);

        $this->fill(['ends_at' => null])->save();

        return $this;
    }
640441
public function reset()
    {
        $this->extend_view = null;
        $this->vars = [];
        $this->block_content = [];
        $this->block_stack = [];

        return $this;
    }
101290
public function delete()
    {
        if ($this->state === State::PENDING) {
            throw new LogicException('You cannot delete pending models');
        } elseif ($this->state === State::SAVED) {
            $this->state = State::DELETED;
        }

        return $this;
    }
937477
public function cancel()
    {
        if (!isset($this->_links->self->href)) {
            return $this;
        }

        $body = null;
        if($this->client->usesOAuth()) {
            $body = json_encode([
                "testmode" => $this->mode === "test" ? true : false
            ]);
        }

        $result = $this->client->performHttpCallToFullUrl(
            MollieApiClient::HTTP_DELETE,
            $this->_links->self->href,
            $body
        );

        return ResourceFactory::createFromApiResult($result, new Subscription($this->client));
    }
38125
public function reset()
    {
        $this->controllerResolver->reset();
        $this->repositoryResolver->reset();
        $this->viewResolver->reset();

        return $this;
    }
1223217
public function reset()
    {
        $this->parameters = [
            'utt'       => null,
            'context'   => null,
            'mode'      => self::MODE_DIALOG,
            't'         => self::CHARACTER_DEFAULT,
        ];
        $this->user_info = null;
        return $this;
    }
1346810
public function reset()
    {
        $this->statement = null;
        $this->params = array();
        $this->positionParams = array();
        $this->query = array();
        $this->sql = null;

        return $this;
    }
1176590
public function renew()
    {
        if ($this->isEnded() and $this->isCanceled()) {
            throw new LogicException(
                'Unable to renew canceled ended subscription.'
            );
        }

        $subscription = $this;

        DB::transaction(function () use ($subscription) {
            // Clear usage data
            $usageManager = new SubscriptionUsageManager($subscription);
            $usageManager->clear();

            // Renew period
            $subscription->setNewPeriod();
            $subscription->canceled_at = null;
            $subscription->save();
        });

        event(new SubscriptionRenewed($this));

        return $this;
    }
635756
public function clear()
    {
        if (!self::$session) {
            Exception::i()->setMessage(self::ERROR_NOT_STARTED)->trigger();
        }

        $_SESSION = array();

        return $this;
    }
484125
public function stop()
    {
        if (!$this->openSlots) {
            throw new \LogicException('No slot started.');
        }

        $name = array_pop($this->openSlots);

        $this->slots[$name] = ob_get_clean();
    }
377653
public function reindexAll()
    {
        $this->tableStrategy
			->setUseIdxTable(false);
		
        $this->beginTransaction();
        try {
            $this->reindex();
            $this->commit();
        } catch (\Exception $e) {
            $this->rollBack();
            throw $e;
        }
        return $this;
    }
459921
public function cancel($immediately = false)
    {
        $this->canceled_at = Carbon::now();

        if ($immediately) {
            $this->canceled_immediately = true;
        }

        if ($this->save()) {
            event(new SubscriptionCanceled($this));

            return $this;
        }

        return false;
    }
1104812
public function removeAndFlush()
    {
        if (0 === func_num_args()) {
            throw new \LogicException('Missing arguments');
        }

        foreach (func_get_args() as $remove) {
            $this->getDoctrine()->getManager()->remove($remove);
        }

        $this->getDoctrine()->getManager()->flush();

        return $this;
    }
1053613
public function reset()
    {
        $this->last_response_headers = array();
        $this->last_info = array();
        $this->last_curl_errno = 0;
        $this->last_curl_error = '';

        return $this;
    }
494473
protected function reconnect_db() {
		
		if(is_object($this->db)) {
			$dsn = $this->db->get_dsn();
			$user = $this->db->get_username();
			$pass = $this->db->get_password();
			
			$this->db->reconnect($dsn, $user, $pass);
			$this->dbConnected = $this->db->is_connected();
		}
		else {
			throw new LogicException(__METHOD__ .": database object not found");
		}
		
		return $this->dbConnected;
	}
17864
public function reset()
    {
        if ($this->curl !== null) {
            curl_close($this->curl); //stop curl
        }

        //reset all options
        $this->unsetOptions();

        //reset response & status code
        $this->curl = null;
        $this->response = null;
        $this->responseCode = null;

        return $this;
    }
290675
public function stopPrepend()
    {
        if (empty($this->pushStack)) {
            throw new InvalidArgumentException('Cannot end a prepend operation without first starting one.');
        }

        return tap(array_pop($this->pushStack), function ($last) {
            $this->extendPrepend($last, ob_get_clean());
        });
    }