Class: Google4R::Checkout::TaxRule
- Inherits:
-
Object
- Object
- Google4R::Checkout::TaxRule
- Defined in:
- lib/google4r/checkout/shared.rb
Overview
A TaxRule specifies which taxes to apply in which area. Have a look at the “Google Checkout documentation” [code.google.com/apis/checkout/developer/index.html#specifying_tax_info] for more information.
Instance Attribute Summary collapse
-
#area ⇒ Object
The area where this tax rule applies (Area subclass instance, required).
-
#rate ⇒ Object
The tax rate for this rule (double, required).
-
#shipping_taxed ⇒ Object
If shipping should be taxed with this tax rule (boolean, defaults to false).
-
#table ⇒ Object
readonly
The table this rule belongs to.
Instance Method Summary collapse
-
#initialize(table) ⇒ TaxRule
constructor
Creates a new TaxRule in the given TaxTable.
Constructor Details
#initialize(table) ⇒ TaxRule
Creates a new TaxRule in the given TaxTable. Do no call this method yourself but use TaxTable#create_rule instead!
631 632 633 634 |
# File 'lib/google4r/checkout/shared.rb', line 631 def initialize(table) @table = table @shipping_taxed = false end |
Instance Attribute Details
#area ⇒ Object
The area where this tax rule applies (Area subclass instance, required). Serialized to <tax-area> in XML.
624 625 626 |
# File 'lib/google4r/checkout/shared.rb', line 624 def area @area end |
#rate ⇒ Object
The tax rate for this rule (double, required).
620 621 622 |
# File 'lib/google4r/checkout/shared.rb', line 620 def rate @rate end |
#shipping_taxed ⇒ Object
If shipping should be taxed with this tax rule (boolean, defaults to false)
627 628 629 |
# File 'lib/google4r/checkout/shared.rb', line 627 def shipping_taxed @shipping_taxed end |
#table ⇒ Object (readonly)
The table this rule belongs to.
617 618 619 |
# File 'lib/google4r/checkout/shared.rb', line 617 def table @table end |