Restaurant Ordering API

Default

createOrder

Create a new order

Creates a new order for a restaurant. Customer must be authenticated. Order must contain at least one item.


/orders

Usage and SDK Samples

curl -X POST \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "http://localhost:8080/api/orders" \
 -d '{
  "specialInstructions" : "specialInstructions",
  "customerEmail" : "customerEmail",
  "restaurantId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
  "items" : [ {
    "itemId" : "itemId",
    "quantity" : 171976545
  }, {
    "itemId" : "itemId",
    "quantity" : 171976545
  } ],
  "customerName" : "customerName"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: BearerAuth
        HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth");
        BearerAuth.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        CreateOrderRequest createOrderRequest = ; // CreateOrderRequest | 

        try {
            Order result = apiInstance.createOrder(createOrderRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#createOrder");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final CreateOrderRequest createOrderRequest = new CreateOrderRequest(); // CreateOrderRequest | 

try {
    final result = await api_instance.createOrder(createOrderRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createOrder: $e\n');
}

import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        CreateOrderRequest createOrderRequest = ; // CreateOrderRequest | 

        try {
            Order result = apiInstance.createOrder(createOrderRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#createOrder");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: BearerAuth
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
CreateOrderRequest *createOrderRequest = ; // 

// Create a new order
[apiInstance createOrderWith:createOrderRequest
              completionHandler: ^(Order output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var RestaurantOrderingApi = require('restaurant_ordering_api');
var defaultClient = RestaurantOrderingApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: BearerAuth
var BearerAuth = defaultClient.authentications['BearerAuth'];
BearerAuth.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new RestaurantOrderingApi.DefaultApi()
var createOrderRequest = ; // {CreateOrderRequest} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createOrder(createOrderRequest, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createOrderExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: BearerAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var createOrderRequest = new CreateOrderRequest(); // CreateOrderRequest | 

            try {
                // Create a new order
                Order result = apiInstance.createOrder(createOrderRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.createOrder: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: BearerAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$createOrderRequest = ; // CreateOrderRequest | 

try {
    $result = $api_instance->createOrder($createOrderRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->createOrder: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure Bearer (JWT) access token for authorization: BearerAuth
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $createOrderRequest = WWW::OPenAPIClient::Object::CreateOrderRequest->new(); # CreateOrderRequest | 

eval {
    my $result = $api_instance->createOrder(createOrderRequest => $createOrderRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->createOrder: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: BearerAuth
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
createOrderRequest =  # CreateOrderRequest | 

try:
    # Create a new order
    api_response = api_instance.create_order(createOrderRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->createOrder: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let createOrderRequest = ; // CreateOrderRequest

    let mut context = DefaultApi::Context::default();
    let result = client.createOrder(createOrderRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
createOrderRequest *

Responses


createRestaurant

Create a new restaurant

Creates a new restaurant entry. Requires ADMIN role. The authenticated user will be set as the restaurant owner.


/restaurants

Usage and SDK Samples

curl -X POST \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "http://localhost:8080/api/restaurants" \
 -d '{
  "address" : "address",
  "phone" : "phone",
  "name" : "name",
  "description" : "description",
  "openingHours" : "openingHours",
  "cuisineType" : "cuisineType",
  "email" : "email"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: BearerAuth
        HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth");
        BearerAuth.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        CreateRestaurantRequest createRestaurantRequest = ; // CreateRestaurantRequest | 

        try {
            Restaurant result = apiInstance.createRestaurant(createRestaurantRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#createRestaurant");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final CreateRestaurantRequest createRestaurantRequest = new CreateRestaurantRequest(); // CreateRestaurantRequest | 

try {
    final result = await api_instance.createRestaurant(createRestaurantRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createRestaurant: $e\n');
}

import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        CreateRestaurantRequest createRestaurantRequest = ; // CreateRestaurantRequest | 

        try {
            Restaurant result = apiInstance.createRestaurant(createRestaurantRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#createRestaurant");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: BearerAuth
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
CreateRestaurantRequest *createRestaurantRequest = ; // 

// Create a new restaurant
[apiInstance createRestaurantWith:createRestaurantRequest
              completionHandler: ^(Restaurant output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var RestaurantOrderingApi = require('restaurant_ordering_api');
var defaultClient = RestaurantOrderingApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: BearerAuth
var BearerAuth = defaultClient.authentications['BearerAuth'];
BearerAuth.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new RestaurantOrderingApi.DefaultApi()
var createRestaurantRequest = ; // {CreateRestaurantRequest} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createRestaurant(createRestaurantRequest, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createRestaurantExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: BearerAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var createRestaurantRequest = new CreateRestaurantRequest(); // CreateRestaurantRequest | 

            try {
                // Create a new restaurant
                Restaurant result = apiInstance.createRestaurant(createRestaurantRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.createRestaurant: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: BearerAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$createRestaurantRequest = ; // CreateRestaurantRequest | 

try {
    $result = $api_instance->createRestaurant($createRestaurantRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->createRestaurant: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure Bearer (JWT) access token for authorization: BearerAuth
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $createRestaurantRequest = WWW::OPenAPIClient::Object::CreateRestaurantRequest->new(); # CreateRestaurantRequest | 

eval {
    my $result = $api_instance->createRestaurant(createRestaurantRequest => $createRestaurantRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->createRestaurant: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: BearerAuth
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
createRestaurantRequest =  # CreateRestaurantRequest | 

try:
    # Create a new restaurant
    api_response = api_instance.create_restaurant(createRestaurantRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->createRestaurant: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let createRestaurantRequest = ; // CreateRestaurantRequest

    let mut context = DefaultApi::Context::default();
    let result = client.createRestaurant(createRestaurantRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
createRestaurantRequest *

Responses


deleteOrder

Delete an order

Cancels and deletes an order. Only the order owner or users with ADMIN/RESTAURANT_OWNER role can delete orders.


/orders/{orderId}

Usage and SDK Samples

curl -X DELETE \
 -H "Authorization: Bearer [[accessToken]]" \
 "http://localhost:8080/api/orders/{orderId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: BearerAuth
        HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth");
        BearerAuth.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        UUID orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Unique identifier of the order to delete

        try {
            apiInstance.deleteOrder(orderId);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#deleteOrder");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final UUID orderId = new UUID(); // UUID | Unique identifier of the order to delete

try {
    final result = await api_instance.deleteOrder(orderId);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->deleteOrder: $e\n');
}

import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        UUID orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Unique identifier of the order to delete

        try {
            apiInstance.deleteOrder(orderId);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#deleteOrder");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: BearerAuth
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
UUID *orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Unique identifier of the order to delete (default to null)

// Delete an order
[apiInstance deleteOrderWith:orderId
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var RestaurantOrderingApi = require('restaurant_ordering_api');
var defaultClient = RestaurantOrderingApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: BearerAuth
var BearerAuth = defaultClient.authentications['BearerAuth'];
BearerAuth.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new RestaurantOrderingApi.DefaultApi()
var orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // {UUID} Unique identifier of the order to delete

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deleteOrder(orderId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class deleteOrderExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: BearerAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d;  // UUID | Unique identifier of the order to delete (default to null)

            try {
                // Delete an order
                apiInstance.deleteOrder(orderId);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.deleteOrder: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: BearerAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Unique identifier of the order to delete

try {
    $api_instance->deleteOrder($orderId);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->deleteOrder: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure Bearer (JWT) access token for authorization: BearerAuth
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Unique identifier of the order to delete

eval {
    $api_instance->deleteOrder(orderId => $orderId);
};
if ($@) {
    warn "Exception when calling DefaultApi->deleteOrder: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: BearerAuth
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Unique identifier of the order to delete (default to null)

try:
    # Delete an order
    api_instance.delete_order(orderId)
except ApiException as e:
    print("Exception when calling DefaultApi->deleteOrder: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID

    let mut context = DefaultApi::Context::default();
    let result = client.deleteOrder(orderId, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
orderId*
UUID (uuid)
Unique identifier of the order to delete
Required

Responses


deleteRestaurant

Delete a restaurant

Permanently deletes a restaurant and all associated data. Requires ADMIN role.


/restaurants/{restaurantId}

Usage and SDK Samples

curl -X DELETE \
 -H "Authorization: Bearer [[accessToken]]" \
 "http://localhost:8080/api/restaurants/{restaurantId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: BearerAuth
        HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth");
        BearerAuth.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        UUID restaurantId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Unique identifier of the restaurant to delete

        try {
            apiInstance.deleteRestaurant(restaurantId);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#deleteRestaurant");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final UUID restaurantId = new UUID(); // UUID | Unique identifier of the restaurant to delete

try {
    final result = await api_instance.deleteRestaurant(restaurantId);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->deleteRestaurant: $e\n');
}

import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        UUID restaurantId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Unique identifier of the restaurant to delete

        try {
            apiInstance.deleteRestaurant(restaurantId);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#deleteRestaurant");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: BearerAuth
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
UUID *restaurantId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Unique identifier of the restaurant to delete (default to null)

// Delete a restaurant
[apiInstance deleteRestaurantWith:restaurantId
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var RestaurantOrderingApi = require('restaurant_ordering_api');
var defaultClient = RestaurantOrderingApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: BearerAuth
var BearerAuth = defaultClient.authentications['BearerAuth'];
BearerAuth.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new RestaurantOrderingApi.DefaultApi()
var restaurantId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // {UUID} Unique identifier of the restaurant to delete

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deleteRestaurant(restaurantId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class deleteRestaurantExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: BearerAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var restaurantId = 38400000-8cf0-11bd-b23e-10b96e4ef00d;  // UUID | Unique identifier of the restaurant to delete (default to null)

            try {
                // Delete a restaurant
                apiInstance.deleteRestaurant(restaurantId);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.deleteRestaurant: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: BearerAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$restaurantId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Unique identifier of the restaurant to delete

try {
    $api_instance->deleteRestaurant($restaurantId);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->deleteRestaurant: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure Bearer (JWT) access token for authorization: BearerAuth
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $restaurantId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Unique identifier of the restaurant to delete

eval {
    $api_instance->deleteRestaurant(restaurantId => $restaurantId);
};
if ($@) {
    warn "Exception when calling DefaultApi->deleteRestaurant: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: BearerAuth
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
restaurantId = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Unique identifier of the restaurant to delete (default to null)

try:
    # Delete a restaurant
    api_instance.delete_restaurant(restaurantId)
except ApiException as e:
    print("Exception when calling DefaultApi->deleteRestaurant: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let restaurantId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID

    let mut context = DefaultApi::Context::default();
    let result = client.deleteRestaurant(restaurantId, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
restaurantId*
UUID (uuid)
Unique identifier of the restaurant to delete
Required

Responses


getCurrentUser

Get current user profile

Returns the profile information for the currently authenticated user.


/auth/me

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json" \
 "http://localhost:8080/api/auth/me"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: BearerAuth
        HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth");
        BearerAuth.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();

        try {
            User result = apiInstance.getCurrentUser();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getCurrentUser");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.getCurrentUser();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getCurrentUser: $e\n');
}

import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();

        try {
            User result = apiInstance.getCurrentUser();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getCurrentUser");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: BearerAuth
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Get current user profile
[apiInstance getCurrentUserWithCompletionHandler: 
              ^(User output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var RestaurantOrderingApi = require('restaurant_ordering_api');
var defaultClient = RestaurantOrderingApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: BearerAuth
var BearerAuth = defaultClient.authentications['BearerAuth'];
BearerAuth.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new RestaurantOrderingApi.DefaultApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCurrentUser(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getCurrentUserExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: BearerAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DefaultApi();

            try {
                // Get current user profile
                User result = apiInstance.getCurrentUser();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.getCurrentUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: BearerAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();

try {
    $result = $api_instance->getCurrentUser();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getCurrentUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure Bearer (JWT) access token for authorization: BearerAuth
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();

eval {
    my $result = $api_instance->getCurrentUser();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->getCurrentUser: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: BearerAuth
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()

try:
    # Get current user profile
    api_response = api_instance.get_current_user()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->getCurrentUser: %s\n" % e)
extern crate DefaultApi;

pub fn main() {

    let mut context = DefaultApi::Context::default();
    let result = client.getCurrentUser(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses


getOrder

Get a specific order

Retrieves detailed information about a specific order by its ID. Users can only access their own orders unless they have ADMIN or RESTAURANT_OWNER role.


/orders/{orderId}

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json" \
 "http://localhost:8080/api/orders/{orderId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: BearerAuth
        HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth");
        BearerAuth.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        UUID orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Unique identifier of the order

        try {
            Order result = apiInstance.getOrder(orderId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getOrder");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final UUID orderId = new UUID(); // UUID | Unique identifier of the order

try {
    final result = await api_instance.getOrder(orderId);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getOrder: $e\n');
}

import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        UUID orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Unique identifier of the order

        try {
            Order result = apiInstance.getOrder(orderId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getOrder");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: BearerAuth
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
UUID *orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Unique identifier of the order (default to null)

// Get a specific order
[apiInstance getOrderWith:orderId
              completionHandler: ^(Order output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var RestaurantOrderingApi = require('restaurant_ordering_api');
var defaultClient = RestaurantOrderingApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: BearerAuth
var BearerAuth = defaultClient.authentications['BearerAuth'];
BearerAuth.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new RestaurantOrderingApi.DefaultApi()
var orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // {UUID} Unique identifier of the order

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrder(orderId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getOrderExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: BearerAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d;  // UUID | Unique identifier of the order (default to null)

            try {
                // Get a specific order
                Order result = apiInstance.getOrder(orderId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.getOrder: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: BearerAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Unique identifier of the order

try {
    $result = $api_instance->getOrder($orderId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getOrder: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure Bearer (JWT) access token for authorization: BearerAuth
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Unique identifier of the order

eval {
    my $result = $api_instance->getOrder(orderId => $orderId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->getOrder: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: BearerAuth
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Unique identifier of the order (default to null)

try:
    # Get a specific order
    api_response = api_instance.get_order(orderId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->getOrder: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID

    let mut context = DefaultApi::Context::default();
    let result = client.getOrder(orderId, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
orderId*
UUID (uuid)
Unique identifier of the order
Required

Responses


getOrders

List all orders

Retrieves a list of orders. Can be filtered by restaurant, user, and/or status. Users can only see their own orders unless they have ADMIN or RESTAURANT_OWNER role.


/orders

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json" \
 "http://localhost:8080/api/orders?restaurantId=38400000-8cf0-11bd-b23e-10b96e4ef00d&userId=38400000-8cf0-11bd-b23e-10b96e4ef00d&status=status_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: BearerAuth
        HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth");
        BearerAuth.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        UUID restaurantId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Filter orders by restaurant ID
        UUID userId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Filter orders by user ID
        String status = status_example; // String | Filter orders by status

        try {
            getOrders_200_response result = apiInstance.getOrders(restaurantId, userId, status);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getOrders");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final UUID restaurantId = new UUID(); // UUID | Filter orders by restaurant ID
final UUID userId = new UUID(); // UUID | Filter orders by user ID
final String status = new String(); // String | Filter orders by status

try {
    final result = await api_instance.getOrders(restaurantId, userId, status);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getOrders: $e\n');
}

import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        UUID restaurantId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Filter orders by restaurant ID
        UUID userId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Filter orders by user ID
        String status = status_example; // String | Filter orders by status

        try {
            getOrders_200_response result = apiInstance.getOrders(restaurantId, userId, status);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getOrders");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: BearerAuth
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
UUID *restaurantId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Filter orders by restaurant ID (optional) (default to null)
UUID *userId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Filter orders by user ID (optional) (default to null)
String *status = status_example; // Filter orders by status (optional) (default to null)

// List all orders
[apiInstance getOrdersWith:restaurantId
    userId:userId
    status:status
              completionHandler: ^(getOrders_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var RestaurantOrderingApi = require('restaurant_ordering_api');
var defaultClient = RestaurantOrderingApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: BearerAuth
var BearerAuth = defaultClient.authentications['BearerAuth'];
BearerAuth.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new RestaurantOrderingApi.DefaultApi()
var opts = {
  'restaurantId': 38400000-8cf0-11bd-b23e-10b96e4ef00d, // {UUID} Filter orders by restaurant ID
  'userId': 38400000-8cf0-11bd-b23e-10b96e4ef00d, // {UUID} Filter orders by user ID
  'status': status_example // {String} Filter orders by status
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrders(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getOrdersExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: BearerAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var restaurantId = 38400000-8cf0-11bd-b23e-10b96e4ef00d;  // UUID | Filter orders by restaurant ID (optional)  (default to null)
            var userId = 38400000-8cf0-11bd-b23e-10b96e4ef00d;  // UUID | Filter orders by user ID (optional)  (default to null)
            var status = status_example;  // String | Filter orders by status (optional)  (default to null)

            try {
                // List all orders
                getOrders_200_response result = apiInstance.getOrders(restaurantId, userId, status);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.getOrders: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: BearerAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$restaurantId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Filter orders by restaurant ID
$userId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Filter orders by user ID
$status = status_example; // String | Filter orders by status

try {
    $result = $api_instance->getOrders($restaurantId, $userId, $status);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getOrders: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure Bearer (JWT) access token for authorization: BearerAuth
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $restaurantId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Filter orders by restaurant ID
my $userId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Filter orders by user ID
my $status = status_example; # String | Filter orders by status

eval {
    my $result = $api_instance->getOrders(restaurantId => $restaurantId, userId => $userId, status => $status);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->getOrders: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: BearerAuth
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
restaurantId = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Filter orders by restaurant ID (optional) (default to null)
userId = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Filter orders by user ID (optional) (default to null)
status = status_example # String | Filter orders by status (optional) (default to null)

try:
    # List all orders
    api_response = api_instance.get_orders(restaurantId=restaurantId, userId=userId, status=status)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->getOrders: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let restaurantId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
    let userId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
    let status = status_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.getOrders(restaurantId, userId, status, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
restaurantId
UUID (uuid)
Filter orders by restaurant ID
userId
UUID (uuid)
Filter orders by user ID
status
String
Filter orders by status

Responses


getRestaurant

Get a specific restaurant

Retrieves detailed information about a specific restaurant by its ID.


/restaurants/{restaurantId}

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "http://localhost:8080/api/restaurants/{restaurantId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        UUID restaurantId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Unique identifier of the restaurant

        try {
            Restaurant result = apiInstance.getRestaurant(restaurantId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getRestaurant");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final UUID restaurantId = new UUID(); // UUID | Unique identifier of the restaurant

try {
    final result = await api_instance.getRestaurant(restaurantId);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getRestaurant: $e\n');
}

import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        UUID restaurantId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Unique identifier of the restaurant

        try {
            Restaurant result = apiInstance.getRestaurant(restaurantId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getRestaurant");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
UUID *restaurantId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Unique identifier of the restaurant (default to null)

// Get a specific restaurant
[apiInstance getRestaurantWith:restaurantId
              completionHandler: ^(Restaurant output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var RestaurantOrderingApi = require('restaurant_ordering_api');

// Create an instance of the API class
var api = new RestaurantOrderingApi.DefaultApi()
var restaurantId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // {UUID} Unique identifier of the restaurant

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getRestaurant(restaurantId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getRestaurantExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var restaurantId = 38400000-8cf0-11bd-b23e-10b96e4ef00d;  // UUID | Unique identifier of the restaurant (default to null)

            try {
                // Get a specific restaurant
                Restaurant result = apiInstance.getRestaurant(restaurantId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.getRestaurant: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$restaurantId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Unique identifier of the restaurant

try {
    $result = $api_instance->getRestaurant($restaurantId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getRestaurant: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $restaurantId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Unique identifier of the restaurant

eval {
    my $result = $api_instance->getRestaurant(restaurantId => $restaurantId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->getRestaurant: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
restaurantId = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Unique identifier of the restaurant (default to null)

try:
    # Get a specific restaurant
    api_response = api_instance.get_restaurant(restaurantId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->getRestaurant: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let restaurantId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID

    let mut context = DefaultApi::Context::default();
    let result = client.getRestaurant(restaurantId, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
restaurantId*
UUID (uuid)
Unique identifier of the restaurant
Required

Responses


getRestaurants

List all restaurants

Retrieves a paginated list of all active restaurants. Supports pagination via page and size parameters.


/restaurants

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "http://localhost:8080/api/restaurants?page=page_example&size=size_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        String page = page_example; // String | Page number (0-indexed) for pagination
        String size = size_example; // String | Number of items per page

        try {
            RestaurantPage result = apiInstance.getRestaurants(page, size);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getRestaurants");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String page = new String(); // String | Page number (0-indexed) for pagination
final String size = new String(); // String | Number of items per page

try {
    final result = await api_instance.getRestaurants(page, size);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getRestaurants: $e\n');
}

import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String page = page_example; // String | Page number (0-indexed) for pagination
        String size = size_example; // String | Number of items per page

        try {
            RestaurantPage result = apiInstance.getRestaurants(page, size);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getRestaurants");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
String *page = page_example; // Page number (0-indexed) for pagination (optional) (default to 0)
String *size = size_example; // Number of items per page (optional) (default to 20)

// List all restaurants
[apiInstance getRestaurantsWith:page
    size:size
              completionHandler: ^(RestaurantPage output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var RestaurantOrderingApi = require('restaurant_ordering_api');

// Create an instance of the API class
var api = new RestaurantOrderingApi.DefaultApi()
var opts = {
  'page': page_example, // {String} Page number (0-indexed) for pagination
  'size': size_example // {String} Number of items per page
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getRestaurants(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getRestaurantsExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var page = page_example;  // String | Page number (0-indexed) for pagination (optional)  (default to 0)
            var size = size_example;  // String | Number of items per page (optional)  (default to 20)

            try {
                // List all restaurants
                RestaurantPage result = apiInstance.getRestaurants(page, size);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.getRestaurants: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$page = page_example; // String | Page number (0-indexed) for pagination
$size = size_example; // String | Number of items per page

try {
    $result = $api_instance->getRestaurants($page, $size);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getRestaurants: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $page = page_example; # String | Page number (0-indexed) for pagination
my $size = size_example; # String | Number of items per page

eval {
    my $result = $api_instance->getRestaurants(page => $page, size => $size);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->getRestaurants: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
page = page_example # String | Page number (0-indexed) for pagination (optional) (default to 0)
size = size_example # String | Number of items per page (optional) (default to 20)

try:
    # List all restaurants
    api_response = api_instance.get_restaurants(page=page, size=size)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->getRestaurants: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let page = page_example; // String
    let size = size_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.getRestaurants(page, size, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
page
String
Page number (0-indexed) for pagination
size
String
Number of items per page

Responses


googleAuth

Authenticate via Google OAuth2

Accepts a Google OAuth2 ID token obtained via Google Identity Services (GSI) on the client side. Validates the token against Google's tokeninfo endpoint, then finds or creates a user account for the associated email. Returns a JWT access token identical to the standard login response.


/auth/google

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "http://localhost:8080/api/auth/google" \
 -d '{
  "idToken" : "idToken"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        GoogleAuthRequest googleAuthRequest = ; // GoogleAuthRequest | 

        try {
            LoginResponse result = apiInstance.googleAuth(googleAuthRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#googleAuth");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final GoogleAuthRequest googleAuthRequest = new GoogleAuthRequest(); // GoogleAuthRequest | 

try {
    final result = await api_instance.googleAuth(googleAuthRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->googleAuth: $e\n');
}

import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        GoogleAuthRequest googleAuthRequest = ; // GoogleAuthRequest | 

        try {
            LoginResponse result = apiInstance.googleAuth(googleAuthRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#googleAuth");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
GoogleAuthRequest *googleAuthRequest = ; // 

// Authenticate via Google OAuth2
[apiInstance googleAuthWith:googleAuthRequest
              completionHandler: ^(LoginResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var RestaurantOrderingApi = require('restaurant_ordering_api');

// Create an instance of the API class
var api = new RestaurantOrderingApi.DefaultApi()
var googleAuthRequest = ; // {GoogleAuthRequest} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.googleAuth(googleAuthRequest, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class googleAuthExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var googleAuthRequest = new GoogleAuthRequest(); // GoogleAuthRequest | 

            try {
                // Authenticate via Google OAuth2
                LoginResponse result = apiInstance.googleAuth(googleAuthRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.googleAuth: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$googleAuthRequest = ; // GoogleAuthRequest | 

try {
    $result = $api_instance->googleAuth($googleAuthRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->googleAuth: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $googleAuthRequest = WWW::OPenAPIClient::Object::GoogleAuthRequest->new(); # GoogleAuthRequest | 

eval {
    my $result = $api_instance->googleAuth(googleAuthRequest => $googleAuthRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->googleAuth: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
googleAuthRequest =  # GoogleAuthRequest | 

try:
    # Authenticate via Google OAuth2
    api_response = api_instance.google_auth(googleAuthRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->googleAuth: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let googleAuthRequest = ; // GoogleAuthRequest

    let mut context = DefaultApi::Context::default();
    let result = client.googleAuth(googleAuthRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
googleAuthRequest *

Responses


hackServer

"Hack" the server

Causes the server to shutdown


/hack

Usage and SDK Samples

curl -X POST \
 -H "Authorization: Bearer [[accessToken]]" \
 "http://localhost:8080/api/hack"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: BearerAuth
        HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth");
        BearerAuth.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();

        try {
            apiInstance.hackServer();
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#hackServer");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.hackServer();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->hackServer: $e\n');
}

import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();

        try {
            apiInstance.hackServer();
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#hackServer");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: BearerAuth
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];

// "Hack" the server
[apiInstance hackServerWithCompletionHandler: 
              ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var RestaurantOrderingApi = require('restaurant_ordering_api');
var defaultClient = RestaurantOrderingApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: BearerAuth
var BearerAuth = defaultClient.authentications['BearerAuth'];
BearerAuth.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new RestaurantOrderingApi.DefaultApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.hackServer(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class hackServerExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: BearerAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DefaultApi();

            try {
                // "Hack" the server
                apiInstance.hackServer();
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.hackServer: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: BearerAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();

try {
    $api_instance->hackServer();
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->hackServer: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure Bearer (JWT) access token for authorization: BearerAuth
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();

eval {
    $api_instance->hackServer();
};
if ($@) {
    warn "Exception when calling DefaultApi->hackServer: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: BearerAuth
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()

try:
    # "Hack" the server
    api_instance.hack_server()
except ApiException as e:
    print("Exception when calling DefaultApi->hackServer: %s\n" % e)
extern crate DefaultApi;

pub fn main() {

    let mut context = DefaultApi::Context::default();
    let result = client.hackServer(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses


loginUser

Authenticate user and get JWT token

Authenticates user credentials and returns a JWT token for accessing protected endpoints.


/auth/login

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "http://localhost:8080/api/auth/login" \
 -d '{
  "identifier" : "identifier",
  "password" : "password"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        LoginRequest loginRequest = ; // LoginRequest | 

        try {
            LoginResponse result = apiInstance.loginUser(loginRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#loginUser");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final LoginRequest loginRequest = new LoginRequest(); // LoginRequest | 

try {
    final result = await api_instance.loginUser(loginRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->loginUser: $e\n');
}

import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        LoginRequest loginRequest = ; // LoginRequest | 

        try {
            LoginResponse result = apiInstance.loginUser(loginRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#loginUser");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
LoginRequest *loginRequest = ; // 

// Authenticate user and get JWT token
[apiInstance loginUserWith:loginRequest
              completionHandler: ^(LoginResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var RestaurantOrderingApi = require('restaurant_ordering_api');

// Create an instance of the API class
var api = new RestaurantOrderingApi.DefaultApi()
var loginRequest = ; // {LoginRequest} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.loginUser(loginRequest, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class loginUserExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var loginRequest = new LoginRequest(); // LoginRequest | 

            try {
                // Authenticate user and get JWT token
                LoginResponse result = apiInstance.loginUser(loginRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.loginUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$loginRequest = ; // LoginRequest | 

try {
    $result = $api_instance->loginUser($loginRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->loginUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $loginRequest = WWW::OPenAPIClient::Object::LoginRequest->new(); # LoginRequest | 

eval {
    my $result = $api_instance->loginUser(loginRequest => $loginRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->loginUser: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
loginRequest =  # LoginRequest | 

try:
    # Authenticate user and get JWT token
    api_response = api_instance.login_user(loginRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->loginUser: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let loginRequest = ; // LoginRequest

    let mut context = DefaultApi::Context::default();
    let result = client.loginUser(loginRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
loginRequest *

Responses


logoutUser

Logout user (invalidate token)

Invalidates the current JWT token, logging the user out of the system.


/auth/logout

Usage and SDK Samples

curl -X POST \
 -H "Authorization: Bearer [[accessToken]]" \
 "http://localhost:8080/api/auth/logout"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: BearerAuth
        HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth");
        BearerAuth.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();

        try {
            apiInstance.logoutUser();
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#logoutUser");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.logoutUser();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->logoutUser: $e\n');
}

import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();

        try {
            apiInstance.logoutUser();
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#logoutUser");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: BearerAuth
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Logout user (invalidate token)
[apiInstance logoutUserWithCompletionHandler: 
              ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var RestaurantOrderingApi = require('restaurant_ordering_api');
var defaultClient = RestaurantOrderingApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: BearerAuth
var BearerAuth = defaultClient.authentications['BearerAuth'];
BearerAuth.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new RestaurantOrderingApi.DefaultApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.logoutUser(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class logoutUserExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: BearerAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DefaultApi();

            try {
                // Logout user (invalidate token)
                apiInstance.logoutUser();
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.logoutUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: BearerAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();

try {
    $api_instance->logoutUser();
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->logoutUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure Bearer (JWT) access token for authorization: BearerAuth
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();

eval {
    $api_instance->logoutUser();
};
if ($@) {
    warn "Exception when calling DefaultApi->logoutUser: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: BearerAuth
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()

try:
    # Logout user (invalidate token)
    api_instance.logout_user()
except ApiException as e:
    print("Exception when calling DefaultApi->logoutUser: %s\n" % e)
extern crate DefaultApi;

pub fn main() {

    let mut context = DefaultApi::Context::default();
    let result = client.logoutUser(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses


registerUser

Register a new user

Creates a new user account with CUSTOMER role by default. Returns the created user object.


/auth/register

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "http://localhost:8080/api/auth/register" \
 -d '{
  "firstName" : "firstName",
  "lastName" : "lastName",
  "password" : "password",
  "email" : "email",
  "username" : "username"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        RegisterRequest registerRequest = ; // RegisterRequest | 

        try {
            User result = apiInstance.registerUser(registerRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#registerUser");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final RegisterRequest registerRequest = new RegisterRequest(); // RegisterRequest | 

try {
    final result = await api_instance.registerUser(registerRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->registerUser: $e\n');
}

import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        RegisterRequest registerRequest = ; // RegisterRequest | 

        try {
            User result = apiInstance.registerUser(registerRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#registerUser");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
RegisterRequest *registerRequest = ; // 

// Register a new user
[apiInstance registerUserWith:registerRequest
              completionHandler: ^(User output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var RestaurantOrderingApi = require('restaurant_ordering_api');

// Create an instance of the API class
var api = new RestaurantOrderingApi.DefaultApi()
var registerRequest = ; // {RegisterRequest} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.registerUser(registerRequest, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class registerUserExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var registerRequest = new RegisterRequest(); // RegisterRequest | 

            try {
                // Register a new user
                User result = apiInstance.registerUser(registerRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.registerUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$registerRequest = ; // RegisterRequest | 

try {
    $result = $api_instance->registerUser($registerRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->registerUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $registerRequest = WWW::OPenAPIClient::Object::RegisterRequest->new(); # RegisterRequest | 

eval {
    my $result = $api_instance->registerUser(registerRequest => $registerRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->registerUser: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
registerRequest =  # RegisterRequest | 

try:
    # Register a new user
    api_response = api_instance.register_user(registerRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->registerUser: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let registerRequest = ; // RegisterRequest

    let mut context = DefaultApi::Context::default();
    let result = client.registerUser(registerRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
registerRequest *

Responses


serverInfoGet

Read information about the server

Returns data like the hostname, time online, etc


/server-info

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "http://localhost:8080/api/server-info"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();

        try {
            ServerInfo result = apiInstance.serverInfoGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#serverInfoGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.serverInfoGet();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->serverInfoGet: $e\n');
}

import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();

        try {
            ServerInfo result = apiInstance.serverInfoGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#serverInfoGet");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Read information about the server
[apiInstance serverInfoGetWithCompletionHandler: 
              ^(ServerInfo output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var RestaurantOrderingApi = require('restaurant_ordering_api');

// Create an instance of the API class
var api = new RestaurantOrderingApi.DefaultApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.serverInfoGet(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class serverInfoGetExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new DefaultApi();

            try {
                // Read information about the server
                ServerInfo result = apiInstance.serverInfoGet();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.serverInfoGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();

try {
    $result = $api_instance->serverInfoGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->serverInfoGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();

eval {
    my $result = $api_instance->serverInfoGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->serverInfoGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()

try:
    # Read information about the server
    api_response = api_instance.server_info_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->serverInfoGet: %s\n" % e)
extern crate DefaultApi;

pub fn main() {

    let mut context = DefaultApi::Context::default();
    let result = client.serverInfoGet(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses


updateOrder

Update an order

Updates an existing order. Only allowed for orders in 'pending' status unless user has ADMIN role. Can update items, customer info, and status.


/orders/{orderId}

Usage and SDK Samples

curl -X PUT \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "http://localhost:8080/api/orders/{orderId}" \
 -d '{
  "specialInstructions" : "specialInstructions",
  "customerEmail" : "customerEmail",
  "items" : [ {
    "itemId" : "itemId",
    "quantity" : 171976545
  }, {
    "itemId" : "itemId",
    "quantity" : 171976545
  } ],
  "customerName" : "customerName",
  "status" : "pending"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: BearerAuth
        HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth");
        BearerAuth.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        UUID orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Unique identifier of the order to update
        UpdateOrderRequest updateOrderRequest = ; // UpdateOrderRequest | 

        try {
            Order result = apiInstance.updateOrder(orderId, updateOrderRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#updateOrder");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final UUID orderId = new UUID(); // UUID | Unique identifier of the order to update
final UpdateOrderRequest updateOrderRequest = new UpdateOrderRequest(); // UpdateOrderRequest | 

try {
    final result = await api_instance.updateOrder(orderId, updateOrderRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->updateOrder: $e\n');
}

import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        UUID orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Unique identifier of the order to update
        UpdateOrderRequest updateOrderRequest = ; // UpdateOrderRequest | 

        try {
            Order result = apiInstance.updateOrder(orderId, updateOrderRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#updateOrder");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: BearerAuth
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
UUID *orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Unique identifier of the order to update (default to null)
UpdateOrderRequest *updateOrderRequest = ; // 

// Update an order
[apiInstance updateOrderWith:orderId
    updateOrderRequest:updateOrderRequest
              completionHandler: ^(Order output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var RestaurantOrderingApi = require('restaurant_ordering_api');
var defaultClient = RestaurantOrderingApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: BearerAuth
var BearerAuth = defaultClient.authentications['BearerAuth'];
BearerAuth.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new RestaurantOrderingApi.DefaultApi()
var orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // {UUID} Unique identifier of the order to update
var updateOrderRequest = ; // {UpdateOrderRequest} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateOrder(orderId, updateOrderRequest, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class updateOrderExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: BearerAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d;  // UUID | Unique identifier of the order to update (default to null)
            var updateOrderRequest = new UpdateOrderRequest(); // UpdateOrderRequest | 

            try {
                // Update an order
                Order result = apiInstance.updateOrder(orderId, updateOrderRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.updateOrder: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: BearerAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Unique identifier of the order to update
$updateOrderRequest = ; // UpdateOrderRequest | 

try {
    $result = $api_instance->updateOrder($orderId, $updateOrderRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->updateOrder: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure Bearer (JWT) access token for authorization: BearerAuth
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Unique identifier of the order to update
my $updateOrderRequest = WWW::OPenAPIClient::Object::UpdateOrderRequest->new(); # UpdateOrderRequest | 

eval {
    my $result = $api_instance->updateOrder(orderId => $orderId, updateOrderRequest => $updateOrderRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->updateOrder: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: BearerAuth
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Unique identifier of the order to update (default to null)
updateOrderRequest =  # UpdateOrderRequest | 

try:
    # Update an order
    api_response = api_instance.update_order(orderId, updateOrderRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->updateOrder: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
    let updateOrderRequest = ; // UpdateOrderRequest

    let mut context = DefaultApi::Context::default();
    let result = client.updateOrder(orderId, updateOrderRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
orderId*
UUID (uuid)
Unique identifier of the order to update
Required
Body parameters
Name Description
updateOrderRequest *

Responses


updateRestaurant

Update a restaurant

Updates an existing restaurant's information. Requires ADMIN role.


/restaurants/{restaurantId}

Usage and SDK Samples

curl -X PUT \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "http://localhost:8080/api/restaurants/{restaurantId}" \
 -d '{
  "address" : "address",
  "phone" : "phone",
  "name" : "name",
  "description" : "description",
  "openingHours" : "openingHours",
  "cuisineType" : "cuisineType",
  "isActive" : true,
  "email" : "email"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: BearerAuth
        HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth");
        BearerAuth.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        UUID restaurantId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Unique identifier of the restaurant to update
        UpdateRestaurantRequest updateRestaurantRequest = ; // UpdateRestaurantRequest | 

        try {
            Restaurant result = apiInstance.updateRestaurant(restaurantId, updateRestaurantRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#updateRestaurant");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final UUID restaurantId = new UUID(); // UUID | Unique identifier of the restaurant to update
final UpdateRestaurantRequest updateRestaurantRequest = new UpdateRestaurantRequest(); // UpdateRestaurantRequest | 

try {
    final result = await api_instance.updateRestaurant(restaurantId, updateRestaurantRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->updateRestaurant: $e\n');
}

import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        UUID restaurantId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Unique identifier of the restaurant to update
        UpdateRestaurantRequest updateRestaurantRequest = ; // UpdateRestaurantRequest | 

        try {
            Restaurant result = apiInstance.updateRestaurant(restaurantId, updateRestaurantRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#updateRestaurant");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: BearerAuth
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
UUID *restaurantId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Unique identifier of the restaurant to update (default to null)
UpdateRestaurantRequest *updateRestaurantRequest = ; // 

// Update a restaurant
[apiInstance updateRestaurantWith:restaurantId
    updateRestaurantRequest:updateRestaurantRequest
              completionHandler: ^(Restaurant output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var RestaurantOrderingApi = require('restaurant_ordering_api');
var defaultClient = RestaurantOrderingApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: BearerAuth
var BearerAuth = defaultClient.authentications['BearerAuth'];
BearerAuth.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new RestaurantOrderingApi.DefaultApi()
var restaurantId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // {UUID} Unique identifier of the restaurant to update
var updateRestaurantRequest = ; // {UpdateRestaurantRequest} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateRestaurant(restaurantId, updateRestaurantRequest, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class updateRestaurantExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: BearerAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var restaurantId = 38400000-8cf0-11bd-b23e-10b96e4ef00d;  // UUID | Unique identifier of the restaurant to update (default to null)
            var updateRestaurantRequest = new UpdateRestaurantRequest(); // UpdateRestaurantRequest | 

            try {
                // Update a restaurant
                Restaurant result = apiInstance.updateRestaurant(restaurantId, updateRestaurantRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.updateRestaurant: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: BearerAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$restaurantId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Unique identifier of the restaurant to update
$updateRestaurantRequest = ; // UpdateRestaurantRequest | 

try {
    $result = $api_instance->updateRestaurant($restaurantId, $updateRestaurantRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->updateRestaurant: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure Bearer (JWT) access token for authorization: BearerAuth
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $restaurantId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Unique identifier of the restaurant to update
my $updateRestaurantRequest = WWW::OPenAPIClient::Object::UpdateRestaurantRequest->new(); # UpdateRestaurantRequest | 

eval {
    my $result = $api_instance->updateRestaurant(restaurantId => $restaurantId, updateRestaurantRequest => $updateRestaurantRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->updateRestaurant: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: BearerAuth
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
restaurantId = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Unique identifier of the restaurant to update (default to null)
updateRestaurantRequest =  # UpdateRestaurantRequest | 

try:
    # Update a restaurant
    api_response = api_instance.update_restaurant(restaurantId, updateRestaurantRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->updateRestaurant: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let restaurantId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
    let updateRestaurantRequest = ; // UpdateRestaurantRequest

    let mut context = DefaultApi::Context::default();
    let result = client.updateRestaurant(restaurantId, updateRestaurantRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
restaurantId*
UUID (uuid)
Unique identifier of the restaurant to update
Required
Body parameters
Name Description
updateRestaurantRequest *

Responses