Required role: | Consumer |
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 .xml suffix or ?format=xml
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: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <FindAvailableFilterResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ConsumerApi.Dto"> <BarSpecialities> <BarSpecialityCountDto> <Slug xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Slug> <Title xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Title> <Count>0</Count> </BarSpecialityCountDto> </BarSpecialities> <BarTypes> <BarTypeCountDto> <Slug xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Slug> <Title xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Title> <Count>0</Count> </BarTypeCountDto> </BarTypes> <Brands> <BrandCountDto> <Name xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Name> <Count>0</Count> </BrandCountDto> </Brands> <Categories> <CategoryFacetTreeDto> <AbsoluteSlug>String</AbsoluteSlug> <AllImageUrl>String</AllImageUrl> <Children> <CategoryFacetTreeDto> <AbsoluteSlug>String</AbsoluteSlug> <AllImageUrl>String</AllImageUrl> <Children> <CategoryFacetTreeDto> <AbsoluteSlug>String</AbsoluteSlug> <AllImageUrl>String</AllImageUrl> <Children i:nil="true" /> <Count>0</Count> <FeatureTypes xmlns:d8p1="http://schemas.datacontract.org/2004/07/Entities.Database"> <d8p1:FeatureType>BarSpeciality</d8p1:FeatureType> </FeatureTypes> <IconImageUrl>String</IconImageUrl> <ImageUrl>String</ImageUrl> <Name>String</Name> <Position>0</Position> <Slug>String</Slug> <Type>Parent</Type> </CategoryFacetTreeDto> </Children> <Count>0</Count> <FeatureTypes xmlns:d6p1="http://schemas.datacontract.org/2004/07/Entities.Database"> <d6p1:FeatureType>BarSpeciality</d6p1:FeatureType> </FeatureTypes> <IconImageUrl>String</IconImageUrl> <ImageUrl>String</ImageUrl> <Name>String</Name> <Position>0</Position> <Slug>String</Slug> <Type>Parent</Type> </CategoryFacetTreeDto> </Children> <Count>0</Count> <FeatureTypes xmlns:d4p1="http://schemas.datacontract.org/2004/07/Entities.Database"> <d4p1:FeatureType>BarSpeciality</d4p1:FeatureType> </FeatureTypes> <IconImageUrl>String</IconImageUrl> <ImageUrl>String</ImageUrl> <Name>String</Name> <Position>0</Position> <Slug>String</Slug> <Type>Parent</Type> </CategoryFacetTreeDto> </Categories> <Cuisines> <CuisineCountDto> <Label xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Label> <Slug xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Slug> <Count>0</Count> </CuisineCountDto> </Cuisines> <EatingSuitabilities> <EatingSuitabilityCountDto> <Label xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Label> <Slug xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Slug> <Count>0</Count> </EatingSuitabilityCountDto> </EatingSuitabilities> <MealType> <MealTypeCountDto> <Label xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Label> <Slug xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Slug> <Count>0</Count> </MealTypeCountDto> </MealType> <Parkings> <ParkingCountDto> <Label xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Label> <Slug xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">StreetParking</Slug> <Count>0</Count> </ParkingCountDto> </Parkings> <PaymentOptions> <PaymentOptionCountDto> <Label xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Label> <Slug xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">Visa</Slug> <Count>0</Count> </PaymentOptionCountDto> </PaymentOptions> <PriceMainDishes> <PriceMainDishCountDto> <Slug xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">Value</Slug> <Title xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Title> <Count>0</Count> </PriceMainDishCountDto> </PriceMainDishes> <TakeAways> <TakeAwayCountDto> <Label xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Label> <Slug xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Slug> <Count>0</Count> </TakeAwayCountDto> </TakeAways> <WearPriceProfiles> <WearPriceProfileCountDto> <Label xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Label> <Slug xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Slug> <Count>0</Count> </WearPriceProfileCountDto> </WearPriceProfiles> </FindAvailableFilterResponse>