| Requires any of the roles: | bookingsupplier-administrator-write, superadmin | 
| PUT | /resourcetypes/{Id} | Update existing resourcetype | Updates an existing resourcetype if you are authorized to do so. | 
|---|
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 ResourceTypeQueryResponse
            '''<Summary>
            '''The resourcetype id
            '''</Summary>
            <ApiMember(Description:="The resourcetype id")>
            Public Overridable Property Id As Integer
            '''<Summary>
            '''The resourcetype name
            '''</Summary>
            <ApiMember(Description:="The resourcetype name")>
            Public Overridable Property Name As String
            '''<Summary>
            '''The resourcetype description
            '''</Summary>
            <ApiMember(Description:="The resourcetype description")>
            Public Overridable Property Description As String
            '''<Summary>
            '''The resources in the resourcetype. Only shows active resources if not admin.
            '''</Summary>
            <ApiMember(Description:="The resources in the resourcetype. Only shows active resources if not admin.")>
            Public Overridable Property Resources As List(Of ResourceTypeResource) = New List(Of ResourceTypeResource)
            '''<Summary>
            '''If resourcetype is active or not
            '''</Summary>
            <ApiMember(Description:="If resourcetype is active or not")>
            Public Overridable Property Active As Boolean
            '''<Summary>
            '''The date when the resource was created
            '''</Summary>
            <ApiMember(Description:="The date when the resource was created")>
            Public Overridable Property Created As Date
            '''<Summary>
            '''The date when the resource was updated
            '''</Summary>
            <ApiMember(Description:="The date when the resource was updated")>
            Public Overridable Property Updated As Date
        End Class
        Public Partial Class ResourceTypeResource
            '''<Summary>
            '''The resource id
            '''</Summary>
            <ApiMember(Description:="The resource id")>
            Public Overridable Property Id As Integer
            '''<Summary>
            '''The resource name
            '''</Summary>
            <ApiMember(Description:="The resource name")>
            Public Overridable Property Name As String
            '''<Summary>
            '''The resource status
            '''</Summary>
            <ApiMember(Description:="The resource status")>
            Public Overridable Property Active As Boolean
            '''<Summary>
            '''The resource description
            '''</Summary>
            <ApiMember(Description:="The resource description")>
            Public Overridable Property Description As String
            '''<Summary>
            '''The resource email
            '''</Summary>
            <ApiMember(Description:="The resource email")>
            Public Overridable Property Email As String
            '''<Summary>
            '''The resource phone
            '''</Summary>
            <ApiMember(Description:="The resource phone")>
            Public Overridable Property Phone As String
            '''<Summary>
            '''The resource color
            '''</Summary>
            <ApiMember(Description:="The resource color")>
            Public Overridable Property Color As String
            '''<Summary>
            '''The resource image
            '''</Summary>
            <ApiMember(Description:="The resource image")>
            Public Overridable Property ImageUrl As Uri
            '''<Summary>
            '''The priority of the resource
            '''</Summary>
            <ApiMember(Description:="The priority of the resource")>
            Public Overridable Property Priority As Integer
            '''<Summary>
            '''If the resource wants to receive Email notifications
            '''</Summary>
            <ApiMember(Description:="If the resource wants to receive Email notifications")>
            Public Overridable Property EmailNotification As Boolean
            '''<Summary>
            '''If the resource wants to receive SMS notifications
            '''</Summary>
            <ApiMember(Description:="If the resource wants to receive SMS notifications")>
            Public Overridable Property SMSNotification As Boolean
            '''<Summary>
            '''If the resource wants to receive Email reminders
            '''</Summary>
            <ApiMember(Description:="If the resource wants to receive Email reminders")>
            Public Overridable Property EmailReminder As Boolean
            '''<Summary>
            '''If the resource wants to receive SMS reminders
            '''</Summary>
            <ApiMember(Description:="If the resource wants to receive SMS reminders")>
            Public Overridable Property SMSReminder As Boolean
        End Class
        <ApiResponse(Description:="You were unauthorized to call this service", StatusCode:=401)>
        <ValidateRequest(Validator:="IsAuthenticated")>
        Public Partial Class UpdateResourceType
            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>
            '''Id of the resourcetype
            '''</Summary>
            <ApiMember(Description:="Id of the resourcetype", IsRequired:=true, ParameterType:="path")>
            Public Overridable Property Id As Integer
            '''<Summary>
            '''The resources to be added
            '''</Summary>
            <ApiMember(Description:="The resources to be added")>
            Public Overridable Property Resources As List(Of UpdateResourceTypeResource) = New List(Of UpdateResourceTypeResource)
            '''<Summary>
            '''The resourcetype name
            '''</Summary>
            <ApiMember(Description:="The resourcetype name")>
            Public Overridable Property Name As String
            '''<Summary>
            '''The resourcetype description
            '''</Summary>
            <ApiMember(Description:="The resourcetype description")>
            Public Overridable Property Description As String
            '''<Summary>
            '''If resourcetype is active or not
            '''</Summary>
            <ApiMember(Description:="If resourcetype is active or not")>
            Public Overridable Property Active As Boolean
        End Class
        Public Partial Class UpdateResourceTypeResource
            '''<Summary>
            '''The resource id
            '''</Summary>
            <ApiMember(Description:="The resource id")>
            Public Overridable Property Id As Integer
            '''<Summary>
            '''The priority of the resource
            '''</Summary>
            <ApiMember(Description:="The priority of the resource")>
            Public Overridable Property Priority As Integer
        End Class
    End Namespace
End Namespace
VB.NET UpdateResourceType DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /resourcetypes/{Id} HTTP/1.1 
Host: testapi.bokamera.se 
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<UpdateResourceType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <Active>false</Active>
  <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
  <Description>String</Description>
  <Id>0</Id>
  <Name>String</Name>
  <Resources>
    <UpdateResourceTypeResource>
      <Id>0</Id>
      <Priority>0</Priority>
    </UpdateResourceTypeResource>
  </Resources>
</UpdateResourceType>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<ResourceTypeQueryResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <Active>false</Active>
  <Created>0001-01-01T00:00:00</Created>
  <Description>String</Description>
  <Id>0</Id>
  <Name>String</Name>
  <Resources>
    <ResourceTypeResource>
      <Active>false</Active>
      <Color>String</Color>
      <Description>String</Description>
      <Email>String</Email>
      <EmailNotification>false</EmailNotification>
      <EmailReminder>false</EmailReminder>
      <Id>0</Id>
      <ImageUrl i:nil="true" />
      <Name>String</Name>
      <Phone>String</Phone>
      <Priority>0</Priority>
      <SMSNotification>false</SMSNotification>
      <SMSReminder>false</SMSReminder>
    </ResourceTypeResource>
  </Resources>
  <Updated>0001-01-01T00:00:00</Updated>
</ResourceTypeQueryResponse>