src/test/java/com/squareup/connect/api/PaymentsApiTest.java
@Test
    public void cancelPaymentTest() throws ApiException {
        String paymentId = null;
        CancelPaymentResponse response = api.cancelPayment(paymentId);

        // TODO: test validations
    }
/**
     * CancelPayment
     *
     * Cancels a payment. If you set &#x60;autocomplete&#x60; to false when creating a payment,  you can cancel the payment using this endpoint. For more information, see [Delayed Payments](/payments-api/take-payments#delayed-payments).
     *
     * @throws ApiException
     *          if the Api call fails
     */
CancelPayment
Cancels a payment. If you set `autocomplete` to false when creating a payment,  you can cancel the payment using this endpoint. For more information, see [Delayed Payments](/payments-api/take-payments#delayed-payments).

@throws ApiException
if the Api call fails
CancelPayment Cancels a payment . If you set ` autocomplete ` to false when creating a payment you can cancel the payment using this endpoint . For more information see [ Delayed Payments ] ( / payments - api / take - payments#delayed - payments ) . @throws ApiException if the Api call fails
@Test
    public void cancelPaymentTest() throws ApiException {
        String paymentId = null;
        CancelPaymentResponse response = api.cancelPayment(paymentId);
    }
@ Test public void cancelPaymentTest ( ) throws ApiException { String paymentId = null ; CancelPaymentResponse response = api . cancelPayment ( paymentId ) ; }
CancelPayment
 Cancels a payment.
CancelPayment Cancels a payment .
// TODO: test validations