Trendsic Platform Service

<back to all web services

DispatchHoldLiftRequest

Requires Authentication
Requires any of the permissions:DISPATCH:HAUL:MANAGE, DISPATCH:JOB:MANAGE, DISPATCH:ONDEMAND:MANAGE
The following routes are available for this service:
POST,OPTIONS/v1/dispatch/holds/{HoldId}/lift
import 'package:servicestack/servicestack.dart';

class DispatchHoldView implements IConvertible
{
    int? HoldId;
    String? Code;
    String? ScopeKind;
    String? ScopeKey;
    String? ScopeLabel;
    String? Reason;
    String? Note;
    DateTime? StartUtc;
    DateTime? EndUtc;
    String? Source;
    String? IncidentRef;
    DateTime? LiftedUtc;
    String? LiftedBy;
    DateTime? CreatedUtc;
    String? CreatedBy;
    String? Status;

    DispatchHoldView({this.HoldId,this.Code,this.ScopeKind,this.ScopeKey,this.ScopeLabel,this.Reason,this.Note,this.StartUtc,this.EndUtc,this.Source,this.IncidentRef,this.LiftedUtc,this.LiftedBy,this.CreatedUtc,this.CreatedBy,this.Status});
    DispatchHoldView.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        HoldId = json['HoldId'];
        Code = json['Code'];
        ScopeKind = json['ScopeKind'];
        ScopeKey = json['ScopeKey'];
        ScopeLabel = json['ScopeLabel'];
        Reason = json['Reason'];
        Note = json['Note'];
        StartUtc = JsonConverters.fromJson(json['StartUtc'],'DateTime',context!);
        EndUtc = JsonConverters.fromJson(json['EndUtc'],'DateTime',context!);
        Source = json['Source'];
        IncidentRef = json['IncidentRef'];
        LiftedUtc = JsonConverters.fromJson(json['LiftedUtc'],'DateTime',context!);
        LiftedBy = json['LiftedBy'];
        CreatedUtc = JsonConverters.fromJson(json['CreatedUtc'],'DateTime',context!);
        CreatedBy = json['CreatedBy'];
        Status = json['Status'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'HoldId': HoldId,
        'Code': Code,
        'ScopeKind': ScopeKind,
        'ScopeKey': ScopeKey,
        'ScopeLabel': ScopeLabel,
        'Reason': Reason,
        'Note': Note,
        'StartUtc': JsonConverters.toJson(StartUtc,'DateTime',context!),
        'EndUtc': JsonConverters.toJson(EndUtc,'DateTime',context!),
        'Source': Source,
        'IncidentRef': IncidentRef,
        'LiftedUtc': JsonConverters.toJson(LiftedUtc,'DateTime',context!),
        'LiftedBy': LiftedBy,
        'CreatedUtc': JsonConverters.toJson(CreatedUtc,'DateTime',context!),
        'CreatedBy': CreatedBy,
        'Status': Status
    };

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

class DispatchOfflineWindowView implements IConvertible
{
    int? OfflineWindowId;
    String? FromHour;
    String? ToHour;

    DispatchOfflineWindowView({this.OfflineWindowId,this.FromHour,this.ToHour});
    DispatchOfflineWindowView.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'OfflineWindowId': OfflineWindowId,
        'FromHour': FromHour,
        'ToHour': ToHour
    };

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

class DispatchHoldScopeView implements IConvertible
{
    String? Kind;
    String? Key;
    String? Label;

