Booster.Microservices

<back to all web services

RetrieveWarrantyCardRequest

Requires Authentication
The following routes are available for this service:
GET/warranty/v1/card/{cardId}
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 LookupInt(ILookupInt):
    object: Optional[str] = None
    id: int = 0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Article:
    ref: Optional[str] = None
    serial: Optional[str] = None
    name: Optional[str] = None
    site: Optional[LookupInt] = None
    brand: Optional[str] = None
    is_consignment: bool = False


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Address:
    line1: Optional[str] = None
    line2: 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 Site:
    object: Optional[str] = None
    id: Optional[str] = None
    name: Optional[str] = None
    address: Optional[Address] = None
    crm_privacy_policy_mandatory: bool = False
    crm_allow_store_data_abroad_visible: bool = False
    is_time_vallee: bool = False
    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
    display_first_last_name_not_latin: bool = False
    language_transliteration: Optional[str] = None
    do_not_display_p_o_s_data_in_disclaimers: bool = False
    crm_first_name_mandatory: bool = False
    crm_city_mandatory: bool = False
    manage_own_stock: bool = False


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Warranty:
    article: Optional[List[Article]] = None
    warranty_id: Optional[str] = None
    created_by: Optional[str] = None
    created_at: Optional[str] = None
    issued_by: Optional[str] = None
    sellout_id: Optional[str] = None
    activation_date: Optional[str] = None
    pin: Optional[str] = None
    promoter_type_id: Optional[str] = None
    promoter_type_ds: Optional[str] = None
    site: Optional[Site] = None
    crm_enabled: bool = False
    can_be_extended: bool = False
    can_be_retriggered: bool = False


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class RetrieveWarrantyCardResponse(BaseResponse):
    warranty: Optional[Warranty] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class RetrieveWarrantyCardRequest(BaseRequest[RetrieveWarrantyCardResponse]):
    card_id: Optional[str] = None

Python RetrieveWarrantyCardRequest 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 /warranty/v1/card/{cardId} HTTP/1.1 
Host: qp-microservices-booster.richemont.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<RetrieveWarrantyCardResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Sale">
  <_env xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Common">String</_env>
  <_query xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Common">String</_query>
  <_source xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Common">String</_source>
  <_tstamp xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Common">String</_tstamp>
  <_type xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Common">String</_type>
  <_uri xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Common">String</_uri>
  <_user xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Common">String</_user>
  <_xmlns xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Common">String</_xmlns>
  <warranty>
    <activationDate>String</activationDate>
    <article>
      <Article>
        <brand>String</brand>
        <isConsignment>false</isConsignment>
        <name>String</name>
        <ref>String</ref>
        <serial>String</serial>
        <shortDesc>String</shortDesc>
        <warrantyStatusCode>String</warrantyStatusCode>
        <warrantyStatusDesc>String</warrantyStatusDesc>
        <warrantyStatusId>0</warrantyStatusId>
      </Article>
    </article>
    <canBeExtended>false</canBeExtended>
    <canBeRetriggered>false</canBeRetriggered>
    <createdAt>String</createdAt>
    <createdBy>String</createdBy>
    <crmEnabled>false</crmEnabled>
    <issuedBy>String</issuedBy>
    <pin>String</pin>
    <promoterTypeDs>String</promoterTypeDs>
    <promoterTypeId>String</promoterTypeId>
    <selloutId>String</selloutId>
    <site>
      <address>
        <city>String</city>
        <countryCode>String</countryCode>
        <line1>String</line1>
        <line2>String</line2>
        <zipCode>String</zipCode>
      </address>
      <allowToCreateEndCustomerOutsideChina>false</allowToCreateEndCustomerOutsideChina>
      <crmAllowStoreDataAbroadTimeValleeVisible>false</crmAllowStoreDataAbroadTimeValleeVisible>
      <crmAllowStoreDataAbroadVisible>false</crmAllowStoreDataAbroadVisible>
      <crmCityMandatory>false</crmCityMandatory>
      <crmFirstNameMandatory>false</crmFirstNameMandatory>
      <crmPrivacyPolicyMandatory>false</crmPrivacyPolicyMandatory>
      <crmPrivacyPolicyTimeValleeMandatory>false</crmPrivacyPolicyTimeValleeMandatory>
      <displayFirstLastNameNotLatin>false</displayFirstLastNameNotLatin>
      <doNotDisplayPOSDataInDisclaimers>false</doNotDisplayPOSDataInDisclaimers>
      <id>String</id>
      <isTimeVallee>false</isTimeVallee>
      <languageTransliteration>String</languageTransliteration>
      <manageOwnStock>false</manageOwnStock>
      <name>String</name>
      <object>String</object>
    </site>
    <warrantyId>String</warrantyId>
  </warranty>
</RetrieveWarrantyCardResponse>