TicketUserServices

<back to all web services

SelfServiceTransferQuoteRequest

Requires Authentication
The following routes are available for this service:
POST/selfService/transferTicket/quotePrice difference and eligibility for a prospective buyer-initiated exchange
import 'package:servicestack/servicestack.dart';

class SelfServiceTransferResultBase implements IConvertible
{
    bool? ok;
    int? statusCode;
    String? code;
    String? message;

    SelfServiceTransferResultBase({this.ok,this.statusCode,this.code,this.message});
    SelfServiceTransferResultBase.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ok = json['ok'];
        statusCode = json['statusCode'];
        code = json['code'];
        message = json['message'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ok': ok,
        'statusCode': statusCode,
        'code': code,
        'message': message
    };

    getTypeName() => "SelfServiceTransferResultBase";
    TypeContext? context = _ctx;
}

class SelfServiceTransferQuoteResult extends SelfServiceTransferResultBase implements IConvertible
{
    String? direction;
    double? priceDifference;
    double? sourceTicketPrice;
    double? targetTicketPrice;
    int? sourceEventId;
    String? sourceEventName;
    DateTime? sourceEventTimeOfEvent;
    int? toEventId;
    String? toEventName;
    DateTime? toEventTimeOfEvent;
    String? toTicketTypeName;
    bool? targetIsSeated;
    int? toSeatId;
    int? assignedSeatId;
    String? assignedSeatLabel;
    int? ticketsLeft;
    String? saleStatus;
    double? expectedPriceDifference;

    SelfServiceTransferQuoteResult({this.direction,this.priceDifference,this.sourceTicketPrice,this.targetTicketPrice,this.sourceEventId,this.sourceEventName,this.sourceEventTimeOfEvent,this.toEventId,this.toEventName,this.toEventTimeOfEvent,this.toTicketTypeName,this.targetIsSeated,this.toSeatId,this.assignedSeatId,this.assignedSeatLabel,this.ticketsLeft,this.saleStatus,this.expectedPriceDifference});
    SelfServiceTransferQuoteResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        direction = json['direction'];
        priceDifference = JsonConverters.toDouble(json['priceDifference']);
        sourceTicketPrice = JsonConverters.toDouble(json['sourceTicketPrice']);
        targetTicketPrice = JsonConverters.toDouble(json['targetTicketPrice']);
        sourceEventId = json['sourceEventId'];
        sourceEventName = json['sourceEventName'];
        sourceEventTimeOfEvent = JsonConverters.fromJson(json['sourceEventTimeOfEvent'],'DateTime',context!);
        toEventId = json['toEventId'];
        toEventName = json['toEventName'];
        toEventTimeOfEvent = JsonConverters.fromJson(json['toEventTimeOfEvent'],'DateTime',context!);
        toTicketTypeName = json['toTicketTypeName'];
        targetIsSeated = json['targetIsSeated'];
        toSeatId = json['toSeatId'];
        assignedSeatId = json['assignedSeatId'];
        assignedSeatLabel = json['assignedSeatLabel'];
        ticketsLeft = json['ticketsLeft'];
        saleStatus = json['saleStatus'];
        expectedPriceDifference = JsonConverters.toDouble(json['expectedPriceDifference']);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'direction': direction,
        'priceDifference': priceDifference,
        'sourceTicketPrice': sourceTicketPrice,
        'targetTicketPrice': targetTicketPrice,
        'sourceEventId': sourceEventId,
        'sourceEventName': sourceEventName,
        'sourceEventTimeOfEvent': JsonConverters.toJson(sourceEventTimeOfEvent,'DateTime',context!),
        'toEventId': toEventId,
        'toEventName': toEventName,
        'toEventTimeOfEvent': JsonConverters.toJson(toEventTimeOfEvent,'DateTime',context!),
        'toTicketTypeName': toTicketTypeName,
        'targetIsSeated': targetIsSeated,
        'toSeatId': toSeatId,
        'assignedSeatId': assignedSeatId,
        'assignedSeatLabel': assignedSeatLabel,
        'ticketsLeft': ticketsLeft,
        'saleStatus': saleStatus,
        'expectedPriceDifference': expectedPriceDifference
    });

    getTypeName() => "SelfServiceTransferQuoteResult";
    TypeContext? context = _ctx;
}

