Class: Stripe::CreditNoteLineItem
- Inherits:
-
StripeObject
- Object
- StripeObject
- Stripe::CreditNoteLineItem
- Defined in:
- lib/stripe/resources/credit_note_line_item.rb
Overview
The credit note line item object
Defined Under Namespace
Classes: DiscountAmount, PretaxCreditAmount, TaxAmount
Constant Summary collapse
- OBJECT_NAME =
"credit_note_line_item"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
The integer amount in cents (or local equivalent) representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts.
-
#amount_excluding_tax ⇒ Object
readonly
The integer amount in cents (or local equivalent) representing the amount being credited for this line item, excluding all tax and discounts.
-
#description ⇒ Object
readonly
Description of the item being credited.
-
#discount_amount ⇒ Object
readonly
The integer amount in cents (or local equivalent) representing the discount being credited for this line item.
-
#discount_amounts ⇒ Object
readonly
The amount of discount calculated per discount for this line item.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#invoice_line_item ⇒ Object
readonly
ID of the invoice line item being credited.
-
#livemode ⇒ Object
readonly
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#pretax_credit_amounts ⇒ Object
readonly
The pretax credit amounts (ex: discount, credit grants, etc) for this line item.
-
#quantity ⇒ Object
readonly
The number of units of product being credited.
-
#tax_amounts ⇒ Object
readonly
The amount of tax calculated per tax rate for this line item.
-
#tax_rates ⇒ Object
readonly
The tax rates which apply to the line item.
-
#type ⇒ Object
readonly
The type of the credit note line item, one of ‘invoice_line_item` or `custom_line_item`.
-
#unit_amount ⇒ Object
readonly
The cost of each unit of product being credited.
-
#unit_amount_decimal ⇒ Object
readonly
Same as ‘unit_amount`, but contains a decimal value with at most 12 decimal places.
-
#unit_amount_excluding_tax ⇒ Object
readonly
The amount in cents (or local equivalent) representing the unit amount being credited for this line item, excluding all tax and discounts.
Attributes inherited from StripeObject
Class Method Summary collapse
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
Instance Attribute Details
#amount ⇒ Object (readonly)
The integer amount in cents (or local equivalent) representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts.
24 25 26 |
# File 'lib/stripe/resources/credit_note_line_item.rb', line 24 def amount @amount end |
#amount_excluding_tax ⇒ Object (readonly)
The integer amount in cents (or local equivalent) representing the amount being credited for this line item, excluding all tax and discounts.
26 27 28 |
# File 'lib/stripe/resources/credit_note_line_item.rb', line 26 def amount_excluding_tax @amount_excluding_tax end |
#description ⇒ Object (readonly)
Description of the item being credited.
28 29 30 |
# File 'lib/stripe/resources/credit_note_line_item.rb', line 28 def description @description end |
#discount_amount ⇒ Object (readonly)
The integer amount in cents (or local equivalent) representing the discount being credited for this line item.
30 31 32 |
# File 'lib/stripe/resources/credit_note_line_item.rb', line 30 def discount_amount @discount_amount end |
#discount_amounts ⇒ Object (readonly)
The amount of discount calculated per discount for this line item
32 33 34 |
# File 'lib/stripe/resources/credit_note_line_item.rb', line 32 def discount_amounts @discount_amounts end |
#id ⇒ Object (readonly)
Unique identifier for the object.
34 35 36 |
# File 'lib/stripe/resources/credit_note_line_item.rb', line 34 def id @id end |
#invoice_line_item ⇒ Object (readonly)
ID of the invoice line item being credited
36 37 38 |
# File 'lib/stripe/resources/credit_note_line_item.rb', line 36 def invoice_line_item @invoice_line_item end |
#livemode ⇒ Object (readonly)
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
38 39 40 |
# File 'lib/stripe/resources/credit_note_line_item.rb', line 38 def livemode @livemode end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
40 41 42 |
# File 'lib/stripe/resources/credit_note_line_item.rb', line 40 def object @object end |
#pretax_credit_amounts ⇒ Object (readonly)
The pretax credit amounts (ex: discount, credit grants, etc) for this line item.
42 43 44 |
# File 'lib/stripe/resources/credit_note_line_item.rb', line 42 def pretax_credit_amounts @pretax_credit_amounts end |
#quantity ⇒ Object (readonly)
The number of units of product being credited.
44 45 46 |
# File 'lib/stripe/resources/credit_note_line_item.rb', line 44 def quantity @quantity end |
#tax_amounts ⇒ Object (readonly)
The amount of tax calculated per tax rate for this line item
46 47 48 |
# File 'lib/stripe/resources/credit_note_line_item.rb', line 46 def tax_amounts @tax_amounts end |
#tax_rates ⇒ Object (readonly)
The tax rates which apply to the line item.
48 49 50 |
# File 'lib/stripe/resources/credit_note_line_item.rb', line 48 def tax_rates @tax_rates end |
#type ⇒ Object (readonly)
The type of the credit note line item, one of ‘invoice_line_item` or `custom_line_item`. When the type is `invoice_line_item` there is an additional `invoice_line_item` property on the resource the value of which is the id of the credited line item on the invoice.
50 51 52 |
# File 'lib/stripe/resources/credit_note_line_item.rb', line 50 def type @type end |
#unit_amount ⇒ Object (readonly)
The cost of each unit of product being credited.
52 53 54 |
# File 'lib/stripe/resources/credit_note_line_item.rb', line 52 def unit_amount @unit_amount end |
#unit_amount_decimal ⇒ Object (readonly)
Same as ‘unit_amount`, but contains a decimal value with at most 12 decimal places.
54 55 56 |
# File 'lib/stripe/resources/credit_note_line_item.rb', line 54 def unit_amount_decimal @unit_amount_decimal end |
#unit_amount_excluding_tax ⇒ Object (readonly)
The amount in cents (or local equivalent) representing the unit amount being credited for this line item, excluding all tax and discounts.
56 57 58 |
# File 'lib/stripe/resources/credit_note_line_item.rb', line 56 def unit_amount_excluding_tax @unit_amount_excluding_tax end |
Class Method Details
.object_name ⇒ Object
8 9 10 |
# File 'lib/stripe/resources/credit_note_line_item.rb', line 8 def self.object_name "credit_note_line_item" end |