BokaMera.API.Host

<back to all web services

CreateCompany

The following routes are available for this service:
POST/companies/Create new companyCreate your company information.
import 'package:servicestack/servicestack.dart';

enum CodeLockSystemType
{
    Sample,
    RcoM5,
    AxemaVaka,
    VanderbiltOmnis,
    ParakeyParakey,
    AmidoDax,
    TelkeyTelkey,
    TechSolutionsSiedle,
    Accessy,
    Zesec,
    Enabla,
}

class CompanyBookingSettings implements IConvertible
{
    bool? EnableMobileApp;
    String? BookingReceiptMessage;
    bool? ShowFreeTimesLeft;
    bool? EnableShowBookedTimes;
    String? BookingAgreement;
    /**
    * The settings for how to display week number. 1 = ShowWeekNumberFromDate, 2 = ShowWeekNumberToDate, 3 = ShowWeekNumberFromToDate, 4 = DontShowWeekNumber  
    */
    // @ApiMember(DataType="int", Description="The settings for how to display week number. 1 = ShowWeekNumberFromDate, 2 = ShowWeekNumberToDate, 3 = ShowWeekNumberFromToDate, 4 = DontShowWeekNumber  ")
    int? WeekNumberSetting;

    bool? ShowBookedTimes;
    /**
    * The payment provider id. 1 = Payson Checkout 1.0, 2= Payson Checkout 2.0 ... To get the full payment provider for the company call GET /payment/settings
    */
    // @ApiMember(Description="The payment provider id. 1 = Payson Checkout 1.0, 2= Payson Checkout 2.0 ... To get the full payment provider for the company call GET /payment/settings")
    int? PaymentProviderId;

    /**
    * If it's only allowed for existing customers to book
    */
    // @ApiMember(DataType="boolean", Description="If it's only allowed for existing customers to book")
    bool? BookOnlyOnExistingCustomers;

    /**
    * If payment is enabled
    */
    // @ApiMember(DataType="boolean", Description="If payment is enabled")
    bool? PaymentEnabled;

    CompanyBookingSettings({this.EnableMobileApp,this.BookingReceiptMessage,this.ShowFreeTimesLeft,this.EnableShowBookedTimes,this.BookingAgreement,this.WeekNumberSetting,this.ShowBookedTimes,this.PaymentProviderId,this.BookOnlyOnExistingCustomers,this.PaymentEnabled});
    CompanyBookingSettings.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        EnableMobileApp = json['EnableMobileApp'];
        BookingReceiptMessage = json['BookingReceiptMessage'];
        ShowFreeTimesLeft = json['ShowFreeTimesLeft'];
        EnableShowBookedTimes = json['EnableShowBookedTimes'];
        BookingAgreement = json['BookingAgreement'];
        WeekNumberSetting = json['WeekNumberSetting'];
        ShowBookedTimes = json['ShowBookedTimes'];
        PaymentProviderId = json['PaymentProviderId'];
        BookOnlyOnExistingCustomers = json['BookOnlyOnExistingCustomers'];
        PaymentEnabled = json['PaymentEnabled'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'EnableMobileApp': EnableMobileApp,
        'BookingReceiptMessage': BookingReceiptMessage,
        'ShowFreeTimesLeft': ShowFreeTimesLeft,
        'EnableShowBookedTimes': EnableShowBookedTimes,
        'BookingAgreement': BookingAgreement,
        'WeekNumberSetting': WeekNumberSetting,
        'ShowBookedTimes': ShowBookedTimes,
        'PaymentProviderId': PaymentProviderId,
        'BookOnlyOnExistingCustomers': BookOnlyOnExistingCustomers,
        'PaymentEnabled': PaymentEnabled
    };

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

class CompanySystemSettings implements IConvertible
{
    /**
    * 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 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 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 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;

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

    fromMap(Map<String, dynamic> json) {
        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'];
        MultiLanguage = json['MultiLanguage'];
        ShowOnMarketplace = json['ShowOnMarketplace'];
        EnableAPITranslation = json['EnableAPITranslation'];
        DefaultLanguage = json['DefaultLanguage'];
        SendCustomerInformationToExternalProviders = json['SendCustomerInformationToExternalProviders'];
        return this;
    }

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

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

class CompanyWidgetSettings implements IConvertible
{
    /**
    * The service layouts id.
    */
    // @ApiMember(Description="The service layouts id.")
    int? ServiceLayoutId;

    /**
    * The time layouts id.
    */
    // @ApiMember(Description="The time layouts id.")
    int? TimeLayoutId;

    /**
    * The booking layouts id.
    */
    // @ApiMember(Description="The booking layouts id.")
    int? BookingLayoutId;

    /**
    * The primary color of the booking widget.
    */
    // @ApiMember(Description="The primary color of the booking widget.")
    String? PrimaryColor;

    /**
    * If you should show the service image in the booking widget.
    */
    // @ApiMember(Description="If you should show the service image in the booking widget.")
    bool? ShowServiceImage;

