Package com.onfido
Class WebhookManager
- java.lang.Object
-
- com.onfido.api.ResourceManager
-
- com.onfido.WebhookManager
-
public class WebhookManager extends ResourceManager
Manager class for the Webhook resource type. Contains resource-specific methods for interacting with the API.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedWebhookManager(Config config, okhttp3.OkHttpClient client)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Webhookcreate(Webhook.Request request)Registers a webhook.voiddelete(String webhookId)Deletes a webhook.Webhookfind(String webhookId)Retrieves a single webhook.List<Webhook>list()Lists all webhooks you’ve created.Webhookupdate(String webhookId, Webhook.Request request)Edits a webhook.-
Methods inherited from class com.onfido.api.ResourceManager
addFormDataParam, deleteRequest, downloadRequest, get, post, put, readInputStream, uploadRequest
-
-
-
-
Constructor Detail
-
WebhookManager
protected WebhookManager(Config config, okhttp3.OkHttpClient client)
-
-
Method Detail
-
create
public Webhook create(Webhook.Request request) throws OnfidoException
Registers a webhook.- Parameters:
request- the request body- Returns:
- the Webhook
- Throws:
OnfidoException- the onfido exception
-
find
public Webhook find(String webhookId) throws OnfidoException
Retrieves a single webhook.- Parameters:
webhookId- the webhook id- Returns:
- the Webhook
- Throws:
OnfidoException- the onfido exception
-
update
public Webhook update(String webhookId, Webhook.Request request) throws OnfidoException
Edits a webhook.- Parameters:
webhookId- the webhook idrequest- the request body- Returns:
- the Webhook
- Throws:
OnfidoException- the onfido exception
-
delete
public void delete(String webhookId) throws OnfidoException
Deletes a webhook. If successful, returns a 204 No Content response.- Parameters:
webhookId- the webhook id- Throws:
OnfidoException- the onfido exception
-
list
public List<Webhook> list() throws OnfidoException
Lists all webhooks you’ve created.- Returns:
- the list of Webhooks
- Throws:
OnfidoException- the onfido exception
-
-