src/test/java/com/squareup/connect/api/PaymentsApiTest.java
@Test
    public void cancelPaymentByIdempotencyKeyTest() throws ApiException {
        CancelPaymentByIdempotencyKeyRequest body = null;
        CancelPaymentByIdempotencyKeyResponse response = api.cancelPaymentByIdempotencyKey(body);

        // TODO: test validations
    }
/**
     * CancelPaymentByIdempotencyKey
     *
     * Cancels a payment identified by the idenpotency key that is specified the request.  Use this method when status of a CreatePayment request is unknown. For example, after you send a CreatePayment request a network error occurs and you don&#39;t get a response. In this case, you can direct Square to cancel the payment using this endpoint. In the request, you provide the same idempotency key that you provided in your CreatePayment request you want  to cancel. After cancelling the payment, you can submit your CreatePayment request again. Note that if no payment with the specified idempotency key is found, no action is taken, the end  point returns successfully.
     *
     * @throws ApiException
     *          if the Api call fails
     */
CancelPaymentByIdempotencyKey
Cancels a payment identified by the idenpotency key that is specified the request.  Use this method when status of a CreatePayment request is unknown. For example, after you send a CreatePayment request a network error occurs and you don't get a response. In this case, you can direct Square to cancel the payment using this endpoint. In the request, you provide the same idempotency key that you provided in your CreatePayment request you want  to cancel. After cancelling the payment, you can submit your CreatePayment request again. Note that if no payment with the specified idempotency key is found, no action is taken, the end  point returns successfully.

@throws ApiException
if the Api call fails
CancelPaymentByIdempotencyKey Cancels a payment identified by the idenpotency key that is specified the request . Use this method when status of a CreatePayment request is unknown . For example after you send a CreatePayment request a network error occurs and you don ' t get a response . In this case you can direct Square to cancel the payment using this endpoint . In the request you provide the same idempotency key that you provided in your CreatePayment request you want to cancel . After cancelling the payment you can submit your CreatePayment request again . Note that if no payment with the specified idempotency key is found no action is taken the end point returns successfully . @throws ApiException if the Api call fails
@Test
    public void cancelPaymentByIdempotencyKeyTest() throws ApiException {
        CancelPaymentByIdempotencyKeyRequest body = null;
        CancelPaymentByIdempotencyKeyResponse response = api.cancelPaymentByIdempotencyKey(body);
    }
@ Test public void cancelPaymentByIdempotencyKeyTest ( ) throws ApiException { CancelPaymentByIdempotencyKeyRequest body = null ; CancelPaymentByIdempotencyKeyResponse response = api . cancelPaymentByIdempotencyKey ( body ) ; }
CancelPaymentByIdempotencyKey
 Cancels a payment identified by the idenpotency key that is specified the request.
CancelPaymentByIdempotencyKey Cancels a payment identified by the idenpotency key that is specified the request .
// TODO: test validations