Cancel PnLSingle subscription for the given account, modelCode
        and conId.

        Args:
            account: Cancel for this account name.
            modelCode: Cancel for this account model.
            conId: Cancel for this contract ID.
543799
def cancelPnLSingle(
            self, account: str, modelCode: str, conId: int):
        
        key = (account, modelCode, conId)
        reqId = self.wrapper.pnlSingleKey2ReqId.pop(key, None)
        if reqId:
            self.client.cancelPnLSingle(reqId)
            self.wrapper.pnlSingles.pop(reqId, None)
        else:
            self._logger.error(
                'cancelPnLSingle: No subscription for '
                f'account {account}, modelCode {modelCode}, conId {conId}')
966920
def delete(self):
        
        resource = self.RESOURCE.format(
            account_id=self.account.id,
            tailored_audience_id=self.tailored_audience_id,
            id=self.id)
        response = Request(self.account.client, 'delete', resource).perform()
        return self.from_response(response.body['data'])
225189
public static void removeSubscription(Subscription subscription) {
        mSubscriptions.remove(subscription);
        LiveQueryClient.executeQuery(subscription.getQuery().unsubscribeQueryToString());
    }
624565
def unsubscribe(SubscriptionArn, region=None, key=None, keyid=None, profile=None):
    '''
    
    '''
    if not SubscriptionArn.startswith('arn:aws:sns:'):
        # Grrr, AWS sent us an ARN that's NOT and ARN....
        # This can happen if, for instance, a subscription is left in PendingAcceptance or similar
        # Note that anything left in PendingConfirmation will be auto-deleted by AWS after 30 days
        # anyway, so this isn't as ugly a hack as it might seem at first...
        log.info('Invalid subscription ARN `%s` passed - likely a PendingConfirmaton or such.  '
                 'Skipping unsubscribe attempt as it would almost certainly fail...',
                 SubscriptionArn)
        return True
    subs = list_subscriptions(region=region, key=key, keyid=keyid, profile=profile)
    sub = [s for s in subs if s.get('SubscriptionArn') == SubscriptionArn]
    if not sub:
        log.error('Subscription ARN %s not found', SubscriptionArn)
        return False
    TopicArn = sub[0]['TopicArn']
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
    try:
        conn.unsubscribe(SubscriptionArn=SubscriptionArn)
        log.info('Deleted subscription %s from SNS topic %s',
                 SubscriptionArn, TopicArn)
        return True
    except botocore.exceptions.ClientError as e:
        log.error('Failed to delete subscription %s: %s', SubscriptionArn, e)
        return False
1255562
def remove(self):
        
        self.logger.debug('Remove subscription from server...')

        data = {
            'command': 'unsubscribe',
            'identifier': self._identifier_string()
        }

        self.connection.send(data)
        self.state = 'unsubscribed'
530205
def drop_callback_reference(self, subscription):
        
        if subscription not in self.__subscriptions:
            raise workflows.Error(
                "Attempting to drop callback reference for unknown subscription"
            )
        if not self.__subscriptions[subscription]["unsubscribed"]:
            raise workflows.Error(
                "Attempting to drop callback reference for live subscription"
            )
        del self.__subscriptions[subscription]
141467
def delete_subscription(self, subscription_id):
        
        url = self.SUBSCRIPTIONS_ID_URL % subscription_id

        connection = Connection(self.token)
        connection.set_url(self.production, url)

        return connection.delete_request()
427253
def cancel_order(self, order_param):
        
        order_id = order_param
        if isinstance(order_param, zipline.protocol.Order):
            order_id = order_param.id

        self.blotter.cancel(order_id)
515782
def select_subscription(subs_code, subscriptions):
    
    if subs_code and subscriptions:
        for subs in subscriptions:
            if (subs.subscription_code == subs_code):
                return subs
    return None
170957
private void deletePubsubSubscription(String subscription) throws IOException {
    if (pubsubClient == null) {
      pubsubClient = newPubsubClient(options.as(PubsubOptions.class)).build();
    }
    if (executeNullIfNotFound(pubsubClient.projects().subscriptions().get(subscription)) != null) {
      pubsubClient.projects().subscriptions().delete(subscription).execute();
    }
  }
713283
def cancel_subscription(self, idempotency_key=None, **params):
        """"""
        warnings.warn(
            'The `cancel_subscription` method is deprecated. Instead, use the '
            '`subscriptions` resource on the customer object to cancel a '
            'subscription',
            DeprecationWarning)
        url = self.instance_url() + '/subscription'
        headers = populate_headers(idempotency_key)
        d = self.request('delete', url, params, headers)
        d.addCallback(lambda response: self.refresh_from(
            {'subscription': response}, api_key, True))
        return d.addCallback(lambda _: self.subscription)
13952
def unlist(ctx, unlist_account, account):
    
    account = Account(account, blockchain_instance=ctx.blockchain)
    print_tx(account.nolist(unlist_account))
756190
def cancel(ctx, orders, account):
    
    print_tx(ctx.bitshares.cancel(orders, account=account))
495164
def delete(self, subscription_id, data=None):
        
        if not subscription_id or not subscription_id.startswith(self.RESOURCE_ID_PREFIX):
            raise IdentifierError(
                "Invalid subscription ID: '{id}'. A subscription ID should start with '{prefix}'.".format(
                    id=subscription_id, prefix=self.RESOURCE_ID_PREFIX)
            )
        result = super(CustomerSubscriptions, self).delete(subscription_id, data)
        return self.get_resource_object(result)
67914
public SubscriptionSchedule cancel() throws StripeException {
    return cancel((Map<String, Object>) null, (RequestOptions) null);
  }
1336921
def cancel(id)
      have_key?
      address = @url_private + "/trade_cancel/"
      params = {
        "id" => id,
      }
      h = post_ssl_with_sign(address, params)
      {
        "success" => h["result"],
      }
    end
375327
def cancel_withdraw(self, address_id, _async=False):
        
        params = {}
        path = f'/v1/dw/withdraw-virtual/{address_id}/cancel'

        return api_key_post(params, path, _async=_async)