Skip to content

Terms module

The module that builds a terms screen and saves and reads consent. It provides a consent status lookup that tells whether the consent screen is needed, the terms for the user's country and language, and saving consent, re-consent and withdrawal. It also lists earlier terms versions and consent history, and erases consent records.

Module information

  • Package: com.com2usplatform.hiveaxyl.terms
  • Namespaces: Hive.Axyl.Terms
  • Registration methods: AddTerms()
  • Supported platforms: All (server API)
  • Minimum requirements: Unity 6000.0+

Provided interfaces

Interface Registration method
ITermsService AddTerms()

Registration and resolution

Call the registration method in the registration closure of HiveBootstrap.Initialize, then get the interface with HiveCore.Resolve<T>().

using Hive.Axyl.Core;
using Hive.Axyl.Core.Unity;   // HiveBootstrap
using Hive.Axyl.Terms;

var config = CoreConfig.CreateBuilder("{appId}").Build();

HiveBootstrap.Initialize(config, builder =>
{
    builder.AddTerms();
});

ITermsService terms = HiveCore.Resolve<ITermsService>();

The server that requests go to is chosen at registration.

  • AddTerms(): sends requests to the production server https://core-api.hiveaxyl.com.
  • AddTerms(string baseUrl): sends requests to the given server.