Ejemplo n.º 1
0
        public Task<LocationSearchResponse> Search(Position position, OptionalLocationSearchFilters filters, int page = 0, int take = 10)
        {
            dynamic postObject = new ExpandoObject();
            postObject.page = page;
            postObject.take = take;
            postObject.latitude = position.latitude;
            postObject.longitude = position.longitude;

            if (filters != null)
            {
                if (filters.creditcards.HasValue)
                {
                    postObject.creditcards = filters.creditcards.Value;
                }

                if (filters.delivery.HasValue)
                {
                    postObject.delivery = filters.delivery.Value;
                }

                if (filters.hasclones.HasValue)
                {
                    postObject.hasclones = filters.hasclones.Value;
                }

                if (filters.hasconcentrates.HasValue)
                {
                    postObject.hasconcentrates = filters.hasconcentrates.Value;
                }

                if (filters.hasedibles.HasValue)
                {
                    postObject.hasedibles = filters.hasedibles.Value;
                }

                if (filters.medical.HasValue)
                {
                    postObject.medical = filters.medical.Value;
                }

                if (filters.retail.HasValue)
                {
                    postObject.retail = filters.retail.Value;
                }

                if (filters.storefront.HasValue)
                {
                    postObject.storefront = filters.storefront.Value;
                }

                if (filters.strainIds != null && filters.strainIds.Count > 0)
                {
                    postObject.strainIds = filters.strainIds;
                }

                if (filters.veterandiscount.HasValue)
                {
                    postObject.veterandiscount = filters.veterandiscount.Value;
                }
            }

            return factory.PostLocationClientAndReadAsAsync<LocationSearchResponse, dynamic>(String.Empty, postObject);
        }
 public Task<LocationSearchResponse> Search(Position position, OptionalLocationSearchFilters filters, int page = 0, int take = 10)
 {
     throw new NotImplementedException();
 }