Package com.cloudconvert.resource.async
Class AsyncWebhookResource
java.lang.Object
com.cloudconvert.resource.AbstractResource
com.cloudconvert.resource.AbstractWebhooksResource<AsyncResult<WebhookResponse>,AsyncResult<Pageable<WebhookResponse>>,AsyncResult<java.lang.Void>>
com.cloudconvert.resource.async.AsyncWebhookResource
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class AsyncWebhookResource extends AbstractWebhooksResource<AsyncResult<WebhookResponse>,AsyncResult<Pageable<WebhookResponse>>,AsyncResult<java.lang.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
Constructors Constructor Description AsyncWebhookResource(SettingsProvider settingsProvider, ObjectMapperProvider objectMapperProvider, AsyncRequestExecutor asyncRequestExecutor) -
Method Summary
Modifier and Type Method Description voidclose()AsyncResult<WebhookResponse>create(@NotNull WebhookRequest webhookRequest)Create a webhook.AsyncResult<java.lang.Void>delete(@NotNull java.lang.String webhookId)Delete a webhook.AsyncResult<Pageable<WebhookResponse>>list()List all webhooks.AsyncResult<Pageable<WebhookResponse>>list(@NotNull java.util.Map<Filter,java.lang.String> filters)List all webhooks.AsyncResult<Pageable<WebhookResponse>>list(@NotNull java.util.Map<Filter,java.lang.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, requestToMapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
AsyncWebhookResource
public AsyncWebhookResource(SettingsProvider settingsProvider, ObjectMapperProvider objectMapperProvider, AsyncRequestExecutor asyncRequestExecutor)
-
-
Method Details
-
create
public AsyncResult<WebhookResponse> create(@NotNull @NotNull WebhookRequest webhookRequest) throws java.io.IOException, java.net.URISyntaxExceptionDescription copied from class:AbstractWebhooksResourceCreate a webhook. Requires the webhook.write scope.- Specified by:
createin classAbstractWebhooksResource<AsyncResult<WebhookResponse>,AsyncResult<Pageable<WebhookResponse>>,AsyncResult<java.lang.Void>>- Parameters:
webhookRequest-WebhookRequest- Returns:
AbstractWebhooksResource- Throws:
java.io.IOExceptionjava.net.URISyntaxException
-
list
public AsyncResult<Pageable<WebhookResponse>> list() throws java.io.IOException, java.net.URISyntaxExceptionDescription copied from class:AbstractWebhooksResourceList all webhooks. Requires the webhook.read scope.- Specified by:
listin classAbstractWebhooksResource<AsyncResult<WebhookResponse>,AsyncResult<Pageable<WebhookResponse>>,AsyncResult<java.lang.Void>>- Returns:
AbstractWebhooksResource- Throws:
java.io.IOExceptionjava.net.URISyntaxException
-
list
public AsyncResult<Pageable<WebhookResponse>> list(@NotNull @NotNull java.util.Map<Filter,java.lang.String> filters) throws java.io.IOException, java.net.URISyntaxExceptionDescription copied from class:AbstractWebhooksResourceList all webhooks. Requires the webhook.read scope.- Specified by:
listin classAbstractWebhooksResource<AsyncResult<WebhookResponse>,AsyncResult<Pageable<WebhookResponse>>,AsyncResult<java.lang.Void>>- Parameters:
filters- (optional) Filters: - url - The result will be filtered to include only webhooks with a specific URL.- Returns:
AbstractWebhooksResource- Throws:
java.io.IOExceptionjava.net.URISyntaxException
-
list
public AsyncResult<Pageable<WebhookResponse>> list(@NotNull @NotNull java.util.Map<Filter,java.lang.String> filters, @Nullable @Nullable Pagination pagination) throws java.io.IOException, java.net.URISyntaxExceptionDescription copied from class:AbstractWebhooksResourceList all webhooks. Requires the webhook.read scope.- Specified by:
listin classAbstractWebhooksResource<AsyncResult<WebhookResponse>,AsyncResult<Pageable<WebhookResponse>>,AsyncResult<java.lang.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:
java.io.IOExceptionjava.net.URISyntaxException
-
delete
public AsyncResult<java.lang.Void> delete(@NotNull @NotNull java.lang.String webhookId) throws java.io.IOException, java.net.URISyntaxExceptionDescription copied from class:AbstractWebhooksResourceDelete a webhook. Requires the webhook.write scope.- Specified by:
deletein classAbstractWebhooksResource<AsyncResult<WebhookResponse>,AsyncResult<Pageable<WebhookResponse>>,AsyncResult<java.lang.Void>>- Parameters:
webhookId- webhook id- Returns:
- VR
- Throws:
java.io.IOExceptionjava.net.URISyntaxException
-
close
public void close() throws java.io.IOException- Throws:
java.io.IOException
-