    /**
    * If you should show the rebate code field in the booking widget.
    */
    // @ApiMember(Description="If you should show the rebate code field in the booking widget.")
    bool? ShowRebateCodeField;

    /**
    * If you should show the next available time in the booking widget.
    */
    // @ApiMember(Description="If you should show the next available time in the booking widget.")
    bool? ShowNextAvailableTime;

    /**
    * If you should show the end time in the booking widget.
    */
    // @ApiMember(Description="If you should show the end time in the booking widget.")
    bool? ShowEndTime;

    /**
    * What text to show on booked time slots. Default text is Booked
    */
    // @ApiMember(Description="What text to show on booked time slots. Default text is Booked")
    String? BookedTimeSlotText;

    /**
    * If the widget should be displayed in dark theme
    */
    // @ApiMember(Description="If the widget should be displayed in dark theme")
    bool? DarkTheme;

    /**
    * If you should show the subscribe to newsletter checkbox in the booking widget.
    */
    // @ApiMember(Description="If you should show the subscribe to newsletter checkbox in the booking widget.")
    bool? ShowSubscribeToNewsletter;

    CompanyWidgetSettings({this.ServiceLayoutId,this.TimeLayoutId,this.BookingLayoutId,this.PrimaryColor,this.ShowServiceImage,this.ShowRebateCodeField,this.ShowNextAvailableTime,this.ShowEndTime,this.BookedTimeSlotText,this.DarkTheme,this.ShowSubscribeToNewsletter});
    CompanyWidgetSettings.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ServiceLayoutId = json['ServiceLayoutId'];
        TimeLayoutId = json['TimeLayoutId'];
        BookingLayoutId = json['BookingLayoutId'];
        PrimaryColor = json['PrimaryColor'];
        ShowServiceImage = json['ShowServiceImage'];
        ShowRebateCodeField = json['ShowRebateCodeField'];
        ShowNextAvailableTime = json['ShowNextAvailableTime'];
        ShowEndTime = json['ShowEndTime'];
        BookedTimeSlotText = json['BookedTimeSlotText'];
        DarkTheme = json['DarkTheme'];
        ShowSubscribeToNewsletter = json['ShowSubscribeToNewsletter'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ServiceLayoutId': ServiceLayoutId,
        'TimeLayoutId': TimeLayoutId,
        'BookingLayoutId': BookingLayoutId,
        'PrimaryColor': PrimaryColor,
        'ShowServiceImage': ShowServiceImage,
        'ShowRebateCodeField': ShowRebateCodeField,
        'ShowNextAvailableTime': ShowNextAvailableTime,
        'ShowEndTime': ShowEndTime,
        'BookedTimeSlotText': BookedTimeSlotText,
        'DarkTheme': DarkTheme,
        'ShowSubscribeToNewsletter': ShowSubscribeToNewsletter
    };

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

class HomepageSettingsResponse implements IConvertible
{
    /**
    * The text for homepage heading
    */
    // @ApiMember(Description="The text for homepage heading")
    String? HomepageHeading;

    /**
    * The text for homepage startpage heading
    */
    // @ApiMember(Description="The text for homepage startpage heading")
    String? WelcomePageHeading;

    /**
    * The text for homepage startpage body
    */
    // @ApiMember(Description="The text for homepage startpage body")
    String? WelcomePageBody;

    /**
    * The text for homepage about us page heading
    */
    // @ApiMember(Description="The text for homepage about us page heading")
    String? AboutUsPageHeading;

    /**
    * The text for homepage about us page body
    */
    // @ApiMember(Description="The text for homepage about us page body")
    String? AboutUsPageBody;

    /**
    * The startpage image url
    */
    // @ApiMember(Description="The startpage image url")
    Uri? ImageUrl;

    /**
    * The cover image url
    */
    // @ApiMember(Description="The cover image url")
    Uri? CoverImage;

    /**
    * Show rating on the page
    */
    // @ApiMember(Description="Show rating on the page")
    bool? ShowRating;

    /**
    * The template for the homepage
    */
    // @ApiMember(Description="The template for the homepage")
    int? HomePageTemplateId;

    /**
    * The hero section style for the homepage
    */
    // @ApiMember(Description="The hero section style for the homepage")
    int? HeroSectionStyleId;

    /**
    * Enable the BokaMera Homepage
    */
    // @ApiMember(Description="Enable the BokaMera Homepage")
    bool? EnableHomepage;

