Trendsic Platform Service

<back to all web services

PunchListRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/projects/{ProjectID}/punch
import 'package:servicestack/servicestack.dart';

class PunchItem implements IConvertible
{
    int? PunchItemID;
    String? PunchItemUID;
    int? ProjectID;
    String? PunchNo;
    String? Title;
    String? Description;
    String? Area;
    String? Trade;
    String? Status;
    String? Priority;
    String? AssignedSub;
    String? AssignedTo;
    int? AssignedSubContactID;
    int? PhotoCount;
    String? OriginType;
    String? OriginRef;
    DateTime? OpenedAt;
    DateTime? VerifiedAt;
    DateTime? ClosedAt;
    String? CreatedBy;
    DateTime? CreatedAt;
    DateTime? UpdatedAt;

    PunchItem({this.PunchItemID,this.PunchItemUID,this.ProjectID,this.PunchNo,this.Title,this.Description,this.Area,this.Trade,this.Status,this.Priority,this.AssignedSub,this.AssignedTo,this.AssignedSubContactID,this.PhotoCount,this.OriginType,this.OriginRef,this.OpenedAt,this.VerifiedAt,this.ClosedAt,this.CreatedBy,this.CreatedAt,this.UpdatedAt});
    PunchItem.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        PunchItemID = json['PunchItemID'];
        PunchItemUID = json['PunchItemUID'];
        ProjectID = json['ProjectID'];
        PunchNo = json['PunchNo'];
        Title = json['Title'];
        Description = json['Description'];
        Area = json['Area'];
        Trade = json['Trade'];
        Status = json['Status'];
        Priority = json['Priority'];
        AssignedSub = json['AssignedSub'];
        AssignedTo = json['AssignedTo'];
        AssignedSubContactID = json['AssignedSubContactID'];
        PhotoCount = json['PhotoCount'];
        OriginType = json['OriginType'];
        OriginRef = json['OriginRef'];
        OpenedAt = JsonConverters.fromJson(json['OpenedAt'],'DateTime',context!);
        VerifiedAt = JsonConverters.fromJson(json['VerifiedAt'],'DateTime',context!);
        ClosedAt = JsonConverters.fromJson(json['ClosedAt'],'DateTime',context!);
        CreatedBy = json['CreatedBy'];
        CreatedAt = JsonConverters.fromJson(json['CreatedAt'],'DateTime',context!);
        UpdatedAt = JsonConverters.fromJson(json['UpdatedAt'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'PunchItemID': PunchItemID,
        'PunchItemUID': PunchItemUID,
        'ProjectID': ProjectID,
        'PunchNo': PunchNo,
        'Title': Title,
        'Description': Description,
        'Area': Area,
        'Trade': Trade,
        'Status': Status,
        'Priority': Priority,
        'AssignedSub': AssignedSub,
        'AssignedTo': AssignedTo,
        'AssignedSubContactID': AssignedSubContactID,
        'PhotoCount': PhotoCount,
        'OriginType': OriginType,
        'OriginRef': OriginRef,
        'OpenedAt': JsonConverters.toJson(OpenedAt,'DateTime',context!),
        'VerifiedAt': JsonConverters.toJson(VerifiedAt,'DateTime',context!),
        'ClosedAt': JsonConverters.toJson(ClosedAt,'DateTime',context!),
        'CreatedBy': CreatedBy,
        'CreatedAt': JsonConverters.toJson(CreatedAt,'DateTime',context!),
        'UpdatedAt': JsonConverters.toJson(UpdatedAt,'DateTime',context!)
    };

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

class PunchSummary implements IConvertible
{
    int? ProjectID;
    int? TotalItems;
    int? OpenCount;
    int? VerifyCount;
    int? ClosedCount;
    int? RejectedCount;
    int? PercentComplete;

    PunchSummary({this.ProjectID,this.TotalItems,this.OpenCount,this.VerifyCount,this.ClosedCount,this.RejectedCount,this.PercentComplete});
    PunchSummary.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ProjectID = json['ProjectID'];
        TotalItems = json['TotalItems'];
        OpenCount = json['OpenCount'];
        VerifyCount = json['VerifyCount'];
        ClosedCount = json['ClosedCount'];
        RejectedCount = json['RejectedCount'];
        PercentComplete = json['PercentComplete'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ProjectID': ProjectID,
        'TotalItems': TotalItems,
        'OpenCount': OpenCount,
        'VerifyCount': VerifyCount,
        'ClosedCount': ClosedCount,
        'RejectedCount': RejectedCount,
        'PercentComplete': PercentComplete
    };

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

class PunchListResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    int? ProjectID;
    List<PunchItem>? Items = [];
    PunchSummary? Summary;

    PunchListResponse({this.ResponseStatus,this.ProjectID,this.Items,this.Summary});
    PunchListResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        ProjectID = json['ProjectID'];
        Items = JsonConverters.fromJson(json['Items'],'List<PunchItem>',context!);
        Summary = JsonConverters.fromJson(json['Summary'],'PunchSummary',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
        'ProjectID': ProjectID,
        'Items': JsonConverters.toJson(Items,'List<PunchItem>',context!),
        'Summary': JsonConverters.toJson(Summary,'PunchSummary',context!)
    };

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

class PunchListRequest implements IConvertible
{
    int? ProjectID;

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

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

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

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

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'PunchItem': TypeInfo(TypeOf.Class, create:() => PunchItem()),
    'PunchSummary': TypeInfo(TypeOf.Class, create:() => PunchSummary()),
    'PunchListResponse': TypeInfo(TypeOf.Class, create:() => PunchListResponse()),
    'List<PunchItem>': TypeInfo(TypeOf.Class, create:() => <PunchItem>[]),
    'PunchListRequest': TypeInfo(TypeOf.Class, create:() => PunchListRequest()),
});

Dart PunchListRequest 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/projects/{ProjectID}/punch HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<PunchListResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Items>
    <PunchItem>
      <Area>String</Area>
      <AssignedSub>String</AssignedSub>
      <AssignedSubContactID>0</AssignedSubContactID>
      <AssignedTo>String</AssignedTo>
      <ClosedAt>0001-01-01T00:00:00</ClosedAt>
      <CreatedAt>0001-01-01T00:00:00</CreatedAt>
      <CreatedBy>String</CreatedBy>
      <Description>String</Description>
      <OpenedAt>0001-01-01T00:00:00</OpenedAt>
      <OriginRef>String</OriginRef>
      <OriginType>String</OriginType>
      <PhotoCount>0</PhotoCount>
      <Priority>String</Priority>
      <ProjectID>0</ProjectID>
      <PunchItemID>0</PunchItemID>
      <PunchItemUID>00000000-0000-0000-0000-000000000000</PunchItemUID>
      <PunchNo>String</PunchNo>
      <Status>String</Status>
      <Title>String</Title>
      <Trade>String</Trade>
      <UpdatedAt>0001-01-01T00:00:00</UpdatedAt>
      <VerifiedAt>0001-01-01T00:00:00</VerifiedAt>
    </PunchItem>
  </Items>
  <ProjectID>0</ProjectID>
  <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>
  <Summary>
    <ClosedCount>0</ClosedCount>
    <OpenCount>0</OpenCount>
    <PercentComplete>0</PercentComplete>
    <ProjectID>0</ProjectID>
    <RejectedCount>0</RejectedCount>
    <TotalItems>0</TotalItems>
    <VerifyCount>0</VerifyCount>
  </Summary>
</PunchListResponse>