<back to all web services

ReviewCreateRequest

The following routes are available for this service:
POST/RestApi/reviews-api
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class ReviewCreateRequest
    {
        public String Message = null;
        public String Name = null;
        public String Email = null;
        public String CustomData = null;
        public String ThreadKey = null;
        public ThreadCreateRequest Thread = null;
        public CaptchaInfo Captcha = null;
        public BigDecimal Rating = null;
        
        public String getMessage() { return Message; }
        public ReviewCreateRequest setMessage(String value) { this.Message = value; return this; }
        public String getName() { return Name; }
        public ReviewCreateRequest setName(String value) { this.Name = value; return this; }
        public String getEmail() { return Email; }
        public ReviewCreateRequest setEmail(String value) { this.Email = value; return this; }
        public String getCustomData() { return CustomData; }
        public ReviewCreateRequest setCustomData(String value) { this.CustomData = value; return this; }
        public String getThreadKey() { return ThreadKey; }
        public ReviewCreateRequest setThreadKey(String value) { this.ThreadKey = value; return this; }
        public ThreadCreateRequest getThread() { return Thread; }
        public ReviewCreateRequest setThread(ThreadCreateRequest value) { this.Thread = value; return this; }
        public CaptchaInfo getCaptcha() { return Captcha; }
        public ReviewCreateRequest setCaptcha(CaptchaInfo value) { this.Captcha = value; return this; }
        public BigDecimal getRating() { return Rating; }
        public ReviewCreateRequest setRating(BigDecimal value) { this.Rating = value; return this; }
    }

    public static class ThreadCreateRequest
    {
        public String Key = null;
        public String Type = null;
        public String Behavior = null;
        public String Title = null;
        public String Language = null;
        public String DataSource = null;
        public String GroupKey = null;
        public GroupCreateRequest Group = null;
        
        public String getKey() { return Key; }
        public ThreadCreateRequest setKey(String value) { this.Key = value; return this; }
        public String getType() { return Type; }
        public ThreadCreateRequest setType(String value) { this.Type = value; return this; }
        public String getBehavior() { return Behavior; }
        public ThreadCreateRequest setBehavior(String value) { this.Behavior = value; return this; }
        public String getTitle() { return Title; }
        public ThreadCreateRequest setTitle(String value) { this.Title = value; return this; }
        public String getLanguage() { return Language; }
        public ThreadCreateRequest setLanguage(String value) { this.Language = value; return this; }
        public String getDataSource() { return DataSource; }
        public ThreadCreateRequest setDataSource(String value) { this.DataSource = value; return this; }
        public String getGroupKey() { return GroupKey; }
        public ThreadCreateRequest setGroupKey(String value) { this.GroupKey = value; return this; }
        public GroupCreateRequest getGroup() { return Group; }
        public ThreadCreateRequest setGroup(GroupCreateRequest value) { this.Group = value; return this; }
    }

    public static class GroupCreateRequest
    {
        public String Key = null;
        public String Name = null;
        public String Description = null;
        
        public String getKey() { return Key; }
        public GroupCreateRequest setKey(String value) { this.Key = value; return this; }
        public String getName() { return Name; }
        public GroupCreateRequest setName(String value) { this.Name = value; return this; }
        public String getDescription() { return Description; }
        public GroupCreateRequest setDescription(String value) { this.Description = value; return this; }
    }

    public static class CaptchaInfo
    {
        public String Answer = null;
        public String CorrectAnswer = null;
        public String InitializationVector = null;
        public String Key = null;
        
        public String getAnswer() { return Answer; }
        public CaptchaInfo setAnswer(String value) { this.Answer = value; return this; }
        public String getCorrectAnswer() { return CorrectAnswer; }
        public CaptchaInfo setCorrectAnswer(String value) { this.CorrectAnswer = value; return this; }
        public String getInitializationVector() { return InitializationVector; }
        public CaptchaInfo setInitializationVector(String value) { this.InitializationVector = value; return this; }
        public String getKey() { return Key; }
        public CaptchaInfo setKey(String value) { this.Key = value; return this; }
    }

    public static class ReviewViewModel
    {
        public String Key = null;
        public String Name = null;
        public String Message = null;
        public Date DateCreated = null;
        public String ProfilePictureUrl = null;
        public String ProfilePictureThumbnailUrl = null;
        public String Status = null;
        public String Email = null;
        public String ThreadKey = null;
        public String AuthorIpAddress = null;
        public String CustomData = null;
        public BigDecimal Rating = null;
        
        public String getKey() { return Key; }
        public ReviewViewModel setKey(String value) { this.Key = value; return this; }
        public String getName() { return Name; }
        public ReviewViewModel setName(String value) { this.Name = value; return this; }
        public String getMessage() { return Message; }
        public ReviewViewModel setMessage(String value) { this.Message = value; return this; }
        public Date getDateCreated() { return DateCreated; }
        public ReviewViewModel setDateCreated(Date value) { this.DateCreated = value; return this; }
        public String getProfilePictureUrl() { return ProfilePictureUrl; }
        public ReviewViewModel setProfilePictureUrl(String value) { this.ProfilePictureUrl = value; return this; }
        public String getProfilePictureThumbnailUrl() { return ProfilePictureThumbnailUrl; }
        public ReviewViewModel setProfilePictureThumbnailUrl(String value) { this.ProfilePictureThumbnailUrl = value; return this; }
        public String getStatus() { return Status; }
        public ReviewViewModel setStatus(String value) { this.Status = value; return this; }
        public String getEmail() { return Email; }
        public ReviewViewModel setEmail(String value) { this.Email = value; return this; }
        public String getThreadKey() { return ThreadKey; }
        public ReviewViewModel setThreadKey(String value) { this.ThreadKey = value; return this; }
        public String getAuthorIpAddress() { return AuthorIpAddress; }
        public ReviewViewModel setAuthorIpAddress(String value) { this.AuthorIpAddress = value; return this; }
        public String getCustomData() { return CustomData; }
        public ReviewViewModel setCustomData(String value) { this.CustomData = value; return this; }
        public BigDecimal getRating() { return Rating; }
        public ReviewViewModel setRating(BigDecimal value) { this.Rating = value; return this; }
    }

}

Java ReviewCreateRequest DTOs

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

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /RestApi/reviews-api HTTP/1.1 
Host: www.asg.com.au 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Message: String,
	Name: String,
	Email: String,
	CustomData: String,
	ThreadKey: String,
	Thread: 
	{
		Key: String,
		Type: String,
		Behavior: String,
		Title: String,
		Language: String,
		DataSource: String,
		GroupKey: String,
		Group: 
		{
			Key: String,
			Name: String,
			Description: String
		}
	},
	Captcha: 
	{
		Answer: String,
		CorrectAnswer: String,
		InitializationVector: String,
		Key: String
	},
	Rating: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Key: String,
	Name: String,
	Message: String,
	DateCreated: 0001-01-01,
	ProfilePictureUrl: String,
	ProfilePictureThumbnailUrl: String,
	Status: String,
	Email: String,
	ThreadKey: String,
	AuthorIpAddress: String,
	CustomData: String,
	Rating: 0
}