/*
The `GoogleCheckout` constructor function.

This is the main constructor function and where all of the magic starts.
Once you have an instance of `GoogleCheckout` you have access to all of
the following submodules

* ShoppingCart - `GoogleCheckout.createCart()`
* MerchantCalculations - `GoogleCheckout.MerchantCalculations`
* Notification - `GoogleCheckout.Notification`
* Polling - `GoogleCheckout.Polling`
* OrderProcessing - `GoogleCheckout.OrderProcessing`
* OrderReporting - `GoogleCheckout.OrderReporting`

Settings

```javascript
settings = {
merchantNumber : 'YOUR MERCHANT NUMBER',
merchantKey : 'YOUR MERCHANT KEY',
currency : 'YOUR CURRENCY - LIKE USD',
timeZone : 'America/New_York',
merchantCalculationsUrl : 'http://yoursite.com/merchant-callback-url',
merchantCalculationsAcceptCoupons : false,
merchantCalculationsAcceptGiftCertifications : false,
merchantCalculationsShipping : false
}
```

- __merchantNumber__ : your merchant number obtained from Google
- __merchantKey__ : your merchant key obtained from Google
- __currency__ : the default currency for your site. If you have this set, you can ignore
setting this value in methods that have it as an argument.
- __timeZone__ : your time zone
- __merchantCalculationsUrl__ : if you want to use merchant calculations, specify your callback url here.
Default: `null`
- __merchantCalculationsAcceptCoupons__ : if you accept coupons and want to process them in your merchant
calculations callback, then set this value to `true`. Default: `false`
- __merchantCalculationsAcceptGiftCertifications__ : if you accept gift certificats and want to process
them in your merchant calculations callback, then set this value to `true`. Default: `false`
- __merchantCalculationsShipping__ : if you want to calculate the shipping rates in your merchant
calculations callback, then set this value to `true`. Default: `false`

Example

```javascript
var gc = new GoogleCheckout({
merchantNumber : '12345612345',
merchantKey : '234543254345345',
currency : 'USD',
timeZone : 'America/New_York'
});
```

@param {Object} settings An object of settings
@return {Object} GoogleCheckout An instance of the `GoogleCheckout` constructor function
@api public
function GoogleCheckout(settings) {
	var self = this;
	
	assert.ok(settings.merchantNumber, 'settings.merchantNumber is required');
	assert.ok(settings.merchantKey, 'settings.merchantKey is required');
	assert.ok(settings.currency, 'settings.currency is required');
	
	self.settings = settings;
	
	self.Polling = new Polling(self);
	self.OrderProcessing = new OrderProcessing(self);
	self.OrderReporting = new OrderReporting(self);
	self.MerchantCalculations = new MerchantCalculations(self);
}