BokaMera.API.Host

<back to all web services

RemoveTagFromTimeException

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
DELETE/timeexceptions/{TimeExceptionId}/tags/{TagId}Remove a tag from a time exceptionDetaches a tag from an existing time exception.
import 'package:servicestack/servicestack.dart';

class TimeExceptionReosurceDetails implements IConvertible
{
    /**
    * Ids of the resources that owns this exception
    */
    // @ApiMember(Description="Ids of the resources that owns this exception")
    int Id = 0;

    /**
    * Name of the resource
    */
    // @ApiMember(Description="Name of the resource")
    String Name = "";

    /**
    * Description of the resource
    */
    // @ApiMember(Description="Description of the resource")
    String Description = "";

    /**
    * Color of the resource
    */
    // @ApiMember(Description="Color of the resource")
    String Color = "";

    /**
    * Image of the resource
    */
    // @ApiMember(Description="Image of the resource")
    Uri ImageUrl;

    ResponseStatus ResponseStatus;

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

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Name = json['Name'];
        Description = json['Description'];
        Color = json['Color'];
        ImageUrl = JsonConverters.fromJson(json['ImageUrl'],'Uri',context!);
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Name': Name,
        'Description': Description,
        'Color': Color,
        'ImageUrl': JsonConverters.toJson(ImageUrl,'Uri',context!),
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
    };

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

class DayOfWeekDto implements IConvertible
{
    int DayOfWeekId = 0;
    int DotNetDayOfWeekId = 0;
    String DayOfWeek = "";

    DayOfWeekDto({this.DayOfWeekId,this.DotNetDayOfWeekId,this.DayOfWeek});
    DayOfWeekDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'DayOfWeekId': DayOfWeekId,
        'DotNetDayOfWeekId': DotNetDayOfWeekId,
        'DayOfWeek': DayOfWeek
    };

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

class TagResponse implements IConvertible
{
    int Id = 0;
    String CompanyId = "";
    String Name = "";
    int Scope = 0;
    String Color = "";
    int SortOrder = 0;
    bool Active;
    DateTime CreatedDate = DateTime(0);
    ResponseStatus ResponseStatus;

    TagResponse({this.Id,this.CompanyId,this.Name,this.Scope,this.Color,this.SortOrder,this.Active,this.CreatedDate,this.ResponseStatus});
    TagResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        CompanyId = json['CompanyId'];
        Name = json['Name'];
        Scope = json['Scope'];
        Color = json['Color'];
        SortOrder = json['SortOrder'];
        Active = json['Active'];
        CreatedDate = JsonConverters.fromJson(json['CreatedDate'],'DateTime',context!);
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'CompanyId': CompanyId,
        'Name': Name,
        'Scope': Scope,
        'Color': Color,
        'SortOrder': SortOrder,
        'Active': Active,
        'CreatedDate': JsonConverters.toJson(CreatedDate,'DateTime',context!),
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
    };

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

class ResourceTimeExceptionQueryResponse implements IConvertible
{
    /**
    * Time exception id
    */
    // @ApiMember(Description="Time exception id")
    int Id = 0;

    /**
    * Time company id
    */
    // @ApiMember(Description="Time company id")
    String CompanyId = "";

    /**
    * If it's locked for editing for the logged in administrator
    */
    // @ApiMember(Description="If it's locked for editing for the logged in administrator")
    bool Locked;

    /**
    * Resources that owns this exception
    */
    // @ApiMember(Description="Resources that owns this exception")
    List<int> ResourceIds = [];

    /**
    * Resources that owns this exception
    */
    // @ApiMember(Description="Resources that owns this exception")
    List<TimeExceptionReosurceDetails> Resources = [];

    /**
    * Indicates wheter or not the time exception is recurring
    */
    // @ApiMember(Description="Indicates wheter or not the time exception is recurring")
    bool IsRecurring;

    /**
    * Time exception starting timestamp
    */
    // @ApiMember(Description="Time exception starting timestamp")
    DateTime From = DateTime(0);

