Pular para conteúdo

pldpro_sdk.api_client.ReservasApi

All URIs are relative to /v1

Method HTTP request Description
create_reservation_catalog POST /reservation-catalogs Cria um registro no catálogo de reservas
delete_reservation_catalog DELETE /reservation-catalogs/{reservationId} Remove um registro do catálogo pela reservationId
get_all_reservation_catalogs GET /reservation-catalogs Lista os registros do catálogo de reservas
get_reservation_catalog_by_reservation_id GET /reservation-catalogs/{reservationId} Busca um registro do catálogo pela reservationId
get_reservation_catalog_capacity GET /reservation-catalogs/{reservationId}/capacity Consulta a capacidade atual de uma reserva
update_reservation_catalog PUT /reservation-catalogs/{reservationId} Atualiza um registro do catálogo pela reservationId

create_reservation_catalog

ReservationCatalogResponse create_reservation_catalog(reservation_catalog_request)

Cria um registro no catálogo de reservas

Cadastra uma nova reserva no reservation_catalog.

Example

  • Api Key Authentication (TenantIdAuth):
  • Api Key Authentication (ApiKeyAuth):
import pldpro_sdk.api_client
from pldpro_sdk.api_client.models.reservation_catalog_request import ReservationCatalogRequest
from pldpro_sdk.api_client.models.reservation_catalog_response import ReservationCatalogResponse
from pldpro_sdk.api_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /v1
# See configuration.py for a list of all supported configuration parameters.
configuration = pldpro_sdk.api_client.Configuration(
    host = "/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: TenantIdAuth
configuration.api_key['TenantIdAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TenantIdAuth'] = 'Bearer'

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with pldpro_sdk.api_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pldpro_sdk.api_client.ReservasApi(api_client)
    reservation_catalog_request = pldpro_sdk.api_client.ReservationCatalogRequest() # ReservationCatalogRequest | 

    try:
        # Cria um registro no catálogo de reservas
        api_response = api_instance.create_reservation_catalog(reservation_catalog_request)
        print("The response of ReservasApi->create_reservation_catalog:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ReservasApi->create_reservation_catalog: %s\n" % e)

Parameters

Name Type Description Notes
reservation_catalog_request ReservationCatalogRequest

Return type

ReservationCatalogResponse

Authorization

TenantIdAuth, ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Registro do catálogo de reservas criado com sucesso. -
400 Erro ao criar registro do catálogo de reservas -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_reservation_catalog

delete_reservation_catalog(reservation_id)

Remove um registro do catálogo pela reservationId

Exclui um registro de reservation_catalog identificado pelo campo lógico reservationId.

Example

  • Api Key Authentication (TenantIdAuth):
  • Api Key Authentication (ApiKeyAuth):
import pldpro_sdk.api_client
from pldpro_sdk.api_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /v1
# See configuration.py for a list of all supported configuration parameters.
configuration = pldpro_sdk.api_client.Configuration(
    host = "/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: TenantIdAuth
configuration.api_key['TenantIdAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TenantIdAuth'] = 'Bearer'

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with pldpro_sdk.api_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pldpro_sdk.api_client.ReservasApi(api_client)
    reservation_id = 'reservation_id_example' # str | Identificador lógico da reserva no catálogo

    try:
        # Remove um registro do catálogo pela reservationId
        api_instance.delete_reservation_catalog(reservation_id)
    except Exception as e:
        print("Exception when calling ReservasApi->delete_reservation_catalog: %s\n" % e)

Parameters

Name Type Description Notes
reservation_id str Identificador lógico da reserva no catálogo

Return type

void (empty response body)

Authorization

TenantIdAuth, ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
204 Registro do catálogo removido com sucesso. Nenhum conteúdo retornado. -
400 Erro ao remover registro do catálogo -
404 Registro do catálogo não encontrado -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_all_reservation_catalogs

List[ReservationCatalogResponse] get_all_reservation_catalogs()

Lista os registros do catálogo de reservas

Retorna todos os registros cadastrados em reservation_catalog, ordenados por prioridade e identificador lógico da reserva.

Example

  • Api Key Authentication (TenantIdAuth):
  • Api Key Authentication (ApiKeyAuth):
import pldpro_sdk.api_client
from pldpro_sdk.api_client.models.reservation_catalog_response import ReservationCatalogResponse
from pldpro_sdk.api_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /v1
# See configuration.py for a list of all supported configuration parameters.
configuration = pldpro_sdk.api_client.Configuration(
    host = "/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: TenantIdAuth
configuration.api_key['TenantIdAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TenantIdAuth'] = 'Bearer'

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with pldpro_sdk.api_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pldpro_sdk.api_client.ReservasApi(api_client)

    try:
        # Lista os registros do catálogo de reservas
        api_response = api_instance.get_all_reservation_catalogs()
        print("The response of ReservasApi->get_all_reservation_catalogs:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ReservasApi->get_all_reservation_catalogs: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

List[ReservationCatalogResponse]

Authorization

TenantIdAuth, ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Lista do catálogo de reservas retornada com sucesso. -
400 Erro ao listar catálogo de reservas -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_reservation_catalog_by_reservation_id

ReservationCatalogResponse get_reservation_catalog_by_reservation_id(reservation_id)

Busca um registro do catálogo pela reservationId

Retorna os detalhes de uma reserva cadastrada em reservation_catalog, identificada pelo campo lógico reservationId.

Example

  • Api Key Authentication (TenantIdAuth):
  • Api Key Authentication (ApiKeyAuth):
import pldpro_sdk.api_client
from pldpro_sdk.api_client.models.reservation_catalog_response import ReservationCatalogResponse
from pldpro_sdk.api_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /v1
# See configuration.py for a list of all supported configuration parameters.
configuration = pldpro_sdk.api_client.Configuration(
    host = "/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: TenantIdAuth
configuration.api_key['TenantIdAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TenantIdAuth'] = 'Bearer'

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with pldpro_sdk.api_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pldpro_sdk.api_client.ReservasApi(api_client)
    reservation_id = 'reservation_id_example' # str | Identificador lógico da reserva no catálogo

    try:
        # Busca um registro do catálogo pela reservationId
        api_response = api_instance.get_reservation_catalog_by_reservation_id(reservation_id)
        print("The response of ReservasApi->get_reservation_catalog_by_reservation_id:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ReservasApi->get_reservation_catalog_by_reservation_id: %s\n" % e)

Parameters

Name Type Description Notes
reservation_id str Identificador lógico da reserva no catálogo

Return type

ReservationCatalogResponse

Authorization

TenantIdAuth, ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Registro do catálogo encontrado com sucesso. -
400 Erro ao buscar registro do catálogo -
404 Registro do catálogo não encontrado -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_reservation_catalog_capacity

ReservationCapacityResponse get_reservation_catalog_capacity(reservation_id)

Consulta a capacidade atual de uma reserva

Retorna a capacidade configurada e o uso ativo atual de uma reserva cadastrada em reservation_catalog.

Example

  • Api Key Authentication (TenantIdAuth):
  • Api Key Authentication (ApiKeyAuth):
import pldpro_sdk.api_client
from pldpro_sdk.api_client.models.reservation_capacity_response import ReservationCapacityResponse
from pldpro_sdk.api_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /v1
# See configuration.py for a list of all supported configuration parameters.
configuration = pldpro_sdk.api_client.Configuration(
    host = "/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: TenantIdAuth
configuration.api_key['TenantIdAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TenantIdAuth'] = 'Bearer'

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with pldpro_sdk.api_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pldpro_sdk.api_client.ReservasApi(api_client)
    reservation_id = 'reservation_id_example' # str | Identificador lógico da reserva no catálogo

    try:
        # Consulta a capacidade atual de uma reserva
        api_response = api_instance.get_reservation_catalog_capacity(reservation_id)
        print("The response of ReservasApi->get_reservation_catalog_capacity:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ReservasApi->get_reservation_catalog_capacity: %s\n" % e)

Parameters

Name Type Description Notes
reservation_id str Identificador lógico da reserva no catálogo

Return type

ReservationCapacityResponse

Authorization

TenantIdAuth, ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Capacidade da reserva retornada com sucesso. -
400 Erro ao consultar capacidade da reserva -
404 Registro do catálogo não encontrado -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_reservation_catalog

ReservationCatalogResponse update_reservation_catalog(reservation_id, reservation_catalog_request)

Atualiza um registro do catálogo pela reservationId

Atualiza os dados de uma reserva cadastrada em reservation_catalog, identificada pelo campo lógico reservationId.

Example

  • Api Key Authentication (TenantIdAuth):
  • Api Key Authentication (ApiKeyAuth):
import pldpro_sdk.api_client
from pldpro_sdk.api_client.models.reservation_catalog_request import ReservationCatalogRequest
from pldpro_sdk.api_client.models.reservation_catalog_response import ReservationCatalogResponse
from pldpro_sdk.api_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /v1
# See configuration.py for a list of all supported configuration parameters.
configuration = pldpro_sdk.api_client.Configuration(
    host = "/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: TenantIdAuth
configuration.api_key['TenantIdAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TenantIdAuth'] = 'Bearer'

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with pldpro_sdk.api_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pldpro_sdk.api_client.ReservasApi(api_client)
    reservation_id = 'reservation_id_example' # str | Identificador lógico atual da reserva no catálogo
    reservation_catalog_request = pldpro_sdk.api_client.ReservationCatalogRequest() # ReservationCatalogRequest | 

    try:
        # Atualiza um registro do catálogo pela reservationId
        api_response = api_instance.update_reservation_catalog(reservation_id, reservation_catalog_request)
        print("The response of ReservasApi->update_reservation_catalog:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ReservasApi->update_reservation_catalog: %s\n" % e)

Parameters

Name Type Description Notes
reservation_id str Identificador lógico atual da reserva no catálogo
reservation_catalog_request ReservationCatalogRequest

Return type

ReservationCatalogResponse

Authorization

TenantIdAuth, ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Registro do catálogo atualizado com sucesso. -
400 Erro ao atualizar registro do catálogo -
404 Registro do catálogo não encontrado -

[Back to top] [Back to API list] [Back to Model list] [Back to README]