Amarula.Content.Product (amarula v0.4.3)

View Source

A received product message (WhatsApp Business). A linked-device client can receive these but not send them; this surfaces the few useful fields. For full catalog detail, read msg.raw.

  • :product_id — the catalog product id.
  • :title — the product title.
  • :description — the product description.
  • :business_owner — the seller as an %Amarula.Address{}.

Summary

Functions

Normalize a %Proto.Message.ProductMessage{} into a minimal %Amarula.Content.Product{}.

Types

t()

@type t() :: %Amarula.Content.Product{
  business_owner: Amarula.Address.t() | nil,
  description: String.t() | nil,
  product_id: String.t() | nil,
  title: String.t() | nil
}

Functions

from_proto(m)

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

Normalize a %Proto.Message.ProductMessage{} into a minimal %Amarula.Content.Product{}.