Packages

An open source two way communication platform for the social sector

Current section

Files

Jump to
glific lib glific providers contact_behaviour.ex
Raw

lib/glific/providers/contact_behaviour.ex

defmodule Glific.Providers.ContactBehaviour do
@moduledoc """
The contact behaviour which all the providers needs to implement for communication
"""
alias Glific.Contacts.Contact
@callback optin_contact(attrs :: map()) ::
{:ok, Contact.t()} | {:error, Ecto.Changeset.t()} | {:error, list()}
@callback fetch_opted_in_contacts(attrs :: map()) :: :ok | {:error, String.t()}
end