/* Options: Date: 2024-11-21 12:14:53 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.bokamera.se //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: DeleteOldReservations.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; enum BookingStatusEnum { Booked, Unbooked, Reserved, Canceled, AwaitingPayment, AwaitingPaymentNoTimeLimit, Payed, AwaitingPaymentRequestFromAdmin, AwaitingPaymentFromProvider, Invoiced, } class DeleteOldReservationsResponse implements IConvertible { String? CompanyId; int? Id; DateTime? From; DateTime? To; BookingStatusEnum? Status; int? StatusId; ResponseStatus? ResponseStatus; DateTime? CreatedDate; DateTime? UpdatedDate; DeleteOldReservationsResponse({this.CompanyId,this.Id,this.From,this.To,this.Status,this.StatusId,this.ResponseStatus,this.CreatedDate,this.UpdatedDate}); DeleteOldReservationsResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; Id = json['Id']; From = JsonConverters.fromJson(json['From'],'DateTime',context!); To = JsonConverters.fromJson(json['To'],'DateTime',context!); Status = JsonConverters.fromJson(json['Status'],'BookingStatusEnum',context!); StatusId = json['StatusId']; ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!); CreatedDate = JsonConverters.fromJson(json['CreatedDate'],'DateTime',context!); UpdatedDate = JsonConverters.fromJson(json['UpdatedDate'],'DateTime',context!); return this; } Map toJson() => { 'CompanyId': CompanyId, 'Id': Id, 'From': JsonConverters.toJson(From,'DateTime',context!), 'To': JsonConverters.toJson(To,'DateTime',context!), 'Status': JsonConverters.toJson(Status,'BookingStatusEnum',context!), 'StatusId': StatusId, 'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!), 'CreatedDate': JsonConverters.toJson(CreatedDate,'DateTime',context!), 'UpdatedDate': JsonConverters.toJson(UpdatedDate,'DateTime',context!) }; getTypeName() => "DeleteOldReservationsResponse"; TypeContext? context = _ctx; } // @Route("/codelock/{CodeLockSystemsId}/reservations/", "POST") // @ValidateRequest(Validator="IsAuthenticated") class DeleteOldReservations implements IReturn, IConvertible, IPost { /** * 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 date to delete To. Only bookings that have ended by this date will be deleted. */ // @ApiMember(DataType="datetime", Description="The date to delete To. Only bookings that have ended by this date will be deleted.") DateTime? To; /** * The system type of the code lock */ // @ApiMember(DataType="int", Description="The system type of the code lock", ParameterType="path") int? CodeLockSystemsId; /** * If not logged in you can use token to update */ // @ApiMember(Description="If not logged in you can use token to update") String? Token; DeleteOldReservations({this.CompanyId,this.To,this.CodeLockSystemsId,this.Token}); DeleteOldReservations.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; To = JsonConverters.fromJson(json['To'],'DateTime',context!); CodeLockSystemsId = json['CodeLockSystemsId']; Token = json['Token']; return this; } Map toJson() => { 'CompanyId': CompanyId, 'To': JsonConverters.toJson(To,'DateTime',context!), 'CodeLockSystemsId': CodeLockSystemsId, 'Token': Token }; createResponse() => DeleteOldReservationsResponse(); getResponseTypeName() => "DeleteOldReservationsResponse"; getTypeName() => "DeleteOldReservations"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: { 'BookingStatusEnum': TypeInfo(TypeOf.Enum, enumValues:BookingStatusEnum.values), 'DeleteOldReservationsResponse': TypeInfo(TypeOf.Class, create:() => DeleteOldReservationsResponse()), 'DeleteOldReservations': TypeInfo(TypeOf.Class, create:() => DeleteOldReservations()), });