private string DoRequest(IntlRateV2Request request) { return(_request.GetResponse(_apiUrl, string.Format("API=IntlRateV2&XML={0}", request.ToXmlString()))); }
private List <ShippingOption> DoInternationalRequest(GetShippingOptionRequest shipmentPackage, decimal minimumShippingRate, string password, string username) { IRateResponse response; IntlRateV2Request internationalRequest = CreateInternationalRequest(shipmentPackage, username, password); try { response = _rateService.Get(internationalRequest); } catch (Exception e) { throw new Exception("Unhandled exception with international request:\n\n" + internationalRequest.ToXmlString(), e); } return(response.Error == null ? InterpretShippingOptions((IntlRateV2Response)response, minimumShippingRate) : new List <ShippingOption> { new ShippingOption { Name = response.Error.Description } }); }