Richemont.Booster2.PublicApi

<back to all web services

GetPosBrand

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

public class GetPosBrand : IPagedRequest, Codable
{
    /**
    * Brand Trigram
    */
    // @ApiMember(Description="Brand Trigram", IsRequired=true)
    public var brand:String

    /**
    * Mnemonic Code to Check
    */
    // @ApiMember(Description="Mnemonic Code to Check")
    public var mnemonicCode:String

    /**
    * Business Unit Code
    */
    // @ApiMember(Description="Business Unit Code")
    public var buCode:String

    /**
    * Index of the result set returned
    */
    // @ApiMember(Description="Index of the result set returned", IsRequired=true)
    public var page:Int

    /**
    * Size of the result set returned
    */
    // @ApiMember(Description="Size of the result set returned", IsRequired=true)
    public var items:Int

    /**
    * Omit precise record count - save on performance
    */
    // @ApiMember(Description="Omit precise record count - save on performance")
    public var noCount:Bool

    /**
    * Sorting expression
    */
    // @ApiMember(Description="Sorting expression")
    public var sortBy:String

    required public init(){}
}

public class GetPosBrandResponse : Codable
{
    /**
    * Index of the result set returnedr
    */
    // @ApiMember(Description="Index of the result set returnedr", IsRequired=true)
    public var page:Int

    /**
    * Size of the result set returned
    */
    // @ApiMember(Description="Size of the result set returned", IsRequired=true)
    public var items:Int

    /**
    * Total amount of pages / result sets
    */
    // @ApiMember(Description="Total amount of pages / result sets", IsRequired=true)
    public var totalPages:Int

    /**
    * Total amount of results
    */
    // @ApiMember(Description="Total amount of results", IsRequired=true)
    public var totalResults:Int

    /**
    * List of Users
    */
    // @ApiMember(Description="List of Users", IsRequired=true)
    public var elements:[PosBrand] = []

    required public init(){}
}

public class PosBrand : Scope
{
    /**
    * Pos code
    */
    // @ApiMember(Description="Pos code", IsRequired=true)
    public var posCode:String

    /**
    * Pos name
    */
    // @ApiMember(Description="Pos name", IsRequired=true)
    public var name:String

    /**
    * Pos city
    */
    // @ApiMember(Description="Pos city", IsRequired=true)
    public var city:String

    /**
    * Pos address
    */
    // @ApiMember(Description="Pos address", IsRequired=true)
    public var address:String

    /**
    * Pos country
    */
    // @ApiMember(Description="Pos country", IsRequired=true)
    public var country:String

    required public init(){ super.init() }

    private enum CodingKeys : String, CodingKey {
        case posCode
        case name
        case city
        case address
        case country
    }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
        let container = try decoder.container(keyedBy: CodingKeys.self)
        posCode = try container.decodeIfPresent(String.self, forKey: .posCode)
        name = try container.decodeIfPresent(String.self, forKey: .name)
        city = try container.decodeIfPresent(String.self, forKey: .city)
        address = try container.decodeIfPresent(String.self, forKey: .address)
        country = try container.decodeIfPresent(String.self, forKey: .country)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
        var container = encoder.container(keyedBy: CodingKeys.self)
        if posCode != nil { try container.encode(posCode, forKey: .posCode) }
        if name != nil { try container.encode(name, forKey: .name) }
        if city != nil { try container.encode(city, forKey: .city) }
        if address != nil { try container.encode(address, forKey: .address) }
        if country != nil { try container.encode(country, forKey: .country) }
    }
}

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 GetPosBrand DTOs

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

HTTP + XML

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

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

<GetPosBrandResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.Security.ServiceModel">
  <elements i:nil="true" />
  <items>0</items>
  <page>0</page>
  <totalPages>0</totalPages>
  <totalResults>0</totalResults>
</GetPosBrandResponse>