BokaMera.API.Host

<back to all web services

SystemSettingQuery

The following routes are available for this service:
GET/settings/systemGet system settings for the currently logged in userGet system settings for the currently logged in user.
import 'package:servicestack/servicestack.dart';

class LanguageResponse implements IConvertible
{
    String? Id;
    String? Name;

    LanguageResponse({this.Id,this.Name});
    LanguageResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Name = json['Name'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Name': Name
    };

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

class SystemSettingsResponse implements IConvertible
{
    /**
    * The country options to choose from
    */
    // @ApiMember(Description="The country options to choose from")
    List<LanguageResponse>? LanguageOptions;

    /**
    * If the booking is active or not
    */
    // @ApiMember(DataType="bool", Description="If the booking is active or not")
    bool? Active;

    /**
    * If the booking is not active, what message to show to the customers
    */
    // @ApiMember(DataType="string", Description="If the booking is not active, what message to show to the customers")
    String? InactiveMessage;

    /**
    * If the company should be visible in search results on hompage
    */
    // @ApiMember(DataType="bool", Description="If the company should be visible in search results on hompage")
    bool? Searchable;

    /**
    * If you have a google analytics account and want to track your customers behaviors.
    */
    // @ApiMember(DataType="string", Description="If you have a google analytics account and want to track your customers behaviors.")
    String? GATrackingId;

    /**
    * If you have a google Ads Conversion Id account and want to track your customers behaviors.
    */
    // @ApiMember(DataType="string", Description="If you have a google Ads Conversion Id account and want to track your customers behaviors.")
    String? GoogleAdsConversionId;

    /**
    * If you have a LinkedIn account and want to track your customers behaviors.
    */
    // @ApiMember(DataType="string", Description="If you have a LinkedIn account and want to track your customers behaviors.")
    String? LinkedinTagId;

    /**
    * If you have a Google Ads Conversion Label and want to track your customers behaviors.
    */
    // @ApiMember(DataType="string", Description="If you have a Google Ads Conversion Label and want to track your customers behaviors.")
    String? GoogleAdsConversionLabel;

    /**
    * If you have a google tag manager account and want to track your customers behaviors.
    */
    // @ApiMember(DataType="string", Description="If you have a google tag manager account and want to track your customers behaviors.")
    String? GTMTrackingId;

    /**
    * If you have a facebook account and want to track your customers behaviors.
    */
    // @ApiMember(DataType="string", Description="If you have a facebook account and want to track your customers behaviors.")
    String? FacebookPixelId;

    /**
    * If the company should be visible on the marketplace
    */
    // @ApiMember(DataType="bool", Description="If the company should be visible on the marketplace")
    bool? ShowOnMarketplace;

    /**
    * If you want your customers to be albe to change language on your homepage
    */
    // @ApiMember(DataType="bool", Description="If you want your customers to be albe to change language on your homepage")
    bool? MultiLanguage;

    /**
    * If you want your own written text on your homepage to be translated using google analytics when a user changes language
    */
    // @ApiMember(DataType="bool", Description="If you want your own written text on your homepage to be translated using google analytics when a user changes language")
    bool? EnableAPITranslation;

    /**
    * What is the standard language your homepage information is written in. Select from the different countries, ie. SE,NO,EN
    */
    // @ApiMember(DataType="string", Description="What is the standard language your homepage information is written in. Select from the different countries, ie. SE,NO,EN")
    String? DefaultLanguage;

    /**
    * If you want to allow to send customer information in the tracking events to the external providers. Note you as a company are responsible for informing your customers and handling the data in terms of GDPR. 
    */
    // @ApiMember(Description="If you want to allow to send customer information in the tracking events to the external providers. Note you as a company are responsible for informing your customers and handling the data in terms of GDPR. ")
    bool? SendCustomerInformationToExternalProviders;

