Unsubscribe, delete the relationship of the customer with the plan.

        Args:
            subscription_id: Identification of the subscription.

        Returns:
177632
def delete_subscription(self, subscription_id):
        
        return self.client._delete(self.url + 'subscriptions/{}'.format(subscription_id), headers=self.get_headers())
364732
def unsubscribe(request, message_id, dispatch_id, hashed, redirect_to=None):
    
    return _generic_view(
        'handle_unsubscribe_request', sig_unsubscribe_failed,
        request, message_id, dispatch_id, hashed, redirect_to=redirect_to
    )
874053
def cancelPnL(self, account, modelCode: str = ''):
        
        key = (account, modelCode)
        reqId = self.wrapper.pnlKey2ReqId.pop(key, None)
        if reqId:
            self.client.cancelPnL(reqId)
            self.wrapper.pnls.pop(reqId, None)
        else:
            self._logger.error(
                'cancelPnL: No subscription for '
                f'account {account}, modelCode {modelCode}')
1311825
def unsubscribe(self, subscriber: 'Subscriber') -> None:
        
        # here is a special implementation which is replacing the more
        # obvious one: self._subscriptions.remove(subscriber) - this will not
        # work because list.remove(x) is doing comparision for equality.
        # Applied to publishers this will return another publisher instead of
        # a boolean result
        for i, _s in enumerate(self._subscriptions):
            if _s is subscriber:
                self._subscriptions.pop(i)
                return
        raise SubscriptionError('Subscriber is not registered')
976052
protected void doUnsubscribe (int oid, Subscriber<?> target)
    {
        DObject dobj = _ocache.get(oid);
        if (dobj != null) {
            dobj.removeSubscriber(target);

        } else if (_client.isFailureLoggable(Client.FailureType.UNSUBSCRIBE_NOT_PROXIED)) {
            log.info("Requested to remove subscriber from non-proxied object", "oid", oid,
                     "sub", target);
        }
    }
810476
def unsubscribe(self, callback_id):
        
        request = self.get_active_subscription(callback_id)
        request['mode'] = 'unsubscribe'
        self.subscribe_impl(callback_id, **request)
534241
def delete(self, id):
        
        url = self._url('%s' % (id))
        return self.client.delete(url)
944334
public SubscriptionEnvelope deleteSubscription(String subId) throws ApiException {
        ApiResponse<SubscriptionEnvelope> resp = deleteSubscriptionWithHttpInfo(subId);
        return resp.getData();
    }
494018
def unsubscribe(self, subscription):
        
        params = {'ContentType' : 'JSON',
                  'SubscriptionArn' : subscription}
        response = self.make_request('Unsubscribe', params, '/', 'GET')
        body = response.read()
        if response.status == 200:
            return json.loads(body)
        else:
            boto.log.error('%s %s' % (response.status, response.reason))
            boto.log.error('%s' % body)
            raise self.ResponseError(response.status, response.reason, body)
1083393
def unsubscribe(self, ssid, max_msgs=0):
        
        if self.is_closed:
            raise ErrConnectionClosed

        sub = None
        try:
            sub = self._subs[ssid]
        except KeyError:
            # Already unsubscribed.
            return

        # In case subscription has already received enough messages
        # then announce to the server that we are unsubscribing and
        # remove the callback locally too.
        if max_msgs == 0 or sub.received >= max_msgs:
            self._subs.pop(ssid, None)
            self._remove_subscription(sub)

        # We will send these for all subs when we reconnect anyway,
        # so that we can suppress here.
        if not self.is_reconnecting:
            yield self.auto_unsubscribe(ssid, max_msgs)
871829
def delete_session(self, client_id):
        
        try:
            session = self._sessions[client_id][0]
        except KeyError:
            session = None
        if session is None:
            self.logger.debug("Delete session : session %s doesn't exist" % client_id)
            return

        # Delete subscriptions
        self.logger.debug("deleting session %s subscriptions" % repr(session))
        self._del_all_subscriptions(session)

        self.logger.debug("deleting existing session %s" % repr(self._sessions[client_id]))
        del self._sessions[client_id]
1270025
public void unsubscribe(String subscriptionId) throws WorkspaceApiException {
        try {
            ApiSuccessResponse resp = api.unsubscribe(subscriptionId);
            Util.throwIfNotOk(resp);
        }
        catch(ApiException ex) {
            throw new WorkspaceApiException("Cannot unsubscribe", ex);
        }
    }
27107
public function unsubscribe($id)
    {
        if ($this->apikey === null) {
            $this->login();
        }

        return $this->request(self::METHOD_DELETE, '/subscribers/delete', [
            'apikey' => $this->apikey,
            'id' => $id,
        ]);
    }
922986
def delete_subscription(self):
        
        url = self._build_url('subscription', base_url=self._api)
        return self._boolean(self._delete(url), 204, 404)
118277
def delete_enrollment(self, id):
        
        url = self._url('enrollments/{}'.format(id))
        return self.client.delete(url)
1172031
def organization_subscription_delete(self, id, **kwargs):
        ""
        api_path = "/api/v2/organization_subscriptions/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, method="DELETE", **kwargs)
157552
def unsubscribe(self, code_list, subtype_list):
        

        ret, msg, code_list, subtype_list = self._check_subscribe_param(code_list, subtype_list)
        if ret != RET_OK:
            return ret, msg

        query_processor = self._get_sync_query_processor(SubscriptionQuery.pack_unsubscribe_req,
                                                         SubscriptionQuery.unpack_unsubscribe_rsp)

        kargs = {
            'code_list': code_list,
            'subtype_list': subtype_list,
            "conn_id": self.get_sync_conn_id()
        }

        for subtype in subtype_list:
            if subtype not in self._ctx_subscribe:
                continue
            code_set = self._ctx_subscribe[subtype]
            for code in code_list:
                if code not in code_set:
                    continue
                code_set.remove(code)

        ret_code, msg, _ = query_processor(**kargs)

        if ret_code != RET_OK:
            return RET_ERROR, msg

        ret_code, msg, unpush_req_str = SubscriptionQuery.pack_unpush_req(code_list, subtype_list, self.get_async_conn_id())
        if ret_code != RET_OK:
            return RET_ERROR, msg

        ret_code, msg = self._send_async_req(unpush_req_str)
        if ret_code != RET_OK:
            return RET_ERROR, msg

        return RET_OK, None