Nadia.InputInvoiceMessageContent (nadia v1.6.1)

View Source

Typed builder for Telegram InputInvoiceMessageContent objects.

The builder validates only constraints that are knowable before calling Telegram: required string lengths, integer money fields, price-list shape, tip ordering, booleans, photo URL shape, and Telegram Stars (XTR) rules documented for invoice content. Provider-specific and currency-specific payment validation remains Telegram's responsibility.

Summary

Types

t()

A typed Telegram InputInvoiceMessageContent value. Its representation is opaque.

Functions

Builds an invoice message content object.

Builds Telegram Stars (XTR) invoice message content.

Types

options()

@type options() :: keyword() | map()

price()

t()

@opaque t()

A typed Telegram InputInvoiceMessageContent value. Its representation is opaque.

Functions

new(title, description, payload, currency, prices, options \\ [])

@spec new(binary(), binary(), binary(), binary(), [price()], options()) :: t()

Builds an invoice message content object.

Supported options are the optional fields from Telegram InputInvoiceMessageContent. Options whose value is nil are omitted.

stars(title, description, payload, price, options \\ [])

@spec stars(binary(), binary(), binary(), price() | [price()], options()) :: t()

Builds Telegram Stars (XTR) invoice message content.

The price argument can be a single price object or a one-item list. The builder includes an empty provider_token, as documented for Stars payments.