    SystemSettingsResponse({this.LanguageOptions,this.Active,this.InactiveMessage,this.Searchable,this.GATrackingId,this.GoogleAdsConversionId,this.LinkedinTagId,this.GoogleAdsConversionLabel,this.GTMTrackingId,this.FacebookPixelId,this.ShowOnMarketplace,this.MultiLanguage,this.EnableAPITranslation,this.DefaultLanguage,this.SendCustomerInformationToExternalProviders});
    SystemSettingsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        LanguageOptions = JsonConverters.fromJson(json['LanguageOptions'],'List<LanguageResponse>',context!);
        Active = json['Active'];
        InactiveMessage = json['InactiveMessage'];
        Searchable = json['Searchable'];
        GATrackingId = json['GATrackingId'];
        GoogleAdsConversionId = json['GoogleAdsConversionId'];
        LinkedinTagId = json['LinkedinTagId'];
        GoogleAdsConversionLabel = json['GoogleAdsConversionLabel'];
        GTMTrackingId = json['GTMTrackingId'];
        FacebookPixelId = json['FacebookPixelId'];
        ShowOnMarketplace = json['ShowOnMarketplace'];
        MultiLanguage = json['MultiLanguage'];
        EnableAPITranslation = json['EnableAPITranslation'];
        DefaultLanguage = json['DefaultLanguage'];
        SendCustomerInformationToExternalProviders = json['SendCustomerInformationToExternalProviders'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'LanguageOptions': JsonConverters.toJson(LanguageOptions,'List<LanguageResponse>',context!),
        'Active': Active,
        'InactiveMessage': InactiveMessage,
        'Searchable': Searchable,
        'GATrackingId': GATrackingId,
        'GoogleAdsConversionId': GoogleAdsConversionId,
        'LinkedinTagId': LinkedinTagId,
        'GoogleAdsConversionLabel': GoogleAdsConversionLabel,
        'GTMTrackingId': GTMTrackingId,
        'FacebookPixelId': FacebookPixelId,
        'ShowOnMarketplace': ShowOnMarketplace,
        'MultiLanguage': MultiLanguage,
        'EnableAPITranslation': EnableAPITranslation,
        'DefaultLanguage': DefaultLanguage,
        'SendCustomerInformationToExternalProviders': SendCustomerInformationToExternalProviders
    };

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

// @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
// @ApiResponse(Description="You have too low privilegies to call this service", StatusCode=403)
class SystemSettingQuery implements IConvertible
{
    /**
    * If you want to include the language options to select from
    */
    // @ApiMember(DataType="boolean", Description="If you want to include the language options to select from", ParameterType="query")
    bool? IncludeLanguageOptions;

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

    fromMap(Map<String, dynamic> json) {
        IncludeLanguageOptions = json['IncludeLanguageOptions'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'IncludeLanguageOptions': IncludeLanguageOptions
    };

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

TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: <String, TypeInfo> {
    'LanguageResponse': TypeInfo(TypeOf.Class, create:() => LanguageResponse()),
    'SystemSettingsResponse': TypeInfo(TypeOf.Class, create:() => SystemSettingsResponse()),
    'List<LanguageResponse>': TypeInfo(TypeOf.Class, create:() => <LanguageResponse>[]),
    'SystemSettingQuery': TypeInfo(TypeOf.Class, create:() => SystemSettingQuery()),
});

Dart SystemSettingQuery DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

GET /settings/system HTTP/1.1 
Host: api.bokamera.se 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"LanguageOptions":[{"Id":"String","Name":"String"}],"Active":false,"InactiveMessage":"String","Searchable":false,"GATrackingId":"String","GoogleAdsConversionId":"String","LinkedinTagId":"String","GoogleAdsConversionLabel":"String","GTMTrackingId":"String","FacebookPixelId":"String","ShowOnMarketplace":false,"MultiLanguage":false,"EnableAPITranslation":false,"DefaultLanguage":"String","SendCustomerInformationToExternalProviders":false}