Esempio n. 1
0
        /**
         * Convert GetCompetitivePricingForSKURequest to name value pairs
         */
        private IDictionary <String, String> ConvertGetCompetitivePricingForSKU(GetCompetitivePricingForSKURequest request)
        {
            IDictionary <String, String> parameters = new Dictionary <String, String>();

            parameters.Add("Action", "GetCompetitivePricingForSKU");
            if (request.IsSetSellerId())
            {
                parameters.Add("SellerId", request.SellerId);
            }
            if (request.IsSetMarketplaceId())
            {
                parameters.Add("MarketplaceId", request.MarketplaceId);
            }
            if (request.IsSetSellerSKUList())
            {
                SellerSKUListType getCompetitivePricingForSKURequestSellerSKUList = request.SellerSKUList;
                List <String>     sellerSKUListSellerSKUList = getCompetitivePricingForSKURequestSellerSKUList.SellerSKU;
                int sellerSKUListSellerSKUListIndex          = 1;
                foreach (String sellerSKUListSellerSKU in sellerSKUListSellerSKUList)
                {
                    parameters.Add("SellerSKUList" + "." + "SellerSKU" + "." + sellerSKUListSellerSKUListIndex, sellerSKUListSellerSKU);
                    sellerSKUListSellerSKUListIndex++;
                }
            }

            return(parameters);
        }
Esempio n. 2
0
        /**
         * Convert GetLowestOfferListingsForSKURequest to name value pairs
         */
        private IDictionary <String, String> ConvertGetLowestOfferListingsForSKU(GetLowestOfferListingsForSKURequest request)
        {
            IDictionary <String, String> parameters = new Dictionary <String, String>();

            parameters.Add("Action", "GetLowestOfferListingsForSKU");
            if (request.IsSetSellerId())
            {
                parameters.Add("SellerId", request.SellerId);
            }
            if (request.IsSetMarketplaceId())
            {
                parameters.Add("MarketplaceId", request.MarketplaceId);
            }
            if (request.IsSetSellerSKUList())
            {
                SellerSKUListType getLowestOfferListingsForSKURequestSellerSKUList = request.SellerSKUList;
                List <String>     sellerSKUListSellerSKUList = getLowestOfferListingsForSKURequestSellerSKUList.SellerSKU;
                int sellerSKUListSellerSKUListIndex          = 1;
                foreach (String sellerSKUListSellerSKU in sellerSKUListSellerSKUList)
                {
                    parameters.Add("SellerSKUList" + "." + "SellerSKU" + "." + sellerSKUListSellerSKUListIndex, sellerSKUListSellerSKU);
                    sellerSKUListSellerSKUListIndex++;
                }
            }
            if (request.IsSetItemCondition())
            {
                parameters.Add("ItemCondition", request.ItemCondition);
            }
            if (request.IsSetExcludeMe())
            {
                parameters.Add("ExcludeMe", request.ExcludeMe + "");
            }

            return(parameters);
        }
 public GetCompetitivePricingForSKUResponse InvokeGetCompetitivePricingForSKU()
 {
     // Create a request.
     GetCompetitivePricingForSKURequest request = new GetCompetitivePricingForSKURequest();
     
     request.SellerId = sellerId;
     request.MWSAuthToken = mwsAuthToken;
     
     request.MarketplaceId = marketplaceId;
     SellerSKUListType sellerSKUList = new SellerSKUListType();
     request.SellerSKUList = sellerSKUList;
     return this.client.GetCompetitivePricingForSKU(request);
 }
Esempio n. 4
0
            public GetMyPriceForSKUResponse InvokeGetMyPriceForSKU()
            {
                // Create a request.
                GetMyPriceForSKURequest request = new GetMyPriceForSKURequest();
                string sellerId = "example";

                request.SellerId = sellerId;
                string mwsAuthToken = "example";

                request.MWSAuthToken = mwsAuthToken;
                string marketplaceId = "example";

                request.MarketplaceId = marketplaceId;
                SellerSKUListType sellerSKUList = new SellerSKUListType();

                request.SellerSKUList = sellerSKUList;
                return(this.client.GetMyPriceForSKU(request));
            }
 public GetLowestOfferListingsForSKUResponse InvokeGetLowestOfferListingsForSKU()
 {
     // Create a request.
     GetLowestOfferListingsForSKURequest request = new GetLowestOfferListingsForSKURequest();
     
     request.SellerId = sellerId;
     
     request.MWSAuthToken = mwsAuthToken;
     
     request.MarketplaceId = marketplaceId;
     SellerSKUListType sellerSKUList = new SellerSKUListType();
     request.SellerSKUList = sellerSKUList;
     string itemCondition = "new";
     request.ItemCondition = itemCondition;
     bool excludeMe = true;
     request.ExcludeMe = excludeMe;
     return this.client.GetLowestOfferListingsForSKU(request);
 }
Esempio n. 6
0
 public GetMyPriceForSKUResponse InvokeGetMyPriceForSKU(string sellerId, string mwsAuthToken, string marketplaceId, out APIResults results)
 {
     try
     {
         // Create a request.
         GetMyPriceForSKURequest request = new GetMyPriceForSKURequest();
         request.SellerId      = sellerId;
         request.MWSAuthToken  = mwsAuthToken;
         request.MarketplaceId = marketplaceId;
         SellerSKUListType sellerSKUList = new SellerSKUListType();
         request.SellerSKUList = sellerSKUList;
         GetMyPriceForSKUResponse output = this.productClient.GetMyPriceForSKU(request);
         results = new APIResults((IMWSResponse)output);
         return(output);
     }
     catch (MarketplaceWebServiceProductsException ex)
     {
         results = new APIResults(ex);
         throw ex;
     }
 }
Esempio n. 7
0
 public GetLowestOfferListingsForSKUResponse InvokeGetLowestOfferListingsForSKU(string sellerId, string mwsAuthToken, string marketplaceId, string itemCondition, bool excludeMe, out APIResults results)
 {
     try
     {
         // Create a request.
         GetLowestOfferListingsForSKURequest request = new GetLowestOfferListingsForSKURequest();
         request.SellerId      = sellerId;
         request.MWSAuthToken  = mwsAuthToken;
         request.MarketplaceId = marketplaceId;
         SellerSKUListType _sellerSKUList = new SellerSKUListType();
         request.SellerSKUList = _sellerSKUList;
         request.ItemCondition = itemCondition;
         request.ExcludeMe     = excludeMe;
         GetLowestOfferListingsForSKUResponse output = this.productClient.GetLowestOfferListingsForSKU(request);
         results = new APIResults((IMWSResponse)output);
         return(output);
     }
     catch (MarketplaceWebServiceProductsException ex)
     {
         results = new APIResults(ex);
         throw ex;
     }
 }