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

#==, #[], #[]=, 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](stripe.com/docs/currencies#zero-decimal). If ‘tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount.



46
47
48
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 46

def amount
  @amount
end

#amount_taxObject (readonly)

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



48
49
50
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 48

def amount_tax
  @amount_tax
end

#idObject (readonly)

Unique identifier for the object.



50
51
52
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 50

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.



52
53
54
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 52

def livemode
  @livemode
end

#objectObject (readonly)

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



54
55
56
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 54

def object
  @object
end

#productObject (readonly)

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



56
57
58
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 56

def product
  @product
end

#quantityObject (readonly)

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



58
59
60
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 58

def quantity
  @quantity
end

#referenceObject (readonly)

A custom identifier for this line item.



60
61
62
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 60

def reference
  @reference
end

#tax_behaviorObject (readonly)

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



62
63
64
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 62

def tax_behavior
  @tax_behavior
end

#tax_breakdownObject (readonly)

Detailed account of taxes relevant to this line item.



64
65
66
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 64

def tax_breakdown
  @tax_breakdown
end

#tax_codeObject (readonly)

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



66
67
68
# File 'lib/stripe/resources/tax/calculation_line_item.rb', line 66

def tax_code
  @tax_code
end

Class Method Details

.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