| PATCH,PUT,OPTIONS | /v1/projects/{ProjectID}/certified-payroll/{Week} |
|---|
import Foundation
import ServiceStack
public class CertifiedPayrollUpdateRequest : Codable
{
public var projectID:Int
public var week:String
public var dbeParticipationPct:Double?
public var dbeGoalPct:Double?
public var ojtApprenticeHours:Double?
public var ojtApprenticeGoalHours:Double?
public var lines:[CertifiedPayrollLine] = []
public var seedFromTime:Bool
required public init(){}
}
public class CertifiedPayrollLine : Codable
{
public var certifiedPayrollLineID:Int
public var certifiedPayrollID:Int
public var workerName:String
public var contactID:Int?
public var classification:String
public var hoursST:Double
public var hoursOT:Double
public var baseRate:Double
public var fringeRate:Double
public var fringeCashRate:Double
public var fringePlanRate:Double
public var grossPay:Double
public var flagged:Bool
public var restitutionAmount:Double
public var restitutionNote:String
public var requiredBase:Double
public var requiredFringe:Double
public var sortOrder:Int
required public init(){}
}
public class CertifiedPayrollResponse : Codable
{
public var responseStatus:ResponseStatus
public var payroll:CertifiedPayroll
required public init(){}
}
public class CertifiedPayroll : Codable
{
public var certifiedPayrollID:Int
public var certifiedPayrollUID:String
public var projectID:Int
public var payrollNumber:Int
public var weekEnding:Date?
public var status:String
public var dbeParticipationPct:Double
public var dbeGoalPct:Double
public var ojtApprenticeHours:Double
public var ojtApprenticeGoalHours:Double
public var workerCount:Int
public var totalHoursST:Double
public var totalHoursOT:Double
public var totalGrossPay:Double
public var flaggedCount:Int
public var submittedBy:String
public var submittedAt:Date?
public var createdBy:String
public var createdAt:Date?
public var updatedAt:Date?
public var lines:[CertifiedPayrollLine] = []
public var determinationNo:String
public var determinationType:String
required public init(){}
}
Swift CertifiedPayrollUpdateRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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: text/jsv
Content-Type: text/jsv
Content-Length: length
{
ProjectID: 0,
Week: String,
DbeParticipationPct: 0,
DbeGoalPct: 0,
OjtApprenticeHours: 0,
OjtApprenticeGoalHours: 0,
Lines:
[
{
CertifiedPayrollLineID: 0,
CertifiedPayrollID: 0,
WorkerName: String,
ContactID: 0,
Classification: String,
HoursST: 0,
HoursOT: 0,
BaseRate: 0,
FringeRate: 0,
FringeCashRate: 0,
FringePlanRate: 0,
GrossPay: 0,
Flagged: False,
RestitutionAmount: 0,
RestitutionNote: String,
RequiredBase: 0,
RequiredFringe: 0,
SortOrder: 0
}
],
SeedFromTime: False
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
},
Payroll:
{
CertifiedPayrollID: 0,
CertifiedPayrollUID: 00000000000000000000000000000000,
ProjectID: 0,
PayrollNumber: 0,
WeekEnding: 0001-01-01,
Status: String,
DbeParticipationPct: 0,
DbeGoalPct: 0,
OjtApprenticeHours: 0,
OjtApprenticeGoalHours: 0,
WorkerCount: 0,
TotalHoursST: 0,
TotalHoursOT: 0,
TotalGrossPay: 0,
FlaggedCount: 0,
SubmittedBy: String,
SubmittedAt: 0001-01-01,
CreatedBy: String,
CreatedAt: 0001-01-01,
UpdatedAt: 0001-01-01,
Lines:
[
{
CertifiedPayrollLineID: 0,
CertifiedPayrollID: 0,
WorkerName: String,
ContactID: 0,
Classification: String,
HoursST: 0,
HoursOT: 0,
BaseRate: 0,
FringeRate: 0,
FringeCashRate: 0,
FringePlanRate: 0,
GrossPay: 0,
Flagged: False,
RestitutionAmount: 0,
RestitutionNote: String,
RequiredBase: 0,
RequiredFringe: 0,
SortOrder: 0
}
],
DeterminationNo: String,
DeterminationType: String
}
}