Inttegro.Orders.LineItemType (inttegro v0.2.0)

Copy Markdown View Source

Values accepted for Line Item Type in the Orders API.

Prefer the documented atoms returned by values/0. The type also accepts strings so a newer server value can be preserved by an older SDK instead of failing during decoding.

Manages the complete commercial and payment lifecycle of an order.

Orders bind customer information, immutable commercial terms, line items, totals, payment state, and invoice or receipt documents. Create an order, finalize it when its terms are ready, and then collect or record payment. Payment execution can require a later confirmation step; inspect the returned order and its next action instead of treating the first request as final.

Looking up an order

request = Inttegro.Orders.LookupRequest.new!(order_id: "or_...")

case Inttegro.Orders.lookup(client, request) do
  {:ok, %Inttegro.Orders.Order{status: :completed} = order} ->
    order

  {:ok, order} ->
    {:pending, order.status}

  {:error, %Inttegro.Errors.APIError{} = error} ->
    {:retry_or_reject, error}
end

See the Orders and payments guide for creation, idempotency, confirmation, and hosted checkout.

Summary

Types

t()

A line item type atom or an unknown wire value preserved as a string.

Functions

Returns the documented Inttegro.Orders.LineItemType atoms known by this SDK version.

Types

t()

@type t() :: :product | :fee | :shipping | String.t()

A line item type atom or an unknown wire value preserved as a string.

Functions

values()

@spec values() :: [t()]

Returns the documented Inttegro.Orders.LineItemType atoms known by this SDK version.