package AuthorizeNet.Rest.Sample.Webhooks;
/*import io.swagger.client.model.*;
import io.swagger.client.api.*;
import io.swagger.client.*;
*/

import  Api.*;
import Invokers.*;
import Model.*;

import java.io.File;
import java.util.*;

import AuthorizeNet.Rest.Setup.EnvironmentSetup;

public class PingsWebhook {

	public static ApiResponse<Void> run(String authorization, String webhookId) {
        
		//ApiClient apiClient = EnvironmentSetup.SetBasePath();
		ApiClient apiClient = EnvironmentSetup.Logging();
        WebhooksApi apiInstance = new WebhooksApi(apiClient);
        ////String authorization = "Basic " + "NUE1Q3ZrODg6M3U4ODZRYXFicThCNkM3eA=="; 
        
        ApiResponse<Void> response = null;
        
        try {            
        	response = apiInstance.pingsWebhookWithHttpInfo(webhookId, authorization);;        	
        	
        	if (response != null && response.getStatusCode() == 200)
        	{
        		System.out.println("Success, Ping Webhook Status : " + response.getStatusCode());
        	}
        } 
        catch (ApiException e) {
        	System.out.println("Failed to Ping Webhooks :  " + e.getMessage());            
        }
        
        return response;
    }
}

