BokaMera.API.Host

<back to all web services

DeleteDateSchedule

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
DELETE/schedules/date/{Id}Remove a date scheduleRemove date schedule.
import 'package:servicestack/servicestack.dart';

class DateScheduleDateResponse implements IConvertible
{
    int? Id;
    DateTime? From;
    DateTime? To;
    ResponseStatus? ResponseStatus;

    DateScheduleDateResponse({this.Id,this.From,this.To,this.ResponseStatus});
    DateScheduleDateResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class ScheduleResources implements IConvertible
{
    int? Id;
    /**
    * Name of the resource
    */
    // @ApiMember(Description="Name of the resource")
    String? Name;

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

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

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

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

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

class ScheduleServices implements IConvertible
{
    int? Id;
    /**
    * Name of the service
    */
    // @ApiMember(Description="Name of the service")
    String? Name;

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

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

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

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

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

class DateScheduleQueryResponse implements IConvertible
{
    /**
    * The schedule id
    */
    // @ApiMember(Description="The schedule id")
    int? Id;

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

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

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

    /**
    * If the schedule is only connected to some specific resources. Note: You must have IncludeResources property to see this.
    */
    // @ApiMember(Description="If the schedule is only connected to some specific resources. Note: You must have IncludeResources property to see this.", IsRequired=true)
    bool? IsResourceSpecific;

    /**
    * Schedule dates
    */
    // @ApiMember(Description="Schedule dates")
    List<DateScheduleDateResponse>? ScheduleDates;

    /**
    * The resources that is connected to the schedule
    */
    // @ApiMember(Description="The resources that is connected to the schedule")
    List<ScheduleResources>? Resources;

    /**
    * The services that is connected to the schedule
    */
    // @ApiMember(Description="The services that is connected to the schedule")
    List<ScheduleServices>? Services;

    /**
    * The timestamp when the schedule was updated
    */
    // @ApiMember(Description="The timestamp when the schedule was updated", IsRequired=true)
    DateTime? UpdatedDate;

    /**
    * The timestamp when the schedule was created
    */
    // @ApiMember(Description="The timestamp when the schedule was created", IsRequired=true)
    DateTime? CreatedDate;

    ResponseStatus? ResponseStatus;

    DateScheduleQueryResponse({this.Id,this.Name,this.Description,this.Active,this.IsResourceSpecific,this.ScheduleDates,this.Resources,this.Services,this.UpdatedDate,this.CreatedDate,this.ResponseStatus});
    DateScheduleQueryResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Name = json['Name'];
        Description = json['Description'];
        Active = json['Active'];
        IsResourceSpecific = json['IsResourceSpecific'];
        ScheduleDates = JsonConverters.fromJson(json['ScheduleDates'],'List<DateScheduleDateResponse>',context!);
        Resources = JsonConverters.fromJson(json['Resources'],'List<ScheduleResources>',context!);
        Services = JsonConverters.fromJson(json['Services'],'List<ScheduleServices>',context!);
        UpdatedDate = JsonConverters.fromJson(json['UpdatedDate'],'DateTime',context!);
        CreatedDate = JsonConverters.fromJson(json['CreatedDate'],'DateTime',context!);
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Name': Name,
        'Description': Description,
        'Active': Active,
        'IsResourceSpecific': IsResourceSpecific,
        'ScheduleDates': JsonConverters.toJson(ScheduleDates,'List<DateScheduleDateResponse>',context!),
        'Resources': JsonConverters.toJson(Resources,'List<ScheduleResources>',context!),
        'Services': JsonConverters.toJson(Services,'List<ScheduleServices>',context!),
        'UpdatedDate': JsonConverters.toJson(UpdatedDate,'DateTime',context!),
        'CreatedDate': JsonConverters.toJson(CreatedDate,'DateTime',context!),
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
    };

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

// @ValidateRequest(Validator="IsAuthenticated")
class DeleteDateSchedule 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 schedule id
    */
    // @ApiMember(Description="The schedule id", IsRequired=true, ParameterType="path")
    int? Id;

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

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

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

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

TypeContext _ctx = TypeContext(library: 'testapi.bokamera.se', types: <String, TypeInfo> {
    'DateScheduleDateResponse': TypeInfo(TypeOf.Class, create:() => DateScheduleDateResponse()),
    'ScheduleResources': TypeInfo(TypeOf.Class, create:() => ScheduleResources()),
    'Uri': TypeInfo(TypeOf.Class, create:() => Uri()),
    'ScheduleServices': TypeInfo(TypeOf.Class, create:() => ScheduleServices()),
    'DateScheduleQueryResponse': TypeInfo(TypeOf.Class, create:() => DateScheduleQueryResponse()),
    'List<DateScheduleDateResponse>': TypeInfo(TypeOf.Class, create:() => <DateScheduleDateResponse>[]),
    'List<ScheduleResources>': TypeInfo(TypeOf.Class, create:() => <ScheduleResources>[]),
    'List<ScheduleServices>': TypeInfo(TypeOf.Class, create:() => <ScheduleServices>[]),
    'DeleteDateSchedule': TypeInfo(TypeOf.Class, create:() => DeleteDateSchedule()),
});

Dart DeleteDateSchedule DTOs

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

HTTP + OTHER

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

DELETE /schedules/date/{Id} HTTP/1.1 
Host: testapi.bokamera.se 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"Id":0,"Name":"String","Description":"String","Active":false,"IsResourceSpecific":false,"ScheduleDates":[{"Id":0,"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}],"Resources":[{"Id":0,"Name":"String"}],"Services":[{"Id":0,"Name":"String"}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}