c# - ebay GetOrders API using OutputSelector and SortOrder - .Net SDK -


i using ebay .net sdk. working fine except following requirements:

  1. using of outputselector boost performance
  2. unable use sortingorder, while showing records.
  3. total income/amount sold specified time range i.e. total amount across calls of pagination without looping through pages , aggregating manually.

here code using:

var apicall = new getorderscall(context); //apicall.apirequest.outputselector = new stringcollection(new string[] { "order.orderid", "order.total" }); apicall.apirequest.pagination = new paginationtype {     entriesperpage = util.recordsperpage(),     pagenumber = int.parse(request.form["pagenumber"]) }; var fltr = new timefilter(convert.todatetime(request.form["datefrom"] + "t00:00:00.000z"), convert.todatetime(request.form["dateto"] + "t23:59:59.999z")); var statuscodetype = (orderstatuscodetype)enum.parse(typeof(orderstatuscodetype), request.form["statuscode"]); var orders = apicall.getorders(fltr, tradingrolecodetype.seller, statuscodetype); 

please assist me how use these 3 functionality well.

after efforts got way it:

var request = new getordersrequesttype {     //outputselector = new stringcollection {"orderid","total"},     createtimefrom = convert.todatetime(request.form["datefrom"] + "t00:00:00.000z"),     createtimeto = convert.todatetime(request.form["dateto"] + "t23:59:59.999z"),     orderstatus = (orderstatuscodetype)enum.parse(typeof(orderstatuscodetype), request.form["statuscode"]),     orderrole = tradingrolecodetype.seller,     pagination = new paginationtype         {             entriesperpage = util.recordsperpage(),             pagenumber = int.parse(request.form["pagenumber"])         } };  var apicall = new getorderscall(context)     {         apirequest = request,         outputselector =             new string[]                 {                     "orderid", "total", "paidtime", "ebaypaymentstatus",                     "paymentmethod", "title", "pagenumber", "paginationresult.totalnumberofpages"                 }     };  apicall.execute(); var orders = apicall.apiresponse.orderarray; 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -