public void SubmitFeed( SubmitFeedRequest request )
        {
            var response = this._client.SubmitFeed( request );
            if( !response.IsSetSubmitFeedResult() )
                throw new Exception( string.Format( "[amazon] SubmitFeed. Seller: {0}\nResult was not received", request.Merchant ) );

            var feedSubmissionId = response.SubmitFeedResult.FeedSubmissionInfo.FeedSubmissionId;
            while( !this.IsFeedSubmitted( this._client, feedSubmissionId, request.Merchant, request.MWSAuthToken ) )
                Thread.Sleep( TimeSpan.FromMinutes( 1 ) );

            this.CheckSubmissionResult( feedSubmissionId, request.Merchant, request.MWSAuthToken );
        }
        private SubmitFeedRequest InitInventoryFeedRequest( IEnumerable< AmazonInventoryItem > inventoryItems )
        {
            var xmlService = new InventoryFeedXmlService( inventoryItems, this._credentials.SellerId );
            var contentString = xmlService.GetDocumentString();
            var contentStream = xmlService.GetDocumentStream();

            AmazonLogger.Log.Trace( "[amazon] Inventory document for seller {0}\n{1}", this._credentials.SellerId, contentString );

            var request = new SubmitFeedRequest
            {
                MarketplaceIdList = new IdList { Id = this._credentials.AmazonMarketplace.GetMarketplaceIdAsList() },
                Merchant = this._credentials.SellerId,
                FeedType = FeedType.InventoryQuantityUpdate.Description,
                FeedContent = contentStream,
                ContentMD5 = MarketplaceWebServiceFeedsReportsClient.CalculateContentMD5( contentStream ),
                MWSAuthToken = this._credentials.MwsAuthToken
            };

            return request;
        }