Consent resource
Generated reference for ovok_sdk: consent resource.
- Stable unknown
- Release candidate since 0.1.0-rc.4
- Development since 0.1.0-dev.23+d339d81
ConsentKindResource
class ConsentKindResourceOne kind of consent the signed-in user gives or withdraws.
Reached through ovok.consent.legal and ovok.consent.medical.
Constructors
ConsentKindResource.new
ConsentKindResource(
HttpClient _http,
String _path,
String _acceptedField,
)Built by Ovok; use ovok.consent.legal or ovok.consent.medical instead.
| Parameter | Type | Kind | Default |
|---|---|---|---|
_http | HttpClient | positional | |
_path | String | positional | |
_acceptedField | String | positional |
Methods
ConsentKindResource.retrieve
Future<Map<String, dynamic>> retrieve()Retrieves the consent. Calls GET v1/me/consent/{kind}.
Returns Future<Map<String, dynamic>>.
ConsentKindResource.set
Future<Map<String, dynamic>> set({required bool accepted})Gives the consent, or withdraws it when accepted is false.
Calls POST v1/me/consent/{kind}.
| Parameter | Type | Kind | Default |
|---|---|---|---|
accepted | bool | required named |
Returns Future<Map<String, dynamic>>.
ConsentResource
class ConsentResourceThe signed-in user's consents. Reached through ovok.consent.
Every request throws an OvokException subclass when it fails.
Constructors
ConsentResource.new
ConsentResource(HttpClient _http)Built by Ovok; use ovok.consent instead.
| Parameter | Type | Kind | Default |
|---|---|---|---|
_http | HttpClient | positional |
Properties
ConsentResource.legal
final ConsentKindResource legalConsent to the terms and conditions, at v1/me/consent/legal.
ConsentResource.medical
final ConsentKindResource medicalConsent to medical settings notifications, at v1/me/consent/medical.
Methods
ConsentResource.requestSignature
Future<Map<String, dynamic>> requestSignature(String consentId)Requests a signature for the consent consentId.
Calls POST consent/signature/{consentId}.
| Parameter | Type | Kind | Default |
|---|---|---|---|
consentId | String | positional |
Returns Future<Map<String, dynamic>>.
Last updated on