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 .xml suffix or ?format=xml

HTTP + XML

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/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ShiftPatternsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Patterns>
    <ShiftPattern>
      <AssignedCount>0</AssignedCount>
      <BranchId>00000000-0000-0000-0000-000000000000</BranchId>
      <Code>String</Code>
      <HasBoundary>false</HasBoundary>
      <HasTravel>false</HasTravel>
      <HoursPerDay>0</HoursPerDay>
      <IsDayRate>false</IsDayRate>
      <IsHitch>false</IsHitch>
      <IsNight>false</IsNight>
      <IsSeasonal>false</IsSeasonal>
      <IsSeed>false</IsSeed>
      <Name>String</Name>
      <OffDays>0</OffDays>
      <OnDays>0</OnDays>
      <OtRuleId>String</OtRuleId>
      <Packs>String</Packs>
      <PatternType>String</PatternType>
      <PerDiemRuleId>String</PerDiemRuleId>
      <SeasonalWindow>String</SeasonalWindow>
      <ShiftPatternID>0</ShiftPatternID>
      <Status>String</Status>
      <Struct>String</Struct>
    </ShiftPattern>
  </Patterns>
  <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>
</ShiftPatternsResponse>