From 9d377193d3d6818a150e79a5781de1d296502e27 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Sat, 1 Mar 2008 04:54:21 +0000 Subject: [PATCH] placeholder for calculate in Shop::Tax.pm --- lib/WebGUI/Shop/Tax.pm | 17 +++++++++++++++++ t/Shop/Tax.t | 6 ++++++ 2 files changed, 23 insertions(+) diff --git a/lib/WebGUI/Shop/Tax.pm b/lib/WebGUI/Shop/Tax.pm index 93a9fe441..d5faccc9d 100644 --- a/lib/WebGUI/Shop/Tax.pm +++ b/lib/WebGUI/Shop/Tax.pm @@ -78,6 +78,23 @@ sub add { #------------------------------------------------------------------- +=head2 calculate ( $cart ) + +Calculate the tax for the contents of the cart. + +=cut + +sub calculate { + my $self = shift; + my $cart = shift; + + WebGUI::Error::InvalidParam->throw(error => 'Must pass in a WebGUI::Shop::Cart object') + unless ref($cart) eq 'WebGUI::Shop::Cart'; + return $id; +} + +#------------------------------------------------------------------- + =head2 delete ( [$params] ) Deletes data from the tax table by taxId. diff --git a/t/Shop/Tax.t b/t/Shop/Tax.t index 2c4222211..3a62ae8ed 100644 --- a/t/Shop/Tax.t +++ b/t/Shop/Tax.t @@ -378,6 +378,12 @@ sub _grabTaxData { return @taxData; } +####################################################################### +# +# calculate +# +####################################################################### + #---------------------------------------------------------------------------- # Cleanup END {