""" Options: Date: 2026-09-09 10:57:52 Version: 10.08 Tip: To override a DTO option, remove "#" prefix before updating BaseUrl: https://services.acct.2service.nl #GlobalNamespace: #AddServiceStackTypes: True #AddResponseStatus: False #AddImplicitVersion: #AddDescriptionAsComments: True IncludeTypes: GetPartInfoById.* #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 AuthenticatedRequest: # @ApiMember(Description="Session token received from successful authentication.", IsRequired=true, ParameterType="query") session_token: Optional[str] = None """ Session token received from successful authentication. """ @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class OperationResult: # @ApiMember(Description="Specifies if the operation was successful.", ParameterType="model") is_successful: bool = False """ Specifies if the operation was successful. """ # @ApiMember(Description="States error message in case of unsuccessful operation.", ParameterType="model") error_message: Optional[str] = None """ States error message in case of unsuccessful operation. """ T = TypeVar('T') @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class OperationResult1(Generic[T], OperationResult): # @ApiMember(Description="Result value", ParameterType="model") result: Optional[T] = None """ Result value """ @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class PartInfoResultImage: # @ApiMember(Description="Image number") image_number: int = 0 """ Image number """ # @ApiMember(Description="Image URL") image_url: Optional[str] = None """ Image URL """ @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class PartStockQuantity: # @ApiMember(Description="Location ID") location_id: int = 0 """ Location ID """ # @ApiMember(Description="Location code") location_code: Optional[str] = None """ Location code """ # @ApiMember(Description="Stock quantity in location") stock_quantity: int = 0 """ Stock quantity in location """ @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class PartInfoResult: # @ApiMember(Description="Unique ID for the part.") id: int = 0 """ Unique ID for the part. """ # @ApiMember(Description="Part number.") part_number: Optional[str] = None """ Part number. """ # @ApiMember(Description="Description of the part.") description: Optional[str] = None """ Description of the part. """ # @ApiMember(Description="Part manufacturer.") manufacturer: Optional[str] = None """ Part manufacturer. """ # @ApiMember(Description="Determines if the part can be ordered.") can_be_ordered: bool = False """ Determines if the part can be ordered. """ # @ApiMember(Description="Textual representation of the status of the part.") status_text: Optional[str] = None """ Textual representation of the status of the part. """ # @ApiMember(Description="Available stock to order.") available_stock_quantity: int = 0 """ Available stock to order. """ # @ApiMember(Description="Average days needed for delivery.") average_delivery_in_days: Optional[int] = None """ Average days needed for delivery. """ # @ApiMember(Description="Price of a single unit, excluding VAT.") unit_price: Optional[Decimal] = None """ Price of a single unit, excluding VAT. """ # @ApiMember(Description="EAN number.") ean_number: Optional[str] = None """ EAN number. """ # @ApiMember(Description="Images") images: Optional[List[PartInfoResultImage]] = None """ Images """ # @ApiMember(Description="Secondary article numbers") secondary_article_numbers: Optional[List[str]] = None """ Secondary article numbers """ # @ApiMember(Description="Replacement article numbers") replacement_article_numbers: Optional[List[str]] = None """ Replacement article numbers """ # @ApiMember(Description="Stock quantities") stock_quantities: Optional[List[PartStockQuantity]] = None """ Stock quantities """ @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class PartInfoResponse(OperationResult1[PartInfoResult]): pass # @Route("/dealers/part/{PartId}", "GET") @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class GetPartInfoById(AuthenticatedRequest, IReturn[PartInfoResponse]): # @ApiMember(Description="Part id to retrieve info for.", IsRequired=true, ParameterType="path") part_id: int = 0 """ Part id to retrieve info for. """