BokaMera.API.Host

<back to all web services

CreateBookings

The following routes are available for this service:
POST/bookings/repeatCreate new bookingsCreate new bookings if you are authorized to do so.
import 'package:servicestack/servicestack.dart';

class CustomerBase implements ICustomerBase, IConvertible
{
    String? CustomerId;
    String Firstname = "";
    String Lastname = "";
    String Email = "";
    String Phone = "";
    bool SubscribedToNewsletter;
    String PersonalIdentityNumber = "";

    CustomerBase({this.CustomerId,this.Firstname,this.Lastname,this.Email,this.Phone,this.SubscribedToNewsletter,this.PersonalIdentityNumber});
    CustomerBase.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class CustomerToHandle extends CustomerBase implements IConvertible
{
    CustomerToHandle();
    CustomerToHandle.fromJson(Map<String, dynamic> json) : super.fromJson(json);
    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson();
    getTypeName() => "CustomerToHandle";
    TypeContext? context = _ctx;
}

class InvoiceAddressToHandle implements IInvoiceAddress, IConvertible
{
    String CorporateIdentityNumber = "";
    String InvoiceAddress1 = "";
    String InvoiceAddress2 = "";
    String InvoiceCity = "";
    String InvoicePostalCode = "";
    String InvoiceCountryCode = "";

    InvoiceAddressToHandle({this.CorporateIdentityNumber,this.InvoiceAddress1,this.InvoiceAddress2,this.InvoiceCity,this.InvoicePostalCode,this.InvoiceCountryCode});
    InvoiceAddressToHandle.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CorporateIdentityNumber = json['CorporateIdentityNumber'];
        InvoiceAddress1 = json['InvoiceAddress1'];
        InvoiceAddress2 = json['InvoiceAddress2'];
        InvoiceCity = json['InvoiceCity'];
        InvoicePostalCode = json['InvoicePostalCode'];
        InvoiceCountryCode = json['InvoiceCountryCode'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CorporateIdentityNumber': CorporateIdentityNumber,
        'InvoiceAddress1': InvoiceAddress1,
        'InvoiceAddress2': InvoiceAddress2,
        'InvoiceCity': InvoiceCity,
        'InvoicePostalCode': InvoicePostalCode,
        'InvoiceCountryCode': InvoiceCountryCode
    };

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

class ResourceToBook implements IConvertible
{
    int ResourceTypeId = 0;
    int ResourceId = 0;

    ResourceToBook({this.ResourceTypeId,this.ResourceId});
    ResourceToBook.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

enum PaymentOptions
{
    DefaultSetting,
    BookWithoutPayment,
    BookWithPaymentMessageToCustomer,
    BookWithManualPayment,
}

class AddCustomField implements IConvertible
{
    int Id = 0;
    String Value = "";

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

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

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

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

class CreateBookingBase implements ICreateBookingBase, IConvertible
{
    /**
    * The company id, if empty will use the company id for the user you are logged in with.
    */
    // @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.")
    String? CompanyId;

    /**
    * If you want to book on an existing customer instead of CustomerToBook info set the CustomerId here. Set Empty Guid (00000000-0000-0000-0000-000000000000) if you want to book without any customer, this is only allowed by admin. The customer id is shown in the customer list named as id. When booking as customer (no admin) leave this field blank.
    */
    // @ApiMember(Description="If you want to book on an existing customer instead of CustomerToBook info set the CustomerId here. Set Empty Guid (00000000-0000-0000-0000-000000000000) if you want to book without any customer, this is only allowed by admin. The customer id is shown in the customer list named as id. When booking as customer (no admin) leave this field blank.")
    String? CustomerId;

    /**
    * If company requires to be authenticated or a pin code entered to book on a specific customer, enter it here.
    */
    // @ApiMember(Description="If company requires to be authenticated or a pin code entered to book on a specific customer, enter it here.")
    String PinCode = "";

    /**
    * If you want to book with customer information instead of the Customer Id send the customer information here. Note: If customer profile already exists with the same email the information will not be changed, instead the provided information will be added as BookingsComments if it differs from the ordinary profile. 
    */
    // @ApiMember(Description="If you want to book with customer information instead of the Customer Id send the customer information here. Note: If customer profile already exists with the same email the information will not be changed, instead the provided information will be added as BookingsComments if it differs from the ordinary profile. ")
    CustomerToHandle Customer;

    /**
    * If you want to book with customer information instead of the Customer Id send the customer information here. Note: If customer profile already exists with the same email the information will not be changed, instead the provided information will be added as BookingsComments if it differs from the ordinary profile. 
    */
    // @ApiMember(Description="If you want to book with customer information instead of the Customer Id send the customer information here. Note: If customer profile already exists with the same email the information will not be changed, instead the provided information will be added as BookingsComments if it differs from the ordinary profile. ")
    InvoiceAddressToHandle InvoiceAddress;

    /**
    * The service to be booked
    */
    // @ApiMember(Description="The service to be booked", IsRequired=true)
    int ServiceId = 0;

    /**
    * If you want to add comments to a booking you can add them here, this comments are never shared with the customer
    */
    // @ApiMember(Description="If you want to add comments to a booking you can add them here, this comments are never shared with the customer")
    String BookedComments = "";

    /**
    * If you want to add comments to the booking that is sent to the customer, you can add them here. Comments will be sent in the booking confirmation
    */
    // @ApiMember(Description="If you want to add comments to the booking that is sent to the customer, you can add them here. Comments will be sent in the booking confirmation")
    String CommentsToCustomer = "";

    List<ResourceToBook> Resources = [];
    /**
    * Rebate codes applied to booking
    */
    // @ApiMember(Description="Rebate codes applied to booking")
    List<int>? RebateCodeIds;

    /**
    * If you want to send Email reminder
    */
    // @ApiMember(Description="If you want to send Email reminder")
    bool? SendEmailReminder;

    /**
    * If you want to send SMS reminder
    */
    // @ApiMember(Description="If you want to send SMS reminder")
    bool? SendSmsReminder;

    /**
    * If you want to send SMS confirmation
    */
    // @ApiMember(Description="If you want to send SMS confirmation")
    bool? SendSmsConfirmation;

    /**
    * Only admins are allowed to not send an email confirmation. Default is true
    */
    // @ApiMember(Description="Only admins are allowed to not send an email confirmation. Default is true")
    bool? SendEmailConfirmation;

    /**
    * If payment is enabled and you're an administrator, optional to choose payment option, if empty then the default settings will be used. Following payment options exists. DefaultSetting = 0, BookWithoutPayment = 1 (will be direcyly booked without payment), BookWithPaymentMessageToCustomer = 2 (will set status AwaitingPayment and send payment instructions to customer), BookWithManualPayment = 3 (Will set status AwaitingPaymentNoTimeLimit and Admin will need to manually mark the booking as payed when recieved payment).
    */
    // @ApiMember(Description="If payment is enabled and you're an administrator, optional to choose payment option, if empty then the default settings will be used. Following payment options exists. DefaultSetting = 0, BookWithoutPayment = 1 (will be direcyly booked without payment), BookWithPaymentMessageToCustomer = 2 (will set status AwaitingPayment and send payment instructions to customer), BookWithManualPayment = 3 (Will set status AwaitingPaymentNoTimeLimit and Admin will need to manually mark the booking as payed when recieved payment).")
    PaymentOptions PaymentOption;

    /**
    * If Custom Fields are added to the booking, here you will send the id and the value for each custom field to be saved
    */
    // @ApiMember(Description="If Custom Fields are added to the booking, here you will send the id and the value for each custom field to be saved")
    List<AddCustomField> CustomFields = [];

    /**
    * If Custom Fields are added to the customer, here you will send the id and the value for each custom field to be updated
    */
    // @ApiMember(Description="If Custom Fields are added to the customer, here you will send the id and the value for each custom field to be updated")
    List<AddCustomField> CustomerCustomFields = [];

    /**
    * If want to allow to book outside the service schedules. This means you can book a time after the schedule opening hours as long as the resource are available. This is only allowed by administrators
    */
    // @ApiMember(Description="If want to allow to book outside the service schedules. This means you can book a time after the schedule opening hours as long as the resource are available. This is only allowed by administrators")
    bool AllowBookingOutsideSchedules;

