Class: Stripe::InvoiceLineItem
- Inherits:
-
StripeObject
- Object
- StripeObject
- Stripe::InvoiceLineItem
- Includes:
- APIOperations::Save
- Defined in:
- lib/stripe/resources/invoice_line_item.rb
Constant Summary collapse
- OBJECT_NAME =
"line_item"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Class Method Summary collapse
- .object_name ⇒ Object
-
.update(id, params = {}, opts = {}) ⇒ Object
Updates an invoice’s line item.
Methods included from APIOperations::Save
Methods inherited from StripeObject
#==, #[], #[]=, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values
Constructor Details
This class inherits a constructor from Stripe::StripeObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject
Class Method Details
.object_name ⇒ Object
9 10 11 |
# File 'lib/stripe/resources/invoice_line_item.rb', line 9 def self.object_name "line_item" end |
.update(id, params = {}, opts = {}) ⇒ Object
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.
17 18 19 20 21 22 23 24 |
# File 'lib/stripe/resources/invoice_line_item.rb', line 17 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 |