Sha256: 941b2d871786155e7b5aecd49ea4fb1eef31b7e7943971a038a418f35ec56e8a

Contents?: true

Size: 950 Bytes

Versions: 30

Compression:

Stored size: 950 Bytes

Contents

# File generated from our OpenAPI spec
# frozen_string_literal: true

module Stripe
  class InvoiceLineItem < StripeObject
    include Stripe::APIOperations::Save

    OBJECT_NAME = "line_item"
    def self.object_name
      "line_item"
    end

    # 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.
    def self.update(id, params = {}, opts = {})
      request_stripe_object(
        method: :post,
        path: format("/v1/invoices/%<invoice>s/lines/%<id>s", { invoice: CGI.escape(invoice), id: CGI.escape(id) }),
        params: params,
        opts: opts
      )
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
stripe-12.5.0 lib/stripe/resources/invoice_line_item.rb
stripe-12.5.0.pre.beta.2 lib/stripe/resources/invoice_line_item.rb
stripe-12.5.0.pre.beta.1 lib/stripe/resources/invoice_line_item.rb
stripe-12.4.0 lib/stripe/resources/invoice_line_item.rb
stripe-12.3.0 lib/stripe/resources/invoice_line_item.rb
stripe-12.2.0 lib/stripe/resources/invoice_line_item.rb
stripe-12.2.0.pre.beta.1 lib/stripe/resources/invoice_line_item.rb
stripe-12.1.0 lib/stripe/resources/invoice_line_item.rb
stripe-12.0.0 lib/stripe/resources/invoice_line_item.rb
stripe-11.7.0 lib/stripe/resources/invoice_line_item.rb
stripe-11.7.0.pre.beta.1 lib/stripe/resources/invoice_line_item.rb
stripe-11.6.0 lib/stripe/resources/invoice_line_item.rb
stripe-11.4.0.pre.beta.1 lib/stripe/resources/invoice_line_item.rb
stripe-11.3.0 lib/stripe/resources/invoice_line_item.rb
stripe-11.3.0.pre.beta.1 lib/stripe/resources/invoice_line_item.rb
stripe-11.2.0 lib/stripe/resources/invoice_line_item.rb
stripe-11.1.0 lib/stripe/resources/invoice_line_item.rb
stripe-11.1.0.pre.beta.1 lib/stripe/resources/invoice_line_item.rb
stripe-11.0.0 lib/stripe/resources/invoice_line_item.rb
stripe-10.15.0 lib/stripe/resources/invoice_line_item.rb