Trendsic Platform Service

<back to all web services

HoldsRequest

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

class HoldMatchDto implements IConvertible
{
    String? RecordKey;
    String? Name;
    String? Tag;
    bool? Warn;

    HoldMatchDto({this.RecordKey,this.Name,this.Tag,this.Warn});
    HoldMatchDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        RecordKey = json['RecordKey'];
        Name = json['Name'];
        Tag = json['Tag'];
        Warn = json['Warn'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'RecordKey': RecordKey,
        'Name': Name,
        'Tag': Tag,
        'Warn': Warn
    };

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

class LegalHoldDto implements IConvertible
{
    int? HoldId;
    String? HoldKey;
    String? Name;
    String? Matter;
    String? ScopeDim;
    String? ScopeVal;
    String? ScopeLabel;
    String? ScopeNote;
    String? PlacedBy;
    String? PlacedLabel;
    bool? Released;
    String? ReleasedLabel;
    String? FrozenJson;
    String? LogJson;
    List<HoldMatchDto>? Matches = [];

    LegalHoldDto({this.HoldId,this.HoldKey,this.Name,this.Matter,this.ScopeDim,this.ScopeVal,this.ScopeLabel,this.ScopeNote,this.PlacedBy,this.PlacedLabel,this.Released,this.ReleasedLabel,this.FrozenJson,this.LogJson,this.Matches});
    LegalHoldDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        HoldId = json['HoldId'];
        HoldKey = json['HoldKey'];
        Name = json['Name'];
        Matter = json['Matter'];
        ScopeDim = json['ScopeDim'];
        ScopeVal = json['ScopeVal'];
        ScopeLabel = json['ScopeLabel'];
        ScopeNote = json['ScopeNote'];
        PlacedBy = json['PlacedBy'];
        PlacedLabel = json['PlacedLabel'];
        Released = json['Released'];
        ReleasedLabel = json['ReleasedLabel'];
        FrozenJson = json['FrozenJson'];
        LogJson = json['LogJson'];
        Matches = JsonConverters.fromJson(json['Matches'],'List<HoldMatchDto>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'HoldId': HoldId,
        'HoldKey': HoldKey,
        'Name': Name,
        'Matter': Matter,
        'ScopeDim': ScopeDim,
        'ScopeVal': ScopeVal,
        'ScopeLabel': ScopeLabel,
        'ScopeNote': ScopeNote,
        'PlacedBy': PlacedBy,
        'PlacedLabel': PlacedLabel,
        'Released': Released,
        'ReleasedLabel': ReleasedLabel,
        'FrozenJson': FrozenJson,
        'LogJson': LogJson,
        'Matches': JsonConverters.toJson(Matches,'List<HoldMatchDto>',context!)
    };

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

class HoldsResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    List<LegalHoldDto>? Holds = [];

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

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

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

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

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

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

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

Dart HoldsRequest 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/records/holds HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<HoldsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Holds>
    <LegalHoldDto>
      <FrozenJson>String</FrozenJson>
      <HoldId>0</HoldId>
      <HoldKey>String</HoldKey>
      <LogJson>String</LogJson>
      <Matches>
        <HoldMatchDto>
          <Name>String</Name>
          <RecordKey>String</RecordKey>
          <Tag>String</Tag>
          <Warn>false</Warn>
        </HoldMatchDto>
      </Matches>
      <Matter>String</Matter>
      <Name>String</Name>
      <PlacedBy>String</PlacedBy>
      <PlacedLabel>String</PlacedLabel>
      <Released>false</Released>
      <ReleasedLabel>String</ReleasedLabel>
      <ScopeDim>String</ScopeDim>
      <ScopeLabel>String</ScopeLabel>
      <ScopeNote>String</ScopeNote>
      <ScopeVal>String</ScopeVal>
    </LegalHoldDto>
  </Holds>
  <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>
</HoldsResponse>