Class: Api::Taxjar::TaxResult
- Inherits:
-
Data
- Object
- Data
- Api::Taxjar::TaxResult
- Defined in:
- app/services/api/taxjar/tax_result.rb
Overview
A POST /v2/taxes response — only the fields Taxes::GetTaxRate reads.
line_items flattens the gem's breakdown.line_items (empty when the
order has no nexus / isn't taxable, matching the old nil-safe access).
Instance Attribute Summary collapse
-
#freight_taxable ⇒ Object
readonly
Returns the value of attribute freight_taxable.
-
#line_items ⇒ Object
readonly
Returns the value of attribute line_items.
-
#rate ⇒ Object
readonly
Returns the value of attribute rate.
Instance Method Summary collapse
-
#initialize(rate: nil, freight_taxable: false, line_items: []) ⇒ TaxResult
constructor
A new instance of TaxResult.
Constructor Details
#initialize(rate: nil, freight_taxable: false, line_items: []) ⇒ TaxResult
Returns a new instance of TaxResult.
9 |
# File 'app/services/api/taxjar/tax_result.rb', line 9 def initialize(rate: nil, freight_taxable: false, line_items: []) = super |
Instance Attribute Details
#freight_taxable ⇒ Object (readonly)
Returns the value of attribute freight_taxable
8 9 10 |
# File 'app/services/api/taxjar/tax_result.rb', line 8 def freight_taxable @freight_taxable end |
#line_items ⇒ Object (readonly)
Returns the value of attribute line_items
8 9 10 |
# File 'app/services/api/taxjar/tax_result.rb', line 8 def line_items @line_items end |
#rate ⇒ Object (readonly)
Returns the value of attribute rate
8 9 10 |
# File 'app/services/api/taxjar/tax_result.rb', line 8 def rate @rate end |