Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
PUT | /codelock/settings | Update settings for the code locks of the company of the currently logged in user | Update settings for code lock of the company of the currently logged in user. |
---|
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports BokaMera.API.ServiceModel.Dtos
Namespace Global
Namespace BokaMera.API.ServiceModel.Dtos
Public Partial Class CodeLockSettingResponse
Public Overridable Property CompanyId As Guid
'''<Summary>
'''The system type of the code lock
'''</Summary>
<ApiMember(DataType:="int", Description:="The system type of the code lock")>
Public Overridable Property CodeLockSystemsId As Integer
'''<Summary>
'''If code lock sync is active
'''</Summary>
<ApiMember(DataType:="bool", Description:="If code lock sync is active")>
Public Overridable Property Active As Boolean
'''<Summary>
'''Number of minutes the access should be valid before booking starts.
'''</Summary>
<ApiMember(DataType:="int", Description:="Number of minutes the access should be valid before booking starts.")>
Public Overridable Property ValidBeforeMinutes As Integer
'''<Summary>
'''Number of minutes the access should be valid after booking ends.
'''</Summary>
<ApiMember(DataType:="int", Description:="Number of minutes the access should be valid after booking ends.")>
Public Overridable Property ValidAfterMinutes As Integer
'''<Summary>
'''If it should clean up old bookings after they have passed
'''</Summary>
<ApiMember(DataType:="boolean", Description:="If it should clean up old bookings after they have passed")>
Public Overridable Property DeleteOldBySchedule As Boolean
'''<Summary>
'''If a notification should be sent by Email
'''</Summary>
<ApiMember(DataType:="boolean", Description:="If a notification should be sent by Email")>
Public Overridable Property SendEmailNotification As Boolean
'''<Summary>
'''If a notification should be sent by SMS
'''</Summary>
<ApiMember(DataType:="boolean", Description:="If a notification should be sent by SMS")>
Public Overridable Property SendSMSNotification As Boolean
'''<Summary>
'''How long before the booking starts in minutes the notification should be sent
'''</Summary>
<ApiMember(DataType:="int", Description:="How long before the booking starts in minutes the notification should be sent")>
Public Overridable Property EmailNotificationTime As Integer
'''<Summary>
'''How long before the booking starts in minutes the notification should be sent
'''</Summary>
<ApiMember(DataType:="int", Description:="How long before the booking starts in minutes the notification should be sent")>
Public Overridable Property SMSNotificationTime As Integer
'''<Summary>
'''When settings was created
'''</Summary>
<ApiMember(DataType:="datetime", Description:="When settings was created")>
Public Overridable Property Created As Date
'''<Summary>
'''When settings were updated
'''</Summary>
<ApiMember(DataType:="datetime", Description:="When settings were updated")>
Public Overridable Property Updated As Date
'''<Summary>
'''The available code lock systems to choose from
'''</Summary>
<ApiMember(Description:="The available code lock systems to choose from")>
Public Overridable Property CodeLockSystemOptions As List(Of CodeLockSystemResponse)
End Class
Public Partial Class CodeLockSystemResponse
'''<Summary>
'''The system type of the code lock
'''</Summary>
<ApiMember(DataType:="int", Description:="The system type of the code lock")>
Public Overridable Property Id As Integer
'''<Summary>
'''The name of the code lock system
'''</Summary>
<ApiMember(DataType:="string", Description:="The name of the code lock system")>
Public Overridable Property Name As String
'''<Summary>
'''The description of the code lock system
'''</Summary>
<ApiMember(DataType:="string", Description:="The description of the code lock system")>
Public Overridable Property Description As String
'''<Summary>
'''The logotype of the code lock system
'''</Summary>
<ApiMember(Description:="The logotype of the code lock system")>
Public Overridable Property LogoType As Uri
'''<Summary>
'''The supplier name of the code lock system
'''</Summary>
<ApiMember(Description:="The supplier name of the code lock system")>
Public Overridable Property Supplier As String
End Class
<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)>
Public Partial Class UpdateCodeLockSetting
Implements ICompany
'''<Summary>
'''The company id, if empty will use the company id for the user you are logged in with.
'''</Summary>
<ApiMember(Description:="The company id, if empty will use the company id for the user you are logged in with.")>
Public Overridable Property CompanyId As Guid? Implements ICompany.CompanyId
'''<Summary>
'''If code lock sync is active
'''</Summary>
<ApiMember(DataType:="bool", Description:="If code lock sync is active")>
Public Overridable Property Active As Boolean?
'''<Summary>
'''The system type of the code lock
'''</Summary>
<ApiMember(DataType:="int", Description:="The system type of the code lock")>
Public Overridable Property CodeLockSystemsId As Integer?
'''<Summary>
'''Number of minutes the access should be valid before booking starts.
'''</Summary>
<ApiMember(DataType:="int", Description:="Number of minutes the access should be valid before booking starts.")>
Public Overridable Property ValidBeforeMinutes As Integer?
'''<Summary>
'''Number of minutes the access should be valid after booking ends.
'''</Summary>
<ApiMember(DataType:="int", Description:="Number of minutes the access should be valid after booking ends.")>
Public Overridable Property ValidAfterMinutes As Integer?
'''<Summary>
'''If it should clean up old bookings after they have passed.
'''</Summary>
<ApiMember(DataType:="boolean", Description:="If it should clean up old bookings after they have passed.")>
Public Overridable Property DeleteOldBySchedule As Boolean?
'''<Summary>
'''If a notification should be sent by Email
'''</Summary>
<ApiMember(DataType:="boolean", Description:="If a notification should be sent by Email")>
Public Overridable Property SendEmailNotification As Boolean?
'''<Summary>
'''If a notification should be sent by SMS
'''</Summary>
<ApiMember(DataType:="boolean", Description:="If a notification should be sent by SMS")>
Public Overridable Property SendSMSNotification As Boolean?
'''<Summary>
'''How long before the booking starts in minutes the notification should be sent
'''</Summary>
<ApiMember(DataType:="int", Description:="How long before the booking starts in minutes the notification should be sent")>
Public Overridable Property EmailNotificationTime As Integer?
'''<Summary>
'''How long before the booking starts in minutes the notification should be sent
'''</Summary>
<ApiMember(DataType:="int", Description:="How long before the booking starts in minutes the notification should be sent")>
Public Overridable Property SMSNotificationTime As Integer?
End Class
End Namespace
End Namespace
VB.NET UpdateCodeLockSetting DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /codelock/settings HTTP/1.1
Host: api.bookmore.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"CompanyId":"00000000-0000-0000-0000-000000000000","Active":false,"CodeLockSystemsId":0,"ValidBeforeMinutes":0,"ValidAfterMinutes":0,"DeleteOldBySchedule":false,"SendEmailNotification":false,"SendSMSNotification":false,"EmailNotificationTime":0,"SMSNotificationTime":0}
HTTP/1.1 200 OK Content-Type: text/jsonl 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"}]}