deleteApiDeleteCard
Delete card
/api/v2/cards/{id}
Usage and SDK Samples
curl -X DELETE\
-H "X-API-Key: [[apiKey]]"\
-H "Accept: application/json"\
"https://api.digitalwallet.cards/api/v2/cards/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CardsApi;
import java.io.File;
import java.util.*;
public class CardsApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
CardsApi apiInstance = new CardsApi();
String id = id_example; // String |
try {
inline_response_200_2 result = apiInstance.deleteApiDeleteCard(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CardsApi#deleteApiDeleteCard");
e.printStackTrace();
}
}
}
import io.swagger.client.api.CardsApi;
public class CardsApiExample {
public static void main(String[] args) {
CardsApi apiInstance = new CardsApi();
String id = id_example; // String |
try {
inline_response_200_2 result = apiInstance.deleteApiDeleteCard(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CardsApi#deleteApiDeleteCard");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];
String *id = id_example; //
CardsApi *apiInstance = [[CardsApi alloc] init];
// Delete card
[apiInstance deleteApiDeleteCardWith:id
completionHandler: ^(inline_response_200_2 output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var TrybLoyaltyApiV200 = require('tryb_loyalty_api_v200');
var defaultClient = TrybLoyaltyApiV200.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['X-API-Key'] = "Token"
var api = new TrybLoyaltyApiV200.CardsApi()
var id = id_example; // {{String}}
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.deleteApiDeleteCard(id, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class deleteApiDeleteCardExample
{
public void main()
{
// Configure API key authorization: ApiKeyAuth
Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");
var apiInstance = new CardsApi();
var id = id_example; // String |
try
{
// Delete card
inline_response_200_2 result = apiInstance.deleteApiDeleteCard(id);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CardsApi.deleteApiDeleteCard: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$api_instance = new Swagger\Client\ApiCardsApi();
$id = id_example; // String |
try {
$result = $api_instance->deleteApiDeleteCard($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CardsApi->deleteApiDeleteCard: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CardsApi;
# Configure API key authorization: ApiKeyAuth
$WWW::SwaggerClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";
my $api_instance = WWW::SwaggerClient::CardsApi->new();
my $id = id_example; # String |
eval {
my $result = $api_instance->deleteApiDeleteCard(id => $id);
print Dumper($result);
};
if ($@) {
warn "Exception when calling CardsApi->deleteApiDeleteCard: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: ApiKeyAuth
swagger_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.CardsApi()
id = id_example # String |
try:
# Delete card
api_response = api_instance.delete_api_delete_card(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling CardsApi->deleteApiDeleteCard: %s\n" % e)
Parameters
Name | Description |
---|---|
id* |
String
Required
|