    /**
    * Time exception ending timestamp
    */
    // @ApiMember(Description="Time exception ending timestamp")
    DateTime To = DateTime(0);

    /**
    * If recurring then this value indicates the time of day when the time exception begins
    */
    // @ApiMember(Description="If recurring then this value indicates the time of day when the time exception begins")
    Duration FromTime;

    /**
    * If recurring then this value indicates the time of day when the time exception ends
    */
    // @ApiMember(Description="If recurring then this value indicates the time of day when the time exception ends")
    Duration ToTime;

    /**
    * The reason of the time exception, example: Vacation, doctors appointment, ...
    */
    // @ApiMember(Description="The reason of the time exception, example: Vacation, doctors appointment, ...")
    String ReasonText = "";

    /**
    * The reason of the time exception that could be public to customers, example: Vacation, Closed, Sick leave, ...
    */
    // @ApiMember(Description="The reason of the time exception that could be public to customers, example: Vacation, Closed, Sick leave, ...")
    String ReasonTextPublic = "";

    /**
    * What hexadecimal color code the exception should have in the scheduler
    */
    // @ApiMember(Description="What hexadecimal color code the exception should have in the scheduler")
    String Color = "";

    /**
    * If the time exception should block the time in the scheduler so it's not avaialable to book
    */
    // @ApiMember(Description="If the time exception should block the time in the scheduler so it's not avaialable to book")
    bool BlockTime;

    /**
    * If the ReasonText should only be visible to conncted resources. If false, all resources will be able to see it
    */
    // @ApiMember(Description="If the ReasonText should only be visible to conncted resources. If false, all resources will be able to see it")
    bool Private;

    /**
    * If recurring, an array indicating which days of the week the exception recurs on where 1 = Monday .. 7 = Sunday. When recurring then the time portion of the Fields From and To indicates the time of day the recurrence occurs
    */
    // @ApiMember(Description="If recurring, an array indicating which days of the week the exception recurs on where 1 = Monday .. 7 = Sunday. When recurring then the time portion of the Fields From and To indicates the time of day the recurrence occurs")
    List<DayOfWeekDto> DaysOfWeek = [];

    /**
    * The datetime the exception was created
    */
    // @ApiMember(Description="The datetime the exception was created")
    DateTime Created = DateTime(0);

    /**
    * Tags attached to this time exception
    */
    // @ApiMember(Description="Tags attached to this time exception")
    List<TagResponse> Tags = [];

    ResponseStatus ResponseStatus;

    ResourceTimeExceptionQueryResponse({this.Id,this.CompanyId,this.Locked,this.ResourceIds,this.Resources,this.IsRecurring,this.From,this.To,this.FromTime,this.ToTime,this.ReasonText,this.ReasonTextPublic,this.Color,this.BlockTime,this.Private,this.DaysOfWeek,this.Created,this.Tags,this.ResponseStatus});
    ResourceTimeExceptionQueryResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        CompanyId = json['CompanyId'];
        Locked = json['Locked'];
        ResourceIds = JsonConverters.fromJson(json['ResourceIds'],'List<int>',context!);
        Resources = JsonConverters.fromJson(json['Resources'],'List<TimeExceptionReosurceDetails>',context!);
        IsRecurring = json['IsRecurring'];
        From = JsonConverters.fromJson(json['From'],'DateTime',context!);
        To = JsonConverters.fromJson(json['To'],'DateTime',context!);
        FromTime = JsonConverters.fromJson(json['FromTime'],'Duration',context!);
        ToTime = JsonConverters.fromJson(json['ToTime'],'Duration',context!);
        ReasonText = json['ReasonText'];
        ReasonTextPublic = json['ReasonTextPublic'];
        Color = json['Color'];
        BlockTime = json['BlockTime'];
        Private = json['Private'];
        DaysOfWeek = JsonConverters.fromJson(json['DaysOfWeek'],'List<DayOfWeekDto>',context!);
        Created = JsonConverters.fromJson(json['Created'],'DateTime',context!);
        Tags = JsonConverters.fromJson(json['Tags'],'List<TagResponse>',context!);
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'CompanyId': CompanyId,
        'Locked': Locked,
        'ResourceIds': JsonConverters.toJson(ResourceIds,'List<int>',context!),
        'Resources': JsonConverters.toJson(Resources,'List<TimeExceptionReosurceDetails>',context!),
        'IsRecurring': IsRecurring,
        'From': JsonConverters.toJson(From,'DateTime',context!),
        'To': JsonConverters.toJson(To,'DateTime',context!),
        'FromTime': JsonConverters.toJson(FromTime,'Duration',context!),
        'ToTime': JsonConverters.toJson(ToTime,'Duration',context!),
        'ReasonText': ReasonText,
        'ReasonTextPublic': ReasonTextPublic,
        'Color': Color,
        'BlockTime': BlockTime,
        'Private': Private,
        'DaysOfWeek': JsonConverters.toJson(DaysOfWeek,'List<DayOfWeekDto>',context!),
        'Created': JsonConverters.toJson(Created,'DateTime',context!),
        'Tags': JsonConverters.toJson(Tags,'List<TagResponse>',context!),
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
    };

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

