ConsentResource
Reads and records the signed-in user's consents and requests consent signatures.
- Stable unknown
- Release candidate since 0.1.0-rc.4
- Development since 0.1.0-dev.24+fa54770
public final class ConsentResourceReads and records the signed-in user's consents and requests consent signatures. Get it from Ovok.consent().
Methods
legal
public ConsentResource.LegalConsentResource legal()Returns the legal (terms and conditions) consent routes.
Returns: the legal consent resource
medical
public ConsentResource.MedicalConsentResource medical()Returns the medical-notifications consent routes.
Returns: the medical consent resource
requestSignature
public JsonNode requestSignature(String consentId) throws IOException, InterruptedExceptionRequests a signature for a consent (POST /consent/signature/{consentId}).
Parameters:
consentId: theConsentid
Returns: the response body
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
public JsonNode requestSignature(
String consentId,
RequestOptions options) throws IOException, InterruptedExceptionRequests a signature for a consent (POST /consent/signature/{consentId}).
Parameters:
consentId: theConsentidoptions: per-request options, such as the timeout
Returns: the response body
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
ConsentResource.LegalConsentResource
public static final class LegalConsentResourceReads and records the signed-in user's legal consent (/v1/me/consent/legal).
LegalConsentResource.retrieve
public JsonNode retrieve() throws IOException, InterruptedExceptionReads the signed-in user's legal consent (GET /v1/me/consent/legal).
Returns: the consent state
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
public JsonNode retrieve(RequestOptions options) throws IOException, InterruptedExceptionReads the signed-in user's legal consent (GET /v1/me/consent/legal).
Parameters:
options: per-request options, such as the timeout
Returns: the consent state
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
LegalConsentResource.set
public JsonNode set(boolean accepted) throws IOException, InterruptedExceptionRecords whether the signed-in user accepts the legal consent (POST /v1/me/consent/legal).
Parameters:
accepted: whether the user accepts; sent astermsAndConditionsConsent
Returns: the consent state
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
public JsonNode set(
boolean accepted,
RequestOptions options) throws IOException, InterruptedExceptionRecords whether the signed-in user accepts the legal consent (POST /v1/me/consent/legal).
Parameters:
accepted: whether the user accepts; sent astermsAndConditionsConsentoptions: per-request options, such as the timeout
Returns: the consent state
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
ConsentResource.MedicalConsentResource
public static final class MedicalConsentResourceReads and records the signed-in user's medical-notifications consent (/v1/me/consent/medical).
MedicalConsentResource.retrieve
public JsonNode retrieve() throws IOException, InterruptedExceptionReads the signed-in user's medical-notifications consent (GET /v1/me/consent/medical).
Returns: the consent state
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
public JsonNode retrieve(RequestOptions options) throws IOException, InterruptedExceptionReads the signed-in user's medical-notifications consent (GET /v1/me/consent/medical).
Parameters:
options: per-request options, such as the timeout
Returns: the consent state
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
MedicalConsentResource.set
public JsonNode set(boolean accepted) throws IOException, InterruptedExceptionRecords whether the signed-in user accepts the medical-notifications consent (POST /v1/me/consent/medical).
Parameters:
accepted: whether the user accepts; sent asmedicalSettingsNotificationsConsent
Returns: the consent state
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
public JsonNode set(
boolean accepted,
RequestOptions options) throws IOException, InterruptedExceptionRecords whether the signed-in user accepts the medical-notifications consent (POST /v1/me/consent/medical).
Parameters:
accepted: whether the user accepts; sent asmedicalSettingsNotificationsConsentoptions: per-request options, such as the timeout
Returns: the consent state
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
Last updated on