4 * Copyright (C) 2006 Google Inc.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
19 /* This class is used to create items to be added to the shopping cart
20 * Invoke a separate instance of this class for each item to be
22 * Required fields are the item name, description, quantity and price
23 * The private-data and tax-selector for each item can be set in the
24 * constructor call or using individual Set functions
29 var $item_description;
33 var $merchant_private_data;
34 var $tax_table_selector;
41 * @param string $money
42 * @param string $private_data
43 * @param string $tax_selector
45 function GoogleItem($name, $desc, $qty, $price, $money = "USD",
46 $private_data = "", $tax_selector = ""
48 $this->item_name
= $name;
49 $this->item_description
= $desc;
50 $this->unit_price
= $price;
51 $this->quantity
= $qty;
52 $this->currency
= $money;
53 $this->merchant_private_data
= $private_data;
54 $this->tax_table_selector
= $tax_selector;
58 * @param $private_data
60 function SetMerchantPrivateData($private_data) {
61 $this->merchant_private_data
= $private_data;
65 * @param $tax_selector
67 function SetTaxTableSelector($tax_selector) {
68 $this->tax_table_selector
= $tax_selector;