Richemont.Booster2.PublicApi

<back to all web services

GetPosGroup

Requires Authentication
The following routes are available for this service:
GET/posGroupsGet the list of pos groups where user is authorized
import Foundation
import ServiceStack

public class GetPosGroup : Codable
{
    /**
    * 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<PosGroup>
{
    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 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) }
    }
}

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(){}
}


Swift GetPosGroup DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /posGroups HTTP/1.1 
Host: dev-api-booster.richemont.com 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

[]