Proca.Confirm.Operation behaviour (proca v3.4.1)

Each confirmable operation works a bit differently, so modules in Proca.Confirm.* implement the spefics. Thye fallow this behaviour.

Link to this section Summary

Callbacks

Return name of email template used in notification about this confirmable operation

Return map of fields used in notification about this confirmable operation (email or event)

Functions

Select the module implementing behaviour for operation op

Run the operation, after it is accepted (verb = :confirm) or rejected (verb = :reject). auth contains current Proca.Auth context.

Link to this section Callbacks

Link to this callback

email_template(%Proca.Confirm{})

Specs

email_template(%Proca.Confirm{
  __meta__: term(),
  charges: term(),
  code: term(),
  creator: term(),
  creator_id: term(),
  email: term(),
  id: term(),
  inserted_at: term(),
  message: term(),
  object_id: term(),
  operation: term(),
  subject_id: term(),
  updated_at: term()
}) :: String.t()

Return name of email template used in notification about this confirmable operation

Link to this callback

notify_fields(%Proca.Confirm{})

Specs

notify_fields(%Proca.Confirm{
  __meta__: term(),
  charges: term(),
  code: term(),
  creator: term(),
  creator_id: term(),
  email: term(),
  id: term(),
  inserted_at: term(),
  message: term(),
  object_id: term(),
  operation: term(),
  subject_id: term(),
  updated_at: term()
}) :: map()

Return map of fields used in notification about this confirmable operation (email or event)

Link to this callback

run(%Proca.Confirm{}, arg2, atom)

Specs

run(
  %Proca.Confirm{
    __meta__: term(),
    charges: term(),
    code: term(),
    creator: term(),
    creator_id: term(),
    email: term(),
    id: term(),
    inserted_at: term(),
    message: term(),
    object_id: term(),
    operation: term(),
    subject_id: term(),
    updated_at: term()
  },
  :confirm | :reject,
  Proca.Auth
) ::
  :ok
  | {:ok,
     %Proca.ActionPage{
       __meta__: term(),
       campaign: term(),
       campaign_id: term(),
       config: term(),
       delivery: term(),
       extra_supporters: term(),
       id: term(),
       inserted_at: term(),
       live: term(),
       locale: term(),
       name: term(),
       org: term(),
       org_id: term(),
       supporter_confirm_template: term(),
       thank_you_template: term(),
       updated_at: term()
     }}
  | {:ok,
     %Proca.Campaign{
       __meta__: term(),
       action_pages: term(),
       config: term(),
       contact_schema: term(),
       external_id: term(),
       force_delivery: term(),
       id: term(),
       inserted_at: term(),
       mtt: term(),
       name: term(),
       org: term(),
       org_id: term(),
       public_actions: term(),
       targets: term(),
       title: term(),
       transient_actions: term(),
       updated_at: term()
     }}

Link to this section Functions

Select the module implementing behaviour for operation op

Link to this function

run(cnf, verb, auth)

Run the operation, after it is accepted (verb = :confirm) or rejected (verb = :reject). auth contains current Proca.Auth context.