| POST | /selfService/transferTicket/confirm | Execute 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 .xml suffix or ?format=xml
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: application/xml
Content-Type: application/xml
Content-Length: length
<SelfServiceTransferConfirmRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<BuyerPhone>String</BuyerPhone>
<ExpectedPriceDifference>0</ExpectedPriceDifference>
<IdempotencyKey>String</IdempotencyKey>
<TicketTokenId>String</TicketTokenId>
<ToEventId>0</ToEventId>
<ToOwnerTicketTypeId>0</ToOwnerTicketTypeId>
<ToSeatId>0</ToSeatId>
<ToSeriesTicketTypeId>0</ToSeriesTicketTypeId>
</SelfServiceTransferConfirmRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<SelfServiceTransferConfirmResult 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>
<NewTicketTokenId>String</NewTicketTokenId>
<OriginalTicketPrice>0</OriginalTicketPrice>
<PriceDifference>0</PriceDifference>
<TargetTicketPrice>0</TargetTicketPrice>
<Topup>
<AmountIsk>0</AmountIsk>
<ExpiresAt>0001-01-01T00:00:00</ExpiresAt>
<PaymentLinkUrl>String</PaymentLinkUrl>
<SessionToken>String</SessionToken>
</Topup>
<TransferLogId>0</TransferLogId>
</SelfServiceTransferConfirmResult>