/* Options: Date: 2024-12-22 01:32:38 SwiftVersion: 5.0 Version: 8.12 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://taxfiling.pwc.de //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True IncludeTypes: BatchCheckElsterAsync.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack /** * An asynchronous service to perform basic checks on a batch of tax data. */ // @Route("/BatchCheckElsterAsync", "POST") // @Api(Description="An asynchronous service to perform basic checks on a batch of tax data.") public class BatchCheckElsterAsync : BatchCheckElsterBase, IReturn { public typealias Return = [ElsterCheckResponse] /** * The batch of ELSTER tax data to check. */ // @ApiMember(Description="The batch of ELSTER tax data to check.", Name="Data") public var data:[TaxData] = [] required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case data } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) data = try container.decodeIfPresent([TaxData].self, forKey: .data) ?? [] } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if data.count > 0 { try container.encode(data, forKey: .data) } } } /** * Represents a structure that encapsulates a tax declaration. */ // @Api(Description="Represents a structure that encapsulates a tax declaration.") public class TaxData : Codable { /** * The unique identifier of the tax data. */ // @ApiMember(Description="The unique identifier of the tax data.", IsRequired=true) public var id:String /** * The XML-based tax declaration. */ // @ApiMember(Description="The XML-based tax declaration.", IsRequired=true) public var content:String required public init(){} } /** * A base service to perform basic checks on a batch of tax data. */ // @Api(Description="A base service to perform basic checks on a batch of tax data.") public class BatchCheckElsterBase : IPost, Codable { /** * The batch of ELSTER tax data to check. */ // @ApiMember(Description="The batch of ELSTER tax data to check.", Name="Data") public var data:[TaxData] = [] required public init(){} }