""" Options: Date: 2025-05-10 01:06:50 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: SearchInventoryRequest.* #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 LocationInfo: id: int = 0 desc: Optional[str] = None short_desc: Optional[str] = None region: Optional[str] = None latitude: Decimal = decimal.Decimal(0) longitude: Decimal = decimal.Decimal(0) in_store_pickup: Optional[str] = None active: bool = False cash_sale_acct: Optional[int] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class ImageInfo: url: Optional[str] = None image_stream: Optional[str] = None image_size: Optional[str] = None error_message: Optional[str] = None uri_pk: Optional[int] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class InventoryDetailAttribute: name: Optional[str] = None value: Optional[str] = None priority: int = 0 # @ApiMember(DataType="int", Description="1 is 'Don't Send to Web', 2 is 'Guided Navigation'", Name="WebType", ParameterType="query") web_type: int = 0 """ 1 is 'Don't Send to Web', 2 is 'Guided Navigation' """ @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class InventoryDetailBySerial: sas_pk: int = 0 serial: Optional[str] = None retail: Decimal = decimal.Decimal(0) our_price: Decimal = decimal.Decimal(0) sale_price: Optional[Decimal] = None status: Optional[str] = None sale_info: Optional[str] = None price_a: Decimal = decimal.Decimal(0) price_b: Decimal = decimal.Decimal(0) price_c: Decimal = decimal.Decimal(0) min_price: Decimal = decimal.Decimal(0) active_e_price: Decimal = decimal.Decimal(0) allow_price_change: bool = False cost: Optional[Decimal] = None weighted_cost: Optional[Decimal] = None notes: Optional[str] = None attributes: Optional[List[InventoryDetailAttribute]] = None images: Optional[List[ImageInfo]] = None has_images: bool = False is_activee_holdback: bool = False customer_acct: Optional[int] = None available_for_s_t_r: bool = False @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class InventoryDetailSubstitute: model: Optional[str] = None sku: Optional[str] = None mfg: Optional[str] = None description: Optional[str] = None price: Decimal = decimal.Decimal(0) available_qty: Decimal = decimal.Decimal(0) @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class InventoryDetailByLocation: saq_pk: int = 0 location_info: Optional[LocationInfo] = None serials: Optional[List[InventoryDetailBySerial]] = None substitutes: Optional[List[InventoryDetailSubstitute]] = None retail: Decimal = decimal.Decimal(0) our_price: Decimal = decimal.Decimal(0) sale_price: Optional[Decimal] = None sale_info: Optional[str] = None price_a: Decimal = decimal.Decimal(0) price_b: Decimal = decimal.Decimal(0) price_c: Decimal = decimal.Decimal(0) min_price: Decimal = decimal.Decimal(0) active_e_price: Decimal = decimal.Decimal(0) customer_price: Decimal = decimal.Decimal(0) allow_price_change: bool = False qty: Decimal = decimal.Decimal(0) qty_avail: Decimal = decimal.Decimal(0) activee_holdback_qty: Decimal = decimal.Decimal(0) reorder_min: int = 0 reorder_max: int = 0 average_cost: Optional[Decimal] = None weighted_cost: Optional[Decimal] = None locator: Optional[str] = None selection_code: Optional[str] = None selection_code_description: Optional[str] = None spiff: Decimal = decimal.Decimal(0) current_spot_check_qty: Optional[Decimal] = None qty_out: Decimal = decimal.Decimal(0) qty_on_order: Decimal = decimal.Decimal(0) available_for_s_t_r: Decimal = decimal.Decimal(0) @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class InventoryDetailByVariant: sku_pk: int = 0 sku: Optional[str] = None vendor_cost: Optional[Decimal] = None vendor_name: Optional[str] = None attributes: Optional[List[InventoryDetailAttribute]] = None location_details: Optional[List[InventoryDetailByLocation]] = None images: Optional[List[ImageInfo]] = None has_images: bool = False barcodes: Optional[List[str]] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class AddOnDetail: sad_pk: int = 0 sku_pk: int = 0 cat_pk: int = 0 sub_pk: int = 0 item: Optional[str] = None description: Optional[str] = None price: Decimal = decimal.Decimal(0) @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class ActiveEInfo: dimension: Optional[str] = None web_description: Optional[str] = None summary: Optional[str] = None se_title: Optional[str] = None se_description: Optional[str] = None se_keywords: Optional[str] = None se_alt_text: Optional[str] = None se_html_free_text: Optional[str] = None unpublished: bool = False free_shipping: bool = False is_featured: bool = False web_category_ids: Optional[List[int]] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class BindableObject: pass @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class SearchInventoryResultSet(BindableObject, IAIMInventoryRecord): pk: int = 0 description: Optional[str] = None inventory_type: Optional[str] = None manufacturer: Optional[str] = None model: Optional[str] = None category: Optional[Decimal] = None category_description: Optional[str] = None sub_category: Optional[Decimal] = None sub_category_description: Optional[str] = None selection_code: Optional[str] = None selection_code_description: Optional[str] = None sku: Optional[str] = None mpn: Optional[str] = None discontinued: Optional[bool] = None attribute1: Optional[str] = None attribute2: Optional[str] = None attribute3: Optional[str] = None attribute4: Optional[str] = None attribute5: Optional[str] = None attribute6: Optional[str] = None attribute7: Optional[str] = None attribute8: Optional[str] = None attribute9: Optional[str] = None attribute10: Optional[str] = None attribute11: Optional[str] = None attribute12: Optional[str] = None attribute13: Optional[str] = None attribute14: Optional[str] = None attribute15: Optional[str] = None attribute16: Optional[str] = None attribute17: Optional[str] = None attribute18: Optional[str] = None attribute19: Optional[str] = None attribute20: Optional[str] = None computer_quantity: Decimal = decimal.Decimal(0) our_price: Decimal = decimal.Decimal(0) retail_price: Decimal = decimal.Decimal(0) activee_price: Decimal = decimal.Decimal(0) price_a: Decimal = decimal.Decimal(0) price_b: Decimal = decimal.Decimal(0) price_c: Decimal = decimal.Decimal(0) min_price: Decimal = decimal.Decimal(0) available_quantity: Decimal = decimal.Decimal(0) is_media: bool = False is_package: bool = False has_image: bool = False search_term: Optional[str] = None keywords: Optional[str] = None keywords_origin: Optional[str] = None deleted: bool = False time_stamp: datetime.datetime = datetime.datetime(1, 1, 1) @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class InventoryDetail: sad_pk: int = 0 inv_type: Optional[str] = None model: Optional[str] = None description: Optional[str] = None mfg: Optional[str] = None category: int = 0 category_description: Optional[str] = None sub_category: int = 0 sub_category_description: Optional[str] = None selection_code: Optional[str] = None selection_code_description: Optional[str] = None sell_serials_online: bool = False notes: Optional[str] = None images: Optional[List[ImageInfo]] = None has_images: bool = False variant_details: Optional[List[InventoryDetailByVariant]] = None add_ons: Optional[List[AddOnDetail]] = None active_e_info: Optional[ActiveEInfo] = None weight: Decimal = decimal.Decimal(0) unit: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class SearchInventoryApiResult(SearchInventoryResultSet): detail: Optional[InventoryDetail] = None icon_image: Optional[ImageInfo] = None customer_price: Decimal = decimal.Decimal(0) class IAIMInventoryRecord: long_desc: Optional[str] = None inv_desc__cat: int = 0 inv_desc__sub: int = 0 inv_desc__mfg: Optional[str] = None inv_desc__model: Optional[str] = None inv_desc__desc: Optional[str] = None inv_desc__cat_desc: Optional[str] = None inv_desc__sub_desc: Optional[str] = None inv_desc__locator: Optional[str] = None inv_desc__stock_num: Optional[str] = None inv_desc__sel_desc: Optional[str] = None inv_desc__sku: Optional[str] = None inv_desc__sel_code: Optional[str] = None inv_desc__mpn: Optional[str] = None inv_desc__att1: Optional[str] = None inv_desc__att2: Optional[str] = None inv_desc__att3: Optional[str] = None inv_desc__att4: Optional[str] = None inv_desc__att5: Optional[str] = None inv_desc__att6: Optional[str] = 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 SearchInventoryResponse(BaseResponse): start_offset: int = 0 record_count: int = 0 remaining_records: int = 0 total_records: int = 0 # @ApiMember(Name="Records", ParameterType="body") records: Optional[List[SearchInventoryApiResult]] = None # @Route("/SearchInventory", "POST, GET") @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class SearchInventoryRequest(BaseSecureRequest, IReturn[SearchInventoryResponse]): """ SearchInventoryRequires active-e Inventory Service """ # @ApiMember(DataType="integer", Description="If sent, only items from the passed location will be returned", Format="int32", Name="LocFk") loc_fk: Optional[int] = None """ If sent, only items from the passed location will be returned """ # @ApiMember(DataType="integer", Description="For Internal Use Only", Format="int32", Name="MfgFk") mfg_fk: Optional[int] = None """ For Internal Use Only """ # @ApiMember(DataType="integer", Description="For Internal Use Only", Format="int32", Name="CatFk") cat_fk: Optional[int] = None """ For Internal Use Only """ # @ApiMember(DataType="integer", Description="For Internal Use Only", Format="int32", Name="SubFk") sub_fk: Optional[int] = None """ For Internal Use Only """ # @ApiMember(DataType="integer", Description="For Internal Use Only", Format="int32", Name="SelFk") sel_fk: Optional[int] = None """ For Internal Use Only """ # @ApiMember(DataType="integer", Description="If sent, only items from the passed category# will be returned", Format="int32", Name="Cat") cat: Optional[int] = None """ If sent, only items from the passed category# will be returned """ # @ApiMember(DataType="integer", Description="If sent, only items from the passed subcategory# will be returned. Must be used in conjunction with the Cat parameter.", Format="int32", Name="Sub") sub: Optional[int] = None """ If sent, only items from the passed subcategory# will be returned. Must be used in conjunction with the Cat parameter. """ # @ApiMember(Description="If sent, only items with the passed selection code will be returned", Name="SelectionCode") selection_code: Optional[str] = None """ If sent, only items with the passed selection code will be returned """ # @ApiMember(Description="If sent, only items with the passed mfg code will be returned", Name="Mfg") mfg: Optional[str] = None """ If sent, only items with the passed mfg code will be returned """ # @ApiMember(DataType="boolean", Description="Serialized Items will be included in the search results", Name="IncludeSerials") include_serials: Optional[bool] = None """ Serialized Items will be included in the search results """ # @ApiMember(DataType="boolean", Description="Media Items will be included in the search results", Name="IncludeMedia") include_media: Optional[bool] = None """ Media Items will be included in the search results """ # @ApiMember(DataType="boolean", Description="Non-Serialized, Non-Media Items will be included in the search results", Name="IncludeAccessories") include_accessories: Optional[bool] = None """ Non-Serialized, Non-Media Items will be included in the search results """ # @ApiMember(DataType="boolean", Description="Package Deal Items will be included in the search results", Name="IncludePackages") include_packages: Optional[bool] = None """ Package Deal Items will be included in the search results """ # @ApiMember(Description="The string to be searched for", Name="SearchStr") search_str: Optional[str] = None """ The string to be searched for """ # @ApiMember(DataType="boolean", Description="If set, only items with the exact model contained in the search string will be returned", Name="ExactModel") exact_model: Optional[bool] = None """ If set, only items with the exact model contained in the search string will be returned """ # @ApiMember(DataType="integer", Description="The Starting Offse", Format="int64", Name="StartOffset") start_offset: Optional[int] = None """ The Starting Offse """ # @ApiMember(DataType="integer", Description="The # of records to be returned", Format="int64", Name="RecordCount") record_count: Optional[int] = None """ The # of records to be returned """ # @ApiMember(DataType="boolean", Description="If set, Icon Image Urls will be included in the result, if available", Name="IncludeIconImage") include_icon_image: Optional[bool] = None """ If set, Icon Image Urls will be included in the result, if available """ # @ApiMember(Description="If sent, only items from the passed category IDs will be returned", Name="CatIdList") cat_id_list: Optional[List[int]] = None """ If sent, only items from the passed category IDs will be returned """ # @ApiMember(Description="If sent, only items from the passed subcategory IDs will be returned", Name="SubIdList") sub_id_list: Optional[List[int]] = None """ If sent, only items from the passed subcategory IDs will be returned """ # @ApiMember(Description="If sent, only items from the passed mfg IDs will be returned", Name="MfgIdList") mfg_id_list: Optional[List[int]] = None """ If sent, only items from the passed mfg IDs will be returned """ # @ApiMember(Description="If sent, only items from the passed selection code IDs will be returned", Name="SelIdList") sel_id_list: Optional[List[int]] = None """ If sent, only items from the passed selection code IDs will be returned """ # @ApiMember(DataType="boolean", Description="Deleted Items will be included in the search results", Name="IncludeDeleted") include_deleted: Optional[bool] = None """ Deleted Items will be included in the search results """ # @ApiMember(DataType="string", Description="If sent, only inventory changed on or after this date/time will be included", Format="date", Name="ChangedDate", ParameterType="query") changed_date: Optional[datetime.datetime] = None """ If sent, only inventory changed on or after this date/time will be included """ # @ApiMember(DataType="boolean", Description="Package Deal Line Items will be included", Name="IncludePackageLineItems") include_package_line_items: Optional[bool] = None """ Package Deal Line Items will be included """ # @ApiMember(DataType="boolean", Description="If set, the InventoryDetails object for each item will also be returned. This is much slower.", Name="IncludeDetails") include_details: Optional[bool] = None """ If set, the InventoryDetails object for each item will also be returned. This is much slower. """ # @ApiMember(DataType="integer", Description="If sent, only items with an Available Quantity greater then or equal to the sent value will be returned. Use of this parameter requires that the LocFk parameter also be sent.", Format="int32", Name="MinimumAvailableQuantity") minimum_available_quantity: Optional[int] = None """ If sent, only items with an Available Quantity greater then or equal to the sent value will be returned. Use of this parameter requires that the LocFk parameter also be sent. """