    CreateBookingBase({this.CompanyId,this.CustomerId,this.PinCode,this.Customer,this.InvoiceAddress,this.ServiceId,this.BookedComments,this.CommentsToCustomer,this.Resources,this.RebateCodeIds,this.SendEmailReminder,this.SendSmsReminder,this.SendSmsConfirmation,this.SendEmailConfirmation,this.PaymentOption,this.CustomFields,this.CustomerCustomFields,this.AllowBookingOutsideSchedules});
    CreateBookingBase.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CompanyId = json['CompanyId'];
        CustomerId = json['CustomerId'];
        PinCode = json['PinCode'];
        Customer = JsonConverters.fromJson(json['Customer'],'CustomerToHandle',context!);
        InvoiceAddress = JsonConverters.fromJson(json['InvoiceAddress'],'InvoiceAddressToHandle',context!);
        ServiceId = json['ServiceId'];
        BookedComments = json['BookedComments'];
        CommentsToCustomer = json['CommentsToCustomer'];
        Resources = JsonConverters.fromJson(json['Resources'],'List<ResourceToBook>',context!);
        RebateCodeIds = JsonConverters.fromJson(json['RebateCodeIds'],'List<int>',context!);
        SendEmailReminder = json['SendEmailReminder'];
        SendSmsReminder = json['SendSmsReminder'];
        SendSmsConfirmation = json['SendSmsConfirmation'];
        SendEmailConfirmation = json['SendEmailConfirmation'];
        PaymentOption = JsonConverters.fromJson(json['PaymentOption'],'PaymentOptions',context!);
        CustomFields = JsonConverters.fromJson(json['CustomFields'],'List<AddCustomField>',context!);
        CustomerCustomFields = JsonConverters.fromJson(json['CustomerCustomFields'],'List<AddCustomField>',context!);
        AllowBookingOutsideSchedules = json['AllowBookingOutsideSchedules'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CompanyId': CompanyId,
        'CustomerId': CustomerId,
        'PinCode': PinCode,
        'Customer': JsonConverters.toJson(Customer,'CustomerToHandle',context!),
        'InvoiceAddress': JsonConverters.toJson(InvoiceAddress,'InvoiceAddressToHandle',context!),
        'ServiceId': ServiceId,
        'BookedComments': BookedComments,
        'CommentsToCustomer': CommentsToCustomer,
        'Resources': JsonConverters.toJson(Resources,'List<ResourceToBook>',context!),
        'RebateCodeIds': JsonConverters.toJson(RebateCodeIds,'List<int>',context!),
        'SendEmailReminder': SendEmailReminder,
        'SendSmsReminder': SendSmsReminder,
        'SendSmsConfirmation': SendSmsConfirmation,
        'SendEmailConfirmation': SendEmailConfirmation,
        'PaymentOption': JsonConverters.toJson(PaymentOption,'PaymentOptions',context!),
        'CustomFields': JsonConverters.toJson(CustomFields,'List<AddCustomField>',context!),
        'CustomerCustomFields': JsonConverters.toJson(CustomerCustomFields,'List<AddCustomField>',context!),
        'AllowBookingOutsideSchedules': AllowBookingOutsideSchedules
    };

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

enum BookingStatusEnum
{
    Booked,
    Unbooked,
    Reserved,
    Canceled,
    AwaitingPayment,
    AwaitingPaymentNoTimeLimit,
    Payed,
    AwaitingPaymentRequestFromAdmin,
    AwaitingPaymentFromProvider,
    Invoiced,
}

class BookingStatusQueryResponse implements IConvertible
{
    int Id = 0;
    String Name = "";
    String Description = "";
    String Icon = "";
    String Color = "";

    BookingStatusQueryResponse({this.Id,this.Name,this.Description,this.Icon,this.Color});
    BookingStatusQueryResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

    getTypeName() => "BookingStatusQueryResponse";
    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 = 0;

    /**
    * 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 = 0;

    /**
    * 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 CustomFieldDataResponse implements IConvertible
{
    int Id = 0;
    String Column = "";
    String Name = "";
    String Description = "";
    String Value = "";
    /**
    * 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 = "";

    CustomFieldDataResponse({this.Id,this.Column,this.Name,this.Description,this.Value,this.DataType});
    CustomFieldDataResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class BookedResource implements IConvertible
{
    int Id = 0;
    String Name = "";
    String Color = "";
    Uri ImageUrl;
    String Email = "";
    String MobilePhone = "";
    String AccessGroup = "";
    bool EmailNotification;
    bool SMSNotification;
    bool EmailReminder;
    bool SMSReminder;

    BookedResource({this.Id,this.Name,this.Color,this.ImageUrl,this.Email,this.MobilePhone,this.AccessGroup,this.EmailNotification,this.SMSNotification,this.EmailReminder,this.SMSReminder});
    BookedResource.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Name = json['Name'];
        Color = json['Color'];
        ImageUrl = JsonConverters.fromJson(json['ImageUrl'],'Uri',context!);
        Email = json['Email'];
        MobilePhone = json['MobilePhone'];
        AccessGroup = json['AccessGroup'];
        EmailNotification = json['EmailNotification'];
        SMSNotification = json['SMSNotification'];
        EmailReminder = json['EmailReminder'];
        SMSReminder = json['SMSReminder'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Name': Name,
        'Color': Color,
        'ImageUrl': JsonConverters.toJson(ImageUrl,'Uri',context!),
        'Email': Email,
        'MobilePhone': MobilePhone,
        'AccessGroup': AccessGroup,
        'EmailNotification': EmailNotification,
        'SMSNotification': SMSNotification,
        'EmailReminder': EmailReminder,
        'SMSReminder': SMSReminder
    };

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

class BookedResourceType implements IConvertible
{
    /**
    * The resource type id
    */
    // @ApiMember(Description="The resource type id")
    int Id = 0;

    /**
    * The resource type name
    */
    // @ApiMember(Description="The resource type name")
    String Name = "";

    /**
    * The resources inside resource type
    */
    // @ApiMember(Description="The resources inside resource type")
    List<BookedResource> Resources = [];

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

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Name = json['Name'];
        Resources = JsonConverters.fromJson(json['Resources'],'List<BookedResource>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Name': Name,
        'Resources': JsonConverters.toJson(Resources,'List<BookedResource>',context!)
    };

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

class BookedCompany implements IConvertible
{
    String Id = "";
    String Name = "";
    Uri LogoType;
    String Category = "";
    String Street1 = "";
    String Street2 = "";
    String ZipCode = "";
    String City = "";
    String CountryId = "";
    String Longitude = "";
    String Latitude = "";
    String Phone = "";
    String Email = "";
    String HomePage = "";
    String SitePath = "";
    bool IsFavorite;
    int? PaymentProviderId;

    BookedCompany({this.Id,this.Name,this.LogoType,this.Category,this.Street1,this.Street2,this.ZipCode,this.City,this.CountryId,this.Longitude,this.Latitude,this.Phone,this.Email,this.HomePage,this.SitePath,this.IsFavorite,this.PaymentProviderId});
    BookedCompany.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Name = json['Name'];
        LogoType = JsonConverters.fromJson(json['LogoType'],'Uri',context!);
        Category = json['Category'];
        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'];
        HomePage = json['HomePage'];
        SitePath = json['SitePath'];
        IsFavorite = json['IsFavorite'];
        PaymentProviderId = json['PaymentProviderId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Name': Name,
        'LogoType': JsonConverters.toJson(LogoType,'Uri',context!),
        'Category': Category,
        'Street1': Street1,
        'Street2': Street2,
        'ZipCode': ZipCode,
        'City': City,
        'CountryId': CountryId,
        'Longitude': Longitude,
        'Latitude': Latitude,
        'Phone': Phone,
        'Email': Email,
        'HomePage': HomePage,
        'SitePath': SitePath,
        'IsFavorite': IsFavorite,
        'PaymentProviderId': PaymentProviderId
    };

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

class BookedCustomer implements IConvertible
{
    String Id = "";
    String Firstname = "";
    String Lastname = "";
    String Email = "";
    String Phone = "";
    String FacebookUserName = "";
    String ImageUrl = "";
    String PersonalIdentityNumber = "";
    String CorporateIdentityNumber = "";
    String InvoiceAddress1 = "";
    String InvoiceAddress2 = "";
    String InvoiceCity = "";
    String InvoicePostalCode = "";
    String InvoiceCountryCode = "";

