Package com.cloudconvert.resource.sync
Class WebhookResource
java.lang.Object
com.cloudconvert.resource.AbstractResource
com.cloudconvert.resource.AbstractWebhooksResource<Result<WebhookResponse>,Result<Pageable<WebhookResponse>>,Result<java.lang.Void>>
com.cloudconvert.resource.sync.WebhookResource
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class WebhookResource extends AbstractWebhooksResource<Result<WebhookResponse>,Result<Pageable<WebhookResponse>>,Result<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 WebhookResource(SettingsProvider settingsProvider, ObjectMapperProvider objectMapperProvider, RequestExecutor requestExecutor) -
Method Summary
Modifier and Type Method Description voidclose()Result<WebhookResponse>create(@NotNull WebhookRequest webhookRequest)Create a webhook.Result<java.lang.Void>delete(@NotNull java.lang.String webhookId)Delete a webhook.Result<Pageable<WebhookResponse>>list()List all webhooks.Result<Pageable<WebhookResponse>>list(@NotNull java.util.Map<Filter,java.lang.String> filters)List all webhooks.Result<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, getUri, getUri, requestToMap
-
Constructor Details
-
WebhookResource
public WebhookResource(SettingsProvider settingsProvider, ObjectMapperProvider objectMapperProvider, RequestExecutor requestExecutor)
-
-
Method Details
-
create
public Result<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<Result<WebhookResponse>,Result<Pageable<WebhookResponse>>,Result<java.lang.Void>>- Parameters:
webhookRequest-WebhookRequest- Returns:
AbstractWebhooksResource- Throws:
java.io.IOExceptionjava.net.URISyntaxException
-
list
public Result<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<Result<WebhookResponse>,Result<Pageable<WebhookResponse>>,Result<java.lang.Void>>- Returns:
AbstractWebhooksResource- Throws:
java.io.IOExceptionjava.net.URISyntaxException
-
list
public Result<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<Result<WebhookResponse>,Result<Pageable<WebhookResponse>>,Result<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 Result<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<Result<WebhookResponse>,Result<Pageable<WebhookResponse>>,Result<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 Result<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<Result<WebhookResponse>,Result<Pageable<WebhookResponse>>,Result<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
-