BusinessApi

<back to all web services

GetNearByMallRequest

Business
Requires Authentication
Required role:Business
The following routes are available for this service:
GET/place/get_nearby_mall

library BusinessApi;
import 'package:servicestack/servicestack.dart';

class OpeningHour implements IConvertible
{
    int? openAtHour;
    int? openAtMinute;
    int? closeAtHour;
    int? closeAtMinute;

    OpeningHour({this.openAtHour,this.openAtMinute,this.closeAtHour,this.closeAtMinute});
    OpeningHour.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        openAtHour = json['openAtHour'];
        openAtMinute = json['openAtMinute'];
        closeAtHour = json['closeAtHour'];
        closeAtMinute = json['closeAtMinute'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'openAtHour': openAtHour,
        'openAtMinute': openAtMinute,
        'closeAtHour': closeAtHour,
        'closeAtMinute': closeAtMinute
    };

    getTypeName() => "OpeningHour";
    TypeContext? context = _ctx;
}

class WeeklyOpeningHours implements IConvertible
{
    OpeningHour? monday;
    OpeningHour? tuesday;
    OpeningHour? wednesday;
    OpeningHour? thursday;
    OpeningHour? friday;
    OpeningHour? saturday;
    OpeningHour? sunday;

    WeeklyOpeningHours({this.monday,this.tuesday,this.wednesday,this.thursday,this.friday,this.saturday,this.sunday});
    WeeklyOpeningHours.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        monday = JsonConverters.fromJson(json['monday'],'OpeningHour',context!);
        tuesday = JsonConverters.fromJson(json['tuesday'],'OpeningHour',context!);
        wednesday = JsonConverters.fromJson(json['wednesday'],'OpeningHour',context!);
        thursday = JsonConverters.fromJson(json['thursday'],'OpeningHour',context!);
        friday = JsonConverters.fromJson(json['friday'],'OpeningHour',context!);
        saturday = JsonConverters.fromJson(json['saturday'],'OpeningHour',context!);
        sunday = JsonConverters.fromJson(json['sunday'],'OpeningHour',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'monday': JsonConverters.toJson(monday,'OpeningHour',context!),
        'tuesday': JsonConverters.toJson(tuesday,'OpeningHour',context!),
        'wednesday': JsonConverters.toJson(wednesday,'OpeningHour',context!),
        'thursday': JsonConverters.toJson(thursday,'OpeningHour',context!),
        'friday': JsonConverters.toJson(friday,'OpeningHour',context!),
        'saturday': JsonConverters.toJson(saturday,'OpeningHour',context!),
        'sunday': JsonConverters.toJson(sunday,'OpeningHour',context!)
    };

    getTypeName() => "WeeklyOpeningHours";
    TypeContext? context = _ctx;
}

class OpeningHours implements IConvertible
{
    WeeklyOpeningHours? weekly;

    OpeningHours({this.weekly});
    OpeningHours.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        weekly = JsonConverters.fromJson(json['weekly'],'WeeklyOpeningHours',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'weekly': JsonConverters.toJson(weekly,'WeeklyOpeningHours',context!)
    };

    getTypeName() => "OpeningHours";
    TypeContext? context = _ctx;
}

enum PlaceType
{
    Mall,
    Regular,
}

class PlaceContact implements IConvertible
{
    String? phone;
    String? email;
    String? website;
    String? webShop;

    PlaceContact({this.phone,this.email,this.website,this.webShop});
    PlaceContact.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        phone = json['phone'];
        email = json['email'];
        website = json['website'];
        webShop = json['webShop'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'phone': phone,
        'email': email,
        'website': website,
        'webShop': webShop
    };

    getTypeName() => "PlaceContact";
    TypeContext? context = _ctx;
}

class PlaceAddress implements IConvertible
{
    String? street;
    String? postalCode;
    String? region;
    String? countryCode;

    PlaceAddress({this.street,this.postalCode,this.region,this.countryCode});
    PlaceAddress.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        street = json['street'];
        postalCode = json['postalCode'];
        region = json['region'];
        countryCode = json['countryCode'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'street': street,
        'postalCode': postalCode,
        'region': region,
        'countryCode': countryCode
    };

    getTypeName() => "PlaceAddress";
    TypeContext? context = _ctx;
}

