Skip to content

Latest commit

 

History

History
492 lines (338 loc) · 15.6 KB

File metadata and controls

492 lines (338 loc) · 15.6 KB

cloudbeds_fiscal_document.ConfigsApi

All URIs are relative to http://localhost:8700

Method HTTP request Description
delete_logo DELETE /fiscal-document/v1/configs/logo Delete logo image for fiscal documents
get_configs GET /fiscal-document/v1/configs Get list of fiscal documents configs
get_logo GET /fiscal-document/v1/configs/logo Get logo image for fiscal documents
get_pdf_preview GET /fiscal-document/v1/configs/preview Get PDF document preview
update_configs PUT /fiscal-document/v1/configs/{documentKind} Updates a config of a specific kind
upload_logo POST /fiscal-document/v1/configs/logo Upload logo image for fiscal documents

delete_logo

delete_logo(x_property_id)

Delete logo image for fiscal documents

Delete the logo image used in fiscal document templates.

Example

  • Bearer (JWT) Authentication (bearerAuth):
import cloudbeds_fiscal_document
from cloudbeds_fiscal_document.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:8700
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_fiscal_document.Configuration(
    host = "http://localhost:8700"
)

# 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 Bearer authorization (JWT): bearerAuth
configuration = cloudbeds_fiscal_document.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with cloudbeds_fiscal_document.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cloudbeds_fiscal_document.ConfigsApi(api_client)
    x_property_id = 56 # int | Property id

    try:
        # Delete logo image for fiscal documents
        api_instance.delete_logo(x_property_id)
    except Exception as e:
        print("Exception when calling ConfigsApi->delete_logo: %s\n" % e)

Parameters

Name Type Description Notes
x_property_id int Property id

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Logo deleted successfully -
404 Not found -
403 Access denied -

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

get_configs

PropertyConfigsResponse get_configs(x_property_id)

Get list of fiscal documents configs

Retrieves a paginated list of fiscal documents filtered by optional criteria.

Example

  • Bearer (JWT) Authentication (bearerAuth):
import cloudbeds_fiscal_document
from cloudbeds_fiscal_document.models.property_configs_response import PropertyConfigsResponse
from cloudbeds_fiscal_document.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:8700
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_fiscal_document.Configuration(
    host = "http://localhost:8700"
)

# 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 Bearer authorization (JWT): bearerAuth
configuration = cloudbeds_fiscal_document.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with cloudbeds_fiscal_document.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cloudbeds_fiscal_document.ConfigsApi(api_client)
    x_property_id = 56 # int | Property id

    try:
        # Get list of fiscal documents configs
        api_response = api_instance.get_configs(x_property_id)
        print("The response of ConfigsApi->get_configs:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ConfigsApi->get_configs: %s\n" % e)

Parameters

Name Type Description Notes
x_property_id int Property id

Return type

PropertyConfigsResponse

Authorization

bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -

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

get_logo

GetLogoResponse get_logo(x_property_id)

Get logo image for fiscal documents

Retrieve the logo image used in fiscal document templates as a presigned URL.

Example

  • Bearer (JWT) Authentication (bearerAuth):
import cloudbeds_fiscal_document
from cloudbeds_fiscal_document.models.get_logo_response import GetLogoResponse
from cloudbeds_fiscal_document.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:8700
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_fiscal_document.Configuration(
    host = "http://localhost:8700"
)

# 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 Bearer authorization (JWT): bearerAuth
configuration = cloudbeds_fiscal_document.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with cloudbeds_fiscal_document.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cloudbeds_fiscal_document.ConfigsApi(api_client)
    x_property_id = 56 # int | Property id

    try:
        # Get logo image for fiscal documents
        api_response = api_instance.get_logo(x_property_id)
        print("The response of ConfigsApi->get_logo:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ConfigsApi->get_logo: %s\n" % e)

Parameters

Name Type Description Notes
x_property_id int Property id

Return type

GetLogoResponse

Authorization

bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Logo URL retrieved successfully -
404 Not found -
403 Access denied -

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

get_pdf_preview

