Package com.adyen.service.management
Class WebhooksCompanyLevelApi
- java.lang.Object
-
- com.adyen.Service
-
- com.adyen.service.management.WebhooksCompanyLevelApi
-
public class WebhooksCompanyLevelApi extends Service
-
-
Field Summary
Fields Modifier and Type Field Description static StringAPI_VERSIONprotected StringbaseURL
-
Constructor Summary
Constructors Constructor Description WebhooksCompanyLevelApi(Client client)Webhooks - company level constructor inpackage.WebhooksCompanyLevelApi(Client client, String baseURL)Webhooks - company level constructor inpackage.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GenerateHmacKeyResponsegenerateHmacKey(String companyId, String webhookId)Generate an HMAC keyGenerateHmacKeyResponsegenerateHmacKey(String companyId, String webhookId, RequestOptions requestOptions)Generate an HMAC keyWebhookgetWebhook(String companyId, String webhookId)Get a webhookWebhookgetWebhook(String companyId, String webhookId, RequestOptions requestOptions)Get a webhookListWebhooksResponselistAllWebhooks(String companyId)List all webhooksListWebhooksResponselistAllWebhooks(String companyId, Integer pageNumber, Integer pageSize, RequestOptions requestOptions)List all webhooksvoidremoveWebhook(String companyId, String webhookId)Remove a webhookvoidremoveWebhook(String companyId, String webhookId, RequestOptions requestOptions)Remove a webhookWebhooksetUpWebhook(String companyId, CreateCompanyWebhookRequest createCompanyWebhookRequest)Set up a webhookWebhooksetUpWebhook(String companyId, CreateCompanyWebhookRequest createCompanyWebhookRequest, RequestOptions requestOptions)Set up a webhookTestWebhookResponsetestWebhook(String companyId, String webhookId, TestCompanyWebhookRequest testCompanyWebhookRequest)Test a webhookTestWebhookResponsetestWebhook(String companyId, String webhookId, TestCompanyWebhookRequest testCompanyWebhookRequest, RequestOptions requestOptions)Test a webhookWebhookupdateWebhook(String companyId, String webhookId, UpdateCompanyWebhookRequest updateCompanyWebhookRequest)Update a webhookWebhookupdateWebhook(String companyId, String webhookId, UpdateCompanyWebhookRequest updateCompanyWebhookRequest, 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
-
WebhooksCompanyLevelApi
public WebhooksCompanyLevelApi(Client client)
Webhooks - company level constructor inpackage.- Parameters:
client-Client(required)
-
WebhooksCompanyLevelApi
public WebhooksCompanyLevelApi(Client client, String baseURL)
Webhooks - company 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 companyId, String webhookId) throws ApiException, IOException
Generate an HMAC key- Parameters:
companyId-StringThe unique identifier of the company account. (required)webhookId-StringUnique identifier of the webhook configuration. (required)- Returns:
GenerateHmacKeyResponse- Throws:
ApiException- if fails to make API callIOException
-
generateHmacKey
public GenerateHmacKeyResponse generateHmacKey(String companyId, String webhookId, RequestOptions requestOptions) throws ApiException, IOException
Generate an HMAC key- Parameters:
companyId-StringThe unique identifier of the company account. (required)webhookId-StringUnique identifier of the webhook configuration. (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 companyId, String webhookId) throws ApiException, IOException
Get a webhook- Parameters:
companyId-StringUnique identifier of the [company account](https://docs.adyen.com/account/account-structure#company-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 companyId, String webhookId, RequestOptions requestOptions) throws ApiException, IOException
Get a webhook- Parameters:
companyId-StringUnique identifier of the [company account](https://docs.adyen.com/account/account-structure#company-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 companyId) throws ApiException, IOException
List all webhooks- Parameters:
companyId-StringUnique identifier of the [company account](https://docs.adyen.com/account/account-structure#company-account). (required)- Returns:
ListWebhooksResponse- Throws:
ApiException- if fails to make API callIOException
-
listAllWebhooks
public ListWebhooksResponse listAllWebhooks(String companyId, Integer pageNumber, Integer pageSize, RequestOptions requestOptions) throws ApiException, IOException
List all webhooks- Parameters:
companyId-StringUnique identifier of the [company account](https://docs.adyen.com/account/account-structure#company-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 companyId, String webhookId) throws ApiException, IOException
Remove a webhook- Parameters:
companyId-StringThe unique identifier of the company account. (required)webhookId-StringUnique identifier of the webhook configuration. (required)- Throws:
ApiException- if fails to make API callIOException
-
removeWebhook
public void removeWebhook(String companyId, String webhookId, RequestOptions requestOptions) throws ApiException, IOException
Remove a webhook- Parameters:
companyId-StringThe unique identifier of the company 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 companyId, CreateCompanyWebhookRequest createCompanyWebhookRequest) throws ApiException, IOException
Set up a webhook- Parameters:
companyId-StringUnique identifier of the [company account](https://docs.adyen.com/account/account-structure#company-account). (required)createCompanyWebhookRequest-CreateCompanyWebhookRequest(required)- Returns:
Webhook- Throws:
ApiException- if fails to make API callIOException
-
setUpWebhook
public Webhook setUpWebhook(String companyId, CreateCompanyWebhookRequest createCompanyWebhookRequest, RequestOptions requestOptions) throws ApiException, IOException
Set up a webhook- Parameters:
companyId-StringUnique identifier of the [company account](https://docs.adyen.com/account/account-structure#company-account). (required)createCompanyWebhookRequest-CreateCompanyWebhookRequest(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 companyId, String webhookId, TestCompanyWebhookRequest testCompanyWebhookRequest) throws ApiException, IOException
Test a webhook- Parameters:
companyId-StringThe unique identifier of the company account. (required)webhookId-StringUnique identifier of the webhook configuration. (required)testCompanyWebhookRequest-TestCompanyWebhookRequest(required)- Returns:
TestWebhookResponse- Throws:
ApiException- if fails to make API callIOException
-
testWebhook
public TestWebhookResponse testWebhook(String companyId, String webhookId, TestCompanyWebhookRequest testCompanyWebhookRequest, RequestOptions requestOptions) throws ApiException, IOException
Test a webhook- Parameters:
companyId-StringThe unique identifier of the company account. (required)webhookId-StringUnique identifier of the webhook configuration. (required)testCompanyWebhookRequest-TestCompanyWebhookRequest(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 companyId, String webhookId, UpdateCompanyWebhookRequest updateCompanyWebhookRequest) throws ApiException, IOException
Update a webhook- Parameters:
companyId-StringThe unique identifier of the company account. (required)webhookId-StringUnique identifier of the webhook configuration. (required)updateCompanyWebhookRequest-UpdateCompanyWebhookRequest(required)- Returns:
Webhook- Throws:
ApiException- if fails to make API callIOException
-
updateWebhook
public Webhook updateWebhook(String companyId, String webhookId, UpdateCompanyWebhookRequest updateCompanyWebhookRequest, RequestOptions requestOptions) throws ApiException, IOException
Update a webhook- Parameters:
companyId-StringThe unique identifier of the company account. (required)webhookId-StringUnique identifier of the webhook configuration. (required)updateCompanyWebhookRequest-UpdateCompanyWebhookRequest(required)requestOptions-RequestOptionsObject to store additional data such as idempotency-keys (optional)- Returns:
Webhook- Throws:
ApiException- if fails to make API callIOException
-
-