Wax.Messages.Interactive.Section (wax v1.1.4)

Summary

Functions

Interactive Actions sections struct

Creates a new Interactive Action Section object

Sets the title for the Section

Validates that the Section struct follows the Cloud API requirements

Types

t()

@type t() :: %Wax.Messages.Interactive.Section{
  product_items: [map()],
  rows: [map()],
  title: String.t()
}

Functions

%Wax.Messages.Interactive.Section{}

(struct)

Interactive Actions sections struct

add_row(section, row_id, row_title, row_description \\ nil)

@spec add_row(t(), String.t(), String.t(), String.t()) :: t()

Adds a row to the Section

new()

@spec new() :: t()

Creates a new Interactive Action Section object

put_title(section, title)

@spec put_title(Module.t(), String.t()) :: t()

Sets the title for the Section

validate(section)

@spec validate(t()) :: :ok | {:error, String.t()}

Validates that the Section struct follows the Cloud API requirements