Convenience delegation module for working with both Corporate and Consumer identities without specifying the type at the call site.
For the full, type-specific API with all operations (KYB/KYC, email
verification, fee charging, etc.), use Weavr.Corporates and
Weavr.Consumers directly.
Summary
Functions
Creates a Consumer identity. Delegates to Weavr.Consumers.create/3.
Creates a Corporate identity. Delegates to Weavr.Corporates.create/3.
Gets the logged-in Consumer. Delegates to Weavr.Consumers.get/2.
Gets the logged-in Corporate. Delegates to Weavr.Corporates.get/2.
Updates the logged-in Consumer. Delegates to Weavr.Consumers.update/3.
Updates the logged-in Corporate. Delegates to Weavr.Corporates.update/3.
Functions
@spec create_consumer(Weavr.Config.t(), map(), keyword()) :: {:ok, map()} | {:error, Weavr.Error.t()}
Creates a Consumer identity. Delegates to Weavr.Consumers.create/3.
@spec create_corporate(Weavr.Config.t(), map(), keyword()) :: {:ok, map()} | {:error, Weavr.Error.t()}
Creates a Corporate identity. Delegates to Weavr.Corporates.create/3.
@spec get_consumer(Weavr.Config.t(), String.t()) :: {:ok, map()} | {:error, Weavr.Error.t()}
Gets the logged-in Consumer. Delegates to Weavr.Consumers.get/2.
@spec get_corporate(Weavr.Config.t(), String.t()) :: {:ok, map()} | {:error, Weavr.Error.t()}
Gets the logged-in Corporate. Delegates to Weavr.Corporates.get/2.
@spec update_consumer(Weavr.Config.t(), String.t(), map()) :: {:ok, map()} | {:error, Weavr.Error.t()}
Updates the logged-in Consumer. Delegates to Weavr.Consumers.update/3.
@spec update_corporate(Weavr.Config.t(), String.t(), map()) :: {:ok, map()} | {:error, Weavr.Error.t()}
Updates the logged-in Corporate. Delegates to Weavr.Corporates.update/3.