| GET | /warranty/v1/sites |
|---|
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
TResponse = TypeVar('TResponse')
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BaseRequest(Generic[TResponse], IRequest):
sid: Optional[str] = None
app: Optional[str] = None
_os: Optional[str] = None
_app_version: Optional[str] = None
_search_method: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BaseResponse(IRespose):
_xmlns: Optional[str] = None
_type: Optional[str] = None
_source: Optional[str] = None
_tstamp: Optional[str] = None
_user: Optional[str] = None
_env: Optional[str] = None
_uri: Optional[str] = None
_query: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Address:
line1: Optional[str] = None
city: Optional[str] = None
zip_code: Optional[str] = None
country_code: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Brand:
brand: Optional[str] = None
last_stock_taking_date: Optional[str] = None
is_automatic_invoice_number_enabled: int = 0
sale_rep_required: bool = False
crm_sale_rep_required: bool = False
show_promoter_type: bool = False
stock_owner: int = 0
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class User(ILookupString):
object: Optional[str] = None
id: Optional[str] = None
brand: Optional[str] = None
display_name: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Site(ILookupInt):
object: Optional[str] = None
id: int = 0
name: Optional[str] = None
address: Optional[Address] = None
brands: Optional[List[Brand]] = None
users: Optional[List[User]] = None
is_nfc_active: int = 0
is_i_os_emb_reader_enable: int = 0
crm_privacy_policy_mandatory: bool = False
crm_allow_store_data_abroad_visible: bool = False
display_first_last_name_not_latin: bool = False
language_transliteration: Optional[str] = None
crm_privacy_policy_time_vallee_mandatory: bool = False
crm_allow_store_data_abroad_time_vallee_visible: bool = False
allow_to_create_end_customer_outside_china: bool = False
is_time_vallee: bool = False
do_not_display_p_o_s_data_in_disclaimers: bool = False
crm_first_name_mandatory: bool = False
manage_own_stock: bool = False
crm_city_mandatory: bool = False
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SitesResponse(BaseResponse):
sites: Optional[List[Site]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SitesRequest(BaseRequest[SitesResponse]):
pass
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 /warranty/v1/sites HTTP/1.1 Host: qp-microservices-booster.richemont.com Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
sites:
[
{
object: String,
id: 0,
name: String,
address:
{
line1: String,
city: String,
zipCode: String,
countryCode: String
},
brands:
[
{
brand: String,
lastStockTakingDate: String,
isAutomaticInvoiceNumberEnabled: 0,
saleRepRequired: False,
crmSaleRepRequired: False,
showPromoterType: False,
stockOwner: 0
}
],
users:
[
{
object: String,
id: String,
brand: String,
displayName: String
}
],
isNfcActive: 0,
isIOsEmbReaderEnable: 0,
crmPrivacyPolicyMandatory: False,
crmAllowStoreDataAbroadVisible: False,
displayFirstLastNameNotLatin: False,
languageTransliteration: String,
crmPrivacyPolicyTimeValleeMandatory: False,
crmAllowStoreDataAbroadTimeValleeVisible: False,
allowToCreateEndCustomerOutsideChina: False,
isTimeVallee: False,
doNotDisplayPOSDataInDisclaimers: False,
crmFirstNameMandatory: False,
manageOwnStock: False,
crmCityMandatory: False
}
],
_xmlns: String,
_type: String,
_source: String,
_tstamp: String,
_user: String,
_env: String,
_uri: String,
_query: String
}