Method: Stripe::InvoiceItemService#delete

Defined in:
lib/stripe/services/invoice_item_service.rb

#delete(invoiceitem, params = {}, opts = {}) ⇒ Object

Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they’re not attached to invoices, or if it’s attached to a draft invoice.



18
19
20
21
22
23
24
25
26
# File 'lib/stripe/services/invoice_item_service.rb', line 18

def delete(invoiceitem, params = {}, opts = {})
  request(
    method: :delete,
    path: format("/v1/invoiceitems/%<invoiceitem>s", { invoiceitem: CGI.escape(invoiceitem) }),
    params: params,
    opts: opts,
    base_address: :api
  )
end