GET | /RestApi/sitefinity/data-intelligence/leadscore |
---|
import 'package:servicestack/servicestack.dart';
class LeadScoreRequestDto implements IConvertible
{
String? Filter;
LeadScoreRequestDto({this.Filter});
LeadScoreRequestDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Filter = json['Filter'];
return this;
}
Map<String, dynamic> toJson() => {
'Filter': Filter
};
getTypeName() => "LeadScoreRequestDto";
TypeContext? context = _ctx;
}
enum LeadScoreState
{
Inactive,
Active,
ToBeDeleted,
}
class LeadScoreLevel implements IConvertible
{
int? Id;
String? Name;
int? Threshold;
bool? SendNotification;
String? Email;
LeadScoreLevel({this.Id,this.Name,this.Threshold,this.SendNotification,this.Email});
LeadScoreLevel.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
Name = json['Name'];
Threshold = json['Threshold'];
SendNotification = json['SendNotification'];
Email = json['Email'];
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'Name': Name,
'Threshold': Threshold,
'SendNotification': SendNotification,
'Email': Email
};
getTypeName() => "LeadScoreLevel";
TypeContext? context = _ctx;
}
class LeadScore implements IConvertible
{
int? Id;
String? Name;
LeadScoreState? State;
List<LeadScoreLevel>? Levels;
Map<String,String?>? Fields;
DateTime? CreatedOn;
String? CreatedByUserId;
DateTime? ModifiedOn;
String? ModifiedByUserId;
DateTime? ToBeReinitializedAt;
LeadScore({this.Id,this.Name,this.State,this.Levels,this.Fields,this.CreatedOn,this.CreatedByUserId,this.ModifiedOn,this.ModifiedByUserId,this.ToBeReinitializedAt});
LeadScore.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
Name = json['Name'];
State = JsonConverters.fromJson(json['State'],'LeadScoreState',context!);
Levels = JsonConverters.fromJson(json['Levels'],'List<LeadScoreLevel>',context!);
Fields = JsonConverters.fromJson(json['Fields'],'Map<String,String?>',context!);
CreatedOn = JsonConverters.fromJson(json['CreatedOn'],'DateTime',context!);
CreatedByUserId = json['CreatedByUserId'];
ModifiedOn = JsonConverters.fromJson(json['ModifiedOn'],'DateTime',context!);
ModifiedByUserId = json['ModifiedByUserId'];
ToBeReinitializedAt = JsonConverters.fromJson(json['ToBeReinitializedAt'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'Name': Name,
'State': JsonConverters.toJson(State,'LeadScoreState',context!),
'Levels': JsonConverters.toJson(Levels,'List<LeadScoreLevel>',context!),
'Fields': JsonConverters.toJson(Fields,'Map<String,String?>',context!),
'CreatedOn': JsonConverters.toJson(CreatedOn,'DateTime',context!),
'CreatedByUserId': CreatedByUserId,
'ModifiedOn': JsonConverters.toJson(ModifiedOn,'DateTime',context!),
'ModifiedByUserId': ModifiedByUserId,
'ToBeReinitializedAt': JsonConverters.toJson(ToBeReinitializedAt,'DateTime',context!)
};
getTypeName() => "LeadScore";
TypeContext? context = _ctx;
}
class LeadScoreListViewModel implements IConvertible
{
List<LeadScore>? LeadScores;
String? DecAppUrl;
LeadScoreListViewModel({this.LeadScores,this.DecAppUrl});
LeadScoreListViewModel.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
LeadScores = JsonConverters.fromJson(json['LeadScores'],'List<LeadScore>',context!);
DecAppUrl = json['DecAppUrl'];
return this;
}
Map<String, dynamic> toJson() => {
'LeadScores': JsonConverters.toJson(LeadScores,'List<LeadScore>',context!),
'DecAppUrl': DecAppUrl
};
getTypeName() => "LeadScoreListViewModel";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'www.asg.com.au', types: <String, TypeInfo> {
'LeadScoreRequestDto': TypeInfo(TypeOf.Class, create:() => LeadScoreRequestDto()),
'LeadScoreState': TypeInfo(TypeOf.Enum, enumValues:LeadScoreState.values),
'LeadScoreLevel': TypeInfo(TypeOf.Class, create:() => LeadScoreLevel()),
'LeadScore': TypeInfo(TypeOf.Class, create:() => LeadScore()),
'List<LeadScoreLevel>': TypeInfo(TypeOf.Class, create:() => <LeadScoreLevel>[]),
'Map<String,String?>': TypeInfo(TypeOf.Class, create:() => Map<String,String?>()),
'LeadScoreListViewModel': TypeInfo(TypeOf.Class, create:() => LeadScoreListViewModel()),
'List<LeadScore>': TypeInfo(TypeOf.Class, create:() => <LeadScore>[]),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /RestApi/sitefinity/data-intelligence/leadscore HTTP/1.1 Host: www.asg.com.au Accept: text/jsonl
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"DecAppUrl":"String"}