    HomepageSettingsResponse({this.HomepageHeading,this.WelcomePageHeading,this.WelcomePageBody,this.AboutUsPageHeading,this.AboutUsPageBody,this.ImageUrl,this.CoverImage,this.ShowRating,this.HomePageTemplateId,this.HeroSectionStyleId,this.EnableHomepage});
    HomepageSettingsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        HomepageHeading = json['HomepageHeading'];
        WelcomePageHeading = json['WelcomePageHeading'];
        WelcomePageBody = json['WelcomePageBody'];
        AboutUsPageHeading = json['AboutUsPageHeading'];
        AboutUsPageBody = json['AboutUsPageBody'];
        ImageUrl = JsonConverters.fromJson(json['ImageUrl'],'Uri',context!);
        CoverImage = JsonConverters.fromJson(json['CoverImage'],'Uri',context!);
        ShowRating = json['ShowRating'];
        HomePageTemplateId = json['HomePageTemplateId'];
        HeroSectionStyleId = json['HeroSectionStyleId'];
        EnableHomepage = json['EnableHomepage'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'HomepageHeading': HomepageHeading,
        'WelcomePageHeading': WelcomePageHeading,
        'WelcomePageBody': WelcomePageBody,
        'AboutUsPageHeading': AboutUsPageHeading,
        'AboutUsPageBody': AboutUsPageBody,
        'ImageUrl': JsonConverters.toJson(ImageUrl,'Uri',context!),
        'CoverImage': JsonConverters.toJson(CoverImage,'Uri',context!),
        'ShowRating': ShowRating,
        'HomePageTemplateId': HomePageTemplateId,
        'HeroSectionStyleId': HeroSectionStyleId,
        'EnableHomepage': EnableHomepage
    };

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

class CompanyRatingSummary implements IConvertible
{
    /**
    * The average rating score
    */
    // @ApiMember(Description="The average rating score")
    double? AverageScore;

    /**
    * The number of ratings of score 1
    */
    // @ApiMember(Description="The number of ratings of score 1")
    int? RatingScore1Count;

    /**
    * The number of ratings of score 2
    */
    // @ApiMember(Description="The number of ratings of score 2")
    int? RatingScore2Count;

    /**
    * The number of ratings of score 3
    */
    // @ApiMember(Description="The number of ratings of score 3")
    int? RatingScore3Count;

    /**
    * The number of ratings of score 4
    */
    // @ApiMember(Description="The number of ratings of score 4")
    int? RaingScore4Count;

    /**
    * The number of ratings of score 5
    */
    // @ApiMember(Description="The number of ratings of score 5")
    int? RatingScore5Count;

    /**
    * The number of ratings
    */
    // @ApiMember(Description="The number of ratings")
    int? Count;

    CompanyRatingSummary({this.AverageScore,this.RatingScore1Count,this.RatingScore2Count,this.RatingScore3Count,this.RaingScore4Count,this.RatingScore5Count,this.Count});
    CompanyRatingSummary.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        AverageScore = JsonConverters.toDouble(json['AverageScore']);
        RatingScore1Count = json['RatingScore1Count'];
        RatingScore2Count = json['RatingScore2Count'];
        RatingScore3Count = json['RatingScore3Count'];
        RaingScore4Count = json['RaingScore4Count'];
        RatingScore5Count = json['RatingScore5Count'];
        Count = json['Count'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'AverageScore': AverageScore,
        'RatingScore1Count': RatingScore1Count,
        'RatingScore2Count': RatingScore2Count,
        'RatingScore3Count': RatingScore3Count,
        'RaingScore4Count': RaingScore4Count,
        'RatingScore5Count': RatingScore5Count,
        'Count': Count
    };

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

class RatingReviewResponse implements IConvertible
{
    /**
    * The title for the review
    */
    // @ApiMember(Description="The title for the review")
    String? Title;

    /**
    * The description for the review
    */
    // @ApiMember(Description="The description for the review")
    String? Description;

    /**
    * The rating score
    */
    // @ApiMember(Description="The rating score")
    int? RatingScore;

    /**
    * The review author
    */
    // @ApiMember(Description="The review author")
    String? Author;

    /**
    * The created date
    */
    // @ApiMember(Description="The created date")
    DateTime? Created;

    /**
    * The review answer from the company
    */
    // @ApiMember(Description="The review answer from the company")
    String? ReviewAnswer;

    RatingReviewResponse({this.Title,this.Description,this.RatingScore,this.Author,this.Created,this.ReviewAnswer});
    RatingReviewResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Title = json['Title'];
        Description = json['Description'];
        RatingScore = json['RatingScore'];
        Author = json['Author'];
        Created = JsonConverters.fromJson(json['Created'],'DateTime',context!);
        ReviewAnswer = json['ReviewAnswer'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Title': Title,
        'Description': Description,
        'RatingScore': RatingScore,
        'Author': Author,
        'Created': JsonConverters.toJson(Created,'DateTime',context!),
        'ReviewAnswer': ReviewAnswer
    };

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

class CustomFieldValueResponse implements IConvertible
{
    String? Value;

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

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

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

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

class CustomFieldConfigData implements IConvertible
{
    /**
    * Custom field id
    */
    // @ApiMember(Description="Custom field id")
    int? Id;

    /**
    * Configuration name. Example: 'Number of persons'.
    */
    // @ApiMember(Description="Configuration name. Example: 'Number of persons'.")
    String? Name;

    /**
    * Custom field description. Example: 'For how many persons is this booking?'
    */
    // @ApiMember(Description="Custom field description. Example: 'For how many persons is this booking?'")
    String? Description;

    /**
    * Field width. Example: 20 for 20px
    */
    // @ApiMember(Description="Field width. Example: 20 for 20px")
    int? Width;

