Class: Stripe::Tax::CalculationLineItem

Inherits:
APIResource show all
Defined in:
lib/stripe/resources/tax/calculation_line_item.rb

Defined Under Namespace

Classes: TaxBreakdown

Constant Summary collapse

OBJECT_NAME =
"tax.calculation_line_item"

Constants inherited from StripeObject

StripeObject::RESERVED_FIELD_NAMES

Instance Attribute Summary collapse

Attributes inherited from APIResource

#save_with_parent

Attributes inherited from StripeObject

#last_response

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

included

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

#amountObject (readonly)

The line item amount in the [smallest currency unit](docs.stripe.com/currencies#zero-decimal). If ‘tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount.



70
71
72
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 70

def amount
  @amount
end

#amount_taxObject (readonly)

The amount of tax calculated for this line item, in the [smallest currency unit](docs.stripe.com/currencies#zero-decimal).



72
73
74
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 72

def amount_tax
  @amount_tax
end

#idObject (readonly)

Unique identifier for the object.



74
75
76
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 74

def id
  @id
end

#livemodeObject (readonly)

Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.



76
77
78
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 76

def livemode
  @livemode
end

#metadataObject (readonly)

Set of [key-value pairs](docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.



78
79
80
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 78

def 
  @metadata
end

#objectObject (readonly)

String representing the object’s type. Objects of the same type share the same value.



80
81
82
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 80

def object
  @object
end

#performance_locationObject (readonly)

A tax location for a line item that acts as a performance location. This indicates that the line item might be taxed at the place where it is being performed at. This is helpful for events or other services being performed at non-customer addresses like venues or offices. This can be left empty for tax codes that do not require a tax location. For tax codes where the location requirement is “optional”, this would override the customer address in most use cases.



94
95
96
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 94

def performance_location
  @performance_location
end

#productObject (readonly)

The ID of an existing [Product](docs.stripe.com/api/products/object).



82
83
84
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 82

def product
  @product
end

#quantityObject (readonly)

The number of units of the item being purchased. For reversals, this is the quantity reversed.



84
85
86
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 84

def quantity
  @quantity
end

#referenceObject (readonly)

A custom identifier for this line item.



86
87
88
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 86

def reference
  @reference
end

#tax_behaviorObject (readonly)

Specifies whether the ‘amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes.



88
89
90
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 88

def tax_behavior
  @tax_behavior
end

#tax_breakdownObject (readonly)

Detailed account of taxes relevant to this line item.



90
91
92
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 90

def tax_breakdown
  @tax_breakdown
end

#tax_codeObject (readonly)

The [tax code](docs.stripe.com/tax/tax-categories) ID used for this resource.



92
93
94
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 92

def tax_code
  @tax_code
end

Class Method Details

.field_remappingsObject



100
101
102
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 100

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



96
97
98
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 96

def self.inner_class_types
  @inner_class_types = { tax_breakdown: TaxBreakdown }
end

.object_nameObject



8
9
10
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 8

def self.object_name
  "tax.calculation_line_item"
end