// @ApiResponse(Description="Returned if the time exception or tag relation was not found", StatusCode=404)
// @ApiResponse(Description="Returned if the current user is not allowed to perform the action", StatusCode=401)
// @ValidateRequest(Validator="IsAuthenticated")
class RemoveTagFromTimeException implements ICompany, 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;

    /**
    * The time exception id.
    */
    // @ApiMember(Description="The time exception id.", IsRequired=true, ParameterType="path")
    int TimeExceptionId = 0;

    /**
    * The tag id to remove.
    */
    // @ApiMember(Description="The tag id to remove.", IsRequired=true, ParameterType="path")
    int TagId = 0;

    RemoveTagFromTimeException({this.CompanyId,this.TimeExceptionId,this.TagId});
    RemoveTagFromTimeException.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'CompanyId': CompanyId,
        'TimeExceptionId': TimeExceptionId,
        'TagId': TagId
    };

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

TypeContext _ctx = TypeContext(library: 'api.bookmore.com', types: <String, TypeInfo> {
    'TimeExceptionReosurceDetails': TypeInfo(TypeOf.Class, create:() => TimeExceptionReosurceDetails()),
    'Uri': TypeInfo(TypeOf.Class, create:() => Uri()),
    'DayOfWeekDto': TypeInfo(TypeOf.Class, create:() => DayOfWeekDto()),
    'TagResponse': TypeInfo(TypeOf.Class, create:() => TagResponse()),
    'ResourceTimeExceptionQueryResponse': TypeInfo(TypeOf.Class, create:() => ResourceTimeExceptionQueryResponse()),
    'List<TimeExceptionReosurceDetails>': TypeInfo(TypeOf.Class, create:() => <TimeExceptionReosurceDetails>[]),
    'List<DayOfWeekDto>': TypeInfo(TypeOf.Class, create:() => <DayOfWeekDto>[]),
    'List<TagResponse>': TypeInfo(TypeOf.Class, create:() => <TagResponse>[]),
    'RemoveTagFromTimeException': TypeInfo(TypeOf.Class, create:() => RemoveTagFromTimeException()),
});

Dart RemoveTagFromTimeException DTOs

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

HTTP + CSV

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

DELETE /timeexceptions/{TimeExceptionId}/tags/{TagId} HTTP/1.1 
Host: api.bookmore.com 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Id":0,"Locked":false,"ResourceIds":[0],"Resources":[{"Id":0,"Name":"String","Description":"String","Color":"String","ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}],"IsRecurring":false,"FromTime":"00:00:00","ToTime":"00:00:00","ReasonText":"String","ReasonTextPublic":"String","Color":"String","BlockTime":false,"Private":false,"DaysOfWeek":[{"DayOfWeekId":0,"DotNetDayOfWeekId":0,"DayOfWeek":"String"}],"Tags":[{"Id":0,"Name":"String","Scope":0,"Color":"String","SortOrder":0,"Active":false,"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}