    /**
    * Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'
    */
    // @ApiMember(Description="Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'")
    String? DataType;

    /**
    * Default value of the field. Example: '3'
    */
    // @ApiMember(Description="Default value of the field. Example: '3'")
    String? DefaultValue;

    /**
    * Determines if the field is required to have a value or not
    */
    // @ApiMember(Description="Determines if the field is required to have a value or not")
    bool? IsMandatory;

    /**
    * Error message shown to the user if the field data is required but not entered
    */
    // @ApiMember(Description="Error message shown to the user if the field data is required but not entered")
    String? MandatoryErrorMessage;

    /**
    * Max lenght of the field
    */
    // @ApiMember(Description="Max lenght of the field")
    int? MaxLength;

    /**
    * If the field should have multiple lines
    */
    // @ApiMember(Description="If the field should have multiple lines")
    bool? MultipleLineText;

    /**
    * Regular expression used for validation of the field
    */
    // @ApiMember(Description="Regular expression used for validation of the field")
    String? RegEx;

    /**
    * Error message shown if the regular expression validation failed
    */
    // @ApiMember(Description="Error message shown if the regular expression validation failed")
    String? RegExErrorMessage;

    /**
    * The values to select from if Datatype is DropDown for this custom field
    */
    // @ApiMember(Description="The values to select from if Datatype is DropDown for this custom field")
    List<CustomFieldValueResponse>? Values;

    CustomFieldConfigData({this.Id,this.Name,this.Description,this.Width,this.DataType,this.DefaultValue,this.IsMandatory,this.MandatoryErrorMessage,this.MaxLength,this.MultipleLineText,this.RegEx,this.RegExErrorMessage,this.Values});
    CustomFieldConfigData.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Name = json['Name'];
        Description = json['Description'];
        Width = json['Width'];
        DataType = json['DataType'];
        DefaultValue = json['DefaultValue'];
        IsMandatory = json['IsMandatory'];
        MandatoryErrorMessage = json['MandatoryErrorMessage'];
        MaxLength = json['MaxLength'];
        MultipleLineText = json['MultipleLineText'];
        RegEx = json['RegEx'];
        RegExErrorMessage = json['RegExErrorMessage'];
        Values = JsonConverters.fromJson(json['Values'],'List<CustomFieldValueResponse>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Name': Name,
        'Description': Description,
        'Width': Width,
        'DataType': DataType,
        'DefaultValue': DefaultValue,
        'IsMandatory': IsMandatory,
        'MandatoryErrorMessage': MandatoryErrorMessage,
        'MaxLength': MaxLength,
        'MultipleLineText': MultipleLineText,
        'RegEx': RegEx,
        'RegExErrorMessage': RegExErrorMessage,
        'Values': JsonConverters.toJson(Values,'List<CustomFieldValueResponse>',context!)
    };

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

class CompanyQueryResponse implements IConvertible
{
    String? Id;
    String? Name;
    /**
    * The organisation number will only be visible if your owner to the company
    */
    // @ApiMember(DataType="string", Description="The organisation number will only be visible if your owner to the company")
    String? OrganisationNumber;

    /**
    * What type of company. If it's used for personal use or as a company.
    */
    // @ApiMember(DataType="int", Description="What type of company. If it's used for personal use or as a company.")
    int? TypeId;

    String? Details;
    int? CategoryId;
    String? Category;
    Uri? LogoType;
    Uri? CoverImage;
    String? Street1;
    String? Street2;
    String? ZipCode;
    String? City;
    String? CountryId;
    String? Longitude;
    String? Latitude;
    double? Distance;
    String? Phone;
    String? Email;
    String? Homepage;
    String? SitePath;
    bool? Active;
    CodeLockSystemType? CodeLockSystem;
    bool? IsFreeAccount;
    /**
    * Will show when the company was updated, note it will only be shown if your logged in as admin for the company.
    */
    // @ApiMember(DataType="datetime", Description="Will show when the company was updated, note it will only be shown if your logged in as admin for the company.")
    DateTime? Updated;

    /**
    * Will show when the company was created, note it will only be shown if your logged in as admin for the company.
    */
    // @ApiMember(DataType="datetime", Description="Will show when the company was created, note it will only be shown if your logged in as admin for the company.")
    DateTime? Created;

    int? StatusId;
    /**
    * If the company is marked as favourite for the logged in user
    */
    // @ApiMember(DataType="boolean", Description="If the company is marked as favourite for the logged in user")
    bool? IsFavorite;

    String? BookingAgreements;
    CompanyBookingSettings? BookingSettings;
    CompanySystemSettings? SystemSettings;
    CompanyWidgetSettings? WidgetSettings;
    HomepageSettingsResponse? HomepageSettings;
    CompanyRatingSummary? RatingSummary;
    List<RatingReviewResponse>? Reviews;
    List<CustomFieldConfigData>? CustomerCustomFields;
    ResponseStatus? ResponseStatus;

