| GET | /security/pos | Get the list of pos groups where user is authorized |
|---|
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Scope:
# @ApiMember(Description="Scope Code - combination of BU / Brand", IsRequired=true)
scope_code: Optional[str] = None
"""
Scope Code - combination of BU / Brand
"""
# @ApiMember(Description="Business Unit Code", IsRequired=true)
bu_code: Optional[str] = None
"""
Business Unit Code
"""
# @ApiMember(Description="Brand Trigram", IsRequired=true)
brand: Optional[str] = None
"""
Brand Trigram
"""
# @ApiMember(Description="Description of the combination", IsRequired=true)
description: Optional[str] = None
"""
Description of the combination
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PosBrand(Scope):
# @ApiMember(Description="Pos code", IsRequired=true)
pos_code: Optional[str] = None
"""
Pos code
"""
# @ApiMember(Description="Pos name", IsRequired=true)
name: Optional[str] = None
"""
Pos name
"""
# @ApiMember(Description="Pos city", IsRequired=true)
city: Optional[str] = None
"""
Pos city
"""
# @ApiMember(Description="Pos address", IsRequired=true)
address: Optional[str] = None
"""
Pos address
"""
# @ApiMember(Description="Pos country", IsRequired=true)
country: Optional[str] = None
"""
Pos country
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetPosBrandResponse:
# @ApiMember(Description="Index of the result set returnedr", IsRequired=true)
page: int = 0
"""
Index of the result set returnedr
"""
# @ApiMember(Description="Size of the result set returned", IsRequired=true)
items: int = 0
"""
Size of the result set returned
"""
# @ApiMember(Description="Total amount of pages / result sets", IsRequired=true)
total_pages: int = 0
"""
Total amount of pages / result sets
"""
# @ApiMember(Description="Total amount of results", IsRequired=true)
total_results: int = 0
"""
Total amount of results
"""
# @ApiMember(Description="List of Users", IsRequired=true)
elements: Optional[List[PosBrand]] = None
"""
List of Users
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetPosBrand(IPagedRequest):
# @ApiMember(Description="Brand Trigram", IsRequired=true)
brand: Optional[str] = None
"""
Brand Trigram
"""
# @ApiMember(Description="Mnemonic Code to Check")
mnemonic_code: Optional[str] = None
"""
Mnemonic Code to Check
"""
# @ApiMember(Description="Business Unit Code")
bu_code: Optional[str] = None
"""
Business Unit Code
"""
# @ApiMember(Description="Index of the result set returned", IsRequired=true)
page: int = 0
"""
Index of the result set returned
"""
# @ApiMember(Description="Size of the result set returned", IsRequired=true)
items: int = 0
"""
Size of the result set returned
"""
# @ApiMember(Description="Omit precise record count - save on performance")
no_count: bool = False
"""
Omit precise record count - save on performance
"""
# @ApiMember(Description="Sorting expression")
sort_by: Optional[str] = None
"""
Sorting expression
"""
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
page: 0,
items: 0,
totalPages: 0,
totalResults: 0
}