@Path(value="shops/{shopId}/webhooks/")
public final class WebhookResource
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private javax.ws.rs.container.ContainerRequestContext |
containerRequestContext |
private static org.slf4j.Logger |
LOGGER |
private java.lang.String |
shopId |
private ShopRequestContextService |
shopService |
private WebhookService |
webhookService |
Constructor and Description |
---|
WebhookResource() |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
activate(GUID webhookId,
boolean active) |
javax.ws.rs.core.Response |
createWebhook(Webhook payload) |
javax.ws.rs.core.Response |
deleteWebhook(GUID webhookId) |
private java.lang.String |
extractClientIdFromRequest() |
javax.ws.rs.core.Response |
get(GUID webhookId) |
javax.ws.rs.core.Response |
webhookCallback(java.lang.String signature,
java.lang.String entity) |
private static final org.slf4j.Logger LOGGER
@Inject private ShopRequestContextService shopService
@Inject private WebhookService webhookService
@Context private javax.ws.rs.container.ContainerRequestContext containerRequestContext
@PathParam(value="shopId") private java.lang.String shopId
@POST @Consumes(value="application/json") @Produces(value="application/vnd.epages.v1+json, application/json") public javax.ws.rs.core.Response createWebhook(Webhook payload)
@GET @Path(value="{webhookId}") @Produces(value="application/vnd.epages.v1+json, application/json") public javax.ws.rs.core.Response get(@PathParam(value="webhookId") GUID webhookId)
@POST @Path(value="{webhookId}") @Consumes(value="application/x-www-form-urlencoded") @Produces(value="application/vnd.epages.v1+json, application/json") public javax.ws.rs.core.Response activate(@PathParam(value="webhookId") GUID webhookId, @FormParam(value="active") boolean active)
@DELETE @Path(value="{webhookId}") public javax.ws.rs.core.Response deleteWebhook(@PathParam(value="webhookId") GUID webhookId)
private java.lang.String extractClientIdFromRequest()
@POST @Path(value="callback") @Produces(value="application/json") @Consumes(value="application/json") public javax.ws.rs.core.Response webhookCallback(@HeaderParam(value="X-ePages-Hmac-SHA256") java.lang.String signature, java.lang.String entity)