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 Foundation
import ServiceStack

public class SelfServiceTransferConfirmRequest : Codable
{
    public var ticketTokenId:String?
    public var buyerPhone:String?
    public var toEventId:Int?
    public var toOwnerTicketTypeId:Int?
    public var toSeriesTicketTypeId:Int?
    public var toSeatId:Int?
    public var idempotencyKey:String?
    public var expectedPriceDifference:Double?

    required public init(){}
}

public class SelfServiceTransferConfirmResult : SelfServiceTransferResultBase
{
    public var transferLogId:Int?
    public var newTicketTokenId:String?
    public var direction:String?
    public var priceDifference:Double?
    public var originalTicketPrice:Double?
    public var targetTicketPrice:Double?
    public var assignedSeatId:Int?
    public var assignedSeatLabel:String?
    public var topup:TransferTopupInstruction?

    required public init(){ super.init() }

    private enum CodingKeys : String, CodingKey {
        case transferLogId
        case newTicketTokenId
        case direction
        case priceDifference
        case originalTicketPrice
        case targetTicketPrice
        case assignedSeatId
        case assignedSeatLabel
        case topup
    }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
        let container = try decoder.container(keyedBy: CodingKeys.self)
        transferLogId = try container.decodeIfPresent(Int.self, forKey: .transferLogId)
        newTicketTokenId = try container.decodeIfPresent(String.self, forKey: .newTicketTokenId)
        direction = try container.decodeIfPresent(String.self, forKey: .direction)
        priceDifference = try container.decodeIfPresent(Double.self, forKey: .priceDifference)
        originalTicketPrice = try container.decodeIfPresent(Double.self, forKey: .originalTicketPrice)
        targetTicketPrice = try container.decodeIfPresent(Double.self, forKey: .targetTicketPrice)
        assignedSeatId = try container.decodeIfPresent(Int.self, forKey: .assignedSeatId)
        assignedSeatLabel = try container.decodeIfPresent(String.self, forKey: .assignedSeatLabel)
        topup = try container.decodeIfPresent(TransferTopupInstruction.self, forKey: .topup)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
        var container = encoder.container(keyedBy: CodingKeys.self)
        if transferLogId != nil { try container.encode(transferLogId, forKey: .transferLogId) }
        if newTicketTokenId != nil { try container.encode(newTicketTokenId, forKey: .newTicketTokenId) }
        if direction != nil { try container.encode(direction, forKey: .direction) }
        if priceDifference != nil { try container.encode(priceDifference, forKey: .priceDifference) }
        if originalTicketPrice != nil { try container.encode(originalTicketPrice, forKey: .originalTicketPrice) }
        if targetTicketPrice != nil { try container.encode(targetTicketPrice, forKey: .targetTicketPrice) }
        if assignedSeatId != nil { try container.encode(assignedSeatId, forKey: .assignedSeatId) }
        if assignedSeatLabel != nil { try container.encode(assignedSeatLabel, forKey: .assignedSeatLabel) }
        if topup != nil { try container.encode(topup, forKey: .topup) }
    }
}

public class SelfServiceTransferResultBase : Codable
{
    public var ok:Bool?
    public var statusCode:Int?
    public var code:String?
    public var message:String?

    required public init(){}
}

public class TransferTopupInstruction : Codable
{
    public var amountIsk:Double?
    public var paymentLinkUrl:String?
    public var sessionToken:String?
    public var expiresAt:Date?

    required public init(){}
}


Swift SelfServiceTransferConfirmRequest DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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/json
Content-Type: application/json
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: application/json
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-01T00:00:00.0000000"},"ok":false,"statusCode":0,"code":"String","message":"String"}