createBooking
Create a new booking
/api/v1/bookings/
Usage and SDK Samples
curl -X POST \
-H "Accept: */*" \
-H "Content-Type: application/json" \
"https://localhost:8443/api/v1/bookings/" \
-d '{
"userEmail" : "userEmail",
"id" : 0,
"userName" : "userName",
"eventDescript" : "eventDescript",
"bussinesName" : "bussinesName",
"capacity" : 6,
"status" : "status"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.BookingsRestControllerApi;
import java.io.File;
import java.util.*;
public class BookingsRestControllerApiExample {
public static void main(String[] args) {
// Create an instance of the API class
BookingsRestControllerApi apiInstance = new BookingsRestControllerApi();
BookingDTO bookingDTO = ; // BookingDTO |
try {
BookingDTO result = apiInstance.createBooking(bookingDTO);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling BookingsRestControllerApi#createBooking");
e.printStackTrace();
}
}
}
import 'package:openapi/api.dart';
final api_instance = DefaultApi();
final BookingDTO bookingDTO = new BookingDTO(); // BookingDTO |
try {
final result = await api_instance.createBooking(bookingDTO);
print(result);
} catch (e) {
print('Exception when calling DefaultApi->createBooking: $e\n');
}
import org.openapitools.client.api.BookingsRestControllerApi;
public class BookingsRestControllerApiExample {
public static void main(String[] args) {
BookingsRestControllerApi apiInstance = new BookingsRestControllerApi();
BookingDTO bookingDTO = ; // BookingDTO |
try {
BookingDTO result = apiInstance.createBooking(bookingDTO);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling BookingsRestControllerApi#createBooking");
e.printStackTrace();
}
}
}
// Create an instance of the API class
BookingsRestControllerApi *apiInstance = [[BookingsRestControllerApi alloc] init];
BookingDTO *bookingDTO = ; //
// Create a new booking
[apiInstance createBookingWith:bookingDTO
completionHandler: ^(BookingDTO output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var OpenApiDefinition = require('open_api_definition');
// Create an instance of the API class
var api = new OpenApiDefinition.BookingsRestControllerApi()
var bookingDTO = ; // {BookingDTO}
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.createBooking(bookingDTO, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class createBookingExample
{
public void main()
{
// Create an instance of the API class
var apiInstance = new BookingsRestControllerApi();
var bookingDTO = new BookingDTO(); // BookingDTO |
try {
// Create a new booking
BookingDTO result = apiInstance.createBooking(bookingDTO);
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling BookingsRestControllerApi.createBooking: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\BookingsRestControllerApi();
$bookingDTO = ; // BookingDTO |
try {
$result = $api_instance->createBooking($bookingDTO);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BookingsRestControllerApi->createBooking: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::BookingsRestControllerApi;
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::BookingsRestControllerApi->new();
my $bookingDTO = WWW::OPenAPIClient::Object::BookingDTO->new(); # BookingDTO |
eval {
my $result = $api_instance->createBooking(bookingDTO => $bookingDTO);
print Dumper($result);
};
if ($@) {
warn "Exception when calling BookingsRestControllerApi->createBooking: $@\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.BookingsRestControllerApi()
bookingDTO = # BookingDTO |
try:
# Create a new booking
api_response = api_instance.create_booking(bookingDTO)
pprint(api_response)
except ApiException as e:
print("Exception when calling BookingsRestControllerApi->createBooking: %s\n" % e)
extern crate BookingsRestControllerApi;
pub fn main() {
let bookingDTO = ; // BookingDTO
let mut context = BookingsRestControllerApi::Context::default();
let result = client.createBooking(bookingDTO, &context).wait();
println!("{:?}", result);
}
Scopes
Parameters
| Name | Description |
|---|---|
| bookingDTO * |