Package com.cloudconvert.resource.sync
Class WebhookResource
java.lang.Object
com.cloudconvert.resource.AbstractResource
com.cloudconvert.resource.AbstractWebhooksResource<Result<WebhookResponse>,Result<Pageable<WebhookResponse>>,Result<Void>>
com.cloudconvert.resource.sync.WebhookResource
- All Implemented Interfaces:
Closeable,AutoCloseable
public class WebhookResource
extends AbstractWebhooksResource<Result<WebhookResponse>,Result<Pageable<WebhookResponse>>,Result<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
ConstructorsConstructorDescriptionWebhookResource(SettingsProvider settingsProvider, ObjectMapperProvider objectMapperProvider, RequestExecutor requestExecutor) -
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
-
WebhookResource
public WebhookResource(SettingsProvider settingsProvider, ObjectMapperProvider objectMapperProvider, RequestExecutor requestExecutor)
-
-
Method Details
-
create
public Result<WebhookResponse> create(@NotNull @NotNull WebhookRequest webhookRequest) throws IOException, URISyntaxException, CloudConvertClientException, CloudConvertServerException Description copied from class:AbstractWebhooksResourceCreate a webhook. Requires the webhook.write scope.- Specified by:
createin classAbstractWebhooksResource<Result<WebhookResponse>,Result<Pageable<WebhookResponse>>, Result<Void>> - Parameters:
webhookRequest-WebhookRequest- Returns:
AbstractWebhooksResource- Throws:
IOExceptionURISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
list
public Result<Pageable<WebhookResponse>> list() throws IOException, URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionDescription copied from class:AbstractWebhooksResourceList all webhooks. Requires the webhook.read scope.- Specified by:
listin classAbstractWebhooksResource<Result<WebhookResponse>,Result<Pageable<WebhookResponse>>, Result<Void>> - Returns:
AbstractWebhooksResource- Throws:
IOExceptionURISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
list
public Result<Pageable<WebhookResponse>> list(@NotNull @NotNull Map<Filter, String> filters) throws IOException, URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionDescription copied from class:AbstractWebhooksResourceList all webhooks. Requires the webhook.read scope.- Specified by:
listin classAbstractWebhooksResource<Result<WebhookResponse>,Result<Pageable<WebhookResponse>>, Result<Void>> - Parameters:
filters- (optional) Filters: - url - The result will be filtered to include only webhooks with a specific URL.- Returns:
AbstractWebhooksResource- Throws:
IOExceptionURISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
list
public Result<Pageable<WebhookResponse>> list(@NotNull @NotNull Map<Filter, String> filters, @Nullable @Nullable Pagination pagination) throws IOException, URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionDescription copied from class:AbstractWebhooksResourceList all webhooks. Requires the webhook.read scope.- Specified by:
listin classAbstractWebhooksResource<Result<WebhookResponse>,Result<Pageable<WebhookResponse>>, Result<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:
IOExceptionURISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
delete
public Result<Void> delete(@NotNull @NotNull String webhookId) throws IOException, URISyntaxException, CloudConvertClientException, CloudConvertServerException Description copied from class:AbstractWebhooksResourceDelete a webhook. Requires the webhook.write scope.- Specified by:
deletein classAbstractWebhooksResource<Result<WebhookResponse>,Result<Pageable<WebhookResponse>>, Result<Void>> - Parameters:
webhookId- webhook id- Returns:
- VR
- Throws:
IOExceptionURISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
close
- Throws:
IOException
-