Skip to content

mplus-software/formitable-api-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SwaggerClient-php

New in this version:

  • Added Get Single restaurant operation.
  • Verify availability for a datetime / partysize.
  • Select tables with create and update booking.
  • Get tables and areas by the POS identifiers

This PHP package is automatically generated by the Swagger Codegen project:

  • API version: v1.2
  • Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen

Requirements

PHP 5.5 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
    }
  ],
  "require": {
    "GIT_USER_ID/GIT_REPO_ID": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/SwaggerClient-php/vendor/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Swagger\Client\Api\AreaApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$restaurant_uid = "restaurant_uid_example"; // string | The unique identifier of the restaurant.
$version = "version_example"; // string | 

try {
    $result = $apiInstance->areaGet($restaurant_uid, $version);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AreaApi->areaGet: ', $e->getMessage(), PHP_EOL;
}

$apiInstance = new Swagger\Client\Api\AreaApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$restaurant_uid = "restaurant_uid_example"; // string | The unique identifier of the restaurant.
$area_id = 56; // int | 
$version = "version_example"; // string | 

try {
    $result = $apiInstance->areaGetById($restaurant_uid, $area_id, $version);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AreaApi->areaGetById: ', $e->getMessage(), PHP_EOL;
}
?>

Documentation for API Endpoints

All URIs are relative to /

Class Method HTTP request Description
AreaApi areaGet GET /api/v{version}/{restaurantUid}/areas Get the list of areas of the restaurant
AreaApi areaGetById GET /api/v{version}/{restaurantUid}/areas/{areaId} Get the details of a specific area
AvailabilityApi availabilityGetAvailabilityForDays GET /api/v{version}/{restaurantUid}/availability/days/{from}/{days}/{numberOfPeople}/{language} Get days availability
AvailabilityApi availabilityGetAvailabilityForMonth GET /api/v{version}/{restaurantUid}/availability/month/{month}/{year}/{numberOfPeople}/{language} Get availability of month
AvailabilityApi availabilityGetFirstDateTime GET /api/v{version}/{restaurantUid}/availability/first/{numberOfPeople}/{language} Get first available date
AvailabilityApi availabilityGetOpenTimesForDay GET /api/v{version}/{restaurantUid}/availability/open/{date} Get opening times
AvailabilityApi availabilityGetTimesForDay GET /api/v{version}/{restaurantUid}/availability/day/{date}/{numberOfPeople}/{language} Get times of a day
AvailabilityApi availabilityIsAvailable GET /api/v{version}/{restaurantUid}/availability/available/{dateTime}/{numberOfPeople} Verify availability
BookingApi bookingCancel DELETE /api/v{version}/{restaurantUid}/booking/{uid} Cancel booking
BookingApi bookingCheckIn PUT /api/v{version}/{restaurantUid}/booking/checkin/{uid} Check-in booking
BookingApi bookingCheckOut PUT /api/v{version}/{restaurantUid}/booking/checkout/{uid} Check-out booking
BookingApi bookingCreate POST /api/v{version}/{restaurantUid}/booking Create booking
BookingApi bookingCreateMessage POST /api/v{version}/{restaurantUid}/booking/{uid}/message Create user message
BookingApi bookingCreateMessageToUser POST /api/v{version}/{restaurantUid}/booking/{uid}/messagetouser Create restaurant message
BookingApi bookingGetBookingByExternalReferenceId GET /api/v{version}/{restaurantUid}/booking/external/{source}/{externalReferenceId} Get a booking using the external source and reference ID.
BookingApi bookingGetByUid GET /api/v{version}/{restaurantUid}/booking/{uid} Get booking
BookingApi bookingGetFutureBookings GET /api/v{version}/{restaurantUid}/booking/{from}/{days} Get future bookings
BookingApi bookingGetMessages GET /api/v{version}/{restaurantUid}/booking/{uid}/message Get messages of booking
BookingApi bookingUpdate PUT /api/v{version}/{restaurantUid}/booking/{uid} Update booking
ConfigurationApi configForDay GET /api/v{version}/{restaurantUid}/configuration/day/{date} Get configuration of a day
ConfigurationApi configForDayAndPeople GET /api/v{version}/{restaurantUid}/configuration/{dateTime}/{numberOfPeople} Get configuration
ConfigurationApi configsBatch POST /api/v{version}/{restaurantUid}/configuration/batch Get batch of configurations
ConfigurationApi configsForMonth GET /api/v{version}/{restaurantUid}/configuration/month/{year}/{month} Get configuration of month
ProductApi productTicketGetTickets GET /api/v{version}/{restaurantUid}/product/ticket Get tickets
ProductApi productTicketGetVouchers GET /api/v{version}/{restaurantUid}/product/voucher Get gift vouchers
RestaurantApi appRestaurantSettings GET /api/v{version}/restaurants/{restaurantUid}/appsettings Gets app settings of the restaurant. This can only be called by Apps.
RestaurantApi restaurantGet GET /api/v{version}/restaurants Get restaurant list
RestaurantApi restaurantGetByUid GET /api/v{version}/restaurants/{restaurantUid} Get restaurant
RestaurantApi restaurantGetReviewSummary GET /api/v{version}/restaurants/{restaurantUid}/reviewsummary/{dateFrom} Get reviews summary
RestaurantApi restaurantGetReviews GET /api/v{version}/restaurants/{restaurantUid}/reviews Get reviews
TableApi tableGet GET /api/v{version}/{restaurantUid}/tables Get the list of active tables in the restaurant
TableApi tableGetByAreaId GET /api/v{version}/{restaurantUid}/tables/area/{areaId} Get the list of active tables in the specified area
TableApi tableGetById GET /api/v{version}/{restaurantUid}/tables/{tableId} Get the details of a specific table

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages