Class: Stripe::InvoiceService::AddLinesParams::Line::TaxAmount

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/services/invoice_service.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.



1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
# File 'lib/stripe/services/invoice_service.rb', line 1577

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.



1567
1568
1569
# File 'lib/stripe/services/invoice_service.rb', line 1567

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.



1571
1572
1573
# File 'lib/stripe/services/invoice_service.rb', line 1571

def tax_rate_data
  @tax_rate_data
end

#taxability_reasonObject

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



1573
1574
1575
# File 'lib/stripe/services/invoice_service.rb', line 1573

def taxability_reason
  @taxability_reason
end

#taxable_amountObject

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



1575
1576
1577
# File 'lib/stripe/services/invoice_service.rb', line 1575

def taxable_amount
  @taxable_amount
end