ConsumerApi

<back to all web services

FindAvailableFilterRequest

Consumer
Requires Authentication
Required role:Consumer
The following routes are available for this service:
GET/find/filtering
<?php namespace ConsumerApi;

use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};


enum Parking : string
{
    case StreetParking = 'StreetParking';
    case ParkingGarageNearby = 'ParkingGarageNearby';
}

enum PaymentOption : string
{
    case Visa = 'Visa';
    case MasterCard = 'MasterCard';
    case AmericanExpress = 'AmericanExpress';
    case Diners = 'Diners';
    case Vipps = 'Vipps';
}

enum PriceMainDish : string
{
    case Value = 'Value';
    case Medium = 'Medium';
    case High = 'High';
    case FineDining = 'FineDining';
}

enum DayOfWeek : string
{
    case Sunday = 'Sunday';
    case Monday = 'Monday';
    case Tuesday = 'Tuesday';
    case Wednesday = 'Wednesday';
    case Thursday = 'Thursday';
    case Friday = 'Friday';
    case Saturday = 'Saturday';
}

class OpenAtTimeDto implements JsonSerializable
{
    public function __construct(
        /** @var DayOfWeek|null */
        public ?DayOfWeek $weekDay=null,
        /** @var int */
        public int $hour=0,
        /** @var int */
        public int $minute=0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['weekDay'])) $this->weekDay = JsonConverters::from('DayOfWeek', $o['weekDay']);
        if (isset($o['hour'])) $this->hour = $o['hour'];
        if (isset($o['minute'])) $this->minute = $o['minute'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->weekDay)) $o['weekDay'] = JsonConverters::to('DayOfWeek', $this->weekDay);
        if (isset($this->hour)) $o['hour'] = $this->hour;
        if (isset($this->minute)) $o['minute'] = $this->minute;
        return empty($o) ? new class(){} : $o;
    }
}

class BarTypeEsDto implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $slug='',
        /** @var string */
        public string $title=''
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['slug'])) $this->slug = $o['slug'];
        if (isset($o['title'])) $this->title = $o['title'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->slug)) $o['slug'] = $this->slug;
        if (isset($this->title)) $o['title'] = $this->title;
        return empty($o) ? new class(){} : $o;
    }
}

class BarSpecialityEsDto implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $slug='',
        /** @var string */
        public string $title=''
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['slug'])) $this->slug = $o['slug'];
        if (isset($o['title'])) $this->title = $o['title'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->slug)) $o['slug'] = $this->slug;
        if (isset($this->title)) $o['title'] = $this->title;
        return empty($o) ? new class(){} : $o;
    }
}

class BrandApiDto implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $name=''
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['name'])) $this->name = $o['name'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->name)) $o['name'] = $this->name;
        return empty($o) ? new class(){} : $o;
    }
}

class CuisineEsDto implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $label='',
        /** @var string */
        public string $slug=''
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['label'])) $this->label = $o['label'];
        if (isset($o['slug'])) $this->slug = $o['slug'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->label)) $o['label'] = $this->label;
        if (isset($this->slug)) $o['slug'] = $this->slug;
        return empty($o) ? new class(){} : $o;
    }
}

class MealTypeApiDto implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $label='',
        /** @var string */
        public string $slug=''
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['label'])) $this->label = $o['label'];
        if (isset($o['slug'])) $this->slug = $o['slug'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->label)) $o['label'] = $this->label;
        if (isset($this->slug)) $o['slug'] = $this->slug;
        return empty($o) ? new class(){} : $o;
    }
}

class EatingSuitabilityApiDto implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $label='',
        /** @var string */
        public string $slug=''
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['label'])) $this->label = $o['label'];
        if (isset($o['slug'])) $this->slug = $o['slug'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->label)) $o['label'] = $this->label;
        if (isset($this->slug)) $o['slug'] = $this->slug;
        return empty($o) ? new class(){} : $o;
    }
}

class ParkingApiDto implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $label='',
        /** @var Parking|null */
        public ?Parking $slug=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['label'])) $this->label = $o['label'];
        if (isset($o['slug'])) $this->slug = JsonConverters::from('Parking', $o['slug']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->label)) $o['label'] = $this->label;
        if (isset($this->slug)) $o['slug'] = JsonConverters::to('Parking', $this->slug);
        return empty($o) ? new class(){} : $o;
    }
}

