Trendsic Platform Service

<back to all web services

VisitBoardRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/visits/board
import 'package:servicestack/servicestack.dart';

class VisitCard implements IConvertible
{
    String? VisitKey;
    int? JobID;
    int? ProjectID;
    String? ProjectUID;
    int? AgreementJobID;
    String? ScheduledDate;
    String? CustomerName;
    String? JobName;
    String? LocationName;
    String? City;
    String? Zip;
    double? Lat;
    double? Lng;
    int? CrewID;
    String? CrewName;
    int? SortOrder;
    String? Status;
    int? DurationMinutes;
    String? EtaWindow;
    bool? IsCommercial;

    VisitCard({this.VisitKey,this.JobID,this.ProjectID,this.ProjectUID,this.AgreementJobID,this.ScheduledDate,this.CustomerName,this.JobName,this.LocationName,this.City,this.Zip,this.Lat,this.Lng,this.CrewID,this.CrewName,this.SortOrder,this.Status,this.DurationMinutes,this.EtaWindow,this.IsCommercial});
    VisitCard.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        VisitKey = json['VisitKey'];
        JobID = json['JobID'];
        ProjectID = json['ProjectID'];
        ProjectUID = json['ProjectUID'];
        AgreementJobID = json['AgreementJobID'];
        ScheduledDate = json['ScheduledDate'];
        CustomerName = json['CustomerName'];
        JobName = json['JobName'];
        LocationName = json['LocationName'];
        City = json['City'];
        Zip = json['Zip'];
        Lat = JsonConverters.toDouble(json['Lat']);
        Lng = JsonConverters.toDouble(json['Lng']);
        CrewID = json['CrewID'];
        CrewName = json['CrewName'];
        SortOrder = json['SortOrder'];
        Status = json['Status'];
        DurationMinutes = json['DurationMinutes'];
        EtaWindow = json['EtaWindow'];
        IsCommercial = json['IsCommercial'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'VisitKey': VisitKey,
        'JobID': JobID,
        'ProjectID': ProjectID,
        'ProjectUID': ProjectUID,
        'AgreementJobID': AgreementJobID,
        'ScheduledDate': ScheduledDate,
        'CustomerName': CustomerName,
        'JobName': JobName,
        'LocationName': LocationName,
        'City': City,
        'Zip': Zip,
        'Lat': Lat,
        'Lng': Lng,
        'CrewID': CrewID,
        'CrewName': CrewName,
        'SortOrder': SortOrder,
        'Status': Status,
        'DurationMinutes': DurationMinutes,
        'EtaWindow': EtaWindow,
        'IsCommercial': IsCommercial
    };

    getTypeName() => "VisitCard";
    TypeContext? context = _ctx;
}

class CrewColumn implements IConvertible
{
    int? CrewID;
    String? CrewName;
    String? CrewColor;
    int? MemberCount;
    List<VisitCard>? Visits = [];
    double? DriveMiles;
    int? DriveMinutes;
    int? OnSiteMinutes;
    int? BillablePct;

    CrewColumn({this.CrewID,this.CrewName,this.CrewColor,this.MemberCount,this.Visits,this.DriveMiles,this.DriveMinutes,this.OnSiteMinutes,this.BillablePct});
    CrewColumn.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CrewID = json['CrewID'];
        CrewName = json['CrewName'];
        CrewColor = json['CrewColor'];
        MemberCount = json['MemberCount'];
        Visits = JsonConverters.fromJson(json['Visits'],'List<VisitCard>',context!);
        DriveMiles = JsonConverters.toDouble(json['DriveMiles']);
        DriveMinutes = json['DriveMinutes'];
        OnSiteMinutes = json['OnSiteMinutes'];
        BillablePct = json['BillablePct'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CrewID': CrewID,
        'CrewName': CrewName,
        'CrewColor': CrewColor,
        'MemberCount': MemberCount,
        'Visits': JsonConverters.toJson(Visits,'List<VisitCard>',context!),
        'DriveMiles': DriveMiles,
        'DriveMinutes': DriveMinutes,
        'OnSiteMinutes': OnSiteMinutes,
        'BillablePct': BillablePct
    };

    getTypeName() => "CrewColumn";
    TypeContext? context = _ctx;
}

class BoardReadiness implements IConvertible
{
    int? TotalVisits;
    int? Assigned;
    int? Unassigned;
    int? Conflicts;
    int? AssignedPct;

    BoardReadiness({this.TotalVisits,this.Assigned,this.Unassigned,this.Conflicts,this.AssignedPct});
    BoardReadiness.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        TotalVisits = json['TotalVisits'];
        Assigned = json['Assigned'];
        Unassigned = json['Unassigned'];
        Conflicts = json['Conflicts'];
        AssignedPct = json['AssignedPct'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'TotalVisits': TotalVisits,
        'Assigned': Assigned,
        'Unassigned': Unassigned,
        'Conflicts': Conflicts,
        'AssignedPct': AssignedPct
    };

