BokaMera.API.Host

<back to all web services

UpdateRating

The following routes are available for this service:
PUT/rating/Update RatingScoreUpdate rating from booking
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
    public static class UpdateRating
    {
        /**
        * 
        */
        @ApiMember(Description="", IsRequired=true)
        public UUID CompanyId = null;

        /**
        * Id of the booking
        */
        @ApiMember(Description="Id of the booking", IsRequired=true)
        public Integer BookingId = null;

        /**
        * The identifier for the booking, use to verify the booking. Only needed when a customer, not admin
        */
        @ApiMember(Description="The identifier for the booking, use to verify the booking. Only needed when a customer, not admin")
        public String Identifier = null;

        /**
        * The rating score between 1 and 5.
        */
        @ApiMember(Description="The rating score between 1 and 5.")
        public Integer RatingScore = null;

        /**
        * The review for the rating
        */
        @ApiMember(Description="The review for the rating")
        public UpdateReview Review = null;
        
        public UUID getCompanyId() { return CompanyId; }
        public UpdateRating setCompanyId(UUID value) { this.CompanyId = value; return this; }
        public Integer getBookingId() { return BookingId; }
        public UpdateRating setBookingId(Integer value) { this.BookingId = value; return this; }
        public String getIdentifier() { return Identifier; }
        public UpdateRating setIdentifier(String value) { this.Identifier = value; return this; }
        public Integer getRatingScore() { return RatingScore; }
        public UpdateRating setRatingScore(Integer value) { this.RatingScore = value; return this; }
        public UpdateReview getReview() { return Review; }
        public UpdateRating setReview(UpdateReview value) { this.Review = value; return this; }
    }

    public static class UpdateReview
    {
        /**
        * The title for the review
        */
        @ApiMember(Description="The title for the review")
        public String Title = null;

        /**
        * The description for the review
        */
        @ApiMember(Description="The description for the review")
        public String Description = null;

        /**
        * The review author
        */
        @ApiMember(Description="The review author")
        public String Author = null;

        /**
        * The review answer from the company. Only the company can respond to this
        */
        @ApiMember(Description="The review answer from the company. Only the company can respond to this")
        public String ReviewAnswer = null;
        
        public String getTitle() { return Title; }
        public UpdateReview setTitle(String value) { this.Title = value; return this; }
        public String getDescription() { return Description; }
        public UpdateReview setDescription(String value) { this.Description = value; return this; }
        public String getAuthor() { return Author; }
        public UpdateReview setAuthor(String value) { this.Author = value; return this; }
        public String getReviewAnswer() { return ReviewAnswer; }
        public UpdateReview setReviewAnswer(String value) { this.ReviewAnswer = value; return this; }
    }

    public static class CompanyRatingResponse
    {
        /**
        * 
        */
        @ApiMember(Description="")
        public UUID CompanyId = null;

        /**
        * Id of the booking
        */
        @ApiMember(Description="Id of the booking")
        public Integer BookingId = null;

        /**
        * The status of the rating, 1 = Active
        */
        @ApiMember(Description="The status of the rating, 1 = Active")
        public Integer Status = null;

        /**
        * The rating score
        */
        @ApiMember(Description="The rating score")
        public Integer RatingScore = null;

        /**
        * The review if any exists to the rating
        */
        @ApiMember(Description="The review if any exists to the rating")
        public RatingReviewResponse Review = null;

        public Date CreatedDate = null;
        public Date UpdatedDate = null;
        
        public UUID getCompanyId() { return CompanyId; }
        public CompanyRatingResponse setCompanyId(UUID value) { this.CompanyId = value; return this; }
        public Integer getBookingId() { return BookingId; }
        public CompanyRatingResponse setBookingId(Integer value) { this.BookingId = value; return this; }
        public Integer getStatus() { return Status; }
        public CompanyRatingResponse setStatus(Integer value) { this.Status = value; return this; }
        public Integer getRatingScore() { return RatingScore; }
        public CompanyRatingResponse setRatingScore(Integer value) { this.RatingScore = value; return this; }
        public RatingReviewResponse getReview() { return Review; }
        public CompanyRatingResponse setReview(RatingReviewResponse value) { this.Review = value; return this; }
        public Date getCreatedDate() { return CreatedDate; }
        public CompanyRatingResponse setCreatedDate(Date value) { this.CreatedDate = value; return this; }
        public Date getUpdatedDate() { return UpdatedDate; }
        public CompanyRatingResponse setUpdatedDate(Date value) { this.UpdatedDate = value; return this; }
    }

    public static class RatingReviewResponse
    {
        /**
        * The title for the review
        */
        @ApiMember(Description="The title for the review")
        public String Title = null;

        /**
        * The description for the review
        */
        @ApiMember(Description="The description for the review")
        public String Description = null;

        /**
        * The rating score
        */
        @ApiMember(Description="The rating score")
        public Integer RatingScore = null;

        /**
        * The review author
        */
        @ApiMember(Description="The review author")
        public String Author = null;

        /**
        * The created date
        */
        @ApiMember(Description="The created date")
        public Date Created = null;

        /**
        * The review answer from the company
        */
        @ApiMember(Description="The review answer from the company")
        public String ReviewAnswer = null;
        
        public String getTitle() { return Title; }
        public RatingReviewResponse setTitle(String value) { this.Title = value; return this; }
        public String getDescription() { return Description; }
        public RatingReviewResponse setDescription(String value) { this.Description = value; return this; }
        public Integer getRatingScore() { return RatingScore; }
        public RatingReviewResponse setRatingScore(Integer value) { this.RatingScore = value; return this; }
        public String getAuthor() { return Author; }
        public RatingReviewResponse setAuthor(String value) { this.Author = value; return this; }
        public Date getCreated() { return Created; }
        public RatingReviewResponse setCreated(Date value) { this.Created = value; return this; }
        public String getReviewAnswer() { return ReviewAnswer; }
        public RatingReviewResponse setReviewAnswer(String value) { this.ReviewAnswer = value; return this; }
    }

}

Java UpdateRating DTOs

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

HTTP + 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"}}