Trendsic Platform Service

<back to all web services

PayRulesCascadeRequest

Requires Authentication
The following routes are available for this service:
GET/v1/workforce/payrules
import 'package:servicestack/servicestack.dart';

class PayRulePolicy implements IConvertible
{
    int? PayRulePolicyId;
    String? PayRulePolicyUID;
    String? Name;
    String? ScopeLevel;
    String? BranchId;
    String? JurisdictionKey;
    String? CbaKey;
    String? WorkTypeKey;
    int? CurrentVersion;
    bool? IsActive;
    String? BranchName;

    PayRulePolicy({this.PayRulePolicyId,this.PayRulePolicyUID,this.Name,this.ScopeLevel,this.BranchId,this.JurisdictionKey,this.CbaKey,this.WorkTypeKey,this.CurrentVersion,this.IsActive,this.BranchName});
    PayRulePolicy.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        PayRulePolicyId = json['PayRulePolicyId'];
        PayRulePolicyUID = json['PayRulePolicyUID'];
        Name = json['Name'];
        ScopeLevel = json['ScopeLevel'];
        BranchId = json['BranchId'];
        JurisdictionKey = json['JurisdictionKey'];
        CbaKey = json['CbaKey'];
        WorkTypeKey = json['WorkTypeKey'];
        CurrentVersion = json['CurrentVersion'];
        IsActive = json['IsActive'];
        BranchName = json['BranchName'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'PayRulePolicyId': PayRulePolicyId,
        'PayRulePolicyUID': PayRulePolicyUID,
        'Name': Name,
        'ScopeLevel': ScopeLevel,
        'BranchId': BranchId,
        'JurisdictionKey': JurisdictionKey,
        'CbaKey': CbaKey,
        'WorkTypeKey': WorkTypeKey,
        'CurrentVersion': CurrentVersion,
        'IsActive': IsActive,
        'BranchName': BranchName
    };

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

class PayRuleDocSection implements IConvertible
{
    String? H;
    String? T;

