Amarula.Content.Order (amarula v0.4.4)

View Source

A received order message (WhatsApp Business). Surfaces the few useful fields; for full detail read msg.raw.

  • :order_id — the order id.
  • :title — the order title.
  • :item_count — number of items.
  • :message — an accompanying message.
  • :seller — the seller as an %Amarula.Address{}.

Summary

Functions

Normalize a %Proto.Message.OrderMessage{} into a minimal %Amarula.Content.Order{}.

Types

t()

@type t() :: %Amarula.Content.Order{
  item_count: integer() | nil,
  message: String.t() | nil,
  order_id: String.t() | nil,
  seller: Amarula.Address.t() | nil,
  title: String.t() | nil
}

Functions

from_proto(m)

@spec from_proto(struct()) :: t()

Normalize a %Proto.Message.OrderMessage{} into a minimal %Amarula.Content.Order{}.