Package com.adyen.service.management
Class WebhooksMerchantLevelApi
- java.lang.Object
-
- com.adyen.Service
-
- com.adyen.service.management.WebhooksMerchantLevelApi
-
public class WebhooksMerchantLevelApi extends Service
-
-
Field Summary
Fields Modifier and Type Field Description static StringAPI_VERSIONprotected StringbaseURL
-
Constructor Summary
Constructors Constructor Description WebhooksMerchantLevelApi(Client client)Webhooks - merchant level constructor inpackage.WebhooksMerchantLevelApi(Client client, String baseURL)Webhooks - merchant level constructor inpackage.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GenerateHmacKeyResponsegenerateHmacKey(String merchantId, String webhookId)Generate an HMAC keyGenerateHmacKeyResponsegenerateHmacKey(String merchantId, String webhookId, RequestOptions requestOptions)Generate an HMAC keyWebhookgetWebhook(String merchantId, String webhookId)Get a webhookWebhookgetWebhook(String merchantId, String webhookId, RequestOptions requestOptions)Get a webhookListWebhooksResponselistAllWebhooks(String merchantId)List all webhooksListWebhooksResponselistAllWebhooks(String merchantId, Integer pageNumber, Integer pageSize, RequestOptions requestOptions)List all webhooksvoidremoveWebhook(String merchantId, String webhookId)Remove a webhookvoidremoveWebhook(String merchantId, String webhookId, RequestOptions requestOptions)Remove a webhookWebhooksetUpWebhook(String merchantId, CreateMerchantWebhookRequest createMerchantWebhookRequest)Set up a webhookWebhooksetUpWebhook(String merchantId, CreateMerchantWebhookRequest createMerchantWebhookRequest, RequestOptions requestOptions)Set up a webhookTestWebhookResponsetestWebhook(String merchantId, String webhookId, TestWebhookRequest testWebhookRequest)Test a webhookTestWebhookResponsetestWebhook(String merchantId, String webhookId, TestWebhookRequest testWebhookRequest, RequestOptions requestOptions)Test a webhookWebhookupdateWebhook(String merchantId, String webhookId, UpdateMerchantWebhookRequest updateMerchantWebhookRequest)Update a webhookWebhookupdateWebhook(String merchantId, String webhookId, UpdateMerchantWebhookRequest updateMerchantWebhookRequest, RequestOptions requestOptions)Update a webhook-
Methods inherited from class com.adyen.Service
createBaseURL, getClient, isApiKeyRequired, setApiKeyRequired, setClient
-
-
-
-
Field Detail
-
API_VERSION
public static final String API_VERSION
- See Also:
- Constant Field Values
-
baseURL
protected String baseURL
-
-
Constructor Detail
-
WebhooksMerchantLevelApi
public WebhooksMerchantLevelApi(Client client)
Webhooks - merchant level constructor inpackage.- Parameters:
client-Client(required)
-
WebhooksMerchantLevelApi
public WebhooksMerchantLevelApi(Client client, String baseURL)
Webhooks - merchant level constructor inpackage. Please use this constructor only if you would like to pass along your own url for routing or testing purposes. The latest API version is defined in this class as a constant.
-
-
Method Detail
-
generateHmacKey
public GenerateHmacKeyResponse generateHmacKey(String merchantId, String webhookId) throws ApiException, IOException
Generate an HMAC key- Parameters:
merchantId-StringThe unique identifier of the merchant account. (required)webhookId-String(required)- Returns:
GenerateHmacKeyResponse- Throws:
ApiException- if fails to make API callIOException
-
generateHmacKey
public GenerateHmacKeyResponse generateHmacKey(String merchantId, String webhookId, RequestOptions requestOptions) throws ApiException, IOException
Generate an HMAC key- Parameters:
merchantId-StringThe unique identifier of the merchant account. (required)webhookId-String(required)requestOptions-RequestOptionsObject to store additional data such as idempotency-keys (optional)- Returns:
GenerateHmacKeyResponse- Throws:
ApiException- if fails to make API callIOException
-
getWebhook
public Webhook getWebhook(String merchantId, String webhookId) throws ApiException, IOException
Get a webhook- Parameters:
merchantId-StringThe unique identifier of the merchant account. (required)webhookId-StringUnique identifier of the webhook configuration. (required)- Returns:
Webhook- Throws:
ApiException- if fails to make API callIOException
-
getWebhook
public Webhook getWebhook(String merchantId, String webhookId, RequestOptions requestOptions) throws ApiException, IOException
Get a webhook- Parameters:
merchantId-StringThe unique identifier of the merchant account. (required)webhookId-StringUnique identifier of the webhook configuration. (required)requestOptions-RequestOptionsObject to store additional data such as idempotency-keys (optional)- Returns:
Webhook- Throws:
ApiException- if fails to make API callIOException
-
listAllWebhooks
public ListWebhooksResponse listAllWebhooks(String merchantId) throws ApiException, IOException
List all webhooks- Parameters:
merchantId-StringThe unique identifier of the merchant account. (required)- Returns:
ListWebhooksResponse- Throws:
ApiException- if fails to make API callIOException
-
listAllWebhooks
public ListWebhooksResponse listAllWebhooks(String merchantId, Integer pageNumber, Integer pageSize, RequestOptions requestOptions) throws ApiException, IOException
List all webhooks- Parameters:
merchantId-StringThe unique identifier of the merchant account. (required)pageNumber-IntegerQuery: The number of the page to fetch. (optional)pageSize-IntegerQuery: The number of items to have on a page, maximum 100. The default is 10 items on a page. (optional)requestOptions-RequestOptionsObject to store additional data such as idempotency-keys (optional)- Returns:
ListWebhooksResponse- Throws:
ApiException- if fails to make API callIOException
-
removeWebhook
public void removeWebhook(String merchantId, String webhookId) throws ApiException, IOException
Remove a webhook- Parameters:
merchantId-StringThe unique identifier of the merchant account. (required)webhookId-StringUnique identifier of the webhook configuration. (required)- Throws:
ApiException- if fails to make API callIOException
-
removeWebhook
public void removeWebhook(String merchantId, String webhookId, RequestOptions requestOptions) throws ApiException, IOException
Remove a webhook- Parameters:
merchantId-StringThe unique identifier of the merchant account. (required)webhookId-StringUnique identifier of the webhook configuration. (required)requestOptions-RequestOptionsObject to store additional data such as idempotency-keys (optional)- Throws:
ApiException- if fails to make API callIOException
-
setUpWebhook
public Webhook setUpWebhook(String merchantId, CreateMerchantWebhookRequest createMerchantWebhookRequest) throws ApiException, IOException
Set up a webhook- Parameters:
merchantId-StringThe unique identifier of the merchant account. (required)createMerchantWebhookRequest-CreateMerchantWebhookRequest(required)- Returns:
Webhook- Throws:
ApiException- if fails to make API callIOException
-
setUpWebhook
public Webhook setUpWebhook(String merchantId, CreateMerchantWebhookRequest createMerchantWebhookRequest, RequestOptions requestOptions) throws ApiException, IOException
Set up a webhook- Parameters:
merchantId-StringThe unique identifier of the merchant account. (required)createMerchantWebhookRequest-CreateMerchantWebhookRequest(required)requestOptions-RequestOptionsObject to store additional data such as idempotency-keys (optional)- Returns:
Webhook- Throws:
ApiException- if fails to make API callIOException
-
testWebhook
public TestWebhookResponse testWebhook(String merchantId, String webhookId, TestWebhookRequest testWebhookRequest) throws ApiException, IOException
Test a webhook- Parameters:
merchantId-StringThe unique identifier of the merchant account. (required)webhookId-StringUnique identifier of the webhook configuration. (required)testWebhookRequest-TestWebhookRequest(required)- Returns:
TestWebhookResponse- Throws:
ApiException- if fails to make API callIOException
-
testWebhook
public TestWebhookResponse testWebhook(String merchantId, String webhookId, TestWebhookRequest testWebhookRequest, RequestOptions requestOptions) throws ApiException, IOException
Test a webhook- Parameters:
merchantId-StringThe unique identifier of the merchant account. (required)webhookId-StringUnique identifier of the webhook configuration. (required)testWebhookRequest-TestWebhookRequest(required)requestOptions-RequestOptionsObject to store additional data such as idempotency-keys (optional)- Returns:
TestWebhookResponse- Throws:
ApiException- if fails to make API callIOException
-
updateWebhook
public Webhook updateWebhook(String merchantId, String webhookId, UpdateMerchantWebhookRequest updateMerchantWebhookRequest) throws ApiException, IOException
Update a webhook- Parameters:
merchantId-StringThe unique identifier of the merchant account. (required)webhookId-StringUnique identifier of the webhook configuration. (required)updateMerchantWebhookRequest-UpdateMerchantWebhookRequest(required)- Returns:
Webhook- Throws:
ApiException- if fails to make API callIOException
-
updateWebhook
public Webhook updateWebhook(String merchantId, String webhookId, UpdateMerchantWebhookRequest updateMerchantWebhookRequest, RequestOptions requestOptions) throws ApiException, IOException
Update a webhook- Parameters:
merchantId-StringThe unique identifier of the merchant account. (required)webhookId-StringUnique identifier of the webhook configuration. (required)updateMerchantWebhookRequest-UpdateMerchantWebhookRequest(required)requestOptions-RequestOptionsObject to store additional data such as idempotency-keys (optional)- Returns:
Webhook- Throws:
ApiException- if fails to make API callIOException
-
-