TicketUserServices

<back to all web services

SelfServiceCancelPendingRequest

Requires Authentication
The following routes are available for this service:
POST/selfService/transferTicket/cancelPendingCall off an unpaid exchange and keep the original ticket
import Foundation
import ServiceStack

public class SelfServiceCancelPendingRequest : Codable
{
    public var ticketTokenId:String?
    public var buyerPhone:String?
    public var transferLogId:Int?

    required public init(){}
}

public class SelfServiceCancelPendingResult : SelfServiceTransferResultBase
{
    public var transferLogId:Int?
    public var status:String?
    public var ticketTokenId:String?

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

    private enum CodingKeys : String, CodingKey {
        case transferLogId
        case status
        case ticketTokenId
    }

    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)
        status = try container.decodeIfPresent(String.self, forKey: .status)
        ticketTokenId = try container.decodeIfPresent(String.self, forKey: .ticketTokenId)
    }

    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 status != nil { try container.encode(status, forKey: .status) }
        if ticketTokenId != nil { try container.encode(ticketTokenId, forKey: .ticketTokenId) }
    }
}

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

    required public init(){}
}


Swift SelfServiceCancelPendingRequest 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/cancelPending HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"ticketTokenId":"String","buyerPhone":"String","transferLogId":0}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"transferLogId":0,"status":"String","ticketTokenId":"String","ok":false,"statusCode":0,"code":"String","message":"String"}