class TimeZoneDto implements IConvertible
{
    Duration? baseUtcOffset;
    String? daylightName;
    String? displayName;
    String? id;
    String? standardName;
    bool? supportsDaylightSavingTime;

    TimeZoneDto({this.baseUtcOffset,this.daylightName,this.displayName,this.id,this.standardName,this.supportsDaylightSavingTime});
    TimeZoneDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        baseUtcOffset = JsonConverters.fromJson(json['baseUtcOffset'],'Duration',context!);
        daylightName = json['daylightName'];
        displayName = json['displayName'];
        id = json['id'];
        standardName = json['standardName'];
        supportsDaylightSavingTime = json['supportsDaylightSavingTime'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'baseUtcOffset': JsonConverters.toJson(baseUtcOffset,'Duration',context!),
        'daylightName': daylightName,
        'displayName': displayName,
        'id': id,
        'standardName': standardName,
        'supportsDaylightSavingTime': supportsDaylightSavingTime
    };

    getTypeName() => "TimeZoneDto";
    TypeContext? context = _ctx;
}

enum PriceMainDish
{
    Value,
    Medium,
    High,
    FineDining,
}

class PriceMainDishDto implements IConvertible
{
    String? title;
    PriceMainDish? slug;

    PriceMainDishDto({this.title,this.slug});
    PriceMainDishDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        title = json['title'];
        slug = JsonConverters.fromJson(json['slug'],'PriceMainDish',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'title': title,
        'slug': JsonConverters.toJson(slug,'PriceMainDish',context!)
    };

    getTypeName() => "PriceMainDishDto";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'BusinessApi', types: <String, TypeInfo> {
    'OpeningHour': TypeInfo(TypeOf.Class, create:() => OpeningHour()),
    'WeeklyOpeningHours': TypeInfo(TypeOf.Class, create:() => WeeklyOpeningHours()),
    'OpeningHours': TypeInfo(TypeOf.Class, create:() => OpeningHours()),
    'PlaceType': TypeInfo(TypeOf.Enum, enumValues:PlaceType.values),
    'PlaceContact': TypeInfo(TypeOf.Class, create:() => PlaceContact()),
    'PlaceAddress': TypeInfo(TypeOf.Class, create:() => PlaceAddress()),
    'TimeZoneDto': TypeInfo(TypeOf.Class, create:() => TimeZoneDto()),
    'PriceMainDish': TypeInfo(TypeOf.Enum, enumValues:PriceMainDish.values),
    'PriceMainDishDto': TypeInfo(TypeOf.Class, create:() => PriceMainDishDto()),
});

Dart GetNearByMallRequest 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 /place/get_nearby_mall HTTP/1.1 
Host: business-api.brovs.com 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"malls":[{"id":0,"name":"String","businessId":0,"longitude":0,"latitude":0,"claimed":false,"organizationNumber":"String","countryCode":"String","overview":"String","openingHours":{"weekly":{"monday":{"openAtHour":0,"openAtMinute":0,"closeAtHour":0,"closeAtMinute":0},"tuesday":{"openAtHour":0,"openAtMinute":0,"closeAtHour":0,"closeAtMinute":0},"wednesday":{"openAtHour":0,"openAtMinute":0,"closeAtHour":0,"closeAtMinute":0},"thursday":{"openAtHour":0,"openAtMinute":0,"closeAtHour":0,"closeAtMinute":0},"friday":{"openAtHour":0,"openAtMinute":0,"closeAtHour":0,"closeAtMinute":0},"saturday":{"openAtHour":0,"openAtMinute":0,"closeAtHour":0,"closeAtMinute":0},"sunday":{"openAtHour":0,"openAtMinute":0,"closeAtHour":0,"closeAtMinute":0}}},"placeType":"Mall","contact":{"phone":"String","email":"String","website":"String","webShop":"String"},"address":{"street":"String","postalCode":"String","region":"String","countryCode":"String"},"wheelChairAccessible":false,"wifi":false,"outdoorSeating":false,"saveFoodAndMoney":false,"timeZoneDto":{"baseUtcOffset":"PT0S","daylightName":"String","displayName":"String","id":"String","standardName":"String","supportsDaylightSavingTime":false},"priceMainDish":{"title":"String","slug":"Value"},"otherServices":[{"id":0,"serviceName":"String","floor":"String"}],"floor":"String"}]}