Example #1
0
        public void GetSellerEventsFull()
        {
            Assert.IsNotNull(TestData.NewItem2, "Failed because no item available -- requires successful AddItem test");
            GetSellerEventsCall api = new GetSellerEventsCall(this.apiContext);
            //specify more info
            string   categoryID  = TestData.NewItem2.PrimaryCategory.CategoryID;
            DateTime endTimeFrom = DateTime.Now.AddDays(-1);
            DateTime endTimeTo   = DateTime.Now.AddDays(1);

            //these properties how to use?
            bool           IncludeWatchCount = true;
            PaginationType pagination        = new PaginationType();

            pagination.PageNumber     = 1;
            pagination.EntriesPerPage = 20;

            api.EndTimeFrom       = endTimeFrom;
            api.EndTimeTo         = endTimeTo;
            api.IncludeWatchCount = IncludeWatchCount;
            api.DetailLevelList   = new DetailLevelCodeTypeCollection(new DetailLevelCodeType[] { DetailLevelCodeType.ReturnAll });
            api.Execute();

            //check whether the call is success.
            Assert.IsTrue(api.ApiResponse.Ack == AckCodeType.Success || api.ApiResponse.Ack == AckCodeType.Warning, "do not success!");
            ItemTypeCollection events = api.ApiResponse.ItemArray;
            // Make sure it covers that item that I just added.
            ItemType foundEvent = findItem(events, TestData.NewItem.ItemID);

            Assert.IsNotNull(foundEvent);
        }
 public void GetCategoryListings()
 {
     GetCategoryListingsCall api = new GetCategoryListingsCall(this.apiContext);
     DetailLevelCodeType[] detailLevels = new DetailLevelCodeType[] {
     DetailLevelCodeType.ReturnAll
     };
     api.DetailLevelList = new DetailLevelCodeTypeCollection(detailLevels);
     //api.CategoryID = "37906";
     api.CategoryID = "279";
     api.ItemTypeFilter = ItemTypeFilterCodeType.AllItems;
     api.Currency = CurrencyCodeType.USD;
     api.OrderBy = CategoryListingsOrderCodeType.SortByPriceAsc;
     // Pagination
     PaginationType pt = new PaginationType();
     pt.EntriesPerPage = 50;
     pt.EntriesPerPageSpecified = true;
     pt.PageNumber = 1;
     pt.PageNumberSpecified = true;
     api.Pagination = pt;
     // Make API call.
     ItemTypeCollection items = api.GetCategoryListings(api.CategoryID);
     //check whether the call is success.
     Assert.IsTrue(api.ApiResponse.Ack == AckCodeType.Success || api.ApiResponse.Ack == AckCodeType.Warning,"the call is failure!");
     Assert.IsNotNull(items);
     Assert.IsTrue(items.Count > 0);
     TestData.CategoryListings = items;
 }
        public void GetAccount()
        {
            GetAccountCall api = new GetAccountCall(this.apiContext);

            api.AccountHistorySelection = AccountHistorySelectionCodeType.LastInvoice;

            /*
             * System.DateTime calTo = System.DateTime.Instance;
             * System.DateTime calFrom = (System.DateTime)calTo.clone();
             * calFrom.add(System.DateTime.DATE, -1);
             * TimeFilter tf = new TimeFilter(calFrom, calTo);
             * api.ViewPeriod = tf;
             */
            // Pagination
            PaginationType pt = new PaginationType();

            pt.EntriesPerPage          = 0;    // No details will be returned.
            pt.EntriesPerPageSpecified = true;
            pt.PageNumber          = 1;
            pt.PageNumberSpecified = true;
            api.Pagination         = pt;
            ApiException gotException = null;

            try
            {
                api.GetAccount(AccountHistorySelectionCodeType.LastInvoice);
            }
            catch (ApiException e)
            {
                gotException = e;
            }
            Assert.IsTrue(gotException == null || gotException.containsErrorCode("20154"));
        }
Example #4
0
        public void GetSellerList()
        {
            Assert.IsNotNull(TestData.NewItem, "Failed because no item available -- requires successful AddItem test");
            //
            GetSellerListCall gsl = new GetSellerListCall(this.apiContext);

            DetailLevelCodeType[] detailLevels = new DetailLevelCodeType[] {
                DetailLevelCodeType.ReturnAll
            };
            gsl.DetailLevelList = new DetailLevelCodeTypeCollection(detailLevels);
            // Time filter
            System.DateTime calTo   = System.DateTime.Now.AddHours(10);
            System.DateTime calFrom = System.DateTime.Now.AddHours(-20);
            TimeFilter      tf      = new TimeFilter(calFrom, calTo);

            gsl.EndTimeFilter = tf;
            // Pagination
            PaginationType pt = new PaginationType();

            pt.EntriesPerPage = 100; pt.EntriesPerPageSpecified = true;
            pt.PageNumber     = 1; pt.PageNumberSpecified = true;
            gsl.Pagination    = pt;
            //
            gsl.Execute();
            ItemTypeCollection items = gsl.ApiResponse.ItemArray;

            Assert.IsNotNull(items);
            Assert.IsTrue(items.Count > 0);
            ItemType foundItem = findItem(items, TestData.NewItem.ItemID);

            Assert.IsNotNull(foundItem, "item not found");
        }
		public void GetSellerEventsFull()
		{
			Assert.IsNotNull(TestData.NewItem2, "Failed because no item available -- requires successful AddItem test");
			GetSellerEventsCall api = new GetSellerEventsCall(this.apiContext);
			//specify more info
			string categoryID = TestData.NewItem2.PrimaryCategory.CategoryID;
			DateTime endTimeFrom = DateTime.Now.AddDays(-1);
			DateTime endTimeTo  = DateTime.Now.AddDays(1);

			//these properties how to use?
			bool IncludeWatchCount = true;
			PaginationType pagination =new PaginationType();
			pagination.PageNumber= 1;
			pagination.EntriesPerPage = 20;
			
			api.EndTimeFrom=endTimeFrom;
			api.EndTimeTo=endTimeTo;
			api.IncludeWatchCount = IncludeWatchCount;
			api.DetailLevelList = new DetailLevelCodeTypeCollection(new DetailLevelCodeType[]{DetailLevelCodeType.ReturnAll});
			api.Execute();
			
			//check whether the call is success.
			Assert.IsTrue(api.ApiResponse.Ack==AckCodeType.Success || api.ApiResponse.Ack==AckCodeType.Warning,"do not success!");
			ItemTypeCollection events = api.ApiResponse.ItemArray;
			// Make sure it covers that item that I just added.
			ItemType foundEvent = findItem(events, TestData.NewItem.ItemID);
			Assert.IsNotNull(foundEvent);
		}
 public void GetSearchResults()
 {
     GetSearchResultsCall api = new GetSearchResultsCall(this.apiContext);
     PriceRangeFilterType pf = new PriceRangeFilterType();
     pf.MinPrice = new AmountType();
     pf.MinPrice.Value = 1.0;
     pf.MinPrice.currencyID = CurrencyCodeType.USD;
     pf.MaxPrice = new AmountType();
     pf.MaxPrice.Value = 999.99;
     pf.MaxPrice.currencyID = CurrencyCodeType.USD;
     api.PriceRangeFilter = pf;
     api.ItemTypeFilter = ItemTypeFilterCodeType.AllItems;
     api.Query = "DVD";
     // Time filter
     System.DateTime calTo = System.DateTime.Now;
     System.DateTime calFrom = calTo.AddDays(-7);
     api.ModTimeFrom = calFrom;
     //api.EndTimeTo = calTo;
     // Pagination
     PaginationType pt = new PaginationType();
     pt.EntriesPerPage = 50; pt.EntriesPerPageSpecified = true;
     pt.PageNumber = 1; pt.PageNumberSpecified = true;
     api.Pagination = pt;
     // Make API call.
     SearchResultItemTypeCollection items = api.GetSearchResults(api.Query);
     Assert.IsNotNull(items);
     Assert.IsTrue(items.Count > 0, "No items found");
 }
        public void GetProductSearchResults()
        {
            this.apiContext.Timeout = 360000;
            GetProductSearchResultsCall api = new GetProductSearchResultsCall(this.apiContext);
            ProductSearchType ps = new ProductSearchType();
            //ps.AttributeSetID = 1785;// Cell phones
            ps.MaxChildrenPerFamily = 20; ps.MaxChildrenPerFamilySpecified = true;
            ps.AvailableItemsOnly = false; ps.AvailableItemsOnlySpecified = true;
            ps.QueryKeywords = "Nokia";
            StringCollection ids = new StringCollection();
            ids.Add("1785");
            ps.CharacteristicSetIDs = ids;
            // Pagination
            PaginationType pt = new PaginationType();
            pt.EntriesPerPage = 50; pt.EntriesPerPageSpecified = true;
            pt.PageNumber = 1; pt.PageNumberSpecified = true;
            ps.Pagination = pt;

            ProductSearchTypeCollection pstc = new ProductSearchTypeCollection();
            pstc.Add(ps);
            // Make API call.
            ProductSearchResultTypeCollection results = api.GetProductSearchResults(pstc);
            Assert.IsNotNull(results);
            Assert.IsTrue(results.Count > 0);
            TestData.ProductSearchResults = results;
            Assert.IsNotNull(TestData.ProductSearchResults);
            Assert.IsTrue(TestData.ProductSearchResults.Count > 0);
        }
 public void GetSellerList()
 {
     Assert.IsNotNull(TestData.NewItem, "Failed because no item available -- requires successful AddItem test");
     //
     GetSellerListCall gsl = new GetSellerListCall(this.apiContext);
     DetailLevelCodeType[] detailLevels = new DetailLevelCodeType[] {
                                                                        DetailLevelCodeType.ReturnAll
                                                                    };
     gsl.DetailLevelList = new DetailLevelCodeTypeCollection(detailLevels);
     // Time filter
     System.DateTime calTo = System.DateTime.Now.AddHours(1);
     System.DateTime calFrom = System.DateTime.Now.AddHours(-2);
     TimeFilter tf = new TimeFilter(calFrom, calTo);
     gsl.EndTimeFilter = tf;
     // Pagination
     PaginationType pt = new PaginationType();
     pt.EntriesPerPage = 100; pt.EntriesPerPageSpecified = true;
     pt.PageNumber = 1; pt.PageNumberSpecified = true;
     gsl.Pagination = pt;
     //
     gsl.Execute();
     ItemTypeCollection items = gsl.ApiResponse.ItemArray;
     Assert.IsNotNull(items);
     Assert.IsTrue(items.Count > 0);
     ItemType foundItem = findItem(items, TestData.NewItem.ItemID);
     Assert.IsNotNull(foundItem, "item not found");
 }
Example #9
0
 public void GetAccount()
 {
     GetAccountCall api = new GetAccountCall(this.apiContext);
     api.AccountHistorySelection = AccountHistorySelectionCodeType.LastInvoice;
     /*
     System.DateTime calTo = System.DateTime.Instance;
     System.DateTime calFrom = (System.DateTime)calTo.clone();
     calFrom.add(System.DateTime.DATE, -1);
     TimeFilter tf = new TimeFilter(calFrom, calTo);
     api.ViewPeriod = tf;
     */
     // Pagination
     PaginationType pt = new PaginationType();
     pt.EntriesPerPage = 0; // No details will be returned.
     pt.EntriesPerPageSpecified = true;
     pt.PageNumber = 1;
     pt.PageNumberSpecified = true;
     api.Pagination = pt;
     ApiException gotException = null;
     try
     {
         api.GetAccount(AccountHistorySelectionCodeType.LastInvoice);
     }
     catch (ApiException e)
     {
         gotException = e;
     }
     Assert.IsTrue(gotException == null || gotException.containsErrorCode("20154"));
 }
Example #10
0
        public OrderType[] DownloadNeweBayOrder(DateTime?fromTime, DateTime?toTime)
        {
            try
            {
                GetOrdersCall        getOrdersCall;
                GetOrdersRequestType getOrdersRequest;
                PaginationType       paging = new PaginationType();

                int totalPage;

                DetailLevelCodeTypeCollection detailLevelColl = new DetailLevelCodeTypeCollection();
                detailLevelColl.Add(DetailLevelCodeType.ReturnAll);

                List <OrderType> returnOrders = new List <OrderType>();
                foreach (var apiContext in _eBayAPIContextProvider.GetAPIContext())
                {
                    getOrdersCall              = new GetOrdersCall(apiContext);
                    getOrdersRequest           = new GetOrdersRequestType();
                    getOrdersRequest.OrderRole = TradingRoleCodeType.Seller;

                    getOrdersRequest.DetailLevel = detailLevelColl;
                    //var getOrderRequestDatetimeNow = DateTime.Now.AddMinutes(-2);
                    if (fromTime != null)
                    {
                        getOrdersRequest.CreateTimeFrom = ((DateTime)fromTime).ToUniversalTime();
                    }
                    if (toTime != null)
                    {
                        getOrdersRequest.CreateTimeTo = ((DateTime)toTime).ToUniversalTime();
                    }



                    int pageNumber = 1;
                    do
                    {
                        paging.EntriesPerPage       = 100;
                        paging.PageNumber           = pageNumber;
                        getOrdersRequest.Pagination = paging;
                        var getOrdersResponse = getOrdersCall.ExecuteRequest(getOrdersRequest) as GetOrdersResponseType;


                        if (getOrdersResponse.OrderArray != null && getOrdersResponse.OrderArray.Count > 0)
                        {
                            returnOrders.AddRange(getOrdersResponse.OrderArray.ToArray());
                        }

                        totalPage = getOrdersResponse.PaginationResult.TotalNumberOfPages;
                        pageNumber++;
                    } while (pageNumber <= totalPage);
                }

                return(returnOrders.ToArray());
            }
            catch (Exception ex)
            {
                return(default(OrderType[]));
            }
        }
		/// <summary>
		/// Returns orders in which the user was involved and for which feedback
		/// is still needed from either the buyer or seller.
		/// </summary>
		/// 
		/// <param name="Sort">
		/// Specifies how the returned feedback items should be sorted.
		/// Valid values are Title, EndTime, QuestionCount, FeedbackLeft,
		/// FeedbackReceivedDescending, UserIDDescending, TitleDescending,
		/// and EndTimeDescending.
		/// </param>
		///
		/// <param name="Pagination">
		/// Specifies the number of entries per page and the page number to return
		/// in the result set.
		/// </param>
		///
		public PaginatedTransactionArrayType GetItemsAwaitingFeedback(ItemSortTypeCodeType Sort, PaginationType Pagination)
		{
			this.Sort = Sort;
			this.Pagination = Pagination;

			Execute();
			return ApiResponse.ItemsAwaitingFeedback;
		}
Example #12
0
        private void simpleButtonLeer_Click(object sender, EventArgs e)
        {
            int pageNumber             = 1;
            List <OrderType> orderType = new List <OrderType>();

            foreach (CheckedListBoxItem cuenta in checkedListBoxControlCuentas.CheckedItems)
            {
                credencialesEbay.cuenta = cuenta.Value.ToString();
                pageNumber = 1;
                while (true)
                {
                    GetOrdersCall getOrdersCall = new GetOrdersCall(credencialesEbay.context);
                    getOrdersCall.DetailLevelList = new DetailLevelCodeTypeCollection();
                    getOrdersCall.DetailLevelList.Add(DetailLevelCodeType.ReturnAll);
                    getOrdersCall.CreateTimeTo         = DateTime.Now.ToUniversalTime();
                    getOrdersCall.CreateTimeFrom       = dateEditDesde.DateTime;
                    getOrdersCall.IncludeFinalValueFee = true;
                    PaginationType pagination = new PaginationType();
                    pagination.EntriesPerPage          = 100;
                    pagination.EntriesPerPageSpecified = true;
                    pagination.PageNumber          = pageNumber;
                    pagination.PageNumberSpecified = true;
                    getOrdersCall.Execute();
                    int total = 999;
                    try
                    {
                        total = getOrdersCall.PaginationResult.TotalNumberOfPages;
                    }
                    catch
                    { }
                    simpleButtonLeer.Text = credencialesEbay.cuenta + string.Format(" {0} de {1}", pageNumber, total);
                    Application.DoEvents();
                    var b = getOrdersCall.ApiResponse.Any.ToString();
                    for (int i = 0; i < getOrdersCall.ApiResponse.OrderArray.Count; i++)
                    {
                        orderType.Add(getOrdersCall.ApiResponse.OrderArray[i]);
                    }
                    Parallel.ForEach(orderType, new ParallelOptions {
                        MaxDegreeOfParallelism = 4
                    }, webpage =>
                    {
                        fnGrabarOrder(webpage);
                    });
                    orderType.Clear();
                    var a = getOrdersCall.ApiResponse.OrderArray[0];
                    if (pageNumber < getOrdersCall.PaginationResult.TotalNumberOfPages)
                    {
                        pageNumber++;
                    }
                    else
                    {
                        break;
                    }
                }
            }
        }
		/// <summary>
		/// Retrieves Best Offers.
		/// </summary>
		/// 
		/// <param name="ItemID">
		/// The ID of the listing for which Best Offer information is to be returned.
		/// See the description of GetBestOffers
		/// for details related to who makes the request and how
		/// ItemID and BestOfferID can be omitted.
		/// </param>
		///
		/// <param name="BestOfferID">
		/// The ID of the Best Offer for which information is to be returned.
		/// See the description of GetBestOffers
		/// for details related to who makes the request and how
		/// ItemID and BestOfferID can be omitted.
		/// </param>
		///
		/// <param name="BestOfferStatus">
		/// This optional filter controls whether only active Best Offers are retrieved or
		/// all Best Offers (even Best Offers that were declined or all no longer the "best
		/// offer"). The "All" value can only be specified if an <b>ItemID</b> 
		/// value is also supplied in the request.
		/// </param>
		///
		/// <param name="Pagination">
		/// Specifies how to create virtual pages in the returned list (such as total
		/// number of entries and total number of pages to return).
		/// </param>
		///
		public BestOfferTypeCollection GetBestOffers(string ItemID, string BestOfferID, BestOfferStatusCodeType BestOfferStatus, PaginationType Pagination)
		{
			this.ItemID = ItemID;
			this.BestOfferID = BestOfferID;
			this.BestOfferStatus = BestOfferStatus;
			this.Pagination = Pagination;

			Execute();
			return ApiResponse.BestOfferArray;
		}
