/*
The `ShoppingCart` module provides methods for adding items, adding shipping options
and submitting a shopping cart to Google. After submitting the shopping cart to
Google, you will receive a URL to redirect your user to.

There is no point in calling the constructor manually. You can get an
instance of `ShoppingCart` like this

```javascript
var gc = new GoogleCheckout(settings);

gc.createCart(function (err, cart) {

});
```

Here is a complete example of building a cart and pushing it to Google

```javascript
var gc = new GoogleCheckout(settings);

gc.createCart(function (err, cart) {
cart.addItem({
name : 'Crayons',
description : '42 Assorted Crayons',
unitPrice : 3.99,
currency : 'USD',
quantity : 1,
item_id : 'CRAY42'
});

cart.addShipMethod({
name : 'FedEx Ground',
price : 3.00,
currency : 'USD'
});

cart.postCart(function (err, redirectUrl) {
if (err) {
//deal with the error
return;
}

console.log(redirectUrl);
});
});
```

@param {Object} GoogleCheckout A GoogleCheckout instance object.
@return {Object} ShoppingCart Object
@api public
function ShoppingCart (objGoogleCheckout) {
	var self = this;
	
	//todo: check the constructor name
	assert.ok(objGoogleCheckout, "A GoogleCheckout object is the only required argument");
	
	self.gc = objGoogleCheckout;
	self.settings = self.gc.settings;
	
	self.items = [];
	self.shipMethods = [];
}