| Requires any of the roles: | Admin, TeamAdmin |
| POST | /FanSnapshot/Owner |
|---|
import 'package:servicestack/servicestack.dart';
class FanSegmentFigure implements IConvertible
{
String? segment;
int? fans;
int? orders;
int? spendIsk;
FanSegmentFigure({this.segment,this.fans,this.orders,this.spendIsk});
FanSegmentFigure.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
segment = json['segment'];
fans = json['fans'];
orders = json['orders'];
spendIsk = json['spendIsk'];
return this;
}
Map<String, dynamic> toJson() => {
'segment': segment,
'fans': fans,
'orders': orders,
'spendIsk': spendIsk
};
getTypeName() => "FanSegmentFigure";
TypeContext? context = _ctx;
}
class FanSnapshotPoint implements IConvertible
{
String? date;
int? New;
int? active;
int? atRisk;
int? dropoff;
int? lost;
int? neverBought;
int? all;
FanSnapshotPoint({this.date,this.New,this.active,this.atRisk,this.dropoff,this.lost,this.neverBought,this.all});
FanSnapshotPoint.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
date = json['date'];
New = json['new'];
active = json['active'];
atRisk = json['atRisk'];
dropoff = json['dropoff'];
lost = json['lost'];
neverBought = json['neverBought'];
all = json['all'];
return this;
}
Map<String, dynamic> toJson() => {
'date': date,
'new': New,
'active': active,
'atRisk': atRisk,
'dropoff': dropoff,
'lost': lost,
'neverBought': neverBought,
'all': all
};
getTypeName() => "FanSnapshotPoint";
TypeContext? context = _ctx;
}
class FanSnapshotOwnerResult implements IConvertible
{
int? eventOwnerId;
int? clubEventOwnerId;
int? definitionVersion;
String? asOf;
List<FanSegmentFigure>? current;
List<FanSegmentFigure>? extras;
String? compareDate;
List<FanSegmentFigure>? compare;
List<FanSegmentFigure>? compareExtras;
List<FanSnapshotPoint>? series;
int? statusCode;
String? message;
FanSnapshotOwnerResult({this.eventOwnerId,this.clubEventOwnerId,this.definitionVersion,this.asOf,this.current,this.extras,this.compareDate,this.compare,this.compareExtras,this.series,this.statusCode,this.message});
FanSnapshotOwnerResult.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
eventOwnerId = json['eventOwnerId'];
clubEventOwnerId = json['clubEventOwnerId'];
definitionVersion = json['definitionVersion'];
asOf = json['asOf'];
current = JsonConverters.fromJson(json['current'],'List<FanSegmentFigure>',context!);
extras = JsonConverters.fromJson(json['extras'],'List<FanSegmentFigure>',context!);
compareDate = json['compareDate'];
compare = JsonConverters.fromJson(json['compare'],'List<FanSegmentFigure>',context!);
compareExtras = JsonConverters.fromJson(json['compareExtras'],'List<FanSegmentFigure>',context!);
series = JsonConverters.fromJson(json['series'],'List<FanSnapshotPoint>',context!);
statusCode = json['statusCode'];
message = json['message'];
return this;
}
Map<String, dynamic> toJson() => {
'eventOwnerId': eventOwnerId,
'clubEventOwnerId': clubEventOwnerId,
'definitionVersion': definitionVersion,
'asOf': asOf,
'current': JsonConverters.toJson(current,'List<FanSegmentFigure>',context!),
'extras': JsonConverters.toJson(extras,'List<FanSegmentFigure>',context!),
'compareDate': compareDate,
'compare': JsonConverters.toJson(compare,'List<FanSegmentFigure>',context!),
'compareExtras': JsonConverters.toJson(compareExtras,'List<FanSegmentFigure>',context!),
'series': JsonConverters.toJson(series,'List<FanSnapshotPoint>',context!),
'statusCode': statusCode,
'message': message
};
getTypeName() => "FanSnapshotOwnerResult";
TypeContext? context = _ctx;
}
class FanSnapshotOwnerRequest implements IConvertible
{
int? eventOwnerId;
int? days;
int? definitionVersion;
FanSnapshotOwnerRequest({this.eventOwnerId,this.days,this.definitionVersion});
FanSnapshotOwnerRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
eventOwnerId = json['eventOwnerId'];
days = json['days'];
definitionVersion = json['definitionVersion'];
return this;
}
Map<String, dynamic> toJson() => {
'eventOwnerId': eventOwnerId,
'days': days,
'definitionVersion': definitionVersion
};
getTypeName() => "FanSnapshotOwnerRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'stubbur_app.azurewebsites.net', types: <String, TypeInfo> {
'FanSegmentFigure': TypeInfo(TypeOf.Class, create:() => FanSegmentFigure()),
'FanSnapshotPoint': TypeInfo(TypeOf.Class, create:() => FanSnapshotPoint()),
'FanSnapshotOwnerResult': TypeInfo(TypeOf.Class, create:() => FanSnapshotOwnerResult()),
'List<FanSegmentFigure>': TypeInfo(TypeOf.Class, create:() => <FanSegmentFigure>[]),
'List<FanSnapshotPoint>': TypeInfo(TypeOf.Class, create:() => <FanSnapshotPoint>[]),
'FanSnapshotOwnerRequest': TypeInfo(TypeOf.Class, create:() => FanSnapshotOwnerRequest()),
});
Dart FanSnapshotOwnerRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /FanSnapshot/Owner HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"eventOwnerId":0,"days":0,"definitionVersion":0}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"eventOwnerId":0,"clubEventOwnerId":0,"definitionVersion":0,"asOf":"String","current":[{"segment":"String","fans":0,"orders":0,"spendIsk":0}],"extras":[{"segment":"String","fans":0,"orders":0,"spendIsk":0}],"compareDate":"String","compare":[{"segment":"String","fans":0,"orders":0,"spendIsk":0}],"compareExtras":[{"segment":"String","fans":0,"orders":0,"spendIsk":0}],"series":[{"date":"String","new":0,"active":0,"atRisk":0,"dropoff":0,"lost":0,"neverBought":0,"all":0}],"statusCode":0,"message":"String"}