    CompanyQueryResponse({this.Id,this.Name,this.OrganisationNumber,this.TypeId,this.Details,this.CategoryId,this.Category,this.LogoType,this.CoverImage,this.Street1,this.Street2,this.ZipCode,this.City,this.CountryId,this.Longitude,this.Latitude,this.Distance,this.Phone,this.Email,this.Homepage,this.SitePath,this.Active,this.CodeLockSystem,this.IsFreeAccount,this.Updated,this.Created,this.StatusId,this.IsFavorite,this.BookingAgreements,this.BookingSettings,this.SystemSettings,this.WidgetSettings,this.HomepageSettings,this.RatingSummary,this.Reviews,this.CustomerCustomFields,this.ResponseStatus});
    CompanyQueryResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Name = json['Name'];
        OrganisationNumber = json['OrganisationNumber'];
        TypeId = json['TypeId'];
        Details = json['Details'];
        CategoryId = json['CategoryId'];
        Category = json['Category'];
        LogoType = JsonConverters.fromJson(json['LogoType'],'Uri',context!);
        CoverImage = JsonConverters.fromJson(json['CoverImage'],'Uri',context!);
        Street1 = json['Street1'];
        Street2 = json['Street2'];
        ZipCode = json['ZipCode'];
        City = json['City'];
        CountryId = json['CountryId'];
        Longitude = json['Longitude'];
        Latitude = json['Latitude'];
        Distance = JsonConverters.toDouble(json['Distance']);
        Phone = json['Phone'];
        Email = json['Email'];
        Homepage = json['Homepage'];
        SitePath = json['SitePath'];
        Active = json['Active'];
        CodeLockSystem = JsonConverters.fromJson(json['CodeLockSystem'],'CodeLockSystemType',context!);
        IsFreeAccount = json['IsFreeAccount'];
        Updated = JsonConverters.fromJson(json['Updated'],'DateTime',context!);
        Created = JsonConverters.fromJson(json['Created'],'DateTime',context!);
        StatusId = json['StatusId'];
        IsFavorite = json['IsFavorite'];
        BookingAgreements = json['BookingAgreements'];
        BookingSettings = JsonConverters.fromJson(json['BookingSettings'],'CompanyBookingSettings',context!);
        SystemSettings = JsonConverters.fromJson(json['SystemSettings'],'CompanySystemSettings',context!);
        WidgetSettings = JsonConverters.fromJson(json['WidgetSettings'],'CompanyWidgetSettings',context!);
        HomepageSettings = JsonConverters.fromJson(json['HomepageSettings'],'HomepageSettingsResponse',context!);
        RatingSummary = JsonConverters.fromJson(json['RatingSummary'],'CompanyRatingSummary',context!);
        Reviews = JsonConverters.fromJson(json['Reviews'],'List<RatingReviewResponse>',context!);
        CustomerCustomFields = JsonConverters.fromJson(json['CustomerCustomFields'],'List<CustomFieldConfigData>',context!);
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Name': Name,
        'OrganisationNumber': OrganisationNumber,
        'TypeId': TypeId,
        'Details': Details,
        'CategoryId': CategoryId,
        'Category': Category,
        'LogoType': JsonConverters.toJson(LogoType,'Uri',context!),
        'CoverImage': JsonConverters.toJson(CoverImage,'Uri',context!),
        'Street1': Street1,
        'Street2': Street2,
        'ZipCode': ZipCode,
        'City': City,
        'CountryId': CountryId,
        'Longitude': Longitude,
        'Latitude': Latitude,
        'Distance': Distance,
        'Phone': Phone,
        'Email': Email,
        'Homepage': Homepage,
        'SitePath': SitePath,
        'Active': Active,
        'CodeLockSystem': JsonConverters.toJson(CodeLockSystem,'CodeLockSystemType',context!),
        'IsFreeAccount': IsFreeAccount,
        'Updated': JsonConverters.toJson(Updated,'DateTime',context!),
        'Created': JsonConverters.toJson(Created,'DateTime',context!),
        'StatusId': StatusId,
        'IsFavorite': IsFavorite,
        'BookingAgreements': BookingAgreements,
        'BookingSettings': JsonConverters.toJson(BookingSettings,'CompanyBookingSettings',context!),
        'SystemSettings': JsonConverters.toJson(SystemSettings,'CompanySystemSettings',context!),
        'WidgetSettings': JsonConverters.toJson(WidgetSettings,'CompanyWidgetSettings',context!),
        'HomepageSettings': JsonConverters.toJson(HomepageSettings,'HomepageSettingsResponse',context!),
        'RatingSummary': JsonConverters.toJson(RatingSummary,'CompanyRatingSummary',context!),
        'Reviews': JsonConverters.toJson(Reviews,'List<RatingReviewResponse>',context!),
        'CustomerCustomFields': JsonConverters.toJson(CustomerCustomFields,'List<CustomFieldConfigData>',context!),
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
    };

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

class CreateCompanyCompanyUser implements IConvertible
{
    // @ApiMember(IsRequired=true)
    String? Firstname;

    // @ApiMember(IsRequired=true)
    String? Lastname;

    // @ApiMember(IsRequired=true)
    String? Phone;

