TicketUserServices

<back to all web services

SelfServiceTransferTargetTicketTypesRequest

Requires Authentication
The following routes are available for this service:
POST/selfService/transferTicket/targetTicketTypesTicket types on the target event a buyer may exchange into, with per-option price difference and blocking reason
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 SelfServiceTargetTicketTypeOption implements IConvertible
{
    int? ownerTicketTypeId;
    int? seriesTicketTypeId;
    String? name;
    double? price;
    String? direction;
    double? priceDifference;
    bool? nameMatchesSource;
    bool? selectable;
    String? blockedReason;
    String? blockedMessage;
    int? maxTickets;
    int? ticketsSold;
    int? ticketsLeft;
    String? saleStatus;
    DateTime? saleStartsUTC;
    DateTime? saleEndsUTC;

    SelfServiceTargetTicketTypeOption({this.ownerTicketTypeId,this.seriesTicketTypeId,this.name,this.price,this.direction,this.priceDifference,this.nameMatchesSource,this.selectable,this.blockedReason,this.blockedMessage,this.maxTickets,this.ticketsSold,this.ticketsLeft,this.saleStatus,this.saleStartsUTC,this.saleEndsUTC});
    SelfServiceTargetTicketTypeOption.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ownerTicketTypeId = json['ownerTicketTypeId'];
        seriesTicketTypeId = json['seriesTicketTypeId'];
        name = json['name'];
        price = JsonConverters.toDouble(json['price']);
        direction = json['direction'];
        priceDifference = JsonConverters.toDouble(json['priceDifference']);
        nameMatchesSource = json['nameMatchesSource'];
        selectable = json['selectable'];
        blockedReason = json['blockedReason'];
        blockedMessage = json['blockedMessage'];
        maxTickets = json['maxTickets'];
        ticketsSold = json['ticketsSold'];
        ticketsLeft = json['ticketsLeft'];
        saleStatus = json['saleStatus'];
        saleStartsUTC = JsonConverters.fromJson(json['saleStartsUTC'],'DateTime',context!);
        saleEndsUTC = JsonConverters.fromJson(json['saleEndsUTC'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ownerTicketTypeId': ownerTicketTypeId,
        'seriesTicketTypeId': seriesTicketTypeId,
        'name': name,
        'price': price,
        'direction': direction,
        'priceDifference': priceDifference,
        'nameMatchesSource': nameMatchesSource,
        'selectable': selectable,
        'blockedReason': blockedReason,
        'blockedMessage': blockedMessage,
        'maxTickets': maxTickets,
        'ticketsSold': ticketsSold,
        'ticketsLeft': ticketsLeft,
        'saleStatus': saleStatus,
        'saleStartsUTC': JsonConverters.toJson(saleStartsUTC,'DateTime',context!),
        'saleEndsUTC': JsonConverters.toJson(saleEndsUTC,'DateTime',context!)
    };

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

class SelfServiceTransferTargetTicketTypesResult extends SelfServiceTransferResultBase implements IConvertible
{
    double? sourceTicketPrice;
    String? sourceTicketTypeName;
    int? toEventId;
    bool? targetIsSeated;
    List<SelfServiceTargetTicketTypeOption>? options;

    SelfServiceTransferTargetTicketTypesResult({this.sourceTicketPrice,this.sourceTicketTypeName,this.toEventId,this.targetIsSeated,this.options});
    SelfServiceTransferTargetTicketTypesResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        sourceTicketPrice = JsonConverters.toDouble(json['sourceTicketPrice']);
        sourceTicketTypeName = json['sourceTicketTypeName'];
        toEventId = json['toEventId'];
        targetIsSeated = json['targetIsSeated'];
        options = JsonConverters.fromJson(json['options'],'List<SelfServiceTargetTicketTypeOption>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'sourceTicketPrice': sourceTicketPrice,
        'sourceTicketTypeName': sourceTicketTypeName,
        'toEventId': toEventId,
        'targetIsSeated': targetIsSeated,
        'options': JsonConverters.toJson(options,'List<SelfServiceTargetTicketTypeOption>',context!)
    });

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

class SelfServiceTransferTargetTicketTypesRequest implements IConvertible
{
    String? ticketTokenId;
    String? buyerPhone;
    int? toEventId;
    int? sectionId;

    SelfServiceTransferTargetTicketTypesRequest({this.ticketTokenId,this.buyerPhone,this.toEventId,this.sectionId});
    SelfServiceTransferTargetTicketTypesRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

TypeContext _ctx = TypeContext(library: 'stubbur_app.azurewebsites.net', types: <String, TypeInfo> {
    'SelfServiceTransferResultBase': TypeInfo(TypeOf.Class, create:() => SelfServiceTransferResultBase()),
    'SelfServiceTargetTicketTypeOption': TypeInfo(TypeOf.Class, create:() => SelfServiceTargetTicketTypeOption()),
    'SelfServiceTransferTargetTicketTypesResult': TypeInfo(TypeOf.Class, create:() => SelfServiceTransferTargetTicketTypesResult()),
    'List<SelfServiceTargetTicketTypeOption>': TypeInfo(TypeOf.Class, create:() => <SelfServiceTargetTicketTypeOption>[]),
    'SelfServiceTransferTargetTicketTypesRequest': TypeInfo(TypeOf.Class, create:() => SelfServiceTransferTargetTicketTypesRequest()),
});

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

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

<SelfServiceTransferTargetTicketTypesResult 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>
  <Options>
    <SelfServiceTargetTicketTypeOption>
      <BlockedMessage>String</BlockedMessage>
      <BlockedReason>String</BlockedReason>
      <Direction>String</Direction>
      <MaxTickets>0</MaxTickets>
      <Name>String</Name>
      <NameMatchesSource>false</NameMatchesSource>
      <OwnerTicketTypeId>0</OwnerTicketTypeId>
      <Price>0</Price>
      <PriceDifference>0</PriceDifference>
      <SaleEndsUTC>0001-01-01T00:00:00</SaleEndsUTC>
      <SaleStartsUTC>0001-01-01T00:00:00</SaleStartsUTC>
      <SaleStatus>String</SaleStatus>
      <Selectable>false</Selectable>
      <SeriesTicketTypeId>0</SeriesTicketTypeId>
      <TicketsLeft>0</TicketsLeft>
      <TicketsSold>0</TicketsSold>
    </SelfServiceTargetTicketTypeOption>
  </Options>
  <SourceTicketPrice>0</SourceTicketPrice>
  <SourceTicketTypeName>String</SourceTicketTypeName>
  <TargetIsSeated>false</TargetIsSeated>
  <ToEventId>0</ToEventId>
</SelfServiceTransferTargetTicketTypesResult>