Ejemplo n.º 1
0
        public static void GetSellingManagerSoldListings()
        {
            string endpoint = "https://api.ebay.com/wsapi";
            string callName = "GetSellingManagerSoldListings";
            string siteId   = "2";
            string version  = "949";
            // Build the request URL
            string requestURL = endpoint
                                + "?callname=" + callName
                                + "&siteid=" + siteId
                                + "&appid=" + Settings.AppId
                                + "&version=" + version
                                + "&routing=default";
            // Create the service
            eBayAPIInterfaceService service = new eBayAPIInterfaceService();

            // Assign the request URL to the service locator.
            service.Url = requestURL;
            // Set credentials
            service.RequesterCredentials = new CustomSecurityHeaderType();
            service.RequesterCredentials.eBayAuthToken =
                "AgAAAA**AQAAAA**aAAAAA**c8WOVg**nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6AAlIeiCpiLoAydj6x9nY+seQ**JiADAA**AAMAAA**sPiqCG+IiAwqtalGeoTnnESc7Br2D+btBopa9arMMDNaOfglryGRHk3tn/aXAj3p2/KmDiKSmYrg51QGFNokYSGUskmH/jjsOtKgoLyTTJZ+3CtWqeAOz/cbrYadAD8l+s6xUfnTk9mWm4BjyAfYqJ1zkNHUC5YaFTk+oaDZPZ9bE7uGjfw1cvQeX6M7TalgTSygqdVV6hOVJZ3I9UPuO66HchFTPvd4n02aZ2UfsXrcYdOpstNdjLuETQIB5tmUWo6uiCwh/r+eiWt8jIycZegb/9uRHzwEy7rW9Tk7fIpIohoBtryYRLUnMJvy9Dg4l++AhFY0yakWJsWu7VHy7eCuz+OI0Pk+E+uOQhgQRzIji96K6/AnBNV9lLiOa6CiI5MdkcrF2Z4Kr4WoxAgy+4WjoUq+PRG8eDHseFWANwOVhmY9qZJq0ulR9SNcXd8FoRiinxzx3f+lO+MgfrRcea2QKKQVoYDI69jKOQ568FVQ6Zp0ClJy9ru/L9IqB87COBLFP6Ie+Zx+2nhgj+GuARYOu2z0Z7kqx+R6H19hIYoxNncQtGi2ruzqWXG+hbFWXTlqrne8IiJr1udgK1ZxJk9FTCCKQCx0s57SXuBkyaM15y2pqC+ze43ZiLGC3wk94pWEACDNRWu4rH27RZTN+ALBoGWkVdSzGxuVfMD164ak4cAJrIiT2OX77FqnLN+MGcVbfJCAu+BREtguSzW6JmM9qHXHBI+4H/jfGruvYoIt2zg7DzMFv50i+hpnLe5F";
            // use your token
            service.RequesterCredentials.Credentials          = new UserIdPasswordType();
            service.RequesterCredentials.Credentials.AppId    = Settings.AppId;
            service.RequesterCredentials.Credentials.DevId    = Settings.DevId;
            service.RequesterCredentials.Credentials.AuthCert = Settings.CertId;
            // Make the call
            GetSellingManagerSoldListingsRequestType request = new GetSellingManagerSoldListingsRequestType();

            request.Version = "949";
            var response = service.GetSellingManagerSoldListings(request);

            Console.WriteLine(response.Timestamp);
        }
 /// <summary>
 ///
 /// </summary>
 /// <param name="ApiContext">The <see cref="ApiCall.ApiContext"/> for this API Call of type <see cref="ApiContext"/>.</param>
 public GetSellingManagerSoldListingsCall(ApiContext ApiContext)
 {
     ApiRequest      = new GetSellingManagerSoldListingsRequestType();
     this.ApiContext = ApiContext;
 }
 /// <summary>
 ///
 /// </summary>
 public GetSellingManagerSoldListingsCall()
 {
     ApiRequest = new GetSellingManagerSoldListingsRequestType();
 }
