The result of Unicom360.WhatsApp.send_template/3 (canonical name TemplateSendResult).
api_reference,message- from the envelope.accepted_count,rejected_count- how many recipients were queued and rejected (the API'sacceptedandrejected;accepted/1andrejected/1return the results).results- oneUnicom360.WhatsApp.TemplateResultper recipient.raw,extra- the JSON object, and the members this version does not model.
A rejected recipient is not an error. When every recipient is rejected the send fails with
a NoValidRecipientsError (%Unicom360.Error{code: "NO_VALID_RECIPIENTS"}), whose results
say why.
Summary
Functions
The queued results (status exactly "ACKNOWLEDGED"), in response order.
The first result whose to has the same digits as number, or nil.
The rejected results (status exactly "REJECTED"), in response order.
Types
@type t() :: %Unicom360.WhatsApp.TemplateSendResult{ accepted_count: non_neg_integer() | nil, api_reference: String.t() | nil, extra: map(), message: String.t() | nil, raw: map(), rejected_count: non_neg_integer() | nil, results: [Unicom360.WhatsApp.TemplateResult.t()] }
Functions
@spec accepted(t()) :: [Unicom360.WhatsApp.TemplateResult.t()]
The queued results (status exactly "ACKNOWLEDGED"), in response order.
@spec by_number(t(), String.t()) :: Unicom360.WhatsApp.TemplateResult.t() | nil
The first result whose to has the same digits as number, or nil.
@spec rejected(t()) :: [Unicom360.WhatsApp.TemplateResult.t()]
The rejected results (status exactly "REJECTED"), in response order.