Trendsic Platform Service

<back to all web services

CertifiedPayrollListRequest

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

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 CertifiedPayrollListResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    int? ProjectID;
    List<CertifiedPayroll>? Payrolls = [];

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

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

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

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

class CertifiedPayrollListRequest implements IConvertible
{
    int? ProjectID;

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

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

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

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

Dart CertifiedPayrollListRequest DTOs

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

HTTP + JSV

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

GET /v1/projects/{ProjectID}/certified-payroll HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
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
		}
	},
	ProjectID: 0,
	Payrolls: 
	[
		{
			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
		}
	]
}