Class: Google4R::Checkout::TaxRule

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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!



335
336
337
# File 'lib/google4r/checkout/shared.rb', line 335

def initialize(table)
  @table = table
end

Instance Attribute Details

#areaObject

The area where this tax rule applies (Area subclass instance, required). Serialized to <tax-area> in XML.



331
332
333
# File 'lib/google4r/checkout/shared.rb', line 331

def area
  @area
end

#rateObject

The tax rate for this rule (double, required).



327
328
329
# File 'lib/google4r/checkout/shared.rb', line 327

def rate
  @rate
end

#tableObject (readonly)

The table this rule belongs to.



324
325
326
# File 'lib/google4r/checkout/shared.rb', line 324

def table
  @table
end