Get and list order change offers (PREVIEW).
Endpoints
GET /air/order_change_offers/{id}- Get a change offerGET /air/order_change_offers- List change offers
Examples
# Get a change offer
{:ok, response} = Travel.Flights.OrderChangeOffers.get("oco_123")
# List change offers
{:ok, response} = Travel.Flights.OrderChangeOffers.list()
Summary
Functions
Get a change offer by ID.
List change offers with pagination.
Stream all change offers with automatic pagination.
Functions
@spec get(String.t()) :: {:ok, Travel.Types.DuffelResponse.t()} | {:error, Travel.Error.t() | term()}
Get a change offer by ID.
Parameters
offer_id- The change offer ID
Returns
{:ok, %Travel.Types.DuffelResponse{data: %Types.OrderChangeOffer{}}}on success{:error, %Travel.Error{}}on failure
@spec list(map() | nil) :: {:ok, Travel.Types.DuffelResponse.t()} | {:error, Travel.Error.t() | term()}
List change offers with pagination.
Parameters
opts- Optional query parameters::order_change_request_id- (required) The order change request ID:limit- Results per page:before- Cursor for previous page:after- Cursor for next page:sort- Sort order:max_connections- Maximum connections
Returns
{:ok, %Travel.Types.DuffelResponse{data: [%Types.OrderChangeOffer{}]}}on success{:error, %Travel.Error{}}on failure
@spec stream() :: Enumerable.t()
Stream all change offers with automatic pagination.
Returns
A Stream that yields %Travel.Types.DuffelResponse{} for each page.