    // @ApiMember(IsRequired=true)
    String? Email;

    // @ApiMember()
    int? WorkerId;

    CreateCompanyCompanyUser({this.Firstname,this.Lastname,this.Phone,this.Email,this.WorkerId});
    CreateCompanyCompanyUser.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Firstname = json['Firstname'];
        Lastname = json['Lastname'];
        Phone = json['Phone'];
        Email = json['Email'];
        WorkerId = json['WorkerId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Firstname': Firstname,
        'Lastname': Lastname,
        'Phone': Phone,
        'Email': Email,
        'WorkerId': WorkerId
    };

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

class CreateCompanyBillingInformation implements IConvertible
{
    /**
    * The prefered billing method.
    */
    // @ApiMember(Description="The prefered billing method.", IsRequired=true)
    int? BillingMethodId;

    /**
    * The name that should be printed on the billing information, normally this would be your company name.
    */
    // @ApiMember(Description="The name that should be printed on the billing information, normally this would be your company name.")
    String? Name;

    /**
    * If you want to add the attention to the billing address.
    */
    // @ApiMember(Description="If you want to add the attention to the billing address.")
    String? Attention;

    /**
    * The street for the billing adress. This is required when having postal invoice as billing method.
    */
    // @ApiMember(Description="The street for the billing adress. This is required when having postal invoice as billing method.")
    String? Street1;

    /**
    * The street for the billing adress.
    */
    // @ApiMember(Description="The street for the billing adress.")
    String? Street2;

    /**
    * The zip code (postal code) for the billing adress. This is required when having postal invoice as billing method.
    */
    // @ApiMember(Description="The zip code (postal code) for the billing adress. This is required when having postal invoice as billing method.")
    String? ZipCode;

    /**
    * The city for the billing adress. This is required when having postal invoice as billing method.
    */
    // @ApiMember(Description="The city for the billing adress. This is required when having postal invoice as billing method.")
    String? City;

    /**
    * The country for the billing adress. This is required when having postal invoice as billing method.
    */
    // @ApiMember(Description="The country for the billing adress. This is required when having postal invoice as billing method.")
    String? CountryId;

    /**
    * The billing email. This is required when having email invoice as billing method.
    */
    // @ApiMember(Description="The billing email. This is required when having email invoice as billing method.")
    String? Email;

    /**
    * The billing payment terms in days. This is default 15 days.
    */
    // @ApiMember(Description="The billing payment terms in days. This is default 15 days.")
    int? PaymentTermsDays;

    /**
    * The company vat registration number.
    */
    // @ApiMember(Description="The company vat registration number.")
    String? VatRegistrationNumber;

    CreateCompanyBillingInformation({this.BillingMethodId,this.Name,this.Attention,this.Street1,this.Street2,this.ZipCode,this.City,this.CountryId,this.Email,this.PaymentTermsDays,this.VatRegistrationNumber});
    CreateCompanyBillingInformation.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        BillingMethodId = json['BillingMethodId'];
        Name = json['Name'];
        Attention = json['Attention'];
        Street1 = json['Street1'];
        Street2 = json['Street2'];
        ZipCode = json['ZipCode'];
        City = json['City'];
        CountryId = json['CountryId'];
        Email = json['Email'];
        PaymentTermsDays = json['PaymentTermsDays'];
        VatRegistrationNumber = json['VatRegistrationNumber'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'BillingMethodId': BillingMethodId,
        'Name': Name,
        'Attention': Attention,
        'Street1': Street1,
        'Street2': Street2,
        'ZipCode': ZipCode,
        'City': City,
        'CountryId': CountryId,
        'Email': Email,
        'PaymentTermsDays': PaymentTermsDays,
        'VatRegistrationNumber': VatRegistrationNumber
    };

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

// @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
class CreateCompany implements IConvertible
{
    /**
    * 
    */
    // @ApiMember(DataType="string", Description="", IsRequired=true)
    String? Name;

    /**
    * 
    */
    // @ApiMember(DataType="string", Description="", IsRequired=true)
    String? OrganisationNumber;

    /**
    * What type of company. If it's used for personal use or as a company. 1 = Company use, 2 = Personal use
    */
    // @ApiMember(DataType="int", Description="What type of company. If it's used for personal use or as a company. 1 = Company use, 2 = Personal use", IsRequired=true)
    int? TypeId;

    /**
    * What company owner.  1 = BokaMera (default)
    */
    // @ApiMember(DataType="int", Description="What company owner.  1 = BokaMera (default)", IsRequired=true)
    int? CompanyOwnerId;

    /**
    * 
    */
    // @ApiMember(DataType="string", Description="", IsRequired=true)
    String? OpeningHours;

    /**
    * 
    */
    // @ApiMember(DataType="string", Description="")
    String? Details;

    /**
    * 
    */
    // @ApiMember(DataType="string", Description="", IsRequired=true)
    int? CategoryId;

    /**
    * 
    */
    // @ApiMember(DataType="uri", Description="", IsRequired=true)
    Uri? LogoType;

