# `Unicom360.WhatsApp.TemplateHeader`
[🔗](https://github.com/TechRode-Solution-Limited/unicom360-elixir/blob/v0.1.0/lib/unicom360/whatsapp/template_header.ex#L1)

A template recipient's header parameter.

    TemplateHeader.text("Ada")
    TemplateHeader.image("https://example.com/receipts/ZM-4821.png")
    TemplateHeader.video("https://example.com/promo.mp4")
    TemplateHeader.document("https://example.com/invoices/4821.pdf", "invoice-4821.pdf")

A text header is sent as a JSON string, a media header as `{"type", "url", "filename"?}`. A
recipient may also give a plain string or a map in that shape.

# `t`

```elixir
@type t() :: %Unicom360.WhatsApp.TemplateHeader{
  filename: String.t() | nil,
  type: String.t(),
  url: String.t() | nil,
  value: String.t() | nil
}
```

# `document`

```elixir
@spec document(String.t(), String.t() | nil) :: t()
```

A document header, with an optional file name shown to the recipient.

# `image`

```elixir
@spec image(String.t()) :: t()
```

An image header.

# `text`

```elixir
@spec text(String.t()) :: t()
```

A text header (the template's `{{1}}` in its header).

# `video`

```elixir
@spec video(String.t()) :: t()
```

A video header.

---

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