    BookedCustomer({this.Id,this.Firstname,this.Lastname,this.Email,this.Phone,this.FacebookUserName,this.ImageUrl,this.PersonalIdentityNumber,this.CorporateIdentityNumber,this.InvoiceAddress1,this.InvoiceAddress2,this.InvoiceCity,this.InvoicePostalCode,this.InvoiceCountryCode});
    BookedCustomer.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Firstname = json['Firstname'];
        Lastname = json['Lastname'];
        Email = json['Email'];
        Phone = json['Phone'];
        FacebookUserName = json['FacebookUserName'];
        ImageUrl = json['ImageUrl'];
        PersonalIdentityNumber = json['PersonalIdentityNumber'];
        CorporateIdentityNumber = json['CorporateIdentityNumber'];
        InvoiceAddress1 = json['InvoiceAddress1'];
        InvoiceAddress2 = json['InvoiceAddress2'];
        InvoiceCity = json['InvoiceCity'];
        InvoicePostalCode = json['InvoicePostalCode'];
        InvoiceCountryCode = json['InvoiceCountryCode'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Firstname': Firstname,
        'Lastname': Lastname,
        'Email': Email,
        'Phone': Phone,
        'FacebookUserName': FacebookUserName,
        'ImageUrl': ImageUrl,
        'PersonalIdentityNumber': PersonalIdentityNumber,
        'CorporateIdentityNumber': CorporateIdentityNumber,
        'InvoiceAddress1': InvoiceAddress1,
        'InvoiceAddress2': InvoiceAddress2,
        'InvoiceCity': InvoiceCity,
        'InvoicePostalCode': InvoicePostalCode,
        'InvoiceCountryCode': InvoiceCountryCode
    };

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

class BookedQuantity implements IConvertible
{
    /**
    * The quantity Id
    */
    // @ApiMember(Description="The quantity Id")
    int Id = 0;

    /**
    * The quantity for booked on this price category
    */
    // @ApiMember(Description="The quantity for booked on this price category")
    int Quantity = 0;

    /**
    * The price
    */
    // @ApiMember(Description="The price")
    double? Price;

    /**
    * The price bofore rebate codes
    */
    // @ApiMember(Description="The price bofore rebate codes")
    double? PriceBeforeRebate;

    /**
    * The price currency
    */
    // @ApiMember(Description="The price currency")
    String CurrencyId = "";

    /**
    * The price sign
    */
    // @ApiMember(Description="The price sign")
    String PriceSign = "";

    /**
    * The price category
    */
    // @ApiMember(Description="The price category")
    String Category = "";

    /**
    * The price VAT in percent
    */
    // @ApiMember(Description="The price VAT in percent")
    double? VAT;

    /**
    * The price text to display
    */
    // @ApiMember(Description="The price text to display")
    String PriceText = "";

    /**
    * If the quantity you add should occupy a spot. Default is true. If no it will only be a row that includes price information.
    */
    // @ApiMember(Description="If the quantity you add should occupy a spot. Default is true. If no it will only be a row that includes price information.")
    bool OccupiesSpot;

    BookedQuantity({this.Id,this.Quantity,this.Price,this.PriceBeforeRebate,this.CurrencyId,this.PriceSign,this.Category,this.VAT,this.PriceText,this.OccupiesSpot});
    BookedQuantity.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Quantity = json['Quantity'];
        Price = JsonConverters.toDouble(json['Price']);
        PriceBeforeRebate = JsonConverters.toDouble(json['PriceBeforeRebate']);
        CurrencyId = json['CurrencyId'];
        PriceSign = json['PriceSign'];
        Category = json['Category'];
        VAT = JsonConverters.toDouble(json['VAT']);
        PriceText = json['PriceText'];
        OccupiesSpot = json['OccupiesSpot'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Quantity': Quantity,
        'Price': Price,
        'PriceBeforeRebate': PriceBeforeRebate,
        'CurrencyId': CurrencyId,
        'PriceSign': PriceSign,
        'Category': Category,
        'VAT': VAT,
        'PriceText': PriceText,
        'OccupiesSpot': OccupiesSpot
    };

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

class GroupBookingSettings implements IConvertible
{
    bool Active;
    int Min = 0;
    int Max = 0;

    GroupBookingSettings({this.Active,this.Min,this.Max});
    GroupBookingSettings.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'Active': Active,
        'Min': Min,
        'Max': Max
    };

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

class MultipleResourceSettings implements IConvertible
{
    bool Active;
    int Min = 0;
    int Max = 0;

    MultipleResourceSettings({this.Active,this.Min,this.Max});
    MultipleResourceSettings.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'Active': Active,
        'Min': Min,
        'Max': Max
    };

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

class ServiceInfoResponse implements IConvertible
{
    int Id = 0;
    String Name = "";
    String Description = "";
    Uri ImageUrl;
    int? LengthInMinutes;
    int MaxNumberOfSpotsPerBooking = 0;
    int MinNumberOfSpotsPerBooking = 0;
    GroupBookingSettings GroupBooking;
    MultipleResourceSettings MultipleResource;
    bool IsGroupBooking;
    bool IsPaymentEnabled;

    ServiceInfoResponse({this.Id,this.Name,this.Description,this.ImageUrl,this.LengthInMinutes,this.MaxNumberOfSpotsPerBooking,this.MinNumberOfSpotsPerBooking,this.GroupBooking,this.MultipleResource,this.IsGroupBooking,this.IsPaymentEnabled});
    ServiceInfoResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Name = json['Name'];
        Description = json['Description'];
        ImageUrl = JsonConverters.fromJson(json['ImageUrl'],'Uri',context!);
        LengthInMinutes = json['LengthInMinutes'];
        MaxNumberOfSpotsPerBooking = json['MaxNumberOfSpotsPerBooking'];
        MinNumberOfSpotsPerBooking = json['MinNumberOfSpotsPerBooking'];
        GroupBooking = JsonConverters.fromJson(json['GroupBooking'],'GroupBookingSettings',context!);
        MultipleResource = JsonConverters.fromJson(json['MultipleResource'],'MultipleResourceSettings',context!);
        IsGroupBooking = json['IsGroupBooking'];
        IsPaymentEnabled = json['IsPaymentEnabled'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Name': Name,
        'Description': Description,
        'ImageUrl': JsonConverters.toJson(ImageUrl,'Uri',context!),
        'LengthInMinutes': LengthInMinutes,
        'MaxNumberOfSpotsPerBooking': MaxNumberOfSpotsPerBooking,
        'MinNumberOfSpotsPerBooking': MinNumberOfSpotsPerBooking,
        'GroupBooking': JsonConverters.toJson(GroupBooking,'GroupBookingSettings',context!),
        'MultipleResource': JsonConverters.toJson(MultipleResource,'MultipleResourceSettings',context!),
        'IsGroupBooking': IsGroupBooking,
        'IsPaymentEnabled': IsPaymentEnabled
    };

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

class InvoiceAddressResponse implements IConvertible
{
    String InvoiceAddressId = "";
    String? UserId;
    String CorporateIdentityNumber = "";
    String InvoiceAddress1 = "";
    String InvoiceAddress2 = "";
    String InvoiceCity = "";
    String InvoicePostalCode = "";
    String InvoiceCountryCode = "";

    InvoiceAddressResponse({this.InvoiceAddressId,this.UserId,this.CorporateIdentityNumber,this.InvoiceAddress1,this.InvoiceAddress2,this.InvoiceCity,this.InvoicePostalCode,this.InvoiceCountryCode});
    InvoiceAddressResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        InvoiceAddressId = json['InvoiceAddressId'];
        UserId = json['UserId'];
        CorporateIdentityNumber = json['CorporateIdentityNumber'];
        InvoiceAddress1 = json['InvoiceAddress1'];
        InvoiceAddress2 = json['InvoiceAddress2'];
        InvoiceCity = json['InvoiceCity'];
        InvoicePostalCode = json['InvoicePostalCode'];
        InvoiceCountryCode = json['InvoiceCountryCode'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'InvoiceAddressId': InvoiceAddressId,
        'UserId': UserId,
        'CorporateIdentityNumber': CorporateIdentityNumber,
        'InvoiceAddress1': InvoiceAddress1,
        'InvoiceAddress2': InvoiceAddress2,
        'InvoiceCity': InvoiceCity,
        'InvoicePostalCode': InvoicePostalCode,
        'InvoiceCountryCode': InvoiceCountryCode
    };

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

class BookingLogEventTypeResponse implements IConvertible
{
    /**
    * The event type id
    */
    // @ApiMember(Description="The event type id")
    int Id = 0;

    /**
    * The event type name
    */
    // @ApiMember(Description="The event type name")
    String Name = "";

