upgradelabs/laravel-avantio-api

Laravel package to interact with Avantio XML feeds and WebServices

1.0.0 2025-05-28 11:22 UTC

This package is auto-updated.

Last update: 2025-05-28 11:23:05 UTC


README

A Laravel package by Upgradelabs for interacting with the Avantio XML Feeds and WebServices API.

Requirements

  • PHP ^8.3
  • Laravel ^10.0

Installation

Require the package via Composer:

composer require upgradelabs/laravel-avantio-api

Publish the configuration file:

php artisan vendor:publish --provider="Upgradelabs\\Avantio\\AvantioServiceProvider" --tag="config"

Configure your .env with Avantio credentials:

AVANTIO_WSDL="https://ws.avantio.com/soap/vrmsConnectionServices.php?wsdl"
AVANTIO_USERNAME=your_username
AVANTIO_PASSWORD=your_password
AVANTIO_LANGUAGE=EN

Usage

You can use the Avantio facade or inject the Upgradelabs\\Avantio\\Client class:

use Avantio;

$result = Avantio::isAvailable([
    'Accommodation' => [
        'AccommodationCode' => 123,
        'UserCode' => 456,
        'LoginGA' => 'company_login'
    ],
    'DateFrom' => '2025-06-01',
    'DateTo' => '2025-06-10',
    'Occupants' => [
        'AdultsNumber' => 2
    ]
]);

Available Methods

  • isAvailable(array $criteria)
  • getBookingPrice(array $criteria)
  • setBooking(array $criteria)
  • getBooking(array $criteria)
  • cancelBooking(array $criteria)
  • getBookingList(array $criteria)

Testing

Run the test suite with PHPUnit:

vendor/bin/phpunit

Publishing to Packagist

  1. Push your repository to GitHub.
  2. Submit the package on Packagist: https://packagist.org/packages/submit

License

MIT