Requires any of the roles: | bookingsupplier-administrator-write, superadmin, bookingsupplier-administrator-read |
GET | /bookings/{Id}/resources/available | Find available resources. |
---|
namespace BokaMera.API.ServiceModel.Dtos
open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type AvailableResourceResponse() =
///<summary>
///The resource id
///</summary>
[<ApiMember(Description="The resource id")>]
member val Id:Int32 = new Int32() with get,set
///<summary>
///The resource name
///</summary>
[<ApiMember(Description="The resource name")>]
member val Name:String = null with get,set
///<summary>
///The resource description
///</summary>
[<ApiMember(Description="The resource description")>]
member val Description:String = null with get,set
///<summary>
///The resource color in scheduler in hexadecimal color code. Example: #00b0f0 for blue.
///</summary>
[<ApiMember(Description="The resource color in scheduler in hexadecimal color code. Example: #00b0f0 for blue.")>]
member val Color:String = null with get,set
///<summary>
///The image url of the resource
///</summary>
[<ApiMember(Description="The image url of the resource")>]
member val ImageUrl:Uri = null with get,set
[<AllowNullLiteral>]
type ResourceTypeAvailableResourcesQueryResponse() =
///<summary>
///The resourcetype id
///</summary>
[<ApiMember(Description="The resourcetype id")>]
member val Id:Int32 = new Int32() with get,set
///<summary>
///The available resources
///</summary>
[<ApiMember(Description="The available resources")>]
member val Resources:ResizeArray<AvailableResourceResponse> = new ResizeArray<AvailableResourceResponse>() with get,set
[<ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)>]
[<ApiResponse(Description="You have too low privilegies to call this service", StatusCode=403)>]
[<ValidateRequest(Validator="IsAuthenticated")>]
[<AllowNullLiteral>]
type ResourceTypeAvailableResourcesQuery() =
///<summary>
///Enter the company and id you want to see the information for a resourcetype, if blank company id and you are an admin, your company id will be used. If blank id, all resources will be shown
///</summary>
[<ApiMember(Description="Enter the company and id you want to see the information for a resourcetype, if blank company id and you are an admin, your company id will be used. If blank id, all resources will be shown ", ParameterType="query")>]
member val CompanyId:Nullable<Guid> = new Nullable<Guid>() with get,set
///<summary>
///Enter the id for the booking.
///</summary>
[<ApiMember(Description="Enter the id for the booking.", IsRequired=true, ParameterType="path")>]
member val Id:Int32 = new Int32() with get,set
///<summary>
///Enter the id for a resourcetype.
///</summary>
[<ApiMember(Description="Enter the id for a resourcetype.", IsRequired=true)>]
member val ResourceTypeId:Int32 = new Int32() with get,set
F# ResourceTypeAvailableResourcesQuery 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.
GET /bookings/{Id}/resources/available HTTP/1.1 Host: api.bokamera.se Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <ResourceTypeAvailableResourcesQueryResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos"> <Id>0</Id> <Resources> <AvailableResourceResponse> <Color>String</Color> <Description>String</Description> <Id>0</Id> <ImageUrl i:nil="true" /> <Name>String</Name> </AvailableResourceResponse> </Resources> </ResourceTypeAvailableResourcesQueryResponse>