/* Options: Date: 2026-05-19 09:52:29 SwiftVersion: 5.0 Version: 8.22 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://dev-api-booster.richemont.com //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True IncludeTypes: GetPosGroup.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/posGroups", "GET") public class GetPosGroup : IReturn, Codable { public typealias Return = GetPosGroupResponse /** * Brand Trigram */ // @ApiMember(Description="Brand Trigram", IsRequired=true) public var brand:String /** * Business Unit Code */ // @ApiMember(Description="Business Unit Code", IsRequired=true) public var buCode:String required public init(){} } public class GetPosGroupResponse : 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 Scope : Codable { /** * Scope Code - combination of BU / Brand */ // @ApiMember(Description="Scope Code - combination of BU / Brand", IsRequired=true) public var scopeCode:String /** * Business Unit Code */ // @ApiMember(Description="Business Unit Code", IsRequired=true) public var buCode:String /** * Brand Trigram */ // @ApiMember(Description="Brand Trigram", IsRequired=true) public var brand:String /** * Description of the combination */ // @ApiMember(Description="Description of the combination", IsRequired=true) public var Description:String required public init(){} } public class PosGroup : Scope { /** * Pos Group code */ // @ApiMember(Description="Pos Group code", IsRequired=true) public var posGroupCode:Int /** * Pos Group Description */ // @ApiMember(Description="Pos Group Description", IsRequired=true) public var posGroupDs:String /** * Define if user is authorized to this pos group */ // @ApiMember(Description="Define if user is authorized to this pos group", IsRequired=true) public var isAuthorized:Bool required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case posGroupCode case posGroupDs case isAuthorized } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) posGroupCode = try container.decodeIfPresent(Int.self, forKey: .posGroupCode) posGroupDs = try container.decodeIfPresent(String.self, forKey: .posGroupDs) isAuthorized = try container.decodeIfPresent(Bool.self, forKey: .isAuthorized) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if posGroupCode != nil { try container.encode(posGroupCode, forKey: .posGroupCode) } if posGroupDs != nil { try container.encode(posGroupDs, forKey: .posGroupDs) } if isAuthorized != nil { try container.encode(isAuthorized, forKey: .isAuthorized) } } }