s7_api_sdk

package module
v0.0.0-...-4ff41b8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2020 License: MIT Imports: 3 Imported by: 0

README

s7-agent-api-sdk

GoDoc Go Report Card

written on Golang SDK for S7 Agent API (Application programming interface based on the IATA NDC standards with an advanced search for embedding in the online travel solutions).

Features

With this SDK you can perform:

  • searchFlightsFlex operation
  • searchFlights operation
  • book operation
  • reprice operation
  • demandTickets operation
  • servicePrice operation

Compatible S7 Agent API versions

This package was tested against S7 Agent API v0.47

Installation

It is go gettable

$ go get github.com/tmconsulting/s7-golang-sdk
package main

import (
	s7Sdk "github.com/tmconsulting/s7-golang-sdk"
)
...

Usage examples

There are several usage examples in ./example folder. Try it out.

Tests

There are no tests yet. :( Feel free to help us to change this situation!

Contribution

Contribution, in any kind of way, is highly welcome! It doesn't matter if you are not able to write code. Creating issues or holding talks and help other people to use s7-agent-api-sdk is contribution, too!

A few examples:

  • Correct typos in the README / documentation
  • Reporting bugs
  • Implement a new feature or endpoint
  • Sharing the love if like to use s7-agent-api-sdk and help people to get use to it

If you are new to pull requests, checkout Collaborating on projects using issues and pull requests / Creating a pull request.

License

SDK is released under the MIT License.

Documentation

Index

Constants

View Source
const (
	FilterGroupCircuityLimit = "circuityLimit"
	FilterGroupDurationLimit = "durationLimit"
	FilterGroupSearchMetric  = "searchMetric"
	FilterGroupSort          = "sort"
)
View Source
const (
	FilterSubgroupQuickest       = "QUICKEST"
	FilterSubgroupMostConvenient = "MOST-CONVENIENT"
	FilterSubgroupCheapest       = "CHEAPEST"
	FilterSubgroupLeisure        = "LEISURE"
	FilterSubgroupBusiness       = "BUSINESS"
	FilterSubgroupLuxury         = "LUXURY"
	FilterSubgroupMinPrice       = "MIN_PRICE"
)
View Source
const (
	ResultTypeSmartchoice = "smartchoice"
	ResultTypeLowfare     = "lowfare"
	ResultTypeFlightinfo  = "flightinfo"
)
View Source
const (
	PassengerTypeCodeAdult  = "ADT"
	PassengerTypeCodeChild  = "CHD"
	PassengerTypeCodeInfant = "INF"
)
View Source
const ActionTypeContextDiscount = "discount"

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Number string
}

type ActionType

type ActionType struct {
	Context string `xml:",attr,omitempty"`
	Value   string `xml:",chardata"`
}

type Actions

type Actions struct {
	ActionType *ActionType
	OrderItems *OrderItems
	Passengers *Passengers
	Qualifiers *Qualifiers `xml:",omitempty"`
}

type Age

type Age struct {
	BirthDate string
}

func MakeAge

func MakeAge(date string) *Age

type AgentUserSender

type AgentUserSender struct {
	OtherIDs    *OtherIDs
	PseudoCity  string
	AgentUserID string
	UserRole    string
}

func MakeAgentUserSender

func MakeAgentUserSender(airportCode, erspUserID, isoCountry, requestorID, requestorType, pseudoCity, agentUserID, userRole string) *AgentUserSender

type AirDocDisplayRS

type AirDocDisplayRS struct {
	Version  string `xml:"Version,attr"`
	Document *Document
	Response *Response
	Errors   *Errors
}

type AirDocIssueRQ

type AirDocIssueRQ struct {
	XMLName  xml.Name `xml:"http://www.iata.org/IATA/EDIST AirDocIssueRQ"`
	Version  string   `xml:"Version,attr"`
	Document *Document
	Party    *Party
	Query    *Query
}

type AirDocVoidRQ

type AirDocVoidRQ struct {
	XMLName  xml.Name `xml:"http://www.iata.org/IATA/EDIST AirDocVoidRQ"`
	Version  string   `xml:"Version,attr"`
	Document *Document
	Party    *Party
	Query    *QueryAirVoid
}

type AirDocVoidRS

type AirDocVoidRS struct {
	Version  string `xml:"Version,attr"`
	Document *Document
	Success  bool
	Response *ResponseAirDocVoid
	Errors   *Errors
}

type AirShoppingRQ

type AirShoppingRQ struct {
	XMLName     xml.Name `xml:"http://www.iata.org/IATA/EDIST AirShoppingRQ"`
	Version     string   `xml:"Version,attr"`
	Document    *Document
	Party       *Party
	Parameters  *Parameters `xml:",omitempty"`
	Travelers   *Travelers
	CoreQuery   *CoreQuery
	Qualifiers  *Qualifiers  `xml:",omitempty"`
	Preferences *Preferences `xml:",omitempty"`
	Metadata    *Metadata    `xml:",omitempty"`
}

type AirShoppingRS

type AirShoppingRS struct {
	Version             string `xml:"Version,attr"`
	Document            *Document
	ShoppingResponseIDs *ShoppingResponseIDs
	OffersGroup         *OffersGroup
	DataLists           *DataLists
	Metadata            *Metadata
	Errors              *Errors
}

type Aircraft

type Aircraft struct {
	Cabins *Cabins
}

type AirlineOffer

type AirlineOffer struct {
	OfferID     *OfferID
	TotalPrice  *TotalPrice
	PricedOffer *PricedOffer
}

type AirlineOffers

type AirlineOffers struct {
	TotalOfferQuantity int
	Owner              string
	AirlineOffer       []*AirlineOffer
}

type AllowableBag

type AllowableBag struct {
	Type   string `xml:",attr"`
	Number int    `xml:",attr"`
}

type AllowanceDescription

type AllowanceDescription struct {
	ApplicableParty string
	Descriptions    *Descriptions
}

type Amount

type Amount struct {
	CurrencyAmountValue *CurrencyAmountValue
	AmountApplication   string
}

type Amounts

type Amounts struct {
	Amount []*Amount
}

type AnonymousTravelerList

type AnonymousTravelerList struct {
	AnonymousTraveler []*User
}

type ApplicableFlight

type ApplicableFlight struct {
	OriginDestinationReferences string                    `xml:",omitempty"`
	FlightReferences            string                    `xml:",omitempty"`
	FlightSegmentReference      []*FlightSegmentReference `xml:",omitempty"`
}

type AssociatedID

type AssociatedID struct {
	OfferItemID *OfferItemID
}

type AssociatedIDs

type AssociatedIDs struct {
	AssociatedID *AssociatedID
}

type AssociatedTraveler

type AssociatedTraveler struct {
	TravelerReferences string
}

type Associations

type Associations struct {
	AssociatedTraveler     *AssociatedTraveler     `xml:",omitempty"`
	ApplicableFlight       *ApplicableFlight       `xml:",omitempty"`
	OfferDetailAssociation *OfferDetailAssociation `xml:",omitempty"`
	OtherAssociation       *OtherAssociations      `xml:",omitempty"`
	Passengers             *Passengers             `xml:",omitempty"`
}

type AvailablePeriod

type AvailablePeriod struct {
	Earliest *Period
	Latest   *Period
}

type BagDetailAssociation

type BagDetailAssociation struct {
	CheckedBagReferences string
}

type BaseAmount

type BaseAmount struct {
	Code  string  `xml:",attr"`
	Value float64 `xml:",chardata"`
}

type BaseFare

type BaseFare struct {
	Amount *Total
}

type Body

type Body struct {
	AirShoppingRQ   *AirShoppingRQ   `xml:",omitempty"`
	AirShoppingRS   *AirShoppingRS   `xml:",omitempty"`
	OrderCreateRQ   *OrderCreateRQ   `xml:",omitempty"`
	OrderViewRS     *OrderViewRS     `xml:",omitempty"`
	ItinReshopRQ    *ItinReshopRQ    `xml:",omitempty"`
	ItinReshopRS    *ItinReshopRS    `xml:",omitempty"`
	AirDocIssueRQ   *AirDocIssueRQ   `xml:",omitempty"`
	AirDocDisplayRS *AirDocDisplayRS `xml:",omitempty"`
	OrderCancelRQ   *OrderCancelRQ   `xml:",omitempty"`
	OrderCancelRS   *OrderCancelRS   `xml:",omitempty"`
	AirDocVoidRQ    *AirDocVoidRQ    `xml:",omitempty"`
	AirDocVoidRS    *AirDocVoidRS    `xml:",omitempty"`
}

type BookingReference

type BookingReference struct {
	ObjectKey string `xml:",attr,omitempty"`
	Type      *Type  `xml:",omitempty"`
	ID        string
	AirlineID string
}

type BookingReferences

type BookingReferences struct {
	BookingReference []*BookingReference
}

type Breakdown

type Breakdown struct {
	Tax []*Tax
}

type Cabin

type Cabin struct {
	Code string
}

type CabinFlightSegment

type CabinFlightSegment struct {
	CabinDesignator string
	MarketingName   string
}

type Cabins

type Cabins struct {
	Cabin *Cabin
}

type CalendarDates

type CalendarDates struct {
	XMLName    xml.Name `xml:"CalendarDates"`
	DaysBefore int      `xml:"DaysBefore,attr,omitempty"`
	DaysAfter  int      `xml:"DaysAfter,attr,omitempty"`
}

type Carrier

type Carrier struct {
	AirlineID    string `xml:",omitempty"`
	Name         string `xml:",omitempty"`
	FlightNumber string `xml:",omitempty"`
}

func MakeCarrier

func MakeCarrier(airlineID, name, flightNumber string) *Carrier

type Characteristic

type Characteristic struct {
	DirectPreferences string
}

type CheckedBagAllowance

type CheckedBagAllowance struct {
	Reference            string                `xml:"refs,attr,omitempty"`
	ID                   string                `xml:"ListKey,attr,omitempty"`
	WeightAllowance      *WeightAllowance      `xml:",omitempty"`
	AllowanceDescription *AllowanceDescription `xml:",omitempty"`
	PieceAllowance       *PieceAllowance       `xml:",omitempty"`
}

type CheckedBagAllowanceList

type CheckedBagAllowanceList struct {
	CheckedBagAllowance []*CheckedBagAllowance
}

type ClassOfService

type ClassOfService struct {
	Code          *Code
	MarketingName string `xml:",omitempty"`
}

func MakeClassOfService

func MakeClassOfService(seat int, value, name string) *ClassOfService

type Code

type Code struct {
	SeatsLeft int    `xml:",attr,omitempty"`
	Value     string `xml:",chardata"`
}

func MakeCode

func MakeCode(seat int, value string) *Code

type Commission

type Commission struct {
	Amount  float64
	Remarks *Remarks
}

type Contact

type Contact struct {
	EmailContact *EmailContact `xml:",omitempty"`
	PhoneContact *PhoneContact `xml:",omitempty"`
}

func MakeContact

func MakeContact(email, countryCode, areaCode, phoneNumber string) *Contact

type Contacts

type Contacts struct {
	Contact []*Contact
}

type CoreQuery

type CoreQuery struct {
	OriginDestinations  *OriginDestinations  `xml:",omitempty"`
	ShoppingResponseIDs *ShoppingResponseIDs `xml:",omitempty"`
}

type CouponInfo

type CouponInfo struct {
	CouponNumber    int
	FareBasisCode   *StatusCode
	CouponValid     *CouponValid
	Status          *StatusCode
	SoldAirlineInfo *SoldAirlineInfo
}

type CouponValid

type CouponValid struct {
	EffectiveDatePeriod *EffectiveDatePeriod
}

type CurrCodes

type CurrCodes struct {
	CurrCode []string
}

type CurrencyAmountValue

type CurrencyAmountValue struct {
	Code  string  `xml:",attr"`
	Value float32 `xml:",chardata"`
}

type DataList

type DataList struct {
	CheckedBagAllowanceList *CheckedBagAllowanceList
	TermsList               *TermsList
}

type DataLists

type DataLists struct {
	AnonymousTravelerList   *AnonymousTravelerList   `xml:",omitempty"`
	CheckedBagAllowanceList *CheckedBagAllowanceList `xml:",omitempty"`
	FareList                *FareList                `xml:",omitempty"`
	FlightSegmentList       *FlightSegmentList       `xml:",omitempty"`
	FlightList              *FlightList              `xml:",omitempty"`
	OriginDestinationList   *OriginDestinationList   `xml:",omitempty"`
	PenaltyList             *PenaltyList             `xml:",omitempty"`
	PriceClassList          *PriceClassList          `xml:",omitempty"`
	InstructionsList        *InstructionsList        `xml:",omitempty"`
	ServiceList             *ServiceList             `xml:",omitempty"`
	TermsList               *TermsList               `xml:",omitempty"`
}

type Description

type Description struct {
	Text string
}

type Descriptions

type Descriptions struct {
	Description []*Description
}

type Detail

type Detail struct {
	Type    string
	Amounts *Amounts
}

type DetailCurrencyPrice

type DetailCurrencyPrice struct {
	Total   *Total
	Details *DetailsPrice
	Fees    *Fees
	Taxes   *Taxes
}

type DetailTicketPrice

type DetailTicketPrice struct {
	Application string
	Amount      int
}

type DetailedFlightItem

type DetailedFlightItem struct {
	OriginDestination []*OriginDestinationFlight
}

type Details

type Details struct {
	Detail []*Detail
}

type DetailsPrice

type DetailsPrice struct {
	Detail *DetalPrice
}

type DetailsTicketPrice

type DetailsTicketPrice struct {
	Detail []*DetailTicketPrice
}

type DetalPrice

type DetalPrice struct {
	SubTotal    *Total
	Application string
}

type Discount

type Discount struct {
	DiscountAmount  *Total
	DiscountPercent float64
}

type Document

type Document struct {
	Name               string `xml:",omitempty"`
	Type               string `xml:",omitempty"`
	ID                 string `xml:",omitempty"`
	BirthCountry       string `xml:",omitempty"`
	DateOfIssue        string `xml:",omitempty"`
	DateOfExpiration   string `xml:",omitempty"`
	CountryOfResidence string `xml:",omitempty"`
}

type EffectiveDatePeriod

type EffectiveDatePeriod struct {
	Expiration string
}

type EmailContact

type EmailContact struct {
	Address string
}

type Endorsements

type Endorsements struct {
	Endorsement []string
}

type Envelope

type Envelope struct {
	XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Envelope"`
	Header  *Header
	Body    *Body
}

func MakeAirDocIssueRQ

func MakeAirDocIssueRQ() (request *Envelope)

func MakeAirDocVoidRQ

func MakeAirDocVoidRQ(agentSender *AgentUserSender, ticketNbr, ticketType string) (request *Envelope)

func MakeItinReshopRQ

func MakeItinReshopRQ(actionType *ActionType) (request *Envelope)

func MakeOrderCancelRQ

func MakeOrderCancelRQ(agentSender *AgentUserSender, pnr, airline string) (request *Envelope)

func MakeSessionAirShoppingRQ

func MakeSessionAirShoppingRQ() (request *Envelope)

func MakeSessionBookRQ

func MakeSessionBookRQ() (request *Envelope)

type Equipment

type Equipment struct {
	AircraftCode     string
	AirlineEquipCode string
}

func MakeEquipment

func MakeEquipment(aircraftCode, airlineEquipCode string) *Equipment

type Error

type Error struct {
	Type      string `xml:",attr"`
	Tag       string `xml:",attr"`
	Status    string `xml:",attr"`
	Owner     string `xml:",attr"`
	ShortText string `xml:",attr"`
	Code      string `xml:",attr"`
	Value     string `xml:",chardata"`
}

type Errors

type Errors struct {
	Error []*Error
}

type FQTVs

type FQTVs struct {
	TravelerFQTVInformation *TravelerFQTVInformation `xml:"TravelerFQTV_Information"`
}

type Fare

type Fare struct {
	FareCode   *FareCode
	FareDetail *FareDetail
}

type FareBasis

type FareBasis struct {
	FareBasisCode *FareBasisCode `xml:",omitempty"`
	RBD           string         `xml:",omitempty"`
}

type FareBasisCode

type FareBasisCode struct {
	Code        string
	Application string `xml:",omitempty"`
}

type FareCode

type FareCode struct {
	Code string
}

type FareComponent

type FareComponent struct {
	Reference        string          `xml:"refs,attr,omitempty"`
	ID               string          `xml:"ObjectKey,attr,omitempty"`
	SegmentReference string          `xml:",omitempty"`
	Parameters       *ParametersRS   `xml:",omitempty"`
	PriceBreakdown   *PriceBreakdown `xml:",omitempty"`
	FareBasis        *FareBasis      `xml:",omitempty"`
	TicketDesig      *TicketDesig    `xml:",omitempty"`
	FareRules        *FareRules      `xml:",omitempty"`
}

type FareDetail

type FareDetail struct {
	FareIndicatorCode   *FareIndicatorCode `xml:",omitempty"`
	PriceClassReference string             `xml:",omitempty"`
	FareComponent       []*FareComponent   `xml:",omitempty"`
	Remarks             *Remarks           `xml:",omitempty"`
}

type FareFiledIn

type FareFiledIn struct {
	BaseAmount   *BaseAmount
	ExchangeRate float64 `xml:",omitempty"`
}

type FareGroup

type FareGroup struct {
	Refs          string `xml:"refs,attr,omitempty"`
	ID            string `xml:"ListKey,attr"`
	Fare          *Fare
	FareBasisCode *FareBasisCode
}

type FareIndicatorCode

type FareIndicatorCode struct {
	Code string
}

type FareInfo

type FareInfo struct {
	BaseFare                 *BaseFare
	Total                    *BaseFare
	Taxes                    *Taxes
	UnstructuredFareCalcInfo *UnstructuredFareCalcInfo
}

type FareList

type FareList struct {
	FareGroup []*FareGroup
}

type FareRules

type FareRules struct {
	Ticketing *Ticketing
	Remarks   *Remarks
}

type Fees

type Fees struct {
	Total *Total
}

type Flight

type Flight struct {
	ID                string   `xml:"FlightKey,attr,omitempty"`
	SegmentReferences string   `xml:",omitempty"`
	Departure         *Point   `xml:",omitempty"`
	Arrival           *Point   `xml:",omitempty"`
	MarketingCarrier  *Carrier `xml:",omitempty"`
	OperatingCarrier  *Carrier `xml:",omitempty"`
}

type FlightDetail

type FlightDetail struct {
	FlightDistance *ValueUOM
	FlightDuration *FlightDuration
	Stops          *Stops `xml:",omitempty"`
}

type FlightDuration

type FlightDuration struct {
	Value string
}

type FlightItem

type FlightItem struct {
	Reference         string `xml:"refs,attr,omitempty"`
	OriginDestination []*OriginDestinationFlight
	FareDetail        *FareDetail
}

type FlightList

type FlightList struct {
	Flight []*Flight
}

type FlightPreferences

type FlightPreferences struct {
	Aircraft       *Aircraft
	Characteristic *Characteristic
}

type FlightSegment

type FlightSegment struct {
	SegmentKey       string `xml:",attr"`
	Departure        *Point
	Arrival          *Point
	MarketingCarrier *Carrier
	OperatingCarrier *Carrier
	Equipment        *Equipment
	ClassOfService   *ClassOfService
	FlightDetail     *FlightDetail
}

type FlightSegmentList

type FlightSegmentList struct {
	FlightSegment []*FlightSegment
}

type FlightSegmentReference

type FlightSegmentReference struct {
	Reference            string `xml:"ref,attr"`
	ClassOfService       *ClassOfService
	Cabin                *CabinFlightSegment
	BagDetailAssociation *BagDetailAssociation
}
type Header struct{}

type Instruction

type Instruction struct {
	ListKey                   string `xml:",attr,omitempty"`
	SpecialBookingInstruction *SpecialBookingInstruction
}

type InstructionsList

type InstructionsList struct {
	Instruction []*Instruction
}

type IssuingAirlineInfo

type IssuingAirlineInfo struct {
	AirlineName string
}

type ItinReshopRQ

type ItinReshopRQ struct {
	XMLName  xml.Name `xml:"http://www.iata.org/IATA/EDIST ItinReshopRQ"`
	Version  string   `xml:"Version,attr"`
	Document *Document
	Party    *Party
	Query    *Query
}

type ItinReshopRS

type ItinReshopRS struct {
	Version  string `xml:"Version,attr"`
	Document *Document
	Response *Response
	Errors   *Errors
}

type Metadata

type Metadata struct {
	Other *Other
}

func MakeResultType

func MakeResultType(status string) *Metadata

type Name

type Name struct {
	Surname string
	Given   string
	Title   string `xml:",omitempty"`
	Middle  string `xml:",omitempty"`
}

func MakeName

func MakeName(title, given, surname, middle string) *Name

type Offer

type Offer struct {
	OfferID    *OfferID
	OfferItems *OfferItems
}

type OfferDetailAssociation

type OfferDetailAssociation struct {
	OfferPenaltyReferences string
	OfferTermReferences    string
}

type OfferID

type OfferID struct {
	Owner string `xml:",attr"`
	Value string `xml:",chardata"`
}

func MakeOfferID

func MakeOfferID(owner, value string) *OfferID

type OfferItem

type OfferItem struct {
	OfferItemID      *OfferID          `xml:",omitempty"`
	Passengers       *Passengers       `xml:",omitempty"`
	OfferItemType    *OfferItemType    `xml:",omitempty"`
	ApplicableFlight *ApplicableFlight `xml:",omitempty"`
}

type OfferItemID

type OfferItemID struct {
	Owner string `xml:",attr"`
	Value string `xml:",chardata"`
}

type OfferItemType

type OfferItemType struct {
	DetailedFlightItem *DetailedFlightItem
}

type OfferItems

type OfferItems struct {
	OfferItem        []*OfferItem
	ApplicableFlight *ApplicableFlight
}

type OfferPrice

type OfferPrice struct {
	OfferItemID   string `xml:",attr"`
	RequestedDate *RequestedDate
	FareDetail    *FareDetail
}

type Offers

type Offers struct {
	Offer []*Offer
}

type OffersGroup

type OffersGroup struct {
	AirlineOffers *AirlineOffers
}

type OperatingCarrier

type OperatingCarrier struct {
	ResBookDesigCode string
}

type Order

type Order struct {
	OrderID           *OfferID
	BookingReferences *BookingReferences
	TimeLimits        *TimeLimits
	OrderItems        *OrderItemsRS
}

type OrderCancelRQ

type OrderCancelRQ struct {
	XMLName  xml.Name `xml:"http://www.iata.org/IATA/EDIST OrderCancelRQ"`
	Version  string   `xml:"Version,attr"`
	Document *Document
	Party    *Party
	Query    *QueryOrderCancel
}

type OrderCancelRS

type OrderCancelRS struct {
	Version  string `xml:"Version,attr"`
	Document *Document
	Success  bool
	Response *ResponseOrderCancel
	Errors   *Errors
}

type OrderCreateRQ

type OrderCreateRQ struct {
	XMLName  xml.Name `xml:"http://www.iata.org/IATA/EDIST OrderCreateRQ"`
	Version  string   `xml:"Version,attr"`
	Document *Document
	Party    *Party
	Query    *Query
}

type OrderItem

type OrderItem struct {
	OrderItemID  *OfferID
	FlightItem   *FlightItem
	Associations *Associations
}

type OrderItems

type OrderItems struct {
	DataLists        *DataLists
	ShoppingResponse *ShoppingResponse
	OrderItem        *OrderItem `xml:",omitempty"`
	OfferItem        *OfferItem `xml:",omitempty"`
}

type OrderItemsRS

type OrderItemsRS struct {
	OrderItem []*OrderItem
}

type OrderViewRS

type OrderViewRS struct {
	Version  string `xml:"Version,attr"`
	Document *Document
	Response *Response
	Errors   *Errors
}

type OriginDestination

type OriginDestination struct {
	Reference        string          `xml:"refs,attr,omitempty"`
	SegmentKey       string          `xml:",omitempty"`
	Status           *Status         `xml:",omitempty"`
	Departure        *Point          `xml:",omitempty"`
	Arrival          *Point          `xml:",omitempty"`
	MarketingCarrier *Carrier        `xml:",omitempty"`
	OperatingCarrier *Carrier        `xml:",omitempty"`
	CalendarDates    *CalendarDates  `xml:",omitempty"`
	Equipment        *Equipment      `xml:",omitempty"`
	CabinType        *StatusCode     `xml:",omitempty"`
	ClassOfService   *ClassOfService `xml:",omitempty"`
	Flight           *Flight         `xml:",omitempty"`
}

func MakeOriginDestination

func MakeOriginDestination(departureAirportCode string, dateDep time.Time, arrivalAirportCode string, dateArr time.Time, daysBefore, daysAfter int) *OriginDestination

type OriginDestinationDemand

type OriginDestinationDemand struct {
	Origin      string
	Destination string
}

type OriginDestinationFlight

type OriginDestinationFlight struct {
	OriginDestinationKey string `xml:",omitempty"`
	Flight               []*OriginDestination
}

type OriginDestinationList

type OriginDestinationList struct {
	OriginDestination []*OriginDestinationRS
}

type OriginDestinationRS

type OriginDestinationRS struct {
	ID               string `xml:"OriginDestinationKey,attr"`
	DepartureCode    string
	ArrivalCode      string
	FlightReferences string
}

type OriginDestinations

type OriginDestinations struct {
	OriginDestination []*OriginDestination
}

type Other

type Other struct {
	OtherMetadata *OtherMetadata `xml:",omitempty"`
	Remarks       *Remarks       `xml:",omitempty"`
}

type OtherAssociation

type OtherAssociation struct {
	Type           string
	ReferenceValue string
}

type OtherAssociations

type OtherAssociations struct {
	OtherAssociation []*OtherAssociation
}

type OtherID

type OtherID struct {
	Description string `xml:"Description,attr"`
	Value       string `xml:",chardata"`
}

type OtherIDs

type OtherIDs struct {
	OtherID []*OtherID
}

type OtherMetadata

type OtherMetadata struct {
	RuleMetadatas *RuleMetadatas
}

type PTC

type PTC struct {
	Quantity int    `xml:",attr,omitempty"`
	Value    string `xml:",chardata"`
}

func MakePTC

func MakePTC(qty int, passengerType string, qtyAdultChild, qtyInfant, qtyAdult *int) (ptc *PTC)

type Parameters

type Parameters struct {
	ServiceFilters *ServiceFilters `xml:",omitempty"`
	CurrCodes      *CurrCodes      `xml:",omitempty"`
}

type ParametersRS

type ParametersRS struct {
	Quantity int `xml:",attr"`
}

type Party

type Party struct {
	Sender *Sender
}

type PassengerDocument

type PassengerDocument struct {
	Type               string
	ID                 string
	BirthCountry       string
	DateOfIssue        string
	DateOfExpiration   string
	CountryOfResidence string
}

type PassengerIDInfo

type PassengerIDInfo struct {
	PassengerDocument *PassengerDocument
}

type Passengers

type Passengers struct {
	Passenger           []*User `xml:",omitempty"`
	PassengerReference  string  `xml:",omitempty"`
	PassengerReferences string  `xml:",omitempty"`
}

type Payment

type Payment struct {
	Type   *Type
	Other  *Other
	Amount *Total `xml:",omitempty"`
}

type PaymentTimeLimit

type PaymentTimeLimit struct {
	DateTime string `xml:",attr"`
}

func (*PaymentTimeLimit) GetDate

func (l *PaymentTimeLimit) GetDate() time.Time

type Payments

type Payments struct {
	Payment []*Payment
}

type Penalty

type Penalty struct {
	FareGroupReference string `xml:"refs,attr"`
	ID                 string `xml:"ObjectKey,attr"`
	Details            *Details
}

type PenaltyList

type PenaltyList struct {
	Penalty []*Penalty
}

type Period

type Period struct {
	ShortDate string `xml:",attr,omitempty"`
}

type PhoneContact

type PhoneContact struct {
	Number PhoneNumber
}

type PhoneNumber

type PhoneNumber struct {
	CountryCode string `xml:",attr"`
	AreaCode    string `xml:",attr"`
	Number      string `xml:",chardata"`
}

type PieceAllowance

type PieceAllowance struct {
	ApplicableParty   string
	TotalQuantity     int
	Descriptions      *Descriptions
	PieceMeasurements *PieceMeasurements
}

type PieceMeasurements

type PieceMeasurements struct {
	Quantity int `xml:",attr"`
}

type Point

type Point struct {
	AirportCode string
	Date        string    `xml:",omitempty"`
	Time        string    `xml:",omitempty"`
	Terminal    *Terminal `xml:",omitempty"`
}

func MakePoint

func MakePoint(namePoint, dataPoint, timePoint, terminal string) *Point

func (*Point) GetDate

func (p *Point) GetDate() time.Time

func (*Point) GetDateISO

func (p *Point) GetDateISO() string

func (*Point) GetTerminal

func (p *Point) GetTerminal() string

type Preference

type Preference struct {
	FlightPreferences *FlightPreferences
}

func MakePreference

func MakePreference(businessCabinOnly, directPreferences string) *Preference

type Preferences

type Preferences struct {
	Preference []*Preference
}

type Price

type Price struct {
	BaseAmount  *Total
	FareFiledIn *FareFiledIn
	Taxes       *Taxes
}

type PriceBreakdown

type PriceBreakdown struct {
	Price *Price
}

type PriceClass

type PriceClass struct {
	ID             string `xml:"ObjectKey,attr"`
	Name           string
	FareBasisCode  *FareBasisCode
	ClassOfService *ClassOfService
}

