Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

/var/sites/help-site.com/auto/tmp/CPAN/9677/Google-Checkout-1.1.1/lib/Google/Checkout/General/TaxTableAreas.pm

/var/sites/help-site.com/auto/tmp/CPAN/9677/Google-Checkout-1.1.1/lib/Google/Checkout/General/TaxTableAreas.pm


NAME

Google::Checkout::General::TaxTableAreas


SYNOPSIS


  use Google::Checkout::XML::Constants;

  use Google::Checkout::General::TaxRule;

  use Google::Checkout::General::TaxTable;

  use Google::Checkout::General::TaxTableAreas;

  use Google::Checkout::General::MerchantCheckoutFlow;

  #--

  #-- Shipping tax set to 1 means shippings

  #-- are taxable and the rate is 2.5%. This

  #-- tax rule should apply to all 50 states

  #--

  my $tax_rule = Google::Checkout::General::TaxRule->new(

                 shipping_tax => 1,

                 rate => 0.025,

                 area => Google::Checkout::General::TaxTableAreas->new(

                         country => [Google::Checkout::XML::Constants::FULL_50_STATES]));

  #--

  #-- default tax table

  #--

  my $tax_table1 = Google::Checkout::General::TaxTable->new(

                   default => 1,

                   rules => [$tax_rule]);

  #--

  #-- same tax table but with a name

  #--

  my $tax_table2 = Google::Checkout::General::TaxTable->new(

                   default    => 0,

                   name       => "tax",

                   standalone => 1,

                   rules      => [$tax_rule]);

  my $checkout_flow = Google::Checkout::General::MerchantCheckoutFlow->new(

                      shipping_method       => [$flat_rate_shipping],

                      edit_cart_url         => "http://edit/cart/url";,

                      continue_shopping_url => "http://continue/shopping/url";,

                      buyer_phone           => "1-111-111-1111",

                      tax_table             => [$tax_table1,$tax_table2],

                      merchant_calculation  => $merchant_calculation);


DESCRIPTION

A sub-class of Google::Checkout::General::ShippingRestrictions. This module is responsible for creating tax table areas which can then be added to Google::Checkout::General::TaxRule.

new STATE => ..., ZIP => ..., COUNTRY => ...
Constructor. Takes array reference of state, zip code and country area where this tax table area will cover.

get_state
Returns an array reference of states.

add_state STATE
Adds another state.

get_zip
Returns an array reference of zip codes.

add_zip ZIP
Adds another zip code. Zip code might contains wildcard operator to specify a range of zip codes.

get_country
Returns the country area.

add_country COUNTRY_AREA
Adds another country area. Currently, only Google::Checkout::XML::Constants::FULL_50_STATES is supported.

get_country
Returns the country area.

add_postal POSTAL_AREA
Adds another postal area.

get_postal
Returns the postal area.

add_world BOOLEAN
Adds world area.

get_world
Returns


COPYRIGHT

Copyright 2006 Google. All rights reserved.


SEE ALSO

Google::Checkout::General::TaxRule Google::Checkout::General::ShippingRestrictions

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy