| GET,OPTIONS | /v1/records/mapping-rules |
|---|
import 'package:servicestack/servicestack.dart';
class MappingRuleDto implements IConvertible
{
int? RuleId;
int? SortOrder;
String? Keyword;
int? SeriesId;
String? SeriesKey;
bool? Active;
int? MatchedTotal;
int? Last90;
int? UnschHits;
MappingRuleDto({this.RuleId,this.SortOrder,this.Keyword,this.SeriesId,this.SeriesKey,this.Active,this.MatchedTotal,this.Last90,this.UnschHits});
MappingRuleDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
RuleId = json['RuleId'];
SortOrder = json['SortOrder'];
Keyword = json['Keyword'];
SeriesId = json['SeriesId'];
SeriesKey = json['SeriesKey'];
Active = json['Active'];
MatchedTotal = json['MatchedTotal'];
Last90 = json['Last90'];
UnschHits = json['UnschHits'];
return this;
}
Map<String, dynamic> toJson() => {
'RuleId': RuleId,
'SortOrder': SortOrder,
'Keyword': Keyword,
'SeriesId': SeriesId,
'SeriesKey': SeriesKey,
'Active': Active,
'MatchedTotal': MatchedTotal,
'Last90': Last90,
'UnschHits': UnschHits
};
getTypeName() => "MappingRuleDto";
TypeContext? context = _ctx;
}
class MappingRulesResponse implements IConvertible
{
ResponseStatus? ResponseStatus;
List<MappingRuleDto>? Rules = [];
MappingRulesResponse({this.ResponseStatus,this.Rules});
MappingRulesResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
Rules = JsonConverters.fromJson(json['Rules'],'List<MappingRuleDto>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
'Rules': JsonConverters.toJson(Rules,'List<MappingRuleDto>',context!)
};
getTypeName() => "MappingRulesResponse";
TypeContext? context = _ctx;
}
class MappingRulesRequest implements IConvertible
{
MappingRulesRequest();
MappingRulesRequest.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "MappingRulesRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'MappingRuleDto': TypeInfo(TypeOf.Class, create:() => MappingRuleDto()),
'MappingRulesResponse': TypeInfo(TypeOf.Class, create:() => MappingRulesResponse()),
'List<MappingRuleDto>': TypeInfo(TypeOf.Class, create:() => <MappingRuleDto>[]),
'MappingRulesRequest': TypeInfo(TypeOf.Class, create:() => MappingRulesRequest()),
});
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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/records/mapping-rules HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Rules":[{"RuleId":0,"SortOrder":0,"Keyword":"String","SeriesId":0,"SeriesKey":"String","Active":false,"MatchedTotal":0,"Last90":0,"UnschHits":0}]}