type PriceClassList

type PriceClassList struct {
	PriceClass []*PriceClass
}

type PriceDetail

type PriceDetail struct {
	TotalAmount *TotalAmount
	BaseAmount  *Total
	FareFiledIn *FareFiledIn
	Surcharges  *Surcharges
	Discount    *Discount
	Taxes       *Taxes
}

type PricedOffer

type PricedOffer struct {
	OfferPrice []*OfferPrice
}

type Qualifier

type Qualifier struct {
	SpecialFareQualifiers *SpecialFareQualifiers
}

func MakeQualifier

func MakeQualifier(companyIndex, account string) *Qualifier

type Qualifiers

type Qualifiers struct {
	Qualifier []*Qualifier
}

type Query

type Query struct {
	Passengers        *Passengers
	OrderItems        *OrderItems
	TicketDocQuantity int              `xml:",omitempty"`
	TicketDocInfo     []*TicketDocInfo `xml:",omitempty"`
	DataLists         *DataLists
	Reshop            *Reshop `xml:",omitempty"`
}

type QueryAirVoid

type QueryAirVoid struct {
	TicketDocQuantity int
	TicketDocument    *TicketDocument
}

type QueryOrderCancel

type QueryOrderCancel struct {
	BookingReferences *BookingReferences
}

type ReShopOffer

type ReShopOffer struct {
	ID                string `xml:"ObjectKey,attr"`
	OfferID           *OfferID
	TotalPrice        *TotalPrice
	ReShopPricedOffer *PricedOffer
}

type ReShopOffers

type ReShopOffers struct {
	ReShopOffer []*ReShopOffer
}

type Remarks

type Remarks struct {
	Remark []string
}

type RequestedDate

type RequestedDate struct {
	PriceDetail  *PriceDetail
	Associations []*Associations
}

type Reshop

type Reshop struct {
	Actions *Actions
}

type Response

type Response struct {
	Passengers     *Passengers
	Order          *Order
	ReShopOffers   *ReShopOffers
	DataList       *DataList
	TicketDocInfos *TicketDocInfos
}

type ResponseAirDocVoid

type ResponseAirDocVoid struct {
	TicketDocument *TicketDocument
}

type ResponseOrderCancel

type ResponseOrderCancel struct {
	OrderCancelProcessing bool
	OrderReference        string
}

type RuleMetadata

type RuleMetadata struct {
	MetadataKey string `xml:",attr"`
	RuleID      string
	Status      string
	Remarks     *Remarks
}

type RuleMetadatas

type RuleMetadatas struct {
	RuleMetadata []*RuleMetadata
}

type Sender

type Sender struct {
	AgentUserSender *AgentUserSender
}

type Service

type Service struct {
	ID           string        `xml:"ObjectKey,attr"`
	ServiceID    *OfferID      `xml:",omitempty"`
	Name         string        `xml:",omitempty"`
	TimeLimits   *TimeLimits   `xml:",omitempty"`
	Descriptions *Descriptions `xml:",omitempty"`
}

type ServiceFilter

type ServiceFilter struct {
	GroupCode    string
	SubGroupCode string `xml:",omitempty"`
}

func MakeServiceFilter

func MakeServiceFilter(group, subGroup string) *ServiceFilter

type ServiceFilters

type ServiceFilters struct {
	ServiceFilter []*ServiceFilter `xml:",omitempty"`
}

func MakeServiceFilters

func MakeServiceFilters(params map[string]string) *ServiceFilters

type ServiceList

type ServiceList struct {
	Service []*Service
}

type ShoppingResponse

type ShoppingResponse struct {
	Owner      string
	ResponseID string
	Offers     *Offers
}

type ShoppingResponseIDs

type ShoppingResponseIDs struct {
	ResponseID    string
	AssociatedIDs *AssociatedIDs
}

func MakeShoppingResponseIDs

func MakeShoppingResponseIDs(owner, itemID string) *ShoppingResponseIDs

type SoldAirlineInfo

type SoldAirlineInfo struct {
	Departure                *Point
	Arrival                  *Point
	OperatingCarrier         *OperatingCarrier
	MarketingCarrier         *Carrier
	TicketedBaggageAllowance *TicketedBaggageAllowance
}

type SpecialBookingInstruction

type SpecialBookingInstruction struct {
	Code       string `xml:",omitempty"`
	Definition string `xml:",omitempty"`
}

type SpecialFareQualifiers

type SpecialFareQualifiers struct {
	AirlineID    string
	CompanyIndex string
	Account      string
}

type Status

type Status struct {
	StatusCode *StatusCode
}

type StatusCode

type StatusCode struct {
	Code string
}

type StopLocation

type StopLocation struct {
	AirportCode   string
	ArrivalDate   string
	ArrivalTime   string
	DepartureDate string
	DepartureTime string
	GroundTime    string
}

func (*StopLocation) GetArrivalDate

func (l *StopLocation) GetArrivalDate() time.Time

func (*StopLocation) GetDepartureDate

func (l *StopLocation) GetDepartureDate() time.Time

type Stops

type Stops struct {
	StopQuantity  int
	StopLocations []*StopLocation
}

type Surcharge

type Surcharge struct {
	Total *Total
}

type Surcharges

type Surcharges struct {
	Surcharge *Surcharge
}

type Tax

type Tax struct {
	Amount  *Total
	TaxCode string
}

type Taxes

type Taxes struct {
	Total     *Total
	Breakdown *Breakdown
}

type Term

type Term struct {
	Reference       string `xml:"refs,attr,omitempty"`
	ID              string `xml:"ObjectKey,attr,omitempty"`
	AvailablePeriod *AvailablePeriod
}

type Terminal

type Terminal struct {
	Name string
}

type TermsList

type TermsList struct {
	ID   string `xml:"ListKey,attr,omitempty"`
	Term []*Term
}

type TicketDesig

type TicketDesig struct {
	Application string `xml:",attr,omitempty"`
	Value       int    `xml:",chardata"`
}

type TicketDocInfo

type TicketDocInfo struct {
	TravelerInfo          *TravelerInfo
	Traveler              *TravelerDoc        `xml:",omitempty"`
	IssuingAirlineInfo    *IssuingAirlineInfo `xml:",omitempty"`
	BookingReference      *BookingReference
	BookingReferences     *BookingReferences `xml:",omitempty"`
	Payments              *Payments
	OriginDestination     *OriginDestinationDemand `xml:",omitempty"`
	FareInfo              *FareInfo                `xml:",omitempty"`
	TicketDocument        *TicketDocument          `xml:",omitempty"`
	Price                 *TicketPrice             `xml:",omitempty"`
	Commission            *Commission              `xml:",omitempty"`
	PassengerSpecificData string                   `xml:",omitempty"`
}

type TicketDocInfos

type TicketDocInfos struct {
	TicketDocInfo []*TicketDocInfo `xml:",omitempty"`
}

type TicketDocument

type TicketDocument struct {
	TicketDocNbr     string
	Type             *Type
	NumberofBooklets int           `xml:",omitempty"`
	DateOfIssue      string        `xml:",omitempty"`
	CouponInfo       []*CouponInfo `xml:",omitempty"`
}

type TicketPrice

type TicketPrice struct {
	Total   *Total
	Details *DetailsTicketPrice
}

type TicketedBaggageAllowance

type TicketedBaggageAllowance struct {
	AllowableBag *AllowableBag
}

type Ticketing

type Ticketing struct {
	Endorsements *Endorsements
}

type TicketingTimeLimits

type TicketingTimeLimits struct {
	Timestamp string `xml:",attr"`
}

type TimeLimits

type TimeLimits struct {
	TicketingTimeLimits *TicketingTimeLimits `xml:",omitempty"`
	PaymentTimeLimit    *PaymentTimeLimit    `xml:",omitempty"`
}

type Total

type Total struct {
	Code  string `xml:",attr"`
	Value int64  `xml:",chardata"`
}

type TotalAmount

type TotalAmount struct {
	DetailCurrencyPrice *DetailCurrencyPrice
}

type TotalPrice

type TotalPrice struct {
	DetailCurrencyPrice *DetailCurrencyPrice
}

type Traveler

type Traveler struct {
	AnonymousTraveler *User `xml:",omitempty"`
}

type TravelerDoc

type TravelerDoc struct {
	Surname string
	Given   string
	PTC     *PTC
}

type TravelerFQTVInformation

type TravelerFQTVInformation struct {
	AirlineID string   `xml:",omitempty"`
	Account   *Account `xml:",omitempty"`
	ProgramID string   `xml:",omitempty"`
}

func MakeTravelerFQTVInformation

func MakeTravelerFQTVInformation(airlineID, account, programID string) *TravelerFQTVInformation

type TravelerInfo

type TravelerInfo struct {
	Surname string
	Given   string
	PTC     string
}

type Travelers

type Travelers struct {
	Traveler []*Traveler
}

func MakeTravelers

func MakeTravelers(trs map[string]int32) *Travelers

type Type

type Type struct {
	Code       string
	Definition string
}

type UnstructuredFareCalcInfo

type UnstructuredFareCalcInfo struct {
	Info string
}

type User

type User struct {
	ID              string `xml:"ObjectKey,attr,omitempty"`
	PTC             *PTC
	Age             *Age             `xml:",omitempty"`
	Name            *Name            `xml:",omitempty"`
	Contacts        *Contacts        `xml:",omitempty"`
	FQTVs           *FQTVs           `xml:",omitempty"`
	Gender          string           `xml:",omitempty"`
	PassengerIDInfo *PassengerIDInfo `xml:",omitempty"`
	Document        *Document        `xml:",omitempty"`
}

type ValueUOM

type ValueUOM struct {
	Value int
	UOM   string
}

type WeightAllowance

type WeightAllowance struct {
	MaximumWeight *ValueUOM
	Descriptions  *Descriptions
}

Directories

Path Synopsis
example
air_shopping command
book command
demand_tickets command
reprice command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL