Sha256: 9be3bfa7fb0126fa28f7aa1cda46fe09477ed259010395317a01652ee0fb0b8f
Contents?: true
Size: 1.26 KB
Versions: 20
Compression:
Stored size: 1.26 KB
Contents
# File generated from our OpenAPI spec # frozen_string_literal: true module Stripe # Invoice Line Items represent the individual lines within an [invoice](https://stripe.com/docs/api/invoices) and only exist within the context of an invoice. # # Each line item is backed by either an [invoice item](https://stripe.com/docs/api/invoiceitems) or a [subscription item](https://stripe.com/docs/api/subscription_items). 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
20 entries across 20 versions & 1 rubygems