public class WebhooksHelper extends Object
| Constructor and Description |
|---|
WebhooksHelper(Marshaller marshaller,
SecretKeyStore secretKeyStore) |
| Modifier and Type | Method and Description |
|---|---|
WebhooksEvent |
unmarshal(byte[] body,
List<RequestHeader> requestHeaders)
Unmarshals the given body, while also validating it using the given request headers.
|
WebhooksEvent |
unmarshal(InputStream bodyStream,
List<RequestHeader> requestHeaders)
Unmarshals the given input stream that contains the body,
while also validating its contents using the given request headers.
|
WebhooksEvent |
unmarshal(String body,
List<RequestHeader> requestHeaders)
Unmarshals the given body, while also validating it using the given request headers.
|
protected void |
validate(byte[] body,
List<RequestHeader> requestHeaders)
Validates the given body using the given request headers.
|
protected void |
validate(String body,
List<RequestHeader> requestHeaders)
Validates the given body using the given request headers.
|
public WebhooksHelper(Marshaller marshaller, SecretKeyStore secretKeyStore)
public WebhooksEvent unmarshal(InputStream bodyStream, List<RequestHeader> requestHeaders) throws IOException
WebhooksEventIOException - If the input stream could not be read.SignatureValidationException - If the input stream could not be validated successfully.ApiVersionMismatchException - If the resulting event has an API version that this version of the SDK does not support.public WebhooksEvent unmarshal(byte[] body, List<RequestHeader> requestHeaders)
WebhooksEventSignatureValidationException - If the body could not be validated successfully.ApiVersionMismatchException - If the resulting event has an API version that this version of the SDK does not support.protected void validate(byte[] body,
List<RequestHeader> requestHeaders)
SignatureValidationException - If the body could not be validated successfully.public WebhooksEvent unmarshal(String body, List<RequestHeader> requestHeaders)
WebhooksEventSignatureValidationException - If the body could not be validated successfully.ApiVersionMismatchException - If the resulting event has an API version that this version of the SDK does not support.protected void validate(String body, List<RequestHeader> requestHeaders)
SignatureValidationException - If the body could not be validated successfully.Copyright © 2024 Ingenico ePayments. All rights reserved.