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/TaxTable.pm

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


NAME

Google::Checkout::General::TaxTable


SYNOPSIS


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

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

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

  use Google::Checkout::General::TaxTableArea;

  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

This module is used to create tax table which can then be added to Google::Checkout::General::MerchantCheckoutFlow.

new DEFAULT => ..., NAME => ..., STANDALONE => ..., RULES => ...
Constructor. If DEFAULT is true, this will be the default tax table. Otherwise, NAME can be used to selectively apply different tax table to different merchant items. If STANDALONE is true, this tax table can be used as standalone. RULES should be an array reference of Google::Checkout::General::TaxRule.

is_default FLAG
FLAG is optional and if passed in, it will be used to set whether or not this is the default tax table. After the flag is set, the old value is returned. If FLAG is not passed in, the current value is returned.

get_name
Returns the name of the tax table.

set_name NAME
Sets the name of the tax table.

get_standalone
Returns the string 'true' if this tax table can be used as standalone. Returns the string 'false' otherwise.

set_standalone FLAG
If FLAG is true, the tax table can be standalone. Otherwise, it's not standalone.

get_tax_rules
Returns an array reference of all tax rules. Each element is an object of Google::Checkout::General::TaxRule.

add_tax_rule RULE
Adds another Google::Checkout::General::TaxRule.


COPYRIGHT

Copyright 2006 Google. All rights reserved.


SEE ALSO

Google::Checkout::General::TaxRule Google::Checkout::General::MerchantCheckoutFlow

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy