GoodAnalytics.Core.Partners (GoodAnalytics v0.1.1)

Copy Markdown View Source

Context for partner CRUD operations.

Summary

Functions

Archives a partner (sets status to archived and archived_at timestamp).

Archives a partner, scoped to a workspace.

Creates a partner in the given workspace.

Gets an active partner by ID and workspace. Returns nil if not found or not active.

Gets an active partner by key and workspace.

Gets a partner by ID.

Gets a partner by ID, scoped to a workspace.

Lists partners for a workspace (excludes archived by default).

Updates a partner.

Updates a partner, scoped to a workspace.

Functions

archive_partner(id)

Archives a partner (sets status to archived and archived_at timestamp).

archive_partner(workspace_id, id)

Archives a partner, scoped to a workspace.

create_partner(attrs)

Creates a partner in the given workspace.

get_active_partner(workspace_id, id)

Gets an active partner by ID and workspace. Returns nil if not found or not active.

get_active_partner_by_key(workspace_id, key)

Gets an active partner by key and workspace.

get_partner(id)

Gets a partner by ID.

get_partner(workspace_id, id)

Gets a partner by ID, scoped to a workspace.

list_partners(workspace_id, opts \\ [])

Lists partners for a workspace (excludes archived by default).

update_partner(id, attrs)

Updates a partner.

update_partner(workspace_id, id, attrs)

Updates a partner, scoped to a workspace.