TicketUserServices

<back to all web services

SelfServicePendingTransferRequest

Requires Authentication
The following routes are available for this service:
POST/selfService/transferTicket/pendingThe buyer's unpaid exchange for this ticket, if one is in flight
import Foundation
import ServiceStack

public class SelfServicePendingTransferRequest : Codable
{
    public var ticketTokenId:String?
    public var buyerPhone:String?

    required public init(){}
}

public class SelfServicePendingTransferResult : SelfServiceTransferResultBase
{
    public var hasPending:Bool?
    public var pending:SelfServicePendingTransfer?

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

    private enum CodingKeys : String, CodingKey {
        case hasPending
        case pending
    }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
        let container = try decoder.container(keyedBy: CodingKeys.self)
        hasPending = try container.decodeIfPresent(Bool.self, forKey: .hasPending)
        pending = try container.decodeIfPresent(SelfServicePendingTransfer.self, forKey: .pending)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
        var container = encoder.container(keyedBy: CodingKeys.self)
        if hasPending != nil { try container.encode(hasPending, forKey: .hasPending) }
        if pending != nil { try container.encode(pending, forKey: .pending) }
    }
}

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 SelfServicePendingTransfer : Codable
{
    public var transferLogId:Int?
    public var toEventId:Int?
    public var toEventName:String?
    public var toEventTimeOfEvent:Date?
    public var toTicketTypeName:String?
    public var topupAmountIsk:Double?
    public var sessionToken:String?
    public var paymentLinkUrl:String?
    public var expiresAt:Date?
    public var assignedSeatId:Int?
    public var assignedSeatLabel:String?

    required public init(){}
}


Swift SelfServicePendingTransferRequest 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/pending HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	ticketTokenId: String,
	buyerPhone: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	hasPending: False,
	pending: 
	{
		transferLogId: 0,
		toEventId: 0,
		toEventName: String,
		toEventTimeOfEvent: 0001-01-01,
		toTicketTypeName: String,
		topupAmountIsk: 0,
		sessionToken: String,
		paymentLinkUrl: String,
		expiresAt: 0001-01-01,
		assignedSeatId: 0,
		assignedSeatLabel: String
	},
	ok: False,
	statusCode: 0,
	code: String,
	message: String
}