| POST,OPTIONS | /v1/projects/{ProjectID}/certified-payroll/{Week}/submit |
|---|
import 'package:servicestack/servicestack.dart';
class CertifiedPayrollLine implements IConvertible
{
int? CertifiedPayrollLineID;
int? CertifiedPayrollID;
String? WorkerName;
int? ContactID;
String? Classification;
double? HoursST;
double? HoursOT;
double? BaseRate;
double? FringeRate;
double? FringeCashRate;
double? FringePlanRate;
double? GrossPay;
bool? Flagged;
double? RestitutionAmount;
String? RestitutionNote;
double? RequiredBase;
double? RequiredFringe;
int? SortOrder;
CertifiedPayrollLine({this.CertifiedPayrollLineID,this.CertifiedPayrollID,this.WorkerName,this.ContactID,this.Classification,this.HoursST,this.HoursOT,this.BaseRate,this.FringeRate,this.FringeCashRate,this.FringePlanRate,this.GrossPay,this.Flagged,this.RestitutionAmount,this.RestitutionNote,this.RequiredBase,this.RequiredFringe,this.SortOrder});
CertifiedPayrollLine.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CertifiedPayrollLineID = json['CertifiedPayrollLineID'];
CertifiedPayrollID = json['CertifiedPayrollID'];
WorkerName = json['WorkerName'];
ContactID = json['ContactID'];
Classification = json['Classification'];
HoursST = JsonConverters.toDouble(json['HoursST']);
HoursOT = JsonConverters.toDouble(json['HoursOT']);
BaseRate = JsonConverters.toDouble(json['BaseRate']);
FringeRate = JsonConverters.toDouble(json['FringeRate']);
FringeCashRate = JsonConverters.toDouble(json['FringeCashRate']);
FringePlanRate = JsonConverters.toDouble(json['FringePlanRate']);
GrossPay = JsonConverters.toDouble(json['GrossPay']);
Flagged = json['Flagged'];
RestitutionAmount = JsonConverters.toDouble(json['RestitutionAmount']);
RestitutionNote = json['RestitutionNote'];
RequiredBase = JsonConverters.toDouble(json['RequiredBase']);
RequiredFringe = JsonConverters.toDouble(json['RequiredFringe']);
SortOrder = json['SortOrder'];
return this;
}
Map<String, dynamic> toJson() => {
'CertifiedPayrollLineID': CertifiedPayrollLineID,
'CertifiedPayrollID': CertifiedPayrollID,
'WorkerName': WorkerName,
'ContactID': ContactID,
'Classification': Classification,
'HoursST': HoursST,
'HoursOT': HoursOT,
'BaseRate': BaseRate,
'FringeRate': FringeRate,
'FringeCashRate': FringeCashRate,
'FringePlanRate': FringePlanRate,
'GrossPay': GrossPay,
'Flagged': Flagged,
'RestitutionAmount': RestitutionAmount,
'RestitutionNote': RestitutionNote,
'RequiredBase': RequiredBase,
'RequiredFringe': RequiredFringe,
'SortOrder': SortOrder
};
getTypeName() => "CertifiedPayrollLine";
TypeContext? context = _ctx;
}
class CertifiedPayroll implements IConvertible
{
int? CertifiedPayrollID;
String? CertifiedPayrollUID;
int? ProjectID;
int? PayrollNumber;
DateTime? WeekEnding;
String? Status;
double? DbeParticipationPct;
double? DbeGoalPct;
double? OjtApprenticeHours;
double? OjtApprenticeGoalHours;
int? WorkerCount;
double? TotalHoursST;
double? TotalHoursOT;
double? TotalGrossPay;
int? FlaggedCount;
String? SubmittedBy;
DateTime? SubmittedAt;
String? CreatedBy;
DateTime? CreatedAt;
DateTime? UpdatedAt;
List<CertifiedPayrollLine>? Lines = [];
String? DeterminationNo;
String? DeterminationType;
CertifiedPayroll({this.CertifiedPayrollID,this.CertifiedPayrollUID,this.ProjectID,this.PayrollNumber,this.WeekEnding,this.Status,this.DbeParticipationPct,this.DbeGoalPct,this.OjtApprenticeHours,this.OjtApprenticeGoalHours,this.WorkerCount,this.TotalHoursST,this.TotalHoursOT,this.TotalGrossPay,this.FlaggedCount,this.SubmittedBy,this.SubmittedAt,this.CreatedBy,this.CreatedAt,this.UpdatedAt,this.Lines,this.DeterminationNo,this.DeterminationType});
CertifiedPayroll.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CertifiedPayrollID = json['CertifiedPayrollID'];
CertifiedPayrollUID = json['CertifiedPayrollUID'];
ProjectID = json['ProjectID'];
PayrollNumber = json['PayrollNumber'];
WeekEnding = JsonConverters.fromJson(json['WeekEnding'],'DateTime',context!);
Status = json['Status'];
DbeParticipationPct = JsonConverters.toDouble(json['DbeParticipationPct']);
DbeGoalPct = JsonConverters.toDouble(json['DbeGoalPct']);
OjtApprenticeHours = JsonConverters.toDouble(json['OjtApprenticeHours']);
OjtApprenticeGoalHours = JsonConverters.toDouble(json['OjtApprenticeGoalHours']);
WorkerCount = json['WorkerCount'];
TotalHoursST = JsonConverters.toDouble(json['TotalHoursST']);
TotalHoursOT = JsonConverters.toDouble(json['TotalHoursOT']);
TotalGrossPay = JsonConverters.toDouble(json['TotalGrossPay']);
FlaggedCount = json['FlaggedCount'];
SubmittedBy = json['SubmittedBy'];
SubmittedAt = JsonConverters.fromJson(json['SubmittedAt'],'DateTime',context!);
CreatedBy = json['CreatedBy'];
CreatedAt = JsonConverters.fromJson(json['CreatedAt'],'DateTime',context!);
UpdatedAt = JsonConverters.fromJson(json['UpdatedAt'],'DateTime',context!);
Lines = JsonConverters.fromJson(json['Lines'],'List<CertifiedPayrollLine>',context!);
DeterminationNo = json['DeterminationNo'];
DeterminationType = json['DeterminationType'];
return this;
}
Map<String, dynamic> toJson() => {
'CertifiedPayrollID': CertifiedPayrollID,
'CertifiedPayrollUID': CertifiedPayrollUID,
'ProjectID': ProjectID,
'PayrollNumber': PayrollNumber,
'WeekEnding': JsonConverters.toJson(WeekEnding,'DateTime',context!),
'Status': Status,
'DbeParticipationPct': DbeParticipationPct,
'DbeGoalPct': DbeGoalPct,
'OjtApprenticeHours': OjtApprenticeHours,
'OjtApprenticeGoalHours': OjtApprenticeGoalHours,
'WorkerCount': WorkerCount,
'TotalHoursST': TotalHoursST,
'TotalHoursOT': TotalHoursOT,
'TotalGrossPay': TotalGrossPay,
'FlaggedCount': FlaggedCount,
'SubmittedBy': SubmittedBy,
'SubmittedAt': JsonConverters.toJson(SubmittedAt,'DateTime',context!),
'CreatedBy': CreatedBy,
'CreatedAt': JsonConverters.toJson(CreatedAt,'DateTime',context!),
'UpdatedAt': JsonConverters.toJson(UpdatedAt,'DateTime',context!),
'Lines': JsonConverters.toJson(Lines,'List<CertifiedPayrollLine>',context!),
'DeterminationNo': DeterminationNo,
'DeterminationType': DeterminationType
};
getTypeName() => "CertifiedPayroll";
TypeContext? context = _ctx;
}
class CertifiedPayrollResponse implements IConvertible
{
ResponseStatus? ResponseStatus;
CertifiedPayroll? Payroll;
CertifiedPayrollResponse({this.ResponseStatus,this.Payroll});
CertifiedPayrollResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
Payroll = JsonConverters.fromJson(json['Payroll'],'CertifiedPayroll',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
'Payroll': JsonConverters.toJson(Payroll,'CertifiedPayroll',context!)
};
getTypeName() => "CertifiedPayrollResponse";
TypeContext? context = _ctx;
}
class CertifiedPayrollSubmitRequest implements IConvertible
{
int? ProjectID;
String? Week;
CertifiedPayrollSubmitRequest({this.ProjectID,this.Week});
CertifiedPayrollSubmitRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ProjectID = json['ProjectID'];
Week = json['Week'];
return this;
}
Map<String, dynamic> toJson() => {
'ProjectID': ProjectID,
'Week': Week
};
getTypeName() => "CertifiedPayrollSubmitRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'CertifiedPayrollLine': TypeInfo(TypeOf.Class, create:() => CertifiedPayrollLine()),
'CertifiedPayroll': TypeInfo(TypeOf.Class, create:() => CertifiedPayroll()),
'List<CertifiedPayrollLine>': TypeInfo(TypeOf.Class, create:() => <CertifiedPayrollLine>[]),
'CertifiedPayrollResponse': TypeInfo(TypeOf.Class, create:() => CertifiedPayrollResponse()),
'CertifiedPayrollSubmitRequest': TypeInfo(TypeOf.Class, create:() => CertifiedPayrollSubmitRequest()),
});
Dart CertifiedPayrollSubmitRequest 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.
POST /v1/projects/{ProjectID}/certified-payroll/{Week}/submit HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CertifiedPayrollSubmitRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<ProjectID>0</ProjectID>
<Week>String</Week>
</CertifiedPayrollSubmitRequest>
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>