    /**
    * The event type description
    */
    // @ApiMember(Description="The event type description")
    String Description = "";

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

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

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

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

class BookingLogQueryResponse implements IConvertible
{
    /**
    * The booking log id
    */
    // @ApiMember(Description="The booking log id")
    int Id = 0;

    /**
    * The booking id
    */
    // @ApiMember(Description="The booking id")
    int BookingId = 0;

    /**
    * The type of event
    */
    // @ApiMember(Description="The type of event")
    int EventTypeId = 0;

    /**
    * The type of event
    */
    // @ApiMember(Description="The type of event")
    BookingLogEventTypeResponse EventType;

    /**
    * Comments that could be added to the event log item
    */
    // @ApiMember(Description="Comments that could be added to the event log item")
    String Comments = "";

    /**
    * The user created the event
    */
    // @ApiMember(Description="The user created the event")
    String UserName = "";

    /**
    * The date when the event occurred
    */
    // @ApiMember(Description="The date when the event occurred")
    DateTime Created = DateTime(0);

    BookingLogQueryResponse({this.Id,this.BookingId,this.EventTypeId,this.EventType,this.Comments,this.UserName,this.Created});
    BookingLogQueryResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        BookingId = json['BookingId'];
        EventTypeId = json['EventTypeId'];
        EventType = JsonConverters.fromJson(json['EventType'],'BookingLogEventTypeResponse',context!);
        Comments = json['Comments'];
        UserName = json['UserName'];
        Created = JsonConverters.fromJson(json['Created'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'BookingId': BookingId,
        'EventTypeId': EventTypeId,
        'EventType': JsonConverters.toJson(EventType,'BookingLogEventTypeResponse',context!),
        'Comments': Comments,
        'UserName': UserName,
        'Created': JsonConverters.toJson(Created,'DateTime',context!)
    };

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

class CurrencyInfoResponse implements IConvertible
{
    /**
    * The currency id
    */
    // @ApiMember(Description="The currency id")
    String Id = "";

    /**
    * The currency id
    */
    // @ApiMember(Description="The currency id")
    String Name = "";

    /**
    * The currency id
    */
    // @ApiMember(Description="The currency id")
    String CurrencySign = "";

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

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

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

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

class BookingPaymentLogQueryResponse implements IConvertible
{
    /**
    * The booking payment log id
    */
    // @ApiMember(Description="The booking payment log id")
    int Id = 0;

    /**
    * The booking id
    */
    // @ApiMember(Description="The booking id")
    int BookingId = 0;

    /**
    * The payment reference id
    */
    // @ApiMember(Description="The payment reference id")
    String PaymentReferenceId = "";

    /**
    * The payment order item reference id
    */
    // @ApiMember(Description="The payment order item reference id")
    String OrderItemReferenceId = "";

    /**
    * The payment reference id
    */
    // @ApiMember(Description="The payment reference id")
    int? PaymentProviderId;

    /**
    * The payment amount
    */
    // @ApiMember(Description="The payment amount")
    double Amount = 0;

    /**
    * The payment VAT in percent
    */
    // @ApiMember(Description="The payment VAT in percent")
    double VAT = 0;

    /**
    * The payment amount that is credited
    */
    // @ApiMember(Description="The payment amount that is credited")
    double AmountCredited = 0;

    /**
    * The payment currency id
    */
    // @ApiMember(Description="The payment currency id")
    String CurrencyId = "";

    /**
    * The payment currency info
    */
    // @ApiMember(Description="The payment currency info")
    CurrencyInfoResponse CurrencyInfo;

    /**
    * Comments that could be added to the event log item
    */
    // @ApiMember(Description="Comments that could be added to the event log item")
    String Comments = "";

    /**
    * The date when the payment items was created
    */
    // @ApiMember(Description="The date when the payment items was created")
    DateTime Created = DateTime(0);

    /**
    * The date when the payment items were updated.
    */
    // @ApiMember(Description="The date when the payment items were updated.")
    DateTime Updated = DateTime(0);

    BookingPaymentLogQueryResponse({this.Id,this.BookingId,this.PaymentReferenceId,this.OrderItemReferenceId,this.PaymentProviderId,this.Amount,this.VAT,this.AmountCredited,this.CurrencyId,this.CurrencyInfo,this.Comments,this.Created,this.Updated});
    BookingPaymentLogQueryResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        BookingId = json['BookingId'];
        PaymentReferenceId = json['PaymentReferenceId'];
        OrderItemReferenceId = json['OrderItemReferenceId'];
        PaymentProviderId = json['PaymentProviderId'];
        Amount = JsonConverters.toDouble(json['Amount']);
        VAT = JsonConverters.toDouble(json['VAT']);
        AmountCredited = JsonConverters.toDouble(json['AmountCredited']);
        CurrencyId = json['CurrencyId'];
        CurrencyInfo = JsonConverters.fromJson(json['CurrencyInfo'],'CurrencyInfoResponse',context!);
        Comments = json['Comments'];
        Created = JsonConverters.fromJson(json['Created'],'DateTime',context!);
        Updated = JsonConverters.fromJson(json['Updated'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'BookingId': BookingId,
        'PaymentReferenceId': PaymentReferenceId,
        'OrderItemReferenceId': OrderItemReferenceId,
        'PaymentProviderId': PaymentProviderId,
        'Amount': Amount,
        'VAT': VAT,
        'AmountCredited': AmountCredited,
        'CurrencyId': CurrencyId,
        'CurrencyInfo': JsonConverters.toJson(CurrencyInfo,'CurrencyInfoResponse',context!),
        'Comments': Comments,
        'Created': JsonConverters.toJson(Created,'DateTime',context!),
        'Updated': JsonConverters.toJson(Updated,'DateTime',context!)
    };

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

class BookingCheckoutQueryResponse implements IConvertible
{
    /**
    * The checkout id
    */
    // @ApiMember(Description="The checkout id")
    String Id = "";

    /**
    * The booking id
    */
    // @ApiMember(Description="The booking id")
    int BookingId = 0;

    /**
    * The purchase id
    */
    // @ApiMember(Description="The purchase id")
    int? PurchaseId;

    /**
    * The payment checkout expiration datetime
    */
    // @ApiMember(Description="The payment checkout expiration datetime")
    DateTime? ExpirationTime;

    /**
    * The payment snippet code
    */
    // @ApiMember(Description="The payment snippet code")
    String Snippet = "";

    /**
    * The payment status
    */
    // @ApiMember(Description="The payment status")
    String Status = "";

    /**
    * Log message
    */
    // @ApiMember(Description="Log message")
    String Message = "";

    /**
    * When the checkout log item was created
    */
    // @ApiMember(Description="When the checkout log item was created")
    DateTime Created = DateTime(0);

    /**
    * When the checkout log item was updated
    */
    // @ApiMember(Description="When the checkout log item was updated")
    DateTime Updated = DateTime(0);

    BookingCheckoutQueryResponse({this.Id,this.BookingId,this.PurchaseId,this.ExpirationTime,this.Snippet,this.Status,this.Message,this.Created,this.Updated});
    BookingCheckoutQueryResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        BookingId = json['BookingId'];
        PurchaseId = json['PurchaseId'];
        ExpirationTime = JsonConverters.fromJson(json['ExpirationTime'],'DateTime',context!);
        Snippet = json['Snippet'];
        Status = json['Status'];
        Message = json['Message'];
        Created = JsonConverters.fromJson(json['Created'],'DateTime',context!);
        Updated = JsonConverters.fromJson(json['Updated'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'BookingId': BookingId,
        'PurchaseId': PurchaseId,
        'ExpirationTime': JsonConverters.toJson(ExpirationTime,'DateTime',context!),
        'Snippet': Snippet,
        'Status': Status,
        'Message': Message,
        'Created': JsonConverters.toJson(Created,'DateTime',context!),
        'Updated': JsonConverters.toJson(Updated,'DateTime',context!)
    };

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

class ExternalReferenceResponse implements IConvertible
{
    String CompanyId = "";
    String Id = "";
    String OwnerId = "";
    String ReferenceType = "";
    int ReferenceTypeId = 0;
    String ExternalData = "";
    String CreatedBy = "";
    DateTime Updated = DateTime(0);
    DateTime Created = DateTime(0);

    ExternalReferenceResponse({this.CompanyId,this.Id,this.OwnerId,this.ReferenceType,this.ReferenceTypeId,this.ExternalData,this.CreatedBy,this.Updated,this.Created});
    ExternalReferenceResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CompanyId = json['CompanyId'];
        Id = json['Id'];
        OwnerId = json['OwnerId'];
        ReferenceType = json['ReferenceType'];
        ReferenceTypeId = json['ReferenceTypeId'];
        ExternalData = json['ExternalData'];
        CreatedBy = json['CreatedBy'];
        Updated = JsonConverters.fromJson(json['Updated'],'DateTime',context!);
        Created = JsonConverters.fromJson(json['Created'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CompanyId': CompanyId,
        'Id': Id,
        'OwnerId': OwnerId,
        'ReferenceType': ReferenceType,
        'ReferenceTypeId': ReferenceTypeId,
        'ExternalData': ExternalData,
        'CreatedBy': CreatedBy,
        'Updated': JsonConverters.toJson(Updated,'DateTime',context!),
        'Created': JsonConverters.toJson(Created,'DateTime',context!)
    };

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

class BookingQueryResponse implements IConvertible
{
    int Id = 0;
    String CompanyId = "";
    DateTime From = DateTime(0);
    DateTime To = DateTime(0);
    BookingStatusEnum Status;
    int StatusId = 0;
    String StatusName = "";
    BookingStatusQueryResponse StatusInfo;
    bool SendEmailReminder;
    bool SendSmsReminder;
    bool SendSmsConfirmation;
    bool SendEmailConfirmation;
    DateTime? LastTimeToUnBook;
    List<CustomFieldConfigData> CustomFields = [];
    List<CustomFieldDataResponse> CustomFieldValues = [];
    List<BookedResourceType> BookedResourceTypes = [];
    BookedCompany Company;
    BookedCustomer Customer;
    List<BookedQuantity> Quantities = [];
    ServiceInfoResponse Service;
    InvoiceAddressResponse InvoiceAddress;
    DateTime? PaymentExpiration;
    List<BookingLogQueryResponse> Log = [];
    List<BookingPaymentLogQueryResponse> PaymentLog = [];
    List<BookingCheckoutQueryResponse> CheckoutLog = [];
    List<ExternalReferenceResponse> ExternalReference = [];
    ResponseStatus ResponseStatus;
    int? LengthInMinutes;
    String BookedBy = "";
    String BookedComments = "";
    String UnbookedComments = "";
    String CommentsToCustomer = "";
    DateTime CreatedDate = DateTime(0);
    DateTime UpdatedDate = DateTime(0);
    DateTime? UnbookedOn;
    String CancellationCode = "";
    String RatingCode = "";

    BookingQueryResponse({this.Id,this.CompanyId,this.From,this.To,this.Status,this.StatusId,this.StatusName,this.StatusInfo,this.SendEmailReminder,this.SendSmsReminder,this.SendSmsConfirmation,this.SendEmailConfirmation,this.LastTimeToUnBook,this.CustomFields,this.CustomFieldValues,this.BookedResourceTypes,this.Company,this.Customer,this.Quantities,this.Service,this.InvoiceAddress,this.PaymentExpiration,this.Log,this.PaymentLog,this.CheckoutLog,this.ExternalReference,this.ResponseStatus,this.LengthInMinutes,this.BookedBy,this.BookedComments,this.UnbookedComments,this.CommentsToCustomer,this.CreatedDate,this.UpdatedDate,this.UnbookedOn,this.CancellationCode,this.RatingCode});
    BookingQueryResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        CompanyId = json['CompanyId'];
        From = JsonConverters.fromJson(json['From'],'DateTime',context!);
        To = JsonConverters.fromJson(json['To'],'DateTime',context!);
        Status = JsonConverters.fromJson(json['Status'],'BookingStatusEnum',context!);
        StatusId = json['StatusId'];
        StatusName = json['StatusName'];
        StatusInfo = JsonConverters.fromJson(json['StatusInfo'],'BookingStatusQueryResponse',context!);
        SendEmailReminder = json['SendEmailReminder'];
        SendSmsReminder = json['SendSmsReminder'];
        SendSmsConfirmation = json['SendSmsConfirmation'];
        SendEmailConfirmation = json['SendEmailConfirmation'];
        LastTimeToUnBook = JsonConverters.fromJson(json['LastTimeToUnBook'],'DateTime',context!);
        CustomFields = JsonConverters.fromJson(json['CustomFields'],'List<CustomFieldConfigData>',context!);
        CustomFieldValues = JsonConverters.fromJson(json['CustomFieldValues'],'List<CustomFieldDataResponse>',context!);
        BookedResourceTypes = JsonConverters.fromJson(json['BookedResourceTypes'],'List<BookedResourceType>',context!);
        Company = JsonConverters.fromJson(json['Company'],'BookedCompany',context!);
        Customer = JsonConverters.fromJson(json['Customer'],'BookedCustomer',context!);
        Quantities = JsonConverters.fromJson(json['Quantities'],'List<BookedQuantity>',context!);
        Service = JsonConverters.fromJson(json['Service'],'ServiceInfoResponse',context!);
        InvoiceAddress = JsonConverters.fromJson(json['InvoiceAddress'],'InvoiceAddressResponse',context!);
        PaymentExpiration = JsonConverters.fromJson(json['PaymentExpiration'],'DateTime',context!);
        Log = JsonConverters.fromJson(json['Log'],'List<BookingLogQueryResponse>',context!);
        PaymentLog = JsonConverters.fromJson(json['PaymentLog'],'List<BookingPaymentLogQueryResponse>',context!);
        CheckoutLog = JsonConverters.fromJson(json['CheckoutLog'],'List<BookingCheckoutQueryResponse>',context!);
        ExternalReference = JsonConverters.fromJson(json['ExternalReference'],'List<ExternalReferenceResponse>',context!);
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        LengthInMinutes = json['LengthInMinutes'];
        BookedBy = json['BookedBy'];
        BookedComments = json['BookedComments'];
        UnbookedComments = json['UnbookedComments'];
        CommentsToCustomer = json['CommentsToCustomer'];
        CreatedDate = JsonConverters.fromJson(json['CreatedDate'],'DateTime',context!);
        UpdatedDate = JsonConverters.fromJson(json['UpdatedDate'],'DateTime',context!);
        UnbookedOn = JsonConverters.fromJson(json['UnbookedOn'],'DateTime',context!);
        CancellationCode = json['CancellationCode'];
        RatingCode = json['RatingCode'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'CompanyId': CompanyId,
        'From': JsonConverters.toJson(From,'DateTime',context!),
        'To': JsonConverters.toJson(To,'DateTime',context!),
        'Status': JsonConverters.toJson(Status,'BookingStatusEnum',context!),
        'StatusId': StatusId,
        'StatusName': StatusName,
        'StatusInfo': JsonConverters.toJson(StatusInfo,'BookingStatusQueryResponse',context!),
        'SendEmailReminder': SendEmailReminder,
        'SendSmsReminder': SendSmsReminder,
        'SendSmsConfirmation': SendSmsConfirmation,
        'SendEmailConfirmation': SendEmailConfirmation,
        'LastTimeToUnBook': JsonConverters.toJson(LastTimeToUnBook,'DateTime',context!),
        'CustomFields': JsonConverters.toJson(CustomFields,'List<CustomFieldConfigData>',context!),
        'CustomFieldValues': JsonConverters.toJson(CustomFieldValues,'List<CustomFieldDataResponse>',context!),
        'BookedResourceTypes': JsonConverters.toJson(BookedResourceTypes,'List<BookedResourceType>',context!),
        'Company': JsonConverters.toJson(Company,'BookedCompany',context!),
        'Customer': JsonConverters.toJson(Customer,'BookedCustomer',context!),
        'Quantities': JsonConverters.toJson(Quantities,'List<BookedQuantity>',context!),
        'Service': JsonConverters.toJson(Service,'ServiceInfoResponse',context!),
        'InvoiceAddress': JsonConverters.toJson(InvoiceAddress,'InvoiceAddressResponse',context!),
        'PaymentExpiration': JsonConverters.toJson(PaymentExpiration,'DateTime',context!),
        'Log': JsonConverters.toJson(Log,'List<BookingLogQueryResponse>',context!),
        'PaymentLog': JsonConverters.toJson(PaymentLog,'List<BookingPaymentLogQueryResponse>',context!),
        'CheckoutLog': JsonConverters.toJson(CheckoutLog,'List<BookingCheckoutQueryResponse>',context!),
        'ExternalReference': JsonConverters.toJson(ExternalReference,'List<ExternalReferenceResponse>',context!),
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
        'LengthInMinutes': LengthInMinutes,
        'BookedBy': BookedBy,
        'BookedComments': BookedComments,
        'UnbookedComments': UnbookedComments,
        'CommentsToCustomer': CommentsToCustomer,
        'CreatedDate': JsonConverters.toJson(CreatedDate,'DateTime',context!),
        'UpdatedDate': JsonConverters.toJson(UpdatedDate,'DateTime',context!),
        'UnbookedOn': JsonConverters.toJson(UnbookedOn,'DateTime',context!),
        'CancellationCode': CancellationCode,
        'RatingCode': RatingCode
    };

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

class QuantityToBook implements IConvertible
{
    /**
    * If service has a price, enter the price id for that price. If no price exists for the service set 0 as PriceId. If you put 0 and a price exists, it will use that price (only works if just one price exists for the current selected date to book)
    */
    // @ApiMember(Description="If service has a price, enter the price id for that price. If no price exists for the service set 0 as PriceId. If you put 0 and a price exists, it will use that price (only works if just one price exists for the current selected date to book)", IsRequired=true)
    int PriceId = 0;

    /**
    * Set the number of spots or resources you want to book on the specific price category
    */
    // @ApiMember(Description="Set the number of spots or resources you want to book on the specific price category", IsRequired=true)
    int Quantity = 0;

    /**
    * If the quantity you add should occupy a spot. Default is true. If no it will only be a row that includes price information.
    */
    // @ApiMember(Description="If the quantity you add should occupy a spot. Default is true. If no it will only be a row that includes price information.")
    bool OccupiesSpot;

    QuantityToBook({this.PriceId,this.Quantity,this.OccupiesSpot});
    QuantityToBook.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'PriceId': PriceId,
        'Quantity': Quantity,
        'OccupiesSpot': OccupiesSpot
    };

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

class FailedBookings implements IConvertible
{
    DateTime From = DateTime(0);
    DateTime To = DateTime(0);
    String Reason = "";
    /**
    * Set the number of spots you want to book. You add number of spots per price category. Multiple spots require that the service has GroupBooking enabled. Default is one spot.
    */
    // @ApiMember(Description="Set the number of spots you want to book. You add number of spots per price category. Multiple spots require that the service has GroupBooking enabled. Default is one spot.")
    List<QuantityToBook> Quantities = [];

    FailedBookings({this.From,this.To,this.Reason,this.Quantities});
    FailedBookings.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        From = JsonConverters.fromJson(json['From'],'DateTime',context!);
        To = JsonConverters.fromJson(json['To'],'DateTime',context!);
        Reason = json['Reason'];
        Quantities = JsonConverters.fromJson(json['Quantities'],'List<QuantityToBook>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'From': JsonConverters.toJson(From,'DateTime',context!),
        'To': JsonConverters.toJson(To,'DateTime',context!),
        'Reason': Reason,
        'Quantities': JsonConverters.toJson(Quantities,'List<QuantityToBook>',context!)
    };

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

class CreateBookingsResponse implements IConvertible
{
    /**
    * The datetime you want to end the booking.
    */
    // @ApiMember(Description="The datetime you want to end the booking.", IsRequired=true)
    List<BookingQueryResponse> Created = [];

    /**
    * The dates that didn't work to book.
    */
    // @ApiMember(Description="The dates that didn't work to book.", IsRequired=true)
    List<FailedBookings> Failed = [];

    ResponseStatus ResponseStatus;

    CreateBookingsResponse({this.Created,this.Failed,this.ResponseStatus});
    CreateBookingsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Created = JsonConverters.fromJson(json['Created'],'List<BookingQueryResponse>',context!);
        Failed = JsonConverters.fromJson(json['Failed'],'List<FailedBookings>',context!);
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Created': JsonConverters.toJson(Created,'List<BookingQueryResponse>',context!),
        'Failed': JsonConverters.toJson(Failed,'List<FailedBookings>',context!),
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
    };

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

class DatesToRepeat implements IInterval, IConvertible
{
    /**
    * Booking start
    */
    // @ApiMember(Description="Booking start")
    DateTime From = DateTime(0);

    /**
    * Booking end
    */
    // @ApiMember(Description="Booking end")
    DateTime To = DateTime(0);

    /**
    * Set the number of spots you want to book. You add number of spots per price category. Multiple spots require that the service has GroupBooking enabled. Default is one spot.
    */
    // @ApiMember(Description="Set the number of spots you want to book. You add number of spots per price category. Multiple spots require that the service has GroupBooking enabled. Default is one spot.")
    List<QuantityToBook> Quantities = [];

    DatesToRepeat({this.From,this.To,this.Quantities});
    DatesToRepeat.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        From = JsonConverters.fromJson(json['From'],'DateTime',context!);
        To = JsonConverters.fromJson(json['To'],'DateTime',context!);
        Quantities = JsonConverters.fromJson(json['Quantities'],'List<QuantityToBook>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'From': JsonConverters.toJson(From,'DateTime',context!),
        'To': JsonConverters.toJson(To,'DateTime',context!),
        'Quantities': JsonConverters.toJson(Quantities,'List<QuantityToBook>',context!)
    };

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

// @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
class CreateBookings extends CreateBookingBase implements IConvertible
{
    /**
    * Set the dates you want to book and it's quantities. It's an array of dates and quantities.
    */
    // @ApiMember(DataType="List<DatesToRepeat>", Description="Set the dates you want to book and it's quantities. It's an array of dates and quantities.", IsRequired=true)
    List<DatesToRepeat> DatesToRepeat = [];

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

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

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'DatesToRepeat': JsonConverters.toJson(DatesToRepeat,'List<DatesToRepeat>',context!)
    });

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

TypeContext _ctx = TypeContext(library: 'testapi.bokamera.se', types: <String, TypeInfo> {
    'CustomerBase': TypeInfo(TypeOf.Class, create:() => CustomerBase()),
    'CustomerToHandle': TypeInfo(TypeOf.Class, create:() => CustomerToHandle()),
    'InvoiceAddressToHandle': TypeInfo(TypeOf.Class, create:() => InvoiceAddressToHandle()),
    'ResourceToBook': TypeInfo(TypeOf.Class, create:() => ResourceToBook()),
    'PaymentOptions': TypeInfo(TypeOf.Enum, enumValues:PaymentOptions.values),
    'AddCustomField': TypeInfo(TypeOf.Class, create:() => AddCustomField()),
    'CreateBookingBase': TypeInfo(TypeOf.Class, create:() => CreateBookingBase()),
    'List<ResourceToBook>': TypeInfo(TypeOf.Class, create:() => <ResourceToBook>[]),
    'List<AddCustomField>': TypeInfo(TypeOf.Class, create:() => <AddCustomField>[]),
    'BookingStatusEnum': TypeInfo(TypeOf.Enum, enumValues:BookingStatusEnum.values),
    'BookingStatusQueryResponse': TypeInfo(TypeOf.Class, create:() => BookingStatusQueryResponse()),
    'CustomFieldValueResponse': TypeInfo(TypeOf.Class, create:() => CustomFieldValueResponse()),
    'CustomFieldConfigData': TypeInfo(TypeOf.Class, create:() => CustomFieldConfigData()),
    'List<CustomFieldValueResponse>': TypeInfo(TypeOf.Class, create:() => <CustomFieldValueResponse>[]),
    'CustomFieldDataResponse': TypeInfo(TypeOf.Class, create:() => CustomFieldDataResponse()),
    'BookedResource': TypeInfo(TypeOf.Class, create:() => BookedResource()),
    'Uri': TypeInfo(TypeOf.Class, create:() => Uri()),
    'BookedResourceType': TypeInfo(TypeOf.Class, create:() => BookedResourceType()),
    'List<BookedResource>': TypeInfo(TypeOf.Class, create:() => <BookedResource>[]),
    'BookedCompany': TypeInfo(TypeOf.Class, create:() => BookedCompany()),
    'BookedCustomer': TypeInfo(TypeOf.Class, create:() => BookedCustomer()),
    'BookedQuantity': TypeInfo(TypeOf.Class, create:() => BookedQuantity()),
    'GroupBookingSettings': TypeInfo(TypeOf.Class, create:() => GroupBookingSettings()),
    'MultipleResourceSettings': TypeInfo(TypeOf.Class, create:() => MultipleResourceSettings()),
    'ServiceInfoResponse': TypeInfo(TypeOf.Class, create:() => ServiceInfoResponse()),
    'InvoiceAddressResponse': TypeInfo(TypeOf.Class, create:() => InvoiceAddressResponse()),
    'BookingLogEventTypeResponse': TypeInfo(TypeOf.Class, create:() => BookingLogEventTypeResponse()),
    'BookingLogQueryResponse': TypeInfo(TypeOf.Class, create:() => BookingLogQueryResponse()),
    'CurrencyInfoResponse': TypeInfo(TypeOf.Class, create:() => CurrencyInfoResponse()),
    'BookingPaymentLogQueryResponse': TypeInfo(TypeOf.Class, create:() => BookingPaymentLogQueryResponse()),
    'BookingCheckoutQueryResponse': TypeInfo(TypeOf.Class, create:() => BookingCheckoutQueryResponse()),
    'ExternalReferenceResponse': TypeInfo(TypeOf.Class, create:() => ExternalReferenceResponse()),
    'BookingQueryResponse': TypeInfo(TypeOf.Class, create:() => BookingQueryResponse()),
    'List<CustomFieldConfigData>': TypeInfo(TypeOf.Class, create:() => <CustomFieldConfigData>[]),
    'List<CustomFieldDataResponse>': TypeInfo(TypeOf.Class, create:() => <CustomFieldDataResponse>[]),
    'List<BookedResourceType>': TypeInfo(TypeOf.Class, create:() => <BookedResourceType>[]),
    'List<BookedQuantity>': TypeInfo(TypeOf.Class, create:() => <BookedQuantity>[]),
    'List<BookingLogQueryResponse>': TypeInfo(TypeOf.Class, create:() => <BookingLogQueryResponse>[]),
    'List<BookingPaymentLogQueryResponse>': TypeInfo(TypeOf.Class, create:() => <BookingPaymentLogQueryResponse>[]),
    'List<BookingCheckoutQueryResponse>': TypeInfo(TypeOf.Class, create:() => <BookingCheckoutQueryResponse>[]),
    'List<ExternalReferenceResponse>': TypeInfo(TypeOf.Class, create:() => <ExternalReferenceResponse>[]),
    'QuantityToBook': TypeInfo(TypeOf.Class, create:() => QuantityToBook()),
    'FailedBookings': TypeInfo(TypeOf.Class, create:() => FailedBookings()),
    'List<QuantityToBook>': TypeInfo(TypeOf.Class, create:() => <QuantityToBook>[]),
    'CreateBookingsResponse': TypeInfo(TypeOf.Class, create:() => CreateBookingsResponse()),
    'List<BookingQueryResponse>': TypeInfo(TypeOf.Class, create:() => <BookingQueryResponse>[]),
    'List<FailedBookings>': TypeInfo(TypeOf.Class, create:() => <FailedBookings>[]),
    'DatesToRepeat': TypeInfo(TypeOf.Class, create:() => DatesToRepeat()),
    'CreateBookings': TypeInfo(TypeOf.Class, create:() => CreateBookings()),
    'List<DatesToRepeat>': TypeInfo(TypeOf.Class, create:() => <DatesToRepeat>[]),
});

Dart CreateBookings 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 /bookings/repeat HTTP/1.1 
Host: testapi.bokamera.se 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<CreateBookings xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <AllowBookingOutsideSchedules xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos.Commons">false</AllowBookingOutsideSchedules>
  <BookedComments xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos.Commons">String</BookedComments>
  <CommentsToCustomer xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos.Commons">String</CommentsToCustomer>
  <CompanyId xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos.Commons">00000000-0000-0000-0000-000000000000</CompanyId>
  <CustomFields xmlns:d2p1="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos.Commons">
    <d2p1:AddCustomField>
      <d2p1:Id>0</d2p1:Id>
      <d2p1:Value>String</d2p1:Value>
    </d2p1:AddCustomField>
  </CustomFields>
  <Customer xmlns:d2p1="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos.Commons">
    <CustomerId>00000000-0000-0000-0000-000000000000</CustomerId>
    <Email>String</Email>
    <Firstname>String</Firstname>
    <Lastname>String</Lastname>
    <PersonalIdentityNumber>String</PersonalIdentityNumber>
    <Phone>String</Phone>
    <SubscribedToNewsletter>false</SubscribedToNewsletter>
  </Customer>
  <CustomerCustomFields xmlns:d2p1="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos.Commons">
    <d2p1:AddCustomField>
      <d2p1:Id>0</d2p1:Id>
      <d2p1:Value>String</d2p1:Value>
    </d2p1:AddCustomField>
  </CustomerCustomFields>
  <CustomerId xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos.Commons">00000000-0000-0000-0000-000000000000</CustomerId>
  <InvoiceAddress xmlns:d2p1="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos.Commons">
    <d2p1:CorporateIdentityNumber>String</d2p1:CorporateIdentityNumber>
    <d2p1:InvoiceAddress1>String</d2p1:InvoiceAddress1>
    <d2p1:InvoiceAddress2>String</d2p1:InvoiceAddress2>
    <d2p1:InvoiceCity>String</d2p1:InvoiceCity>
    <d2p1:InvoiceCountryCode>String</d2p1:InvoiceCountryCode>
    <d2p1:InvoicePostalCode>String</d2p1:InvoicePostalCode>
  </InvoiceAddress>
  <PaymentOption xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos.Commons">DefaultSetting</PaymentOption>
  <PinCode xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos.Commons">String</PinCode>
  <RebateCodeIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos.Commons">
    <d2p1:int>0</d2p1:int>
  </RebateCodeIds>
  <Resources xmlns:d2p1="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos.Commons">
    <d2p1:ResourceToBook>
      <d2p1:ResourceId>0</d2p1:ResourceId>
      <d2p1:ResourceTypeId>0</d2p1:ResourceTypeId>
    </d2p1:ResourceToBook>
  </Resources>
  <SendEmailConfirmation xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos.Commons">false</SendEmailConfirmation>
  <SendEmailReminder xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos.Commons">false</SendEmailReminder>
  <SendSmsConfirmation xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos.Commons">false</SendSmsConfirmation>
  <SendSmsReminder xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos.Commons">false</SendSmsReminder>
  <ServiceId xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos.Commons">0</ServiceId>
  <DatesToRepeat>
    <DatesToRepeat>
      <From>0001-01-01T00:00:00</From>
      <Quantities>
        <QuantityToBook>
          <OccupiesSpot>false</OccupiesSpot>
          <PriceId>0</PriceId>
          <Quantity>0</Quantity>
        </QuantityToBook>
      </Quantities>
      <To>0001-01-01T00:00:00</To>
    </DatesToRepeat>
  </DatesToRepeat>
</CreateBookings>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<CreateBookingsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <Created>
    <BookingQueryResponse>
      <BookedBy>String</BookedBy>
      <BookedComments>String</BookedComments>
      <BookedResourceTypes>
        <BookedResourceType>
          <Id>0</Id>
          <Name>String</Name>
          <Resources>
            <BookedResource>
              <AccessGroup>String</AccessGroup>
              <Color>String</Color>
              <Email>String</Email>
              <EmailNotification>false</EmailNotification>
              <EmailReminder>false</EmailReminder>
              <Id>0</Id>
              <ImageUrl i:nil="true" />
              <MobilePhone>String</MobilePhone>
              <Name>String</Name>
              <SMSNotification>false</SMSNotification>
              <SMSReminder>false</SMSReminder>
            </BookedResource>
          </Resources>
        </BookedResourceType>
      </BookedResourceTypes>
      <CancellationCode>String</CancellationCode>
      <CheckoutLog>
        <BookingCheckoutQueryResponse>
          <BookingId>0</BookingId>
          <Created>0001-01-01T00:00:00</Created>
          <ExpirationTime>0001-01-01T00:00:00</ExpirationTime>
          <Id>00000000-0000-0000-0000-000000000000</Id>
          <Message>String</Message>
          <PurchaseId>0</PurchaseId>
          <Snippet>String</Snippet>
          <Status>String</Status>
          <Updated>0001-01-01T00:00:00</Updated>
        </BookingCheckoutQueryResponse>
      </CheckoutLog>
      <CommentsToCustomer>String</CommentsToCustomer>
      <Company>
        <Category>String</Category>
        <City>String</City>
        <CountryId>String</CountryId>
        <Email>String</Email>
        <HomePage>String</HomePage>
        <Id>00000000-0000-0000-0000-000000000000</Id>
        <IsFavorite>false</IsFavorite>
        <Latitude>String</Latitude>
        <LogoType i:nil="true" />
        <Longitude>String</Longitude>
        <Name>String</Name>
        <PaymentProviderId>0</PaymentProviderId>
        <Phone>String</Phone>
        <SitePath>String</SitePath>
        <Street1>String</Street1>
        <Street2>String</Street2>
        <ZipCode>String</ZipCode>
      </Company>
      <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
      <CreatedDate>0001-01-01T00:00:00</CreatedDate>
      <CustomFieldValues>
        <CustomFieldDataResponse>
          <Column>String</Column>
          <DataType>String</DataType>
          <Description>String</Description>
          <Id>0</Id>
          <Name>String</Name>
          <Value>String</Value>
        </CustomFieldDataResponse>
      </CustomFieldValues>
      <CustomFields>
        <CustomFieldConfigData>
          <DataType>String</DataType>
          <DefaultValue>String</DefaultValue>
          <Description>String</Description>
          <Id>0</Id>
          <IsMandatory>false</IsMandatory>
          <MandatoryErrorMessage>String</MandatoryErrorMessage>
          <MaxLength>0</MaxLength>
          <MultipleLineText>false</MultipleLineText>
          <Name>String</Name>
          <RegEx>String</RegEx>
          <RegExErrorMessage>String</RegExErrorMessage>
          <Values>
            <CustomFieldValueResponse>
              <Value>String</Value>
            </CustomFieldValueResponse>
          </Values>
          <Width>0</Width>
        </CustomFieldConfigData>
      </CustomFields>
      <Customer>
        <CorporateIdentityNumber>String</CorporateIdentityNumber>
        <Email>String</Email>
        <FacebookUserName>String</FacebookUserName>
        <Firstname>String</Firstname>
        <Id>00000000-0000-0000-0000-000000000000</Id>
        <ImageUrl>String</ImageUrl>
        <InvoiceAddress1>String</InvoiceAddress1>
        <InvoiceAddress2>String</InvoiceAddress2>
        <InvoiceCity>String</InvoiceCity>
        <InvoiceCountryCode>String</InvoiceCountryCode>
        <InvoicePostalCode>String</InvoicePostalCode>
        <Lastname>String</Lastname>
        <PersonalIdentityNumber>String</PersonalIdentityNumber>
        <Phone>String</Phone>
      </Customer>
      <ExternalReference>
        <ExternalReferenceResponse>
          <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
          <Created>0001-01-01T00:00:00</Created>
          <CreatedBy>String</CreatedBy>
          <ExternalData>String</ExternalData>
          <Id>00000000-0000-0000-0000-000000000000</Id>
          <OwnerId>00000000-0000-0000-0000-000000000000</OwnerId>
          <ReferenceType>String</ReferenceType>
          <ReferenceTypeId>0</ReferenceTypeId>
          <Updated>0001-01-01T00:00:00</Updated>
        </ExternalReferenceResponse>
      </ExternalReference>
      <From>0001-01-01T00:00:00</From>
      <Id>0</Id>
      <InvoiceAddress>
        <CorporateIdentityNumber>String</CorporateIdentityNumber>
        <InvoiceAddress1>String</InvoiceAddress1>
        <InvoiceAddress2>String</InvoiceAddress2>
        <InvoiceAddressId>00000000-0000-0000-0000-000000000000</InvoiceAddressId>
        <InvoiceCity>String</InvoiceCity>
        <InvoiceCountryCode>String</InvoiceCountryCode>
        <InvoicePostalCode>String</InvoicePostalCode>
        <UserId>00000000-0000-0000-0000-000000000000</UserId>
      </InvoiceAddress>
      <LastTimeToUnBook>0001-01-01T00:00:00</LastTimeToUnBook>
      <LengthInMinutes>0</LengthInMinutes>
      <Log>
        <BookingLogQueryResponse>
          <BookingId>0</BookingId>
          <Comments>String</Comments>
          <Created>0001-01-01T00:00:00</Created>
          <EventType>
            <Description>String</Description>
            <Id>0</Id>
            <Name>String</Name>
          </EventType>
          <EventTypeId>0</EventTypeId>
          <Id>0</Id>
          <UserName>String</UserName>
        </BookingLogQueryResponse>
      </Log>
      <PaymentExpiration>0001-01-01T00:00:00</PaymentExpiration>
      <PaymentLog>
        <BookingPaymentLogQueryResponse>
          <Amount>0</Amount>
          <AmountCredited>0</AmountCredited>
          <BookingId>0</BookingId>
          <Comments>String</Comments>
          <Created>0001-01-01T00:00:00</Created>
          <CurrencyId>String</CurrencyId>
          <CurrencyInfo>
            <CurrencySign>String</CurrencySign>
            <Id>String</Id>
            <Name>String</Name>
          </CurrencyInfo>
          <Id>0</Id>
          <OrderItemReferenceId>String</OrderItemReferenceId>
          <PaymentProviderId>0</PaymentProviderId>
          <PaymentReferenceId>String</PaymentReferenceId>
          <Updated>0001-01-01T00:00:00</Updated>
          <VAT>0</VAT>
        </BookingPaymentLogQueryResponse>
      </PaymentLog>
      <Quantities>
        <BookedQuantity>
          <Category>String</Category>
          <CurrencyId>String</CurrencyId>
          <Id>0</Id>
          <OccupiesSpot>false</OccupiesSpot>
          <Price>0</Price>
          <PriceBeforeRebate>0</PriceBeforeRebate>
          <PriceSign>String</PriceSign>
          <PriceText>String</PriceText>
          <Quantity>0</Quantity>
          <VAT>0</VAT>
        </BookedQuantity>
      </Quantities>
      <RatingCode>String</RatingCode>
      <ResponseStatus xmlns:d4p1="http://schemas.servicestack.net/types">
        <d4p1:ErrorCode>String</d4p1:ErrorCode>
        <d4p1:Message>String</d4p1:Message>
        <d4p1:StackTrace>String</d4p1:StackTrace>
        <d4p1:Errors>
          <d4p1:ResponseError>
            <d4p1:ErrorCode>String</d4p1:ErrorCode>
            <d4p1:FieldName>String</d4p1:FieldName>
            <d4p1:Message>String</d4p1:Message>
            <d4p1:Meta xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
              <d7p1:KeyValueOfstringstring>
                <d7p1:Key>String</d7p1:Key>
                <d7p1:Value>String</d7p1:Value>
              </d7p1:KeyValueOfstringstring>
            </d4p1:Meta>
          </d4p1:ResponseError>
        </d4p1:Errors>
        <d4p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d4p1:Meta>
      </ResponseStatus>
      <SendEmailConfirmation>false</SendEmailConfirmation>
      <SendEmailReminder>false</SendEmailReminder>
      <SendSmsConfirmation>false</SendSmsConfirmation>
      <SendSmsReminder>false</SendSmsReminder>
      <Service>
        <Description>String</Description>
        <GroupBooking>
          <Active>false</Active>
          <Max>0</Max>
          <Min>0</Min>
        </GroupBooking>
        <Id>0</Id>
        <ImageUrl i:nil="true" />
        <IsGroupBooking>false</IsGroupBooking>
        <IsPaymentEnabled>false</IsPaymentEnabled>
        <LengthInMinutes>0</LengthInMinutes>
        <MaxNumberOfSpotsPerBooking>0</MaxNumberOfSpotsPerBooking>
        <MinNumberOfSpotsPerBooking>0</MinNumberOfSpotsPerBooking>
        <MultipleResource>
          <Active>false</Active>
          <Max>0</Max>
          <Min>0</Min>
        </MultipleResource>
        <Name>String</Name>
      </Service>
      <Status>Booked</Status>
      <StatusId>0</StatusId>
      <StatusInfo>
        <Color>String</Color>
        <Description>String</Description>
        <Icon>String</Icon>
        <Id>0</Id>
        <Name>String</Name>
      </StatusInfo>
      <StatusName>String</StatusName>
      <To>0001-01-01T00:00:00</To>
      <UnbookedComments>String</UnbookedComments>
      <UnbookedOn>0001-01-01T00:00:00</UnbookedOn>
      <UpdatedDate>0001-01-01T00:00:00</UpdatedDate>
    </BookingQueryResponse>
  </Created>
  <Failed>
    <FailedBookings>
      <From>0001-01-01T00:00:00</From>
      <Quantities>
        <QuantityToBook>
          <OccupiesSpot>false</OccupiesSpot>
          <PriceId>0</PriceId>
          <Quantity>0</Quantity>
        </QuantityToBook>
      </Quantities>
      <Reason>String</Reason>
      <To>0001-01-01T00:00:00</To>
    </FailedBookings>
  </Failed>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
</CreateBookingsResponse>