View Source Plausible.Billing.SiteLocker (Plausible v0.0.1)

Summary

Types

@type lock_reason() ::
  :grace_period_ended_now
  | :grace_period_ended_already
  | :no_trial
  | :no_active_subscription
@type update_opt() :: {:send_email?, boolean()}

Functions

Link to this function

send_grace_period_end_email(user)

View Source
@spec send_grace_period_end_email(Plausible.Auth.User.t()) ::
  Plausible.Mailer.result()
Link to this function

set_lock_status_for(user, status)

View Source
@spec set_lock_status_for(Plausible.Auth.User.t(), boolean()) ::
  {:ok, non_neg_integer()}
Link to this function

update_sites_for(user, opts \\ [])

View Source
@spec update_sites_for(Plausible.Auth.User.t(), [update_opt()]) ::
  {:locked, lock_reason()} | :unlocked