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.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 Sub New()
CodeLockSystemOptions = New List(Of CodeLockSystemResponse)
End Sub
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 the passed
'''</Summary>
<ApiMember(DataType:="boolean", Description:="If it should clean up old bookings after the 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 was updated
'''</Summary>
<ApiMember(DataType:="datetime", Description:="When settings was 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 Nullable(Of Guid)
'''<Summary>
'''If code lock sync is active
'''</Summary>
<ApiMember(DataType:="bool", Description:="If code lock sync is active")>
Public Overridable Property Active As Nullable(Of 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 Nullable(Of 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 Nullable(Of 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 Nullable(Of Integer)
'''<Summary>
'''If it should clean up old bookings after the passed
'''</Summary>
<ApiMember(DataType:="boolean", Description:="If it should clean up old bookings after the passed")>
Public Overridable Property DeleteOldBySchedule As Nullable(Of 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 Nullable(Of 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 Nullable(Of 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 Nullable(Of 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 Nullable(Of 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 .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.
PUT /codelock/settings HTTP/1.1
Host: api.bokamera.se
Accept: application/json
Content-Type: application/json
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: 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"}]}