Documentation
¶
Overview ¶
Package flights provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.6.0 DO NOT EDIT.
Index ¶
- type AdditionalServiceType
- type AircraftEntry
- type AircraftEquipment
- type AllotmentDetails
- type BaggageAllowance
- type CabinRestriction
- type CarrierEntry
- type CarrierRestrictions
- type ChargeableCheckdBags
- type ChargeableSeat
- type Co2Emission
- type CollectionMeta
- type CollectionMetaLink
- type ConnectionRestriction
- type Coverage
- type CurrencyEntry
- type DateTimeRange
- type DateTimeType
- type Dictionaries
- type Error400
- type Error500
- type ExtendedCabinRestriction
- type ExtendedPrice
- type ExtendedPricingOptions
- type ExtendedTravelerInfo
- type Fee
- type FeeType
- type FlightEndPoint
- type FlightFilters
- type FlightOffer
- type FlightOfferSource
- type FlightSegment
- type FlightStop
- type GETAirOffersReply
- type GetFlightOffersParams
- type GetFlightOffersParamsTravelClass
- type GetFlightOffersQuery
- type GetOverride
- type Issue
- type LocationEntry
- type LocationValue
- type N400Search
- type N500
- type OperatingFlight
- type OriginDestination
- type OriginDestinationLight
- type OriginalFlightEndPoint
- type OriginalFlightStop
- type Price
- type PricingOptionsFareType
- type ReturnAirOffers
- type SearchCriteria
- type SearchFlightOffersApplicationVndAmadeusPlusJSONRequestBody
- type SearchFlightOffersParams
- type Segment
- type ServiceName
- type SliceDiceIndicator
- type Tax
- type TravelClass
- type TravelerInfo
- type TravelerPricingFareOption
- type TravelerType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdditionalServiceType ¶
type AdditionalServiceType string
AdditionalServiceType additional service type
const ( CHECKEDBAGS AdditionalServiceType = "CHECKED_BAGS" MEALS AdditionalServiceType = "MEALS" OTHERSERVICES AdditionalServiceType = "OTHER_SERVICES" SEATS AdditionalServiceType = "SEATS" )
Defines values for AdditionalServiceType.
func (AdditionalServiceType) Valid ¶
func (e AdditionalServiceType) Valid() bool
Valid indicates whether the value is a known member of the AdditionalServiceType enum.
type AircraftEntry ¶
AircraftEntry defines model for AircraftEntry.
type AircraftEquipment ¶
type AircraftEquipment struct {
// Code IATA aircraft code (http://www.flugzeuginfo.net/table_accodes_iata_en.php)
Code *string `json:"code,omitempty"`
}
AircraftEquipment information related to the aircraft
type AllotmentDetails ¶
type AllotmentDetails struct {
// TourName The tour name agreed for this specific allotment.
TourName *string `json:"tourName,omitempty"`
// TourReference The tour reference agreed for this specific allotment.
TourReference *string `json:"tourReference,omitempty"`
}
AllotmentDetails defines model for AllotmentDetails.
type BaggageAllowance ¶
type BaggageAllowance struct {
// Quantity Total number of units
Quantity *int `json:"quantity,omitempty"`
// Weight Weight of the baggage allowance
Weight *int `json:"weight,omitempty"`
// WeightUnit Code to qualify unit as pounds or kilos
WeightUnit *string `json:"weightUnit,omitempty"`
}
BaggageAllowance baggageAllowance
type CabinRestriction ¶
type CabinRestriction struct {
// Cabin quality of service offered in the cabin where the seat is located in this flight. Economy, premium economy, business or first class
Cabin *TravelClass `json:"cabin,omitempty"`
// OriginDestinationIds The list of originDestination identifiers for which the cabinRestriction applies
OriginDestinationIds *[]string `json:"originDestinationIds,omitempty"`
}
CabinRestriction defines model for CabinRestriction.
type CarrierEntry ¶
CarrierEntry defines model for CarrierEntry.
type CarrierRestrictions ¶
type CarrierRestrictions struct {
// BlacklistedInEUAllowed This flag enable/disable filtering of blacklisted airline by EU. The list of the banned airlines is published in the Official Journal of the European Union, where they are included as annexes A and B to the Commission Regulation. The blacklist of an airline can concern all its flights or some specific aircraft types pertaining to the airline
BlacklistedInEUAllowed *bool `json:"blacklistedInEUAllowed,omitempty"`
// ExcludedCarrierCodes This option ensures that the system will only consider these airlines.
ExcludedCarrierCodes *[]string `json:"excludedCarrierCodes,omitempty"`
// IncludedCarrierCodes This option ensures that the system will only consider these airlines.
IncludedCarrierCodes *[]string `json:"includedCarrierCodes,omitempty"`
}
CarrierRestrictions Restriction towards carriers.
type ChargeableCheckdBags ¶
type ChargeableCheckdBags struct {
// Id Id of the chargeable bag
Id *string `json:"id,omitempty"`
// Quantity Total number of units
Quantity *int `json:"quantity,omitempty"`
// Weight Weight of the baggage allowance
Weight *int `json:"weight,omitempty"`
// WeightUnit Code to qualify unit as pounds or kilos
WeightUnit *string `json:"weightUnit,omitempty"`
}
ChargeableCheckdBags defines model for ChargeableCheckdBags.
type ChargeableSeat ¶
type ChargeableSeat struct {
// Id Id of the chargeable seat
Id *string `json:"id,omitempty"`
// Number seat number
Number *string `json:"number,omitempty"`
}
ChargeableSeat Details of chargeable seat
type Co2Emission ¶
type Co2Emission struct {
// Cabin quality of service offered in the cabin where the seat is located in this flight. Economy, premium economy, business or first class
Cabin *TravelClass `json:"cabin,omitempty"`
// Weight Weight of Co2 emitted for the concerned segment
Weight *int `json:"weight,omitempty"`
// WeightUnit Code to qualify unit as pounds or kilos
WeightUnit *string `json:"weightUnit,omitempty"`
}
Co2Emission defines model for Co2Emission.
type CollectionMeta ¶
type CollectionMeta struct {
Count *int `json:"count,omitempty"`
OneWayCombinations *[]struct {
FlightOfferIds *[]string `json:"flightOfferIds,omitempty"`
OriginDestinationId *string `json:"originDestinationId,omitempty"`
} `json:"oneWayCombinations,omitempty"`
}
CollectionMeta defines model for Collection_Meta.
type CollectionMetaLink ¶
type CollectionMetaLink struct {
Count *int `json:"count,omitempty"`
Links *struct {
First *string `json:"first,omitempty"`
Last *string `json:"last,omitempty"`
Next *string `json:"next,omitempty"`
Previous *string `json:"previous,omitempty"`
Self *string `json:"self,omitempty"`
Up *string `json:"up,omitempty"`
} `json:"links,omitempty"`
}
CollectionMetaLink defines model for Collection_Meta_Link.
type ConnectionRestriction ¶
type ConnectionRestriction struct {
// AirportChangeAllowed Allow to change airport during connection
AirportChangeAllowed *bool `json:"airportChangeAllowed,omitempty"`
// MaxNumberOfConnections The maximal number of connections for each itinerary. Value can be 0, 1 or 2.
MaxNumberOfConnections *float32 `json:"maxNumberOfConnections,omitempty"`
// NonStopPreferred When this option is requested, recommendations made of Non-Stop flights only are favoured by the search, on the whole itinerary, with a weight of 75%.
NonStopPreferred *bool `json:"nonStopPreferred,omitempty"`
// TechnicalStopsAllowed This option allows the single segment to have one or more intermediate stops (technical stops).
TechnicalStopsAllowed *bool `json:"technicalStopsAllowed,omitempty"`
}
ConnectionRestriction Restriction towards number of connections.
type Coverage ¶
type Coverage string
Coverage part of the trip covered by the travel class restriction (ALL_SEGMENTS if ommited)
type CurrencyEntry ¶
CurrencyEntry defines model for CurrencyEntry.
type DateTimeRange ¶
type DateTimeRange struct {
// Date Dates are specified in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) YYYY-MM-DD format, e.g. 2018-12-25
Date openapi_types.Date `json:"date"`
// DateWindow Either 1, 2 or 3 extra days around the local date (IxD for +/- x days - Ex: I3D), Either 1 to 3 days after the local date (PxD for +x days - Ex: P3D), or 1 to 3 days before the local date (MxD for -x days - Ex: M3D)
//
// Can not be combined with "originRadius" or "destinationRadius".
DateWindow *string `json:"dateWindow,omitempty"`
// Time Local time. hh:mm:ss format, e.g 10:30:00
Time *string `json:"time,omitempty"`
// TimeWindow 1 to 12 hours around (both +and -) the local time. Possibly limited by the number of extra days when specified, i.e. in some situations, it may not be used to exceed the maximum date range. [1-12]H format, e.g. 6H
//
// Can not be combined with "originRadius" or "destinationRadius".
TimeWindow *string `json:"timeWindow,omitempty"`
}
DateTimeRange defines model for DateTimeRange.
type DateTimeType ¶
type DateTimeType struct {
// Date Dates are specified in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) YYYY-MM-DD format, e.g. 2018-12-25
Date openapi_types.Date `json:"date"`
// Time Local time. hh:mm:ss format, e.g 10:30:00
Time *string `json:"time,omitempty"`
}
DateTimeType defines model for DateTimeType.
type Dictionaries ¶
type Dictionaries struct {
Aircraft *AircraftEntry `json:"aircraft,omitempty"`
Carriers *CarrierEntry `json:"carriers,omitempty"`
Currencies *CurrencyEntry `json:"currencies,omitempty"`
Locations *LocationEntry `json:"locations,omitempty"`
}
Dictionaries defines model for Dictionaries.
type Error400 ¶
type Error400 struct {
Errors []Issue `json:"errors"`
}
Error400 defines model for Error_400.
type Error500 ¶
type Error500 struct {
Errors []Issue `json:"errors"`
}
Error500 defines model for Error_500.
type ExtendedCabinRestriction ¶
type ExtendedCabinRestriction struct {
// Cabin quality of service offered in the cabin where the seat is located in this flight. Economy, premium economy, business or first class
Cabin *TravelClass `json:"cabin,omitempty"`
// Coverage part of the trip covered by the travel class restriction (ALL_SEGMENTS if ommited)
Coverage *Coverage `json:"coverage,omitempty"`
// OriginDestinationIds The list of originDestination identifiers for which the cabinRestriction applies
OriginDestinationIds *[]string `json:"originDestinationIds,omitempty"`
}
ExtendedCabinRestriction defines model for Extended_CabinRestriction.
type ExtendedPrice ¶
type ExtendedPrice struct {
AdditionalServices *[]struct {
Amount *string `json:"amount,omitempty"`
// Type additional service type
Type *AdditionalServiceType `json:"type,omitempty"`
} `json:"additionalServices,omitempty"`
// Base Amount without taxes
Base *string `json:"base,omitempty"`
// BillingCurrency Currency of the payment. It may be different than the requested currency
BillingCurrency *string `json:"billingCurrency,omitempty"`
Currency *string `json:"currency,omitempty"`
// Fees List of applicable fees
Fees *[]Fee `json:"fees,omitempty"`
// GrandTotal Total amount paid by the user (including fees and selected additional services).
GrandTotal *string `json:"grandTotal,omitempty"`
// Margin BOOK step ONLY - The price margin percentage (plus or minus) that the booking can tolerate. When set to 0, then no price magin is tolerated.
Margin *string `json:"margin,omitempty"`
// RefundableTaxes The amount of taxes which are refundable
RefundableTaxes *string `json:"refundableTaxes,omitempty"`
Taxes *[]Tax `json:"taxes,omitempty"`
// Total Total amount paid by the user
Total *string `json:"total,omitempty"`
}
ExtendedPrice defines model for Extended_Price.
type ExtendedPricingOptions ¶
type ExtendedPricingOptions struct {
// IncludedCheckedBagsOnly If true, returns the flight-offers with included checked bags only
IncludedCheckedBagsOnly *bool `json:"includedCheckedBagsOnly,omitempty"`
// NoPenaltyFare If true, returns the flight-offers with no penalty fares only
NoPenaltyFare *bool `json:"noPenaltyFare,omitempty"`
// NoRestrictionFare If true, returns the flight-offers with no restriction fares only
NoRestrictionFare *bool `json:"noRestrictionFare,omitempty"`
// RefundableFare If true, returns the flight-offers with refundable fares only
RefundableFare *bool `json:"refundableFare,omitempty"`
}
ExtendedPricingOptions fare filter options
type ExtendedTravelerInfo ¶
type ExtendedTravelerInfo = TravelerInfo
ExtendedTravelerInfo defines model for Extended_TravelerInfo.
type Fee ¶
type Fee struct {
Amount *string `json:"amount,omitempty"`
// Type type of fee
Type *FeeType `json:"type,omitempty"`
}
Fee a fee
type FeeType ¶
type FeeType string
FeeType type of fee
type FlightEndPoint ¶
type FlightEndPoint struct {
// At local date and time in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) YYYY-MM-ddThh:mm:ss format, e.g. 2017-02-10T20:40:00
At *time.Time `json:"at,omitempty"`
// IataCode [IATA airline codes](http://www.iata.org/publications/Pages/code-search.aspx)
IataCode *string `json:"iataCode,omitempty"`
// Terminal terminal name / number
Terminal *string `json:"terminal,omitempty"`
}
FlightEndPoint defines model for FlightEndPoint.
type FlightFilters ¶
type FlightFilters struct {
// BusSegmentAllowed This flag enable/disable filtering of bus segment
BusSegmentAllowed *bool `json:"busSegmentAllowed,omitempty"`
// CabinRestrictions Restriction towards cabins.
CabinRestrictions *[]ExtendedCabinRestriction `json:"cabinRestrictions,omitempty"`
// CarrierRestrictions Restriction towards carriers.
CarrierRestrictions *CarrierRestrictions `json:"carrierRestrictions,omitempty"`
// ConnectionRestriction Restriction towards number of connections.
ConnectionRestriction *ConnectionRestriction `json:"connectionRestriction,omitempty"`
// CrossBorderAllowed Allows to search a location outside the borders when a radius around a location is specified. Default is false.
CrossBorderAllowed *bool `json:"crossBorderAllowed,omitempty"`
// MaxFlightTime Maximum flight time as a percentage relative to the shortest flight time available for the itinerary
MaxFlightTime *float32 `json:"maxFlightTime,omitempty"`
// MoreOvernightsAllowed This flag enables/disables the possibility to have more overnight flights in Low Fare Search
MoreOvernightsAllowed *bool `json:"moreOvernightsAllowed,omitempty"`
// RailSegmentAllowed This flag enable/disable filtering of rail segment (TGV AIR, RAIL ...)
RailSegmentAllowed *bool `json:"railSegmentAllowed,omitempty"`
// ReturnToDepartureAirport This option force to retrieve flight-offer with a departure and a return in the same airport
ReturnToDepartureAirport *bool `json:"returnToDepartureAirport,omitempty"`
}
FlightFilters defines model for FlightFilters.
type FlightOffer ¶
type FlightOffer struct {
// DisablePricing BOOK step ONLY - If true, allows to book a PNR without pricing. Only for the source "GDS"
DisablePricing *bool `json:"disablePricing,omitempty"`
// Id Id of the flight offer
Id string `json:"id"`
// InstantTicketingRequired If true, inform that a ticketing will be required at booking step.
InstantTicketingRequired *bool `json:"instantTicketingRequired,omitempty"`
Itineraries *[]struct {
// Duration duration in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) PnYnMnDTnHnMnS format, e.g. PT2H10M for a duration of 2h10m
Duration *string `json:"duration,omitempty"`
Segments []Segment `json:"segments"`
} `json:"itineraries,omitempty"`
// LastTicketingDate If booked on the same day as the search (with respect to timezone), this flight offer is guaranteed to be thereafter valid for ticketing until this date (included). Unspecified when it does not make sense for this flight offer (e.g. no control over ticketing once booked). YYYY-MM-DD format, e.g. 2019-06-07
LastTicketingDate *string `json:"lastTicketingDate,omitempty"`
// LastTicketingDateTime If booked on the same day as the search (with respect to timezone), this flight offer is guaranteed to be thereafter valid for ticketing until this date/time (included). Unspecified when it does not make sense for this flight offer (e.g. no control over ticketing once booked). Information only this attribute is not used in input of pricing request. Local date and time in YYYY-MM-ddThh:mm:ss format, e.g. 2017-02-10T20:40:00
LastTicketingDateTime *time.Time `json:"lastTicketingDateTime,omitempty"`
// NonHomogeneous If true, upon completion of the booking, this pricing solution is expected to yield multiple records (a record contains booking information confirmed and stored, typically a Passenger Name Record (PNR), in the provider GDS or system)
NonHomogeneous *bool `json:"nonHomogeneous,omitempty"`
// NumberOfBookableSeats Number of seats bookable in a single request. Can not be higher than 9.
NumberOfBookableSeats *float32 `json:"numberOfBookableSeats,omitempty"`
// OneWay If true, the flight offer can be combined with other oneWays flight-offers to complete the whole journey (one-Way combinable feature).
OneWay *bool `json:"oneWay,omitempty"`
// PaymentCardRequired If true, a payment card is mandatory to book this flight offer
PaymentCardRequired *bool `json:"paymentCardRequired,omitempty"`
// Price price information
Price *ExtendedPrice `json:"price,omitempty"`
PricingOptions *struct {
// FareType type of fare of the flight-offer
FareType *PricingOptionsFareType `json:"fareType,omitempty"`
// IncludedCheckedBagsOnly If true, returns the flight-offers with included checked bags only
IncludedCheckedBagsOnly *bool `json:"includedCheckedBagsOnly,omitempty"`
// NoPenaltyFare If true, returns the flight-offers with no penalty fares only
NoPenaltyFare *bool `json:"noPenaltyFare,omitempty"`
// NoRestrictionFare If true, returns the flight-offers with no restriction fares only
NoRestrictionFare *bool `json:"noRestrictionFare,omitempty"`
// RefundableFare If true, returns the flight-offers with refundable fares only
RefundableFare *bool `json:"refundableFare,omitempty"`
} `json:"pricingOptions,omitempty"`
// Source source of the flight offer
Source *FlightOfferSource `json:"source,omitempty"`
// TravelerPricings Fare information for each traveler/segment
TravelerPricings *[]struct {
// AssociatedAdultId if type="HELD_INFANT", corresponds to the adult traveler's id who will share the seat
AssociatedAdultId *string `json:"associatedAdultId,omitempty"`
FareDetailsBySegment []struct {
AdditionalServices *struct {
// ChargeableCheckedBags Details of chargeable checked bags
ChargeableCheckedBags *ChargeableCheckdBags `json:"chargeableCheckedBags,omitempty"`
// ChargeableSeat Details of chargeable seat
ChargeableSeat *ChargeableSeat `json:"chargeableSeat,omitempty"`
// ChargeableSeatNumber DEPRECATED - use the chargeableSeat attribute - seat number
ChargeableSeatNumber *string `json:"chargeableSeatNumber,omitempty"`
// OtherServices Other services to add
OtherServices *[]ServiceName `json:"otherServices,omitempty"`
} `json:"additionalServices,omitempty"`
AllotmentDetails *AllotmentDetails `json:"allotmentDetails,omitempty"`
// BrandedFare The name of the Fare Family corresponding to the fares. Only for the GDS provider and if the airline has fare families filled
BrandedFare *string `json:"brandedFare,omitempty"`
// Cabin quality of service offered in the cabin where the seat is located in this flight. Economy, premium economy, business or first class
Cabin *TravelClass `json:"cabin,omitempty"`
// Class The code of the booking class, a.k.a. class of service or Reservations/Booking Designator (RBD)
Class *string `json:"class,omitempty"`
// FareBasis Fare basis specifying the rules of a fare. Usually, though not always, is composed of the booking class code followed by a set of letters and digits representing other characteristics of the ticket, such as refundability, minimum stay requirements, discounts or special promotional elements.
FareBasis *string `json:"fareBasis,omitempty"`
// IncludedCheckedBags baggageAllowance
IncludedCheckedBags *BaggageAllowance `json:"includedCheckedBags,omitempty"`
// IsAllotment True if the corresponding booking class is in an allotment
IsAllotment *bool `json:"isAllotment,omitempty"`
// SegmentId Id of the segment
SegmentId string `json:"segmentId"`
// SliceDiceIndicator slice and Dice indicator, such as Local Availability, Sub OnD(Origin and Destination) 1 Availability and Sub OnD 2 Availability
SliceDiceIndicator *SliceDiceIndicator `json:"sliceDiceIndicator,omitempty"`
} `json:"fareDetailsBySegment"`
// FareOption option specifying a group of fares, which may be valid under certain conditons
// Can be used to specify special fare discount for a passenger
FareOption TravelerPricingFareOption `json:"fareOption"`
Price *Price `json:"price,omitempty"`
// TravelerId Id of the traveler
TravelerId string `json:"travelerId"`
// TravelerType traveler type
// age restrictions : CHILD < 12y, HELD_INFANT < 2y, SEATED_INFANT < 2y, SENIOR >=60y
TravelerType TravelerType `json:"travelerType"`
} `json:"travelerPricings,omitempty"`
// Type the resource name
Type string `json:"type"`
// ValidatingAirlineCodes This option ensures that the system will only consider offers with these airlines as validating carrier.
ValidatingAirlineCodes *[]string `json:"validatingAirlineCodes,omitempty"`
}
FlightOffer defines model for FlightOffer.
type FlightOfferSource ¶
type FlightOfferSource string
FlightOfferSource source of the flight offer
const (
GDS FlightOfferSource = "GDS"
)
Defines values for FlightOfferSource.
func (FlightOfferSource) Valid ¶
func (e FlightOfferSource) Valid() bool
Valid indicates whether the value is a known member of the FlightOfferSource enum.
type FlightSegment ¶
type FlightSegment struct {
// Aircraft information related to the aircraft
Aircraft *AircraftEquipment `json:"aircraft,omitempty"`
// Arrival departure or arrival information
Arrival *FlightEndPoint `json:"arrival,omitempty"`
// CarrierCode providing the airline / carrier code
CarrierCode *string `json:"carrierCode,omitempty"`
// Departure departure or arrival information
Departure *FlightEndPoint `json:"departure,omitempty"`
// Duration stop duration in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) PnYnMnDTnHnMnS format, e.g. PT2H10M
Duration *string `json:"duration,omitempty"`
// Number the flight number as assigned by the carrier
Number *string `json:"number,omitempty"`
// Operating information about the operating flight
Operating *OperatingFlight `json:"operating,omitempty"`
// Stops information regarding the different stops composing the flight segment. E.g. technical stop, change of gauge...
Stops *[]FlightStop `json:"stops,omitempty"`
}
FlightSegment defining a flight segment; including both operating and marketing details when applicable
type FlightStop ¶
type FlightStop struct {
// ArrivalAt arrival at the stop in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) YYYY-MM-ddThh:mm:ss format, e.g. 2017-02-10T20:40:00
ArrivalAt *time.Time `json:"arrivalAt,omitempty"`
// DepartureAt departure from the stop in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) YYYY-MM-ddThh:mm:ss format, e.g. 2017-02-10T20:40:00
DepartureAt *time.Time `json:"departureAt,omitempty"`
// Duration stop duration in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) PnYnMnDTnHnMnS format, e.g. PT2H10M
Duration *string `json:"duration,omitempty"`
// IataCode [IATA airline codes](http://www.iata.org/publications/Pages/code-search.aspx)
IataCode *string `json:"iataCode,omitempty"`
}
FlightStop defines model for FlightStop.
type GETAirOffersReply ¶
type GETAirOffersReply struct {
Data []FlightOffer `json:"data"`
Dictionaries *Dictionaries `json:"dictionaries,omitempty"`
Meta *CollectionMetaLink `json:"meta,omitempty"`
Warnings *[]Issue `json:"warnings,omitempty"`
}
GETAirOffersReply defines model for GETAirOffersReply.
type GetFlightOffersParams ¶
type GetFlightOffersParams struct {
// OriginLocationCode city/airport [IATA code](http://www.iata.org/publications/Pages/code-search.aspx) from which the traveler will depart, e.g. BOS for Boston
OriginLocationCode string `form:"originLocationCode" json:"originLocationCode"`
// DestinationLocationCode city/airport [IATA code](http://www.iata.org/publications/Pages/code-search.aspx) to which the traveler is going, e.g. PAR for Paris
DestinationLocationCode string `form:"destinationLocationCode" json:"destinationLocationCode"`
// DepartureDate the date on which the traveler will depart from the origin to go to the destination. Dates are specified in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) YYYY-MM-DD format, e.g. 2017-12-25
DepartureDate openapi_types.Date `form:"departureDate" json:"departureDate"`
// ReturnDate the date on which the traveler will depart from the destination to return to the origin. If this parameter is not specified, only one-way itineraries are found. If this parameter is specified, only round-trip itineraries are found. Dates are specified in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) YYYY-MM-DD format, e.g. 2018-02-28
ReturnDate *openapi_types.Date `form:"returnDate,omitempty" json:"returnDate,omitempty"`
// Adults the number of adult travelers (age 12 or older on date of departure).
//
// The total number of seated travelers (adult and children) can not exceed 9.
Adults int `form:"adults" json:"adults"`
// Children the number of child travelers (older than age 2 and younger than age 12 on date of departure) who will each have their own separate seat. If specified, this number should be greater than or equal to 0
//
// The total number of seated travelers (adult and children) can not exceed 9.
Children *int `form:"children,omitempty" json:"children,omitempty"`
// Infants the number of infant travelers (whose age is less or equal to 2 on date of departure). Infants travel on the lap of an adult traveler, and thus the number of infants must not exceed the number of adults. If specified, this number should be greater than or equal to 0
Infants *int `form:"infants,omitempty" json:"infants,omitempty"`
// TravelClass most of the flight time should be spent in a cabin of this quality or higher. The accepted travel class is economy, premium economy, business or first class. If no travel class is specified, the search considers any travel class
TravelClass *GetFlightOffersParamsTravelClass `form:"travelClass,omitempty" json:"travelClass,omitempty"`
// IncludedAirlineCodes This option ensures that the system will only consider these airlines. This can not be cumulated with parameter excludedAirlineCodes.
//
// Airlines are specified as [IATA airline codes](http://www.iata.org/publications/Pages/code-search.aspx) and are comma-separated, e.g. 6X,7X,8X
IncludedAirlineCodes *string `form:"includedAirlineCodes,omitempty" json:"includedAirlineCodes,omitempty"`
// ExcludedAirlineCodes This option ensures that the system will ignore these airlines. This can not be cumulated with parameter includedAirlineCodes.
//
// Airlines are specified as [IATA airline codes](http://www.iata.org/publications/Pages/code-search.aspx) and are comma-separated, e.g. 6X,7X,8X
ExcludedAirlineCodes *string `form:"excludedAirlineCodes,omitempty" json:"excludedAirlineCodes,omitempty"`
// NonStop if set to true, the search will find only flights going from the origin to the destination with no stop in between
NonStop *bool `form:"nonStop,omitempty" json:"nonStop,omitempty"`
// CurrencyCode the preferred currency for the flight offers. Currency is specified in the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format, e.g. EUR for Euro
CurrencyCode *string `form:"currencyCode,omitempty" json:"currencyCode,omitempty"`
// MaxPrice maximum price per traveler. By default, no limit is applied. If specified, the value should be a positive number with no decimals
MaxPrice *int `form:"maxPrice,omitempty" json:"maxPrice,omitempty"`
// Max maximum number of flight offers to return. If specified, the value should be greater than or equal to 1
Max *int `form:"max,omitempty" json:"max,omitempty"`
}
GetFlightOffersParams defines parameters for GetFlightOffers.
type GetFlightOffersParamsTravelClass ¶
type GetFlightOffersParamsTravelClass string
GetFlightOffersParamsTravelClass defines parameters for GetFlightOffers.
const ( GetFlightOffersParamsTravelClassBUSINESS GetFlightOffersParamsTravelClass = "BUSINESS" GetFlightOffersParamsTravelClassECONOMY GetFlightOffersParamsTravelClass = "ECONOMY" GetFlightOffersParamsTravelClassFIRST GetFlightOffersParamsTravelClass = "FIRST" GetFlightOffersParamsTravelClassPREMIUMECONOMY GetFlightOffersParamsTravelClass = "PREMIUM_ECONOMY" )
Defines values for GetFlightOffersParamsTravelClass.
func (GetFlightOffersParamsTravelClass) Valid ¶
func (e GetFlightOffersParamsTravelClass) Valid() bool
Valid indicates whether the value is a known member of the GetFlightOffersParamsTravelClass enum.
type GetFlightOffersQuery ¶
type GetFlightOffersQuery struct {
// CurrencyCode The currency code, as defined in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217), to reflect the currency in which this amount is expressed.
CurrencyCode *string `json:"currencyCode,omitempty"`
// OriginDestinations Origins and Destinations must be properly ordered in time (chronological order in accordance with the timezone of each location) to describe the journey consistently. Dates and times must not be past nor more than 365 days in the future, according to provider settings.Number of Origins and Destinations must not exceed the limit defined in provider settings.
OriginDestinations []OriginDestination `json:"originDestinations"`
SearchCriteria *SearchCriteria `json:"searchCriteria,omitempty"`
// Sources Allows enable one or more sources. If present in the list, these sources will be called by the system.
Sources []FlightOfferSource `json:"sources"`
// Travelers travelers in the trip.
//
// Maximum number of passengers older than 2 yo (CHILD, ADULT, YOUGHT): 9.
// Each adult can travel with one INFANT so maximum total number of passengers: 18
Travelers []ExtendedTravelerInfo `json:"travelers"`
}
GetFlightOffersQuery defines model for GetFlightOffersQuery.
type Issue ¶
type Issue struct {
// Code an application-specific error code
Code *int64 `json:"code,omitempty"`
// Detail explanation of the error
Detail *string `json:"detail,omitempty"`
// Source an object containing references to the source of the error
Source *struct {
// Example a string indicating an example of the right value
Example *string `json:"example,omitempty"`
// Parameter a string indicating which URI query parameter caused the issue
Parameter *string `json:"parameter,omitempty"`
// Pointer a JSON Pointer [RFC6901] to the associated entity in the request document
Pointer *string `json:"pointer,omitempty"`
} `json:"source,omitempty"`
// Status the HTTP status code applicable to this error
Status *int `json:"status,omitempty"`
// Title a short summary of the error
Title *string `json:"title,omitempty"`
}
Issue defines model for Issue.
type LocationEntry ¶
type LocationEntry map[string]LocationValue
LocationEntry defines model for LocationEntry.
type LocationValue ¶
type LocationValue struct {
// CityCode City code associated to the airport
CityCode *string `json:"cityCode,omitempty"`
// CountryCode Country code of the airport
CountryCode *string `json:"countryCode,omitempty"`
}
LocationValue defines model for LocationValue.
type OperatingFlight ¶
type OperatingFlight struct {
// CarrierCode providing the airline / carrier code
CarrierCode *string `json:"carrierCode,omitempty"`
}
OperatingFlight information about the operating flight
type OriginDestination ¶
type OriginDestination struct {
// AlternativeDestinationsCodes Set of alternative destination location, such as a city or an airport. Currently, only the locations defined in [IATA](http://www.iata.org/publications/Pages/code-search.aspx) are supported.
AlternativeDestinationsCodes *[]string `json:"alternativeDestinationsCodes,omitempty"`
// AlternativeOriginsCodes Set of alternative origin location, such as a city or an airport. Currently, only the locations defined in [IATA](http://www.iata.org/publications/Pages/code-search.aspx) are supported.
AlternativeOriginsCodes *[]string `json:"alternativeOriginsCodes,omitempty"`
ArrivalDateTimeRange *DateTimeRange `json:"arrivalDateTimeRange,omitempty"`
DepartureDateTimeRange *DateTimeRange `json:"departureDateTimeRange,omitempty"`
// DestinationLocationCode Destination location, such as a city or an airport. Currently, only the locations defined in [IATA](http://www.iata.org/publications/Pages/code-search.aspx) are supported.
DestinationLocationCode *string `json:"destinationLocationCode,omitempty"`
// DestinationRadius Include other possible locations around the point, located less than this distance in kilometers away. Max:300
//
// Can not be combined with "dateWindow" or "timeWindow".
DestinationRadius *float32 `json:"destinationRadius,omitempty"`
// ExcludedConnectionPoints List of excluded connections points. Any FlightOffer with these connections points will be present in response. Currently, only the locations defined in IATA are supported. Used only by the AMADEUS provider
ExcludedConnectionPoints *[]string `json:"excludedConnectionPoints,omitempty"`
Id *string `json:"id,omitempty"`
// IncludedConnectionPoints List of included connections points. When an includedViaPoints option is specified, all FlightOffer returned must at least go via this Connecting Point. Currently, only the locations defined in IATA are supported. Used only by the AMADEUS provider
IncludedConnectionPoints *[]string `json:"includedConnectionPoints,omitempty"`
// OriginLocationCode Origin location, such as a city or an airport. Currently, only the locations defined in [IATA](http://www.iata.org/publications/Pages/code-search.aspx) are supported.
OriginLocationCode *string `json:"originLocationCode,omitempty"`
// OriginRadius Include other possible locations around the point, located less than this distance in kilometers away. Max:300
//
// Can not be combined with "dateWindow" or "timeWindow".
OriginRadius *float32 `json:"originRadius,omitempty"`
}
OriginDestination defines model for OriginDestination.
type OriginDestinationLight ¶
type OriginDestinationLight struct {
// DestinationLocationCode Destination location, such as a city or an airport. Currently, only the locations defined in [IATA](http://www.iata.org/publications/Pages/code-search.aspx) are supported.
DestinationLocationCode *string `json:"destinationLocationCode,omitempty"`
// ExcludedConnectionPoints List of excluded connections points. Any FlightOffer with these connections points will be present in response. Currently, only the locations defined in IATA are supported. Used only by the AMADEUS provider
ExcludedConnectionPoints *[]string `json:"excludedConnectionPoints,omitempty"`
Id *string `json:"id,omitempty"`
// IncludedConnectionPoints List of included connections points. When an includedViaPoints option is specified, all FlightOffer returned must at least go via this Connecting Point. Currently, only the locations defined in IATA are supported. Used only by the AMADEUS provider
IncludedConnectionPoints *[]string `json:"includedConnectionPoints,omitempty"`
// OriginLocationCode Origin location, such as a city or an airport. Currently, only the locations defined in [IATA](http://www.iata.org/publications/Pages/code-search.aspx) are supported.
OriginLocationCode *string `json:"originLocationCode,omitempty"`
}
OriginDestinationLight defines model for OriginDestinationLight.
type OriginalFlightEndPoint ¶
type OriginalFlightEndPoint struct {
// IataCode [IATA airline codes](http://www.iata.org/publications/Pages/code-search.aspx)
IataCode *string `json:"iataCode,omitempty"`
// Terminal terminal name / number
Terminal *string `json:"terminal,omitempty"`
}
OriginalFlightEndPoint departure or arrival information
type OriginalFlightStop ¶
type OriginalFlightStop struct {
// Duration stop duration in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) PnYnMnDTnHnMnS format, e.g. PT2H10M
Duration *string `json:"duration,omitempty"`
// IataCode [IATA airline codes](http://www.iata.org/publications/Pages/code-search.aspx)
IataCode *string `json:"iataCode,omitempty"`
}
OriginalFlightStop details of stops for direct or change of gauge flights
type Price ¶
type Price struct {
// Base Amount without taxes
Base *string `json:"base,omitempty"`
Currency *string `json:"currency,omitempty"`
// Fees List of applicable fees
Fees *[]Fee `json:"fees,omitempty"`
// RefundableTaxes The amount of taxes which are refundable
RefundableTaxes *string `json:"refundableTaxes,omitempty"`
Taxes *[]Tax `json:"taxes,omitempty"`
// Total Total amount paid by the user
Total *string `json:"total,omitempty"`
}
Price defines model for Price.
type PricingOptionsFareType ¶
type PricingOptionsFareType = []string
PricingOptionsFareType type of fare of the flight-offer
type ReturnAirOffers ¶
type ReturnAirOffers struct {
Data []FlightOffer `json:"data"`
Dictionaries *Dictionaries `json:"dictionaries,omitempty"`
Meta *CollectionMeta `json:"meta,omitempty"`
Warnings *[]Issue `json:"warnings,omitempty"`
}
ReturnAirOffers defines model for returnAirOffers.
type SearchCriteria ¶
type SearchCriteria struct {
// AddOneWayOffers This option allows activate the one-way combinable feature
AddOneWayOffers *bool `json:"addOneWayOffers,omitempty"`
AdditionalInformation *struct {
// BrandedFares If true, returns the fare family name for each flight-offer which supports fare family
BrandedFares *bool `json:"brandedFares,omitempty"`
// ChargeableCheckedBags If true, returns the price of the first additional bag when the airline is an "Amadeus Ancillary Services" member.
ChargeableCheckedBags *bool `json:"chargeableCheckedBags,omitempty"`
} `json:"additionalInformation,omitempty"`
// AllowAlternativeFareOptions This option allows to default to a standard fareOption if no offers are found for the selected fareOption.
AllowAlternativeFareOptions *bool `json:"allowAlternativeFareOptions,omitempty"`
// ExcludeAllotments This option allows to exclude the isAllotment flag associated to a booking class in the search response when it exist.
ExcludeAllotments *bool `json:"excludeAllotments,omitempty"`
FlightFilters *FlightFilters `json:"flightFilters,omitempty"`
// MaxFlightOffers Maximum number of flight offers returned (Max 250)
MaxFlightOffers *float32 `json:"maxFlightOffers,omitempty"`
// MaxPrice maximum price per traveler. By default, no limit is applied. If specified, the value should be a positive number with no decimals
MaxPrice *int `json:"maxPrice,omitempty"`
// OneFlightOfferPerDay Requests the system to find at least one flight-offer per day, if possible, when a range of dates is specified. Default is false.
OneFlightOfferPerDay *bool `json:"oneFlightOfferPerDay,omitempty"`
// PricingOptions fare filter options
PricingOptions *ExtendedPricingOptions `json:"pricingOptions,omitempty"`
}
SearchCriteria defines model for SearchCriteria.
type SearchFlightOffersApplicationVndAmadeusPlusJSONRequestBody ¶
type SearchFlightOffersApplicationVndAmadeusPlusJSONRequestBody = GetFlightOffersQuery
SearchFlightOffersApplicationVndAmadeusPlusJSONRequestBody defines body for SearchFlightOffers for application/vnd.amadeus+json ContentType.
type SearchFlightOffersParams ¶
type SearchFlightOffersParams struct {
// XHTTPMethodOverride the HTTP method to apply
XHTTPMethodOverride GetOverride `json:"X-HTTP-Method-Override"`
}
SearchFlightOffersParams defines parameters for SearchFlightOffers.
type Segment ¶
type Segment struct {
// Aircraft information related to the aircraft
Aircraft *AircraftEquipment `json:"aircraft,omitempty"`
// Arrival departure or arrival information
Arrival *FlightEndPoint `json:"arrival,omitempty"`
// BlacklistedInEU When the flight has a marketing or/and operating airline that is identified as blacklisted by the European Commission.
//
// To improve travel safety, the European Commission regularly updates the list of the banned carriers from operating in Europe. It allows any Travel Agency located in the European Union to easily identify and hide any travel recommendation based on some unsafe airlines.
// The [list of the banned airlines](https://ec.europa.eu/transport/sites/transport/files/air-safety-list_en.pdf) is published in the Official Journal of the European Union, where they are included as annexes A and B to the Commission Regulation. The blacklist of an airline can concern all its flights or some specific aircraft types pertaining to the airline
BlacklistedInEU *bool `json:"blacklistedInEU,omitempty"`
// CarrierCode providing the airline / carrier code
CarrierCode *string `json:"carrierCode,omitempty"`
// Co2Emissions Co2 informations
Co2Emissions *[]Co2Emission `json:"co2Emissions,omitempty"`
// Departure departure or arrival information
Departure *FlightEndPoint `json:"departure,omitempty"`
// Duration stop duration in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) PnYnMnDTnHnMnS format, e.g. PT2H10M
Duration *string `json:"duration,omitempty"`
// Id Id of the segment
Id *string `json:"id,omitempty"`
// Number the flight number as assigned by the carrier
Number *string `json:"number,omitempty"`
// NumberOfStops Number of stops planned on the segment for technical or operation purpose i.e. refueling
NumberOfStops *int `json:"numberOfStops,omitempty"`
// Operating information about the operating flight
Operating *OperatingFlight `json:"operating,omitempty"`
// Stops information regarding the different stops composing the flight segment. E.g. technical stop, change of gauge...
Stops *[]FlightStop `json:"stops,omitempty"`
}
Segment defines model for Segment.
type ServiceName ¶
type ServiceName string
ServiceName type of service
const ( AIRPORTCHECKIN ServiceName = "AIRPORT_CHECKIN" PRIORITYBOARDING ServiceName = "PRIORITY_BOARDING" )
Defines values for ServiceName.
func (ServiceName) Valid ¶
func (e ServiceName) Valid() bool
Valid indicates whether the value is a known member of the ServiceName enum.
type SliceDiceIndicator ¶
type SliceDiceIndicator string
SliceDiceIndicator slice and Dice indicator, such as Local Availability, Sub OnD(Origin and Destination) 1 Availability and Sub OnD 2 Availability
const ( LOCALAVAILABILITY SliceDiceIndicator = "LOCAL_AVAILABILITY" SUBODAVAILABILITY1 SliceDiceIndicator = "SUB_OD_AVAILABILITY_1" SUBODAVAILABILITY2 SliceDiceIndicator = "SUB_OD_AVAILABILITY_2" )
Defines values for SliceDiceIndicator.
func (SliceDiceIndicator) Valid ¶
func (e SliceDiceIndicator) Valid() bool
Valid indicates whether the value is a known member of the SliceDiceIndicator enum.
type TravelClass ¶
type TravelClass string
TravelClass quality of service offered in the cabin where the seat is located in this flight. Economy, premium economy, business or first class
const ( TravelClassBUSINESS TravelClass = "BUSINESS" TravelClassECONOMY TravelClass = "ECONOMY" TravelClassFIRST TravelClass = "FIRST" TravelClassPREMIUMECONOMY TravelClass = "PREMIUM_ECONOMY" )
Defines values for TravelClass.
func (TravelClass) Valid ¶
func (e TravelClass) Valid() bool
Valid indicates whether the value is a known member of the TravelClass enum.
type TravelerInfo ¶
type TravelerInfo struct {
// AssociatedAdultId if type="HELD_INFANT", corresponds to the adult travelers's id who will share the seat
AssociatedAdultId *string `json:"associatedAdultId,omitempty"`
Id string `json:"id"`
// TravelerType traveler type
// age restrictions : CHILD < 12y, HELD_INFANT < 2y, SEATED_INFANT < 2y, SENIOR >=60y
TravelerType TravelerType `json:"travelerType"`
}
TravelerInfo defines model for TravelerInfo.
type TravelerPricingFareOption ¶
type TravelerPricingFareOption string
TravelerPricingFareOption option specifying a group of fares, which may be valid under certain conditons Can be used to specify special fare discount for a passenger
const ( ADULTWITHCOMPANION TravelerPricingFareOption = "ADULT_WITH_COMPANION" AIRFRANCECOMBINEDDISCOUNTPASS TravelerPricingFareOption = "AIR_FRANCE_COMBINED_DISCOUNT_PASS" AIRFRANCEDOMDISCOUNTPASS TravelerPricingFareOption = "AIR_FRANCE_DOM_DISCOUNT_PASS" AIRFRANCEFAMILY TravelerPricingFareOption = "AIR_FRANCE_FAMILY" AIRFRANCEMETROPOLITANDISCOUNTPASS TravelerPricingFareOption = "AIR_FRANCE_METROPOLITAN_DISCOUNT_PASS" COMPANION TravelerPricingFareOption = "COMPANION" INCLUSIVETOUR TravelerPricingFareOption = "INCLUSIVE_TOUR" SPANISHBALEARICRESIDENT TravelerPricingFareOption = "SPANISH_BALEARIC_RESIDENT" SPANISHCANARYRESIDENT TravelerPricingFareOption = "SPANISH_CANARY_RESIDENT" SPANISHCEUTARESIDENT TravelerPricingFareOption = "SPANISH_CEUTA_RESIDENT" SPANISHMELILLARESIDENT TravelerPricingFareOption = "SPANISH_MELILLA_RESIDENT" STANDARD TravelerPricingFareOption = "STANDARD" )
Defines values for TravelerPricingFareOption.
func (TravelerPricingFareOption) Valid ¶
func (e TravelerPricingFareOption) Valid() bool
Valid indicates whether the value is a known member of the TravelerPricingFareOption enum.
type TravelerType ¶
type TravelerType string
TravelerType traveler type age restrictions : CHILD < 12y, HELD_INFANT < 2y, SEATED_INFANT < 2y, SENIOR >=60y
const ( ADULT TravelerType = "ADULT" CHILD TravelerType = "CHILD" HELDINFANT TravelerType = "HELD_INFANT" SEATEDINFANT TravelerType = "SEATED_INFANT" SENIOR TravelerType = "SENIOR" STUDENT TravelerType = "STUDENT" YOUNG TravelerType = "YOUNG" )
Defines values for TravelerType.
func (TravelerType) Valid ¶
func (e TravelerType) Valid() bool
Valid indicates whether the value is a known member of the TravelerType enum.