TicketUserServices

<back to all web services

TransferTicketQuoteRequest

Requires Authentication
Requires any of the roles:Admin, TeamAdminRequires the permission:ReadData
The following routes are available for this service:
POST/transferTicket/quoteRead-only price-diff lookup for a prospective ticket transfer
import 'package:servicestack/servicestack.dart';

class TransferQuoteEventSide implements IConvertible
{
    int? eventId;
    String? eventName;
    DateTime? timeOfEvent;
    double? ticketPrice;
    String? paymentMethodId;
    String? paymentReference;
    int? availableSeats;

    TransferQuoteEventSide({this.eventId,this.eventName,this.timeOfEvent,this.ticketPrice,this.paymentMethodId,this.paymentReference,this.availableSeats});
    TransferQuoteEventSide.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        eventId = json['eventId'];
        eventName = json['eventName'];
        timeOfEvent = JsonConverters.fromJson(json['timeOfEvent'],'DateTime',context!);
        ticketPrice = JsonConverters.toDouble(json['ticketPrice']);
        paymentMethodId = json['paymentMethodId'];
        paymentReference = json['paymentReference'];
        availableSeats = json['availableSeats'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'eventId': eventId,
        'eventName': eventName,
        'timeOfEvent': JsonConverters.toJson(timeOfEvent,'DateTime',context!),
        'ticketPrice': ticketPrice,
        'paymentMethodId': paymentMethodId,
        'paymentReference': paymentReference,
        'availableSeats': availableSeats
    };

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

class TransferTicketQuoteResult implements IConvertible
{
    bool? ok;
    int? statusCode;
    String? code;
    String? message;
    TransferQuoteEventSide? from;
    TransferQuoteEventSide? to;
    double? priceDifference;
    String? direction;
    bool? refundableViaBorgun;
    bool? afterPayout;

    TransferTicketQuoteResult({this.ok,this.statusCode,this.code,this.message,this.from,this.to,this.priceDifference,this.direction,this.refundableViaBorgun,this.afterPayout});
    TransferTicketQuoteResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ok = json['ok'];
        statusCode = json['statusCode'];
        code = json['code'];
        message = json['message'];
        from = JsonConverters.fromJson(json['from'],'TransferQuoteEventSide',context!);
        to = JsonConverters.fromJson(json['to'],'TransferQuoteEventSide',context!);
        priceDifference = JsonConverters.toDouble(json['priceDifference']);
        direction = json['direction'];
        refundableViaBorgun = json['refundableViaBorgun'];
        afterPayout = json['afterPayout'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ok': ok,
        'statusCode': statusCode,
        'code': code,
        'message': message,
        'from': JsonConverters.toJson(from,'TransferQuoteEventSide',context!),
        'to': JsonConverters.toJson(to,'TransferQuoteEventSide',context!),
        'priceDifference': priceDifference,
        'direction': direction,
        'refundableViaBorgun': refundableViaBorgun,
        'afterPayout': afterPayout
    };

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

class TransferTicketQuoteRequest implements IConvertible
{
    String? ticketTokenId;
    int? toEventId;
    int? userId;
    int? toOwnerTicketTypeId;
    int? toSeriesTicketTypeId;

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

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

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

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

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

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

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

<TransferTicketQuoteResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
  <AfterPayout>false</AfterPayout>
  <Code>String</Code>
  <Direction>String</Direction>
  <From>
    <AvailableSeats>0</AvailableSeats>
    <EventId>0</EventId>
    <EventName>String</EventName>
    <PaymentMethodId>String</PaymentMethodId>
    <PaymentReference>String</PaymentReference>
    <TicketPrice>0</TicketPrice>
    <TimeOfEvent>0001-01-01T00:00:00</TimeOfEvent>
  </From>
  <Message>String</Message>
  <Ok>false</Ok>
  <PriceDifference>0</PriceDifference>
  <RefundableViaBorgun>false</RefundableViaBorgun>
  <StatusCode>0</StatusCode>
  <To>
    <AvailableSeats>0</AvailableSeats>
    <EventId>0</EventId>
    <EventName>String</EventName>
    <PaymentMethodId>String</PaymentMethodId>
    <PaymentReference>String</PaymentReference>
    <TicketPrice>0</TicketPrice>
    <TimeOfEvent>0001-01-01T00:00:00</TimeOfEvent>
  </To>
</TransferTicketQuoteResult>