| GET | /TicketDetails/User | Depreciated, please use ticketdetails | |
|---|---|---|---|
| GET | /TicketDetails |
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 PagingMetadata:
# @ApiMember(DataType="string", Description="Starting Record", Name="Offset", ParameterType="query")
offset: Optional[str] = None
"""
Starting Record
"""
# @ApiMember(DataType="string", Description="Number of records to return (PageSize)", Name="Limit", ParameterType="query")
limit: Optional[str] = None
"""
Number of records to return (PageSize)
"""
# @ApiMember(DataType="string", Description="Total Number of Records in a Full Reponse (if no paging)", Name="TotalRecords", ParameterType="query")
total_records: int = 0
"""
Total Number of Records in a Full Reponse (if no paging)
"""
# @ApiMember(DataType="string", Description="Total Number of Records in this Reponse (on this page)", Name="ResponseRecords", ParameterType="query")
response_records: int = 0
"""
Total Number of Records in this Reponse (on this page)
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CompanyLevelRequestBase(PagingMetadata, IMemberUsername, IMemberOwningCompanyCode):
owning_company_code: Optional[List[str]] = None
"""
Comma Delimited List of Owning Company Codes
"""
user_name: Optional[str] = None
"""
UserName in form of an email address
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TicketInfoFlightCoupon:
tkt_number: Optional[str] = None
coupon_sequence_nbr: int = 0
carrier: Optional[str] = None
flight_nbr: Optional[str] = None
board_point: Optional[str] = None
off_point: Optional[str] = None
flight_service_class: Optional[str] = None
flight_date: Optional[datetime.datetime] = None
flight_coupon_status: Optional[str] = None
date_last_checked: Optional[datetime.datetime] = None
air_tkt_seg_id: int = 0
eligible_for_refund: bool = False
eligible_for_covid_status: bool = False
fare_basis: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TicketExchange:
original_tkt_number: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TicketTaxElement:
amt: Optional[Decimal] = None
printed_amt: Optional[str] = None
code: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TicketTaxDetails:
total_amt: Optional[Decimal] = None
tax_elements: Optional[List[TicketTaxElement]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TicketInfo:
passenger_ticket_i_d: int = 0
tkt_number: Optional[str] = None
record_locator: Optional[str] = None
pnr_creation_date: Optional[datetime.datetime] = None
tkt_issue_date: Optional[datetime.datetime] = None
plating_carrier: Optional[str] = None
status: Optional[str] = None
bar: Optional[str] = None
par: Optional[str] = None
last_name: Optional[str] = None
first_name: Optional[str] = None
ticket_expiry_date: Optional[datetime.datetime] = None
fop: Optional[str] = None
fop_fare: Optional[str] = None
fop_currency: Optional[str] = None
printed_currency: Optional[str] = None
printed_fare: Optional[str] = None
credit_card_f_o_p_acct: Optional[str] = None
owning_agency_location_i_d: Optional[str] = None
iata: Optional[str] = None
coupons: Optional[List[TicketInfoFlightCoupon]] = None
eligible_for_refund: bool = False
eligible_for_covid_status: bool = False
ticket_exchanges: Optional[List[TicketExchange]] = None
tax: Optional[TicketTaxDetails] = None
owning_company_code: Optional[str] = None
TItemResponse = TypeVar('TItemResponse')
TItem = TypeVar('TItem')
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Report(Generic[TItemResponse, TItem]):
item: Optional[TItem] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TicketDetailsResponseReport(Report[TicketDetailsItemResponse, TicketInfo]):
pass
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CacheMetadata:
cached_at: datetime.datetime = datetime.datetime(1, 1, 1)
cache_expires_at: datetime.datetime = datetime.datetime(1, 1, 1)
is_from_cache: bool = False
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ResponseMetadata:
success: bool = False
has_cache: bool = False
has_paging: bool = False
cache_metadata: Optional[CacheMetadata] = None
paging_metadata: Optional[PagingMetadata] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class AgentivityError:
error_code: Optional[str] = None
message: Optional[str] = None
status_code: Optional[str] = None
verbose_message: Optional[str] = None
TItem = TypeVar('TItem')
TReport = TypeVar('TReport')
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ItemResponse(Generic[TItem, TReport]):
response_metadata: Optional[ResponseMetadata] = None
response_report: Optional[TReport] = None
response_error: Optional[AgentivityError] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TicketDetailsItemResponse(ItemResponse[TicketInfo, TicketDetailsResponseReport]):
pass
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetTicketDetails(CompanyLevelRequestBase, IRequestConsultantID):
tkt_number: Optional[str] = None
"""
Ticket number
"""
cache_guid: Optional[str] = None
"""
Cache Guid
"""
request_consultant_i_d: Optional[str] = None
"""
Request Consultant ID (sign on)
"""
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 /TicketDetails/User HTTP/1.1 Host: servicestack.agentivity.com Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<AgentivityResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="schemas.agentivity.com/types">
<ResponseMetadata>
<Success>false</Success>
<HasCache>false</HasCache>
<HasPaging>false</HasPaging>
<CacheMetadata>
<IsFromCache>false</IsFromCache>
<CachedAt>0001-01-01T00:00:00</CachedAt>
<CacheExpiresAt>0001-01-01T00:00:00</CacheExpiresAt>
</CacheMetadata>
<PagingMetadata>
<Limit>String</Limit>
<Offset>String</Offset>
<ResponseRecords>0</ResponseRecords>
<TotalRecords>0</TotalRecords>
</PagingMetadata>
</ResponseMetadata>
<ResponseReport>
<Item>
<PassengerTicketID>0</PassengerTicketID>
<TktNumber>String</TktNumber>
<RecordLocator>String</RecordLocator>
<PNRCreationDate>0001-01-01T00:00:00</PNRCreationDate>
<TktIssueDate>0001-01-01T00:00:00</TktIssueDate>
<PlatingCarrier>String</PlatingCarrier>
<Status>String</Status>
<BAR>String</BAR>
<PAR>String</PAR>
<LastName>String</LastName>
<FirstName>String</FirstName>
<TicketExpiryDate>0001-01-01T00:00:00</TicketExpiryDate>
<FOP>String</FOP>
<FopFare>String</FopFare>
<FOPCurrency>String</FOPCurrency>
<PrintedCurrency>String</PrintedCurrency>
<PrintedFare>String</PrintedFare>
<CreditCardFOPAcct>String</CreditCardFOPAcct>
<OwningAgencyLocationID>String</OwningAgencyLocationID>
<IATA>String</IATA>
<Coupons>
<TicketInfoFlightCoupon>
<TktNumber>String</TktNumber>
<Carrier>String</Carrier>
<CouponSequenceNbr>0</CouponSequenceNbr>
<FlightNbr>String</FlightNbr>
<BoardPoint>String</BoardPoint>
<OffPoint>String</OffPoint>
<FlightServiceClass>String</FlightServiceClass>
<FlightDate>0001-01-01T00:00:00</FlightDate>
<FlightCouponStatus>String</FlightCouponStatus>
<DateLastChecked>0001-01-01T00:00:00</DateLastChecked>
<AirTktSegId>0</AirTktSegId>
<EligibleForRefund>false</EligibleForRefund>
<EligibleForCovidStatus>false</EligibleForCovidStatus>
<FareBasis>String</FareBasis>
</TicketInfoFlightCoupon>
</Coupons>
<EligibleForRefund>false</EligibleForRefund>
<EligibleForCovidStatus>false</EligibleForCovidStatus>
<TicketExchanges>
<Exchange>
<OriginalTktNumber>String</OriginalTktNumber>
</Exchange>
</TicketExchanges>
<Tax>
<TotalAmt>0</TotalAmt>
<TaxElements>
<TaxElement>
<Amt>0</Amt>
<PrintedAmt>String</PrintedAmt>
<Code>String</Code>
</TaxElement>
</TaxElements>
</Tax>
<OwningCompanyCode>String</OwningCompanyCode>
</Item>
</ResponseReport>
<ResponseError>
<ErrorCode>String</ErrorCode>
<Message>String</Message>
<StatusCode>String</StatusCode>
<VerboseMessage>String</VerboseMessage>
</ResponseError>
</AgentivityResponse>