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 .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/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>