Package com.adyen.model
Class RequestOptions
- java.lang.Object
-
- com.adyen.model.RequestOptions
-
public class RequestOptions extends Object
Container for optional HTTP headers that can be included in API requests. These options can be used to specify headers such as the Idempotency-Key, WWW-Authenticate or other custom headers.
-
-
Constructor Summary
Constructors Constructor Description RequestOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RequestOptionsaddAdditionalServiceHeader(String key, String value)Add an additional header to the request.RequestOptionsadditionalServiceHeaders(HashMap<String,String> additionalServiceHeaders)Set additional headers for the request.HashMap<String,String>getAdditionalServiceHeaders()Get additional headers for the request.StringgetIdempotencyKey()Get the value of the Idempotency-Key header.StringgetRequestedVerificationCodeHeader()Get the value of the x-requested-verification-code header.StringgetWwwAuthenticateHeader()Get the value of the WWW-Authenticate header.RequestOptionsidempotencyKey(String idempotencyKey)Set the Idempotency-Key header for the request.RequestOptionsrequestedVerificationCodeHeader(String requestedVerificationCodeHeader)Set the x-requested-verification-code header for the request.voidsetAdditionalServiceHeaders(HashMap<String,String> additionalServiceHeaders)Set additional headers for the request.voidsetIdempotencyKey(String idempotencyKey)Set the Idempotency-Key header for the request.voidsetRequestedVerificationCodeHeader(String requestedVerificationCodeHeader)Set the x-requested-verification-code header for the request.voidsetWwwAuthenticateHeader(String wwwAuthenticateHeader)Set the WWW-Authenticate header for the request.StringtoString()RequestOptionswwwAuthenticateHeader(String wwwAuthenticateHeader)Set the WWW-Authenticate header for the request.
-
-
-
Method Detail
-
idempotencyKey
public RequestOptions idempotencyKey(String idempotencyKey)
Set the Idempotency-Key header for the request.- Parameters:
idempotencyKey- The idempotency key.- Returns:
- This
RequestOptionsinstance.
-
requestedVerificationCodeHeader
public RequestOptions requestedVerificationCodeHeader(String requestedVerificationCodeHeader)
Set the x-requested-verification-code header for the request.- Parameters:
requestedVerificationCodeHeader- The requested verification code.- Returns:
- This
RequestOptionsinstance.
-
wwwAuthenticateHeader
public RequestOptions wwwAuthenticateHeader(String wwwAuthenticateHeader)
Set the WWW-Authenticate header for the request.- Parameters:
wwwAuthenticateHeader- The WWW-Authenticate header value.- Returns:
- This
RequestOptionsinstance.
-
additionalServiceHeaders
public RequestOptions additionalServiceHeaders(HashMap<String,String> additionalServiceHeaders)
Set additional headers for the request.- Parameters:
additionalServiceHeaders- A map of additional headers.- Returns:
- This
RequestOptionsinstance.
-
addAdditionalServiceHeader
public RequestOptions addAdditionalServiceHeader(String key, String value)
Add an additional header to the request.- Parameters:
key- The key of the header.value- The value of the header.- Returns:
- This
RequestOptionsinstance.
-
getIdempotencyKey
public String getIdempotencyKey()
Get the value of the Idempotency-Key header.- Returns:
- The idempotency key.
-
setIdempotencyKey
public void setIdempotencyKey(String idempotencyKey)
Set the Idempotency-Key header for the request.- Parameters:
idempotencyKey- The idempotency key.
-
getRequestedVerificationCodeHeader
public String getRequestedVerificationCodeHeader()
Get the value of the x-requested-verification-code header.- Returns:
- The requested verification code.
-
setRequestedVerificationCodeHeader
public void setRequestedVerificationCodeHeader(String requestedVerificationCodeHeader)
Set the x-requested-verification-code header for the request.- Parameters:
requestedVerificationCodeHeader- The requested verification code.
-
getAdditionalServiceHeaders
public HashMap<String,String> getAdditionalServiceHeaders()
Get additional headers for the request.- Returns:
- A map of additional headers.
-
setAdditionalServiceHeaders
public void setAdditionalServiceHeaders(HashMap<String,String> additionalServiceHeaders)
Set additional headers for the request.- Parameters:
additionalServiceHeaders- A map of additional headers.
-
getWwwAuthenticateHeader
public String getWwwAuthenticateHeader()
Get the value of the WWW-Authenticate header.- Returns:
- The WWW-Authenticate header value.
-
setWwwAuthenticateHeader
public void setWwwAuthenticateHeader(String wwwAuthenticateHeader)
Set the WWW-Authenticate header for the request.- Parameters:
wwwAuthenticateHeader- The WWW-Authenticate header value.
-
-