Trendsic Platform Service

<back to all web services

CoverageSelfTimeOffGetRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/coverage/self/timeoff
import 'package:servicestack/servicestack.dart';

class CoverageSelfTimeOffRow implements IConvertible
{
    int? WorkerTimeOffID;
    String? Label;
    String? Status;

    CoverageSelfTimeOffRow({this.WorkerTimeOffID,this.Label,this.Status});
    CoverageSelfTimeOffRow.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'WorkerTimeOffID': WorkerTimeOffID,
        'Label': Label,
        'Status': Status
    };

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

class CoverageSelfTimeOffResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    List<CoverageSelfTimeOffRow>? Rows = [];

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

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

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

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

class CoverageSelfTimeOffGetRequest implements IConvertible
{
    CoverageSelfTimeOffGetRequest();
    CoverageSelfTimeOffGetRequest.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "CoverageSelfTimeOffGetRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'CoverageSelfTimeOffRow': TypeInfo(TypeOf.Class, create:() => CoverageSelfTimeOffRow()),
    'CoverageSelfTimeOffResponse': TypeInfo(TypeOf.Class, create:() => CoverageSelfTimeOffResponse()),
    'List<CoverageSelfTimeOffRow>': TypeInfo(TypeOf.Class, create:() => <CoverageSelfTimeOffRow>[]),
    'CoverageSelfTimeOffGetRequest': TypeInfo(TypeOf.Class, create:() => CoverageSelfTimeOffGetRequest()),
});

Dart CoverageSelfTimeOffGetRequest 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/coverage/self/timeoff 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
		}
	},
	Rows: 
	[
		{
			WorkerTimeOffID: 0,
			Label: String,
			Status: String
		}
	]
}