| Requires any of the roles: | Agent, Administrator |
| GET | /v1/Production | ||
|---|---|---|---|
| GET | /v1/Production/DateRange/{StartDate}/{EndDate} |
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class Production implements IConvertible
{
int? AgentId;
int? MVPID;
int? AVPID;
int? RVPID;
String? FirstName;
String? LastName;
String? MiddleInitial;
double? AgentLevel;
String? Rank;
String? FullName;
bool? IsMVP;
bool? IsRVP;
bool? IsAVP;
int? PolicyCount;
double? AppCount;
double? Points;
double? Cashflow;
Production({this.AgentId,this.MVPID,this.AVPID,this.RVPID,this.FirstName,this.LastName,this.MiddleInitial,this.AgentLevel,this.Rank,this.FullName,this.IsMVP,this.IsRVP,this.IsAVP,this.PolicyCount,this.AppCount,this.Points,this.Cashflow});
Production.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
AgentId = json['AgentId'];
MVPID = json['MVPID'];
AVPID = json['AVPID'];
RVPID = json['RVPID'];
FirstName = json['FirstName'];
LastName = json['LastName'];
MiddleInitial = json['MiddleInitial'];
AgentLevel = JsonConverters.toDouble(json['AgentLevel']);
Rank = json['Rank'];
FullName = json['FullName'];
IsMVP = json['IsMVP'];
IsRVP = json['IsRVP'];
IsAVP = json['IsAVP'];
PolicyCount = json['PolicyCount'];
AppCount = JsonConverters.toDouble(json['AppCount']);
Points = JsonConverters.toDouble(json['Points']);
Cashflow = JsonConverters.toDouble(json['Cashflow']);
return this;
}
Map<String, dynamic> toJson() => {
'AgentId': AgentId,
'MVPID': MVPID,
'AVPID': AVPID,
'RVPID': RVPID,
'FirstName': FirstName,
'LastName': LastName,
'MiddleInitial': MiddleInitial,
'AgentLevel': AgentLevel,
'Rank': Rank,
'FullName': FullName,
'IsMVP': IsMVP,
'IsRVP': IsRVP,
'IsAVP': IsAVP,
'PolicyCount': PolicyCount,
'AppCount': AppCount,
'Points': Points,
'Cashflow': Cashflow
};
getTypeName() => "Production";
TypeContext? context = _ctx;
}
class ProductionResponse implements IConvertible
{
ResponseStatus? ResponseStatus;
List<Production>? ReportData = [];
ProductionResponse({this.ResponseStatus,this.ReportData});
ProductionResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
ReportData = JsonConverters.fromJson(json['ReportData'],'List<Production>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
'ReportData': JsonConverters.toJson(ReportData,'List<Production>',context!)
};
getTypeName() => "ProductionResponse";
TypeContext? context = _ctx;
}
class ProductionRequest implements IConvertible
{
DateTime? StartDate;
DateTime? EndDate;
ProductionRequest({this.StartDate,this.EndDate});
ProductionRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
StartDate = JsonConverters.fromJson(json['StartDate'],'DateTime',context!);
EndDate = JsonConverters.fromJson(json['EndDate'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'StartDate': JsonConverters.toJson(StartDate,'DateTime',context!),
'EndDate': JsonConverters.toJson(EndDate,'DateTime',context!)
};
getTypeName() => "ProductionRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'Production': TypeInfo(TypeOf.Class, create:() => Production()),
'ProductionResponse': TypeInfo(TypeOf.Class, create:() => ProductionResponse()),
'List<Production>': TypeInfo(TypeOf.Class, create:() => <Production>[]),
'ProductionRequest': TypeInfo(TypeOf.Class, create:() => ProductionRequest()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/Production HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
},
ReportData:
[
{
AgentId: 0,
MVPID: 0,
AVPID: 0,
RVPID: 0,
FirstName: String,
LastName: String,
MiddleInitial: String,
AgentLevel: 0,
Rank: String,
FullName: String,
IsMVP: False,
IsRVP: False,
IsAVP: False,
PolicyCount: 0,
AppCount: 0,
Points: 0,
Cashflow: 0
}
]
}