Ejemplo n.º 4
0
    public SellingManagerSoldOrderType[] GetPendingShipmentItems(string userToken)
    {
        string callname = "GetSellingManagerSoldListings";

        #region Initialise Needed Variables

        //Get the Server to use (Sandbox or Production)
        string serverUrl = ConfigurationManager.AppSettings["TradingService"];

        //SiteID = 0  (US) - UK = 3, Canada = 2, Australia = 15, ....
        //string siteID = "0";

        eBayAPIInterfaceService service = new eBayAPIInterfaceService();
        string requestURL = serverUrl + "?callname=" + callname + "&siteid=" + siteID
                            + "&appid=" + AppID + "&version=" + version + "&routing=default";
        service.Url = requestURL;

        // Set credentials
        service.RequesterCredentials = new CustomSecurityHeaderType();
        service.RequesterCredentials.Credentials = new UserIdPasswordType();
        service.RequesterCredentials.Credentials.AppId = AppID;
        service.RequesterCredentials.Credentials.DevId = DevID;
        service.RequesterCredentials.Credentials.AuthCert = CertID;
        service.RequesterCredentials.eBayAuthToken = userToken;
        #endregion

        GetSellingManagerSoldListingsRequestType request = new GetSellingManagerSoldListingsRequestType();
        request.Filter = new SellingManagerSoldListingsPropertyTypeCodeType[] { SellingManagerSoldListingsPropertyTypeCodeType.PaidNotShipped };
        request.Version = version;

        PaginationType pagination = new PaginationType();
        pagination.EntriesPerPage = 500;
        pagination.EntriesPerPageSpecified = true;

        request.Pagination = pagination;

        try
        {
            GetSellingManagerSoldListingsResponseType response = service.GetSellingManagerSoldListings(request);
            return response.SaleRecord;
        }
        catch (Exception ex)
        {
            if (ex.Message.ToLower().Contains("auth token"))
                throw new InvalidEbayCredentialsException();
            else
                throw ex;
        }
    }
Ejemplo n.º 5
0
 public static void GetSellingManagerSoldListings()
 {
     string endpoint = "https://api.ebay.com/wsapi";
     string callName = "GetSellingManagerSoldListings";
     string siteId = "2";
     string version = "949";
     // Build the request URL
     string requestURL = endpoint
                         + "?callname=" + callName
                         + "&siteid=" + siteId
                         + "&appid=" + Settings.AppId
                         + "&version=" + version
                         + "&routing=default";
     // Create the service
     eBayAPIInterfaceService service = new eBayAPIInterfaceService();
     // Assign the request URL to the service locator.
     service.Url = requestURL;
     // Set credentials
     service.RequesterCredentials = new CustomSecurityHeaderType();
     service.RequesterCredentials.eBayAuthToken =
         "AgAAAA**AQAAAA**aAAAAA**c8WOVg**nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6AAlIeiCpiLoAydj6x9nY+seQ**JiADAA**AAMAAA**sPiqCG+IiAwqtalGeoTnnESc7Br2D+btBopa9arMMDNaOfglryGRHk3tn/aXAj3p2/KmDiKSmYrg51QGFNokYSGUskmH/jjsOtKgoLyTTJZ+3CtWqeAOz/cbrYadAD8l+s6xUfnTk9mWm4BjyAfYqJ1zkNHUC5YaFTk+oaDZPZ9bE7uGjfw1cvQeX6M7TalgTSygqdVV6hOVJZ3I9UPuO66HchFTPvd4n02aZ2UfsXrcYdOpstNdjLuETQIB5tmUWo6uiCwh/r+eiWt8jIycZegb/9uRHzwEy7rW9Tk7fIpIohoBtryYRLUnMJvy9Dg4l++AhFY0yakWJsWu7VHy7eCuz+OI0Pk+E+uOQhgQRzIji96K6/AnBNV9lLiOa6CiI5MdkcrF2Z4Kr4WoxAgy+4WjoUq+PRG8eDHseFWANwOVhmY9qZJq0ulR9SNcXd8FoRiinxzx3f+lO+MgfrRcea2QKKQVoYDI69jKOQ568FVQ6Zp0ClJy9ru/L9IqB87COBLFP6Ie+Zx+2nhgj+GuARYOu2z0Z7kqx+R6H19hIYoxNncQtGi2ruzqWXG+hbFWXTlqrne8IiJr1udgK1ZxJk9FTCCKQCx0s57SXuBkyaM15y2pqC+ze43ZiLGC3wk94pWEACDNRWu4rH27RZTN+ALBoGWkVdSzGxuVfMD164ak4cAJrIiT2OX77FqnLN+MGcVbfJCAu+BREtguSzW6JmM9qHXHBI+4H/jfGruvYoIt2zg7DzMFv50i+hpnLe5F";
     // use your token
     service.RequesterCredentials.Credentials = new UserIdPasswordType();
     service.RequesterCredentials.Credentials.AppId = Settings.AppId;
     service.RequesterCredentials.Credentials.DevId = Settings.DevId;
     service.RequesterCredentials.Credentials.AuthCert = Settings.CertId;
     // Make the call
     GetSellingManagerSoldListingsRequestType request = new GetSellingManagerSoldListingsRequestType();
     request.Version = "949";
     var response = service.GetSellingManagerSoldListings(request);
     Console.WriteLine(response.Timestamp);
 }
		/// <summary>
		/// 
		/// </summary>
		/// <param name="ApiContext">The <see cref="ApiCall.ApiContext"/> for this API Call of type <see cref="ApiContext"/>.</param>
		public GetSellingManagerSoldListingsCall(ApiContext ApiContext)
		{
			ApiRequest = new GetSellingManagerSoldListingsRequestType();
			this.ApiContext = ApiContext;
		}
		/// <summary>
		/// 
		/// </summary>
		public GetSellingManagerSoldListingsCall()
		{
			ApiRequest = new GetSellingManagerSoldListingsRequestType();
		}