Class: Stripe::Invoice::AddLinesParams::Line::TaxAmount

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/resources/invoice.rb

Defined Under Namespace

Classes: TaxRateData

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(amount: nil, tax_rate_data: nil, taxability_reason: nil, taxable_amount: nil) ⇒ TaxAmount

Returns a new instance of TaxAmount.



2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
# File 'lib/stripe/resources/invoice.rb', line 2054

def initialize(
  amount: nil,
  tax_rate_data: nil,
  taxability_reason: nil,
  taxable_amount: nil
)
  @amount = amount
  @tax_rate_data = tax_rate_data
  @taxability_reason = taxability_reason
  @taxable_amount = taxable_amount
end

Instance Attribute Details

#amountObject

The amount, in cents (or local equivalent), of the tax.



2044
2045
2046
# File 'lib/stripe/resources/invoice.rb', line 2044

def amount
  @amount
end

#tax_rate_dataObject

Data to find or create a TaxRate object.

Stripe automatically creates or reuses a TaxRate object for each tax amount. If the ‘tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items.



2048
2049
2050
# File 'lib/stripe/resources/invoice.rb', line 2048

def tax_rate_data
  @tax_rate_data
end

#taxability_reasonObject

The reasoning behind this tax, for example, if the product is tax exempt.



2050
2051
2052
# File 'lib/stripe/resources/invoice.rb', line 2050

def taxability_reason
  @taxability_reason
end

#taxable_amountObject

The amount on which tax is calculated, in cents (or local equivalent).



2052
2053
2054
# File 'lib/stripe/resources/invoice.rb', line 2052

def taxable_amount
  @taxable_amount
end