ClubManager.Api

<back to all web services

WebService.GetHeaderMenuRequest

Requires Authentication
The following routes are available for this service:
POST,GET/api/Web/GetHeaderMenu
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

// @Flags()
class Feature
{
    static const Feature None = const Feature._(0);
    static const Feature Standard = const Feature._(1);
    static const Feature Bookings = const Feature._(2);
    static const Feature Rota = const Feature._(4);
    static const Feature GoCardless = const Feature._(8);
    static const Feature HomeScreen = const Feature._(16);
    static const Feature EPos = const Feature._(32);
    static const Feature Attendance = const Feature._(64);
    static const Feature Sales = const Feature._(128);
    static const Feature PaymentCollections = const Feature._(256);
    static const Feature MailChimp = const Feature._(512);
    static const Feature MultiSite = const Feature._(1024);
    static const Feature AccountingDashboard = const Feature._(2048);
    static const Feature OtherDashboards = const Feature._(4096);
    static const Feature Reports = const Feature._(8192);
    static const Feature AdvancedAccounting = const Feature._(16384);
    static const Feature MemberLicenseDates = const Feature._(32768);
    static const Feature FaceRecognition = const Feature._(65536);
    static const Feature MemberAccountCreation = const Feature._(131072);
    static const Feature Automation = const Feature._(262144);
    static const Feature FacebookMarketing = const Feature._(524288);
    static const Feature Grades = const Feature._(1048576);
    static const Feature ZoomIntegration = const Feature._(2097152);
    static const Feature SalesTargetChart = const Feature._(4194304);
    static const Feature CustomApp = const Feature._(8388608);
    static const Feature CustomAttributesOnPortal = const Feature._(16777216);
    static const Feature NoExport = const Feature._(33554432);
    static const Feature EnterpriseClubPerformanceDashboards = const Feature._(67108864);

    final int _value;
    const Feature._(this._value);
    int get value => _value;
    static List<Feature> get values => const [None,Standard,Bookings,Rota,GoCardless,HomeScreen,EPos,Attendance,Sales,PaymentCollections,MailChimp,MultiSite,AccountingDashboard,OtherDashboards,Reports,AdvancedAccounting,MemberLicenseDates,FaceRecognition,MemberAccountCreation,Automation,FacebookMarketing,Grades,ZoomIntegration,SalesTargetChart,CustomApp,CustomAttributesOnPortal,NoExport,EnterpriseClubPerformanceDashboards];
}

class SubHeaderMenuItem implements IConvertible
{
    String? Name;
    String? Description;
    String? Url;
    String? Icon;
    List<String>? Roles;
    Feature? Feature;
    bool? HideForCMGo;
    bool? ShowFeatureUnavailable;
    bool? HasIcon;
    bool? HasFontAwesomeIcon;

    SubHeaderMenuItem({this.Name,this.Description,this.Url,this.Icon,this.Roles,this.Feature,this.HideForCMGo,this.ShowFeatureUnavailable,this.HasIcon,this.HasFontAwesomeIcon});
    SubHeaderMenuItem.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Name = json['Name'];
        Description = json['Description'];
        Url = json['Url'];
        Icon = json['Icon'];
        Roles = JsonConverters.fromJson(json['Roles'],'List<String>',context!);
        Feature = JsonConverters.fromJson(json['Feature'],'Feature',context!);
        HideForCMGo = json['HideForCMGo'];
        ShowFeatureUnavailable = json['ShowFeatureUnavailable'];
        HasIcon = json['HasIcon'];
        HasFontAwesomeIcon = json['HasFontAwesomeIcon'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Name': Name,
        'Description': Description,
        'Url': Url,
        'Icon': Icon,
        'Roles': JsonConverters.toJson(Roles,'List<String>',context!),
        'Feature': JsonConverters.toJson(Feature,'Feature',context!),
        'HideForCMGo': HideForCMGo,
        'ShowFeatureUnavailable': ShowFeatureUnavailable,
        'HasIcon': HasIcon,
        'HasFontAwesomeIcon': HasFontAwesomeIcon
    };

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

class HeaderMenuItem implements IConvertible
{
    String? Name;
    String? Url;
    bool? IsCurrent;
    Feature? Feature;
    bool? HideFeature;
    List<String>? Roles;
    List<SubHeaderMenuItem>? SubHeaderMenuItems;

