BokaMera.API.Host

<back to all web services

UpdateRating

The following routes are available for this service:
PUT/rating/Update RatingScoreUpdate rating from booking
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using BokaMera.API.ServiceModel.Dtos;

namespace BokaMera.API.ServiceModel.Dtos
{
    public partial class CompanyRatingResponse
    {
        ///<summary>
        ///
        ///</summary>
        [ApiMember(Description="")]
        public virtual Guid CompanyId { get; set; }

        ///<summary>
        ///Id of the booking
        ///</summary>
        [ApiMember(Description="Id of the booking")]
        public virtual int BookingId { get; set; }

        ///<summary>
        ///The status of the rating, 1 = Active
        ///</summary>
        [ApiMember(Description="The status of the rating, 1 = Active")]
        public virtual int Status { get; set; }

        ///<summary>
        ///The rating score
        ///</summary>
        [ApiMember(Description="The rating score")]
        public virtual int RatingScore { get; set; }

        ///<summary>
        ///The review if any exists to the rating
        ///</summary>
        [ApiMember(Description="The review if any exists to the rating")]
        public virtual RatingReviewResponse Review { get; set; }

        public virtual DateTime CreatedDate { get; set; }
        public virtual DateTime UpdatedDate { get; set; }
    }

    public partial class RatingReviewResponse
    {
        ///<summary>
        ///The title for the review
        ///</summary>
        [ApiMember(Description="The title for the review")]
        public virtual string Title { get; set; }

        ///<summary>
        ///The description for the review
        ///</summary>
        [ApiMember(Description="The description for the review")]
        public virtual string Description { get; set; }

        ///<summary>
        ///The rating score
        ///</summary>
        [ApiMember(Description="The rating score")]
        public virtual int RatingScore { get; set; }

        ///<summary>
        ///The review author
        ///</summary>
        [ApiMember(Description="The review author")]
        public virtual string Author { get; set; }

        ///<summary>
        ///The created date
        ///</summary>
        [ApiMember(Description="The created date")]
        public virtual DateTime Created { get; set; }

        ///<summary>
        ///The review answer from the company
        ///</summary>
        [ApiMember(Description="The review answer from the company")]
        public virtual string ReviewAnswer { get; set; }
    }

    [ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)]
    public partial class UpdateRating
    {
        ///<summary>
        ///
        ///</summary>
        [ApiMember(Description="", IsRequired=true)]
        public virtual Guid? CompanyId { get; set; }

        ///<summary>
        ///Id of the booking
        ///</summary>
        [ApiMember(Description="Id of the booking", IsRequired=true)]
        public virtual int BookingId { 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")]
        public virtual string Identifier { get; set; }

        ///<summary>
        ///The rating score between 1 and 5.
        ///</summary>
        [ApiMember(Description="The rating score between 1 and 5.")]
        public virtual int? RatingScore { get; set; }

        ///<summary>
        ///The review for the rating
        ///</summary>
        [ApiMember(Description="The review for the rating")]
        public virtual UpdateReview Review { get; set; }
    }

    public partial class UpdateReview
    {
        ///<summary>
        ///The title for the review
        ///</summary>
        [ApiMember(Description="The title for the review")]
        public virtual string Title { get; set; }

        ///<summary>
        ///The description for the review
        ///</summary>
        [ApiMember(Description="The description for the review")]
        public virtual string Description { get; set; }

        ///<summary>
        ///The review author
        ///</summary>
        [ApiMember(Description="The review author")]
        public virtual string Author { 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")]
        public virtual string ReviewAnswer { get; set; }
    }

}

C# UpdateRating DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

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/jsonl
Content-Type: text/jsonl
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/jsonl
Content-Length: length

{"BookingId":0,"Status":0,"RatingScore":0,"Review":{"Title":"String","Description":"String","RatingScore":0,"Author":"String","ReviewAnswer":"String"}}