/* Options: Date: 2025-12-06 06:28:35 SwiftVersion: 6.0 Version: 8.80 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.dev.dynamics.trendsic.com //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True //MakePropertiesOptional: True IncludeTypes: CommissionBatchSecuritiesRequest.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/v1/CommissionBatchSecurities", "GET,POST,OPTIONS") // @Route("/v1/CommissionBatchSecurities/{CommissionBatchId}", "GET,OPTIONS") public class CommissionBatchSecuritiesRequest : IReturn, Codable { public typealias Return = CommissionBatchSecuritiesResponse public var commissionBatchId:Int? public var ledger:[LedgerExtended] = [] required public init(){} } public class CommissionBatchSecuritiesResponse : Codable { public var responseStatus:ResponseStatus? public var reportData:[LedgerExtended] = [] required public init(){} } public class LedgerExtended : Ledger { public var agentFirstName:String? public var agentLastName:String? public var agentName:String? public var agentLevel:Double? public var payChexId:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case agentFirstName case agentLastName case agentName case agentLevel case payChexId } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) agentFirstName = try container.decodeIfPresent(String.self, forKey: .agentFirstName) agentLastName = try container.decodeIfPresent(String.self, forKey: .agentLastName) agentName = try container.decodeIfPresent(String.self, forKey: .agentName) agentLevel = try container.decodeIfPresent(Double.self, forKey: .agentLevel) payChexId = try container.decodeIfPresent(String.self, forKey: .payChexId) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if agentFirstName != nil { try container.encode(agentFirstName, forKey: .agentFirstName) } if agentLastName != nil { try container.encode(agentLastName, forKey: .agentLastName) } if agentName != nil { try container.encode(agentName, forKey: .agentName) } if agentLevel != nil { try container.encode(agentLevel, forKey: .agentLevel) } if payChexId != nil { try container.encode(payChexId, forKey: .payChexId) } } } public class Ledger : Codable { public var ledgerId:Int? public var agentId:Int? public var commissionBatchId:Int? public var rank:String? public var commissions:Double? public var clawbacks:Double? public var adjustments:Double? public var previousBalance:Double? public var asapCharges:Double? public var payout:Double? public var balanceForward:Double? required public init(){} }