Class: Stripe::Tax::CalculationLineItem
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::Tax::CalculationLineItem
- Defined in:
- lib/stripe/resources/tax/calculation_line_item.rb
Defined Under Namespace
Classes: PerformanceLocationDetails, TaxBreakdown
Constant Summary collapse
- OBJECT_NAME =
"tax.calculation_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.
-
#amount_tax ⇒ Object
readonly
The amount of tax calculated for this line item, in the smallest currency unit.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#livemode ⇒ Object
readonly
If the object exists in live mode, the value is
true. -
#metadata ⇒ Object
readonly
Set of key-value pairs that you can attach to an object.
-
#object ⇒ Object
readonly
String representing the object's type.
-
#performance_location ⇒ Object
readonly
Indicates the line item represents a performance where the venue location might determine the tax, not the customer address.
-
#performance_location_details ⇒ Object
readonly
The address of the location where this line item's event or service takes place.
-
#product ⇒ Object
readonly
The ID of an existing Product.
-
#quantity ⇒ Object
readonly
The number of units of the item being purchased.
-
#reference ⇒ Object
readonly
A custom identifier for this line item.
-
#tax_behavior ⇒ Object
readonly
Specifies whether the
amountincludes taxes. -
#tax_breakdown ⇒ Object
readonly
Detailed account of taxes relevant to this line item.
-
#tax_code ⇒ Object
readonly
The tax code ID used for this resource.
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
#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, field_encodings, #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. If tax_behavior=inclusive, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount.
105 106 107 |
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 105 def amount @amount end |
#amount_tax ⇒ Object (readonly)
The amount of tax calculated for this line item, in the smallest currency unit.
107 108 109 |
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 107 def amount_tax @amount_tax end |
#id ⇒ Object (readonly)
Unique identifier for the object.
109 110 111 |
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 109 def id @id end |
#livemode ⇒ Object (readonly)
If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.
111 112 113 |
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 111 def livemode @livemode end |
#metadata ⇒ Object (readonly)
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
113 114 115 |
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 113 def @metadata end |
#object ⇒ Object (readonly)
String representing the object's type. Objects of the same type share the same value.
115 116 117 |
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 115 def object @object end |
#performance_location ⇒ Object (readonly)
Indicates the line item represents a performance where the venue location might determine the tax, not the customer address. Leave empty if the tax code doesn't require a tax location. If you provide this value for tax codes with an optional location requirement, it overrides the customer address.
117 118 119 |
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 117 def performance_location @performance_location end |
#performance_location_details ⇒ Object (readonly)
The address of the location where this line item's event or service takes place. Depending on the tax code, providing a performance location is required, optional, or not supported. Use this to provide the address inline without pre-creating a TaxLocation object. Can't be used with performance_location.
119 120 121 |
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 119 def performance_location_details @performance_location_details end |
#product ⇒ Object (readonly)
The ID of an existing Product.
121 122 123 |
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 121 def product @product end |
#quantity ⇒ Object (readonly)
The number of units of the item being purchased. For reversals, this is the quantity reversed.
123 124 125 |
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 123 def quantity @quantity end |
#reference ⇒ Object (readonly)
A custom identifier for this line item.
125 126 127 |
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 125 def reference @reference end |
#tax_behavior ⇒ Object (readonly)
Specifies whether the amount includes taxes. If tax_behavior=inclusive, then the amount includes taxes.
127 128 129 |
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 127 def tax_behavior @tax_behavior end |
#tax_breakdown ⇒ Object (readonly)
Detailed account of taxes relevant to this line item.
129 130 131 |
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 129 def tax_breakdown @tax_breakdown end |
#tax_code ⇒ Object (readonly)
The tax code ID used for this resource.
131 132 133 |
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 131 def tax_code @tax_code end |
Class Method Details
.field_remappings ⇒ Object
140 141 142 |
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 140 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
133 134 135 136 137 138 |
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 133 def self.inner_class_types @inner_class_types = { performance_location_details: PerformanceLocationDetails, tax_breakdown: TaxBreakdown, } end |
.object_name ⇒ Object
8 9 10 |
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 8 def self.object_name "tax.calculation_line_item" end |