# `Unicom360.SMS.SendResult`
[🔗](https://github.com/TechRode-Solution-Limited/unicom360-elixir/blob/v0.1.0/lib/unicom360/sms/send_result.ex#L1)

The result of `Unicom360.SMS.send/3` (canonical name `SmsSendResult`).

  * `api_reference` - the gateway's reference for the request; quote it to support.
  * `message` - the gateway's message (`"successful"`).
  * `results` - one `Unicom360.SMS.Result` per recipient, **in the gateway's order, which is
    not the request's order past the tenth recipient**.
  * `raw` - the JSON object the result was parsed from, unmodified.
  * `extra` - every member of the envelope this version does not model.

# `t`

```elixir
@type t() :: %Unicom360.SMS.SendResult{
  api_reference: String.t() | nil,
  extra: map(),
  message: String.t() | nil,
  raw: map(),
  results: [Unicom360.SMS.Result.t()]
}
```

# `accepted`

```elixir
@spec accepted(t()) :: [Unicom360.SMS.Result.t()]
```

The results the gateway accepted (status exactly `"ACKNOWLEDGED"`), in response order.

# `by_number`

```elixir
@spec by_number(t(), String.t()) :: Unicom360.SMS.Result.t() | nil
```

The first result for `number`, or `nil`.

Compares digits only, so `"+260 97 123 4567"` finds `"260971234567"`. Local formats are not
expanded: pass the international form.

# `invalid`

```elixir
@spec invalid(t()) :: [Unicom360.SMS.Result.t()]
```

Every other result (for example `"Invalid mobile number"`), in response order.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