class PaymentOptionApiDto implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $label='',
        /** @var PaymentOption|null */
        public ?PaymentOption $slug=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['label'])) $this->label = $o['label'];
        if (isset($o['slug'])) $this->slug = JsonConverters::from('PaymentOption', $o['slug']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->label)) $o['label'] = $this->label;
        if (isset($this->slug)) $o['slug'] = JsonConverters::to('PaymentOption', $this->slug);
        return empty($o) ? new class(){} : $o;
    }
}

class PriceMainDishApiDto implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $title='',
        /** @var PriceMainDish|null */
        public ?PriceMainDish $slug=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['title'])) $this->title = $o['title'];
        if (isset($o['slug'])) $this->slug = JsonConverters::from('PriceMainDish', $o['slug']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->title)) $o['title'] = $this->title;
        if (isset($this->slug)) $o['slug'] = JsonConverters::to('PriceMainDish', $this->slug);
        return empty($o) ? new class(){} : $o;
    }
}

class TakeAwayApiDto implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $label='',
        /** @var string */
        public string $slug=''
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['label'])) $this->label = $o['label'];
        if (isset($o['slug'])) $this->slug = $o['slug'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->label)) $o['label'] = $this->label;
        if (isset($this->slug)) $o['slug'] = $this->slug;
        return empty($o) ? new class(){} : $o;
    }
}

class WearPriceProfileEsDto implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $slug='',
        /** @var string */
        public string $label=''
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['slug'])) $this->slug = $o['slug'];
        if (isset($o['label'])) $this->label = $o['label'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->slug)) $o['slug'] = $this->slug;
        if (isset($this->label)) $o['label'] = $this->label;
        return empty($o) ? new class(){} : $o;
    }
}

enum FeatureType : string
{
    case BarSpeciality = 'BarSpeciality';
    case BarType = 'BarType';
    case Cuisine = 'Cuisine';
    case SaveFoodAndMoney = 'SaveFoodAndMoney';
    case MealType = 'MealType';
    case Menu = 'Menu';
    case OutdoorSeating = 'OutdoorSeating';
    case Parking = 'Parking';
    case PaymentOptions = 'PaymentOptions';
    case PriceMainDish = 'PriceMainDish';
    case SubCategories = 'SubCategories';
    case SubCategoriesAndBrands = 'SubCategoriesAndBrands';
    case EatingSuitabilities = 'EatingSuitabilities';
    case TakeAway = 'TakeAway';
    case WearPriceProfile = 'WearPriceProfile';
    case WheelChairAccessible = 'WheelChairAccessible';
    case Wifi = 'Wifi';
    case WebShop = 'WebShop';
    case Filtering = 'Filtering';
}

PHP FindAvailableFilterRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /find/filtering HTTP/1.1 
Host: unstable-consumer-api.brovs.com 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"barTypes":[{"count":0,"slug":"String","title":"String"}],"barSpecialities":[{"count":0,"slug":"String","title":"String"}],"brands":[{"count":0,"name":"String"}],"cuisines":[{"count":0,"label":"String","slug":"String"}],"mealType":[{"count":0,"label":"String","slug":"String"}],"eatingSuitabilities":[{"count":0,"label":"String","slug":"String"}],"parkings":[{"count":0,"label":"String","slug":"StreetParking"}],"paymentOptions":[{"count":0,"label":"String","slug":"Visa"}],"priceMainDishes":[{"count":0,"title":"String","slug":"Value"}],"takeAways":[{"count":0,"label":"String","slug":"String"}],"wearPriceProfiles":[{"count":0,"slug":"String","label":"String"}],"categories":[{"name":"String","slug":"String","absoluteSlug":"String","featureTypes":["BarSpeciality"],"type":"Parent","count":0,"imageUrl":"String","allImageUrl":"String","iconImageUrl":"String","position":0,"children":[{"name":"String","slug":"String","absoluteSlug":"String","featureTypes":["BarSpeciality"],"type":"Parent","count":0,"imageUrl":"String","allImageUrl":"String","iconImageUrl":"String","position":0,"children":[{"name":"String","slug":"String","absoluteSlug":"String","featureTypes":["BarSpeciality"],"type":"Parent","count":0,"imageUrl":"String","allImageUrl":"String","iconImageUrl":"String","position":0}]}]}]}