TicketUserServices

<back to all web services

FanSnapshotOwnerRequest

Requires Authentication
Requires any of the roles:Admin, TeamAdmin
The following routes are available for this service:
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 .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.

POST /FanSnapshot/Owner HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<FanSnapshotOwnerRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
  <Days>0</Days>
  <DefinitionVersion>0</DefinitionVersion>
  <EventOwnerId>0</EventOwnerId>
</FanSnapshotOwnerRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<FanSnapshotOwnerResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
  <AsOf>String</AsOf>
  <ClubEventOwnerId>0</ClubEventOwnerId>
  <Compare>
    <FanSegmentFigure>
      <Fans>0</Fans>
      <Orders>0</Orders>
      <Segment>String</Segment>
      <SpendIsk>0</SpendIsk>
    </FanSegmentFigure>
  </Compare>
  <CompareDate>String</CompareDate>
  <CompareExtras>
    <FanSegmentFigure>
      <Fans>0</Fans>
      <Orders>0</Orders>
      <Segment>String</Segment>
      <SpendIsk>0</SpendIsk>
    </FanSegmentFigure>
  </CompareExtras>
  <Current>
    <FanSegmentFigure>
      <Fans>0</Fans>
      <Orders>0</Orders>
      <Segment>String</Segment>
      <SpendIsk>0</SpendIsk>
    </FanSegmentFigure>
  </Current>
  <DefinitionVersion>0</DefinitionVersion>
  <EventOwnerId>0</EventOwnerId>
  <Extras>
    <FanSegmentFigure>
      <Fans>0</Fans>
      <Orders>0</Orders>
      <Segment>String</Segment>
      <SpendIsk>0</SpendIsk>
    </FanSegmentFigure>
  </Extras>
  <Message>String</Message>
  <Series>
    <FanSnapshotPoint>
      <Active>0</Active>
      <All>0</All>
      <AtRisk>0</AtRisk>
      <Date>String</Date>
      <Dropoff>0</Dropoff>
      <Lost>0</Lost>
      <NeverBought>0</NeverBought>
      <New>0</New>
    </FanSnapshotPoint>
  </Series>
  <StatusCode>0</StatusCode>
</FanSnapshotOwnerResult>