Trendsic Platform Service

<back to all web services

ShiftPatternArchiveRequest

Requires Authentication
The following routes are available for this service:
DELETE/v1/workforce/patterns/{ShiftPatternID}
import 'package:servicestack/servicestack.dart';

class ShiftPattern implements IConvertible
{
    int? ShiftPatternID;
    String? BranchId;
    String? Code;
    String? Name;
    String? Struct;
    double? HoursPerDay;
    int? OnDays;
    int? OffDays;
    String? PatternType;
    bool? IsNight;
    bool? HasBoundary;
    bool? IsHitch;
    bool? HasTravel;
    bool? IsSeasonal;
    String? SeasonalWindow;
    bool? IsDayRate;
    String? OtRuleId;
    String? PerDiemRuleId;
    String? Packs;
    String? Status;
    bool? IsSeed;
    int? AssignedCount;

    ShiftPattern({this.ShiftPatternID,this.BranchId,this.Code,this.Name,this.Struct,this.HoursPerDay,this.OnDays,this.OffDays,this.PatternType,this.IsNight,this.HasBoundary,this.IsHitch,this.HasTravel,this.IsSeasonal,this.SeasonalWindow,this.IsDayRate,this.OtRuleId,this.PerDiemRuleId,this.Packs,this.Status,this.IsSeed,this.AssignedCount});
    ShiftPattern.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ShiftPatternID = json['ShiftPatternID'];
        BranchId = json['BranchId'];
        Code = json['Code'];
        Name = json['Name'];
        Struct = json['Struct'];
        HoursPerDay = JsonConverters.toDouble(json['HoursPerDay']);
        OnDays = json['OnDays'];
        OffDays = json['OffDays'];
        PatternType = json['PatternType'];
        IsNight = json['IsNight'];
        HasBoundary = json['HasBoundary'];
        IsHitch = json['IsHitch'];
        HasTravel = json['HasTravel'];
        IsSeasonal = json['IsSeasonal'];
        SeasonalWindow = json['SeasonalWindow'];
        IsDayRate = json['IsDayRate'];
        OtRuleId = json['OtRuleId'];
        PerDiemRuleId = json['PerDiemRuleId'];
        Packs = json['Packs'];
        Status = json['Status'];
        IsSeed = json['IsSeed'];
        AssignedCount = json['AssignedCount'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ShiftPatternID': ShiftPatternID,
        'BranchId': BranchId,
        'Code': Code,
        'Name': Name,
        'Struct': Struct,
        'HoursPerDay': HoursPerDay,
        'OnDays': OnDays,
        'OffDays': OffDays,
        'PatternType': PatternType,
        'IsNight': IsNight,
        'HasBoundary': HasBoundary,
        'IsHitch': IsHitch,
        'HasTravel': HasTravel,
        'IsSeasonal': IsSeasonal,
        'SeasonalWindow': SeasonalWindow,
        'IsDayRate': IsDayRate,
        'OtRuleId': OtRuleId,
        'PerDiemRuleId': PerDiemRuleId,
        'Packs': Packs,
        'Status': Status,
        'IsSeed': IsSeed,
        'AssignedCount': AssignedCount
    };

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

class ShiftPatternsResponse implements IConvertible
{
    List<ShiftPattern>? Patterns = [];
    ResponseStatus? ResponseStatus;

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

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

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

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

class ShiftPatternArchiveRequest implements IConvertible
{
    int? ShiftPatternID;

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

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

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

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

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

Dart ShiftPatternArchiveRequest DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

DELETE /v1/workforce/patterns/{ShiftPatternID} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Patterns":[{"ShiftPatternID":0,"BranchId":"00000000000000000000000000000000","Code":"String","Name":"String","Struct":"String","HoursPerDay":0,"OnDays":0,"OffDays":0,"PatternType":"String","IsNight":false,"HasBoundary":false,"IsHitch":false,"HasTravel":false,"IsSeasonal":false,"SeasonalWindow":"String","IsDayRate":false,"OtRuleId":"String","PerDiemRuleId":"String","Packs":"String","Status":"String","IsSeed":false,"AssignedCount":0}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}