Trendsic Platform Service

<back to all web services

PayApplicationCertifyRequest

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

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 PayApplicationResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    PayApplication? Application;

    PayApplicationResponse({this.ResponseStatus,this.Application});
    PayApplicationResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class PayApplicationCertifyRequest implements IConvertible
{
    int? ProjectID;
    int? PeriodNumber;

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

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

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

    getTypeName() => "PayApplicationCertifyRequest";
    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>[]),
    'PayApplicationResponse': TypeInfo(TypeOf.Class, create:() => PayApplicationResponse()),
    'PayApplicationCertifyRequest': TypeInfo(TypeOf.Class, create:() => PayApplicationCertifyRequest()),
});

Dart PayApplicationCertifyRequest 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.

POST /v1/projects/{ProjectID}/pay-apps/{PeriodNumber}/certify HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<PayApplicationCertifyRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <PeriodNumber>0</PeriodNumber>
  <ProjectID>0</ProjectID>
</PayApplicationCertifyRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<PayApplicationResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Application>
    <BalanceToFinish>0</BalanceToFinish>
    <BillingTemplate>String</BillingTemplate>
    <CertifiedAt>0001-01-01T00:00:00</CertifiedAt>
    <CertifiedBy>String</CertifiedBy>
    <CompletedStoredToDate>0</CompletedStoredToDate>
    <ContractSumToDate>0</ContractSumToDate>
    <CreatedAt>0001-01-01T00:00:00</CreatedAt>
    <CreatedBy>String</CreatedBy>
    <CurrentPaymentDue>0</CurrentPaymentDue>
    <EarnedLessRetainage>0</EarnedLessRetainage>
    <InvoiceID>0</InvoiceID>
    <LessPreviousCertificates>0</LessPreviousCertificates>
    <Lines>
      <PayApplicationLine>
        <ChangeOrderID>0</ChangeOrderID>
        <CostCode>String</CostCode>
        <Description>String</Description>
        <FromPreviousPct>0</FromPreviousPct>
        <IsChangeOrder>false</IsChangeOrder>
        <PayApplicationID>0</PayApplicationID>
        <PayApplicationLineID>0</PayApplicationLineID>
        <ScheduledValue>0</ScheduledValue>
        <SortOrder>0</SortOrder>
        <StoredMaterials>0</StoredMaterials>
        <ThisPeriodPct>0</ThisPeriodPct>
      </PayApplicationLine>
    </Lines>
    <NetChangeByCO>0</NetChangeByCO>
    <OriginalContractSum>0</OriginalContractSum>
    <PayApplicationID>0</PayApplicationID>
    <PayApplicationUID>00000000-0000-0000-0000-000000000000</PayApplicationUID>
    <PeriodEnd>0001-01-01T00:00:00</PeriodEnd>
    <PeriodNumber>0</PeriodNumber>
    <PeriodStart>0001-01-01T00:00:00</PeriodStart>
    <ProjectID>0</ProjectID>
    <RetainageAmount>0</RetainageAmount>
    <RetainagePct>0</RetainagePct>
    <Status>String</Status>
    <UpdatedAt>0001-01-01T00:00:00</UpdatedAt>
  </Application>
  <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>
</PayApplicationResponse>