PUT | /rating/ | Update RatingScore | Update rating from booking |
---|
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 RatingReviewResponse() =
///<summary>
///The title for the review
///</summary>
[<ApiMember(Description="The title for the review")>]
member val Title:String = null with get,set
///<summary>
///The description for the review
///</summary>
[<ApiMember(Description="The description for the review")>]
member val Description:String = null with get,set
///<summary>
///The rating score
///</summary>
[<ApiMember(Description="The rating score")>]
member val RatingScore:Int32 = new Int32() with get,set
///<summary>
///The review author
///</summary>
[<ApiMember(Description="The review author")>]
member val Author:String = null with get,set
///<summary>
///The created date
///</summary>
[<ApiMember(Description="The created date")>]
member val Created:DateTime = new DateTime() with get,set
///<summary>
///The review answer from the company
///</summary>
[<ApiMember(Description="The review answer from the company")>]
member val ReviewAnswer:String = null with get,set
[<AllowNullLiteral>]
type CompanyRatingResponse() =
///<summary>
///
///</summary>
[<ApiMember(Description="")>]
member val CompanyId:Guid = new Guid() with get,set
///<summary>
///Id of the booking
///</summary>
[<ApiMember(Description="Id of the booking")>]
member val BookingId:Int32 = new Int32() with get,set
///<summary>
///The status of the rating, 1 = Active
///</summary>
[<ApiMember(Description="The status of the rating, 1 = Active")>]
member val Status:Int32 = new Int32() with get,set
///<summary>
///The rating score
///</summary>
[<ApiMember(Description="The rating score")>]
member val RatingScore:Int32 = new Int32() with get,set
///<summary>
///The review if any exists to the rating
///</summary>
[<ApiMember(Description="The review if any exists to the rating")>]
member val Review:RatingReviewResponse = null with get,set
member val CreatedDate:DateTime = new DateTime() with get,set
member val UpdatedDate:DateTime = new DateTime() with get,set
[<AllowNullLiteral>]
type UpdateReview() =
///<summary>
///The title for the review
///</summary>
[<ApiMember(Description="The title for the review")>]
member val Title:String = null with get,set
///<summary>
///The description for the review
///</summary>
[<ApiMember(Description="The description for the review")>]
member val Description:String = null with get,set
///<summary>
///The review author
///</summary>
[<ApiMember(Description="The review author")>]
member val Author:String = null with get,set
///<summary>
///The review answer from the company. Only the company can respond to this
///</summary>
[<ApiMember(Description="The review answer from the company. Only the company can respond to this")>]
member val ReviewAnswer:String = null with get,set
[<ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)>]
[<AllowNullLiteral>]
type UpdateRating() =
///<summary>
///
///</summary>
[<ApiMember(Description="", IsRequired=true)>]
member val CompanyId:Nullable<Guid> = new Nullable<Guid>() with get,set
///<summary>
///Id of the booking
///</summary>
[<ApiMember(Description="Id of the booking", IsRequired=true)>]
member val BookingId:Int32 = new Int32() with get,set
///<summary>
///The identifier for the booking, use to verify the booking. Only needed when a customer, not admin
///</summary>
[<ApiMember(Description="The identifier for the booking, use to verify the booking. Only needed when a customer, not admin")>]
member val Identifier:String = null with get,set
///<summary>
///The rating score between 1 and 5.
///</summary>
[<ApiMember(Description="The rating score between 1 and 5.")>]
member val RatingScore:Nullable<Int32> = new Nullable<Int32>() with get,set
///<summary>
///The review for the rating
///</summary>
[<ApiMember(Description="The review for the rating")>]
member val Review:UpdateReview = null with get,set
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /rating/ HTTP/1.1
Host: api.bokamera.se
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"CompanyId":"00000000-0000-0000-0000-000000000000","BookingId":0,"Identifier":"String","RatingScore":0,"Review":{"Title":"String","Description":"String","Author":"String","ReviewAnswer":"String"}}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"BookingId":0,"Status":0,"RatingScore":0,"Review":{"Title":"String","Description":"String","RatingScore":0,"Author":"String","ReviewAnswer":"String"}}