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!
642 643 644 645 |
# File 'lib/google4r/checkout/shared.rb', line 642 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.
635 636 637 |
# File 'lib/google4r/checkout/shared.rb', line 635 def area @area end |
#rate ⇒ Object
The tax rate for this rule (double, required).
631 632 633 |
# File 'lib/google4r/checkout/shared.rb', line 631 def rate @rate end |
#shipping_taxed ⇒ Object
If shipping should be taxed with this tax rule (boolean, defaults to false)
638 639 640 |
# File 'lib/google4r/checkout/shared.rb', line 638 def shipping_taxed @shipping_taxed end |
#table ⇒ Object (readonly)
The table this rule belongs to.
628 629 630 |
# File 'lib/google4r/checkout/shared.rb', line 628 def table @table end |