Trendsic Platform Service

<back to all web services

PayApplicationListRequest

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

class PayApplicationLine implements IConvertible
{
    int? PayApplicationLineID;
    int? PayApplicationID;
    String? CostCode;
    String? Description;
    double? ScheduledValue;
    double? FromPreviousPct;
    double? ThisPeriodPct;
    double? StoredMaterials;
    bool? IsChangeOrder;
    int? ChangeOrderID;
    int? SortOrder;

    PayApplicationLine({this.PayApplicationLineID,this.PayApplicationID,this.CostCode,this.Description,this.ScheduledValue,this.FromPreviousPct,this.ThisPeriodPct,this.StoredMaterials,this.IsChangeOrder,this.ChangeOrderID,this.SortOrder});
    PayApplicationLine.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        PayApplicationLineID = json['PayApplicationLineID'];
        PayApplicationID = json['PayApplicationID'];
        CostCode = json['CostCode'];
        Description = json['Description'];
        ScheduledValue = JsonConverters.toDouble(json['ScheduledValue']);
        FromPreviousPct = JsonConverters.toDouble(json['FromPreviousPct']);
        ThisPeriodPct = JsonConverters.toDouble(json['ThisPeriodPct']);
        StoredMaterials = JsonConverters.toDouble(json['StoredMaterials']);
        IsChangeOrder = json['IsChangeOrder'];
        ChangeOrderID = json['ChangeOrderID'];
        SortOrder = json['SortOrder'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'PayApplicationLineID': PayApplicationLineID,
        'PayApplicationID': PayApplicationID,
        'CostCode': CostCode,
        'Description': Description,
        'ScheduledValue': ScheduledValue,
        'FromPreviousPct': FromPreviousPct,
        'ThisPeriodPct': ThisPeriodPct,
        'StoredMaterials': StoredMaterials,
        'IsChangeOrder': IsChangeOrder,
        'ChangeOrderID': ChangeOrderID,
        'SortOrder': SortOrder
    };

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

class PayApplication implements IConvertible
{
    int? PayApplicationID;
    String? PayApplicationUID;
    int? ProjectID;
    int? PeriodNumber;
    DateTime? PeriodStart;
    DateTime? PeriodEnd;
    String? Status;
    String? BillingTemplate;
    double? RetainagePct;
    double? OriginalContractSum;
    double? NetChangeByCO;
    double? ContractSumToDate;
    double? CompletedStoredToDate;
    double? RetainageAmount;
    double? EarnedLessRetainage;
    double? LessPreviousCertificates;
    double? CurrentPaymentDue;
    double? BalanceToFinish;
    int? InvoiceID;
    DateTime? CertifiedAt;
    String? CertifiedBy;
    String? CreatedBy;
    DateTime? CreatedAt;
    DateTime? UpdatedAt;
    List<PayApplicationLine>? Lines = [];

