Package com.cloudconvert.resource.async
Class AsyncWebhookResource
java.lang.Object
com.cloudconvert.resource.AbstractResource
com.cloudconvert.resource.AbstractWebhooksResource<AsyncResult<WebhookResponse>,AsyncResult<Pageable<WebhookResponse>>,AsyncResult<Void>>
com.cloudconvert.resource.async.AsyncWebhookResource
- All Implemented Interfaces:
Closeable,AutoCloseable
public class AsyncWebhookResource
extends AbstractWebhooksResource<AsyncResult<WebhookResponse>,AsyncResult<Pageable<WebhookResponse>>,AsyncResult<Void>>
-
Field Summary
Fields inherited from class com.cloudconvert.resource.AbstractWebhooksResource
HMAC_SHA256, PATH_SEGMENT_WEBHOOKSFields inherited from class com.cloudconvert.resource.AbstractResource
BEARER, HEADER_AUTHORIZATION, HEADER_USER_AGENT, INPUT_STREAM_TYPE_REFERENCE, JOB_RESPONSE_PAGEABLE_TYPE_REFERENCE, JOB_RESPONSE_TYPE_REFERENCE, MAP_STRING_TO_OBJECT_TYPE_REFERENCE, OPERATION_RESPONSE_PAGEABLE_TYPE_REFERENCE, TASK_RESPONSE_PAGEABLE_TYPE_REFERENCE, TASK_RESPONSE_TYPE_REFERENCE, USER_RESPONSE_TYPE_REFERENCE, V2, VALUE_USER_AGENT, VOID_TYPE_REFERENCE, WEBHOOKS_RESPONSE_PAGEABLE_TYPE_REFERENCE, WEBHOOKS_RESPONSE_TYPE_REFERENCE -
Constructor Summary
ConstructorsConstructorDescriptionAsyncWebhookResource(SettingsProvider settingsProvider, ObjectMapperProvider objectMapperProvider, AsyncRequestExecutor asyncRequestExecutor) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()create(@NotNull WebhookRequest webhookRequest) Create a webhook.Delete a webhook.list()List all webhooks.List all webhooks.list(@NotNull Map<Filter, String> filters, @Nullable Pagination pagination) List all webhooks.Methods inherited from class com.cloudconvert.resource.AbstractWebhooksResource
getCreateHttpUriRequest, getDeleteHttpUriRequest, getListHttpUriRequest, verifyMethods inherited from class com.cloudconvert.resource.AbstractResource
getHttpEntity, getHttpEntity, getHttpUriRequest, getHttpUriRequest, getJson, getSyncUri, getSyncUri, getUri, getUri, requestToMap
-
Constructor Details
-
AsyncWebhookResource
public AsyncWebhookResource(SettingsProvider settingsProvider, ObjectMapperProvider objectMapperProvider, AsyncRequestExecutor asyncRequestExecutor)
-
-
Method Details
-
create
public AsyncResult<WebhookResponse> create(@NotNull @NotNull WebhookRequest webhookRequest) throws IOException, URISyntaxException Description copied from class:AbstractWebhooksResourceCreate a webhook. Requires the webhook.write scope.- Specified by:
createin classAbstractWebhooksResource<AsyncResult<WebhookResponse>,AsyncResult<Pageable<WebhookResponse>>, AsyncResult<Void>> - Parameters:
webhookRequest-WebhookRequest- Returns:
AbstractWebhooksResource- Throws:
IOExceptionURISyntaxException
-
list
Description copied from class:AbstractWebhooksResourceList all webhooks. Requires the webhook.read scope.- Specified by:
listin classAbstractWebhooksResource<AsyncResult<WebhookResponse>,AsyncResult<Pageable<WebhookResponse>>, AsyncResult<Void>> - Returns:
AbstractWebhooksResource- Throws:
IOExceptionURISyntaxException
-
list
public AsyncResult<Pageable<WebhookResponse>> list(@NotNull @NotNull Map<Filter, String> filters) throws IOException, URISyntaxExceptionDescription copied from class:AbstractWebhooksResourceList all webhooks. Requires the webhook.read scope.- Specified by:
listin classAbstractWebhooksResource<AsyncResult<WebhookResponse>,AsyncResult<Pageable<WebhookResponse>>, AsyncResult<Void>> - Parameters:
filters- (optional) Filters: - url - The result will be filtered to include only webhooks with a specific URL.- Returns:
AbstractWebhooksResource- Throws:
IOExceptionURISyntaxException
-
list
public AsyncResult<Pageable<WebhookResponse>> list(@NotNull @NotNull Map<Filter, String> filters, @Nullable @Nullable Pagination pagination) throws IOException, URISyntaxExceptionDescription copied from class:AbstractWebhooksResourceList all webhooks. Requires the webhook.read scope.- Specified by:
listin classAbstractWebhooksResource<AsyncResult<WebhookResponse>,AsyncResult<Pageable<WebhookResponse>>, AsyncResult<Void>> - Parameters:
filters- (optional) Filters: - url - The result will be filtered to include only webhooks with a specific URL.pagination- (optional) Pagination: - per_page - Number of tasks per page, defaults to 100. - page - The result page to show.- Returns:
AbstractWebhooksResource- Throws:
IOExceptionURISyntaxException
-
delete
public AsyncResult<Void> delete(@NotNull @NotNull String webhookId) throws IOException, URISyntaxException Description copied from class:AbstractWebhooksResourceDelete a webhook. Requires the webhook.write scope.- Specified by:
deletein classAbstractWebhooksResource<AsyncResult<WebhookResponse>,AsyncResult<Pageable<WebhookResponse>>, AsyncResult<Void>> - Parameters:
webhookId- webhook id- Returns:
- VR
- Throws:
IOExceptionURISyntaxException
-
close
- Throws:
IOException
-