class SelfServiceTransferQuoteRequest implements IConvertible
{
    String? ticketTokenId;
    String? buyerPhone;
    int? toEventId;
    int? toOwnerTicketTypeId;
    int? toSeriesTicketTypeId;
    int? toSeatId;

    SelfServiceTransferQuoteRequest({this.ticketTokenId,this.buyerPhone,this.toEventId,this.toOwnerTicketTypeId,this.toSeriesTicketTypeId,this.toSeatId});
    SelfServiceTransferQuoteRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ticketTokenId = json['ticketTokenId'];
        buyerPhone = json['buyerPhone'];
        toEventId = json['toEventId'];
        toOwnerTicketTypeId = json['toOwnerTicketTypeId'];
        toSeriesTicketTypeId = json['toSeriesTicketTypeId'];
        toSeatId = json['toSeatId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ticketTokenId': ticketTokenId,
        'buyerPhone': buyerPhone,
        'toEventId': toEventId,
        'toOwnerTicketTypeId': toOwnerTicketTypeId,
        'toSeriesTicketTypeId': toSeriesTicketTypeId,
        'toSeatId': toSeatId
    };

    getTypeName() => "SelfServiceTransferQuoteRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'stubbur_app.azurewebsites.net', types: <String, TypeInfo> {
    'SelfServiceTransferResultBase': TypeInfo(TypeOf.Class, create:() => SelfServiceTransferResultBase()),
    'SelfServiceTransferQuoteResult': TypeInfo(TypeOf.Class, create:() => SelfServiceTransferQuoteResult()),
    'SelfServiceTransferQuoteRequest': TypeInfo(TypeOf.Class, create:() => SelfServiceTransferQuoteRequest()),
});

Dart SelfServiceTransferQuoteRequest 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 /selfService/transferTicket/quote HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<SelfServiceTransferQuoteRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
  <BuyerPhone>String</BuyerPhone>
  <TicketTokenId>String</TicketTokenId>
  <ToEventId>0</ToEventId>
  <ToOwnerTicketTypeId>0</ToOwnerTicketTypeId>
  <ToSeatId>0</ToSeatId>
  <ToSeriesTicketTypeId>0</ToSeriesTicketTypeId>
</SelfServiceTransferQuoteRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<SelfServiceTransferQuoteResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
  <Code>String</Code>
  <Message>String</Message>
  <Ok>false</Ok>
  <StatusCode>0</StatusCode>
  <AssignedSeatId>0</AssignedSeatId>
  <AssignedSeatLabel>String</AssignedSeatLabel>
  <Direction>String</Direction>
  <ExpectedPriceDifference>0</ExpectedPriceDifference>
  <PriceDifference>0</PriceDifference>
  <SaleStatus>String</SaleStatus>
  <SourceEventId>0</SourceEventId>
  <SourceEventName>String</SourceEventName>
  <SourceEventTimeOfEvent>0001-01-01T00:00:00</SourceEventTimeOfEvent>
  <SourceTicketPrice>0</SourceTicketPrice>
  <TargetIsSeated>false</TargetIsSeated>
  <TargetTicketPrice>0</TargetTicketPrice>
  <TicketsLeft>0</TicketsLeft>
  <ToEventId>0</ToEventId>
  <ToEventName>String</ToEventName>
  <ToEventTimeOfEvent>0001-01-01T00:00:00</ToEventTimeOfEvent>
  <ToSeatId>0</ToSeatId>
  <ToTicketTypeName>String</ToTicketTypeName>
</SelfServiceTransferQuoteResult>