    /**
    * 
    */
    // @ApiMember(DataType="string", Description="")
    String? Street1;

    /**
    * 
    */
    // @ApiMember(DataType="string", Description="")
    String? Street2;

    /**
    * 
    */
    // @ApiMember(DataType="string", Description="")
    String? ZipCode;

    /**
    * 
    */
    // @ApiMember(DataType="string", Description="")
    String? City;

    /**
    * 
    */
    // @ApiMember(DataType="string", Description="")
    String? CountryId;

    /**
    * 
    */
    // @ApiMember(DataType="string", Description="", IsRequired=true)
    String? Longitude;

    /**
    * 
    */
    // @ApiMember(DataType="string", Description="")
    String? Latitude;

    /**
    * 
    */
    // @ApiMember(DataType="string", Description="")
    String? Phone;

    /**
    * 
    */
    // @ApiMember(DataType="string", Description="", IsRequired=true)
    String? Email;

    /**
    * 
    */
    // @ApiMember(DataType="string", Description="")
    String? Fax;

    /**
    * 
    */
    // @ApiMember(DataType="string", Description="")
    String? Homepage;

    /**
    * 
    */
    // @ApiMember(DataType="string", Description="", IsRequired=true)
    String? SitePath;

    /**
    * 
    */
    // @ApiMember(Description="", IsRequired=true)
    CreateCompanyCompanyUser? CompanyUser;

    CreateCompanyBillingInformation? BillingInformation;
    /**
    * Id of the license type. If none is set it's free license
    */
    // @ApiMember(Description="Id of the license type. If none is set it's free license", IsRequired=true)
    int? LicenseTypeId;

    /**
    * 
    */
    // @ApiMember(DataType="string", Description="")
    String? DomainName;