    PayApplication({this.PayApplicationID,this.PayApplicationUID,this.ProjectID,this.PeriodNumber,this.PeriodStart,this.PeriodEnd,this.Status,this.BillingTemplate,this.RetainagePct,this.OriginalContractSum,this.NetChangeByCO,this.ContractSumToDate,this.CompletedStoredToDate,this.RetainageAmount,this.EarnedLessRetainage,this.LessPreviousCertificates,this.CurrentPaymentDue,this.BalanceToFinish,this.InvoiceID,this.CertifiedAt,this.CertifiedBy,this.CreatedBy,this.CreatedAt,this.UpdatedAt,this.Lines});
    PayApplication.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        PayApplicationID = json['PayApplicationID'];
        PayApplicationUID = json['PayApplicationUID'];
        ProjectID = json['ProjectID'];
        PeriodNumber = json['PeriodNumber'];
        PeriodStart = JsonConverters.fromJson(json['PeriodStart'],'DateTime',context!);
        PeriodEnd = JsonConverters.fromJson(json['PeriodEnd'],'DateTime',context!);
        Status = json['Status'];
        BillingTemplate = json['BillingTemplate'];
        RetainagePct = JsonConverters.toDouble(json['RetainagePct']);
        OriginalContractSum = JsonConverters.toDouble(json['OriginalContractSum']);
        NetChangeByCO = JsonConverters.toDouble(json['NetChangeByCO']);
        ContractSumToDate = JsonConverters.toDouble(json['ContractSumToDate']);
        CompletedStoredToDate = JsonConverters.toDouble(json['CompletedStoredToDate']);
        RetainageAmount = JsonConverters.toDouble(json['RetainageAmount']);
        EarnedLessRetainage = JsonConverters.toDouble(json['EarnedLessRetainage']);
        LessPreviousCertificates = JsonConverters.toDouble(json['LessPreviousCertificates']);
        CurrentPaymentDue = JsonConverters.toDouble(json['CurrentPaymentDue']);
        BalanceToFinish = JsonConverters.toDouble(json['BalanceToFinish']);
        InvoiceID = json['InvoiceID'];
        CertifiedAt = JsonConverters.fromJson(json['CertifiedAt'],'DateTime',context!);
        CertifiedBy = json['CertifiedBy'];
        CreatedBy = json['CreatedBy'];
        CreatedAt = JsonConverters.fromJson(json['CreatedAt'],'DateTime',context!);
        UpdatedAt = JsonConverters.fromJson(json['UpdatedAt'],'DateTime',context!);
        Lines = JsonConverters.fromJson(json['Lines'],'List<PayApplicationLine>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'PayApplicationID': PayApplicationID,
        'PayApplicationUID': PayApplicationUID,
        'ProjectID': ProjectID,
        'PeriodNumber': PeriodNumber,
        'PeriodStart': JsonConverters.toJson(PeriodStart,'DateTime',context!),
        'PeriodEnd': JsonConverters.toJson(PeriodEnd,'DateTime',context!),
        'Status': Status,
        'BillingTemplate': BillingTemplate,
        'RetainagePct': RetainagePct,
        'OriginalContractSum': OriginalContractSum,
        'NetChangeByCO': NetChangeByCO,
        'ContractSumToDate': ContractSumToDate,
        'CompletedStoredToDate': CompletedStoredToDate,
        'RetainageAmount': RetainageAmount,
        'EarnedLessRetainage': EarnedLessRetainage,
        'LessPreviousCertificates': LessPreviousCertificates,
        'CurrentPaymentDue': CurrentPaymentDue,
        'BalanceToFinish': BalanceToFinish,
        'InvoiceID': InvoiceID,
        'CertifiedAt': JsonConverters.toJson(CertifiedAt,'DateTime',context!),
        'CertifiedBy': CertifiedBy,
        'CreatedBy': CreatedBy,
        'CreatedAt': JsonConverters.toJson(CreatedAt,'DateTime',context!),
        'UpdatedAt': JsonConverters.toJson(UpdatedAt,'DateTime',context!),
        'Lines': JsonConverters.toJson(Lines,'List<PayApplicationLine>',context!)
    };

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

class PayApplicationListResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    int? ProjectID;
    List<PayApplication>? Applications = [];

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

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

    Map<String, dynamic> toJson() => {
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
        'ProjectID': ProjectID,
        'Applications': JsonConverters.toJson(Applications,'List<PayApplication>',context!)
    };

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

class PayApplicationListRequest implements IConvertible
{
    int? ProjectID;

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

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

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

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

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'PayApplicationLine': TypeInfo(TypeOf.Class, create:() => PayApplicationLine()),
    'PayApplication': TypeInfo(TypeOf.Class, create:() => PayApplication()),
    'List<PayApplicationLine>': TypeInfo(TypeOf.Class, create:() => <PayApplicationLine>[]),
    'PayApplicationListResponse': TypeInfo(TypeOf.Class, create:() => PayApplicationListResponse()),
    'List<PayApplication>': TypeInfo(TypeOf.Class, create:() => <PayApplication>[]),
    'PayApplicationListRequest': TypeInfo(TypeOf.Class, create:() => PayApplicationListRequest()),
});

Dart PayApplicationListRequest DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

GET /v1/projects/{ProjectID}/pay-apps HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"ProjectID":0,"Applications":[{"PayApplicationID":0,"PayApplicationUID":"00000000000000000000000000000000","ProjectID":0,"PeriodNumber":0,"PeriodStart":"0001-01-01T00:00:00.0000000","PeriodEnd":"0001-01-01T00:00:00.0000000","Status":"String","BillingTemplate":"String","RetainagePct":0,"OriginalContractSum":0,"NetChangeByCO":0,"ContractSumToDate":0,"CompletedStoredToDate":0,"RetainageAmount":0,"EarnedLessRetainage":0,"LessPreviousCertificates":0,"CurrentPaymentDue":0,"BalanceToFinish":0,"InvoiceID":0,"CertifiedAt":"0001-01-01T00:00:00.0000000","CertifiedBy":"String","CreatedBy":"String","CreatedAt":"0001-01-01T00:00:00.0000000","UpdatedAt":"0001-01-01T00:00:00.0000000","Lines":[{"PayApplicationLineID":0,"PayApplicationID":0,"CostCode":"String","Description":"String","ScheduledValue":0,"FromPreviousPct":0,"ThisPeriodPct":0,"StoredMaterials":0,"IsChangeOrder":false,"ChangeOrderID":0,"SortOrder":0}]}]}