bytearray get_pdf_preview(x_property_id, preview_request=preview_request)

Get PDF document preview

Build and return PDF document

Example

  • Bearer (JWT) Authentication (bearerAuth):
import cloudbeds_fiscal_document
from cloudbeds_fiscal_document.models.preview_request import PreviewRequest
from cloudbeds_fiscal_document.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:8700
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_fiscal_document.Configuration(
    host = "http://localhost:8700"
)

# 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 Bearer authorization (JWT): bearerAuth
configuration = cloudbeds_fiscal_document.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with cloudbeds_fiscal_document.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cloudbeds_fiscal_document.ConfigsApi(api_client)
    x_property_id = 56 # int | Property id
    preview_request = cloudbeds_fiscal_document.PreviewRequest() # PreviewRequest |  (optional)

    try:
        # Get PDF document preview
        api_response = api_instance.get_pdf_preview(x_property_id, preview_request=preview_request)
        print("The response of ConfigsApi->get_pdf_preview:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ConfigsApi->get_pdf_preview: %s\n" % e)

Parameters

Name Type Description Notes
x_property_id int Property id
preview_request PreviewRequest [optional]

Return type

bytearray

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/octet-stream

HTTP response details

Status code Description Response headers
200 Successful file download * Content-Disposition - Used to indicate if the content should be displayed inline or as an attachment.

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

update_configs

ConfigsResponse update_configs(x_property_id, document_kind, configs_update_request)

Updates a config of a specific kind

Update document config.

Example

  • Bearer (JWT) Authentication (bearerAuth):
import cloudbeds_fiscal_document
from cloudbeds_fiscal_document.models.configs_response import ConfigsResponse
from cloudbeds_fiscal_document.models.configs_update_request import ConfigsUpdateRequest
from cloudbeds_fiscal_document.models.fiscal_document_kind import FiscalDocumentKind
from cloudbeds_fiscal_document.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:8700
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_fiscal_document.Configuration(
    host = "http://localhost:8700"
)

# 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 Bearer authorization (JWT): bearerAuth
configuration = cloudbeds_fiscal_document.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with cloudbeds_fiscal_document.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cloudbeds_fiscal_document.ConfigsApi(api_client)
    x_property_id = 56 # int | Property id
    document_kind = cloudbeds_fiscal_document.FiscalDocumentKind() # FiscalDocumentKind | The kind of the fiscal document.
    configs_update_request = cloudbeds_fiscal_document.ConfigsUpdateRequest() # ConfigsUpdateRequest | 

    try:
        # Updates a config of a specific kind
        api_response = api_instance.update_configs(x_property_id, document_kind, configs_update_request)
        print("The response of ConfigsApi->update_configs:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ConfigsApi->update_configs: %s\n" % e)

Parameters

Name Type Description Notes
x_property_id int Property id
document_kind FiscalDocumentKind The kind of the fiscal document.
configs_update_request ConfigsUpdateRequest

Return type

ConfigsResponse

Authorization

bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -

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

upload_logo

upload_logo(x_property_id, file)

Upload logo image for fiscal documents

Upload a logo image to be used in fiscal document templates.

Example

  • Bearer (JWT) Authentication (bearerAuth):
import cloudbeds_fiscal_document
from cloudbeds_fiscal_document.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:8700
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_fiscal_document.Configuration(
    host = "http://localhost:8700"
)

# 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 Bearer authorization (JWT): bearerAuth
configuration = cloudbeds_fiscal_document.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with cloudbeds_fiscal_document.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cloudbeds_fiscal_document.ConfigsApi(api_client)
    x_property_id = 56 # int | Property id
    file = None # bytearray | Logo image file

    try:
        # Upload logo image for fiscal documents
        api_instance.upload_logo(x_property_id, file)
    except Exception as e:
        print("Exception when calling ConfigsApi->upload_logo: %s\n" % e)

Parameters

Name Type Description Notes
x_property_id int Property id
file bytearray Logo image file

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Logo uploaded successfully -
400 Bad Request -
403 Access denied -

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