LatticeStripe.SubscriptionSchedule.AddInvoiceItem (LatticeStripe v1.7.12)

Copy Markdown View Source

A one-off invoice item to add at the start of a SubscriptionSchedule phase.

Used to bill setup fees, credits, or other non-recurring amounts at phase boundaries. Smaller than LatticeStripe.SubscriptionSchedule.PhaseItem — no billing_thresholds, plan, or trial_data.

Fields

  • discounts - List of discount IDs or objects
  • metadata - Set of key-value pairs
  • period - Billing period map (%{"start" => ..., "end" => ...})
  • price - Price ID for an existing Price
  • price_data - Inline price data for ad-hoc pricing
  • quantity - Quantity for this item
  • tax_rates - List of tax rate objects
  • extra - Unknown fields from Stripe not yet in this struct

Summary

Types

t()

A one-off add-invoice-item attached to a SubscriptionSchedule phase.

Functions

Converts a decoded Stripe API map to a %AddInvoiceItem{} struct.

Types

t()

@type t() :: %LatticeStripe.SubscriptionSchedule.AddInvoiceItem{
  discounts: list() | nil,
  extra: map(),
  metadata: map() | nil,
  period: map() | nil,
  price: String.t() | map() | nil,
  price_data: map() | nil,
  quantity: integer() | nil,
  tax_rates: list() | nil
}

A one-off add-invoice-item attached to a SubscriptionSchedule phase.

Functions

from_map(map)

@spec from_map(map() | nil) :: t() | nil

Converts a decoded Stripe API map to a %AddInvoiceItem{} struct.

Returns nil when given nil.