Search documentation of stripe_elixir

# StripeElixir.Services.InvoiceLineItemService (stripe_elixir v0.1.0)

Copy Markdown View Source

InvoiceLineItem

Invoice Line Items represent the individual lines within an invoice and only exist within the context of an invoice.

Each line item is backed by either an invoice item or a subscription item.

## Summary

### Functions

list(client, invoice, params \\ %{}, opts \\ [])

Retrieve an invoice's line items

update(client, invoice, line_item_id, params \\ %{}, opts \\ [])

Update an invoice's line item

## Functions

# list(client, invoice, params \\ %{}, opts \\ [])

    @spec list(StripeElixir.Client.t(), String.t(), map(), keyword()) ::
      {:ok, term()} | {:error, StripeElixir.Error.t()}

Retrieve an invoice's line items

When retrieving an invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

# update(client, invoice, line_item_id, params \\ %{}, opts \\ [])

    @spec update(StripeElixir.Client.t(), String.t(), String.t(), map(), keyword()) ::
      {:ok, term()} | {:error, StripeElixir.Error.t()}

Update an invoice's line item

Updates an invoice’s line item. Some fields, such as `tax_amounts`, only live on the invoice line item, so they can only be updated through this endpoint. Other fields, such as `amount`, live on both the invoice item and the invoice line item, so updates on this endpoint will propagate to the invoice item as well. Updating an invoice’s line item is only possible before the invoice is finalized.