Class: Stripe::Tax::TransactionLineItem
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::Tax::TransactionLineItem
- Defined in:
- lib/stripe/resources/tax/transaction_line_item.rb
Defined Under Namespace
Classes: Reversal
Constant Summary collapse
- OBJECT_NAME =
"tax.transaction_line_item"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
The line item amount in the [smallest currency unit](stripe.com/docs/currencies#zero-decimal).
-
#amount_tax ⇒ Object
readonly
The amount of tax calculated for this line item, in the [smallest currency unit](stripe.com/docs/currencies#zero-decimal).
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#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.
-
#metadata ⇒ Object
readonly
Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#product ⇒ Object
readonly
The ID of an existing [Product](stripe.com/docs/api/products/object).
-
#quantity ⇒ Object
readonly
The number of units of the item being purchased.
-
#reference ⇒ Object
readonly
A custom identifier for this line item in the transaction.
-
#reversal ⇒ Object
readonly
If ‘type=reversal`, contains information about what was reversed.
-
#tax_behavior ⇒ Object
readonly
Specifies whether the ‘amount` includes taxes.
-
#tax_code ⇒ Object
readonly
The [tax code](stripe.com/docs/tax/tax-categories) ID used for this resource.
-
#type ⇒ Object
readonly
If ‘reversal`, this line item reverses an earlier transaction.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
Methods inherited from APIResource
class_name, custom_method, #refresh, #request_stripe_object, resource_url, #resource_url, retrieve, save_nested_resource
Methods included from APIOperations::Request
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 line item amount in the [smallest currency unit](stripe.com/docs/currencies#zero-decimal). If ‘tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount.
17 18 19 |
# File 'lib/stripe/resources/tax/transaction_line_item.rb', line 17 def amount @amount end |
#amount_tax ⇒ Object (readonly)
The amount of tax calculated for this line item, in the [smallest currency unit](stripe.com/docs/currencies#zero-decimal).
19 20 21 |
# File 'lib/stripe/resources/tax/transaction_line_item.rb', line 19 def amount_tax @amount_tax end |
#id ⇒ Object (readonly)
Unique identifier for the object.
21 22 23 |
# File 'lib/stripe/resources/tax/transaction_line_item.rb', line 21 def id @id 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.
23 24 25 |
# File 'lib/stripe/resources/tax/transaction_line_item.rb', line 23 def livemode @livemode end |
#metadata ⇒ Object (readonly)
Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
25 26 27 |
# File 'lib/stripe/resources/tax/transaction_line_item.rb', line 25 def @metadata end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
27 28 29 |
# File 'lib/stripe/resources/tax/transaction_line_item.rb', line 27 def object @object end |
#product ⇒ Object (readonly)
The ID of an existing [Product](stripe.com/docs/api/products/object).
29 30 31 |
# File 'lib/stripe/resources/tax/transaction_line_item.rb', line 29 def product @product end |
#quantity ⇒ Object (readonly)
The number of units of the item being purchased. For reversals, this is the quantity reversed.
31 32 33 |
# File 'lib/stripe/resources/tax/transaction_line_item.rb', line 31 def quantity @quantity end |
#reference ⇒ Object (readonly)
A custom identifier for this line item in the transaction.
33 34 35 |
# File 'lib/stripe/resources/tax/transaction_line_item.rb', line 33 def reference @reference end |
#reversal ⇒ Object (readonly)
If ‘type=reversal`, contains information about what was reversed.
35 36 37 |
# File 'lib/stripe/resources/tax/transaction_line_item.rb', line 35 def reversal @reversal end |
#tax_behavior ⇒ Object (readonly)
Specifies whether the ‘amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes.
37 38 39 |
# File 'lib/stripe/resources/tax/transaction_line_item.rb', line 37 def tax_behavior @tax_behavior end |
#tax_code ⇒ Object (readonly)
The [tax code](stripe.com/docs/tax/tax-categories) ID used for this resource.
39 40 41 |
# File 'lib/stripe/resources/tax/transaction_line_item.rb', line 39 def tax_code @tax_code end |
#type ⇒ Object (readonly)
If ‘reversal`, this line item reverses an earlier transaction.
41 42 43 |
# File 'lib/stripe/resources/tax/transaction_line_item.rb', line 41 def type @type end |
Class Method Details
.object_name ⇒ Object
8 9 10 |
# File 'lib/stripe/resources/tax/transaction_line_item.rb', line 8 def self.object_name "tax.transaction_line_item" end |