/* Options: Date: 2025-12-06 06:01:54 SwiftVersion: 6.0 Version: 8.80 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.sbbet-prod-mnta.webhop.biz //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True //MakePropertiesOptional: True IncludeTypes: ReportBetPayouts.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/bets/payout", "POST") public class ReportBetPayouts : IReturn, Codable { public typealias Return = ResponseStatus public var betPayouts:RecordList? required public init(){} } public class RecordList : List { required public init(){ super.init() } required public init(from decoder: Decoder) throws { try super.init(from: decoder) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) } } public class WinDto : TransactionDtoBase { public var bet_transaction_id:String? public var ticket_id:String? public var win_odds:Double? public var win_type:WinType? public var bonus:Double? public var cancel:Bool? public var canceled_events:RecordList? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case bet_transaction_id case ticket_id case win_odds case win_type case bonus case cancel case canceled_events } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) bet_transaction_id = try container.decodeIfPresent(String.self, forKey: .bet_transaction_id) ticket_id = try container.decodeIfPresent(String.self, forKey: .ticket_id) win_odds = try container.decodeIfPresent(Double.self, forKey: .win_odds) win_type = try container.decodeIfPresent(WinType.self, forKey: .win_type) bonus = try container.decodeIfPresent(Double.self, forKey: .bonus) cancel = try container.decodeIfPresent(Bool.self, forKey: .cancel) canceled_events = try container.decodeIfPresent(RecordList.self, forKey: .canceled_events) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if bet_transaction_id != nil { try container.encode(bet_transaction_id, forKey: .bet_transaction_id) } if ticket_id != nil { try container.encode(ticket_id, forKey: .ticket_id) } if win_odds != nil { try container.encode(win_odds, forKey: .win_odds) } if win_type != nil { try container.encode(win_type, forKey: .win_type) } if bonus != nil { try container.encode(bonus, forKey: .bonus) } if cancel != nil { try container.encode(cancel, forKey: .cancel) } if canceled_events != nil { try container.encode(canceled_events, forKey: .canceled_events) } } } public enum BetSource : Int, Codable { case Landbase = 0 case Web = 1 } public class TransactionDtoBase : Codable { public var transaction_id:String? public var transaction_time:Date? public var transaction_amount:Double? public var game_name:String? public var betting_place_id:String? public var betting_terminal_id:String? public var jmbg:String? public var passport_number:String? public var source:BetSource? public var identification_document_country:String? public var identification_document_type:String? required public init(){} } public enum WinType : Int, Codable { case Regular = 0 case Cashback = 1 case Cashout = 2 } public protocol IBetEvent { }