(self, date_end=None, note=None, web_user=None,
                                adjustment_method=None, **kwargs)
This assumes that a subscription was cancelled then recreated with the
        same date_start as the last subscription's date_end (with no other subscriptions
        created in between).
This assumes that a subscription was cancelled then recreated with the
        same date_start as the last subscription's date_end (with no other subscriptions
        created in between).
This assumes that a subscription was cancelled then recreated with the same date_start as the last subscription s date_end ( with no other subscriptions created in between ) .
def reactivate_subscription(self, date_end=None, note=None, web_user=None,
                                adjustment_method=None, **kwargs):
        """
        This assumes that a subscription was cancelled then recreated with the
        same date_start as the last subscription's date_end (with no other subscriptions
        created in between).
        """
        adjustment_method = adjustment_method or SubscriptionAdjustmentMethod.INTERNAL
        self.date_end = date_end
        self.is_active = True
        for allowed_attr in self.allowed_attr_changes:
            if allowed_attr in kwargs:
                setattr(self, allowed_attr, kwargs[allowed_attr])
        self.save()
        self.subscriber.reactivate_subscription(
            new_plan_version=self.plan_version,
            subscription=self,
        )
        SubscriptionAdjustment.record_adjustment(
            self, reason=SubscriptionAdjustmentReason.REACTIVATE,
            method=adjustment_method, note=note, web_user=web_user,
        )
def reactivate_subscription ( self , date_end = None , note = None , web_user = None , adjustment_method = None , * * kwargs ) : adjustment_method = adjustment_method or SubscriptionAdjustmentMethod . INTERNAL self . date_end = date_end self . is_active = True for allowed_attr in self . allowed_attr_changes : if allowed_attr in kwargs : setattr ( self , allowed_attr , kwargs [ allowed_attr ] ) self . save ( ) self . subscriber . reactivate_subscription ( new_plan_version = self . plan_version , subscription = self , ) SubscriptionAdjustment . record_adjustment ( self , reason = SubscriptionAdjustmentReason . REACTIVATE , method = adjustment_method , note = note , web_user = web_user , )