private void OnSuccessCallback(GetUserSellOffersRequest.Response response, GetUserSellOffersRequest.RequestParams request) { var answer = response; var modelsList = new List <MarketItemModel>(); foreach (var itemInfo in answer.Items) { var itemModel = new MarketItemModel { SellOfferId = itemInfo.sellOfferId, Tittle = itemInfo.title, ImageUrl = itemInfo.imageUrl, Created = IntToDateTime(itemInfo.created), Fee = itemInfo.fee, Price = itemInfo.price, Status = SellOfferStatusTypeExtentions.GetSellOfferStatusType(itemInfo.status) }; itemModel.Fee.Currency = itemModel.Price.Currency; // TODO: workaround. wait backend. modelsList.Add(itemModel); } CommandResult = new LoadMarketItemsCommandResult(modelsList, answer.total); Terminate(true); }
private void MarketFlow_LoadSellfOffersRequestCallback(GetUserSellOffersRequest.Response result, GetUserSellOffersRequest.RequestParams request) { Debug.Log(string.Format("LoadSellfOffers request after CreateSellOffer completed. Total Items Count: {0}", result.Items.Count)); StartCoroutine(EditSellOfferRequest()); }
private void MarketFlow_LoadSellfOffersTwoRequestCallback(GetUserSellOffersRequest.Response result, GetUserSellOffersRequest.RequestParams request) { Debug.Log(string.Format("LoadSellfOffers request after CancelSellOffer completed. Total Items Count: {0}", result.Items.Count)); ShowingItemsInfo _loadParameters = new ShowingItemsInfo(); _clientApi.LoadMarketInventoryRequest(_loadParameters.Limit, _loadParameters.Offset, _loadParameters.SearchPattern, MarketFlow_LoadMarketInventoryRequestCallback, OnErrorCallback); }