TicketUserServices

<back to all web services

SelfServiceTransferConfirmRequest

Requires Authentication
The following routes are available for this service:
POST/selfService/transferTicket/confirmExecute a buyer-initiated ticket 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 TransferTopupInstruction implements IConvertible
{
    double? amountIsk;
    String? paymentLinkUrl;
    String? sessionToken;
    DateTime? expiresAt;

    TransferTopupInstruction({this.amountIsk,this.paymentLinkUrl,this.sessionToken,this.expiresAt});
    TransferTopupInstruction.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        amountIsk = JsonConverters.toDouble(json['amountIsk']);
        paymentLinkUrl = json['paymentLinkUrl'];
        sessionToken = json['sessionToken'];
        expiresAt = JsonConverters.fromJson(json['expiresAt'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'amountIsk': amountIsk,
        'paymentLinkUrl': paymentLinkUrl,
        'sessionToken': sessionToken,
        'expiresAt': JsonConverters.toJson(expiresAt,'DateTime',context!)
    };

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

class SelfServiceTransferConfirmResult extends SelfServiceTransferResultBase implements IConvertible
{
    int? transferLogId;
    String? newTicketTokenId;
    String? direction;
    double? priceDifference;
    double? originalTicketPrice;
    double? targetTicketPrice;
    int? assignedSeatId;
    String? assignedSeatLabel;
    TransferTopupInstruction? topup;

    SelfServiceTransferConfirmResult({this.transferLogId,this.newTicketTokenId,this.direction,this.priceDifference,this.originalTicketPrice,this.targetTicketPrice,this.assignedSeatId,this.assignedSeatLabel,this.topup});
    SelfServiceTransferConfirmResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        transferLogId = json['transferLogId'];
        newTicketTokenId = json['newTicketTokenId'];
        direction = json['direction'];
        priceDifference = JsonConverters.toDouble(json['priceDifference']);
        originalTicketPrice = JsonConverters.toDouble(json['originalTicketPrice']);
        targetTicketPrice = JsonConverters.toDouble(json['targetTicketPrice']);
        assignedSeatId = json['assignedSeatId'];
        assignedSeatLabel = json['assignedSeatLabel'];
        topup = JsonConverters.fromJson(json['topup'],'TransferTopupInstruction',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'transferLogId': transferLogId,
        'newTicketTokenId': newTicketTokenId,
        'direction': direction,
        'priceDifference': priceDifference,
        'originalTicketPrice': originalTicketPrice,
        'targetTicketPrice': targetTicketPrice,
        'assignedSeatId': assignedSeatId,
        'assignedSeatLabel': assignedSeatLabel,
        'topup': JsonConverters.toJson(topup,'TransferTopupInstruction',context!)
    });

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

class SelfServiceTransferConfirmRequest implements IConvertible
{
    String? ticketTokenId;
    String? buyerPhone;
    int? toEventId;
    int? toOwnerTicketTypeId;
    int? toSeriesTicketTypeId;
    int? toSeatId;
    String? idempotencyKey;
    double? expectedPriceDifference;

    SelfServiceTransferConfirmRequest({this.ticketTokenId,this.buyerPhone,this.toEventId,this.toOwnerTicketTypeId,this.toSeriesTicketTypeId,this.toSeatId,this.idempotencyKey,this.expectedPriceDifference});
    SelfServiceTransferConfirmRequest.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'];
        idempotencyKey = json['idempotencyKey'];
        expectedPriceDifference = JsonConverters.toDouble(json['expectedPriceDifference']);
        return this;
    }

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

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

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

Dart SelfServiceTransferConfirmRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /selfService/transferTicket/confirm HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	ticketTokenId: String,
	buyerPhone: String,
	toEventId: 0,
	toOwnerTicketTypeId: 0,
	toSeriesTicketTypeId: 0,
	toSeatId: 0,
	idempotencyKey: String,
	expectedPriceDifference: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	transferLogId: 0,
	newTicketTokenId: String,
	direction: String,
	priceDifference: 0,
	originalTicketPrice: 0,
	targetTicketPrice: 0,
	assignedSeatId: 0,
	assignedSeatLabel: String,
	topup: 
	{
		amountIsk: 0,
		paymentLinkUrl: String,
		sessionToken: String,
		expiresAt: 0001-01-01
	},
	ok: False,
	statusCode: 0,
	code: String,
	message: String
}