Inttegro.Refunds.LineItem (inttegro v0.2.0)

Copy Markdown View Source

Represents Line Item data in the Refunds API.

Inttegro decodes API responses into this struct. Required fields are always present; optional fields are nil when they do not apply or were not returned. Follow the linked types in t/0 for nested domain values.

Returns funds from a paid order to its original payment method.

Refunds are asynchronous financial records. Creating a refund validates the requested line items and amount, while the returned status describes processing progress. Look up the refund until it reaches a terminal state and reconcile it through balance transactions.

Summary

Types

t()

The decoded line item value.

Functions

Builds a Inttegro.Refunds.LineItem and raises KeyError when a required field is missing.

Types

t()

@type t() :: %Inttegro.Refunds.LineItem{
  id: String.t(),
  order_line_item_id: String.t(),
  original_amount_paid: Inttegro.Money.Amount.t(),
  reason: Inttegro.Refunds.Reason.t() | nil,
  reason_details: String.t() | nil,
  refund_amount: Inttegro.Money.Amount.t()
}

The decoded line item value.

Functions

new!(attrs \\ %{})

@spec new!(map() | keyword()) :: t()

Builds a Inttegro.Refunds.LineItem and raises KeyError when a required field is missing.