    getTypeName() => "BoardReadiness";
    TypeContext? context = _ctx;
}

class VisitBoardResponse implements IConvertible
{
    String? Date;
    List<CrewColumn>? Crews = [];
    List<VisitCard>? Unassigned = [];
    BoardReadiness? Readiness;
    ResponseStatus? ResponseStatus;

    VisitBoardResponse({this.Date,this.Crews,this.Unassigned,this.Readiness,this.ResponseStatus});
    VisitBoardResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Date = json['Date'];
        Crews = JsonConverters.fromJson(json['Crews'],'List<CrewColumn>',context!);
        Unassigned = JsonConverters.fromJson(json['Unassigned'],'List<VisitCard>',context!);
        Readiness = JsonConverters.fromJson(json['Readiness'],'BoardReadiness',context!);
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Date': Date,
        'Crews': JsonConverters.toJson(Crews,'List<CrewColumn>',context!),
        'Unassigned': JsonConverters.toJson(Unassigned,'List<VisitCard>',context!),
        'Readiness': JsonConverters.toJson(Readiness,'BoardReadiness',context!),
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
    };

    getTypeName() => "VisitBoardResponse";
    TypeContext? context = _ctx;
}

class VisitBoardRequest implements IConvertible
{
    String? Date;

    VisitBoardRequest({this.Date});
    VisitBoardRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Date = json['Date'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Date': Date
    };

    getTypeName() => "VisitBoardRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'VisitCard': TypeInfo(TypeOf.Class, create:() => VisitCard()),
    'CrewColumn': TypeInfo(TypeOf.Class, create:() => CrewColumn()),
    'List<VisitCard>': TypeInfo(TypeOf.Class, create:() => <VisitCard>[]),
    'BoardReadiness': TypeInfo(TypeOf.Class, create:() => BoardReadiness()),
    'VisitBoardResponse': TypeInfo(TypeOf.Class, create:() => VisitBoardResponse()),
    'List<CrewColumn>': TypeInfo(TypeOf.Class, create:() => <CrewColumn>[]),
    'VisitBoardRequest': TypeInfo(TypeOf.Class, create:() => VisitBoardRequest()),
});

Dart VisitBoardRequest 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/visits/board HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<VisitBoardResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Crews>
    <CrewColumn>
      <BillablePct>0</BillablePct>
      <CrewColor>String</CrewColor>
      <CrewID>0</CrewID>
      <CrewName>String</CrewName>
      <DriveMiles>0</DriveMiles>
      <DriveMinutes>0</DriveMinutes>
      <MemberCount>0</MemberCount>
      <OnSiteMinutes>0</OnSiteMinutes>
      <Visits>
        <VisitCard>
          <AgreementJobID>0</AgreementJobID>
          <City>String</City>
          <CrewID>0</CrewID>
          <CrewName>String</CrewName>
          <CustomerName>String</CustomerName>
          <DurationMinutes>0</DurationMinutes>
          <EtaWindow>String</EtaWindow>
          <IsCommercial>false</IsCommercial>
          <JobID>0</JobID>
          <JobName>String</JobName>
          <Lat>0</Lat>
          <Lng>0</Lng>
          <LocationName>String</LocationName>
          <ProjectID>0</ProjectID>
          <ProjectUID>String</ProjectUID>
          <ScheduledDate>String</ScheduledDate>
          <SortOrder>0</SortOrder>
          <Status>String</Status>
          <VisitKey>String</VisitKey>
          <Zip>String</Zip>
        </VisitCard>
      </Visits>
    </CrewColumn>
  </Crews>
  <Date>String</Date>
  <Readiness>
    <Assigned>0</Assigned>
    <AssignedPct>0</AssignedPct>
    <Conflicts>0</Conflicts>
    <TotalVisits>0</TotalVisits>
    <Unassigned>0</Unassigned>
  </Readiness>
  <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>
  <Unassigned>
    <VisitCard>
      <AgreementJobID>0</AgreementJobID>
      <City>String</City>
      <CrewID>0</CrewID>
      <CrewName>String</CrewName>
      <CustomerName>String</CustomerName>
      <DurationMinutes>0</DurationMinutes>
      <EtaWindow>String</EtaWindow>
      <IsCommercial>false</IsCommercial>
      <JobID>0</JobID>
      <JobName>String</JobName>
      <Lat>0</Lat>
      <Lng>0</Lng>
      <LocationName>String</LocationName>
      <ProjectID>0</ProjectID>
      <ProjectUID>String</ProjectUID>
      <ScheduledDate>String</ScheduledDate>
      <SortOrder>0</SortOrder>
      <Status>String</Status>
      <VisitKey>String</VisitKey>
      <Zip>String</Zip>
    </VisitCard>
  </Unassigned>
</VisitBoardResponse>