| PATCH,PUT,OPTIONS | /v1/projects/{ProjectID}/certified-payroll/{Week} |
|---|
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using CRM.AgencyPlatform.API.Internal;
namespace CRM.AgencyPlatform.API.Internal
{
public partial class CertifiedPayroll
{
public virtual int CertifiedPayrollID { get; set; }
public virtual Guid CertifiedPayrollUID { get; set; }
public virtual int ProjectID { get; set; }
public virtual int PayrollNumber { get; set; }
public virtual DateTime? WeekEnding { get; set; }
public virtual string Status { get; set; }
public virtual decimal DbeParticipationPct { get; set; }
public virtual decimal DbeGoalPct { get; set; }
public virtual decimal OjtApprenticeHours { get; set; }
public virtual decimal OjtApprenticeGoalHours { get; set; }
public virtual int WorkerCount { get; set; }
public virtual decimal TotalHoursST { get; set; }
public virtual decimal TotalHoursOT { get; set; }
public virtual decimal TotalGrossPay { get; set; }
public virtual int FlaggedCount { get; set; }
public virtual string SubmittedBy { get; set; }
public virtual DateTime? SubmittedAt { get; set; }
public virtual string CreatedBy { get; set; }
public virtual DateTime? CreatedAt { get; set; }
public virtual DateTime? UpdatedAt { get; set; }
public virtual List<CertifiedPayrollLine> Lines { get; set; } = [];
public virtual string DeterminationNo { get; set; }
public virtual string DeterminationType { get; set; }
}
public partial class CertifiedPayrollLine
{
public virtual int CertifiedPayrollLineID { get; set; }
public virtual int CertifiedPayrollID { get; set; }
public virtual string WorkerName { get; set; }
public virtual int? ContactID { get; set; }
public virtual string Classification { get; set; }
public virtual decimal HoursST { get; set; }
public virtual decimal HoursOT { get; set; }
public virtual decimal BaseRate { get; set; }
public virtual decimal FringeRate { get; set; }
public virtual decimal FringeCashRate { get; set; }
public virtual decimal FringePlanRate { get; set; }
public virtual decimal GrossPay { get; set; }
public virtual bool Flagged { get; set; }
public virtual decimal RestitutionAmount { get; set; }
public virtual string RestitutionNote { get; set; }
public virtual decimal RequiredBase { get; set; }
public virtual decimal RequiredFringe { get; set; }
public virtual int SortOrder { get; set; }
}
public partial class CertifiedPayrollResponse
{
public virtual ResponseStatus ResponseStatus { get; set; }
public virtual CertifiedPayroll Payroll { get; set; }
}
public partial class CertifiedPayrollUpdateRequest
{
public virtual int ProjectID { get; set; }
public virtual string Week { get; set; }
public virtual decimal? DbeParticipationPct { get; set; }
public virtual decimal? DbeGoalPct { get; set; }
public virtual decimal? OjtApprenticeHours { get; set; }
public virtual decimal? OjtApprenticeGoalHours { get; set; }
public virtual List<CertifiedPayrollLine> Lines { get; set; } = [];
public virtual bool SeedFromTime { get; set; }
}
}
C# CertifiedPayrollUpdateRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /v1/projects/{ProjectID}/certified-payroll/{Week} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CertifiedPayrollUpdateRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<DbeGoalPct>0</DbeGoalPct>
<DbeParticipationPct>0</DbeParticipationPct>
<Lines>
<CertifiedPayrollLine>
<BaseRate>0</BaseRate>
<CertifiedPayrollID>0</CertifiedPayrollID>
<CertifiedPayrollLineID>0</CertifiedPayrollLineID>
<Classification>String</Classification>
<ContactID>0</ContactID>
<Flagged>false</Flagged>
<FringeCashRate>0</FringeCashRate>
<FringePlanRate>0</FringePlanRate>
<FringeRate>0</FringeRate>
<GrossPay>0</GrossPay>
<HoursOT>0</HoursOT>
<HoursST>0</HoursST>
<RequiredBase>0</RequiredBase>
<RequiredFringe>0</RequiredFringe>
<RestitutionAmount>0</RestitutionAmount>
<RestitutionNote>String</RestitutionNote>
<SortOrder>0</SortOrder>
<WorkerName>String</WorkerName>
</CertifiedPayrollLine>
</Lines>
<OjtApprenticeGoalHours>0</OjtApprenticeGoalHours>
<OjtApprenticeHours>0</OjtApprenticeHours>
<ProjectID>0</ProjectID>
<SeedFromTime>false</SeedFromTime>
<Week>String</Week>
</CertifiedPayrollUpdateRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<CertifiedPayrollResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Payroll>
<CertifiedPayrollID>0</CertifiedPayrollID>
<CertifiedPayrollUID>00000000-0000-0000-0000-000000000000</CertifiedPayrollUID>
<CreatedAt>0001-01-01T00:00:00</CreatedAt>
<CreatedBy>String</CreatedBy>
<DbeGoalPct>0</DbeGoalPct>
<DbeParticipationPct>0</DbeParticipationPct>
<DeterminationNo>String</DeterminationNo>
<DeterminationType>String</DeterminationType>
<FlaggedCount>0</FlaggedCount>
<Lines>
<CertifiedPayrollLine>
<BaseRate>0</BaseRate>
<CertifiedPayrollID>0</CertifiedPayrollID>
<CertifiedPayrollLineID>0</CertifiedPayrollLineID>
<Classification>String</Classification>
<ContactID>0</ContactID>
<Flagged>false</Flagged>
<FringeCashRate>0</FringeCashRate>
<FringePlanRate>0</FringePlanRate>
<FringeRate>0</FringeRate>
<GrossPay>0</GrossPay>
<HoursOT>0</HoursOT>
<HoursST>0</HoursST>
<RequiredBase>0</RequiredBase>
<RequiredFringe>0</RequiredFringe>
<RestitutionAmount>0</RestitutionAmount>
<RestitutionNote>String</RestitutionNote>
<SortOrder>0</SortOrder>
<WorkerName>String</WorkerName>
</CertifiedPayrollLine>
</Lines>
<OjtApprenticeGoalHours>0</OjtApprenticeGoalHours>
<OjtApprenticeHours>0</OjtApprenticeHours>
<PayrollNumber>0</PayrollNumber>
<ProjectID>0</ProjectID>
<Status>String</Status>
<SubmittedAt>0001-01-01T00:00:00</SubmittedAt>
<SubmittedBy>String</SubmittedBy>
<TotalGrossPay>0</TotalGrossPay>
<TotalHoursOT>0</TotalHoursOT>
<TotalHoursST>0</TotalHoursST>
<UpdatedAt>0001-01-01T00:00:00</UpdatedAt>
<WeekEnding>0001-01-01T00:00:00</WeekEnding>
<WorkerCount>0</WorkerCount>
</Payroll>
<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>
</CertifiedPayrollResponse>