View Source Gpp.Sections.Tcf (Gpp v0.1.4)
IAB Transparency and Consent Framework v1.1 & v2.0 String Decoding.
Only decodes the "version" and the "vendor consents" parts of the "core" segment.
Link to this section Summary
Functions
Checks if the provided vendor_id is in the list of vendor_consents
Link to this section Types
@type t() :: %Gpp.Sections.Tcf{ section_id: term(), value: term(), vendor_consents: [vendor_id()], version: pos_integer() }
@type vendor_id() :: pos_integer()
Link to this section Functions
Checks if the provided vendor_id is in the list of vendor_consents
examples
Examples
iex> Tcf.has_consent?(%Tcf{vendor_consents: [8, 6, 2]}, 8)
true
iex> Tcf.has_consent?(%Tcf{vendor_consents: [8, 6, 2]}, 123)
false