Peacemaker.Accounts (Peacemaker v3.3.5-rc.7) View Source

The Accounts context.

Link to this section Summary

Link to this section Types

Specs

create_params() :: %{
  :email => String.t(),
  :first_name => String.t(),
  :last_name => String.t(),
  optional(:otm_content) => String.t(),
  optional(:otm_campaign) => String.t(),
  optional(:otm_medium) => String.t(),
  optional(:otm_source) => String.t(),
  optional(:otm_term) => String.t()
}

Link to this section Functions

Link to this function

add_cancellation(account, params)

View Source
Link to this function

change_password(account, password)

View Source

Specs

create(create_params()) :: {:ok, Peacemaker.Account.t()}

Can create a WealthFit account

If no :password is given, a temporary password is assigned. The raw-text password value is assigned to :temp_pw.

Example Usage:

%Peacemaker.Accounts.create(%{

email: "bobmarley@wealthfit.com",
first_name: "Robert",
last_name: "Billbobby"

})

Specs

create!(create_params()) :: Peacemaker.Account.t()
Link to this function

days_since_membership(map)

View Source

Specs

find_one(%{email: String.t()}) :: Peacemaker.Account.t() | nil
find_one([{:email, String.t()}]) :: Peacemaker.Account.t() | nil

Specs

find_or_create(create_params()) ::
  Peacemaker.Account.t() | {:ok, Peacemaker.Account.t()}

Specs

find_or_create!(create_params()) :: Peacemaker.Account.t()
Link to this function

force_random_password(account)

View Source
Link to this function

has_booked_strategy_session(map)

View Source
Link to this function

has_completed_atleast_one_course(account)

View Source