TicketUserServices

<back to all web services

CampaignConversionPreviewRequest

The following routes are available for this service:
POST/CampaignConversions/Preview
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class CampaignConversionPreviewRequest
    {
        public ArrayList<CampaignConversionPerson> people = null;
        public Integer windowHours = null;
        public Integer targetEventId = null;
        public Boolean includeFood = null;
        
        public ArrayList<CampaignConversionPerson> getPeople() { return people; }
        public CampaignConversionPreviewRequest setPeople(ArrayList<CampaignConversionPerson> value) { this.people = value; return this; }
        public Integer getWindowHours() { return windowHours; }
        public CampaignConversionPreviewRequest setWindowHours(Integer value) { this.windowHours = value; return this; }
        public Integer getTargetEventId() { return targetEventId; }
        public CampaignConversionPreviewRequest setTargetEventId(Integer value) { this.targetEventId = value; return this; }
        public Boolean isIncludeFood() { return includeFood; }
        public CampaignConversionPreviewRequest setIncludeFood(Boolean value) { this.includeFood = value; return this; }
    }

    public static class CampaignConversionPerson
    {
        public String phone = null;
        public String email = null;
        public Integer recipientId = null;
        public String channel = null;
        public Date sentAt = null;
        
        public String getPhone() { return phone; }
        public CampaignConversionPerson setPhone(String value) { this.phone = value; return this; }
        public String getEmail() { return email; }
        public CampaignConversionPerson setEmail(String value) { this.email = value; return this; }
        public Integer getRecipientId() { return recipientId; }
        public CampaignConversionPerson setRecipientId(Integer value) { this.recipientId = value; return this; }
        public String getChannel() { return channel; }
        public CampaignConversionPerson setChannel(String value) { this.channel = value; return this; }
        public Date getSentAt() { return sentAt; }
        public CampaignConversionPerson setSentAt(Date value) { this.sentAt = value; return this; }
    }

    public static class CampaignConversionResult
    {
        public String runId = null;
        public Integer peopleMeasured = null;
        public Integer peopleConverted = null;
        public BigDecimal totalAmount = null;
        public ArrayList<CampaignConversionSurfaceCount> bySurface = null;
        public ArrayList<CampaignConversionSurfaceCount> byChannel = null;
        public Integer headlineConversions = null;
        public BigDecimal headlineAmount = null;
        public Integer medianHoursToConvert = null;
        public ArrayList<String> notes = null;
        public Integer statusCode = null;
        public String message = null;
        
        public String getRunId() { return runId; }
        public CampaignConversionResult setRunId(String value) { this.runId = value; return this; }
        public Integer getPeopleMeasured() { return peopleMeasured; }
        public CampaignConversionResult setPeopleMeasured(Integer value) { this.peopleMeasured = value; return this; }
        public Integer getPeopleConverted() { return peopleConverted; }
        public CampaignConversionResult setPeopleConverted(Integer value) { this.peopleConverted = value; return this; }
        public BigDecimal getTotalAmount() { return totalAmount; }
        public CampaignConversionResult setTotalAmount(BigDecimal value) { this.totalAmount = value; return this; }
        public ArrayList<CampaignConversionSurfaceCount> getBySurface() { return bySurface; }
        public CampaignConversionResult setBySurface(ArrayList<CampaignConversionSurfaceCount> value) { this.bySurface = value; return this; }
        public ArrayList<CampaignConversionSurfaceCount> getByChannel() { return byChannel; }
        public CampaignConversionResult setByChannel(ArrayList<CampaignConversionSurfaceCount> value) { this.byChannel = value; return this; }
        public Integer getHeadlineConversions() { return headlineConversions; }
        public CampaignConversionResult setHeadlineConversions(Integer value) { this.headlineConversions = value; return this; }
        public BigDecimal getHeadlineAmount() { return headlineAmount; }
        public CampaignConversionResult setHeadlineAmount(BigDecimal value) { this.headlineAmount = value; return this; }
        public Integer getMedianHoursToConvert() { return medianHoursToConvert; }
        public CampaignConversionResult setMedianHoursToConvert(Integer value) { this.medianHoursToConvert = value; return this; }
        public ArrayList<String> getNotes() { return notes; }
        public CampaignConversionResult setNotes(ArrayList<String> value) { this.notes = value; return this; }
        public Integer getStatusCode() { return statusCode; }
        public CampaignConversionResult setStatusCode(Integer value) { this.statusCode = value; return this; }
        public String getMessage() { return message; }
        public CampaignConversionResult setMessage(String value) { this.message = value; return this; }
    }

    public static class CampaignConversionSurfaceCount
    {
        public String key = null;
        public Integer people = null;
        public Integer count = null;
        public BigDecimal amount = null;
        
        public String getKey() { return key; }
        public CampaignConversionSurfaceCount setKey(String value) { this.key = value; return this; }
        public Integer getPeople() { return people; }
        public CampaignConversionSurfaceCount setPeople(Integer value) { this.people = value; return this; }
        public Integer getCount() { return count; }
        public CampaignConversionSurfaceCount setCount(Integer value) { this.count = value; return this; }
        public BigDecimal getAmount() { return amount; }
        public CampaignConversionSurfaceCount setAmount(BigDecimal value) { this.amount = value; return this; }
    }

}

Java CampaignConversionPreviewRequest 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 /CampaignConversions/Preview HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	people: 
	[
		{
			phone: String,
			email: String,
			recipientId: 0,
			channel: String,
			sentAt: 0001-01-01
		}
	],
	windowHours: 0,
	targetEventId: 0,
	includeFood: False
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	runId: String,
	peopleMeasured: 0,
	peopleConverted: 0,
	totalAmount: 0,
	bySurface: 
	[
		{
			key: String,
			people: 0,
			count: 0,
			amount: 0
		}
	],
	byChannel: 
	[
		{
			key: String,
			people: 0,
			count: 0,
			amount: 0
		}
	],
	headlineConversions: 0,
	headlineAmount: 0,
	medianHoursToConvert: 0,
	notes: 
	[
		String
	],
	statusCode: 0,
	message: String
}