Example #14
0
 public void GetFeedback()
 {
     GetFeedbackCall api = new GetFeedbackCall(this.apiContext);
     // Pagination
     PaginationType pt = new PaginationType();
     pt.EntriesPerPage = 100; pt.EntriesPerPageSpecified = true;
     pt.PageNumber = 1; pt.PageNumberSpecified = true;
     api.Pagination = pt;
     api.UserID = TestData.ApiUserID;
     // Make API call.
     FeedbackDetailTypeCollection feedbacks = api.GetFeedback();
 }
        public string GetInventory()
        {
            ApiContext context = eBayCall.GetContext();

            try
            {
                GetSellerListCall oGetSellerListCall = new GetSellerListCall(context);

                // use GranularityLevel of Fine
                oGetSellerListCall.GranularityLevel = GranularityLevelCodeType.Fine;

                // get the first page, 200 items per page
                PaginationType oPagination = new PaginationType();
                oPagination.EntriesPerPage          = 200;
                oPagination.EntriesPerPageSpecified = true;
                oPagination.PageNumber          = 1;
                oPagination.PageNumberSpecified = true;
                oGetSellerListCall.Pagination   = oPagination;

                // ask for all items that are ending in the future (active items)
                oGetSellerListCall.EndTimeFilter = new TimeFilter(DateTime.Now, DateTime.Now.AddMonths(1));

                // return items that end soonest first
                oGetSellerListCall.Sort = 2;

                ItemTypeCollection oItems = oGetSellerListCall.GetSellerList();

                if (oItems != null)
                {
                    if (oItems.Count > 0)
                    {
                        return(JsonConvert.SerializeObject(oItems, Formatting.Indented));
                    }
                    else
                    {
                        return("No active inventory.");
                    }
                }
                else
                {
                    return("Inventory is null!");
                }
            }
            catch (ApiException oApiEx)
            {
                return(oApiEx.Message);
            }
            catch (Exception ex)
            {
                return(ex.Message);
            }
        }
 public void GetUserDisputes()
 {
     GetUserDisputesCall api = new GetUserDisputesCall(this.apiContext);
     api.DisputeFilterType = DisputeFilterTypeCodeType.AllInvolvedDisputes;
     api.DisputeSortType = DisputeSortTypeCodeType.DisputeCreatedTimeAscending;
     // Pagination
     PaginationType pt = new PaginationType();
     pt.EntriesPerPage = 10; pt.EntriesPerPageSpecified = true;
     pt.PageNumber = 1; pt.PageNumberSpecified = true;
     api.Pagination = pt;
     // Make API call.
     DisputeTypeCollection disputes = api.GetUserDisputes(pt);
 }
Example #17
0
        public void GetFeedback()
        {
            GetFeedbackCall api = new GetFeedbackCall(this.apiContext);
            // Pagination
            PaginationType pt = new PaginationType();

            pt.EntriesPerPage = 100; pt.EntriesPerPageSpecified = true;
            pt.PageNumber     = 1; pt.PageNumberSpecified = true;
            api.Pagination    = pt;
            api.UserID        = TestData.ApiUserID;
            // Make API call.
            FeedbackDetailTypeCollection feedbacks = api.GetFeedback();
        }
