Requires any of the roles: | bookingsupplier-administrator-write, superadmin, bookingsupplier-administrator-read |
GET | /codelock/settings | Get code lock settings for the currently logged in user | Get code lock settings for the currently logged in user. |
---|
import 'package:servicestack/servicestack.dart';
class CodeLockSystemResponse implements IConvertible
{
/**
* The system type of the code lock
*/
// @ApiMember(DataType="int", Description="The system type of the code lock")
int? Id;
/**
* The name of the code lock system
*/
// @ApiMember(DataType="string", Description="The name of the code lock system")
String? Name;
/**
* The description of the code lock system
*/
// @ApiMember(DataType="string", Description="The description of the code lock system")
String? Description;
/**
* The logotype of the code lock system
*/
// @ApiMember(Description="The logotype of the code lock system")
Uri? LogoType;
/**
* The supplier name of the code lock system
*/
// @ApiMember(Description="The supplier name of the code lock system")
String? Supplier;
CodeLockSystemResponse({this.Id,this.Name,this.Description,this.LogoType,this.Supplier});
CodeLockSystemResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
Name = json['Name'];
Description = json['Description'];
LogoType = JsonConverters.fromJson(json['LogoType'],'Uri',context!);
Supplier = json['Supplier'];
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'Name': Name,
'Description': Description,
'LogoType': JsonConverters.toJson(LogoType,'Uri',context!),
'Supplier': Supplier
};
getTypeName() => "CodeLockSystemResponse";
TypeContext? context = _ctx;
}
class CodeLockSettingResponse implements IConvertible
{
String? CompanyId;
/**
* The system type of the code lock
*/
// @ApiMember(DataType="int", Description="The system type of the code lock")
int? CodeLockSystemsId;
/**
* If code lock sync is active
*/
// @ApiMember(DataType="bool", Description="If code lock sync is active")
bool? Active;
/**
* Number of minutes the access should be valid before booking starts.
*/
// @ApiMember(DataType="int", Description="Number of minutes the access should be valid before booking starts.")
int? ValidBeforeMinutes;
/**
* Number of minutes the access should be valid after booking ends.
*/
// @ApiMember(DataType="int", Description="Number of minutes the access should be valid after booking ends.")
int? ValidAfterMinutes;
/**
* If it should clean up old bookings after the passed
*/
// @ApiMember(DataType="boolean", Description="If it should clean up old bookings after the passed")
bool? DeleteOldBySchedule;
/**
* If a notification should be sent by Email
*/
// @ApiMember(DataType="boolean", Description="If a notification should be sent by Email")
bool? SendEmailNotification;
/**
* If a notification should be sent by SMS
*/
// @ApiMember(DataType="boolean", Description="If a notification should be sent by SMS")
bool? SendSMSNotification;
/**
* How long before the booking starts in minutes the notification should be sent
*/
// @ApiMember(DataType="int", Description="How long before the booking starts in minutes the notification should be sent")
int? EmailNotificationTime;
/**
* How long before the booking starts in minutes the notification should be sent
*/
// @ApiMember(DataType="int", Description="How long before the booking starts in minutes the notification should be sent")
int? SMSNotificationTime;
/**
* When settings was created
*/
// @ApiMember(DataType="datetime", Description="When settings was created")
DateTime? Created;
/**
* When settings was updated
*/
// @ApiMember(DataType="datetime", Description="When settings was updated")
DateTime? Updated;
/**
* The available code lock systems to choose from
*/
// @ApiMember(Description="The available code lock systems to choose from")
List<CodeLockSystemResponse>? CodeLockSystemOptions;
CodeLockSettingResponse({this.CompanyId,this.CodeLockSystemsId,this.Active,this.ValidBeforeMinutes,this.ValidAfterMinutes,this.DeleteOldBySchedule,this.SendEmailNotification,this.SendSMSNotification,this.EmailNotificationTime,this.SMSNotificationTime,this.Created,this.Updated,this.CodeLockSystemOptions});
CodeLockSettingResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CompanyId = json['CompanyId'];
CodeLockSystemsId = json['CodeLockSystemsId'];
Active = json['Active'];
ValidBeforeMinutes = json['ValidBeforeMinutes'];
ValidAfterMinutes = json['ValidAfterMinutes'];
DeleteOldBySchedule = json['DeleteOldBySchedule'];
SendEmailNotification = json['SendEmailNotification'];
SendSMSNotification = json['SendSMSNotification'];
EmailNotificationTime = json['EmailNotificationTime'];
SMSNotificationTime = json['SMSNotificationTime'];
Created = JsonConverters.fromJson(json['Created'],'DateTime',context!);
Updated = JsonConverters.fromJson(json['Updated'],'DateTime',context!);
CodeLockSystemOptions = JsonConverters.fromJson(json['CodeLockSystemOptions'],'List<CodeLockSystemResponse>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'CompanyId': CompanyId,
'CodeLockSystemsId': CodeLockSystemsId,
'Active': Active,
'ValidBeforeMinutes': ValidBeforeMinutes,
'ValidAfterMinutes': ValidAfterMinutes,
'DeleteOldBySchedule': DeleteOldBySchedule,
'SendEmailNotification': SendEmailNotification,
'SendSMSNotification': SendSMSNotification,
'EmailNotificationTime': EmailNotificationTime,
'SMSNotificationTime': SMSNotificationTime,
'Created': JsonConverters.toJson(Created,'DateTime',context!),
'Updated': JsonConverters.toJson(Updated,'DateTime',context!),
'CodeLockSystemOptions': JsonConverters.toJson(CodeLockSystemOptions,'List<CodeLockSystemResponse>',context!)
};
getTypeName() => "CodeLockSettingResponse";
TypeContext? context = _ctx;
}
// @ValidateRequest(Validator="IsAuthenticated")
// @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
// @ApiResponse(Description="You have too low privileges to call this service", StatusCode=403)
class CodeLockSettingQuery 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;
/**
* If you want to include code locks that is supported.
*/
// @ApiMember(DataType="boolean", Description="If you want to include code locks that is supported.", ParameterType="query")
bool? IncludeCodeLockSystemOptions;
CodeLockSettingQuery({this.CompanyId,this.IncludeCodeLockSystemOptions});
CodeLockSettingQuery.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CompanyId = json['CompanyId'];
IncludeCodeLockSystemOptions = json['IncludeCodeLockSystemOptions'];
return this;
}
Map<String, dynamic> toJson() => {
'CompanyId': CompanyId,
'IncludeCodeLockSystemOptions': IncludeCodeLockSystemOptions
};
getTypeName() => "CodeLockSettingQuery";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: <String, TypeInfo> {
'CodeLockSystemResponse': TypeInfo(TypeOf.Class, create:() => CodeLockSystemResponse()),
'Uri': TypeInfo(TypeOf.Class, create:() => Uri()),
'CodeLockSettingResponse': TypeInfo(TypeOf.Class, create:() => CodeLockSettingResponse()),
'List<CodeLockSystemResponse>': TypeInfo(TypeOf.Class, create:() => <CodeLockSystemResponse>[]),
'CodeLockSettingQuery': TypeInfo(TypeOf.Class, create:() => CodeLockSettingQuery()),
});
Dart CodeLockSettingQuery DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /codelock/settings HTTP/1.1 Host: api.bokamera.se Accept: application/json
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"CodeLockSystemsId":0,"Active":false,"ValidBeforeMinutes":0,"ValidAfterMinutes":0,"DeleteOldBySchedule":false,"SendEmailNotification":false,"SendSMSNotification":false,"EmailNotificationTime":0,"SMSNotificationTime":0,"CodeLockSystemOptions":[{"Id":0,"Name":"String","Description":"String","Supplier":"String"}]}