    HeaderMenuItem({this.Name,this.Url,this.IsCurrent,this.Feature,this.HideFeature,this.Roles,this.SubHeaderMenuItems});
    HeaderMenuItem.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Name = json['Name'];
        Url = json['Url'];
        IsCurrent = json['IsCurrent'];
        Feature = JsonConverters.fromJson(json['Feature'],'Feature',context!);
        HideFeature = json['HideFeature'];
        Roles = JsonConverters.fromJson(json['Roles'],'List<String>',context!);
        SubHeaderMenuItems = JsonConverters.fromJson(json['SubHeaderMenuItems'],'List<SubHeaderMenuItem>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Name': Name,
        'Url': Url,
        'IsCurrent': IsCurrent,
        'Feature': JsonConverters.toJson(Feature,'Feature',context!),
        'HideFeature': HideFeature,
        'Roles': JsonConverters.toJson(Roles,'List<String>',context!),
        'SubHeaderMenuItems': JsonConverters.toJson(SubHeaderMenuItems,'List<SubHeaderMenuItem>',context!)
    };

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

class HeaderMenu implements IConvertible
{
    String? Header;
    List<HeaderMenuItem>? HeaderMenuItems;

    HeaderMenu({this.Header,this.HeaderMenuItems});
    HeaderMenu.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'Header': Header,
        'HeaderMenuItems': JsonConverters.toJson(HeaderMenuItems,'List<HeaderMenuItem>',context!)
    };

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

TypeContext _ctx = TypeContext(library: 'api.clubmanagercentral.com', types: <String, TypeInfo> {
    'Feature': TypeInfo(TypeOf.Enum, enumValues:Feature.values),
    'SubHeaderMenuItem': TypeInfo(TypeOf.Class, create:() => SubHeaderMenuItem()),
    'HeaderMenuItem': TypeInfo(TypeOf.Class, create:() => HeaderMenuItem()),
    'List<SubHeaderMenuItem>': TypeInfo(TypeOf.Class, create:() => <SubHeaderMenuItem>[]),
    'HeaderMenu': TypeInfo(TypeOf.Class, create:() => HeaderMenu()),
    'List<HeaderMenuItem>': TypeInfo(TypeOf.Class, create:() => <HeaderMenuItem>[]),
});

Dart WebService.GetHeaderMenuRequest DTOs

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

HTTP + XML

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

POST /api/Web/GetHeaderMenu HTTP/1.1 
Host: api.clubmanagercentral.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<WebService.GetHeaderMenuRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubManager.Api.Services">
  <MemberId>0</MemberId>
  <UserId>0</UserId>
</WebService.GetHeaderMenuRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<HeaderMenu xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubManager.Interfaces.Models.UI">
  <Header>String</Header>
  <HeaderMenuItems>
    <HeaderMenuItem>
      <Feature>None</Feature>
      <HideFeature>false</HideFeature>
      <IsCurrent>false</IsCurrent>
      <Name>String</Name>
      <Roles xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </Roles>
      <SubHeaderMenuItems>
        <SubHeaderMenuItem>
          <Description>String</Description>
          <Feature>None</Feature>
          <HideForCMGo>false</HideForCMGo>
          <Icon>String</Icon>
          <Name>String</Name>
          <Roles xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
            <d6p1:string>String</d6p1:string>
          </Roles>
          <ShowFeatureUnavailable>false</ShowFeatureUnavailable>
          <Url>String</Url>
        </SubHeaderMenuItem>
      </SubHeaderMenuItems>
      <Url>String</Url>
    </HeaderMenuItem>
  </HeaderMenuItems>
</HeaderMenu>