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, Tax
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.
-
#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_rates ⇒ Object
readonly
The tax rates which apply to the line item.
-
#taxes ⇒ Object
readonly
The tax information of 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.
Attributes inherited from StripeObject
Class Method Summary collapse
Methods inherited from StripeObject
#==, #[], #[]=, #_get_inner_class_type, 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.
81 82 83 |
# File 'lib/stripe/resources/credit_note_line_item.rb', line 81 def amount @amount end |
#description ⇒ Object (readonly)
Description of the item being credited.
83 84 85 |
# File 'lib/stripe/resources/credit_note_line_item.rb', line 83 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.
85 86 87 |
# File 'lib/stripe/resources/credit_note_line_item.rb', line 85 def discount_amount @discount_amount end |
#discount_amounts ⇒ Object (readonly)
The amount of discount calculated per discount for this line item
87 88 89 |
# File 'lib/stripe/resources/credit_note_line_item.rb', line 87 def discount_amounts @discount_amounts end |
#id ⇒ Object (readonly)
Unique identifier for the object.
89 90 91 |
# File 'lib/stripe/resources/credit_note_line_item.rb', line 89 def id @id end |
#invoice_line_item ⇒ Object (readonly)
ID of the invoice line item being credited
91 92 93 |
# File 'lib/stripe/resources/credit_note_line_item.rb', line 91 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.
93 94 95 |
# File 'lib/stripe/resources/credit_note_line_item.rb', line 93 def livemode @livemode end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
95 96 97 |
# File 'lib/stripe/resources/credit_note_line_item.rb', line 95 def object @object end |
#pretax_credit_amounts ⇒ Object (readonly)
The pretax credit amounts (ex: discount, credit grants, etc) for this line item.
97 98 99 |
# File 'lib/stripe/resources/credit_note_line_item.rb', line 97 def pretax_credit_amounts @pretax_credit_amounts end |
#quantity ⇒ Object (readonly)
The number of units of product being credited.
99 100 101 |
# File 'lib/stripe/resources/credit_note_line_item.rb', line 99 def quantity @quantity end |
#tax_rates ⇒ Object (readonly)
The tax rates which apply to the line item.
101 102 103 |
# File 'lib/stripe/resources/credit_note_line_item.rb', line 101 def tax_rates @tax_rates end |
#taxes ⇒ Object (readonly)
The tax information of the line item.
103 104 105 |
# File 'lib/stripe/resources/credit_note_line_item.rb', line 103 def taxes @taxes 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.
105 106 107 |
# File 'lib/stripe/resources/credit_note_line_item.rb', line 105 def type @type end |
#unit_amount ⇒ Object (readonly)
The cost of each unit of product being credited.
107 108 109 |
# File 'lib/stripe/resources/credit_note_line_item.rb', line 107 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.
109 110 111 |
# File 'lib/stripe/resources/credit_note_line_item.rb', line 109 def unit_amount_decimal @unit_amount_decimal end |
Class Method Details
.field_remappings ⇒ Object
119 120 121 |
# File 'lib/stripe/resources/credit_note_line_item.rb', line 119 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
111 112 113 114 115 116 117 |
# File 'lib/stripe/resources/credit_note_line_item.rb', line 111 def self.inner_class_types @inner_class_types = { discount_amounts: DiscountAmount, pretax_credit_amounts: PretaxCreditAmount, taxes: Tax, } end |
.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 |