    PayRuleDocSection({this.H,this.T});
    PayRuleDocSection.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class PayRuleTuneOption implements IConvertible
{
    String? Label;
    String? Sub;

    PayRuleTuneOption({this.Label,this.Sub});
    PayRuleTuneOption.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class PayRuleTune implements IConvertible
{
    String? Intro;
    List<PayRuleTuneOption>? Options = [];

    PayRuleTune({this.Intro,this.Options});
    PayRuleTune.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'Intro': Intro,
        'Options': JsonConverters.toJson(Options,'List<PayRuleTuneOption>',context!)
    };

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

class PayRuleDef implements IConvertible
{
    String? RuleId;
    String? Name;
    String? Kind;
    String? Demand;
    String? SourcePolicyName;
    String? CascadeLevel;
    String? Why;
    String? Change;
    String? OverrideWho;
    String? OverrideConsequence;
    String? NoNote;
    String? LegalVerify;
    Map<String,String?>? Params = {};
    List<PayRuleDocSection>? Doc = [];
    PayRuleTune? Tune;

    PayRuleDef({this.RuleId,this.Name,this.Kind,this.Demand,this.SourcePolicyName,this.CascadeLevel,this.Why,this.Change,this.OverrideWho,this.OverrideConsequence,this.NoNote,this.LegalVerify,this.Params,this.Doc,this.Tune});
    PayRuleDef.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        RuleId = json['RuleId'];
        Name = json['Name'];
        Kind = json['Kind'];
        Demand = json['Demand'];
        SourcePolicyName = json['SourcePolicyName'];
        CascadeLevel = json['CascadeLevel'];
        Why = json['Why'];
        Change = json['Change'];
        OverrideWho = json['OverrideWho'];
        OverrideConsequence = json['OverrideConsequence'];
        NoNote = json['NoNote'];
        LegalVerify = json['LegalVerify'];
        Params = JsonConverters.toStringMap(json['Params']);
        Doc = JsonConverters.fromJson(json['Doc'],'List<PayRuleDocSection>',context!);
        Tune = JsonConverters.fromJson(json['Tune'],'PayRuleTune',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'RuleId': RuleId,
        'Name': Name,
        'Kind': Kind,
        'Demand': Demand,
        'SourcePolicyName': SourcePolicyName,
        'CascadeLevel': CascadeLevel,
        'Why': Why,
        'Change': Change,
        'OverrideWho': OverrideWho,
        'OverrideConsequence': OverrideConsequence,
        'NoNote': NoNote,
        'LegalVerify': LegalVerify,
        'Params': Params,
        'Doc': JsonConverters.toJson(Doc,'List<PayRuleDocSection>',context!),
        'Tune': JsonConverters.toJson(Tune,'PayRuleTune',context!)
    };

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

class PayRulePolicyDoc implements IConvertible
{
    String? Intro;
    String? LockLine;
    String? TemplateName;
    List<PayRuleDef>? Rules = [];

    PayRulePolicyDoc({this.Intro,this.LockLine,this.TemplateName,this.Rules});
    PayRulePolicyDoc.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Intro = json['Intro'];
        LockLine = json['LockLine'];
        TemplateName = json['TemplateName'];
        Rules = JsonConverters.fromJson(json['Rules'],'List<PayRuleDef>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Intro': Intro,
        'LockLine': LockLine,
        'TemplateName': TemplateName,
        'Rules': JsonConverters.toJson(Rules,'List<PayRuleDef>',context!)
    };

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

class PayRulePolicyVersionInfo implements IConvertible
{
    int? PayRulePolicyVersionId;
    int? VersionNumber;
    String? ChangeNote;
    String? ChangedByName;
    DateTime? CreatedAtUtc;

    PayRulePolicyVersionInfo({this.PayRulePolicyVersionId,this.VersionNumber,this.ChangeNote,this.ChangedByName,this.CreatedAtUtc});
    PayRulePolicyVersionInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        PayRulePolicyVersionId = json['PayRulePolicyVersionId'];
        VersionNumber = json['VersionNumber'];
        ChangeNote = json['ChangeNote'];
        ChangedByName = json['ChangedByName'];
        CreatedAtUtc = JsonConverters.fromJson(json['CreatedAtUtc'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'PayRulePolicyVersionId': PayRulePolicyVersionId,
        'VersionNumber': VersionNumber,
        'ChangeNote': ChangeNote,
        'ChangedByName': ChangedByName,
        'CreatedAtUtc': JsonConverters.toJson(CreatedAtUtc,'DateTime',context!)
    };

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

class PayRulesCascadeResponse implements IConvertible
{
    PayRulePolicy? Policy;
    PayRulePolicyDoc? Doc;
    int? VersionNumber;
    List<PayRulePolicyVersionInfo>? Versions = [];
    bool? CanEditRules;
    ResponseStatus? ResponseStatus;

    PayRulesCascadeResponse({this.Policy,this.Doc,this.VersionNumber,this.Versions,this.CanEditRules,this.ResponseStatus});
    PayRulesCascadeResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Policy = JsonConverters.fromJson(json['Policy'],'PayRulePolicy',context!);
        Doc = JsonConverters.fromJson(json['Doc'],'PayRulePolicyDoc',context!);
        VersionNumber = json['VersionNumber'];
        Versions = JsonConverters.fromJson(json['Versions'],'List<PayRulePolicyVersionInfo>',context!);
        CanEditRules = json['CanEditRules'];
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Policy': JsonConverters.toJson(Policy,'PayRulePolicy',context!),
        'Doc': JsonConverters.toJson(Doc,'PayRulePolicyDoc',context!),
        'VersionNumber': VersionNumber,
        'Versions': JsonConverters.toJson(Versions,'List<PayRulePolicyVersionInfo>',context!),
        'CanEditRules': CanEditRules,
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
    };

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

class PayRulesCascadeRequest implements IConvertible
{
    int? PayRulePolicyId;
    int? VersionNumber;

    PayRulesCascadeRequest({this.PayRulePolicyId,this.VersionNumber});
    PayRulesCascadeRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'PayRulePolicy': TypeInfo(TypeOf.Class, create:() => PayRulePolicy()),
    'PayRuleDocSection': TypeInfo(TypeOf.Class, create:() => PayRuleDocSection()),
    'PayRuleTuneOption': TypeInfo(TypeOf.Class, create:() => PayRuleTuneOption()),
    'PayRuleTune': TypeInfo(TypeOf.Class, create:() => PayRuleTune()),
    'List<PayRuleTuneOption>': TypeInfo(TypeOf.Class, create:() => <PayRuleTuneOption>[]),
    'PayRuleDef': TypeInfo(TypeOf.Class, create:() => PayRuleDef()),
    'List<PayRuleDocSection>': TypeInfo(TypeOf.Class, create:() => <PayRuleDocSection>[]),
    'PayRulePolicyDoc': TypeInfo(TypeOf.Class, create:() => PayRulePolicyDoc()),
    'List<PayRuleDef>': TypeInfo(TypeOf.Class, create:() => <PayRuleDef>[]),
    'PayRulePolicyVersionInfo': TypeInfo(TypeOf.Class, create:() => PayRulePolicyVersionInfo()),
    'PayRulesCascadeResponse': TypeInfo(TypeOf.Class, create:() => PayRulesCascadeResponse()),
    'List<PayRulePolicyVersionInfo>': TypeInfo(TypeOf.Class, create:() => <PayRulePolicyVersionInfo>[]),
    'PayRulesCascadeRequest': TypeInfo(TypeOf.Class, create:() => PayRulesCascadeRequest()),
});

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

GET /v1/workforce/payrules HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<PayRulesCascadeResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <CanEditRules>false</CanEditRules>
  <Doc>
    <Intro>String</Intro>
    <LockLine>String</LockLine>
    <Rules>
      <PayRuleDef>
        <CascadeLevel>String</CascadeLevel>
        <Change>String</Change>
        <Demand>String</Demand>
        <Doc>
          <PayRuleDocSection>
            <H>String</H>
            <T>String</T>
          </PayRuleDocSection>
        </Doc>
        <Kind>String</Kind>
        <LegalVerify>String</LegalVerify>
        <Name>String</Name>
        <NoNote>String</NoNote>
        <OverrideConsequence>String</OverrideConsequence>
        <OverrideWho>String</OverrideWho>
        <Params xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </Params>
        <RuleId>String</RuleId>
        <SourcePolicyName>String</SourcePolicyName>
        <Tune>
          <Intro>String</Intro>
          <Options>
            <PayRuleTuneOption>
              <Label>String</Label>
              <Sub>String</Sub>
            </PayRuleTuneOption>
          </Options>
        </Tune>
        <Why>String</Why>
      </PayRuleDef>
    </Rules>
    <TemplateName>String</TemplateName>
  </Doc>
  <Policy>
    <BranchId>00000000-0000-0000-0000-000000000000</BranchId>
    <BranchName>String</BranchName>
    <CbaKey>String</CbaKey>
    <CurrentVersion>0</CurrentVersion>
    <IsActive>false</IsActive>
    <JurisdictionKey>String</JurisdictionKey>
    <Name>String</Name>
    <PayRulePolicyId>0</PayRulePolicyId>
    <PayRulePolicyUID>00000000-0000-0000-0000-000000000000</PayRulePolicyUID>
    <ScopeLevel>String</ScopeLevel>
    <WorkTypeKey>String</WorkTypeKey>
  </Policy>
  <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>
  <VersionNumber>0</VersionNumber>
  <Versions>
    <PayRulePolicyVersionInfo>
      <ChangeNote>String</ChangeNote>
      <ChangedByName>String</ChangedByName>
      <CreatedAtUtc>0001-01-01T00:00:00</CreatedAtUtc>
      <PayRulePolicyVersionId>0</PayRulePolicyVersionId>
      <VersionNumber>0</VersionNumber>
    </PayRulePolicyVersionInfo>
  </Versions>
</PayRulesCascadeResponse>