    DispatchHoldScopeView({this.Kind,this.Key,this.Label});
    DispatchHoldScopeView.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class DispatchHoldSuggestionView implements IConvertible
{
    String? ForDate;
    String? Kind;
    int? Severity;
    String? Headline;
    String? DayLabel;
    String? ScopeKind;
    String? ScopeLabel;
    String? Reason;
    DateTime? StartUtc;
    DateTime? EndUtc;
    String? WindowLocal;
    String? Text;

    DispatchHoldSuggestionView({this.ForDate,this.Kind,this.Severity,this.Headline,this.DayLabel,this.ScopeKind,this.ScopeLabel,this.Reason,this.StartUtc,this.EndUtc,this.WindowLocal,this.Text});
    DispatchHoldSuggestionView.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ForDate = json['ForDate'];
        Kind = json['Kind'];
        Severity = json['Severity'];
        Headline = json['Headline'];
        DayLabel = json['DayLabel'];
        ScopeKind = json['ScopeKind'];
        ScopeLabel = json['ScopeLabel'];
        Reason = json['Reason'];
        StartUtc = JsonConverters.fromJson(json['StartUtc'],'DateTime',context!);
        EndUtc = JsonConverters.fromJson(json['EndUtc'],'DateTime',context!);
        WindowLocal = json['WindowLocal'];
        Text = json['Text'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ForDate': ForDate,
        'Kind': Kind,
        'Severity': Severity,
        'Headline': Headline,
        'DayLabel': DayLabel,
        'ScopeKind': ScopeKind,
        'ScopeLabel': ScopeLabel,
        'Reason': Reason,
        'StartUtc': JsonConverters.toJson(StartUtc,'DateTime',context!),
        'EndUtc': JsonConverters.toJson(EndUtc,'DateTime',context!),
        'WindowLocal': WindowLocal,
        'Text': Text
    };

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

class DispatchHoldsResponse implements IConvertible
{
    List<DispatchHoldView>? Holds = [];
    List<DispatchOfflineWindowView>? Windows = [];
    List<DispatchHoldScopeView>? Scopes = [];
    DispatchHoldSuggestionView? Suggestion;
    ResponseStatus? ResponseStatus;

    DispatchHoldsResponse({this.Holds,this.Windows,this.Scopes,this.Suggestion,this.ResponseStatus});
    DispatchHoldsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Holds = JsonConverters.fromJson(json['Holds'],'List<DispatchHoldView>',context!);
        Windows = JsonConverters.fromJson(json['Windows'],'List<DispatchOfflineWindowView>',context!);
        Scopes = JsonConverters.fromJson(json['Scopes'],'List<DispatchHoldScopeView>',context!);
        Suggestion = JsonConverters.fromJson(json['Suggestion'],'DispatchHoldSuggestionView',context!);
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Holds': JsonConverters.toJson(Holds,'List<DispatchHoldView>',context!),
        'Windows': JsonConverters.toJson(Windows,'List<DispatchOfflineWindowView>',context!),
        'Scopes': JsonConverters.toJson(Scopes,'List<DispatchHoldScopeView>',context!),
        'Suggestion': JsonConverters.toJson(Suggestion,'DispatchHoldSuggestionView',context!),
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
    };

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

class DispatchHoldLiftRequest implements IConvertible
{
    int? HoldId;

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

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

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

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

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'DispatchHoldView': TypeInfo(TypeOf.Class, create:() => DispatchHoldView()),
    'DispatchOfflineWindowView': TypeInfo(TypeOf.Class, create:() => DispatchOfflineWindowView()),
    'DispatchHoldScopeView': TypeInfo(TypeOf.Class, create:() => DispatchHoldScopeView()),
    'DispatchHoldSuggestionView': TypeInfo(TypeOf.Class, create:() => DispatchHoldSuggestionView()),
    'DispatchHoldsResponse': TypeInfo(TypeOf.Class, create:() => DispatchHoldsResponse()),
    'List<DispatchHoldView>': TypeInfo(TypeOf.Class, create:() => <DispatchHoldView>[]),
    'List<DispatchOfflineWindowView>': TypeInfo(TypeOf.Class, create:() => <DispatchOfflineWindowView>[]),
    'List<DispatchHoldScopeView>': TypeInfo(TypeOf.Class, create:() => <DispatchHoldScopeView>[]),
    'DispatchHoldLiftRequest': TypeInfo(TypeOf.Class, create:() => DispatchHoldLiftRequest()),
});

Dart DispatchHoldLiftRequest 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.

POST /v1/dispatch/holds/{HoldId}/lift HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	HoldId: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Holds: 
	[
		{
			HoldId: 0,
			Code: String,
			ScopeKind: String,
			ScopeKey: String,
			ScopeLabel: String,
			Reason: String,
			Note: String,
			StartUtc: 0001-01-01,
			EndUtc: 0001-01-01,
			Source: String,
			IncidentRef: String,
			LiftedUtc: 0001-01-01,
			LiftedBy: String,
			CreatedUtc: 0001-01-01,
			CreatedBy: String,
			Status: String
		}
	],
	Windows: 
	[
		{
			OfflineWindowId: 0,
			FromHour: String,
			ToHour: String
		}
	],
	Scopes: 
	[
		{
			Kind: String,
			Key: String,
			Label: String
		}
	],
	Suggestion: 
	{
		ForDate: String,
		Kind: String,
		Severity: 0,
		Headline: String,
		DayLabel: String,
		ScopeKind: String,
		ScopeLabel: String,
		Reason: String,
		StartUtc: 0001-01-01,
		EndUtc: 0001-01-01,
		WindowLocal: String,
		Text: String
	},
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}