""" Options: Date: 2024-11-13 01:22:10 Version: 8.40 Tip: To override a DTO option, remove "#" prefix before updating BaseUrl: https://active-ewebservice.biz/aeservices30/api #GlobalNamespace: #AddServiceStackTypes: True #AddResponseStatus: False #AddImplicitVersion: #AddDescriptionAsComments: True IncludeTypes: ScanForImportRequest.* #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 @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class BaseRequest: # @ApiMember(DataType="string", Description="This is your AIM API Key provided by Tri-Tech", IsRequired=true, Name="ApiKey", ParameterType="header") api_key: Optional[str] = None """ This is your AIM API Key provided by Tri-Tech """ # @ApiMember(DataType="string", Name="OAuthToken", ParameterType="header") o_auth_token: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class BaseSecureRequest(BaseRequest): # @ApiMember(DataType="string", Description="", Name="Token", ParameterType="Header") token: Optional[str] = None """ """ # @ApiMember(DataType="string", Description="", Name="DeviceId", ParameterType="Header") device_id: Optional[str] = None """ """ # @ApiMember(DataType="string", Description="", IsRequired=true, Name="AppId", ParameterType="Header") app_id: Optional[str] = None """ """ @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class ExceptionInfo: barcode: Optional[str] = None description: Optional[str] = None base64_image: Optional[str] = None category: int = 0 sub_category: Optional[int] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class ScanItem(IScanItem): sku_pk: Optional[int] = None sas_pk: Optional[int] = None sku: Optional[str] = None serial: Optional[str] = None quantity: Decimal = decimal.Decimal(0) exception_info: Optional[ExceptionInfo] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class ScanErrorItem(IScanItem): sku_pk: Optional[int] = None sas_pk: Optional[int] = None sku: Optional[str] = None serial: Optional[str] = None quantity: Decimal = decimal.Decimal(0) exception_info: Optional[ExceptionInfo] = None error_message: Optional[str] = None class IScanItem: sku_pk: Optional[int] = None sas_pk: Optional[int] = None sku: Optional[str] = None serial: Optional[str] = None quantity: Decimal = decimal.Decimal(0) exception_info: Optional[ExceptionInfo] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class BaseResponse: # @ApiMember(DataType="BaseResponseResult", Description="", Name="Status", ParameterType="body") status: Optional[BaseResponseResult] = None """ """ @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class ScanForImportResponse(BaseResponse): error_items: Optional[List[ScanErrorItem]] = None # @Route("/ScanForImport", "POST") @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class ScanForImportRequest(BaseSecureRequest, IReturn[ScanForImportResponse]): """ ScanForImportRequires active-e Inventory Service """ description: Optional[str] = None items: Optional[List[ScanItem]] = None receive_inventory_mode: Optional[bool] = None append_mode: Optional[bool] = None