| GET | /api/ScheduledExchanges |
|---|
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", Description="The OAuthToken token return by AeServices30", IsRequired=true, Name="OAuthToken", ParameterType="Header")
o_auth_token: Optional[str] = None
"""
The OAuthToken token return by AeServices30
"""
# @ApiMember(DataType="string", Description="The Device ID of the Mobile Device. Not used for non-mobile devices.", Name="DeviceId", ParameterType="Header")
device_id: Optional[str] = None
"""
The Device ID of the Mobile Device. Not used for non-mobile devices.
"""
# @ApiMember(DataType="string", Description="An identifier for your integration", IsRequired=true, Name="AppId", ParameterType="Header")
app_id: Optional[str] = None
"""
An identifier for your integration
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BaseSecureRequest(BaseRequest):
# @ApiMember(DataType="string", Description="The Login Token return by the Security API. Required for secured calls.", Name="Token", ParameterType="Header")
token: Optional[str] = None
"""
The Login Token return by the Security API. Required for secured calls.
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BaseResponseResult:
# @ApiMember(DataType="string", Description="", Name="StatusCode", ParameterType="body")
status_code: Optional[str] = None
"""
"""
# @ApiMember(DataType="string", Description="", Name="Login", ParameterType="body")
login: Optional[str] = None
"""
"""
# @ApiMember(DataType="string", Description="", Name="ErrorCode", ParameterType="body")
error_code: Optional[str] = None
"""
"""
# @ApiMember(DataType="string", Description="", Name="ErrorDisplayText", ParameterType="body")
error_display_text: Optional[str] = None
"""
"""
# @ApiMember(DataType="string", Description="", Name="ErrorMessage", ParameterType="body")
error_message: Optional[str] = None
"""
"""
# @ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="DomainName", ParameterType="body")
domain_name: Optional[str] = None
"""
"""
# @ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="IPAddress", ParameterType="body")
ip_address: 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 ScheduledExchangesGetInfo:
exchange_i_d: int = 0
acct: int = 0
sub: int = 0
name: Optional[str] = None
address: Optional[str] = None
address2: Optional[str] = None
city: Optional[str] = None
student: Optional[str] = None
school: Optional[str] = None
district: Optional[str] = None
item: Optional[str] = None
employee: Optional[str] = None
returned_date: Optional[datetime.datetime] = None
stock_number: Optional[str] = None
serial: Optional[str] = None
return_option: Optional[str] = None
scheduled_returned_ref: Optional[str] = None
status: Optional[str] = None
history: Optional[str] = None
exchange_ref: Optional[int] = None
auto_pay_hold_date: Optional[datetime.datetime] = None
exchanged_item: Optional[str] = None
posting_date: datetime.datetime = datetime.datetime(1, 1, 1)
scheduled_date: datetime.datetime = datetime.datetime(1, 1, 1)
new_sku: Optional[str] = None
notes: Optional[str] = None
source: Optional[str] = None
option: Optional[str] = None
processed: bool = False
mobile_exchanged_status: bool = False
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ScheduledExchangesGetResponse(BaseResponse):
scheduled_exchanges: Optional[List[ScheduledExchangesGetInfo]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ScheduledExchangesGetRequest(BaseSecureRequest):
"""
ScheduledExchangesRequires active-e Contracts Service.
"""
scheduled_date_from: Optional[datetime.datetime] = None
scheduled_date_to: Optional[datetime.datetime] = None
district_id: Optional[int] = None
school_id: Optional[int] = None
location_id: Optional[int] = None
status_id: Optional[int] = None
option_id: Optional[int] = None
include_processed: Optional[bool] = None
lan_id: Optional[str] = None
Python ScheduledExchangesGetRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/ScheduledExchanges HTTP/1.1 Host: active-ewebservice.biz Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<ScheduledExchangesGetResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AIM.WebService">
<Status>
<DomainName>String</DomainName>
<ErrorCode>String</ErrorCode>
<ErrorDisplayText>String</ErrorDisplayText>
<ErrorMessage>String</ErrorMessage>
<IpAddress>String</IpAddress>
<Login>String</Login>
<StatusCode>String</StatusCode>
</Status>
<ScheduledExchanges>
<ScheduledExchangesGetInfo>
<Acct>0</Acct>
<Address>String</Address>
<Address2>String</Address2>
<AutoPayHoldDate>0001-01-01T00:00:00</AutoPayHoldDate>
<City>String</City>
<District>String</District>
<Employee>String</Employee>
<ExchangeID>0</ExchangeID>
<ExchangeRef>0</ExchangeRef>
<ExchangedItem>String</ExchangedItem>
<History>String</History>
<Item>String</Item>
<MobileExchangedStatus>false</MobileExchangedStatus>
<Name>String</Name>
<NewSku>String</NewSku>
<Notes>String</Notes>
<Option>String</Option>
<PostingDate>0001-01-01T00:00:00</PostingDate>
<Processed>false</Processed>
<ReturnOption>String</ReturnOption>
<ReturnedDate>0001-01-01T00:00:00</ReturnedDate>
<ScheduledDate>0001-01-01T00:00:00</ScheduledDate>
<ScheduledReturnedRef>String</ScheduledReturnedRef>
<School>String</School>
<Serial>String</Serial>
<Source>String</Source>
<Status>String</Status>
<StockNumber>String</StockNumber>
<Student>String</Student>
<Sub>0</Sub>
</ScheduledExchangesGetInfo>
</ScheduledExchanges>
</ScheduledExchangesGetResponse>