/// <summary> /// This method is called by the <see cref="GCheckoutButton"/> class and /// initializes a new instance of the /// <see cref="CheckoutShoppingCartRequest"/> class. /// </summary> /// <param name="MerchantID">The Google Checkout merchant ID assigned /// to a particular merchant.</param> /// <param name="MerchantKey">The Google Checkout merchant key assigned /// to a particular merchant.</param> /// <param name="Env">The environment where a request is being executed. /// Valid values for this parameter are "Sandbox" and "Production".</param> /// <param name="Currency">The currency associated with prices in a /// Checkout API request. At this time, the only supported currency value /// is "USD", which corresponds to U.S. dollars.</param> /// <param name="CartExpirationMinutes"> /// The length of time, in minutes, after which the shopping cart will /// expire if it has not been submitted. A value of <b>0</b> indicates /// the cart does not expire. /// </param> public CheckoutShoppingCartRequest(string MerchantID, string MerchantKey, EnvironmentType Env, string Currency, int CartExpirationMinutes) { _MerchantID = MerchantID; _MerchantKey = MerchantKey; _Environment = Env; _Items = new ArrayList(); _TaxTables = new AutoGen.TaxTables(); _TaxTables.defaulttaxtable = new AutoGen.DefaultTaxTable(); _TaxTables.defaulttaxtable.taxrules = new AutoGen.DefaultTaxRule[0]; _ShippingMethods = new AutoGen.MerchantCheckoutFlowSupportShippingmethods(); _ShippingMethods.Items = new Object[0]; _Currency = Currency; if (CartExpirationMinutes > 0) { SetExpirationMinutesFromNow(CartExpirationMinutes); } }