bookunited/aqc-client

There is no license information available for the latest version (0.0.12) of this package.

A client library for the Amadeus Quick Connect API

Maintainers

Package info

bitbucket.org/travver/aqc-client

pkg:composer/bookunited/aqc-client

Statistics

Installs: 632

Dependents: 0

Suggesters: 0


README

bookunited/aqc-client is a PHP client library for the Amadeus Quick Connect API.

This project is currently aligned with Flight Offers Search API v2.14.

Requirements

  • PHP ^8.3
  • Composer

Installation

composer require bookunited/aqc-client

Quick Start

<?php

use Amadeus\Client\Client;
use Amadeus\Client\Configuration;
use Amadeus\Model\Collections\ExtendedTravelerCollection;
use Amadeus\Model\Collections\OriginDestinationCollection;
use Amadeus\Model\Collections\SourceCollection;
use Amadeus\Model\Enums\Source;
use Amadeus\Model\Enums\TravelerType;
use Amadeus\Model\Values\Date;
use Amadeus\Model\Values\DateTimeRange;
use Amadeus\Model\Values\ExtendedTravelerInfo;
use Amadeus\Model\Values\GetFlightOffersBody;
use Amadeus\Model\Values\IATA;
use Amadeus\Model\Values\OriginDestination;
use Amadeus\Requests\FlightOffersSearchRequest;
use Ramsey\Uuid\Uuid;

$client = new Client(
    configuration: new Configuration(
        endpoint: 'https://test.travel.api.amadeus.com',
        clientId: 'your-client-id',
        clientSecret: 'your-client-secret',
    ),
    cache: $yourCache,
);

$request = new FlightOffersSearchRequest(
    clientReference: Uuid::uuid4(),
    getFlightOffersBody: new GetFlightOffersBody(
        originDestinations: new OriginDestinationCollection([
            new OriginDestination(
                id: 1,
                originLocationCode: new IATA('AMS'),
                destinationLocationCode: new IATA('JFK'),
                departureDateTimeRange: new DateTimeRange(new Date('2026-07-01')),
            ),
        ]),
        travelers: new ExtendedTravelerCollection([
            new ExtendedTravelerInfo(id: 1, travelerType: TravelerType::ADULT),
        ]),
        sources: new SourceCollection([Source::GDS]),
    ),
);

$response = $client->get($request);

Development

Run the full verification pipeline:

./develop composer run verify

This runs formatting, static analysis, tests, and mutation testing.