""" Options: Date: 2026-10-06 07:20:18 Version: 10.08 Tip: To override a DTO option, remove "#" prefix before updating BaseUrl: https://dev-api-booster.richemont.com #GlobalNamespace: #AddServiceStackTypes: True #AddResponseStatus: False #AddImplicitVersion: #AddDescriptionAsComments: True IncludeTypes: GetBuyInPaginated.* #ExcludeTypes: #DefaultImports: datetime,decimal,marshmallow.fields:*,servicestack:*,typing:*,dataclasses:dataclass/field,dataclasses_json:dataclass_json/LetterCase/Undefined/config,enum:Enum/IntEnum #DataClass: #DataClassJson: """ 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 BuyIn: # @ApiMember(Description="Brand Trigram, e.g. CAR, IWC; compulsory only if articleCode is not provided", IsRequired=true) brand: Optional[str] = None """ Brand Trigram, e.g. CAR, IWC; compulsory only if articleCode is not provided """ # @ApiMember(Description="Code of BuyIn", IsRequired=true) buy_in_order_id: int = 0 """ Code of BuyIn """ # @ApiMember(Description="Richemont POS code", IsRequired=true) pos_code: Optional[str] = None """ Richemont POS code """ # @ApiMember(Description="Richemont Reference Code of the item", IsRequired=true) article_code: Optional[str] = None """ Richemont Reference Code of the item """ # @ApiMember(Description="Serial Number of the item") serial_number: Optional[str] = None """ Serial Number of the item """ # @ApiMember(Description="Buy-in order status code") buy_in_status_id: Optional[str] = None """ Buy-in order status code """ # @ApiMember(Description="Buy-in creation date") buy_in_date: datetime.datetime = datetime.datetime(1, 1, 1) """ Buy-in creation date """ # @ApiMember(Description="Emails of Sale Representatives") sale_representative_emails: List[str] = field(default_factory=list) """ Emails of Sale Representatives """ # @ApiMember(Description="True is the buy-in’s piece is in stock, False otherwise") is_in_stock: bool = False """ True is the buy-in’s piece is in stock, False otherwise """ @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class GetBuyInPaginatedResponse: # @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 Sale Details", IsRequired=true) elements: Optional[List[BuyIn]] = None """ List of Sale Details """ # @Route("/buyin/{brand}", "GET") @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class GetBuyInPaginated(IReturn[GetBuyInPaginatedResponse]): # @ApiMember(Description="Richemont Brand ID") brand: Optional[str] = None """ Richemont Brand ID """ # @ApiMember(Description="Richemont POS code", IsRequired=true) pos_code: Optional[str] = None """ Richemont POS code """ # @ApiMember(Description="Richemont Reference Code of the item") article_code: Optional[str] = None """ Richemont Reference Code of the item """ # @ApiMember(Description="Serial Number of the item") serial_number: Optional[str] = None """ Serial Number of the item """ # @ApiMember(Description="Buy-in order status code") buy_in_status_id: Optional[str] = None """ Buy-in order status code """ # @ApiMember(Description="True is the buy-in’s piece is in stock, False otherwise") is_in_stock: Optional[bool] = None """ True is the buy-in’s piece is in stock, False otherwise """ # @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="Sort Expression, Possible values: 'SaleDetailIdDESC', 'DocumentDate'.") sort_by: Optional[str] = None """ Sort Expression, Possible values: 'SaleDetailIdDESC', 'DocumentDate'. """