| GET | /security/pos | Get 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(){}
}
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
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/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"page":0,"items":0,"totalPages":0,"totalResults":0}