/* Options: Date: 2026-10-01 10:22:00 SwiftVersion: 5.0 Version: 6.10 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://stubbur-app.azurewebsites.net //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True IncludeTypes: SelfServiceTransferTargetEventsRequest.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/selfService/transferTicket/targetEvents", "POST") public class SelfServiceTransferTargetEventsRequest : IReturn, Codable { public typealias Return = SelfServiceTransferTargetEventsResult public var ticketTokenId:String? public var buyerPhone:String? required public init(){} } public class SelfServiceTransferTargetEventsResult : SelfServiceTransferResultBase { public var eventSeriesId:Int? public var sourceEventId:Int? public var sourceEventName:String? public var sourceEventTimeOfEvent:Date? public var sourceTicketPrice:Double? public var sourceTicketTypeName:String? public var events:[SelfServiceTargetEvent] = [] required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case eventSeriesId case sourceEventId case sourceEventName case sourceEventTimeOfEvent case sourceTicketPrice case sourceTicketTypeName case events } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) eventSeriesId = try container.decodeIfPresent(Int.self, forKey: .eventSeriesId) sourceEventId = try container.decodeIfPresent(Int.self, forKey: .sourceEventId) sourceEventName = try container.decodeIfPresent(String.self, forKey: .sourceEventName) sourceEventTimeOfEvent = try container.decodeIfPresent(Date.self, forKey: .sourceEventTimeOfEvent) sourceTicketPrice = try container.decodeIfPresent(Double.self, forKey: .sourceTicketPrice) sourceTicketTypeName = try container.decodeIfPresent(String.self, forKey: .sourceTicketTypeName) events = try container.decodeIfPresent([SelfServiceTargetEvent].self, forKey: .events) ?? [] } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if eventSeriesId != nil { try container.encode(eventSeriesId, forKey: .eventSeriesId) } if sourceEventId != nil { try container.encode(sourceEventId, forKey: .sourceEventId) } if sourceEventName != nil { try container.encode(sourceEventName, forKey: .sourceEventName) } if sourceEventTimeOfEvent != nil { try container.encode(sourceEventTimeOfEvent, forKey: .sourceEventTimeOfEvent) } if sourceTicketPrice != nil { try container.encode(sourceTicketPrice, forKey: .sourceTicketPrice) } if sourceTicketTypeName != nil { try container.encode(sourceTicketTypeName, forKey: .sourceTicketTypeName) } if events.count > 0 { try container.encode(events, forKey: .events) } } } public class SelfServiceTargetEvent : Codable { public var eventId:Int? public var eventName:String? public var timeOfEvent:Date? public var isSeated:Bool? public var isSourceEvent:Bool? public var saleNotOpenYet:Bool? public var ticketSaleStartsUTC:Date? required public init(){} } public class SelfServiceTransferResultBase : Codable { public var ok:Bool? public var statusCode:Int? public var code:String? public var message:String? required public init(){} }