Skip to content

Commit

Permalink
Update generated code (#1336)
Browse files Browse the repository at this point in the history
* Update generated code for v833

* Update generated code for v840

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Co-authored-by: pakrym-stripe <99349468+pakrym-stripe@users.noreply.github.com>
  • Loading branch information
stripe-openapi[bot] and pakrym-stripe authored Feb 22, 2024
1 parent 3e18ad6 commit 425999c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v829
v840
15 changes: 15 additions & 0 deletions lib/stripe/resources/invoice_line_item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,24 @@

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

0 comments on commit 425999c

Please sign in to comment.