| GET | /equipment/{brand}/{posCode}/{articleCode}/{serialNumber}/eligibility | Get CPO Article Eligibility |
|---|
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
Object = TypeVar('Object')
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetCPOArticleEligibilityResponse:
can_be_bought_in: bool = False
is_invalid_serial_number_reference: bool = False
is_lost_or_stolen: bool = False
exists_in_stock: bool = False
exists_in_c_p_o_stock: bool = False
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetCPOArticleEligibility:
# @ApiMember(Description="Brand trigram (e.g. IWC)", IsRequired=true)
brand: Optional[str] = None
"""
Brand trigram (e.g. IWC)
"""
# @ApiMember(Description="POS Legacy Code (e.g. 102048)", IsRequired=true)
pos_code: Optional[str] = None
"""
POS Legacy Code (e.g. 102048)
"""
# @ApiMember(Description="Article Reference Code (e.g. CRWSTA0030)", IsRequired=true)
article_code: Optional[str] = None
"""
Article Reference Code (e.g. CRWSTA0030)
"""
# @ApiMember(Description="Serial Number", IsRequired=true)
serial_number: Optional[str] = None
"""
Serial Number
"""
Python GetCPOArticleEligibility DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /equipment/{brand}/{posCode}/{articleCode}/{serialNumber}/eligibility HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <GetCPOArticleEligibilityResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.MasterFile.ServiceModel"> <canBeBoughtIn>false</canBeBoughtIn> <existsInCPOStock>false</existsInCPOStock> <existsInStock>false</existsInStock> <isInvalidSerialNumberReference>false</isInvalidSerialNumberReference> <isLostOrStolen>false</isLostOrStolen> </GetCPOArticleEligibilityResponse>