src/test/java/com/squareup/connect/api/CustomersApiTest.java
@Test
    public void deleteCustomerCardTest() throws ApiException {
        Customer customer = api.createCustomer(new CreateCustomerRequest()
            .givenName("Amelia")
            .familyName("Earhart")
            .emailAddress("Amelia.Earhart@example.com")).getCustomer();

        String cardNonce = "fake-card-nonce-ok";

        CreateCustomerCardRequest body = new CreateCustomerCardRequest()
            .cardNonce(cardNonce)
            .billingAddress(new Address()
                .addressLine1("500 Electric Ave")
                .addressLine2("Suite 600")
                .locality("New York")
                .administrativeDistrictLevel1("NY")
                .postalCode("94103")
                .country("US"))
            .cardholderName("Amelia Earhart");

        Card card =
            api.createCustomerCard(customer.getId(), body).getCard();

        DeleteCustomerCardResponse response = api.deleteCustomerCard(customer.getId(), card.getId());

        assertTrue(response.getErrors().isEmpty());
    }
/**
     * DeleteCustomerCard
     *
     * Removes a card on file from a customer.
     *
     * @throws ApiException
     *          if the Api call fails
     */
DeleteCustomerCard
Removes a card on file from a customer.

@throws ApiException
if the Api call fails
DeleteCustomerCard Removes a card on file from a customer . @throws ApiException if the Api call fails
@Test
    public void deleteCustomerCardTest() throws ApiException {
        Customer customer = api.createCustomer(new CreateCustomerRequest()
            .givenName("Amelia")
            .familyName("Earhart")
            .emailAddress("Amelia.Earhart@example.com")).getCustomer();
        String cardNonce = "fake-card-nonce-ok";
        CreateCustomerCardRequest body = new CreateCustomerCardRequest()
            .cardNonce(cardNonce)
            .billingAddress(new Address()
                .addressLine1("500 Electric Ave")
                .addressLine2("Suite 600")
                .locality("New York")
                .administrativeDistrictLevel1("NY")
                .postalCode("94103")
                .country("US"))
            .cardholderName("Amelia Earhart");
        Card card =
            api.createCustomerCard(customer.getId(), body).getCard();
        DeleteCustomerCardResponse response = api.deleteCustomerCard(customer.getId(), card.getId());
        assertTrue(response.getErrors().isEmpty());
    }
@ Test public void deleteCustomerCardTest ( ) throws ApiException { Customer customer = api . createCustomer ( new CreateCustomerRequest ( ) . givenName ( "Amelia" ) . familyName ( "Earhart" ) . emailAddress ( "Amelia.Earhart@example.com" ) ) . getCustomer ( ) ; String cardNonce = "fake-card-nonce-ok" ; CreateCustomerCardRequest body = new CreateCustomerCardRequest ( ) . cardNonce ( cardNonce ) . billingAddress ( new Address ( ) . addressLine1 ( "500 Electric Ave" ) . addressLine2 ( "Suite 600" ) . locality ( "New York" ) . administrativeDistrictLevel1 ( "NY" ) . postalCode ( "94103" ) . country ( "US" ) ) . cardholderName ( "Amelia Earhart" ) ; Card card = api . createCustomerCard ( customer . getId ( ) , body ) . getCard ( ) ; DeleteCustomerCardResponse response = api . deleteCustomerCard ( customer . getId ( ) , card . getId ( ) ) ; assertTrue ( response . getErrors ( ) . isEmpty ( ) ) ; }
DeleteCustomerCard
 Removes a card on file from a customer.
DeleteCustomerCard Removes a card on file from a customer .