Example #18
0
        public void GetDispute(string token, DateTime from, DateTime to, DisputeFilterTypeCodeType disputeFilterTypeCodeType,
                               DisputeSortTypeCodeType disputeSortTypeCodeType)
        {
            var apiContext = CreateApiContext(apiServerUrl, ruName, appId, devId, certId, token);
            var apiCall    = new GetUserDisputesCall(apiContext);
            var pagination = new PaginationType();
            var disputes   = apiCall.GetUserDisputes(disputeFilterTypeCodeType, disputeSortTypeCodeType, from, to, pagination);

            foreach (DisputeType dispute in disputes)
            {
                dispute /
            }
        }
		/// <summary>
		/// Retrieves a paginated list containing details of a user's Selling Manager inventory.
		/// This call is subject to change without notice; the deprecation process is
		/// inapplicable to this call.
		/// </summary>
		/// 
		/// <param name="Sort">
		/// Sets the sorting method for the results.
		/// </param>
		///
		/// <param name="FolderID">
		/// Specifies the inventory folder containing the requested inventory information.
		/// </param>
		///
		/// <param name="Pagination">
		/// Details about how many Products to return per page and which page to view.
		/// </param>
		///
		/// <param name="SortOrder">
		/// Order to be used for sorting retrieved product lists.
		/// </param>
		///
		/// <param name="Search">
		/// Specifies types and values to search for in the seller's listings.
		/// </param>
		///
		/// <param name="StoreCategoryID">
		/// Specifies a store category whose products will be returned.
		/// </param>
		///
		/// <param name="FilterList">
		/// Container for the list of filters that can be applied to the inventory information requested.
		/// </param>
		///
		public DateTime GetSellingManagerInventory(SellingManagerProductSortCodeType Sort, long FolderID, PaginationType Pagination, SortOrderCodeType SortOrder, SellingManagerSearchType Search, long StoreCategoryID, SellingManagerInventoryPropertyTypeCodeTypeCollection FilterList)
		{
			this.Sort = Sort;
			this.FolderID = FolderID;
			this.Pagination = Pagination;
			this.SortOrder = SortOrder;
			this.Search = Search;
			this.StoreCategoryID = StoreCategoryID;
			this.FilterList = FilterList;

			Execute();
			return ApiResponse.InventoryCountLastCalculatedDate;
		}
 public void GetSellingManagerSoldListings()
 {
     GetSellingManagerSoldListingsCall api = new GetSellingManagerSoldListingsCall(apiContext);
     PaginationType pagination = new PaginationType();
     pagination.EntriesPerPage=5;
     pagination.PageNumber=0;
     api.Pagination=pagination;
     api.Execute();
     //check whether the call is success.
     Assert.IsTrue(api.ApiResponse.Ack==AckCodeType.Success || api.ApiResponse.Ack==AckCodeType.Warning,"do not success!");
     Assert.IsNotNull(api.SaleRecordList);
     Assert.IsTrue(api.SaleRecordList[0].SellingManagerSoldTransaction.Count > 0);
     TestData.SoldItemId = api.SaleRecordList[0].SellingManagerSoldTransaction[0].ItemID;
 }
 public void GetItemsAwaitingFeedback()
 {
     GetItemsAwaitingFeedbackCall api = new GetItemsAwaitingFeedbackCall(this.apiContext);
     // Pagination
     PaginationType pt = new PaginationType();
     pt.EntriesPerPage = 100; pt.EntriesPerPageSpecified = true;
     pt.PageNumber = 1; pt.PageNumberSpecified = true;
     api.Pagination = pt;
     api.Sort = ItemSortTypeCodeType.EndTime;
     // Make API call.
     api.Execute();
     //			TransactionTypeCollection trans = api.ApiResponse.ItemsAwaitingFeedback.TransactionArray;
     //			PaginationResultType pr = api.ApiResponse.ItemsAwaitingFeedback.PaginationResult;
 }
        public void GetUserDisputes()
        {
            GetUserDisputesCall api = new GetUserDisputesCall(this.apiContext);

            api.DisputeFilterType = DisputeFilterTypeCodeType.AllInvolvedDisputes;
            api.DisputeSortType   = DisputeSortTypeCodeType.DisputeCreatedTimeAscending;
            // Pagination
            PaginationType pt = new PaginationType();

            pt.EntriesPerPage = 10; pt.EntriesPerPageSpecified = true;
            pt.PageNumber     = 1; pt.PageNumberSpecified = true;
            api.Pagination    = pt;
            // Make API call.
            DisputeTypeCollection disputes = api.GetUserDisputes(pt);
        }
 public static IServiceCollection UsePagination <T>(this IServiceCollection serviceCollection,
                                                    PaginationType paginationType) where T : IPaginationParams
 {
     return(paginationType switch
     {
         PaginationType.LimitItems => serviceCollection.UsePagination(options =>
         {
             options.RegisterPageCalculator <T>(new LimitOffsetCalculator());
         }),
         PaginationType.Pages => serviceCollection.UsePagination(options =>
         {
             options.RegisterPageCalculator <T>(new PagesCalculator());
         }),
         _ => throw new ArgumentException("Invalid pagination type", nameof(paginationType))
     });
Example #24
0
        public void GetItemsAwaitingFeedback()
        {
            GetItemsAwaitingFeedbackCall api = new GetItemsAwaitingFeedbackCall(this.apiContext);
            // Pagination
            PaginationType pt = new PaginationType();

            pt.EntriesPerPage = 100; pt.EntriesPerPageSpecified = true;
            pt.PageNumber     = 1; pt.PageNumberSpecified = true;
            api.Pagination    = pt;
            api.Sort          = ItemSortTypeCodeType.EndTime;
            // Make API call.
            api.Execute();
//			TransactionTypeCollection trans = api.ApiResponse.ItemsAwaitingFeedback.TransactionArray;
//			PaginationResultType pr = api.ApiResponse.ItemsAwaitingFeedback.PaginationResult;
        }
        public void GetSellingManagerSoldListings()
        {
            GetSellingManagerSoldListingsCall api = new GetSellingManagerSoldListingsCall(apiContext);
            PaginationType pagination             = new PaginationType();

            pagination.EntriesPerPage = 5;
            pagination.PageNumber     = 0;
            api.Pagination            = pagination;
            api.Execute();
            //check whether the call is success.
            Assert.IsTrue(api.ApiResponse.Ack == AckCodeType.Success || api.ApiResponse.Ack == AckCodeType.Warning, "do not success!");
            Assert.IsNotNull(api.SaleRecordList);
            Assert.IsTrue(api.SaleRecordList[0].SellingManagerSoldTransaction.Count > 0);
            TestData.SoldItemId = api.SaleRecordList[0].SellingManagerSoldTransaction[0].ItemID;
        }
 public void GetSellerTransactions()
 {
     GetSellerTransactionsCall gst = new GetSellerTransactionsCall(this.apiContext);
     // Time filter
     System.DateTime calTo = System.DateTime.Now;
     System.DateTime calFrom = calTo.AddHours(-1);
     TimeFilter tf = new TimeFilter(calFrom, calTo);
     gst.ModTimeFilter = tf;
     // Pagination
     PaginationType pt = new PaginationType();
     pt.EntriesPerPage = 100; pt.EntriesPerPageSpecified = true;
     pt.PageNumber = 1; pt.PageNumberSpecified = true;
     gst.Pagination = pt;
     gst.Execute();
     TestData.SellerTransactions = gst.ApiResponse.TransactionArray;
 }
Example #27
0
        public void GetSellerListFull()
        {
            Assert.IsNotNull(TestData.NewItem2, "Failed because no item available -- requires successful AddItem test");
            GetSellerListCall gsl = new GetSellerListCall(this.apiContext);

            DetailLevelCodeType[] detailLevels = new DetailLevelCodeType[] {
                DetailLevelCodeType.ReturnAll
            };

            //specify information
            gsl.AdminEndedItemsOnly = false;
            gsl.CategoryID          = int.Parse(TestData.NewItem2.PrimaryCategory.CategoryID);
            gsl.StartTimeFrom       = DateTime.Now.AddDays(-2);
            gsl.StartTimeTo         = DateTime.Now.AddDays(1);
            //gsl.GranularityLevel=GranularityLevelCodeType.Fine;//if specify GranularityLevel, the DetailLevelList is ignored.
            gsl.IncludeWatchCount = true;
            gsl.DetailLevelList   = new DetailLevelCodeTypeCollection(detailLevels);
            // Pagination
            PaginationType pt = new PaginationType();

            pt.EntriesPerPage          = 100;
            pt.EntriesPerPageSpecified = true;
            pt.PageNumber          = 1;
            pt.PageNumberSpecified = true;
            gsl.Pagination         = pt;
            gsl.Sort = 1;          //descending sort
            //
            gsl.Execute();

            //check whether the call is success.
            Assert.IsTrue(gsl.AbstractResponse.Ack == AckCodeType.Success || gsl.AbstractResponse.Ack == AckCodeType.Warning, "do not success!");
            ItemTypeCollection items = gsl.ApiResponse.ItemArray;

            Assert.IsNotNull(items);
            Assert.IsTrue(items.Count > 0);

            ItemType foundItem = findItem(items, TestData.NewItem2.ItemID);

            Assert.IsNotNull(foundItem, "item not found");

            ItemType item = items[0];

            Assert.IsNotNull(item.HitCount);
            Assert.IsNotNull(gsl.ApiResponse.PaginationResult);
            Assert.IsNotNull(gsl.ApiResponse.Seller);
        }
 public void GetPopularKeywords()
 {
     GetPopularKeywordsCall api = new GetPopularKeywordsCall(this.apiContext);
     // Pagination
     PaginationType pt = new PaginationType();
     pt.EntriesPerPage = 50; pt.EntriesPerPageSpecified = true;
     pt.PageNumber = 1; pt.PageNumberSpecified = true;
     api.Pagination = pt;
     api.MaxKeywordsRetrieved = 100;
     StringCollection catIdList = new StringCollection();
     catIdList.Add("-1");
     api.CategoryIDList = catIdList;
     // Make API call
     api.Execute();
     CategoryTypeCollection words = api.ApiResponse.CategoryArray;
     Assert.IsTrue(words.Count > 0, "No keywords found");
     Boolean hasMore = api.ApiResponse.HasMore;
 }
        public void UseDefaultCalculation(PaginationType paginationType)
        {
            switch (paginationType)
            {
            case PaginationType.Pages:
                _pageDataCalculators[LinkRelationship.First.GetLinkHeaderValue()]    = PagesCalculator.GetFirstPage;
                _pageDataCalculators[LinkRelationship.Previous.GetLinkHeaderValue()] = PagesCalculator.GetPreviousPage;
                _pageDataCalculators[LinkRelationship.Next.GetLinkHeaderValue()]     = PagesCalculator.GetNextPage;
                _pageDataCalculators[LinkRelationship.Last.GetLinkHeaderValue()]     = PagesCalculator.GetLastPage;
                break;

            case PaginationType.LimitItems:
                _pageDataCalculators[LinkRelationship.First.GetLinkHeaderValue()]    = LimitOffsetCalculator.GetFirstPage;
                _pageDataCalculators[LinkRelationship.Previous.GetLinkHeaderValue()] = LimitOffsetCalculator.GetPreviousPage;
                _pageDataCalculators[LinkRelationship.Next.GetLinkHeaderValue()]     = LimitOffsetCalculator.GetNextPage;
                _pageDataCalculators[LinkRelationship.Last.GetLinkHeaderValue()]     = LimitOffsetCalculator.GetLastPage;
                break;
            }
        }
Example #30
0
        public void GetSellerTransactions()
        {
            GetSellerTransactionsCall gst = new GetSellerTransactionsCall(this.apiContext);

            // Time filter
            System.DateTime calTo   = System.DateTime.Now;
            System.DateTime calFrom = calTo.AddHours(-1);
            TimeFilter      tf      = new TimeFilter(calFrom, calTo);

            gst.ModTimeFilter = tf;
            // Pagination
            PaginationType pt = new PaginationType();

            pt.EntriesPerPage = 100; pt.EntriesPerPageSpecified = true;
            pt.PageNumber     = 1; pt.PageNumberSpecified = true;
            gst.Pagination    = pt;
            gst.Execute();
            TestData.SellerTransactions = gst.ApiResponse.TransactionArray;
        }
        public ProductQuery(InMemoryRepository repository)
        {
            Name        = "Product_Query";
            Description = "Product Queries";

            Field <ListGraphType <ProductType> >("find",
                                                 arguments: PaginationType.GetQueryArgumentsForPagination(),
                                                 resolve: ctx => repository.GetProducts(Pagination.CreateInstanceFromQuery(ctx)));


            Field <ListGraphType <ProductType> >("findByBrandId",
                                                 arguments: PaginationType.GetQueryArgumentsForPagination(new QueryArguments
            {
                new QueryArgument <IdGraphType> {
                    Name        = "Id",
                    Description = "Brand Id"
                }
            }),
                                                 resolve: ctx => repository.GetProductsByBrandId(ctx.GetArgument <Guid>("id"), Pagination.CreateInstanceFromQuery(ctx)));
        }
 public void GetItemTransactions()
 {
     Assert.IsNotNull(TestData.NewItem, "Failed because no item available -- requires successful AddItem test");
     GetItemTransactionsCall api = new GetItemTransactionsCall(this.apiContext);
     api.ItemID = TestData.NewItem.ItemID;
     // Time filter
     System.DateTime calTo = DateTime.Now;
     System.DateTime calFrom = calTo.AddHours(-1);
     TimeFilter tf = new TimeFilter(calFrom, calTo);
     api.ModTimeFrom = calFrom;
     api.ModTimeTo = calTo;
     // Pagination
     PaginationType pt = new PaginationType();
     pt.EntriesPerPage = 100; pt.EntriesPerPageSpecified = true;
     pt.PageNumber = 1; pt.PageNumberSpecified = true;
     api.Pagination = pt;
     TransactionTypeCollection trans = api.GetItemTransactions(api.ItemID, api.ModTimeFrom, api.ModTimeTo);
     // NO transaction should be returned.
     Assert.IsTrue(trans == null || trans.Count == 0);
 }
        public void GetSellerListFull()
        {
            Assert.IsNotNull(TestData.NewItem2, "Failed because no item available -- requires successful AddItem test");
            GetSellerListCall gsl = new GetSellerListCall(this.apiContext);
            DetailLevelCodeType[] detailLevels = new DetailLevelCodeType[] {
                                                                               DetailLevelCodeType.ReturnAll
                                                                           };

            //specify information
            gsl.AdminEndedItemsOnly=false;
            gsl.CategoryID=int.Parse(TestData.NewItem2.PrimaryCategory.CategoryID);
            gsl.StartTimeFrom=DateTime.Now.AddDays(-2);
            gsl.StartTimeTo=DateTime.Now.AddDays(1);
            //gsl.GranularityLevel=GranularityLevelCodeType.Fine;//if specify GranularityLevel, the DetailLevelList is ignored.
            gsl.IncludeWatchCount=true;
            gsl.DetailLevelList = new DetailLevelCodeTypeCollection(detailLevels);
            // Pagination
            PaginationType pt = new PaginationType();
            pt.EntriesPerPage = 100;
            pt.EntriesPerPageSpecified = true;
            pt.PageNumber = 1;
            pt.PageNumberSpecified = true;
            gsl.Pagination = pt;
            gsl.Sort=1;//descending sort
            //
            gsl.Execute();

            //check whether the call is success.
            Assert.IsTrue(gsl.AbstractResponse.Ack==AckCodeType.Success || gsl.AbstractResponse.Ack==AckCodeType.Warning,"do not success!");
            ItemTypeCollection items = gsl.ApiResponse.ItemArray;
            Assert.IsNotNull(items);
            Assert.IsTrue(items.Count > 0);

            ItemType foundItem = findItem(items, TestData.NewItem2.ItemID);
            Assert.IsNotNull(foundItem, "item not found");

            ItemType item=items[0];
            Assert.IsNotNull(item.HitCount);
            Assert.IsNotNull(gsl.ApiResponse.PaginationResult);
            Assert.IsNotNull(gsl.ApiResponse.Seller);
        }
        private void BtnGetUserDisputes_Click(object sender, System.EventArgs e)
        {
            try
            {
                LstDisputes.Items.Clear();

                GetUserDisputesCall apicall = new GetUserDisputesCall(Context);

                apicall.DisputeFilterType = (DisputeFilterTypeCodeType)Enum.Parse(typeof(DisputeFilterTypeCodeType), CboFilter.SelectedItem.ToString());
                apicall.DisputeSortType   = (DisputeSortTypeCodeType)Enum.Parse(typeof(DisputeSortTypeCodeType), CboSort.SelectedItem.ToString());

                PaginationType page = new PaginationType();
                page.PageNumber = 1;
                DisputeTypeCollection disputes = apicall.GetUserDisputes(page);

                foreach (DisputeType dsp in disputes)
                {
                    string[] listparams = new string[10];
                    listparams[0] = dsp.DisputeID;
                    listparams[1] = dsp.Item.ItemID;
                    listparams[2] = dsp.TransactionID;
                    listparams[3] = dsp.DisputeState.ToString();
                    listparams[4] = dsp.DisputeStatus.ToString();
                    listparams[5] = dsp.OtherPartyName;
                    listparams[6] = dsp.UserRole.ToString();
                    listparams[7] = dsp.DisputeReason.ToString();
                    listparams[8] = dsp.DisputeExplanation.ToString();
                    listparams[9] = dsp.DisputeModifiedTime.ToString();

                    ListViewItem vi = new ListViewItem(listparams);
                    this.LstDisputes.Items.Add(vi);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Example #35
0
        public void GetItemTransactions()
        {
            Assert.IsNotNull(TestData.NewItem, "Failed because no item available -- requires successful AddItem test");
            GetItemTransactionsCall api = new GetItemTransactionsCall(this.apiContext);

            api.ItemID = TestData.NewItem.ItemID;
            // Time filter
            System.DateTime calTo   = DateTime.Now;
            System.DateTime calFrom = calTo.AddHours(-1);
            TimeFilter      tf      = new TimeFilter(calFrom, calTo);

            api.ModTimeFrom = calFrom;
            api.ModTimeTo   = calTo;
            // Pagination
            PaginationType pt = new PaginationType();

            pt.EntriesPerPage = 100; pt.EntriesPerPageSpecified = true;
            pt.PageNumber     = 1; pt.PageNumberSpecified = true;
            api.Pagination    = pt;
            TransactionTypeCollection trans = api.GetItemTransactions(api.ItemID, api.ModTimeFrom, api.ModTimeTo);

            // NO transaction should be returned.
            Assert.IsTrue(trans == null || trans.Count == 0);
        }
Example #36
0
        static void Main(string[] args)
        {
            try
            {
                Console.WriteLine("WSE Client\n----------\n");

                ServiceProxy serviceProxy = new ServiceProxy("https://sandbox.earthport.com:11023/MerchantAPIUAT2", "EarthportPaymentTest", "Passw0rd");

                // create account

                Console.WriteLine("CreateUser ...");

                CreateUserType createUser = new CreateUserType();
                createUser.version = 3.0M;
                createUser.accountCurrency = "GBP";
                createUser.merchantUserIdentity = "Donald Duck " + Guid.NewGuid().ToString();
                //Payer Identity
                //Represents the payer identity of an individual or company.
                //You must specify one of either a payer individual  identity or payer company identity.
                createUser.payerIdentity = new PayerIdentityType();
                createUser.payerIdentity.payerIndividualIdentity = new PayerIndividualIdentityType();
                createUser.payerIdentity.payerIndividualIdentity.name = new IndividualNameType();
                createUser.payerIdentity.payerIndividualIdentity.name.givenNames = "Joe";
                createUser.payerIdentity.payerIndividualIdentity.name.familyName = "Doe";
                createUser.payerIdentity.payerIndividualIdentity.address = new AddressType();
                createUser.payerIdentity.payerIndividualIdentity.address.addressLine1 = "21 New Street";
                createUser.payerIdentity.payerIndividualIdentity.address.addressLine2 = "21 New Street 2";
                createUser.payerIdentity.payerIndividualIdentity.address.addressLine3 = "21 New Street 3";
                createUser.payerIdentity.payerIndividualIdentity.address.city = "London";
                createUser.payerIdentity.payerIndividualIdentity.address.postcode = "EC2M 4TP";
                createUser.payerIdentity.payerIndividualIdentity.address.province = "London";
                createUser.payerIdentity.payerIndividualIdentity.address.country = "GB";
                createUser.payerIdentity.payerIndividualIdentity.birthInformation = new BirthInformationType();
                createUser.payerIdentity.payerIndividualIdentity.birthInformation.cityOfBirth = "London";
                createUser.payerIdentity.payerIndividualIdentity.birthInformation.countryOfBirth = "GB";
                createUser.payerIdentity.payerIndividualIdentity.birthInformation.dateOfBirth = new DateTime(1985, 5, 20);
                CreateUserResponseType createUserResponse = serviceProxy.CreateUser(createUser);
                Console.WriteLine("\tUserID.epUserID={0}", createUserResponse.userID.epUserID);
                Console.WriteLine("\tUserID.merchantUserID={0}", createUserResponse.userID.merchantUserID);

                Console.WriteLine("Create Or Update User ...");

                CreateOrUpdateUserType createOrUpdateUser = new CreateOrUpdateUserType();
                createOrUpdateUser.version = 1.0M;
                createOrUpdateUser.accountCurrency = "GBP";
                createOrUpdateUser.merchantUserIdentity = "Donald Duck " + Guid.NewGuid().ToString();
                //Payer Identity
                //Represents the payer identity of an individual or company.
                //You must specify one of either a payer individual  identity or payer company identity.
                createOrUpdateUser.payerIdentity = new PayerIdentityType();
                createOrUpdateUser.payerIdentity.payerIndividualIdentity = new PayerIndividualIdentityType();
                createOrUpdateUser.payerIdentity.payerIndividualIdentity.name = new IndividualNameType();
                createOrUpdateUser.payerIdentity.payerIndividualIdentity.name.givenNames = "Joe";
                createOrUpdateUser.payerIdentity.payerIndividualIdentity.name.familyName = "Doe";
                createOrUpdateUser.payerIdentity.payerIndividualIdentity.address = new AddressType();
                createOrUpdateUser.payerIdentity.payerIndividualIdentity.address.addressLine1 = "21 New Street";
                createOrUpdateUser.payerIdentity.payerIndividualIdentity.address.addressLine2 = "21 New Street 2";
                createOrUpdateUser.payerIdentity.payerIndividualIdentity.address.addressLine3 = "21 New Street 3";
                createOrUpdateUser.payerIdentity.payerIndividualIdentity.address.city = "London";
                createOrUpdateUser.payerIdentity.payerIndividualIdentity.address.postcode = "EC2M 4TP";
                createOrUpdateUser.payerIdentity.payerIndividualIdentity.address.province = "London";
                createOrUpdateUser.payerIdentity.payerIndividualIdentity.address.country = "GB";
                createOrUpdateUser.payerIdentity.payerIndividualIdentity.birthInformation = new BirthInformationType();
                createOrUpdateUser.payerIdentity.payerIndividualIdentity.birthInformation.cityOfBirth = "London";
                createOrUpdateUser.payerIdentity.payerIndividualIdentity.birthInformation.countryOfBirth = "GB";
                createOrUpdateUser.payerIdentity.payerIndividualIdentity.birthInformation.dateOfBirth = new DateTime(1985, 5, 20);
                CreateOrUpdateUserResponseType createOrUpdateUserResponse = serviceProxy.CreateOrUpdateUser(createOrUpdateUser);
                Console.WriteLine("\tUserID.epUserID={0}", createOrUpdateUserResponse.userID.epUserID);
                Console.WriteLine("\tUserID.merchantUserID={0}", createOrUpdateUserResponse.userID.merchantUserID);
                // construct beneficiary bank account

                BankAccountDetailsType badt0 = new BankAccountDetailsType();
                badt0.key = "description";
                badt0.value = "Test";

                BankAccountDetailsType badt1 = new BankAccountDetailsType();
                badt1.key = "bankName";
                badt1.value = "Test";

                BankAccountDetailsType badt2 = new BankAccountDetailsType();
                badt2.key = "accountName";
                badt2.value = "Test";

                BankAccountDetailsType badt3 = new BankAccountDetailsType();
                badt3.key = "accountNumber";
                badt3.value = "03870448";

                BankAccountDetailsType badt4 = new BankAccountDetailsType();
                badt4.key = "sortCode";
                badt4.value = "536124";

                BankAccountDetailsType[] bankAccountDetailsSet = new BankAccountDetailsType[] { badt0, badt1, badt2, badt3, badt4 };

                BeneficiaryBankAccountType beneficiaryBankAccount = new BeneficiaryBankAccountType();
                beneficiaryBankAccount.countryCode = "GB";
                beneficiaryBankAccount.description = "UK Account - ABCD";
                beneficiaryBankAccount.bankAccountDetails = bankAccountDetailsSet;
                beneficiaryBankAccount.beneficiaryIdentity = new BeneficiaryIdentityType();
                beneficiaryBankAccount.beneficiaryIdentity.beneficiaryIndividualIdentity = new BeneficiaryIndividualIdentityType();
                beneficiaryBankAccount.beneficiaryIdentity.beneficiaryIndividualIdentity.name = new IndividualNameType();
                beneficiaryBankAccount.beneficiaryIdentity.beneficiaryIndividualIdentity.name.givenNames = "Akshay";
                beneficiaryBankAccount.beneficiaryIdentity.beneficiaryIndividualIdentity.name.familyName = "Luther";

                GetBeneficiaryBankAccountRequiredDataType getBeneficiaryAccountRequiredData = new GetBeneficiaryBankAccountRequiredDataType();
                getBeneficiaryAccountRequiredData.version = 3.0M;
                getBeneficiaryAccountRequiredData.serviceLevel = ServiceLevelType.standard;
                getBeneficiaryAccountRequiredData.countryCode = "GB";
                getBeneficiaryAccountRequiredData.currencyCode = "GBP";

                Console.WriteLine("GetBeneficiaryBankAccountRequiredData ...");
                GetBeneficiaryBankAccountRequiredDataResponseType beneficiaryAccountRequiredData = serviceProxy.GetBeneficiaryBankAccountRequiredData(getBeneficiaryAccountRequiredData);

                foreach (BeneficiaryBankAccountGroupType group in beneficiaryAccountRequiredData.beneficiaryBankAccountFieldGroupsList)
                {
                    if ("true".Equals(group.mandatory))
                    {
                        foreach (BeneficiaryBankAccountFieldType field in group.beneficiaryBankAccountFieldsList)
                        {
                            //Retrieve default value for current field parameter name from beneficiary bank account.
                            string defaultValue = null;
                            BankAccountDetailsType currentDetail = null;
                            foreach (BankAccountDetailsType detail in beneficiaryBankAccount.bankAccountDetails)
                            {
                                if (field.parameterName.Equals(detail.key))
                                {
                                    currentDetail = detail;
                                    defaultValue = detail.value;
                                }
                            }

                            Console.Write("\nPlease enter a value for {0}\n(hit <enter> to use default '{1}':\n>", field.parameterName, defaultValue);
                            string line = Console.ReadLine();

                            if (line == "")
                            {
                                Console.WriteLine("(using default)");
                            }
                            else
                            {
                                currentDetail.value = line;
                            }
                        }
                    }
                }

                // validate beneficiary account

                Console.WriteLine("ValidateBeneficiaryBankAccount ...");

                ValidateBeneficiaryBankAccountType validateBeneficiaryAccount = new ValidateBeneficiaryBankAccountType();
                validateBeneficiaryAccount.version = 3.0M;
                validateBeneficiaryAccount.beneficiaryBankAccount = beneficiaryBankAccount;

                serviceProxy.ValidateBeneficiaryBankAccount(validateBeneficiaryAccount);

                // create beneficiary account

                AddBeneficiaryBankAccountType addBeneficiaryBankAccount = new AddBeneficiaryBankAccountType();
                addBeneficiaryBankAccount.version = 3.0M;
                addBeneficiaryBankAccount.beneficiaryBankAccount = beneficiaryBankAccount;
                addBeneficiaryBankAccount.userID = createUserResponse.userID;
                addBeneficiaryBankAccount.merchantBankID = Guid.NewGuid().ToString();

                Console.WriteLine("AddBeneficiaryBankAccount ...");

                AddBeneficiaryBankAccountResponseType addBeneficiaryBankAccountResponse = serviceProxy.AddBeneficiaryBankAccount(addBeneficiaryBankAccount);

                Console.WriteLine("\tusersBankID.userID.epUserID={0}", addBeneficiaryBankAccountResponse.usersBankID.userID.epUserID);
                Console.WriteLine("\tusersBankID.userID.merchantUserID={0}", addBeneficiaryBankAccountResponse.usersBankID.userID.merchantUserID);
                Console.WriteLine("\tusersBankID.benBankID.epBankID={0}", addBeneficiaryBankAccountResponse.usersBankID.benBankID.epBankID);
                Console.WriteLine("\tusersBankID.benBankID.merchantBankID={0}", addBeneficiaryBankAccountResponse.usersBankID.benBankID.merchantBankID);

                // get beneficiary bank account

                Console.WriteLine("Get Beneficiary Bank Account ...");
                getBeneficiaryBankAccountType getBeneficiaryBankAccount = new getBeneficiaryBankAccountType();
                getBeneficiaryBankAccount.version = 3.0M;
                getBeneficiaryBankAccount.usersBankID = addBeneficiaryBankAccountResponse.usersBankID;

                getBeneficiaryBankAccountResponseType getBeneficiaryBankAccountResponse = serviceProxy.GetBeneficiaryBankAccount(getBeneficiaryBankAccount);

                Console.WriteLine("\tbeneficiaryIdentityID={0}", getBeneficiaryBankAccountResponse.beneficiaryIdentity);
                Console.WriteLine("\tdescription={0}", getBeneficiaryBankAccountResponse.description);
                Console.WriteLine("\tcurrencyCode={0}", getBeneficiaryBankAccountResponse.currencyCode);
                Console.WriteLine("\tcountryCode={0}", getBeneficiaryBankAccountResponse.countryCode);
                Console.WriteLine("\tUsersBankID.UserID.epUserID={0}", getBeneficiaryBankAccountResponse.usersBankID.userID.epUserID);
                Console.WriteLine("\tUsersBankID.UserID.merchantUserID={0}", getBeneficiaryBankAccountResponse.usersBankID.userID.merchantUserID);
                Console.WriteLine("\tUsersBankID.BenBankID.epBankID={0}", getBeneficiaryBankAccountResponse.usersBankID.benBankID.epBankID);
                Console.WriteLine("\tUsersBankID.BenBankID.merchantBankID={0}", getBeneficiaryBankAccountResponse.usersBankID.benBankID.merchantBankID);

                int groupIndex = 0;
                foreach (BeneficiaryBankAccountGroupType group in getBeneficiaryBankAccountResponse.beneficiaryBankAccountFieldGroupsList)
                {
                    Console.WriteLine("\tbeneficiaryBankAccountFieldGroupsList.beneficiaryBankAccountGroup[" + groupIndex + "].groupLabel={0}", group.groupLabel);
                    Console.WriteLine("\tbeneficiaryBankAccountFieldGroupsList.beneficiaryBankAccountGroup[" + groupIndex + "].mandatory={0}", group.mandatory);

                    int fieldIndex = 0;
                    foreach (BeneficiaryBankAccountFieldType field in group.beneficiaryBankAccountFieldsList)
                    {
                        Console.WriteLine("\tbeneficiaryBankAccountFieldGroupsList.beneficiaryBankAccountGroup[" + groupIndex + "].beneficiaryBankAccountField[" + fieldIndex + "].description={0}", field.description);
                        Console.WriteLine("\tbeneficiaryBankAccountFieldGroupsList.beneficiaryBankAccountGroup[" + groupIndex + "].beneficiaryBankAccountField[" + fieldIndex + "].displaySize={0}", field.displaySize);
                        Console.WriteLine("\tbeneficiaryBankAccountFieldGroupsList.beneficiaryBankAccountGroup[" + groupIndex + "].beneficiaryBankAccountField[" + fieldIndex + "].inputType={0}", field.inputType);

                        //Iterate through list items if field is of type "list".
                        if ("list".Equals(field.inputType))
                        {
                            int listIndex = 0;
                            foreach (BeneficiaryBankAccountListItemType listItem in field.listItems)
                            {
                                Console.WriteLine("\tbeneficiaryBankAccountFieldGroupsList.beneficiaryBankAccountGroup[" + groupIndex + "].beneficiaryBankAccountField[" + fieldIndex + "].beneficiaryBankAccountListItem[" + listIndex + "].label={0}", listItem.label);
                                Console.WriteLine("\tbeneficiaryBankAccountFieldGroupsList.beneficiaryBankAccountGroup[" + groupIndex + "].beneficiaryBankAccountField[" + fieldIndex + "].beneficiaryBankAccountListItem[" + listIndex + "].value={0}", listItem.value);
                                listIndex++;
                            }
                        }

                        Console.WriteLine("\tbeneficiaryBankAccountFieldGroupsList.beneficiaryBankAccountGroup[" + groupIndex + "].beneficiaryBankAccountField[" + fieldIndex + "].locale={0}", field.locale);
                        Console.WriteLine("\tbeneficiaryBankAccountFieldGroupsList.beneficiaryBankAccountGroup[" + groupIndex + "].beneficiaryBankAccountField[" + fieldIndex + "].maxSize={0}", field.maxSize);
                        Console.WriteLine("\tbeneficiaryBankAccountFieldGroupsList.beneficiaryBankAccountGroup[" + groupIndex + "].beneficiaryBankAccountField[" + fieldIndex + "].parameterName={0}", field.parameterName);
                        Console.WriteLine("\tbeneficiaryBankAccountFieldGroupsList.beneficiaryBankAccountGroup[" + groupIndex + "].beneficiaryBankAccountField[" + fieldIndex + "].separator={0}", field.separator);
                        Console.WriteLine("\tbeneficiaryBankAccountFieldGroupsList.beneficiaryBankAccountGroup[" + groupIndex + "].beneficiaryBankAccountField[" + fieldIndex + "].subTitle={0}", field.subTitle);
                        Console.WriteLine("\tbeneficiaryBankAccountFieldGroupsList.beneficiaryBankAccountGroup[" + groupIndex + "].beneficiaryBankAccountField[" + fieldIndex + "].tabOrder={0}", field.tabOrder);
                        Console.WriteLine("\tbeneficiaryBankAccountFieldGroupsList.beneficiaryBankAccountGroup[" + groupIndex + "].beneficiaryBankAccountField[" + fieldIndex + "].value={0}", field.value);
                        fieldIndex++;
                    }

                    groupIndex++;
                }

                //list beneficiary bank accounts
                ListBeneficiaryBankAccountsType listBeneficiaryBankAccounts = new ListBeneficiaryBankAccountsType();
                listBeneficiaryBankAccounts.version = 4.0M;
                PaginationType pagination = new PaginationType();
                pagination.offset = 0;
                pagination.pageSize = 10;
                listBeneficiaryBankAccounts.pagination = pagination;
                listBeneficiaryBankAccounts.userID = createUserResponse.userID;
                ListBeneficiaryBankAccountsResponseType listBeneficiaryBankAccountsResponse = serviceProxy.ListBeneficiaryBankAccounts(listBeneficiaryBankAccounts);

                foreach (BeneficiaryBankAccountSummaryType benBank in listBeneficiaryBankAccountsResponse.beneficiaryBankAccountSummary)
                {
                    Console.WriteLine("\n\tBeneficiaryBankAccount key={0}, description={1}", benBank.benBankID, benBank.description);
                }
                Console.WriteLine("\tuserID.epUserID={0}", listBeneficiaryBankAccountsResponse.userID.epUserID);
                Console.WriteLine("\tuserID.merchantUserID={0}", listBeneficiaryBankAccountsResponse.userID.merchantUserID);

                // get balance
                Console.WriteLine("GetBalance ...");

                GetBalanceType getBalanceRequest = new GetBalanceType();
                getBalanceRequest.version = 2.0M;
                getBalanceRequest.currency = "GBP";

                GetBalanceResponseType getBalanceResponse = serviceProxy.GetBalance(getBalanceRequest);

                Console.WriteLine("\tbalance[0].currency={0}", getBalanceResponse.balance[0].currency);
                Console.WriteLine("\tbalance[0].amount={0}", getBalanceResponse.balance[0].amount);
                Console.WriteLine("\tbalance[0].balanceTimestamp={0}", getBalanceResponse.balance[0].balanceTimestamp);

                Console.WriteLine("\tbalance[0].lastMovementTimestamp={0}", getBalanceResponse.balance[0].lastMovementTimestamp);

                // get fx quote

                Console.WriteLine("GetFXQuote ...");

                GetFXQuoteType getFXQuote = new GetFXQuoteType();
                getFXQuote.version = 3.0M;
                getFXQuote.usersBankID = addBeneficiaryBankAccountResponse.usersBankID;
                getFXQuote.buyCurrency = "GBP";
                getFXQuote.sellAmount = new MonetaryValueType();
                getFXQuote.sellAmount.currency = "AUD";
                getFXQuote.sellAmount.amount = 101;

                GetFXQuoteResponseType getFXQuoteResponse = serviceProxy.GetFXQuote(getFXQuote);
                Console.WriteLine("\tbuyAmount.currency={0}", getFXQuoteResponse.fxDetail.buyAmount.currency);
                Console.WriteLine("\tbuyAmount.amount={0}", getFXQuoteResponse.fxDetail.buyAmount.amount);
                Console.WriteLine("\tsellAmount.currency={0}", getFXQuoteResponse.fxDetail.sellAmount.currency);
                Console.WriteLine("\tsellAmount.amount={0}", getFXQuoteResponse.fxDetail.sellAmount.amount);
                Console.WriteLine("\tfxRate={0}", getFXQuoteResponse.fxDetail.fxRate);
                Console.WriteLine("\tfxTicketID={0}", getFXQuoteResponse.fxTicketID);

                // request payout

                Console.WriteLine("PayoutRequest ...");

                PayoutRequestType payoutRequest = new PayoutRequestType();
                payoutRequest.version = 4.0M;
                payoutRequest.usersBankID = addBeneficiaryBankAccountResponse.usersBankID;
                payoutRequest.beneficiaryStatementNarrative = "foo";
                payoutRequest.fxTicketID = getFXQuoteResponse.fxTicketID;
                payoutRequest.merchantTransactionReference = Guid.NewGuid().ToString();
                //The type of Payer making the payment authenticatedCaller - Payout is being requested on behalf of the requesting merchant
                //managedMerchant - Payout is being requested on behalf of a managed merchant user - Payout is being requested on behalf of a user
                payoutRequest.payerType = PayerType.user;
                payoutRequest.payerTypeSpecified = true;
                PayoutDetailsType payoutDetails0 = new PayoutDetailsType();
                payoutDetails0.key = "Payout 1";
                payoutDetails0.value = "Test 1";
                PayoutDetailsType payoutDetails1 = new PayoutDetailsType();
                payoutDetails1.key = "Payout 1";
                payoutDetails1.value = "Test 1";
                PayoutDetailsType[] payoutDetail = new PayoutDetailsType[] { payoutDetails0, payoutDetails1 };
                payoutRequest.payoutDetails = payoutDetail;

                payoutRequest.payoutRequestAmount = new MonetaryValueType();
                payoutRequest.payoutRequestAmount.currency = "AUD";
                // To Test Further /getFXQuoteResponse.fxDetail.fxRate.rate has been removed off
                payoutRequest.payoutRequestAmount.amount = getFXQuote.sellAmount.amount;
                //payoutRequest.payoutRequestAmount.amount = getFXQuote.sellAmount.amount / getFXQuoteResponse.fxDetail.fxRate.rate;
                payoutRequest.serviceLevel = ServiceLevelType.standard;
                PayoutRequestResponseType payoutRequestResponse = serviceProxy.PayoutRequest(payoutRequest);
                Console.WriteLine("\tpaymentID={0}", payoutRequestResponse.epTransactionID);
                Console.WriteLine("\tmerchantTransactionReference={0}", payoutRequestResponse.merchantTransactionReference);

            //                // validate credit
                  // Cannot create a credit via the API so cannot test
            //                Console.WriteLine("Validate Credit...");
            //
            //                ValidateCreditType validateCredit = new ValidateCreditType();
            //                validateCredit.version = 1.1M;
            //                validateCredit.paymentID = payoutRequestResponse.paymentID;
            //                validateCredit.transactionAmount = payoutRequest.payoutRequestAmount;
            //                validateCredit.userID = createUserResponse.userID;
            //
            //                ValidateCreditResponseType validateCreditResponse = serviceProxy.ValidateCredit(validateCredit);

                // Get Transaction Detail
                Console.WriteLine("Get Transaction Detail...");

                GetTransactionDetailType getTransactionDetail = new GetTransactionDetailType();
                getTransactionDetail.version = 3.0M;
                TransactionIDType transactionId = new TransactionIDType();
               //Commented By BNK

                transactionId.epTransactionID =  payoutRequestResponse.epTransactionID;
                transactionId.epTransactionIDSpecified = true;
                TransactionIDType[] listOfIds = new TransactionIDType[1];
                listOfIds[0] = transactionId;
                getTransactionDetail.transactionID = listOfIds;
                GetTransactionDetailResponseType getTransactionDetailResponse = serviceProxy.GetTransactionDetail(getTransactionDetail);

                TransactionDetailMappingType[] mappings = getTransactionDetailResponse.transactionDetailMappings;
                FinancialTransactionType ftDetail = mappings[0].transactionDetail;

                Console.WriteLine("\tTransactionDetail.transactionType={0}", ftDetail.transactionType );
                Console.WriteLine("\tTransactionDetail.currency={0}", ftDetail.amount.currency);
                Console.WriteLine("\tTransactionDetail.amount={0}", ftDetail.amount.amount);
                Console.WriteLine("\tTransactionDetail.transactionID={0}", ftDetail.epTransactionID);

                // Get Statement
                Console.WriteLine("Get Statement...");
                GetStatementType getStatementRequest = new GetStatementType();
                getStatementRequest.version = 3.0M;
                getStatementRequest.startDateTime = ftDetail.timestamp;
                getStatementRequest.endDateTime = ftDetail.timestamp;
                getStatementRequest.currency = "AUD";
                GetStatementResponseType statementResponse = serviceProxy.GetStatement(getStatementRequest);
                Console.WriteLine("\tStatement opening balance={0}{1}", statementResponse.openingBalance.currency, statementResponse.openingBalance.amount);
                Console.WriteLine("\tStatement closing balance={0}{1}", statementResponse.closingBalance.currency, statementResponse.closingBalance.amount);
                Console.WriteLine("\tStatement number of transactions={0}", statementResponse.statementLineItemsList.Length);
                Console.WriteLine("\tFirst transaction id={0}", statementResponse.statementLineItemsList[0].transaction.epTransactionID);
                Console.WriteLine("\tFirst transaction currency={0}", statementResponse.statementLineItemsList[0].transaction.amount.currency);
                Console.WriteLine("\tFirst transaction amount={0}", statementResponse.statementLineItemsList[0].transaction.amount.amount);

                // Search Transactions
                SearchTransactionsType searchTransactionRequest = new SearchTransactionsType();
                searchTransactionRequest.version = 3.0M;
                SearchSortFieldsType[] sortFields = new SearchSortFieldsType[1];
                sortFields[0] = new SearchSortFieldsType();
                sortFields[0].sortField = SearchSortValueType.Timestamp;
                SearchTransactionsCriteriaType searchCriteria = new SearchTransactionsCriteriaType();
                searchTransactionRequest.searchTransactionsCriteria = searchCriteria;
                searchCriteria.epTransactionID = ftDetail.epTransactionID;
                searchCriteria.epTransactionIDSpecified = true;

                searchCriteria.periodStartDateTime = ftDetail.timestamp; // will default to beginning of time.
                searchCriteria.periodEndDateTime = DateTime.Now;

                searchCriteria.sortCriteria = new SortCriteriaType();
                searchCriteria.sortCriteria.sortOrder = SortOrderType.ASC;
                searchCriteria.sortCriteria.sortFields = sortFields;

                searchTransactionRequest.pagination = new PaginationType();
                searchTransactionRequest.pagination.offset = 0;
                searchTransactionRequest.pagination.pageSize = 1;

                SearchTransactionsResponseType searchTransactionResponse = serviceProxy.SearchTransactions(searchTransactionRequest);

                Console.WriteLine("\tFound {0} transactions matching transaction id", searchTransactionResponse.financialTransactions.Length);
                Console.WriteLine("\tTransaction details: {0}{1}", searchTransactionResponse.financialTransactions[0].amount.currency, searchTransactionResponse.financialTransactions[0].amount.amount);

                //delete beneficiary bank account
                Console.WriteLine("DeleteBeneficiaryBankAccount ...");
                DeleteBeneficiaryBankAccountType deleteBeneficiaryBankAccount = new DeleteBeneficiaryBankAccountType();
                deleteBeneficiaryBankAccount.version = 3.0M;
                deleteBeneficiaryBankAccount.usersBankID = addBeneficiaryBankAccountResponse.usersBankID;

                DeleteBeneficiaryBankAccountResponseType deleteBeneficiaryBankAccountResponse = serviceProxy.DeleteBeneficiaryBankAccount(deleteBeneficiaryBankAccount);

                Console.WriteLine("\tisDeleted={0}", deleteBeneficiaryBankAccountResponse.isDeleted);
                Console.WriteLine("\tusersBankID.userID.epUserID={0}", deleteBeneficiaryBankAccountResponse.usersBankID.userID.epUserID);
                Console.WriteLine("\tusersBankID.userID.merchantUserID={0}", deleteBeneficiaryBankAccountResponse.usersBankID.userID.merchantUserID);
                Console.WriteLine("\tusersBankID.benBankID.epBankID={0}", deleteBeneficiaryBankAccountResponse.usersBankID.benBankID.epBankID);
                Console.WriteLine("\tusersBankID.benBankID.merchantBankID={0}", deleteBeneficiaryBankAccountResponse.usersBankID.benBankID.merchantBankID);

                //Disable User
                Console.WriteLine("DisableUser ...");

                DisableUserType disableUserRequest = new DisableUserType();
                disableUserRequest.version = 2.0M;
                disableUserRequest.userID = createUserResponse.userID;

                serviceProxy.DisableUser(disableUserRequest);
            }
            catch (XmlSchemaValidationException validationException)
            {
                Console.WriteLine("\nThe service request is not valid:\n{0}", validationException.Message);
            }
            catch (ServiceErrorException serviceException)
            {
                ErrorResponseType errorResponse = serviceException.ServiceErrorResponse;

                Console.WriteLine(
                    "\nThe service returned with an error:\n\tfailureType={0}\n\tcode={1}\n\tuniqueErrorID={2}\n\tshortMsg={3}\n\tlongMsg={4}\n\ttimeOfFailure={5}",
                    errorResponse.failureType,
                    errorResponse.code,
                    errorResponse.uniqueErrorID,
                    errorResponse.shortMsg,
                    errorResponse.longMsg,
                    errorResponse.timeOfFailure
                    );

                if (errorResponse.failures != null)
                {
                    foreach (FailureItemType failureItem in errorResponse.failures)
                    {
                        Console.WriteLine("\n\tfailureitem key={0}, value={1}", failureItem.key, failureItem.value);
                    }
                }
            }
            catch (SoapException soapException)
            {
                Console.WriteLine("\nThe service responded with a SOAP Fault:\n{0}", soapException);
            }
            catch (WebException webException)
            {
                Console.WriteLine("\nA web exception occurred:\n{0}", webException);
            }
            //catch (Exception exception)
            //{
            //    Console.WriteLine("\nAn unexpected exception occurred:\n{0}", exception);
            //}

            Console.WriteLine("\nPress <enter> to continue ...");
            Console.ReadLine();
        }
Example #37
0
        /// <summary>
        /// Retrieves information about the messages sent to a given user.
        /// </summary>
        ///
        /// <param name="AlertIDList">
        /// This container is deprecated.
        /// </param>
        ///
        /// <param name="MessageIDList">
        /// This container can be used to retrieve one or more specific messages identified with their unique <b>MessageID</b> values. Up to  10 <b>MessageID</b> values can be specified with one call.
        /// </param>
        ///
        /// <param name="FolderID">
        /// A unique identifier for a My Messages folder. If a <b>FolderID</b> value is provided,
        /// only messages from the specified folder are returned in the response.
        /// </param>
        ///
        /// <param name="StartTime">
        /// The beginning of the date-range filter.
        /// Filtering takes into account the entire timestamp of when messages were sent.
        /// Messages expire after one year.
        /// </param>
        ///
        /// <param name="EndTime">
        /// The end of the date-range filter. See StartTime
        /// (which is the beginning of the date-range filter).
        /// </param>
        ///
        /// <param name="ExternalMessageIDList">
        /// This field is currently available on the US site. A container for IDs that
        /// uniquely identify messages for a given user. If provided at the time of message
        /// creation, this ID can be used to retrieve messages and will take precedence
        /// over message ID.
        /// </param>
        ///
        /// <param name="Pagination">
        /// Specifies how to create virtual pages in the returned list (such as total
        /// number of entries and total number of pages to return).
        /// Default value for <b>EntriesPerPage</b> with <b>GetMyMessages</b> is 25.
        /// </param>
        ///
        /// <param name="IncludeHighPriorityMessageOnly">
        /// If this field is included in the request and set to <code>true</code>, only High Priority messages are returned in the response.
        /// </param>
        ///
        public MyMessagesSummaryType GetMyMessages(StringCollection AlertIDList, StringCollection MessageIDList, long FolderID, DateTime StartTime, DateTime EndTime, StringCollection ExternalMessageIDList, PaginationType Pagination, bool IncludeHighPriorityMessageOnly)
        {
            this.AlertIDList                    = AlertIDList;
            this.MessageIDList                  = MessageIDList;
            this.FolderID                       = FolderID;
            this.StartTime                      = StartTime;
            this.EndTime                        = EndTime;
            this.ExternalMessageIDList          = ExternalMessageIDList;
            this.Pagination                     = Pagination;
            this.IncludeHighPriorityMessageOnly = IncludeHighPriorityMessageOnly;

            Execute();
            return(ApiResponse.Summary);
        }
Example #38
0
        /// <summary>
        /// Get the page links
        /// </summary>
        /// <param name="pageType">Pagination type</param>
        /// <returns>Page link string</returns>
        public string GetPageLinks(PaginationType pageType)
        {
            // If anything invalid
            if (!this.IsValidSettings())
            {
                return("");
            }

            // Add a trailing slash to the base URL if needed
            if (!this.BaseUrl.Trim().EndsWith("/"))
            {
                this.BaseUrl = this.BaseUrl + "/";
            }

            // And here we go...
            StringBuilder pageLink = new StringBuilder();

            switch (pageType)
            {
            case PaginationType.Default:
                this.BuildDefaultLink(pageLink);
                break;

            case PaginationType.DefaultWithItemRight:
                this.BuildDefaultLink(pageLink);
                this.BuildItemLink(pageLink);
                break;

            case PaginationType.DefaultWithItemLeft:
                this.BuildItemLink(pageLink);
                this.BuildDefaultLink(pageLink);
                break;

            case PaginationType.PreviousNext:
                this.BuildPreviousNextLink(pageLink);
                break;

            case PaginationType.PreviousNextItemRight:
                this.BuildPreviousNextLink(pageLink);
                this.BuildItemLink(pageLink);
                break;

            case PaginationType.PreviousNextItemLeft:
                this.BuildItemLink(pageLink);
                this.BuildPreviousNextLink(pageLink);
                break;

            case PaginationType.PreviousNextItemCenter:
                this.BuildPreviousLink(pageLink, false);
                this.BuildItemLink(pageLink);
                this.BuildNextLink(pageLink, false);
                break;

            case PaginationType.FirstPreviousNextLast:
                this.BuildFirstPreviousNextLastLink(pageLink);
                break;

            case PaginationType.FirstPreviousNextLastItemRight:
                this.BuildFirstPreviousNextLastLink(pageLink);
                this.BuildItemLink(pageLink);
                break;

            case PaginationType.FirstPreviousNextLastItemLeft:
                this.BuildItemLink(pageLink);
                this.BuildFirstPreviousNextLastLink(pageLink);
                break;

            case PaginationType.FirstPreviousNextLastItemCenter:
                this.BuildFirstLink(pageLink, false);
                this.BuildPreviousLink(pageLink, false);
                this.BuildItemLink(pageLink);
                this.BuildNextLink(pageLink, false);
                this.BuildLastLink(pageLink, false);
                break;

            case PaginationType.Number:
                this.BuildDigitLink(pageLink);
                break;

            case PaginationType.NumberWithItemRight:
                this.BuildDigitLink(pageLink);
                this.BuildItemLink(pageLink);
                break;

            case PaginationType.NumberWithItemLeft:
                this.BuildItemLink(pageLink);
                this.BuildDigitLink(pageLink);
                break;

            default:
                this.GetPageLinks(PaginationType.Default);
                break;
            }

            pageLink.Insert(0, this.FullTagOpen);
            pageLink.Append(this.FullTagClose);

            return(pageLink.ToString());
        }
        /// <summary>
        /// Retrieves order line item information for a specified <b>ItemID</b>. &
        /// nbsp;<b>Also for Half.com</b>. The call returns zero, one, or
        /// multiple order line items, depending on the number of items sold from the listing.
        ///
        /// You can retrieve order line item data for a specific time range or
        /// number of days. If you don't specify a range or number of days, order line item
        /// data will be returned for the past 30 days.
        /// </summary>
        ///
        /// <param name="ItemID">
        /// Unique identifier for an eBay item listing. A listing can have multiple
        /// order line items (transactions), but only one <b>ItemID</b>. When you use
        /// <b>ItemID</b> alone, eBay returns all order line items that are associated with
        /// the <b>ItemID</b> (listing). If you pair <b>ItemID</b> with a specific <b>TransactionID</b>,
        /// data on a specific order line item is returned. If <b>OrderLineItemID</b> is
        /// specified in the request, any <b>ItemID</b>/<b>TransactionID</b> pair specified in the
        /// same request will be ignored.
        ///
        ///
        /// <span class="tablenote"><b>Note:</b>
        /// <b>GetItemTransactions</b> doesn't support SKU as an input because this
        /// call requires an identifier that is unique across your active
        /// and ended listings. Even when <b>InventoryTrackingMethod</b> is set to
        /// <b>SKU</b> in a listing, the SKU is only unique across your active
        /// listings (not your ended listings). To retrieve order line items
        /// by SKU, use <b>GetSellerTransactions</b> or <b>GetOrderTransactions</b> instead.
        /// </span>
        /// </param>
        ///
        /// <param name="ModTimeFrom">
        /// The <b>ModTimeFrom</b> and <b>ModTimeTo</b> fields specify a date range for retrieving
        /// order line items associated with the specified <b>ItemID</b>. The <b>ModTimeFrom</b>
        /// field is the starting date range. All eBay order line items that were
        /// last modified within this date range are returned in the output. The
        /// maximum date range that may be specified is 30 days. This field is not
        /// applicable if a specific <b>TransactionID</b> or <b>OrderLineItemID</b> is included in
        /// the request or if the <b>NumberOfDays</b> date filter is used.
        ///
        /// If you don't specify a <b>ModTimeFrom</b>/<b>ModTimeTo</b> filter, the <b>NumberOfDays</b>
        /// time filter is used and it defaults to 30 (days).
        /// </param>
        ///
        /// <param name="ModTimeTo">
        /// The <b>ModTimeFrom</b> and <b>ModTimeTo</b> fields specify a date range for retrieving
        /// order line items associated with the specified <b>ItemID</b>. The <b>ModTimeTo</b>
        /// field is the ending date range. All eBay order line items that were last
        /// modified within this date range are returned in the output. The maximum
        /// date range that may be specified is 30 days. If the <b>ModTimeFrom</b> field is
        /// used and the <b>ModTimeTo</b> field is omitted, the <b>ModTimeTo</b> value defaults to
        /// the present time or to 30 days past the <b>ModTimeFrom</b> value (if
        /// <b>ModTimeFrom</b> value is more than 30 days in the past). This field is not
        /// applicable if a specific <b>TransactionID</b> or <b>OrderLineItemID</b> is included in
        /// the request or if the <b>NumberOfDays</b> date filter is used.
        ///
        /// If you don't specify a <b>ModTimeFrom</b>/<b>ModTimeTo</b> filter, the <b>NumberOfDays</b>
        /// time filter is used and it defaults to 30 (days).
        /// </param>
        ///
        /// <param name="TransactionID">
        /// Include a <b>TransactionID</b> field in the request if you want to retrieve the
        /// data for a specific order line item (transaction). If a <b>TransactionID</b> is
        /// provided, any specified time filter is ignored.
        /// </param>
        ///
        /// <param name="Pagination">
        /// Child elements control pagination of the output. Use the <b>EntriesPerPage</b>
        /// property to control the number of order line items to
        /// return per call and the <b>PageNumber</b> property to specify the specific page
        /// of data to return. If multiple pages of order line items are returned
        /// based on input criteria and Pagination properties, <b>GetItemTransactions</b>
        /// will need to be called multiple times (with the <b>PageNumber</b> value being
        /// increased by 1 each time) to scroll through all results.
        /// </param>
        ///
        /// <param name="IncludeFinalValueFee">
        /// Indicates whether to include the Final Value Fee (FVF) for all order
        /// line items in the response. The Final Value Fee is
        /// returned in the <b>Transaction.FinalValueFee</b> field. The Final Value Fee is
        /// assessed right after the creation of an order line item.
        /// </param>
        ///
        /// <param name="IncludeContainingOrder">
        /// Include this field and set it to True if you want the <b>ContainingOrder</b>
        /// container to be returned in the response under each <b>Transaction</b> node.
        /// For single line item orders, the <b>ContainingOrder.OrderID</b> value takes the
        /// value of the <b>OrderLineItemID</b> value for the order line item. For
        /// <a href="http://developer.ebay.com/DevZone/guides/ebayfeatures/Development/Listing-AnItem.html#CombinedInvoice">Combined Invoice</a> orders,
        /// the <b>ContainingOrder.OrderID</b> value will be shared by at
        /// least two order line items (transactions) that are part of the same order.
        /// </param>
        ///
        /// <param name="Platform">
        /// The default behavior of <b>GetItemTransactions</b> is to retrieve all order line items originating from eBay.com and Half.com. If the user wants to retrieve only eBay.com order line items or Half.com order line items, this filter can be used to perform that function. Inserting 'eBay' into this field will restrict retrieved order line items to those originating on eBay.com, and inserting 'Half' into this field will restrict retrieved order line items to those originating on Half.com.
        /// </param>
        ///
        /// <param name="NumberOfDays">
        /// This time filter specifies the number of days (24-hour periods) in the
        /// past to search for order line items. All eBay order line items that were
        /// either created or modified within this period are returned in the
        /// response. If specified, <b>NumberOfDays</b> will override any date range
        /// specified with the <b>ModTimeFrom</b>/<b>ModTimeTo</b> time filters. This field is not
        /// applicable if a specific <b>TransactionID</b> or <b>OrderLineItemID</b> is included in
        /// the request.
        /// </param>
        ///
        /// <param name="IncludeVariations">
        /// If included in the request and set to True, all variations defined for
        /// the item are returned at the root level, including variations
        /// that have no sales. If not included in the request or set to false, the
        /// variations with sales are still returned in separate <b>Transaction</b> nodes. This information is intended to help sellers to reconcile their
        /// local inventory with eBay's records, while processing order line items
        /// (without requiring a separate call to <b>GetItem</b>).
        /// </param>
        ///
        /// <param name="OrderLineItemID">
        /// A unique identifier for an eBay order line item. This field is created
        /// as soon as there is a commitment to buy from the seller, and its value
        /// is based upon the concatenation of <b>ItemID</b> and <b>TransactionID</b>, with a
        /// hyphen in between these two IDs. If you want to retrieve data on a
        /// specific order line item, you can use an <b>OrderLineItemID</b> value in the
        /// request instead of the <b>ItemID</b>/<b>TransactionID</b> pair. If an <b>OrderLineItemID</b> is
        /// provided, any specified time filter is ignored.
        /// </param>
        ///
        public TransactionTypeCollection GetItemTransactions(string ItemID, DateTime ModTimeFrom, DateTime ModTimeTo, string TransactionID, PaginationType Pagination, bool IncludeFinalValueFee, bool IncludeContainingOrder, TransactionPlatformCodeType Platform, int NumberOfDays, bool IncludeVariations, string OrderLineItemID)
        {
            this.ItemID                 = ItemID;
            this.ModTimeFrom            = ModTimeFrom;
            this.ModTimeTo              = ModTimeTo;
            this.TransactionID          = TransactionID;
            this.Pagination             = Pagination;
            this.IncludeFinalValueFee   = IncludeFinalValueFee;
            this.IncludeContainingOrder = IncludeContainingOrder;
            this.Platform               = Platform;
            this.NumberOfDays           = NumberOfDays;
            this.IncludeVariations      = IncludeVariations;
            this.OrderLineItemID        = OrderLineItemID;

            Execute();
            return(ApiResponse.TransactionArray);
        }
Example #40
0
        /// <summary>
        /// Retrieves a list of the items posted by the authenticated user, including
        /// the related item data.
        /// </summary>
        ///
        /// <param name="UserID">
        /// <br/><br/>
        /// <span class="tablenote"><strong>Note:</strong>
        /// This field should no longer be used, and will be ignored if it is included in a <b>GetSellerList</b> request. There are plans to remove this field from the public WSDL. The only eBay user ID that can be used is the one associated with the authentication token.
        /// </span>
        /// </param>
        ///
        /// <param name="MotorsDealerUserList">
        /// Specifies the list of Motors Dealer sellers for which a special set of
        /// metrics can be requested. Applies to eBay Motors Pro applications only.
        /// </param>
        ///
        /// <param name="EndTimeFrom">
        /// Specifies the earliest (oldest) date to use in a date range filter based on
        /// item end time. Specify either an end-time range or a start-time range
        /// filter in every call request. Each of the time ranges must be a value less than
        /// 120 days.
        /// </param>
        ///
        /// <param name="EndTimeTo">
        /// Specifies the latest (most recent) date to use in a date range filter based on item end time. Must be specified if <b>EndTimeFrom</b> is specified.
        /// </param>
        ///
        /// <param name="Sort">
        /// Specifies the order in which returned items are sorted (based on the end
        /// dates of the item listings). Valid values:
        ///
        /// 0 = No sorting
        /// 1 = Sort in descending order
        /// 2 = Sort in ascending order
        /// </param>
        ///
        /// <param name="StartTimeFrom">
        /// Specifies the earliest (oldest) date to use in a date range filter based on
        /// item start time. Each of the time ranges must be a value less than
        /// 120 days. In all calls, at least one date-range filter must be specified
        /// (i.e., you must specify either the end time range or start time range
        /// in every request).
        /// </param>
        ///
        /// <param name="StartTimeTo">
        /// Specifies the latest (most recent) date to use in a date range filter based on item start time. Must be specified if <b>StartTimeFrom</b> is specified.
        /// </param>
        ///
        /// <param name="Pagination">
        /// Contains the data controlling the pagination of the returned values. If you set a <b>DetailLevel</b> in this call, you must set pagination values. The <b>Pagination</b> field contains the number of items to be returned per page of data (per call), and the page number to return with the current call.
        /// </param>
        ///
        /// <param name="GranularityLevel">
        /// Specifies the subset of item and user fields to return. See <b>GetSellerList</b> for a list of the fields that are returned for each granularity level. For <b>GetSellerLis</b>t, use <b>DetailLevel</b> or <b>GranularityLevel</b> in a request, but not both. For <b>GetSellerList</b>, if <b>GranularityLevel</b> is specified, <b>DetailLevel</b> is ignored.
        /// </param>
        ///
        /// <param name="SKUArrayList">
        /// Container for a set of SKUs.
        /// Filters (reduces) the response to only include active listings
        /// that the seller listed with any of the specified SKUs.
        /// If multiple listings include the same SKU, they are
        /// all returned (assuming they also match the other criteria
        /// in the GetSellerList request).
        ///
        /// SKUArray can be used to retrieve items listed by the user
        /// identified in AuthToken or in UserID.
        ///
        /// <span class="tablenote"><b>Note:</b>
        /// Listings with matching SKUs are returned regardless of their
        /// Item.InventoryTrackingMethod settings.
        /// </span>
        /// </param>
        ///
        /// <param name="IncludeWatchCount">
        /// Specifies whether to include <b>WatchCount</b> in Item nodes returned. <b>WatchCount</b> is only returned with <b>DetailLevel ReturnAll</b>.
        /// </param>
        ///
        /// <param name="AdminEndedItemsOnly">
        /// Specifies whether to return only items that were administratively ended
        /// based on a policy violation.
        /// </param>
        ///
        /// <param name="CategoryID">
        /// The category ID for the items retrieved. If you specify <b>CategoryID</b> in a <b>GetSellerList</b> call, the response contains only items in the category you specify.
        /// </param>
        ///
        /// <param name="IncludeVariations">
        /// If true, the <b>Variations</b> node is returned for all multi-variation listings in the response.  <b>Note:</b> If the seller includes a large number of variations in many listings, using this flag may degrade the call's performance. Therefore, when you use this flag, you may need to reduce the total number of items you're requesting at once. <br/><br/> For example, you may need to use shorter time ranges in the <b>EndTime</b> or <b>StartTime</b> filters, fewer entries per page in <b>Pagination</b>, and/or <b>SKUArray</b>.
        /// </param>
        ///
        public ItemTypeCollection GetSellerList(string UserID, UserIDArrayType MotorsDealerUserList, DateTime EndTimeFrom, DateTime EndTimeTo, int Sort, DateTime StartTimeFrom, DateTime StartTimeTo, PaginationType Pagination, GranularityLevelCodeType GranularityLevel, StringCollection SKUArrayList, bool IncludeWatchCount, bool AdminEndedItemsOnly, int CategoryID, bool IncludeVariations)
        {
            this.UserID = UserID;
            this.MotorsDealerUserList = MotorsDealerUserList;
            this.EndTimeFrom          = EndTimeFrom;
            this.EndTimeTo            = EndTimeTo;
            this.Sort                = Sort;
            this.StartTimeFrom       = StartTimeFrom;
            this.StartTimeTo         = StartTimeTo;
            this.Pagination          = Pagination;
            this.GranularityLevel    = GranularityLevel;
            this.SKUArrayList        = SKUArrayList;
            this.IncludeWatchCount   = IncludeWatchCount;
            this.AdminEndedItemsOnly = AdminEndedItemsOnly;
            this.CategoryID          = CategoryID;
            this.IncludeVariations   = IncludeVariations;

            Execute();
            return(ApiResponse.ItemArray);
        }
        /// <summary>
        /// Retrieves a list of active Want It Now posts that match specified keywords
        /// and/or a specific category ID. The response contains the following data:
        /// CategoryID, PostID, StartTime, ResponseCount, Site, and Title. To get the post
        /// description (Description), you must use GetWantItNowPost to retrieve individual
        /// posts.
        /// </summary>
        /// 
        /// <param name="CategoryID">
        /// Limits the result set to just those Want It Now posts listed in the
        /// specified category. Defaults to all categories if no category ID is
        /// specified. If the specified category ID does not match an existing
        /// category for the site, an invalid-category error message is returned.
        /// Controls the set of listings to return (not the details to return for each
        /// listing).
        /// You must specify a Query and/or a CategoryID in the request.
        /// </param>
        ///
        /// <param name="Query">
        /// Specifies a search string. The search string consists of one or more
        /// keywords to search for in the listing title. Note that the post
        /// description will also be searched if SearchInDescription is enabled.
        /// By default, requests return a list of Want It Now posts that include all
        /// of the keywords specified in the Query. All words used in the query,
        /// including "and," "or," and "the,"  will be treated as keywords. You can,
        /// however, use modifiers and wildcards (e.g., +, -, and *) in the Query
        /// field to create more complex searches. Be careful when using spaces before
        /// or after modifiers and wildcards (+, -, or *), as the spaces can affect
        /// the query logic.
        /// See the eBay Web Services Guide for a list of valid search keyword query
        /// operators and examples.
        /// </param>
        ///
        /// <param name="SearchInDescription">
        /// If true, include the description field of Want It Now posts in the keyword search. Want
        /// It Now posts returned are those where specified search keywords appear in
        /// either the description or the title. This is the default behavior if SearchInDescription
        /// is not specified. If false, only the title will be searched. SearchInDescription is an
        /// optional input.
        /// </param>
        ///
        /// <param name="SearchWorldwide">
        /// If true, the search applies to all eBay sites. If false, the search is
        /// limited to the site specified in the URL query string when the call is
        /// made.
        /// </param>
        ///
        /// <param name="Pagination">
        /// Controls the pagination of the result set. Child elements specify the
        /// maximum number of item listings to return per call and which page of data
        /// to return.
        /// </param>
        ///
        public WantItNowPostTypeCollection GetWantItNowSearchResults(string CategoryID, string Query, bool SearchInDescription, bool SearchWorldwide, PaginationType Pagination)
        {
            this.CategoryID = CategoryID;
            this.Query = Query;
            this.SearchInDescription = SearchInDescription;
            this.SearchWorldwide = SearchWorldwide;
            this.Pagination = Pagination;

            Execute();
            return ApiResponse.WantItNowPostArray;
        }
 /// <summary>
 /// For backward compatibility with old wrappers.
 /// </summary>
 public PaginatedTransactionArrayType GetItemsAwaitingFeedback(PaginationType Pagination)
 {
     this.Pagination = Pagination;
     Execute();
     return(ItemsAwaitingFeedback);
 }
 /// <summary>
 /// For backward compatibility with old wrappers.
 /// </summary>
 public DisputeTypeCollection GetUserDisputes(PaginationType Pagination)
 {
     this.Pagination = Pagination;
     Execute();
     return(DisputeList);
 }
    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;
        }
    }
Example #45
0
        /// <summary>
        /// Retrieves a paginated list containing details of a user's Selling Manager Inventory. This call is subject to change without notice; the deprecation process is inapplicable to this call. The user must have a Selling Manager Pro subscription to use this call.
        /// </summary>
        ///
        /// <param name="Sort">
        /// This field is used if the seller would like to sort Selling Manager Inventory results based on a specific aspect such as Product Name, Average Price, etc. See <b>SellingManagerProductSortCodeType</b> to read more about the available sorting options.
        /// </param>
        ///
        /// <param name="FolderID">
        /// This field is included if the seller wants to view Selling Manager Inventory from a specific folder.
        /// </param>
        ///
        /// <param name="Pagination">
        /// This container is used if the seller would like to control how many products are returned per page and which page to view.
        /// </param>
        ///
        /// <param name="SortOrder">
        /// This field allows the seller to sort in ascending or descending order (based on the selected aspect in the <b>Sort</b> field).
        /// </param>
        ///
        /// <param name="Search">
        /// This container is used if the seller would like to search for Selling Manager Inventory based on certain identifiers like Item ID, listing title, buyer user ID, etc. The seller will specify one of the supported search types in <b>SellingManagerSearchTypeCodeType</b>, and then provides the value for that search type.
        /// </param>
        ///
        /// <param name="StoreCategoryID">
        /// This field is used if the seller would like to retrieve all Selling Manager Inventory listed in a specific eBay Store Category.
        /// </param>
        ///
        /// <param name="FilterList">
        /// One or more <b>Filter</b> fields can be used to retrieve Selling Manager Inventory that is in a certain state, such as active listings, inactive listings, or listings that are low in stock.
        /// </param>
        ///
        public DateTime?GetSellingManagerInventory(SellingManagerProductSortCodeType?Sort, long?FolderID, PaginationType Pagination, SortOrderCodeType?SortOrder, SellingManagerSearchType Search, long?StoreCategoryID, List <SellingManagerInventoryPropertyTypeCodeType> FilterList)
        {
            this.Sort            = Sort;
            this.FolderID        = FolderID;
            this.Pagination      = Pagination;
            this.SortOrder       = SortOrder;
            this.Search          = Search;
            this.StoreCategoryID = StoreCategoryID;
            this.FilterList      = FilterList;

            Execute();
            return(ApiResponse.InventoryCountLastCalculatedDate);
        }
		private void BtnGetUserDisputes_Click(object sender, System.EventArgs e)
		{
			try
			{
				LstDisputes.Items.Clear();
	
				GetUserDisputesCall apicall = new GetUserDisputesCall(Context);

				apicall.DisputeFilterType = (DisputeFilterTypeCodeType) Enum.Parse(typeof(DisputeFilterTypeCodeType), CboFilter.SelectedItem.ToString());
				apicall.DisputeSortType = (DisputeSortTypeCodeType) Enum.Parse(typeof(DisputeSortTypeCodeType), CboSort.SelectedItem.ToString());

				PaginationType page = new PaginationType();
				page.PageNumber = 1;
				DisputeTypeCollection disputes = apicall.GetUserDisputes(page);
				
				foreach (DisputeType dsp in disputes)
				{
					string[] listparams = new string[10];
					listparams[0] = dsp.DisputeID;
					listparams[1] = dsp.Item.ItemID;
					listparams[2] =  dsp.TransactionID;
					listparams[3] =  dsp.DisputeState.ToString();
					listparams[4] =  dsp.DisputeStatus.ToString();
					listparams[5] =  dsp.OtherPartyName;
					listparams[6] =  dsp.UserRole.ToString();
					listparams[7] =  dsp.DisputeReason.ToString();
					listparams[8] =  dsp.DisputeExplanation.ToString();
					listparams[9] =  dsp.DisputeModifiedTime.ToString();

					ListViewItem vi = new ListViewItem(listparams);
					this.LstDisputes.Items.Add(vi);

				}
			}
			catch (Exception ex)
			{
				MessageBox.Show(ex.Message);
			}

		}
Example #47
0
        private void BtnGetMyeBaySellingCall_Click(object sender, System.EventArgs e)
        {
            try
            {
                LstActive.Items.Clear();
                LstScheduled.Items.Clear();
                LstSold.Items.Clear();
                LstUnSold.Items.Clear();

                GetMyeBaySellingCall apicall = new GetMyeBaySellingCall(Context);

                PaginationType pageInfo = null;
                if (TxtMaxItems.Text !=null &&  TxtMaxItems.Text.Length >0)
                {
                    pageInfo = new PaginationType();
                    pageInfo.EntriesPerPage = Int32.Parse(TxtMaxItems.Text);
                }

                apicall.ActiveList = new ItemListCustomizationType();
                apicall.ActiveList.Sort = (ItemSortTypeCodeType) Enum.Parse(typeof(ItemSortTypeCodeType), CboActiveSort.SelectedItem.ToString());
                apicall.ScheduledList = new ItemListCustomizationType();
                apicall.ScheduledList.Sort = (ItemSortTypeCodeType) Enum.Parse(typeof(ItemSortTypeCodeType), CboScheSort.SelectedItem.ToString());
                apicall.UnsoldList = new ItemListCustomizationType();
                apicall.UnsoldList.Sort = (ItemSortTypeCodeType) Enum.Parse(typeof(ItemSortTypeCodeType), CboUnSoldSort.SelectedItem.ToString());
                apicall.SoldList = new ItemListCustomizationType();
                apicall.SoldList.Sort = (ItemSortTypeCodeType) Enum.Parse(typeof(ItemSortTypeCodeType), CboSoldSort.SelectedItem.ToString());

                if (pageInfo != null)
                {
                    apicall.ActiveList.Pagination = pageInfo;
                    apicall.UnsoldList.Pagination = pageInfo;
                    apicall.ScheduledList.Pagination = pageInfo;
                    apicall.SoldList.Pagination = pageInfo;
                }

                apicall.GetMyeBaySelling();

                if (apicall.ActiveListReturn != null &&
                    apicall.ActiveListReturn.ItemArray != null &&
                    apicall.ActiveListReturn.ItemArray.Count > 0)
                {
                    foreach (ItemType actitem in apicall.ActiveListReturn.ItemArray)
                    {
                        string[] listparams = new string[5];
                        listparams[0] = actitem.ItemID;
                        listparams[1] = actitem.Title;
                        if (actitem.SellingStatus != null )
                        {
                            listparams[2] = actitem.SellingStatus.CurrentPrice.Value.ToString();
                            listparams[3] = actitem.SellingStatus.BidCount.ToString();
                            listparams[4] = actitem.ListingDetails.EndTime.ToString();
                        }
                        ListViewItem vi = new ListViewItem(listparams);
                        LstActive.Items.Add(vi);

                    }
                }
                if (apicall.ScheduledListReturn != null &&
                    apicall.ScheduledListReturn.ItemArray != null &&
                    apicall.ScheduledListReturn.ItemArray.Count > 0)
                {
                    foreach (ItemType scheItem in apicall.ScheduledListReturn.ItemArray)
                    {
                        string[] listparams = new string[5];
                        listparams[0] = scheItem.ItemID;
                        listparams[1] = scheItem.Title;
                        if (scheItem.SellingStatus != null )
                        {
                            listparams[2] = scheItem.SellingStatus.CurrentPrice.Value.ToString();
                            listparams[3] = scheItem.SellingStatus.BidCount.ToString();
                            listparams[4] = scheItem.ListingDetails.EndTime.ToString();
                        }
                        ListViewItem vi = new ListViewItem(listparams);
                        LstScheduled.Items.Add(vi);

                    }
                }
                if (apicall.SoldListReturn != null &&
                    apicall.SoldListReturn.OrderTransactionArray != null &&
                    apicall.SoldListReturn.OrderTransactionArray.Count > 0)
                {
                    foreach (OrderTransactionType solditem in apicall.SoldListReturn.OrderTransactionArray)
                    {
                        string[] listparams = new string[5];
                        if (solditem.Transaction != null )
                        {
                            listparams[0] = solditem.Transaction.Item.ItemID;
                            listparams[1] = solditem.Transaction.Item.Title;
                            if (solditem.Transaction.Item.SellingStatus != null )
                            {
                                listparams[2] = solditem.Transaction.Item.SellingStatus.CurrentPrice.Value.ToString();
                                if (solditem.Transaction.Item.SellingStatus.BidCount >0 )
                                    listparams[3] = solditem.Transaction.Item.SellingStatus.BidCount.ToString();
                                if (solditem.Transaction.Item.ListingDetails != null)
                                    listparams[4] = solditem.Transaction.Item.ListingDetails.EndTime.ToString();
                            }
                        }
                        ListViewItem vi = new ListViewItem(listparams);
                        LstSold.Items.Add(vi);

                    }
                }
                if (apicall.UnsoldListReturn != null &&
                    apicall.UnsoldListReturn.ItemArray != null &&
                    apicall.UnsoldListReturn.ItemArray.Count > 0)
                {
                    foreach (ItemType unsolditem in apicall.UnsoldListReturn.ItemArray)
                    {
                        string[] listparams = new string[5];
                        listparams[0] = unsolditem.ItemID;
                        listparams[1] = unsolditem.Title;
                        if (unsolditem.SellingStatus != null )
                        {
                            listparams[2] = unsolditem.SellingStatus.CurrentPrice.Value.ToString();
                            listparams[3] = unsolditem.SellingStatus.BidCount.ToString();
                            listparams[4] = unsolditem.ListingDetails.EndTime.ToString();
                        }

                        ListViewItem vi = new ListViewItem(listparams);
                        LstUnSold.Items.Add(vi);

                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Example #48
0
        static ItemType getITembySkuUsingActiveITems(string sku)
        {
            ItemType item =null;

            var  apiContext = eBayServiceSettingHelper.GetApiContext();
            GetMyeBaySellingCall apicall = new GetMyeBaySellingCall(apiContext);

            PaginationType pageInfo = null;
            pageInfo = new PaginationType();
            pageInfo.EntriesPerPage = 200;

            apicall.ActiveList = new ItemListCustomizationType();
            if (pageInfo != null)
            {
                apicall.ActiveList.Pagination = pageInfo;
            }

            apicall.GetMyeBaySelling();

            foreach (ItemType actitem in apicall.ActiveListReturn.ItemArray)
            {
                try
                {
                    if (actitem.SKU == sku)
                    {
                        item = actitem;
                        break;
                    }
                }
                catch { }
            }

            return item;
        }
Example #49
0
        /// <summary>
        /// Retrieves the orders for which the authenticated user is a participant, either as the buyer
        /// or the seller. <b>Also for Half.com</b>. The call returns all the
        /// orders that meet the request specifications.
        /// </summary>
        ///
        /// <param name="OrderIDList">
        /// A container for eBay order IDs. If one or more order IDs are specified in this
        /// container, no other call-specific input fields are applicable.
        ///
        /// Not applicable to Half.com.
        /// </param>
        ///
        /// <param name="CreateTimeFrom">
        /// The <b>CreateTimeFrom</b> and <b>CreateTimeTo</b> fields
        /// specify a date range for retrieving orders. The <b>CreateTimeFrom</b> field is the
        /// starting date range. All eBay orders that were created within this date range are
        /// returned in the output. The maximum date range that may be specified with the
        /// <b>CreateTimeFrom</b> and <b>CreateTimeTo</b> fields is 90
        /// days. <b>CreateTimeFrom</b>/<b>CreateTimeTo</b> date
        /// filters are ignored if the <b>NumberOfDays</b> date filter is used in the request, or if
        /// one or more order IDs are passed in the request.
        ///
        /// Applicable to Half.com.
        /// </param>
        ///
        /// <param name="CreateTimeTo">
        /// The <b>CreateTimeFrom</b> and <b>CreateTimeTo</b> fields specify a date range for retrieving
        /// orders. The <b>CreateTimeTo</b> field is the ending date range. All eBay orders that were
        /// created within this date range are returned in the output. The maximum
        /// date range that may be specified with the <b>CreateTimeFrom</b> and <b>CreateTimeTo</b> fields
        /// is 90 days. If the <b>CreateTimeFrom</b> field is used and the
        /// <b>CreateTimeTo</b> field is omitted, the "TimeTo" value defaults to the present time or
        /// to 90 days past the <b>CreateTimeFrom</b> value (if <b>CreateTimeFrom</b> value is more than 90
        /// days in the past). <b>CreateTimeFrom</b>/<b>CreateTimeTo</b> date filters are ignored if the
        /// <b>NumberOfDays</b> date filter is used in the request, or if one or more order IDs are
        /// passed in the request.
        ///
        /// <span class="tablenote"><strong>Note:</strong>
        /// If a GetOrders call is made within a few seconds after the creation of a multiple
        /// line item order, the caller runs the risk of retrieving orders that are in an
        /// inconsistent state, since the order consolidation involved in a multi-line item order
        /// may not have been completed. For
        /// this reason, it is recommended that sellers include the
        /// <b>CreateTimeTo</b> field in the call, and set its value to: <i>
        /// Current Time</i> - 2 minutes.
        ///
        /// Applicable to Half.com.
        /// </span>
        ///
        /// <param name="OrderRole">
        /// Filters the returned orders based on the role of the user. The user's role is
        /// either buyer or seller. If this field is used with a date filter, returned orders
        /// must satisfy both the date range and the OrderRole value.
        ///
        /// Applicable to eBay.com and Half.com.
        /// </param>
        ///
        /// <param name="OrderStatus">
        /// The field is used to retrieve orders that are in a specific state. If this field is used with a date filter, only orders that satisfy both the date range and the <b>OrderStatus</b> value are retrieved.
        ///
        /// For eBay orders, this field's value can be set to 'Active', 'Completed', 'Canceled' or 'Inactive' to retrieve orders in these states. The 'Shipped' value is only applicable for Half.com orders.
        ///
        /// To retrieve Half.com orders, this field's value should be set to 'Shipped', and the <b>ListingType</b> field should be included and set to 'Half'.
        ///
        /// If one or more <b>OrderID</b> values are specified through the <b>OrderIDArray</b> container, the <b>OrderStatus</b> field should not be used, and it is ignored if it is used.
        /// </param>
        ///
        /// <param name="ListingType">
        /// Specify Half to retrieve Half.com orders.
        ///
        /// <span class="tablenote"><strong>Note:</strong>
        /// Do not use this field if you are retrieving eBay orders.
        ///
        /// This field cannot be used as a listing type filter on eBay.com. If not
        /// provided, or if you specify any value other than Half, this field has
        /// no useful effect and the call retrieves eBay orders of all types. Also,
        /// you can't retrieve both eBay and Half.com orders in the same response.
        /// </span>
        /// </param>
        ///
        /// <param name="Pagination">
        /// If many orders are	available to retrieve, you may need to call GetOrders multiple times to retrieve all
        /// the data. Each result set is returned as a page of entries. Use the
        /// Pagination filters to control the maximum number of entries to
        /// retrieve per page (i.e., per call), the page number to retrieve, and
        /// other data.
        /// </param>
        ///
        /// <param name="ModTimeFrom">
        /// The ModTimeFrom and ModTimeTo fields specify a date range for retrieving
        /// existing orders that have been modified within this time window (for example,
        /// 'Incomplete' status to 'Pending' status or 'Pending' status to 'Complete' status). The
        /// ModTimeFrom field is the starting date range. All eBay orders that were last
        /// modified within this date range are returned in the output. The maximum date
        /// range that may be specified with the ModTimeFrom and ModTimeTo fields is 30
        /// days. ModTimeFrom/ModTimeTo date filters are ignored if the
        /// CreateTimeFrom/CreateTimeTo or NumberOfDays date filters are used in the
        /// request, or if one or more order IDs are passed in the request.
        ///
        /// Applicable to Half.com.
        /// </param>
        ///
        /// <param name="ModTimeTo">
        /// The ModTimeFrom and ModTimeTo fields specify a date range for retrieving
        /// existing orders that have been modified within this time window (for example,
        /// 'Incomplete' status to 'Pending' status or 'Pending' status to 'Complete'
        /// status). The ModTimeTo field is the ending date range. All eBay orders that were
        /// last modified within this date range are returned in the output. The maximum
        /// date range that may be specified with the ModTimeFrom and ModTimeTo fields is 30
        /// days. If the ModTimeFrom field is used and the ModTimeTo field is omitted, the
        /// "TimeTo" value defaults to the present time (if ModTimeFrom value is less than
        /// 30 days in the past) or to 30 days past the ModTimeFrom value.
        /// ModTimeFrom/ModTimeTo date filters are ignored if the
        /// CreateTimeFrom/CreateTimeTo or NumberOfDays date filters are used in the
        /// request, or if one or more order IDs are passed in the request.
        ///
        /// Applicable to Half.com.
        /// </param>
        ///
        /// <param name="NumberOfDays">
        /// This filter specifies the number of days (24-hour periods) in the past to search
        /// for orders. All eBay orders that were either created or modified within this
        /// period are returned in the output. This field cannot be used in conjunction with
        /// the CreateTimeFrom/CreateTimeTo or ModTimeFrom/ModTimeTo date filters. This date
        /// filter is ignored if one or more order IDs are passed in the request.
        ///
        /// Applicable to Half.com.
        /// </param>
        ///
        /// <param name="IncludeFinalValueFee">
        /// Indicates whether to include the Final Value Fee (FVF) for all Transaction objects in the
        /// response. The Final Value Fee is returned in Transaction.FinalValueFee. The Final
        /// Value Fee is assessed right after the creation of an eBay order line item.
        ///
        /// </param>
        ///
        /// <param name="SortingOrder">
        /// Specifies how orders returned by this call should be sorted (using <strong>LastModifiedTime</strong> as the sort key). A value of <code>Ascending</code> returns the earliest modified orders first, and a value of <code>Descending</code> returns the latest modified orders first.
        /// <br/><br/>
        /// Default: <code>Ascending</code>
        /// </param>
        public OrderTypeCollection GetOrders(StringCollection OrderIDList, DateTime CreateTimeFrom, DateTime CreateTimeTo, TradingRoleCodeType OrderRole, OrderStatusCodeType OrderStatus, ListingTypeCodeType ListingType, PaginationType Pagination, DateTime ModTimeFrom, DateTime ModTimeTo, int NumberOfDays, bool IncludeFinalValueFee, SortOrderCodeType SortingOrder)
        {
            this.OrderIDList          = OrderIDList;
            this.CreateTimeFrom       = CreateTimeFrom;
            this.CreateTimeTo         = CreateTimeTo;
            this.OrderRole            = OrderRole;
            this.OrderStatus          = OrderStatus;
            this.ListingType          = ListingType;
            this.Pagination           = Pagination;
            this.ModTimeFrom          = ModTimeFrom;
            this.ModTimeTo            = ModTimeTo;
            this.NumberOfDays         = NumberOfDays;
            this.IncludeFinalValueFee = IncludeFinalValueFee;
            this.SortingOrder         = SortingOrder;

            Execute();
            return(ApiResponse.OrderArray);
        }
Example #50
0
        /// <summary>
        /// This is the base request type of the <b>GetBestOffers</b> call. Depending on the input parameters that are used, this call can be used by a seller to retrieve all active Best Offers, all Best Offers on a specific listing, a specific Best Offer for a specific listing, or Best Offers in a specific state.
        /// <br/><br/>
        /// <span class="tablenote"><b>Note: </b>
        /// The Best Offer feature is now available for auction listings on the following sites: US, Canada, UK, Germany, Australia, France, Italy, and Spain. However, sellers must choose between offering Best Offer or Buy It Now on an auction listing, as both features cannot be enabled on the same auction listing.
        /// </span>
        /// </summary>
        ///
        /// <param name="ItemID">
        /// The unique identifier of an eBay listing. If an <b>ItemID</b> is used by itself in the call request, all Best Offers in all states are retrieved for this listing. However, the seller can also combine <b>ItemID</b> and a <b>BestOfferStatus</b> value if that seller only wants to see Best Offers in a specific state. If a <b>BestOfferID</b> field is included in the call request, any <b>ItemID</b> value will be ignored since eBay will only search for and return the Best Offer identified in the <b>BestOfferID</b> field.
        /// </param>
        ///
        /// <param name="BestOfferID">
        /// The unique identifier of a Best Offer. An identifier for a Best Offer is automatically created by eBay once a prospective buyer makes a Best Offer on a Best Offer-enabled listing. If a <b>BestOfferID</b> value is supplied in the call request, any <b>ItemID</b> or <b>BestOfferStatus</b> values will be ignored. Only the Best Offer identified by the <b>BestOfferID</b> value will be returned.
        /// </param>
        ///
        /// <param name="BestOfferStatus">
        /// This field can be used if the seller wants to retrieve Best Offers in a specific state. The typical use case for this field is when the seller wants to retrieve Best Offers in all states for a specific listing. In fact, the <b>All</b> value can only be used if an <b>ItemID</b> value is also supplied in the call request. If a <b>BestOfferID</b> field is included in the call request, any <b>BestOfferStatus</b> value will be ignored since eBay will only search for and return the Best Offer identified in the <b>BestOfferID</b> field.
        /// </param>
        ///
        /// <param name="Pagination">
        /// This container can be used if the seller is expecting that the <b>GetBestOffers</b> call will retrieve a large number of results, so that seller wishes to view just a subset (one page of multiple pages) of those results at a time. See this container's child fields for more information on how pagination is used.
        /// </param>
        ///
        public BestOfferTypeCollection GetBestOffers(string ItemID, string BestOfferID, BestOfferStatusCodeType BestOfferStatus, PaginationType Pagination)
        {
            this.ItemID          = ItemID;
            this.BestOfferID     = BestOfferID;
            this.BestOfferStatus = BestOfferStatus;
            this.Pagination      = Pagination;

            Execute();
            return(ApiResponse.BestOfferArray);
        }
        /// <summary>
        /// Returns orders in which the user was involved and for which feedback
        /// is still needed from either the buyer or seller.
        /// </summary>
        ///
        /// <param name="Sort">
        /// Specifies how the returned feedback items should be sorted.
        /// Valid values are Title, EndTime, QuestionCount, FeedbackLeft,
        /// FeedbackReceivedDescending, UserIDDescending, TitleDescending,
        /// and EndTimeDescending.
        /// </param>
        ///
        /// <param name="Pagination">
        /// Specifies the number of entries per page and the page number to return
        /// in the result set.
        /// </param>
        ///
        public PaginatedTransactionArrayType GetItemsAwaitingFeedback(ItemSortTypeCodeType Sort, PaginationType Pagination)
        {
            this.Sort       = Sort;
            this.Pagination = Pagination;

            Execute();
            return(ApiResponse.ItemsAwaitingFeedback);
        }
		private void BtnGetMyeBayBuyingCall_Click(object sender, System.EventArgs e)
		{
			try
			{
				LstBid.Items.Clear();
				LstWatchItems.Items.Clear();
				LstWonItems.Items.Clear();
				LstLostItems.Items.Clear();

				GetMyeBayBuyingCall apicall = new GetMyeBayBuyingCall(Context);

				PaginationType pageInfo = null;
				if (TxtMaxItems.Text !=null &&  TxtMaxItems.Text.Length >0) 
				{
					pageInfo = new PaginationType();
					pageInfo.EntriesPerPage = Int32.Parse(TxtMaxItems.Text);
				}

				apicall.BidList = new ItemListCustomizationType();
				apicall.BidList.Sort = (ItemSortTypeCodeType) Enum.Parse(typeof(ItemSortTypeCodeType), CboBidItemSort.SelectedItem.ToString());
				apicall.WatchList = new ItemListCustomizationType();
				apicall.WatchList.Sort = (ItemSortTypeCodeType) Enum.Parse(typeof(ItemSortTypeCodeType), CboWatchSort.SelectedItem.ToString());
				apicall.WonList = new ItemListCustomizationType();
				apicall.WonList.Sort = (ItemSortTypeCodeType) Enum.Parse(typeof(ItemSortTypeCodeType), CboWonSort.SelectedItem.ToString());
				apicall.LostList = new ItemListCustomizationType();
				apicall.LostList.Sort = (ItemSortTypeCodeType) Enum.Parse(typeof(ItemSortTypeCodeType), CboLostSort.SelectedItem.ToString());

				if (pageInfo != null)
				{
					apicall.BidList.Pagination = pageInfo;
					apicall.WatchList.Pagination = pageInfo;
					apicall.WonList.Pagination = pageInfo;
					apicall.LostList.Pagination = pageInfo;
				}

				apicall.GetMyeBayBuying();

			    if (apicall.BidListReturn != null)
				{
					if (apicall.BidListReturn.ItemArray.Count > 0) 
					{
						foreach (ItemType bidItem in apicall.BidListReturn.ItemArray)
						{
							string[] listparams = new string[5];
							listparams[0] = bidItem.ItemID;
							listparams[1] = bidItem.Title;
							if (bidItem.SellingStatus != null ) 
							{
								listparams[2] = bidItem.SellingStatus.CurrentPrice.Value.ToString();
								listparams[3] = bidItem.SellingStatus.BidCount.ToString();
								listparams[4] = bidItem.ListingDetails.EndTime.ToString();
							}
							ListViewItem vi = new ListViewItem(listparams);
							LstBid.Items.Add(vi);

						}
					}
				}
				if (apicall.WatchListReturn != null && 
					apicall.WatchListReturn.ItemArray != null && 
					apicall.WatchListReturn.ItemArray.Count > 0)
				{
					foreach (ItemType watchItem in apicall.WatchListReturn.ItemArray)
					{
						string[] listparams = new string[5];
						listparams[0] = watchItem.ItemID;
						listparams[1] = watchItem.Title;
						if (watchItem.SellingStatus != null ) 
						{
							listparams[2] = watchItem.SellingStatus.CurrentPrice.Value.ToString();
							listparams[3] = watchItem.SellingStatus.BidCount.ToString();
							listparams[4] = watchItem.ListingDetails.EndTime.ToString();
						}
						ListViewItem vi = new ListViewItem(listparams);
						LstWatchItems.Items.Add(vi);

					}
				}
				if (apicall.WonListReturn != null &&
					apicall.WonListReturn.OrderTransactionArray != null &&
					apicall.WonListReturn.OrderTransactionArray.Count > 0)
				{
					foreach (OrderTransactionType wonitem in apicall.WonListReturn.OrderTransactionArray)
					{
						string[] listparams = new string[5];
						if (wonitem.Transaction != null ) 
						{
							listparams[0] = wonitem.Transaction.Item.ItemID;
							listparams[1] = wonitem.Transaction.Item.Title;
							if (wonitem.Transaction.Item.SellingStatus != null ) 
							{
								listparams[2] = wonitem.Transaction.Item.SellingStatus.CurrentPrice.Value.ToString();
								if (wonitem.Transaction.Item.SellingStatus.BidCount >0 )
									listparams[3] = wonitem.Transaction.Item.SellingStatus.BidCount.ToString();
								if (wonitem.Transaction.Item.ListingDetails != null)
									listparams[4] = wonitem.Transaction.Item.ListingDetails.EndTime.ToString();
							}
							ListViewItem vi = new ListViewItem(listparams);
							LstWonItems.Items.Add(vi);

						} 
						else if (wonitem.Order != null) 
						{
							foreach (TransactionType transaction in wonitem.Order.TransactionArray) 
							{
								listparams[0] = transaction.Item.ItemID;
								listparams[1] = transaction.Item.Title;
								if (transaction.Item.SellingStatus != null ) 
								{
									listparams[2] = transaction.Item.SellingStatus.CurrentPrice.Value.ToString();
									if (transaction.Item.SellingStatus.BidCount >0 )
										listparams[3] = transaction.Item.SellingStatus.BidCount.ToString();
									if (transaction.Item.ListingDetails != null)
										listparams[4] = transaction.Item.ListingDetails.EndTime.ToString();
								}
								ListViewItem vi = new ListViewItem(listparams);
								LstWonItems.Items.Add(vi);
							}

						}

					}
				}
				if (apicall.LostListReturn != null &&
					apicall.LostListReturn.ItemArray != null &&
					apicall.LostListReturn.ItemArray.Count > 0)
				{
					foreach (ItemType lostitem in apicall.LostListReturn.ItemArray)
					{
						string[] listparams = new string[5];
						listparams[0] = lostitem.ItemID;
						listparams[1] = lostitem.Title;
						if (lostitem.SellingStatus != null ) 
						{
							listparams[2] = lostitem.SellingStatus.CurrentPrice.Value.ToString();
							listparams[3] = lostitem.SellingStatus.BidCount.ToString();
							listparams[4] = lostitem.ListingDetails.EndTime.ToString();
						}

						ListViewItem vi = new ListViewItem(listparams);
						LstLostItems.Items.Add(vi);

					}
				}
			}
			catch (Exception ex)
			{
				MessageBox.Show(ex.Message);
			}

		}
        /// <summary>
        /// Get the page links
        /// </summary>
        /// <param name="pageType">Pagination type</param>
        /// <returns>Page link string</returns>
        public string GetPageLinks(PaginationType pageType)
        {
            // If anything invalid
            if (!this.IsValidSettings())
                return "";

            // Add a trailing slash to the base URL if needed
            if (!this.BaseUrl.Trim().EndsWith("/"))
                this.BaseUrl = this.BaseUrl + "/";

            // And here we go...
            StringBuilder pageLink = new StringBuilder();

            switch (pageType)
            {
                case PaginationType.Default:
                    this.BuildDefaultLink(pageLink);
                    break;

                case PaginationType.DefaultWithItemRight:
                    this.BuildDefaultLink(pageLink);
                    this.BuildItemLink(pageLink);
                    break;

                case PaginationType.DefaultWithItemLeft:
                    this.BuildItemLink(pageLink);
                    this.BuildDefaultLink(pageLink);
                    break;

                case PaginationType.PreviousNext:
                    this.BuildPreviousNextLink(pageLink);
                    break;

                case PaginationType.PreviousNextItemRight:
                    this.BuildPreviousNextLink(pageLink);
                    this.BuildItemLink(pageLink);
                    break;

                case PaginationType.PreviousNextItemLeft:
                    this.BuildItemLink(pageLink);
                    this.BuildPreviousNextLink(pageLink);
                    break;

                case PaginationType.PreviousNextItemCenter:
                    this.BuildPreviousLink(pageLink, false);
                    this.BuildItemLink(pageLink);
                    this.BuildNextLink(pageLink, false);
                    break;

                case PaginationType.FirstPreviousNextLast:
                    this.BuildFirstPreviousNextLastLink(pageLink);
                    break;

                case PaginationType.FirstPreviousNextLastItemRight:
                    this.BuildFirstPreviousNextLastLink(pageLink);
                    this.BuildItemLink(pageLink);
                    break;

                case PaginationType.FirstPreviousNextLastItemLeft:
                    this.BuildItemLink(pageLink);
                    this.BuildFirstPreviousNextLastLink(pageLink);
                    break;

                case PaginationType.FirstPreviousNextLastItemCenter:
                    this.BuildFirstLink(pageLink, false);
                    this.BuildPreviousLink(pageLink, false);
                    this.BuildItemLink(pageLink);
                    this.BuildNextLink(pageLink, false);
                    this.BuildLastLink(pageLink, false);
                    break;

                case PaginationType.Number:
                    this.BuildDigitLink(pageLink);
                    break;

                case PaginationType.NumberWithItemRight:
                    this.BuildDigitLink(pageLink);
                    this.BuildItemLink(pageLink);
                    break;

                case PaginationType.NumberWithItemLeft:
                    this.BuildItemLink(pageLink);
                    this.BuildDigitLink(pageLink);
                    break;

                default:
                    this.GetPageLinks(PaginationType.Default);
                    break;
            }

            pageLink.Insert(0, this.FullTagOpen);
            pageLink.Append(this.FullTagClose);

            return pageLink.ToString();
        }
		/// <summary>
		/// For backward compatibility with old wrappers.
		/// </summary>
		public PaginatedTransactionArrayType GetItemsAwaitingFeedback(PaginationType Pagination)
		{
			this.Pagination = Pagination;
			Execute();
			return ItemsAwaitingFeedback;
		}
        /// <summary>
        /// Requests a list of disputes the requester is involved in as buyer or seller.
        /// eBay Money Back Guarantee Item Not Received and Significantly Not As Described cases
        /// are not returned with this call. To retrieve eBay Money Back Guarantee cases, use the Resolution Case Management API <b>getUserCases</b> call.
        /// </summary>
        ///
        /// <param name="DisputeFilterType">
        /// An inclusive filter that isolates the returned disputes to a certain
        /// type such as Item Not Received or Unpaid Item disputes. eBay Money Back Guarantee cases are not retrieved with this call, even if the
        /// <b>ItemNotReceivedDisputes</b> filter is included in the request.
        /// </param>
        ///
        /// <param name="DisputeSortType">
        /// The value and sequence to use to sort the returned disputes.
        /// </param>
        ///
        /// <param name="ModTimeFrom">
        /// A filter that retrieves disputes whose <b>DisputeModifiedTime</b> is later
        /// than or equal to this value. Specify the time value in GMT.
        /// See the eBay Features Guide for information about specifying time values.
        /// For more precise control of the date range filter, it is a good practice to also
        /// specify <b>ModTimeTo</b>. Otherwise, the end of the date range is the present time.
        /// Filtering by date range is optional. You can use date range filters in combination
        /// with other filters like <b>DisputeFilterType</b> to control the amount of data returned.
        /// </param>
        ///
        /// <param name="ModTimeTo">
        /// A filter that retrieves disputes whose <b>DisputeModifiedTime</b> is earlier
        /// than or equal to this value. Specify the time value in GMT.
        /// See the eBay Features Guide for information about specifying time values.
        /// For more precise control of the date range filter, it is a good practice to also
        /// specify <b>ModTimeFrom</b>. Otherwise, all available disputes modified prior to the <b>ModTimeTo</b> value are returned.
        /// Filtering by date range is optional. You can use date range filters in combination
        /// with other filters like <b>DisputeFilterType</b> to control the amount of data returned.
        /// </param>
        ///
        /// <param name="Pagination">
        /// The virtual page number of the result set to display. A result set has a number of disputes
        /// divided into virtual pages, with 200 disputes per page. The response can only display one page.
        /// The first page in the result set is number 1. Required. If not specified, a warning is returned
        /// and <b>Pagination.PageNumber</b> is set to 1 by default.
        /// </param>
        ///
        public DisputeTypeCollection GetUserDisputes(DisputeFilterTypeCodeType DisputeFilterType, DisputeSortTypeCodeType DisputeSortType, DateTime ModTimeFrom, DateTime ModTimeTo, PaginationType Pagination)
        {
            this.DisputeFilterType = DisputeFilterType;
            this.DisputeSortType   = DisputeSortType;
            this.ModTimeFrom       = ModTimeFrom;
            this.ModTimeTo         = ModTimeTo;
            this.Pagination        = Pagination;

            Execute();
            return(ApiResponse.DisputeArray);
        }
Example #56
0
        /// <summary>
        /// The <b>GetFeedback</b> call is to used to retrieve one, many, or all Feedback records for a specific eBay user. There is a filter option in the call request to limit Feedback records to those that are received, or to those that are left for other buyers, as well as a filter option to limit Feedback records to those that are received as a buyer or seller.
        /// </summary>
        /// 
        /// <param name="UserID">
        /// The user's eBay User ID is specified in this field. If this field is used, all retrieved Feedback data will be for this eBay user. Specifies the user whose feedback data is to be returned. If this field is omitted in the call request, all retrieved Feedback records will be for the eBay user making the call.
        /// </param>
        ///
        /// <param name="FeedbackID">
        /// The unique identifier of a Feedback record. This field is used if the user wants to retrieve a specific Feedback record. If <b>FeedbackID</b> is specified in the call request, all other input fields are ignored. 
        /// </param>
        ///
        /// <param name="ItemID">
        /// Unique identifier for an eBay item listing. A listing can have multiple
        /// order line items, but only one <b>ItemID</b>. If <b>ItemID</b> is
        /// specified in the <b>GetFeedback</b> request, the returned Feedback record(s) are
        /// restricted to the specified <b>ItemID</b>. The maximum number of Feedback records that can be returned is 100.
        /// </param>
        ///
        /// <param name="TransactionID">
        /// Unique identifier for an eBay order line item. A
        /// <b>TransactionID</b> can be paired up with its corresponding <b>ItemID</b> and used as
        /// an input filter in the <b>GetFeedback</b> request. If an <b>ItemID</b>/<b>TransactionID</b>
        /// pair or an <b>OrderLineItemID</b> value is used to retrieve a Feedback record
        /// on a specific order line item, the <b>FeedbackType</b> and <b>Pagination</b>
        /// fields (if included) are ignored.
        /// </param>
        ///
        /// <param name="CommentTypeList">
        /// This field is used to retrieve Feedback records of a specific type (Positive, Negative, or Neutral) in 
        /// <b>FeedbackDetailArray</b>. You can include one or two <b>
        /// CommentType</b> fields in the request. If no
        /// <b>CommentType</b> value is specified,
        /// Feedback records of all types are returned.
        /// </param>
        ///
        /// <param name="FeedbackType">
        /// This field is used to restrict retrieved Feedback records to those that the user left for other buyers, Feedback records received as a seller, Feedback records received as a buyer, or Feedback records received as a buyer and seller. The default value is <b>FeedbackReceived</b>, so if the  <b>FeedbackType</b> field is omitted in the request, all Feedback records received by the user as a buyer and seller are returned in the response. "Feedback Left" data will not be returned in the call response.
        /// </param>
        ///
        /// <param name="Pagination">
        /// Controls the pagination of the result set. Child elements, <b>EntriesPerPage</b> and
        /// <b>PageNumber</b>, specify the maximum number of individual feedback records to return
        /// per call and which page of data to return. Only applicable if <b>DetailLevel</b> is
        /// set to <b>ReturnAll</b> and the call is returning feedback for a <b>UserID</b>. Feedback
        /// summary data is not paginated, but when pagination is used, it is returned
        /// after the last feedback detail entry.
        /// 
        /// Accepted values for <b>Pagination.EntriesPerPage</b> for GetFeedback is 25 (the
        /// default), 50, 100, and 200. If you specify a value of zero, or a value
        /// greater than 200, the call fails with an error. If you specify a value between
        /// one and twenty-four, the value is rounded up to 25. Values between 26 and 199
        /// that are not one of the accepted values are rounded down to the nearest
        /// accepted value.
        /// </param>
        ///
        /// <param name="OrderLineItemID">
        /// <b>OrderLineItemID</b> is a unique identifier for an eBay order line item and
        /// is based upon the concatenation of <b>ItemID</b> and <b>TransactionID</b>, with a
        /// hyphen in between these two IDs. An <b>OrderLineItemID</b> can be used as an
        /// input filter in the <b>GetFeedback</b> request. If an <b>OrderLineItemID</b> value is
        /// used to retrieve a feedback record on a specific order line item, the
        /// <b>FeedbackType</b> and <b>Pagination</b> fields (if included) are ignored.
        /// </param>
        ///
        public FeedbackDetailTypeCollection GetFeedback(string UserID, string FeedbackID, string ItemID, string TransactionID, CommentTypeCodeTypeCollection CommentTypeList, FeedbackTypeCodeType FeedbackType, PaginationType Pagination, string OrderLineItemID)
        {
            this.UserID = UserID;
            this.FeedbackID = FeedbackID;
            this.ItemID = ItemID;
            this.TransactionID = TransactionID;
            this.CommentTypeList = CommentTypeList;
            this.FeedbackType = FeedbackType;
            this.Pagination = Pagination;
            this.OrderLineItemID = OrderLineItemID;

            Execute();
            return ApiResponse.FeedbackDetailArray;
        }
Example #57
0
        /// <summary>
        /// The <b>GetFeedback</b> call is to used to retrieve one, many, or all Feedback records for a specific eBay user. There is a filter option in the call request to limit Feedback records to those that are received, or to those that are left for other buyers, as well as a filter option to limit Feedback records to those that are received as a buyer or seller.
        /// </summary>
        ///
        /// <param name="UserID">
        /// The user's eBay User ID is specified in this field. If this field is used, all retrieved Feedback data will be for this eBay user. Specifies the user whose feedback data is to be returned. If this field is omitted in the call request, all retrieved Feedback records will be for the eBay user making the call.
        /// </param>
        ///
        /// <param name="FeedbackID">
        /// The unique identifier of a Feedback record. This field is used if the user wants to retrieve a specific Feedback record. If <b>FeedbackID</b> is specified in the call request, all other input fields are ignored.
        /// </param>
        ///
        /// <param name="ItemID">
        /// Unique identifier for an eBay item listing. A listing can have multiple
        /// order line items, but only one <b>ItemID</b>. If <b>ItemID</b> is
        /// specified in the <b>GetFeedback</b> request, the returned Feedback record(s) are
        /// restricted to the specified <b>ItemID</b>. The maximum number of Feedback records that can be returned is 100.
        /// </param>
        ///
        /// <param name="TransactionID">
        /// Unique identifier for an eBay order line item. A
        /// <b>TransactionID</b> can be paired up with its corresponding <b>ItemID</b> and used as
        /// an input filter in the <b>GetFeedback</b> request. If an <b>ItemID</b>/<b>TransactionID</b>
        /// pair or an <b>OrderLineItemID</b> value is used to retrieve a Feedback record
        /// on a specific order line item, the <b>FeedbackType</b> and <b>Pagination</b>
        /// fields (if included) are ignored.
        /// </param>
        ///
        /// <param name="CommentTypeList">
        /// This field is used to retrieve Feedback records of a specific type (Positive, Negative, or Neutral) in
        /// <b>FeedbackDetailArray</b>. You can include one or two <b>
        /// CommentType</b> fields in the request. If no
        /// <b>CommentType</b> value is specified,
        /// Feedback records of all types are returned.
        /// </param>
        ///
        /// <param name="FeedbackType">
        /// This field is used to restrict retrieved Feedback records to those that the user left for other buyers, Feedback records received as a seller, Feedback records received as a buyer, or Feedback records received as a buyer and seller. The default value is <b>FeedbackReceived</b>, so if the  <b>FeedbackType</b> field is omitted in the request, all Feedback records received by the user as a buyer and seller are returned in the response. "Feedback Left" data will not be returned in the call response.
        /// </param>
        ///
        /// <param name="Pagination">
        /// Controls the pagination of the result set. Child elements, <b>EntriesPerPage</b> and
        /// <b>PageNumber</b>, specify the maximum number of individual feedback records to return
        /// per call and which page of data to return. Only applicable if <b>DetailLevel</b> is
        /// set to <b>ReturnAll</b> and the call is returning feedback for a <b>UserID</b>. Feedback
        /// summary data is not paginated, but when pagination is used, it is returned
        /// after the last feedback detail entry.
        ///
        /// Accepted values for <b>Pagination.EntriesPerPage</b> for GetFeedback is 25 (the
        /// default), 50, 100, and 200. If you specify a value of zero, or a value
        /// greater than 200, the call fails with an error. If you specify a value between
        /// one and twenty-four, the value is rounded up to 25. Values between 26 and 199
        /// that are not one of the accepted values are rounded down to the nearest
        /// accepted value.
        /// </param>
        ///
        /// <param name="OrderLineItemID">
        /// <b>OrderLineItemID</b> is a unique identifier for an eBay order line item and
        /// is based upon the concatenation of <b>ItemID</b> and <b>TransactionID</b>, with a
        /// hyphen in between these two IDs. An <b>OrderLineItemID</b> can be used as an
        /// input filter in the <b>GetFeedback</b> request. If an <b>OrderLineItemID</b> value is
        /// used to retrieve a feedback record on a specific order line item, the
        /// <b>FeedbackType</b> and <b>Pagination</b> fields (if included) are ignored.
        /// </param>
        ///
        public FeedbackDetailTypeCollection GetFeedback(string UserID, string FeedbackID, string ItemID, string TransactionID, CommentTypeCodeTypeCollection CommentTypeList, FeedbackTypeCodeType FeedbackType, PaginationType Pagination, string OrderLineItemID)
        {
            this.UserID          = UserID;
            this.FeedbackID      = FeedbackID;
            this.ItemID          = ItemID;
            this.TransactionID   = TransactionID;
            this.CommentTypeList = CommentTypeList;
            this.FeedbackType    = FeedbackType;
            this.Pagination      = Pagination;
            this.OrderLineItemID = OrderLineItemID;

            Execute();
            return(ApiResponse.FeedbackDetailArray);
        }
		/// <summary>
		/// Retrieves a list of the messages buyers have posted about your
		/// active item listings.
		/// </summary>
		/// 
		/// <param name="ItemID">
		/// The ID of the item the message is about.
		/// 
		/// For ASQ messages, either the ItemID, or a date range
		/// (specified with StartCreationTime and EndCreationTime),
		/// or both must be included. ItemID is otherwise ignored.
		/// </param>
		///
		/// <param name="MailMessageType">
		/// The type of message. Note that GetMemberMessages does not return
		/// messages when this field is set to AskSellerQuestion.
		/// </param>
		///
		/// <param name="MessageStatus">
		/// The status of the message.
		/// </param>
		///
		/// <param name="DisplayToPublic">
		/// If included in the request and set to True, only public messages (viewable
		/// in the Item listing) are returned. If omitted or set to False in the
		/// request, all messages (that match other filters in the request) are returned
		/// in the response.
		/// </param>
		///
		/// <param name="StartCreationTime">
		/// Used as beginning of date range filter. If specified,
		/// filters the returned messages to only those with a
		/// creation date greater than or equal to the specified
		/// date and time.
		/// 
		/// For CEM messages, StartCreationTime and EndCreationTime
		/// must be provided.
		/// 
		/// For ASQ messages, either the ItemID, or a date range
		/// (specified with StartCreationTime and EndCreationTime),
		/// or both must be included.
		/// </param>
		///
		/// <param name="EndCreationTime">
		/// Used as end of date range filter. If specified, filters
		/// the returned messages to only those with a creation date
		/// less than or equal to the specified date and time.
		/// 
		/// For CEM messages, StartCreationTime and EndCreationTime
		/// must be provided.
		/// 
		/// For ASQ messages, either the ItemID, or a date range
		/// (specified with StartCreationTime and EndCreationTime),
		/// or both must be included.
		/// </param>
		///
		/// <param name="Pagination">
		/// Standard pagination argument used to reduce response.
		/// </param>
		///
		/// <param name="MemberMessageID">
		/// An ID that uniquely identifies the message for a given user to be retrieved.
		/// Used for the AskSellerQuestion notification only.
		/// </param>
		///
		/// <param name="SenderID">
		/// An eBay ID that uniquely identifies a user. For
		/// GetMemberMessages, this is the sender of the message. If
		/// included in the request, returns only messages from the
		/// specified sender.
		/// </param>
		///
		public MemberMessageExchangeTypeCollection GetMemberMessages(string ItemID, MessageTypeCodeType MailMessageType, MessageStatusTypeCodeType MessageStatus, bool DisplayToPublic, DateTime StartCreationTime, DateTime EndCreationTime, PaginationType Pagination, string MemberMessageID, string SenderID)
		{
			this.ItemID = ItemID;
			this.MailMessageType = MailMessageType;
			this.MessageStatus = MessageStatus;
			this.DisplayToPublic = DisplayToPublic;
			this.StartCreationTime = StartCreationTime;
			this.EndCreationTime = EndCreationTime;
			this.Pagination = Pagination;
			this.MemberMessageID = MemberMessageID;
			this.SenderID = SenderID;

			Execute();
			return ApiResponse.MemberMessage;
		}
		/// <summary>
		/// <b>Half.com only.</b>&nbsp;Retrieves a summary of pending or paid payments that Half.com created for the
		/// seller identified by the authentication token in the request. Only retrieves
		/// payments that occurred within a particular pay period. Each payment is for one
		/// order line item in one order. An order can contain order line items for
		/// multiple items from multiple sellers, but this call only retrieves payments that
		/// are relevant to one seller. The financial value of a payment is typically based on
		/// an amount that a buyer paid to Half.com for an order line item, with adjustments for
		/// shipping costs and Half.com's commission. For most sellers, each month contains
		/// two pay periods: One from the 1st to the 15th of the month, and one from the 16th
		/// to the last day of the month. Sellers can refer to their account information on
		/// the Half.com site to determine their pay periods. (You cannot retrieve a seller's
		/// pay periods by using eBay API.) When a buyer makes a purchase and an
		/// order is created, Half.com creates a payment for the seller and marks it as
		/// Pending in the seller's Half.com account. Within a certain number of days after
		/// the pay period ends, Half.com settles payments for that period and marks each
		/// completed payment as Paid. See the Half.com Web site online help for more
		/// information about how payments are managed.
		/// </summary>
		/// 
		/// <param name="PaymentStatus">
		/// Filter to retrieve only items with the specified payment status (Paid or
		/// Pending). "Pending payments" are payments that Half.com has created but
		/// that have not yet been sent to the seller's financial institution. Pending
		/// payments are typically available once a buyer pays for an order. As
		/// Half.com processes payments by using periodic batch jobs, the
		/// GetSellerPayments response might not include an order line item's payment for
		/// up to 20 minutes after the buyer has paid. You can retrieve pending
		/// payments for the current pay period. Pending payments that have not been
		/// settled yet can also be retrieved for previous pay periods. "Paid
		/// payments" are payments that Half.com processed during previous pay
		/// periods. Paid payments might not appear in the seller's financial
		/// institution account balance until a certain number of days after the
		/// current pay period ends (see the Half.com online help for details). You
		/// can only retrieve paid payments for one previous pay period at a time.
		/// </param>
		///
		/// <param name="PaymentTimeFrom">
		/// Time range filter that retrieves Half.com payments that were created within
		/// a single pay period. Sellers can refer to the Half.com site to determine
		/// their pay periods. PaymentTimeFrom is the earliest (oldest) time and
		/// PaymentTimeTo is the latest (most recent) time in the range. Half.com pay
		/// periods start and end at midnight Pacific time, but the time values are
		/// stored in the database in GMT (not Pacific time). See "Time Values" in the
		/// eBay Features Guide for information about converting between GMT and
		/// Pacific time. 
		/// 
		/// If you specify a PaymentStatus of Pending, add a buffer of one hour (or one
		/// day) to both ends of the time range to retrieve more data than you need, and
		/// then filter the results on the client side as needed. If any pending
		/// payments match the request, the response may include all payments since the
		/// beginning of the period. 
		/// 
		/// If you specify a PaymentStatus of Paid, the time range must contain one
		/// full pay period. That is, PaymentTimeFrom must be earlier or equal the
		/// start time of the pay period, and PaymentTimeTo must be later than or
		/// equal to the end time of the pay period. Otherwise, no paid payments are
		/// returned. For example, if the pay period starts on 2005-09-16 and ends on
		/// 2005-09-30, you could specify an earlier PaymentTimeFrom value of
		/// 2005-09-16T00:00:00.000Z and a later PaymentTimeTo value of
		/// 2005-10-01T12:00:00.000Z. 
		/// 
		/// If you specify a time range that covers two pay periods, only the payments
		/// from the most recent pay period are returned. The earliest time you can
		/// specify is 18 months ago.
		/// </param>
		///
		/// <param name="PaymentTimeTo">
		/// Time range filter that retrieves Half.com payments for a single pay
		/// period. See the description of PaymentTimeTo for details about using this
		/// time range filter. For paid payments, this value should be equal to or
		/// later than the end of the last day of the pay period, where the time is
		/// converted to GMT. For example, if the period ends on 2005-09-30, you could
		/// specify 2005-10-01T09:00:00.000Z, which is later than the end of the last
		/// day.
		/// </param>
		///
		/// <param name="Pagination">
		/// If many payments are available, you may need to call GetSellerPayments
		/// multiple times to retrieve all the data. Each result set is returned as a
		/// page of entries. Use this Pagination information to indicate the maximum
		/// number of entries to retrieve per page (i.e., per call), the page number
		/// to retrieve, and other data.
		/// </param>
		///
		public SellerPaymentTypeCollection GetSellerPayments(RCSPaymentStatusCodeType PaymentStatus, DateTime PaymentTimeFrom, DateTime PaymentTimeTo, PaginationType Pagination)
		{
			this.PaymentStatus = PaymentStatus;
			this.PaymentTimeFrom = PaymentTimeFrom;
			this.PaymentTimeTo = PaymentTimeTo;
			this.Pagination = Pagination;

			Execute();
			return ApiResponse.SellerPayment;
		}
Example #60
0
        /// <summary>
        /// Returns a seller's invoice data for their eBay account, including the account's
        /// summary data.
        /// </summary>
        /// 
        /// <param name="AccountHistorySelection">
        /// This field is used by the user to control which account entries are returned. The user has options to retrieve all new account entries (since last invoice), all account entries between two specified dates, or all account entries from a specified invoice. If this field is not include
        /// </param>
        ///
        /// <param name="InvoiceDate">
        /// This field is used to retrieve all account entries from a specific invoice, which is identified through this <b>InvoiceDate</b> field with the timestamp of the account invoice. This field is only applicable if the  <b>AccountHistorySelection</b> value is set to 'SpecifiedInvoice'; otherwise, this field will be ignored.
        /// </param>
        ///
        /// <param name="BeginDate">
        /// This field is used to retrieve all account entries dating back to the timestamp passed into this <b>BeginDate</b> field up until the timestamp passed into the <b>EndDate</b> field. The <b>BeginDate</b> value can not be set back any further than four months into the past. 
        /// <br/><br/>
        /// The allowed date formats are <em>YYYY-MM-DD</em> and <em>YYYY-MM-DD HH:mm:ss</em> The <b>BeginDate</b> value must be less than or equal to the <b>EndDate</b> value. The user might use the same values in both fields if that user wanted to retrieve all account entries from a specific day (if <em>YYYY-MM-DD</em> format used) or wanted to retrieve a specific account entry (if <em>YYYY-MM-DD HH:mm:ss</em> format used).
        /// <br/><br/>
        /// This field is only applicable if the  <b>AccountHistorySelection</b> value is set to 'BetweenSpecifiedDates'; otherwise, this field will be ignored. fiedDates' is used, both the <b>BeginDate</b> and <b>EndDate</b> must be included.
        /// </param>
        ///
        /// <param name="EndDate">
        /// This field is used to retrieve all account entries dating up to the timestamp passed into this <b>EndDate</b> field dating back to the timestamp passed into the <b>BeginDate</b> field. The <b>EndDate</b> value can not be set for a future date. 
        /// <br/><br/>
        /// The allowed date formats are <em>YYYY-MM-DD</em> and <em>YYYY-MM-DD HH:mm:ss</em> The <b>EndDate</b> value must be more than or equal to the <b>BeginDate</b> value. The user might use the same values in both fields if that user wanted to retrieve all account entries from a specific day (if <em>YYYY-MM-DD</em> format used) or wanted to retrieve a specific account entry (if <em>YYYY-MM-DD HH:mm:ss</em> format used).
        /// <br/><br/>
        /// This field is only applicable if the  <b>AccountHistorySelection</b> value is set to 'BetweenSpecifiedDates'; otherwise, this field will be ignored. If 'BetweenSpecifiedDates' is used, both the <b>BeginDate</b> and <b>EndDate</b> must be included.
        /// </param>
        ///
        /// <param name="Pagination">
        /// This container is used to control how many account entries are returned on each page of data in the response. <b>PaginationType</b> is used by numerous Trading API calls, and the default and maximum values for the <b>EntriesPerPage</b> field differs with each call. For the <b>GetAccount</b> call, the default value is 500 (account entries) per page, and maximum allowed value is 2000 (account entries) per page.
        /// </param>
        ///
        /// <param name="ExcludeBalance">
        /// By default, the current balance of the user's account will not be returned in the call response. To retrieve the current balance of their account, the user should include the <b>ExcludeBalance</b> flag in the request and set its value to 'false'. The current balance on the account will be shown in the <b>AccountSummary.CurrentBalance</b> field in the call response.
        /// </param>
        ///
        /// <param name="ExcludeSummary">
        /// Specifies whether to return account summary information in an
        /// AccountSummary node. Default is true, to return AccountSummary.
        /// </param>
        ///
        /// <param name="IncludeConversionRate">
        /// Specifies whether to retrieve the rate used for the currency conversion for usage transactions.
        /// </param>
        ///
        /// <param name="AccountEntrySortType">
        /// Specifies how account entries should be sorted in the response, by an
        /// element and then in ascending or descending order.
        /// </param>
        ///
        /// <param name="Currency">
        /// Specifies the currency used in the account report. Do not specify Currency
        /// in the request unless the following conditions are met. First, the user has
        /// or had multiple accounts under the same UserID. Second, the account
        /// identified in the request uses the currency you specify in the request. An
        /// error is returned if no account is found that uses the currency you specify
        /// in the request.
        /// </param>
        ///
        /// <param name="ItemID">
        /// Specifies the item ID for which to return account entries. If ItemID is
        /// used, all other filters in the request are ignored. If the specified item
        /// does not exist or if the requesting user is not the seller of the item, an
        /// error is returned.
        /// </param>
        ///
        public AccountEntryTypeCollection GetAccount(AccountHistorySelectionCodeType AccountHistorySelection, DateTime InvoiceDate, DateTime BeginDate, DateTime EndDate, PaginationType Pagination, bool ExcludeBalance, bool ExcludeSummary, bool IncludeConversionRate, AccountEntrySortTypeCodeType AccountEntrySortType, CurrencyCodeType Currency, string ItemID)
        {
            this.AccountHistorySelection = AccountHistorySelection;
            this.InvoiceDate = InvoiceDate;
            this.BeginDate = BeginDate;
            this.EndDate = EndDate;
            this.Pagination = Pagination;
            this.ExcludeBalance = ExcludeBalance;
            this.ExcludeSummary = ExcludeSummary;
            this.IncludeConversionRate = IncludeConversionRate;
            this.AccountEntrySortType = AccountEntrySortType;
            this.Currency = Currency;
            this.ItemID = ItemID;

            Execute();
            return ApiResponse.AccountEntries.AccountEntry;
        }