Delete the card.

@param   Payplug\Card $card  the card or card id
@param   Payplug\Payplug $payplug  the client configuration

@return  Card the deleted card or null on error

@throws  Payplug\Exception\ConfigurationNotSetException
540311
public static function deleteCard($card, Payplug\Payplug $payplug = null)
    {
        if ($payplug === null) {
            $payplug = Payplug\Payplug::getDefaultConfiguration();
        }

        if ($card instanceof Card) {
            $card = $card->id;
        }

        $httpClient = new Payplug\Core\HttpClient($payplug);
        $response = $httpClient->delete(Payplug\Core\APIRoutes::getRoute(Payplug\Core\APIRoutes::CARD_RESOURCE, $card));

        return $response;
    }
671472
protected static function deletePaymentCardByIdAsyncWithHttpInfo($payment_card_id) 
    {
        $returnType = '';  
        $request = self::deletePaymentCardByIdRequest($payment_card_id); 

        return self::getHttpClient()
            ->sendAsync($request, self::createHttpClientOption())
            ->then(
                function ($response) use ($returnType) {
                    return [null, $response->getStatusCode(), $response->getHeaders()];
                },
                function ($exception) {
                    $response = $exception->getResponse();
                    $statusCode = $response->getStatusCode();
                    throw new ApiException(
                        sprintf(
                            '[%d] Error connecting to the API (%s)',
                            $statusCode,
                            $exception->getRequest()->getUri()
                        ),
                        $statusCode,
                        $response->getHeaders(),
                        $response->getBody()
                    );
                }
            );
    }
1031003
public function deleteUrlWildcard($id)
    {
        try {
            return $this->innerGateway->deleteUrlWildcard($id);
        } catch (DBALException $e) {
            throw new \RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new \RuntimeException('Database error', 0, $e);
        }
    }
772996
public function deleteCard($card_id)
    {
        $url = "https://api.weixin.qq.com/card/delete?access_token=ACCESS_TOKEN";
        $this->registerApi($url, __FUNCTION__, func_get_args());
        return $this->httpPostForJson($url, ['card_id' => $card_id]);
    }
640217
public function deleteCard($addressBookId, $cardUri)
    {
        $stmt = $this->pdo->prepare('DELETE FROM '.$this->cardsTableName.' WHERE addressbookid = ? AND uri = ?');
        $stmt->execute([$addressBookId, $cardUri]);

        $this->addChange($addressBookId, $cardUri, 3);

        return 1 === $stmt->rowCount();
    }
584890
public function deletePlugin($id)
    {
        /*
         * Rollback plugin
         */
        UpdateManager::instance()->rollbackPlugin($id);

        /*
         * Delete from file system
         */
        if ($pluginPath = self::instance()->getPluginPath($id)) {
            File::deleteDirectory($pluginPath);
        }
    }
530941
def OnRemoveCards(self, removedcards):
        """"""
        parentnode = self.root
        for cardtoremove in removedcards:
            (childCard, cookie) = self.GetFirstChild(parentnode)
            while childCard.IsOk():
                if self.GetItemText(childCard) == \
                        toHexString(cardtoremove.atr):
                    self.Delete(childCard)
                (childCard, cookie) = self.GetNextChild(parentnode, cookie)
        self.Expand(self.root)
        self.EnsureVisible(self.root)
        self.Repaint()
1319547
public function delete($paymentId)
    {
        $db = $this->getDb();
        $db->startTransaction();

        $deleteResult = $db->execute('DELETE FROM `oepaypal_orderpayments` WHERE `oepaypal_paymentid` = ' . $db->quote($paymentId));
        $deleteCommentResult = $db->execute('DELETE FROM `oepaypal_orderpaymentcomments` WHERE `oepaypal_paymentid` = ' . $db->quote($paymentId));

        $result = ($deleteResult !== false) || ($deleteCommentResult !== false);

        if ($result) {
            $db->commitTransaction();
        } else {
            $db->rollbackTransaction();
        }

        return $result;
    }
193079
public function deleteCard($card_id)
    {
        if (empty($card_id)) {
            return false;
        }

        $result = $this->httpPost(static::WECHAT_DELETE_CARD_URL . 'access_token=' . $this->getAccessToken(), [
            'card_id' => $card_id
        ]);

        return isset($result['errmsg']) && $result['errmsg'] === 'ok' ? true : false;
    }
383424
public static MozuUrl deleteUrl(String cardId)
	{
		UrlFormatter formatter = new UrlFormatter("/payments/commerce/payments/cards/{cardId}");
		formatter.formatUrl("cardId", cardId);
		return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.PCI_POD) ;
	}
62863
def cache_card(self, card):
        
        code = card.code
        self.card_cache[code] = card
        if code in self.card_cache_list:
            self.card_cache_list.remove(code)
        self.card_cache_list.append(code)

        if len(self.card_cache_list) > self.cachelimit:
            del self.card_cache[self.card_cache_list.pop(0)]
496833
public function delete($account, $action = '', $parameters = null)
    {
        return $this->sendRequest('DELETE', $account, $action, $parameters);
    }
1311188
public function actionDeleteImage($id) {
        if (!empty($id)) {
            $paymentMethod = PaymentMethod::findOne($id);

            $isDeleted = \Yii::$app->shop_imagable->delete('payment', $paymentMethod->image);

            if ($isDeleted) {
                $paymentMethod->image = NULL;
                $paymentMethod->save();
                return $this->redirect(Yii::$app->request->referrer);
            }
            else throw new Exception('Deleting failed.');
        }
        else throw new NotFoundHttpException();
    }
1354217
public function card($card)
    {
        if ($card instanceof Card) {
            $this->card = $card;

            return $this;
        }

        if ($card instanceof Closure) {
            $card($new = new Card());
            $this->card = $new;

            return $this;
        }

        throw new InvalidArgumentException(
            'Invalid Card type. Expected '.Card::class.' or '.Closure::class.'.'
        );
    }
1303009
public static function flush(CardCollection $cards)
    {
        $groupedBySuit = $cards
            ->switchAceValue()
            ->groupBy(function (Card $card) {
                return $card->suit()->name();
            })
            ->sortByDesc(function ($group) {
                return count($group);
            });
        if ($groupedBySuit->first()->count() < 5) {
            return false;
        }

        return $groupedBySuit
            ->first()
            ->sortByValue()
            ->take(-5)
            ->values();
    }
950703
public function cancelHeldAuth(CardPayments\Authorization $auth)
    {
        $auth->setRequiredFields(array('id'));
        $auth->checkRequiredFields();

        $tmpAuth = new CardPayments\Authorization(array(
             'status' => 'CANCELLED'
        ));
        $request = new Request(array(
             'method' => Request::PUT,
             'uri' => $this->prepareURI("/auths/" . $auth->id),
             'body' => $tmpAuth
        ));
        $response = $this->client->processRequest($request);

        return new CardPayments\Authorization($response);
    }
1049163
public function delete($customer, $roleId, $optParams = array())
  {
    $params = array('customer' => $customer, 'roleId' => $roleId);
    $params = array_merge($params, $optParams);
    return $this->call('delete', array($params));
  }