    CreateCompany({this.Name,this.OrganisationNumber,this.TypeId,this.CompanyOwnerId,this.OpeningHours,this.Details,this.CategoryId,this.LogoType,this.Street1,this.Street2,this.ZipCode,this.City,this.CountryId,this.Longitude,this.Latitude,this.Phone,this.Email,this.Fax,this.Homepage,this.SitePath,this.CompanyUser,this.BillingInformation,this.LicenseTypeId,this.DomainName});
    CreateCompany.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Name = json['Name'];
        OrganisationNumber = json['OrganisationNumber'];
        TypeId = json['TypeId'];
        CompanyOwnerId = json['CompanyOwnerId'];
        OpeningHours = json['OpeningHours'];
        Details = json['Details'];
        CategoryId = json['CategoryId'];
        LogoType = JsonConverters.fromJson(json['LogoType'],'Uri',context!);
        Street1 = json['Street1'];
        Street2 = json['Street2'];
        ZipCode = json['ZipCode'];
        City = json['City'];
        CountryId = json['CountryId'];
        Longitude = json['Longitude'];
        Latitude = json['Latitude'];
        Phone = json['Phone'];
        Email = json['Email'];
        Fax = json['Fax'];
        Homepage = json['Homepage'];
        SitePath = json['SitePath'];
        CompanyUser = JsonConverters.fromJson(json['CompanyUser'],'CreateCompanyCompanyUser',context!);
        BillingInformation = JsonConverters.fromJson(json['BillingInformation'],'CreateCompanyBillingInformation',context!);
        LicenseTypeId = json['LicenseTypeId'];
        DomainName = json['DomainName'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Name': Name,
        'OrganisationNumber': OrganisationNumber,
        'TypeId': TypeId,
        'CompanyOwnerId': CompanyOwnerId,
        'OpeningHours': OpeningHours,
        'Details': Details,
        'CategoryId': CategoryId,
        'LogoType': JsonConverters.toJson(LogoType,'Uri',context!),
        'Street1': Street1,
        'Street2': Street2,
        'ZipCode': ZipCode,
        'City': City,
        'CountryId': CountryId,
        'Longitude': Longitude,
        'Latitude': Latitude,
        'Phone': Phone,
        'Email': Email,
        'Fax': Fax,
        'Homepage': Homepage,
        'SitePath': SitePath,
        'CompanyUser': JsonConverters.toJson(CompanyUser,'CreateCompanyCompanyUser',context!),
        'BillingInformation': JsonConverters.toJson(BillingInformation,'CreateCompanyBillingInformation',context!),
        'LicenseTypeId': LicenseTypeId,
        'DomainName': DomainName
    };

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

TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: <String, TypeInfo> {
    'CodeLockSystemType': TypeInfo(TypeOf.Enum, enumValues:CodeLockSystemType.values),
    'CompanyBookingSettings': TypeInfo(TypeOf.Class, create:() => CompanyBookingSettings()),
    'CompanySystemSettings': TypeInfo(TypeOf.Class, create:() => CompanySystemSettings()),
    'CompanyWidgetSettings': TypeInfo(TypeOf.Class, create:() => CompanyWidgetSettings()),
    'HomepageSettingsResponse': TypeInfo(TypeOf.Class, create:() => HomepageSettingsResponse()),
    'Uri': TypeInfo(TypeOf.Class, create:() => Uri()),
    'CompanyRatingSummary': TypeInfo(TypeOf.Class, create:() => CompanyRatingSummary()),
    'RatingReviewResponse': TypeInfo(TypeOf.Class, create:() => RatingReviewResponse()),
    'CustomFieldValueResponse': TypeInfo(TypeOf.Class, create:() => CustomFieldValueResponse()),
    'CustomFieldConfigData': TypeInfo(TypeOf.Class, create:() => CustomFieldConfigData()),
    'List<CustomFieldValueResponse>': TypeInfo(TypeOf.Class, create:() => <CustomFieldValueResponse>[]),
    'CompanyQueryResponse': TypeInfo(TypeOf.Class, create:() => CompanyQueryResponse()),
    'List<RatingReviewResponse>': TypeInfo(TypeOf.Class, create:() => <RatingReviewResponse>[]),
    'List<CustomFieldConfigData>': TypeInfo(TypeOf.Class, create:() => <CustomFieldConfigData>[]),
    'CreateCompanyCompanyUser': TypeInfo(TypeOf.Class, create:() => CreateCompanyCompanyUser()),
    'CreateCompanyBillingInformation': TypeInfo(TypeOf.Class, create:() => CreateCompanyBillingInformation()),
    'CreateCompany': TypeInfo(TypeOf.Class, create:() => CreateCompany()),
});

Dart CreateCompany 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.

POST /companies/ HTTP/1.1 
Host: api.bokamera.se 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"Name":"String","OrganisationNumber":"String","TypeId":0,"CompanyOwnerId":0,"OpeningHours":"String","Details":"String","CategoryId":0,"Street1":"String","Street2":"String","ZipCode":"String","City":"String","CountryId":"String","Longitude":"String","Latitude":"String","Phone":"String","Email":"String","Fax":"String","Homepage":"String","SitePath":"String","CompanyUser":{"Firstname":"String","Lastname":"String","Phone":"String","Email":"String","WorkerId":0},"BillingInformation":{"BillingMethodId":0,"Name":"String","Attention":"String","Street1":"String","Street2":"String","ZipCode":"String","City":"String","CountryId":"String","Email":"String","PaymentTermsDays":0,"VatRegistrationNumber":"String"},"LicenseTypeId":0,"DomainName":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Name":"String","OrganisationNumber":"String","TypeId":0,"Details":"String","CategoryId":0,"Category":"String","Street1":"String","Street2":"String","ZipCode":"String","City":"String","CountryId":"String","Longitude":"String","Latitude":"String","Distance":0,"Phone":"String","Email":"String","Homepage":"String","SitePath":"String","Active":false,"CodeLockSystem":"Sample","IsFreeAccount":false,"Updated":"0001-01-01T00:00:00","Created":"0001-01-01T00:00:00","StatusId":0,"IsFavorite":false,"BookingAgreements":"String","BookingSettings":{"EnableMobileApp":false,"BookingReceiptMessage":"String","ShowFreeTimesLeft":false,"EnableShowBookedTimes":false,"BookingAgreement":"String","WeekNumberSetting":0,"ShowBookedTimes":false,"PaymentProviderId":0,"BookOnlyOnExistingCustomers":false,"PaymentEnabled":false},"SystemSettings":{"Active":false,"InactiveMessage":"String","Searchable":false,"GATrackingId":"String","GoogleAdsConversionId":"String","LinkedinTagId":"String","GoogleAdsConversionLabel":"String","GTMTrackingId":"String","FacebookPixelId":"String","MultiLanguage":false,"ShowOnMarketplace":false,"EnableAPITranslation":false,"DefaultLanguage":"String","SendCustomerInformationToExternalProviders":false},"WidgetSettings":{"ServiceLayoutId":0,"TimeLayoutId":0,"BookingLayoutId":0,"PrimaryColor":"String","ShowServiceImage":false,"ShowRebateCodeField":false,"ShowNextAvailableTime":false,"ShowEndTime":false,"BookedTimeSlotText":"String","DarkTheme":false,"ShowSubscribeToNewsletter":false},"HomepageSettings":{"HomepageHeading":"String","WelcomePageHeading":"String","WelcomePageBody":"String","AboutUsPageHeading":"String","AboutUsPageBody":"String","ShowRating":false,"HomePageTemplateId":0,"HeroSectionStyleId":0,"EnableHomepage":false},"RatingSummary":{"AverageScore":0,"RatingScore1Count":0,"RatingScore2Count":0,"RatingScore3Count":0,"RaingScore4Count":0,"RatingScore5Count":0,"Count":0},"Reviews":[{"Title":"String","Description":"String","RatingScore":0,"Author":"String","ReviewAnswer":"String"}],"CustomerCustomFields":[{"Id":0,"Name":"String","Description":"String","Width":0,"DataType":"String","DefaultValue":"String","IsMandatory":false,"MandatoryErrorMessage":"String","MaxLength":0,"MultipleLineText":false,"RegEx":"String","RegExErrorMessage":"String","Values":[{"Value":"String"}]}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}