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 ConsentKindResource

One 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.

ParameterTypeKindDefault
_httpHttpClientpositional
_pathStringpositional
_acceptedFieldStringpositional

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}.

ParameterTypeKindDefault
acceptedboolrequired named

Returns Future<Map<String, dynamic>>.

ConsentResource

class ConsentResource

The 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.

ParameterTypeKindDefault
_httpHttpClientpositional

Properties

ConsentResource.legal

final ConsentKindResource legal

Consent to the terms and conditions, at v1/me/consent/legal.

ConsentResource.medical

final ConsentKindResource medical

Consent 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}.

ParameterTypeKindDefault
consentIdStringpositional

Returns Future<Map<String, dynamic>>.

Last updated on

On this page