Trendsic Platform Service

<back to all web services

ActivityDataLast6MonthsRequest

Requires Authentication
Requires any of the roles:Worker, Agent, Administrator
The following routes are available for this service:
GET,OPTIONS/v1/ActivityDataLast6Months/{AgentId}/{DateFrom}/{DateTo}
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    public static class ActivityDataLast6MonthsRequest
    {
        public Integer AgentId = null;
        public Date DateFrom = null;
        public Date DateTo = null;
        
        public Integer getAgentId() { return AgentId; }
        public ActivityDataLast6MonthsRequest setAgentId(Integer value) { this.AgentId = value; return this; }
        public Date getDateFrom() { return DateFrom; }
        public ActivityDataLast6MonthsRequest setDateFrom(Date value) { this.DateFrom = value; return this; }
        public Date getDateTo() { return DateTo; }
        public ActivityDataLast6MonthsRequest setDateTo(Date value) { this.DateTo = value; return this; }
    }

    public static class ActivityPlanResponse
    {
        public ResponseStatus ResponseStatus = null;
        public ArrayList<ActivityPlan> ActivityPlans = new ArrayList<ActivityPlan>();
        public ActivityPlanExtended ActivityData = null;
        
        public ResponseStatus getResponseStatus() { return ResponseStatus; }
        public ActivityPlanResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
        public ArrayList<ActivityPlan> getActivityPlans() { return ActivityPlans; }
        public ActivityPlanResponse setActivityPlans(ArrayList<ActivityPlan> value) { this.ActivityPlans = value; return this; }
        public ActivityPlanExtended getActivityData() { return ActivityData; }
        public ActivityPlanResponse setActivityData(ActivityPlanExtended value) { this.ActivityData = value; return this; }
    }

    public static class ActivityPlan
    {
        public Integer Id = null;
        public Integer AgentId = null;
        public Integer EventTypeId = null;
        public Integer Goal = null;
        public Date DateFrom = null;
        public Date DateTo = null;
        public Date DateCreated = null;
        public Integer MthlyCashFlow = null;
        public Integer YTDCashFlow = null;
        public Integer Recruit = null;
        public String EventTypeName = null;
        public Integer Actual = null;
        
        public Integer getId() { return Id; }
        public ActivityPlan setId(Integer value) { this.Id = value; return this; }
        public Integer getAgentId() { return AgentId; }
        public ActivityPlan setAgentId(Integer value) { this.AgentId = value; return this; }
        public Integer getEventTypeId() { return EventTypeId; }
        public ActivityPlan setEventTypeId(Integer value) { this.EventTypeId = value; return this; }
        public Integer getGoal() { return Goal; }
        public ActivityPlan setGoal(Integer value) { this.Goal = value; return this; }
        public Date getDateFrom() { return DateFrom; }
        public ActivityPlan setDateFrom(Date value) { this.DateFrom = value; return this; }
        public Date getDateTo() { return DateTo; }
        public ActivityPlan setDateTo(Date value) { this.DateTo = value; return this; }
        public Date getDateCreated() { return DateCreated; }
        public ActivityPlan setDateCreated(Date value) { this.DateCreated = value; return this; }
        public Integer getMthlyCashFlow() { return MthlyCashFlow; }
        public ActivityPlan setMthlyCashFlow(Integer value) { this.MthlyCashFlow = value; return this; }
        public Integer getYtdCashFlow() { return YTDCashFlow; }
        public ActivityPlan setYtdCashFlow(Integer value) { this.YTDCashFlow = value; return this; }
        public Integer getRecruit() { return Recruit; }
        public ActivityPlan setRecruit(Integer value) { this.Recruit = value; return this; }
        public String getEventTypeName() { return EventTypeName; }
        public ActivityPlan setEventTypeName(String value) { this.EventTypeName = value; return this; }
        public Integer getActual() { return Actual; }
        public ActivityPlan setActual(Integer value) { this.Actual = value; return this; }
    }

    public static class ActivityPlanExtended
    {
        public Integer AppCount = null;
        public Integer AvgFlow = null;
        public Integer AvgTransfer = null;
        public Integer AvgLife = null;
        public BigDecimal LifePerAnnuity = null;
        public BigDecimal FlowTransfer = null;
        public BigDecimal TransferRatio = null;
        
        public Integer getAppCount() { return AppCount; }
        public ActivityPlanExtended setAppCount(Integer value) { this.AppCount = value; return this; }
        public Integer getAvgFlow() { return AvgFlow; }
        public ActivityPlanExtended setAvgFlow(Integer value) { this.AvgFlow = value; return this; }
        public Integer getAvgTransfer() { return AvgTransfer; }
        public ActivityPlanExtended setAvgTransfer(Integer value) { this.AvgTransfer = value; return this; }
        public Integer getAvgLife() { return AvgLife; }
        public ActivityPlanExtended setAvgLife(Integer value) { this.AvgLife = value; return this; }
        public BigDecimal getLifePerAnnuity() { return LifePerAnnuity; }
        public ActivityPlanExtended setLifePerAnnuity(BigDecimal value) { this.LifePerAnnuity = value; return this; }
        public BigDecimal getFlowTransfer() { return FlowTransfer; }
        public ActivityPlanExtended setFlowTransfer(BigDecimal value) { this.FlowTransfer = value; return this; }
        public BigDecimal getTransferRatio() { return TransferRatio; }
        public ActivityPlanExtended setTransferRatio(BigDecimal value) { this.TransferRatio = value; return this; }
    }

}

Java ActivityDataLast6MonthsRequest DTOs

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

HTTP + XML

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

GET /v1/ActivityDataLast6Months/{AgentId}/{DateFrom}/{DateTo} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ActivityPlanResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <ActivityData>
    <AppCount>0</AppCount>
    <AvgFlow>0</AvgFlow>
    <AvgLife>0</AvgLife>
    <AvgTransfer>0</AvgTransfer>
    <FlowTransfer>0</FlowTransfer>
    <LifePerAnnuity>0</LifePerAnnuity>
    <TransferRatio>0</TransferRatio>
  </ActivityData>
  <ActivityPlans>
    <ActivityPlan>
      <Actual>0</Actual>
      <AgentId>0</AgentId>
      <DateCreated>0001-01-01T00:00:00</DateCreated>
      <DateFrom>0001-01-01T00:00:00</DateFrom>
      <DateTo>0001-01-01T00:00:00</DateTo>
      <EventTypeId>0</EventTypeId>
      <EventTypeName>String</EventTypeName>
      <Goal>0</Goal>
      <Id>0</Id>
      <MthlyCashFlow>0</MthlyCashFlow>
      <Recruit>0</Recruit>
      <YTDCashFlow>0</YTDCashFlow>
    </ActivityPlan>
  </ActivityPlans>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
</ActivityPlanResponse>